semvec/pypi-packages huggingface dataset:
slidingRP 1.1.1
Quality metric from spike trains
Requires Python: >=3.8

# slidingRefractory
Code to perform a new test of whether neurons have contaminated refractory periods, with a sliding window


## Python

### Installation
Install using pip:
```commandline
pip install slidingRP
```

Install using sources in development mode. First clone the repository.
```commandline
cd slidingRefractory
pip install -e .
```

### Minimal working example

```python
from pathlib import Path
import numpy as np
import pandas as pd

from slidingRP import metrics

# get the small test datasets from the github repository first
repo_path = "/home/ibladmin/Documents/PYTHON/int-brain-lab/slidingRefractory"
TEST_DATA_PATH = Path(repo_path).joinpath("test-data", "integration")

params = {'sampleRate': 30000, 'binSizeCorr': 1 / 30000}
spikes = pd.read_parquet(TEST_DATA_PATH.joinpath('spikes.pqt'))
table = metrics.slidingRP_all(spikes.times, spikes.clusters, **params)

assert np.allclose(pd.read_parquet(TEST_DATA_PATH.joinpath("rp_table.pqt")), pd.DataFrame(table), equal_nan=True)
```

### Contribute
#### Run unit tests
```commandline
 pytest python/test_*
```

#### Upload package
```commandline
rm -fR dist
rm -fR build
python setup.py sdist bdist_wheel
twine upload dist/*
```
ensurepkg 0.1.0
A minimal package to ensure pip-managed packages on import. Oriented towards scripting in local environments
Requires Python: >=3

# ensurepkg

`ensurepkg` is a minimal package to ensure a pip-managed package exists.

# example

```example.py
from ensurepkg import EnsurePkg

for guard in EnsurePkg(dict(dotenv="python-dotenv")):
    with guard:
        import dotenv

with EnsurePkg(dict(git="GitPython"), cache_dir="/tmp/ensurepkg"):
    import git

print(dotenv.__name__)
print(git.__name__, git.__version__)
```

# cache_dir

`cache_dir` is where ensurepkg installs the packages. It is isolated from other environments and it's resolved as:

1. setting programatically via `EnsurePkg(cache_dir="...")`
2. from env var $ENSUREPKG_DIR
3. from env var $XDG_CACHE_HOME/ensurepkg
4. from env var $HOME/.cache/ensurepkg
5. /tmp/ensurepkg
django-categories 2.0.0
A way to handle one or more hierarchical category trees in django.

# Django Categories

[![Jazzband](https://jazzband.co/static/img/badge.svg)](https://jazzband.co/)
[![codecov](https://codecov.io/gh/jazzband/django-categories/branch/master/graph/badge.svg?token=rW8mpdZqWQ)](https://codecov.io/gh/jazzband/django-categories)

Django Categories grew out of our need to provide a basic hierarchical taxonomy management system that multiple applications could use independently or in concert.

As a news site, our stories, photos, and other content get divided into "sections" and we wanted all the apps to use the same set of sections. As our needs grew, the Django Categories grew in the functionality it gave to category handling within web pages.

## Features of the project

**Multiple trees, or a single tree.**
You can treat all the records as a single tree, shared by all the applications. You can also treat each of the top level records as individual trees, for different apps or uses.

**Easy handling of hierarchical data.**
We use [Django MPTT](http://pypi.python.org/pypi/django-mptt) to manage the data efficiently and provide the extra access functions.

**Easy importation of data.**
Import a tree or trees of space- or tab-indented data with a Django management command.

**Metadata for better SEO on web pages**
Include all the metadata you want for easy inclusion on web pages.

**Link uncategorized objects to a category**
Attach any number of objects to a category, even if the objects themselves aren't categorized.

**Hierarchical Admin**
Shows the data in typical tree form with disclosure triangles

**Template Helpers**
Easy ways for displaying the tree data in templates:

- **Show one level of a tree.** All root categories or just children of a specified category

- **Show multiple levels.** Ancestors of category, category and all children of category or  a category and its children

## Categories API

Support for categories API can be added by third party application [django-categories-api](https://github.com/PetrDlouhy/django-categories-api).

**Optional Thumbnail field.**
Have a thumbnail for each category!

**"Categorize" models in settings.**
Now you don't have to modify the model to add a `Category` relationship. Use the new settings to "wire" categories to different models.