semvec/pypi-packages huggingface dataset:
pyaudioconvert 0.0.5
A small package to convert audio files

# pyaudioconvert

Simple utility to convert audio from one form to another (via sox). We will use Sox until we find a fast and efficient way to convert reliably in python


## Requirements
 0. At least py3x
 1. Have sox installed 


## Install
 0. `pip install pyaudioconvert`



## Example Usage

### Converting Single WAVs
```python
#let's start with a 24bit 48kz audio wav 2 channel wav
>>> soxi example_24bit_48k_2ch.wav 

Input File     : 'example_24bit_48k_2ch.wav'
Channels       : 2
Sample Rate    : 48000
Precision      : 24-bit
Sample Encoding: 24-bit Signed Integer PCM

#we prefer 16-bit 16kz mono for our systems, let's use python
>>> import pyaudioconvert as pac
>>> pac.convert_wav_to_16bit_mono('example_24bit_48k_2ch.wav', 'example_16bit_16k_1ch.wav')
Out[2]: 'example_16bit_16k_1ch.wav'

#let's check the new file...
>>> soxi example_16bit_16k_1ch.wav 

Input File     : 'example_16bit_16k_1ch.wav'
Channels       : 1
Sample Rate    : 16000
Precision      : 16-bit
Sample Encoding: 16-bit Signed Integer PCM

```


### Converting Directory of WAVs

Maybe I have a whole folder of WAVS that need converting... this will create a _16k.wav version.

```python
(py36) rob:~/example_test$ ls
1.wav  2.wav  3.wav  4.wav

>>>python

Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.4.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import pyaudioconvert as pac

In [2]: pac.convert_all_wavs_in_folder()
2.wav
2_16k.wav
3.wav
3_16k.wav
1.wav
1_16k.wav
4.wav
4_16k.wav

(py36) rob:~/example_test$ ls
1_16k.wav  1.wav  2_16k.wav  2.wav  3_16k.wav  3.wav  4_16k.wav  4.wav


```
kconmd 1.0.17
Molecular dynamics (MD) simulations supported by k-Bags Convolutional Neural Network (kcon).
Requires Python: ~=3.6.0
Keywords: molecular dynamics kcon

# kconMD (k-Bags Convolutional Neural Network Molecular Dynamics)

[![python version](https://img.shields.io/pypi/pyversions/kconmd.svg?logo=python&logoColor=white)](https://pypi.org/project/kconmd)
[![PyPI](https://img.shields.io/pypi/v/kconmd.svg)](https://pypi.org/project/kconmd)
[![Build Status](https://travis-ci.com/njzjz/kconmd.svg?branch=master)](https://travis-ci.com/njzjz/kconmd)
[![Coverage Status](https://coveralls.io/repos/github/njzjz/kconmd/badge.svg?branch=master)](https://coveralls.io/github/njzjz/kconmd?branch=master)
[![codecov](https://codecov.io/gh/njzjz/kconmd/branch/master/graph/badge.svg)](https://codecov.io/gh/njzjz/kconmd)

Molecular Dynamics (MD) simulations supported by [k-Bags Convolutional Neural Network (kCON)](https://github.com/njzjz/kcon).

**Author**: Jinzhe Zeng

Email: jzzeng@stu.ecnu.edu.cn

[![Research Group](https://img.shields.io/website-up-down-green-red/http/computchem.cn.svg?label=Research%20Group)](http://computechem.cn)

## Acknowledgement

Many thanks to [Xin Chen](https://github.com/Bismarrck) for his help and development of [kCON](https://github.com/Bismarrck/kcon).

## Requirements

* [numpy](https://github.com/numpy/numpy)
* [scipy](https://github.com/scipy/scipy)
* [matplotlib](https://github.com/matplotlib/matplotlib)
* [scikit-learn](https://github.com/scikit-learn/scikit-learn)
* [ASE](https://wiki.fysik.dtu.dk/ase/)
* [TensorFlow](https://github.com/tensorflow/tensorflow)

## Installation

### With pip

```sh
pip install kconmd
```

### Build from source

```sh
$ git clone https://github.com/njzjz/kconmd
$ cd kconmd/
$ pip install .
```

## Examples

### Simple example

See [examples/example.py](examples/example.py).

### Client–server model

See [examples/server.py](examples/server.py) and [examples/client.py](examples/client.py).

### Run MD with LAMMPS

See [njzjz/Pyforce](https://github.com/njzjz/Pyforce) repository and install Pyforce module. Then rename [examples/client.py](examples/client.py) as `force.py` and put it where you run LAMMPS. Add a line in the LAMMPS input file:
```
fix 1 all pyforce C H O
```
atn 0.0.2
A/T/N staging for Alzheimer's Disease based on CSF biomarkers

[![pipeline status](https://gitlab.com/xgrg/atn/badges/master/pipeline.svg)](https://gitlab.com/xgrg/atn/commits/master)
[![coverage report](https://gitlab.com/xgrg/atn/badges/master/coverage.svg)](https://gitlab.com/xgrg/atn/commits/master)

# atn

Based on the A/T/N/ classification scheme for Alzheimer's disease biomarkers
[Jack et al., 2016](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4970664/),
what this Python module does is basically applying predefined thresholds to a
given [DataFrame](https://pandas.pydata.org/) (containing biomarker data such
  as cerebrospinal fluid (CSF) levels of _ABeta42_, _ptau_, _ttau_) and building
  multiple lists of subjects with distinct profiles according to
their CSF biomarkers.

Example (with random data):

```
import random
n = 10

abeta42 = [random.randrange(600e3, 1800e3)/1e3 for e in range(0, n)]
ptau = [random.randrange(4e3, 80e3)/1e3 for e in range(0, n)]
ttau = [random.randrange(97e3, 500e3)/1e3 for e in range(0, n)]
data = pd.DataFrame(data=[abeta42, ptau, ttau], index=['abeta42', 'ptau', 'ttau']).transpose()
data
```

> |   | abeta42  | ptau   | ttau    |
> |---|----------|--------|---------|
> | 0 | 1142.327 | 76.636 | 375.448 |
> | 1 | 833.484  | 77.321 | 181.75  |
> | 2 | 951.601  | 6.981  | 309.215 |
> | 3 | 1623.797 | 65.063 | 232.303 |
> | 4 | 920.706  | 62.899 | 310.1   |
> | 5 | 704.215  | 58.526 | 160.826 |
> | 6 | 1687.357 | 53.335 | 422.249 |
> | 7 | 1701.997 | 68.676 | 173.33  |
> | 8 | 1774.046 | 37.214 | 255.638 |
> | 9 | 939.946  | 21.128 | 164.803 |


```
import atn
staging = atn.stage(data, thresholds = {'abeta42':1100, 'ptau':19.2, 'ttau':242})
staging
```

> |    | A     | T     | N     |
> |----|-------|-------|-------|
> | ID |       |       |       |
> | 0  | FALSE | TRUE  | TRUE  |
> | 1  | TRUE  | TRUE  | FALSE |
> | 2  | TRUE  | FALSE | TRUE  |
> | 3  | FALSE | TRUE  | FALSE |
> | 4  | TRUE  | TRUE  | TRUE  |
> | 5  | TRUE  | TRUE  | FALSE |
> | 6  | FALSE | TRUE  | TRUE  |
> | 7  | FALSE | TRUE  | FALSE |
> | 8  | FALSE | TRUE  | TRUE  |
> | 9  | TRUE  | TRUE  | FALSE |


```
print(atn.staging_summary(staging))
```

> CSF amyloid (A) positive/negative: 5/5
> CSF ptau (T) positive/negative: 9/1
> CSF ttau (N) positive/negative: 5/5
>
> A+T+: 4
> A+T-: 1
> A-T-: 0
> A-T+ (SNAPs): 5
>
> A+T+N+: 1
> A+T+N-: 3
> A-T+N+: 3
> A-T+N-: 2
> A-T-N-: 0
> A-T-N+: 0
> Total subjects: 10

So yes, it is simple, stupid. But this allows one to quickly select groups of
subjects as follows:

```
groups = atn.groups(staging)
data.loc[groups['A+'].index]
```

> |    | abeta42 | ptau   | ttau    |
> |----|---------|--------|---------|
> | ID |         |        |         |
> | 1  | 833.484 | 77.321 | 181.75  |
> | 2  | 951.601 | 6.981  | 309.215 |
> | 4  | 920.706 | 62.899 | 310.1   |
> | 5  | 704.215 | 58.526 | 160.826 |
> | 9  | 939.946 | 21.128 | 164.803 |

# Dependencies

- Python >= 3.5
- Pandas >= 0.24.1

# Install

First make sure you have installed all the dependencies listed above. Then you can install **atn** by running the following command in a command prompt:

> pip install atn