semvec/pypi-packages huggingface dataset:
rosenbrock 0.7.1
Rosenbrock distribution, including unnormalized density and analytic sampler
Requires Python: >=3.6

# Rosenbrock distribution

This repository implements the multidimensional [Rosenbrock distribution](https://arxiv.org/pdf/1903.09556.pdf), including unnormalized density and analytic sampler


## Installation

You can install the package via:

```bash
git clone https://github.com/alisiahkoohi/rosenbrock
cd rosenbrock
pip install -e .
```

## Example

For samples from a 2D Rosenbrock distribution, run:

```
python example/example.py
```

![](figs/samples.png)


## Questions

Please contact alisk@gatech.edu for further questions.


## Author

Ali Siahkoohi
alisk 0.6.2
Rosenbrock distribution, including unnormalized density and analytic sampler
Requires Python: >=3.6

# Rosenbrock distribution

This repository implements the multidimensional [Rosenbrock distribution](https://arxiv.org/pdf/1903.09556.pdf), including unnormalized density and analytic sampler


## Installation

You can install the package via:

```bash
git clone https://github.com/alisiahkoohi/rosenbrock
cd rosenbrock
pip install -e .
```

## Example

For samples from a 2D Rosenbrock distribution, run:

```
python example/example.py
```

![](figs/samples.png)


## Questions

Please contact alisk@gatech.edu for further questions.


## Author

Ali Siahkoohi
django-db-retry 0.1.2
Adds support for database query retries
Requires Python: >=3.5.3

[![PyPI version](https://badge.fury.io/py/django-db-retry.svg)](https://badge.fury.io/py/django-db-retry) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-db-retry.svg)
![GitHub stars](https://img.shields.io/github/stars/parikls/django-db-retry.svg) ![PyPI - Downloads](https://img.shields.io/pypi/dm/django-db-retry.svg) ![GitHub issues](https://img.shields.io/github/issues/parikls/django-db-retry.svg)

## Description

Django database retries. Main motivation for using this - to deal with network/db issues to avoid data-loss.

Usually when you develop a project locally with a single user - everything works perfectly. Local networks are super-stable, and simultaneous users don't bother you.
When it comes to the real world - your application can (and definitely will) face network issues.
Second case - deadlocks, which I personally see too often across different projects.
And the only possible solution here to avoid the data-loss - to do a query retry.

**IMPORTANT:** Right now this works **ONLY WITH MYSQL**. If someone requires postgres/other dbs support - please create an issue

## Usage

Install: `pip install django-db-retry`

Choose your flow (or use both):

- Monkey-patch django internal methods (**IMPORTANT:** global patching won't handle retries for atomic transactions. `with_query_retry` decorator should be used instead)
- Use explicit decorator

## Monkey-patch:


Add next code somewhere on the top level of your project
```python

from django_db_retry import install as install_db_retries
install_db_retries()
```

That's it =)
All the needed underlying django methods will be wrapped with the retry decorator and 
will do execution retry if your app will face a network issue or deadlock 

## Decorator

Can be used on top of any function/view and will do a retry if deadlock/network error will happen.
Default number of retries is 5. This value can be configured by using the `QueryRetry` class (see example 2):

```python
from django_db_retry import with_query_retry
from django.db.transaction import atomic

@with_query_retry
def some_view():
    query_0, query_1 = ...
    with atomic():
        query_0()
        query_1()
    return ...
```
 
Configuring own value of retries 
```python
from django_db_retry import QueryRetry
from django.db.transaction import atomic

my_retry_decorator = QueryRetry(max_tries=100)

@my_retry_decorator
def some_view():
    query_0, query_1 = ...
    with atomic():
        query_0()
        query_1()
    return ...
```
# Todo

- Deal with atomic transactions during global patching
- Add possibility to install the package using django `INSTALLED_APPS` settings
vader 0.0.3
Fast voice activity detection with Python
Requires Python: >=3.5

# Voice Activity Detection with Python

### Installing

```
pip install vader
```

### Basic usage

```python
import vader

# use your own mono, preferably 16kHz .wav file
filename = "audio.wav"

# returns segments of vocal activity (unit: seconds)
# note: it uses a pre-trained NN by default
segments = vader.vad(filename)

# where to dump audio files
out_folder = "segments"
# write segments into .wav files
vader.vad_to_files(segments, filename, out_folder)
```

You can also use different pre-trained models by specifying the method parameter

```python
# logistic method
segments = vader.vad(filename, threshold=.1, window=20, method="logistic")

# multi-layer perceptron method
segments = vader.vad(filename, threshold=.1, window=20, method="nn")

# Naive Bayes method
segments = vader.vad(filename, threshold=.5, window=10, method="nb")

# Random Forest method
segments = vader.vad(filename, threshold=.5, window=10, method="rf")
```
The `threshold` parameter is the ratio of voice frames above which a window of frames is counted as a voiced sample. The `window` parameter controls the number of frames considered, and thus the length of the voiced samples.

You can also train your own models:

```python
import vader
model = vader.train.logistic_regression(mfccs, activities)
model = vader.train.random_forest_classifier(mfccs, activities)
model = vader.train.NN(mfccs, activities)
model = vader.train.NB(mfccs, activities)
```
The variable `mfccs` is a list of varying length mfcc features (num_samples, *varying_lengths*, 13), while `activities` is a list of binary vectors whose lengths match those of the mfcc features (num_samples, *varying_lengths*), equal to 1 when a frame is voiced, and 0 otherwise.

## Authors

Maixent Chenebaux