semvec/pypi-packages huggingface dataset:
password-hashing-python 0.3.0
Python implementation of https://github.com/defuse/password-hashing (v1.0)
Keywords: password hashing pbkdf2

# password-hashing-python

[![Build Status](https://travis-ci.org/murrple-1/password-hashing-python.svg?branch=master)](https://travis-ci.org/murrple-1/password-hashing-python) [![Coverage Status](https://coveralls.io/repos/github/murrple-1/password-hashing-python/badge.svg?branch=master)](https://coveralls.io/github/murrple-1/password-hashing-python?branch=master) [![PyPI version](https://badge.fury.io/py/password-hashing-python.svg)](https://badge.fury.io/py/password-hashing-python)

Python implementation of https://github.com/defuse/password-hashing (v1.0)

Supports both Python `>=v2.7.9` and `>=3.4`.

Please note, this code has not been scrutinized or peer-reviewed at all - though I'm interested, if anyone wants to look it over.

It is a naive attempt to re-implement `PasswordHash.php`.

# Installation

`pip install password-hashing-python`

# Usage

## Creating a hash-string
```Python Console
>>> import password_hashing
>>> _hash = password_hashing.create_hash('your_password')
>>> print _hash
b'sha1:64000:18:B6oWbvtHvu8qCgoE75wxmvpidRnGzGFt:R1gkPOuVjqIoTulWP1TABS0H'
>>> # snip: save `_hash` to a DB
```

## Validating the password
```Python Console
>>> # snip: retrieve `_hash` from DB
>>> import password_hashing
>>> password_hashing.validate_password('your_password', _hash)
True
>>> password_hashing.validate_password('wrong_password', _hash)
False
```
spr 0.2.1
A tiny Python package to parse spice raw data files
Keywords: spice matplotlib rawspice raw

# Spice Raw Parser (spr)

A tiny Python package to parse spice raw data files.

## Getting Started

These instructions will get you a copy of the package up and running on your local machine.

**Note: at the moment only ascii raw spice format is supported!**

### Installation

#### From PyPI
```
pip install spr
```

#### From source code

```
pip install git+https://github.com/goncalo-godwitlabs/spr.git
```

or

```
git clone git@github.com:goncalo-godwitlabs/spr.git
cd spr/
make install
```

### Usage

Just run:

```
from spr import load_raw
data = load_raw("/path/to/rawspice.raw")
```

### Data structure

A properly parsed raw spice file by `load_raw()` returns a dictionary with the following structure:

```
{
    "title": <str>,
    "date:": <str>,
    "plotname:": <str>,
    "flags:": <str>,
    "no_vars:": <str>,
    "no_points:": <str>,
    "vars": [
        { "idx": <int>, "name": <str>, "type": <str> },
        { "idx": <int>, "name": <str>, "type": <str> }
        ...
        { "idx": <int>, "name": <str>, "type": <str> }
    ]
    "values": {
        "var1": <numpy.ndarray>,
        "var2": <numpy.ndarray>,
        ...
        "varN": <numpy.ndarray>
    }
}
```

Where values `values` is a numpy structured array with the actual data.

## Examples

The following examples make use of ngspice to run the spice simulations, so please ensure it is installed.
On ubuntu that would be:
```
sudo apt install ngspice
```

### Inverting amplifier with an opamp LM741

Check the directory `examples/amplifier/` for details on the cirtcuit and the simulation files.

The schematic:

![](examples/amplifier/schematic.png)

Run the simulation with:

```
git clone git@github.com:goncalo-godwitlabs/spr.git
cd spr
make run-example-amplifier
```

which will fire ngspice generating output.log and rawspice.raw files and also plots the voltages `vin` and `vout`.

![](examples/amplifier/plot.png)


## Second order low pass filter with an opamp LM741

Check the directory `examples/lp_filter/` for details on the cirtcuit and the simulation files.

The schematic:

![](examples/lp_filter/schematic.png)

Run the simulation with:

```
git clone git@github.com:goncalo-godwitlabs/spr.git
cd spr
make run-example-lp_filter
```

which will fire ngspice generating output.log and rawspice.raw files and also plots the gain `vout`/`vin` in dB.

![](examples/lp_filter/lp_filter.png)


## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details