semvec/pypi-packages huggingface dataset:
pinyinlize 0.2.1
a package converts short Chinese-character strings(titles of books, articles or journals) to pinyin.
Keywords: pinyin, Chinese, title, journal, book

readMe.md

**1 Description**: 
This is a simple and short command-line tool that converts short Chinese-character strings(titles of books, articles or journals) to pinyin. It's purpose is to facilitate generating Chinese citations or bibiliograph in the English setting. 

**2 Internal Steps** 

It first tokenizes the Chinese strings using **Jieba**, and then output the corresponding pinyin via `pypinyin`'s `lazy_pinyin`.

 - input: Chinese characters (it accepts both traditional and simplified Chinese)
 - output: pinyin strings

There are two possible outputs:  

- 1. the sentence style, which means only the first letter of the first word is capitalized. 
- 2. the headline style, in which the first letters of all tokens are capitalized. The default is the sentence style. You can use `--head` to output in the headline style


**3 usage:** 

- 1. command line:      

    `pinyinlize <Chinese_text> [--head]`

    eg: 

    `pinyinlize "清代基層地方官人事嬗遞現象之量化分析"`

    output: "Qingdai jiceng difangguan renshi shandi xianxiang zhi lianghua fenxi"

    
- 2. in python scripting

    `from pinyinlize.main_script import to_pinyin`

    The method to_pinyin has two parameters, the first the text_string, the second is True or False value. The default is True. It determines if the output is formated in sentence style.
    If sent_style is set to False, it will output headline style 
    
    eg :

    `to_pinyin("清代基層地方官人事嬗遞現象之量化分析", sent_style=False)`

    output: "Qingdai Jiceng Difangguan Renshi Shandi Xianxiang Zhi Lianghua Fenxi"

**4 Installation** 

`pip install pinyinlize`

**5 future plans**
To include a API call to Crossref and an option to output DOI or bibtex for the article or book input.
atomID 0.3.11
Python package to identify and annotate crystal structure data files
Requires Python: <4.0.0,>=3.9

# atomID

Welcome to the `atomID` package! This README will guide you through the initial steps required to start using the `AnnotateCrystal` class for annotating crystal structures and defects. Follow the steps outlined below to get started.

## Installation

To begin, you need to install the `atomID` package. This can be done using pip:

```bash
pip install atomid
```

## Usage

This section provides a step-by-step guide on how to utilise the `AnnotateCrystal` class within the `atomID` package.

### 1. Import the Required Class

Start by importing the `AnnotateCrystal` class from the `atomid.annotate` module:

```python
from atomid.annotate import AnnotateCrystal
```

### 2. Create an Instance of `AnnotateCrystal`

Next, create an instance of the `AnnotateCrystal` class:

```python
crystal = AnnotateCrystal()
```

### 3. Read the Crystal Structure File

Read the crystal structure file by using the `read_crystal_structure_file` method. Make sure to replace `crystal_data_file_path` with the actual path to your crystal structure file:

```python
crystal.read_crystal_structure_file(crystal_data_file_path, "vasp")
```

### 4. Annotate the Crystal Structure

You can now annotate the crystal structure with the `annotate_crystal_structure` method:

```python
crystal.annotate_crystal_structure()
```

### 5. Annotate Defects

To annotate defects, provide a reference file path. Replace `ref_file_path` with the actual path to your reference file:

```python
crystal.annotate_defects(ref_file_path, "vasp")
```

### 6. Write to File

Finally, write the annotated data to a file using the `write_to_file` method. Specify the output file name and format:

```python
crystal.write_to_file(output_file_path, "ttl")
```

## Example

Here is a complete example that combines all the steps:

```python
from atomid.annotate import AnnotateCrystal

# Create an instance of AnnotateCrystal
crystal = AnnotateCrystal()

# Read the crystal structure file
crystal.read_crystal_structure_file("path/to/your/interstitial_file.poscar", "vasp")

# Annotate the crystal structure
crystal.annotate_crystal_structure()

# Annotate defects using a reference file
crystal.annotate_defects("path/to/your/reference_file.poscar", "vasp")

# Write the annotated data to a file
crystal.write_to_file("Al_inter.ttl", "ttl")
```

# Documentation

Detailed documentation for the `atomID` package can be found in [docs](https://github.com/Materials-Data-Science-and-Informatics/atomID/tree/main/docs) folder.

# Contributing

Please refer to the [CONTRIBUTING GUIDE](https://github.com/Materials-Data-Science-and-Informatics/atomID/blob/main/docs/contributing.md) on contributing to the `atomID` package.

# Contact

For any queries or feedback, kindly create an issue on the [GitHub repository](https://github.com/Materials-Data-Science-and-Informatics/atomID)
phasefinder 0.0.3
rotational beat estimation model
Requires Python: >=3.8

**phasefinder** is a beat estimation model that predicts metric position as rotational phase, heavily inspired by [this paper](https://archives.ismir.net/ismir2021/paper/000061.pdf).


[full writeup here](https://bleu.green/phasefinder)


# usage

## python 

```python
from phasefinder import Phasefinder

# initialize model
pf = Phasefinder()

# predict beats
audio_path = "path/to/your/audio/file.[wav/mp3/flac/etc]"
beat_times = pf.predict(audio_path)

# predict beats and BPM
beat_times, bpm = pf.predict(audio_path, include_bpm=True)

# generate a click track
output_path = "output_with_clicks.wav"
pf.make_click_track(audio_path, output_path, beats=beat_times)
```

## cli

### basic usage

```bash
python -m phasefinder.infer path/to/your/audio/file.wav
```

This will print the estimated beat times to the console.

### options

- `--bpm`: Include BPM in the output
- `--noclean`: Don't apply the cleaning function to the beat times
- `--format {times,click_track}`: Choose the output format (default: times)
  - `times`: Output beat times
  - `click_track`: Generate an audio file with click track
- `--audio_output PATH`: Specify the path for the output audio file with clicks (default: output_with_clicks.wav)
- `--json_output PATH`: Save the results to a JSON file

### examples

1. Estimate beats and BPM:
   ```bash
   python -m phasefinder.infer path/to/audio.wav --bpm
   ```

2. Generate a click track:
   ```bash
   python -m phasefinder.infer path/to/audio.wav --format click_track --audio_output output.wav
   ```

3. Save results to a JSON file:
   ```bash
   python -m phasefinder.infer path/to/audio.wav --bpm --json_output results.json
   ```

4. Estimate beats without applying the cleaning function:
   ```bash
   python -m phasefinder.infer path/to/audio.wav --noclean
   ```
slf4py 0.0.4
Simple Logging Facade for Python

# slf4py
Simple Logging Facade for Python.

## How to use
```bash
# at Terminal

$ pip install slf4py
```

```python
# at example.py

from slf4py import set_logger


@set_logger
class Example:
    def hi(self):
        self.log.info("Hello World")

        
e = Example()
e.hi()
# [INFO] [2024-06-04 23:50:41,355] [example.py:9] Hello World


from slf4py import create_logger


def main():
    logger = create_logger()
    logger.info("Hello World")


main()
# [INFO] [2024-06-04 23:50:41,355] [example.py:21] Hello World
```