semvec/pypi-packages huggingface dataset:
torchlibrosa 0.1.0
PyTorch implemention of part of librosa functions.
Requires Python: >=3.6

# TorchLibrosa: PyTorch implementation of Librosa

This codebase provides PyTorch implementation of some librosa functions. If users previously used for training cpu-extracted features from librosa, but want to add GPU acceleration during training and evaluation, TorchLibrosa will provide almost identical features to standard torchlibrosa functions (numerical difference less than 1e-5).

## Install
```bash
$ pip install torchlibrosa
```

## Examples 1

Extract Log mel spectrogram with TorchLibrosa.

```python
import torch
import torchlibrosa as tl

batch_size = 16
sample_rate = 22050
win_length = 2048
hop_length = 512
n_mels = 128

batch_audio = torch.empty(batch_size, sample_rate).uniform_(-1, 1)  # (batch_size, sample_rate)

# TorchLibrosa feature extractor the same as librosa.feature.melspectrogram()
feature_extractor = torch.nn.Sequential(
    tl.Spectrogram(
        hop_length=hop_length,
        win_length=win_length,
    ), tl.LogmelFilterBank(
        sr=sample_rate,
        n_mels=n_mels,
        is_log=False, # Default is true
    ))
batch_feature = feature_extractor(batch_audio) # (batch_size, 1, time_steps, mel_bins)
```

## Examples 2

Extracting spectrogram, then log mel spectrogram, STFT and ISTFT with TorchLibrosa.

```python
import torch
import torchlibrosa as tl

batch_size = 16
sample_rate = 22050
win_length = 2048
hop_length = 512
n_mels = 128

batch_audio = torch.empty(batch_size, sample_rate).uniform_(-1, 1)  # (batch_size, sample_rate)

# Spectrogram
spectrogram_extractor = tl.Spectrogram(n_fft=win_length, hop_length=hop_length)
sp = spectrogram_extractor.forward(batch_audio)   # (batch_size, 1, time_steps, freq_bins)

# Log mel spectrogram
logmel_extractor = tl.LogmelFilterBank(sr=sample_rate, n_fft=win_length, n_mels=n_mels)
logmel = logmel_extractor.forward(sp)   # (batch_size, 1, time_steps, mel_bins)

# STFT
stft_extractor = tl.STFT(n_fft=win_length, hop_length=hop_length)
(real, imag) = stft_extractor.forward(batch_audio)
# real: (batch_size, 1, time_steps, freq_bins), imag: (batch_size, 1, time_steps, freq_bins) #

# ISTFT
istft_extractor = tl.ISTFT(n_fft=win_length, hop_length=hop_length)
y = istft_extractor.forward(real, imag, length=batch_audio.shape[-1])    # (batch_size, samples_num)
```

## Example 3

Check the compability of TorchLibrosa to Librosa. The numerical difference should be less than 1e-5.

```python
python3 torchlibrosa/stft.py --device='cuda'    # --device='cpu' | 'cuda'
```

## Contact
Qiuqiang Kong, qiuqiangkong@gmail.com

## Cite
[1] Qiuqiang Kong, Yin Cao, Turab Iqbal, Yuxuan Wang, Wenwu Wang, and Mark D. Plumbley. "PANNs: Large-scale pretrained audio neural networks for audio pattern recognition." IEEE/ACM Transactions on Audio, Speech, and Language Processing 28 (2020): 2880-2894.

## External links
Other related repos include:

torchaudio: https://github.com/pytorch/audio

Asteroid-filterbanks: https://github.com/asteroid-team/asteroid-filterbanks

Kapre: https://github.com/keunwoochoi/kapre
bobbin 0.0.2
Tools for making training loops with flax.linen models.
Requires Python: >=3.8
Keywords: python machine learning flax

# Bobbin

![Unittest](https://github.com/yotarok/bobbin/actions/workflows/lint_and_test.yml/badge.svg)
[![Documentation Status](https://readthedocs.org/projects/bobbin/badge/?version=latest)](http://bobbin.readthedocs.io)

## What is this?

A small tool for making neural net training loop with flax.linen.

This library is designed to be a set of small tools and not to be a full-blown
framework for deep learning.  Users should keep freedom not to use some parts
of this library and the rest of the library should still be able to serve the
users.

Currently, this library contains the following components:

- `cron`:
  Tools for defining and performing periodical actions in the training-loop.
- `evaluation`:
  Helpers for performing evaluation and handling metrics.
- `pmap_utils`:
  Tools for helping the use of `jax.pmap`.
- `pytypes`:
  Type definitions for better type annotations.
- `tensorboard`:
  Helper functions for publishing training state and evaluation summaries.
- `training`:
  Helpers for writing training-loops for Flax models.
- `var_utils`:
  Utility for accessing variable collections of Flax models.


## Contributing

See [`CONTRIBUTING.md`](CONTRIBUTING.md) for details.

## License

Apache 2.0; see [`LICENSE`](LICENSE) for details.

## Disclaimer

This library is still in a very early phase of development, and therefore,
its API can often be subject to destructive change.

This project is not an official Google project. It is not supported by
Google and Google specifically disclaims all warranties as to its quality,
merchantability, or fitness for a particular purpose.
pyhmtai 0.1.6
HMtai python port.
Requires Python: >=3.7

# PyHMTai
Simple python port of HMtai

# Examples
```python
from pyhmtai import PyHMTai, AIOPyHMTai

sync_api = PyHMTai()
async_api = AIOPyHMTai()

sync_api.nsfw_image(endpoint="ass")
await async_api.nsfw_image(endpoint="ass")
```
simple-cpf 0.1.4
A simple script to manipulate and validate CPF
Requires Python: >=3.10,<4.0

# Simple CPF

A simple package to validate and format the CPF - _Brazil Identification Card_.   

## Installation

```bash
pip install simple-cpf
```

## How to use

```python
import simple_cpf.simple_cpf import CPF

# validating a cpf
CPF.is_valid('117.762.459-11')  # True
CPF.is_valid('117.762.459-19')  # False

# generating a fake cpf
CPF.fake()                      # '917.350.558-75'

# formatting a valid cpf
CPF.formatted('10757246354')    # '107.572.463-54'
                                # in case of invalid cpf, it will return:
                                # 'Enter a valid CPF.'
```

## Made by:
cesargodoi  -  https://github.com/cesargodoi/simple_cpf