semvec/pypi-packages huggingface dataset:
cleandata 0.0.0
An example package. Generated with cookiecutter-pylibrary.
License: MIT
Requires Python: >=3.6

========
Overview
========



An example package. Generated with cookiecutter-pylibrary.

* Free software: MIT license

Installation
============

::

    pip install cleandata

You can also install the in-development version with::

    pip install https://github.com/rinman24/cleandata/archive/master.zip


Documentation
=============


https://cleandata.readthedocs.io/


Development
===========

To run all the tests run::

    tox

Note, to combine the coverage data from all the tox environments run:

.. list-table::
    :widths: 10 90
    :stub-columns: 1

    - - Windows
      - ::

            set PYTEST_ADDOPTS=--cov-append
            tox

    - - Other
      - ::

            PYTEST_ADDOPTS=--cov-append tox


Changelog
=========

0.0.0 (2021-06-22)
------------------

* First release on PyPI.
cpu-load-generator 1.2.0
CPU load generator
License: MIT

CPU Load Generator
==================

This package allows to generate a fixed CPU load for a finite time period.
The script takes in input the desired CPU load, the duration of the experiment and
the CPU core or all cores on which the load has to be generated.

**Python versions**
This master branch refers to Python versions 3.x

**Dependencies**
Installment of psutil is required (it is already set as dependency in the setup.py)

Install psutil: 
    
    pip install psutil
	
**Other dependencies for unit tests and linters**:
    
    pip install mock pytest flake8 tox

*Usage*
To generate 20% of load on core 0 for 20 seconds run:

    python -m cpu_load_generator -l 0.2 -d 20 -c 0

To generate 50% of load on all logical cores for 20 seconds run:

    python -m cpu_load_generator -l 0.5 -d 20 -c -1
    
There is an option to run CPU load based on profile file. An exemplary profile is under 
load_profiles/default_profile.json. In order to run generator based on a profile issue 
the following command:

    python -m cpu_load_generator -p <path_to_profile_json>

To use the package features from python code:

Install the package from PyPi by issuing the following command:

    python -m pip instal cpu-load-generator

To use its features from your code:

```python
from cpu_load_generator import load_single_core, load_all_cores, from_profile

load_single_core(core_num=0, duration_s=20, target_load=0.4)  # generate load on single core (0)
load_all_cores(duration_s=30, target_load=0.2)  # generates load on all cores
from_profile(path_to_profile_json=r"c:\profiles\profile1.json")
```
haveibeenpwned-asyncio 0.0.4.post1
Asyncio and aiohttp based library and CLI to connect to haveibeenpwned.
License: MIT
Requires Python: >=3.5.0
Keywords: South Africa ID Number

# haveibeenpwned-asyncio

v0.0.4-1

Library to query and check haveibeenpwned with the aiohttp library.

NB: I have added async to sync methods if you are not writing async code. Every query function has an
corresponding synchronous call -> example query_account_sync()

## Install
```bash
pip install haveibeenpwned-asyncio
# or
poetry add haveibeenpwned-asyncio
```

## Usage
See example.py for more uses

Ex:
```python
import os
from haveibeenpwned_asyncio import haveIbeenPwnedPasswords, haveIbeenPwnedAccount, haveIbeenPwnedPastes
import asyncio

if __name__ == "__main__":
    # Validation Class, inherits from Indentity Class
    loop = asyncio.get_event_loop()
    passwords = ["P@ssw0rd"]
    accounts = ["admin@gmail.com", "test@test.com", "test@gmail.com"]

    test_passwords = haveIbeenPwnedPasswords(
                passwords=passwords, semaphore_max=10
            )
    print(loop.run_until_complete(test_passwords.query_passwords()))
    print(test_passwords.query_passwords_sync())

    test_acc = haveIbeenPwnedAccount(
        accounts=accounts,
        semaphore_max=10,
        api_key=os.getenv("HAVEIBEENPWNED_API_KEY", None),
    )
    print(loop.run_until_complete(test_acc.query_accounts()))
    print(test_acc.query_accounts_sync())

    test_pastes = haveIbeenPwnedPastes(
        accounts=accounts,
        semaphore_max=5,
        api_key=os.getenv("HAVEIBEENPWNED_API_KEY", None),
    )
    print(loop.run_until_complete(test_pastes.query_accounts()))
    print(test_pastes.query_accounts_sync())

```

## API Key
Some of the endpoints (breachedAccount) require authentication in the v3 of the API.
This is to prevent script kiddies and abuse of the api, see blog post: 
https://www.troyhunt.com/authentication-and-the-have-i-been-pwned-api/

To get an API key follow: https://haveibeenpwned.com/API/Key

Usage:
```python
# Could use env variables
haveIbeenPwnedAccount(
            accounts=accounts,
            semaphore_max=10,
            api_key=os.getenv("HAVEIBEENPWNED_API_KEY", None))

# or 

haveIbeenPwnedAccount(
            accounts=accounts,
            semaphore_max=10,
            api_key='xxxxxxxxx')
```

## CLI
Includes a CLI interface using pythong click library

```bash
(.venv) goose@pop-os:~/Development/haveibeenpwned_asyncio$ haveibeenpwned_async --help
Usage: haveibeenpwned_async [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  accounts
  passwords
  pastes


```

## Speed
Check the file run_test_speed.py. This will give you an idea of the speedup asyncio does with multiple IO bound network calls

## TODO:
* Add API key to github actions for pytest to pass on breachedAccount

## Donations
Please feel free to buy me a cup of coffee as I pay a monthly $3 to test the library against haveibeenpwned's 
monthly billed API key

buymeacoffee.com/crypticg00se