semvec/pypi-packages huggingface dataset:
math-web-kit 1.3.0
Math-Web-Kit(math_web_kit) is a python library that has many uses like solving linear equations, doing algebra in python, downloading youtube videos and much more features.
License: MIT

Math-Web-Kit is a python library than is used in creating a table to arrange your data, downloading youtube videos with a ease, getting search results from web.
Current version of math web kit is 1.2 and will be publishing the next version soon. Please read the tuturial on homepage i.e. github.
ruled-password-generator 1.0.1
Password generator with customizable rules.
License: MIT
Requires Python: >=3.7

# Ruled-Password-Generator

[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/hkcomori/ruled-password-generator/test)](https://github.com/hkcomori/ruled-password-generator/actions/workflows/deploy.yml)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/hkcomori/ruled-password-generator?label=version)](https://github.com/hkcomori/ruled-password-generator/releases/latest)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ruled-password-generator)](https://pypi.org/project/ruled-password-generator/)
[![GitHub](https://img.shields.io/github/license/hkcomori/ruled-password-generator)](https://github.com/hkcomori/ruled-password-generator/blob/main/LICENSE)

**A password generator with customizable rules.**

* Generate a password of the given length.
* Generate a password from given letters.
* Generate non duplicate passwords.

## Install

``` bash
pip install ruled-passwd-generator
```

## Usage (Example)

### Generate a password with 12 letters which have non-duplicate letters

``` python
from ruled_password_generator import PasswordGenerator

pwg = PasswordGenerator(12, uniques=-1)
password = pwg.generate()
```

### Generate a password with 10 to 16 letters which have at least 9 non-duplicate letters

``` python
pwg = PasswordGenerator(10, 16, uniques=9)
password = pwg.generate()
```

### Generate a password with 10 letters which have given letters

* Password has at least 3 letters in 'ABCDEF'.
* Password has at least 4 letters in '123456789'.
* Password has at least 1 letters in '-'.

``` python
rules = {'ABCDEF': 3, '123456789': 4, '-': 1}
pwg = PasswordGenerator(10, rules=rules)
password = pwg.generate()
```

If no rules are given, the default rules are following:
* It has [lowercases](https://docs.python.org/ja/3/library/string.html#string.ascii_lowercase) at least one.
* It has [uppercases](https://docs.python.org/ja/3/library/string.html#string.ascii_uppercase) at least one.
* It has [digits](https://docs.python.org/ja/3/library/string.html#string.digits) at least one.
* It has [symbols](https://docs.python.org/ja/3/library/string.html#string.punctuation) at least one.

### Generate 20 unique passwords

``` python
passwords = pwg.bulk_generate(20, unique=True)
```

## Contributions
Contributions are welcomed via PR.

## License
 * [MIT](https://github.com/hkcomori/ruled-password-generator/blob/main/LICENSE)
calibration-belt 0.1.41
Assessment of calibration in binomial prediction models.
License: MIT
Keywords: calibration calibration-belt p-value goodness-of-fit

[![Build Status](https://travis-ci.org/lbulgarelli/calibration.svg?branch=master)](https://travis-ci.org/lbulgarelli/calibration)

# Calibration Belt
### Assessment of the calibration belt and goodness of fit of binomial models.

## Installation

`pip install calibration-belt`


```python
import pandas as pd
from pathlib import Path
from calibration import CalibrationBelt

import matplotlib.pyplot as plt
%matplotlib inline  
```

## Loading data


```python
df = pd.read_csv(Path('tests/data/example_data.csv'))

# Separate P (outcome) and E (probability outputed by the model)
# In this case we will evaluate two different models
P = df.target.to_numpy()
predictors = {
    'SVM': df.SVM.to_numpy(),
    'NN': df.NN.to_numpy()
}
```

## CalibrationBelt object


```python
# We create CalibrationBelt objects for 
# each model we want to evaluate
belts = {}
for key, E in predictors.items():
    belts[key] = CalibrationBelt(P, E)
```

## Plotting the belt


```python
# Calculate belt in the confidence intervals .8 and .95
for model, belt in belts.items():
    fig, ax  = belt.plot(confidences=[.8, .95])
    ax.set_title(model, fontsize=30)
```


![png](https://github.com/lbulgarelli/calibration/raw/master/output_8_1.png)



![png](https://github.com/lbulgarelli/calibration/raw/master/output_8_2.png)


## Calculating T-statistic and p_value


```python
for model, belt in belts.items():
    T, p_value = belt.test()
    print(f"Model: {model:3}, T-statistic: {T:08.5f} , p-value: {p_value:07.5f}")
```

    Model: SVM, T-statistic: 08.37500 , p-value: 0.01518
    Model: NN , T-statistic: 31.05418 , p-value: 0.00001


## Calculating boundaries of the belt


```python
boundaries = belt.calculate_boundaries(.95)
lower, upper = boundaries[0, 1:]
print(f"Lower bound: {lower:.4f}, Upper bound: {upper:.4f}")
```

    Lower bound: 0.0000, Upper bound: 0.0493


## Cumulative distribution function

The plot below shows the computed distribution of the T-statistic in polynomials of degree m.


```python
T = [i / 10 for i in range(0, 301)]
viridis = plt.cm.get_cmap("viridis", 4)
fig, ax = plt.subplots(1, figsize=[10, 7])
for m in [1, 2, 3, 4]:
    cdf = []
    for t in T:
        cdf.append(CalibrationBelt.calculate_cdf(t, m, .8))  
    ax.plot(T, cdf, color=viridis(m-1))
```


![png](https://github.com/lbulgarelli/calibration/raw/master/output_14_0.png)


# References

Based on `Nattino, Giovanni, Stefano Finazzi, and Guido Bertolini. "A new calibration test and a reappraisal of the calibration belt for the assessment of prediction models based on dichotomous outcomes." Statistics in medicine 33.14 (2014): 2390-2407.`