semvec/pypi-packages huggingface dataset:
gaussian-binomial-distribution-calculation 1.0.2
Gaussian and Binomial distributions
Requires Python: >=3.6

# Gaussian-Binomial-Distribution Package

A python module to calculate and plot Gaussian and binomial distributions.

## Uploading a Package

[optional] commands 

    [pipenv run] python3 setup.py sdist bdist_wheel
    [pipenv run] twine check dist/*
    [pipenv run] twine upload dist/*

## Distribution Formulas Used

Calculated mean, standard deviation, variance and probability density function in both distibutions.

1. [Gaussian Distribution formulas](https://en.wikipedia.org/wiki/Normal_distribution)
2. [Binomial Distribution formulas](https://en.wikipedia.org/wiki/Binomial_distribution)

## Example to use the package

After installing the package, create a file `example_test.py` and add following lines

    from gaussian_binomial_distribution_calculation import Gaussian, Binomial


    gaussian_one = Gaussian(10, 7) 

    gaussian_two = Gaussian(15, 21)

    gaussian_sum = gaussian_one + gaussian_two

    binomial_one = Binomial(.4, 25)

    binomial_two = Binomial(.4, 30)

    binomial_sum = binomial_one + binomial_two
    print("-----Gaussian mean, standard deviation, and probability density function---")
    print(gaussian_one.mean)
    print(binomial_one.stdev)
    print(gaussian_one.pdf(4))
    print("First gaussian",gaussian_one)
    print("Second gaussian",gaussian_two)
    print("--------sum calculation-----------")
    print("sum of two gaussian distribution",gaussian_sum)
    print("-----Binomial mean, standard deviation, and probability density function---")
    print(binomial_one.mean)
    print(binomial_one.stdev)
    print(binomial_one.pdf(4))
    print("First binomial",binomial_one)
    print("Second binomial",binomial_two)
    print("--------sum calculation-----------")
    print("sum of two binomial distribution", binomial_sum)

The following program result 

    -----Gaussian mean, standard deviation, and probability density function---
    10
    2.449489742783178
    0.03947074079064297
    First gaussian mean 10, standard deviation 7
    Second gaussian mean 15, standard deviation 21
    --------sum calculation-----------
    sum of two gaussian distribution mean 25, standard deviation 22.135943621178654
    -----Binomial mean, standard deviation, and probability density function---
    10.0
    2.449489742783178
    0.00710406209537996
    First binomial mean 10.0, standard deviation 2.449489742783178, p 0.4, n 25
    Second binomial mean 12.0, standard deviation 2.6832815729997477, p 0.4, n 30
    --------sum calculation-----------
    sum of two binomial distribution mean 22.0, standard deviation 5.132771315782925, p 0.4, n 55
statictypes 0.0.2
Enforce type annotations
Requires Python: >=3.6

# statictypes

```statictypes``` helps your Python functions do exactly what you asked them to do, and not anything else.
This package delivers three simple decorators:

* ```@statictypes.enforce```: Raise an error if the incorrect argument or return type is given.
* ```@statictypes.warn```: Give a warning if the incorrect argument  or return type is given.
* ```@statictypes.convert```: Try to convert into the given argument type, or return an error.

## Example 1

Let's define a simple function, and enforce Python's type annotations.

```python3
import statictypes

@statictypes.enforce
def myfunc(text: str, number: int) -> str:
    return text + " " + str(number)

myfunc("my number is", 1)  # This works as intended
myfunc("my number is", 1.1)  # This raises an error
```

Calling ```myfunc("my number is", 1)``` is valid, but ```myfunc("my number is", 1.1)``` results in:

```statictypes.StaticTypeError: Argument 'number' got incorrect type <class'float'>, expected <class'int'>.```

## Example 2

Let's instead choose to convert the arguments to the given type annotations.

```python3
import statictypes

@statictypes.convert
def myfunc(text: str, number: int) -> str:
    return text + " " + str(number)

myfunc("my number is", 1)  # This works as intended
myfunc("my number is", 1.1)  # This gives the same output as above
```

This time, both ```myfunc("my number is", 1)``` and ```myfunc("my number is", 1.1)``` is valid.
Note, however, that both expressions give the output ```"my number is 1"```, since ```number``` is in this case always converted to an integer.

## Limitations

1. ```@statictypes.convert``` only works for simple types from where a constructor method can be called, e.g. ```str```, ```int```.
The decorator does not work on e.g. ```List[float] -> List[int]``` since the following incorrect conversion is attempted: ```List[int](list_of_floats)```.
2. Only the builtin generic types ```Any, Union, Optional, Dict, List``` and ```Tuple``` are currently supported.
3. When using ```@statictypes.convert```, if a ```list``` is given to a function expecting a ```numpy.ndarray``` , an empty ```numpy.ndarray``` is returned with the shape of the ```list```.
This is because the ```numpy.ndarray``` has ```shape``` as its first positional argument, leading to a working but arguably unexpected result.

## Requirements

* Python 3.6 or above.

## Installation
```bash
pip install statictypes
```
downloadimages 0.0.1
Get image url from a few website
Requires Python: >=3.6

# downloadImages
Get image url from common website

# Version
## 0.0.1
- Download from wallhaven.cc

# Install

`pip install "git+https://github.com/diepthuyhan/downloadImages#egg=downloadImages"`

# Document
waiting...

# Usage

```
from downloadImages import WallhavenImage

whdl = WallhavenImage(limit=None, nsfw=True)
for img in whdl:
    print(img)
```
pydantic_loader 0.9.1
pydantic loader module.
Requires Python: >=3.6

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![codecov](https://codecov.io/gh/sander76/pyconfig/branch/master/graph/badge.svg)](https://codecov.io/gh/sander76/pyconfig)

# PyConfig

Configuration management using pydantic and a bit of sugar.

This library provides a load and save functions to load and save serialized pydantic settings.
Settings can be saved in `.json`, `.yaml` and `.toml` format.

# Installation

`pip install pydantic_loader` for loading and saving json files.

`pip install pydantic_loader[yaml]` for loading and saving yaml and json files.

`pip install pydantic_loader[toml]` for loading and saving toml and json.


```python
"""Simple example."""
from pathlib import Path

from pydantic_loader import load_json, save_json
from pydantic import BaseSettings


class DummyConfig(BaseSettings):
    """An app configuration class"""

    a: int = 1
    b: str = "ABC"


config = DummyConfig()

save_json(config, Path("config.json"))

config = load_json(DummyConfig, Path("config.json"))
```