semvec/pypi-packages huggingface dataset:
pianopy 0.0.2
A python library/application to play, compose and interface with virtual and real pianos using MIDI.
License: MIT
Requires Python: >=3.8,<4.0
Keywords: piano,music,game

# pianopy
A python library/application to play, compose and interface with virtual and 
real pianos using MIDI.

## Run tests, build, publish
1. Run the unittests:  
`make test`
2. Build the package as a wheel:  
`make build`
3. Publish the package to pypi
`make publish`

## Development setup
1. Make sure prerequisites are installed
2. Clone the git repo:  
`git clone https://github.com/PeterPyPan/pianopy`
3. Use make to setup the dev environment:
```
# This sets up a venv in ./.venv using poetry and installs the pre-commit hooks.  
make setup
```

## Prerequisites
1. Install `poetry`  
Verify the poetry installation using:  
`poetry --version`  
Installation instructions: https://python-poetry.org/docs/#installation.

2. Install `make`
Verify the make installation using:  
`make --version`  

```
# Installation for OSX
# remove previous installation of command line tools
rm -rf /Library/Developer/CommandLineTools/
# install command line tools
xcode-select --install
# setup command line tools
sudo xcode-select --switch /Library/Developer/CommandLineTools/
```
brownian-diffuser 0.0.2
Brownian diffuser
License: MIT
Requires Python: >3.7.0

# brownian-diffuser

Forward integrate torch neural networks

Similar to [`torchsde.sdeint`](https://github.com/google-research/torchsde) or [`torchdiffeq.odeint`](https://github.com/rtqichen/torchdiffeq) but for vanilla neural networks as implemented by [`TorchNets`](https://github.com/mvinyard/torch-nets/)

### Example usage

**`BrownianDiffuser`**
```python
from brownian_diffuser import BrownianDiffuser

diffuser = BrownianDiffuser()
```

```python
from torch_nets import TorchNet
import torch

net = TorchNet(50, 50, [400, 400])
X0 = torch.randn([200, 50])
t = torch.Tensor([2, 4, 6])
```

```python
X_pred = diffuser(net, X0, t, n_steps=40, stdev=0.5, max_steps=None, return_all=False)
X_pred.shape
```
```
torch.Size([3, 200, 50])
```

**`BrownianMotion`**
```python
from brownian_diffuser import BrownianMotion

X_state = torch.randn([400, 50])

BM = BrownianMotion(X_state, stdev=0.5, n_steps=40)
Z = BM()
Z.shape
```
```
torch.Size([40, 400, 50])
```

### Installation

```
pip install brownian-diffuser
```