semvec/pypi-packages huggingface dataset:
nestview 0.1.1
Explore nested structures -- dictionaries and lists
License: MIT

# NestView

Explore nested structures in Python at various levels of granularity.

# Examples

from nestview import nestview

```python
    from nestview import nestview


    nested_struct = {
        "orders": [
            {
                "id": "id1",
                "quantity": 43,
                "product": {
                    "id": "prodId1",
                    "name": "Prod 1",
                    "desc": "Description",
                },
            },
            {
                "id": "id2",
                "quantity": 12,
                "product": {
                    "id": "prodId1",
                    "name": "Prod 1",
                    "desc": "Description",
                },
            },
            {
                "id": "id3",
                "quantity": 3,
                "product": {
                    "id": "prodId2",
                    "name": "Prod 2",
                    "desc": "Description",
                },
            },
            {
                "id": "id4",
                "quantity": 2,
                "product": {
                    "id": "prodId1",
                    "name": "Prod 1",
                    "desc": "Description",
                },
            },
            {
                "id": "id5",
                "quantity": 4,
                "product": {
                    "id": "prodId1",
                    "name": "Prod 1",
                    "desc": "Description",
                },
            },
        ]
    }


    print(nestview(nested_struct))
```

gives

    {'orders': '[25]'}

For the same structure with more details:

    print(nestview(nested_struct, level=2))

gives

    {'orders': ['{5}', '{5}', '{5}', '{5}', '{5}']}
KleenTimer 0.1.3
Clean timer system for python application.
License: MIT

<div align="center">
  <img src="https://raw.githubusercontent.com/Edenskull/KleenTimer/master/.github/_static/KleenTimer.png">
</div>

<div align="center">

[![GitHub license](https://img.shields.io/github/license/Edenskull/KleenTimer?color=blue&style=for-the-badge)](https://github.com/Edenskull/KleenTimer/blob/master/LICENSE)
![GitHub repo size](https://img.shields.io/github/repo-size/Edenskull/KleenTimer?color=green&style=for-the-badge)
![GitHub repo size](https://img.shields.io/badge/Python-3.6%20%7C%203.7-yellow?style=for-the-badge)

</div>

# Kleen-Timer
Simple python library that handle execution time of a script and display the result in many way.

## Table of contents
* [Installation](#installation)
* [Documentation](#documentation)

## Installation

You can install the module via pip :  
```pip install kleentimer```

or via wheel file [From PyPi](https://pypi.org/project/KleenTimer/#modal-close) :  
```
pip install wheel
python -m wheel install wheel_file.whl
```

## Documentation

The aim of kleentimer is to make it simple for the user to get a script made timer.  
First import it to your script : 
```PYTHON3
from kleentimer import kleentimer
```

Then you can setup the format that will be displayed at the end of the execution : 

* You got three usable variables (those are not mandatory, you can print only secondes and minutes and all possibility like that)
    * hours
    * minutes
    * secondes
```PYTHON3
kleentimer.init_timer("The script run for {hours}h {minutes}min and {secondes}sec")
```

When you want to set the start of your script you can use the function start_timer()

```PYTHON3
kleentimer.start_timer()
```

And when you want to stop the timer simply call end_timer()

```PYTHON3
kleentimer.end_timer()
```

Then the function elapsed_time() return the string formatted with the right formatting

```PYTHON3
output = kleentimer.elapsed_time()
print(output)
```

```PYTHON
>> The script run for 0h 10min and 20sec
```
detection 0.1.2
A motion detector
License: MIT
Requires Python: >=3.7,<4.0

# python-detection

A motion detector. Currently two detectors, `SimpleDetector` and `BlobDetector` are implemented.
The former performs simple frame differencing, and may not be useful for most purposes.
The latter does a bit more and utilizes the OpenCV
[MOG2](https://docs.opencv.org/3.4/d7/d7b/classcv_1_1BackgroundSubtractorMOG2.html)
background subtractor to get more realistic results. The detectors try to use OpenCL if it's available.

Using the `BlobDetector`:

```
import numpy as np
from detection.detectors.blob.detector import BlobDetector

detector = BlobDetector({"blur": 7, "learningrate": 0.001, "accelerate": True})
(_boundingboxes, _metadata) = detector.feed(
    np.reshape(np.frombuffer(frame, dtype=np.uint8), newshape=(height, width, 3))
)
```

The `blur` value, if specified, will be performed before feeding the frame to the detector.
If no `blur` is given, the frame is fed as-is.

The `learningrate` parameter is described
[here](https://docs.opencv.org/3.4/d7/df6/classcv_1_1BackgroundSubtractor.html#aa735e76f7069b3fa9c3f32395f9ccd21).
If no `learningrate` is specified, it will default to `0.001`.

The `accelerate` parameter defaults to `True`, and the detector attempts to exploit any GPU resources
available on the host.

The metadata contains details (in order) about the operations performed on the input image, and
for how long each of those took:

```
{
    'start_timestamp': datetime.datetime(2020, 6, 16, 17, 7, 6, 443946),
    'took': [
        ('cv.UMat', 0.0007669925689697266),
        ('cv.GaussianBlur', 0.0014679431915283203),
        ('cv.BackgroundSubtractorMOG2.apply', 0.0003933906555175781),
        ('cv.findContours', 0.001050710678100586),
        ('cv.approxPolyDP', 1.7404556274414062e-05),
        ('cv.boundingRect', 2.384185791015625e-06),
        ('total', 0.005391)
    ],
    'end_timestamp': datetime.datetime(2020, 6, 16, 17, 7, 6, 449337)}
}
```

The bounding boxes contain any detected movement:

```
{
    (
        UUID('091c2620-ebb6-4cbe-b59d-42da156c3ba9'),
        datetime.datetime(2020, 6, 16, 16, 11, 35, 931755)
    ): (279, 324, 710, 755),
    (
        UUID('bcbf2e18-ed2b-4e68-b94c-abe021071e61'),
        datetime.datetime(2020, 6, 16, 16, 11, 35, 931755)
    ): (489, 324, 920, 755)
}
```

The UUIDs are here to provide forward compatibility with a hypothetical new detector that
also tracks movement.

Development
-----------

TLDR:

Create and activate a Python 3.7 virtualenv:

```
$ python3.7 -m venv .venv && . .venv/bin/activate
```

Change to a branch:

```
git checkout -b my_branch
```

Install Poetry: https://python-poetry.org/docs/#installation

Install project deps and pre-commit hooks:

```
poetry install
pre-commit install
pre-commit run --all-files
```

Ready to go.

Remember to activate your virtualenv whenever working on the repo, this is needed
because pylint and mypy pre-commit hooks use the "system" python for now (because reasons).
jax-data 0.1.1
Native data handling for JAX
License: MIT
Requires Python: >=3.7,<4.0
Keywords: jax,jax-data,data,dataset,datahandling

# Jax Datasets
---
## data
---
To load data, first subclass the `jax_data.Dataset` class, implementing the __len__ and __getitem__ methods.
The `jax_data.Dataloader` class is a simplified adaptation of torch.utils.data.DataLoader.
pflogf 0.0.3
Logging formatter for fnndsc/pf* family, inspired by pfmisc.debug
License: MIT
Requires Python: >=3.6
Keywords: logging color

# pflogf

[![PyPI version](https://badge.fury.io/py/pflogf.svg)](https://pypi.org/project/pflogf/)

Colorful logging formatter for fnndsc/pf* family.
Its hardcoded format displays displays time, hostname, and calling function.
The various logging levels (debug, info, warn, error, critical) are printed in different colors.

pflogf aims to replace [pfmisc/debug.py](https://github.com/FNNDSC/pfmisc/blob/master/pfmisc/debug.py)
using the standard Python [logging](https://docs.python.org/3/library/logging.html) module.

## Screenshots

The output is intended for full-screen TTY output.

![full screen](docs/wide.png)

It tries to detect when not enough colums are available to display full information.

![half screen](docs/narrow.png)

## Examples

```python
import logging
from pflogf import FnndscLogFormatter

logger = logging.getLogger(__name__)
handler = logging.StreamHandler()
handler.setFormatter(FnndscLogFormatter())
logger.addHandler(handler)

logger.setLevel(logging.DEBUG)
logger.debug('debug me as I am full of bugs')
logger.info('an informative statement')
logger.warning('you\'ll probably ignore this warning')
logger.error('error, problem exists between keyboard and chair')
logger.critical('critical failure, haha jk')
```
sp-distributions 0.1.2
A statistical package to compute Mean and Standard deviation on of various Probability distributions
License: MIT
Requires Python: >=3.6

This is a statistical Python library,  to compute Mean and Standard deviation on of various Probability distributions,
 like _Gaussian Distribution_ and _Binomial distribution_. This package is developed by **Sandip Palit**.
 
Install statement: **_pip install sp_distributions_**
 
## **Import statement :**

Gaussian:  **_from sp_distributions import Gaussian_**

Binomial: **_from sp_distributions import Binomial_**

## **Initialise statement :**

Gaussian:  **_g=Gaussian(5,3)_**    (mu=5, sigma=3)

Binomial: **_b=Binomial(0.5,3)_**    (p=0.5, n=3)

## **Methods :**

**calculate_mean()**

_Function to calculate the mean of the data set._

Args: None

Returns: float

**calculate_stdev()**

_Function to calculate the standard deviation of the data set._

Args: None

Returns: float

**read_data_file()**

_Function to read in data from a txt file. The txt file should have one number (float) per line. After reading in the file, the mean and standard deviation are calculated_

Args: file_name (string)

Returns: None

**plot()**

_Function to output a plotting of the instance variable data using matplotlib pyplot library._

Args: None

Returns: None

**pdf():**

_Probability density function calculator for the gaussian distribution, on a specific point (x)._

Args: x (float)

Returns: float

**plot_pdf():**

_Function to plot the normalized graph of the data and a plot of the probability density function along the same range._

Args: n_spaces (int)

Returns: x values (list), y values (list)



_You can also add together two objects of a distribution by using **+** operator._