semvec/pypi-packages huggingface dataset:
matoolkit-Joseph-Barbier 0.0.1
A toolkit for chart creation in matplotlib
Requires Python: >=3.8

# matoolkit: easy-to-use matplotlib tools

`matoolkit` is a collection of functions that wrap around [matplotlib](https://matplotlib.org/) and [highlight_text](https://github.com/znstrider/highlight_text) to make it easier to create visually appealing plots.

<br><br>

## Current features

<br>

- `multiple_linecharts()`: Plot multiple line charts with main and secondary lines. The code that generates the plots below can be found [here](https://github.com/JosephBARBIERDARNAL/matoolkit/blob/main/notebooks/multiple_linecharts.ipynb)

Examples:

<p align="center">
  <img src="notebooks/img/multiple_linecharts_1.png" width="25%" />
  <img src="notebooks/img/multiple_linecharts_2.png" width="25%" />
  <img src="notebooks/img/multiple_linecharts_3.png" width="25%" />
</p>

<br>

- `draw_arrow()`: Draw an arrow on a `Figure` between two points with various customization features (color, width, length, curvation...). The code that generates the plots below can be found [here](https://github.com/JosephBARBIERDARNAL/matoolkit/blob/main/notebooks/draw_arrow.ipynb)

Examples:

<p align="center">
  <img src="notebooks/img/draw_arrow_1.png" width="25%" />
  <img src="notebooks/img/draw_arrow_2.png" width="25%" />
  <img src="notebooks/img/draw_arrow_3.png" width="25%" />
</p>

<br>

- `TileMap()` class to create tile maps with a simple API. Only the US is currently available. The code that generates the plots below can be found [here](https://github.com/JosephBARBIERDARNAL/matoolkit/blob/main/notebooks/tile_map.ipynb)

Examples:

<p align="center">
  <img src="notebooks/img/tile_map_1.png" width="25%" />
  <img src="notebooks/img/tile_map_2.png" width="25%" />
  <img src="notebooks/img/tile_map_3.png" width="25%" />
</p>
telemulator3 1.5
Mocked Telegram Bot API elements for unit tests of a bot based on the pyTelegramBotAPI library.
Requires Python: >=3.7

# Library telemulator3

[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vb64/telemulator3/pep257.yml?label=Pep257&style=plastic&branch=main)](https://github.com/vb64/telemulator3/actions?query=workflow%3Apep257)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vb64/telemulator3/py3.yml?label=pyTelegramBotAPI%204.11.0%20Python%203.7-3.11&style=plastic&branch=main)](https://github.com/vb64/telemulator3/actions?query=workflow%3Apy3)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/fe568012ee1649b89bafbb4de163a0c0)](https://app.codacy.com/gh/vb64/telemulator3/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/fe568012ee1649b89bafbb4de163a0c0)](https://app.codacy.com/gh/vb64/telemulator3/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)

The free, open-source telemulator3 library designed to simplify automatic testing of Telegram bots created using the [pyTelegramBotAPI library](https://github.com/eternnoir/pyTelegramBotAPI).

The telemulator3 library partially emulates the Telegram Bot API in unit tests and allows you to create typical scenarios for the interaction of your bot with the Telegram Bot API.

## Installation

```bash
pip install telemulator3
```

## Usage

Create TeleBot instance and start emulate Telegram API for bot.

```python
from telebot import TeleBot
from telemulator3 import Telemulator

bot = TeleBot('xxx-yyy-zzz', threaded=False)

@bot.message_handler(commands=['start', 'help'])
def send_welcome(message):
    bot.reply_to(message, "Howdy, how are you doing?")

telemul = Telemulator()
telemul.set_tested_bot(bot, username='my_bot', name='My Bot')
```

At start, there are no registered users in emulated API.

```python
assert not telemul.api.users
```

Make API user, that represent our bot.
It's a first registered user.

```python
mybot = telemul.api.get_me()
assert mybot.is_bot
assert mybot.username == 'my_bot'
assert len(telemul.api.users) == 1
```

New user open private chat with bot and send `/start` command.
Bot must answer as defined and his answer must be in chat history.

```python
from telemulator3 import send_command

user = telemul.api.create_user('User')
chat = user.private()
send_command(chat, '/start', user)
assert chat.history.contain('Howdy, how are you doing?')
```

User create group and add bot as member.

```python
group = user.create_group('My group')
group.add_members(user, [mybot])
assert group.history.contain('invite new members:')
```

And so on.

```python
mybot.leave(group)
assert group.history.contain('My Bot (ID 1) left chat')
# group.history.dump()
```

## Development

```
git clone git@github.com:vb64/telemulator3
cd telemulator3
make setup PYTHON_BIN=/path/to/python3
make tests
```
torch.redstone 0.0.6
Redstone torch, common boilerplates for PyTorch.
Requires Python: ~=3.6

# `torch.redstone`

[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/eliphatfs/torch.redstone/build_and_run.yaml)](https://github.com/eliphatfs/torch.redstone/actions) [![PyPI](https://img.shields.io/pypi/v/torch.redstone)](https://pypi.org/project/torch.redstone/)

Polyfills, common boilerplates and utilities -- A super light-weight library to boost development with PyTorch.

Works on CPU & GPU, with any version of PyTorch.

![Redstone torch](_readme/redstone-torch.jpg)

Disclaimer: The project is neither affiliated with nor endorsed by PyTorch.

## Installation
`torch.redstone` is a pure python package and can be installed via:
```sh
pip install torch.redstone
```

## Documentation
The documentation is available at the [github wiki](https://github.com/eliphatfs/torch.redstone/wiki).
simple-CLI-builder 1.0
classes for building applications on the command line

# CLI builder

A simple class to ease up the process of building applications run in a terminal. For the most part, it only offers a python class which will load predefined commands, parse input, ensure the user inputs the command properly, and finally features a prebuilt "help" command which will display the name, description, and syntax of all predefined functions.

# Documentation

Creates a class:

``` python
from CLI import *

app = CLI()
```

## Load predefined functions 

from a json file:
``` python
from CLI import *

app = CLI()
app.json_to_lookup(defined_functions.json)
```

where **defined_functions.json**:
``` python
{
    "commands": [
        {
            "name": str,
            "description": str,
            "syntax": str,
            "min_args": int,
            "max_args": int,
            "defined_flags": str
        }
    ]
}
```

Only the **name** field is required. Not including the other fields will have their values defaulted to **None**. <br> <br>
If you would like to not use a **.json** and manually populate the table for whatever god forsaken reason you can create a list of objects identical to the ones seen in the **.json** file and call **app.populate_lookup(*list*)** instead of **app.json_to_lookup(*path*)**

## Parsing input

``` python
from CLI import *

app = CLI()
app.json_to_lookup(defined_functions.json)

while True:
    app.parse_input(input("> "))
```

This populates the property **app.current_command** with  an instance of the class **Executed_Command()** where the class is defined as follows:

```python
class Executed_Command():
    def __init__(self):
        self.name = None
        self.args = []
        self.flags = []
```

These properties can be accessed through **app.current_command.*property***. For example:

```python
from CLI import *

app = CLI()
app.json_to_lookup(defined_functions.json)

app.parse_input("command arg1 arg2")
print(app.current_command.args)
```

would return:

``` python
['arg1', 'arg2']
```

To access the predefined properties of the command being called use **app.current_command_properties.*property***. For example:

```python
from CLI import *

app = CLI()
app.json_to_lookup(defined_functions.json)

app.parse_input("command arg1 arg2")
print(app.current_command_property.name)
```

would return the **name** value of the current command found in the previously defined commands (same as the ones found in **defined_functions.json**)
laravel-queue 0.0.16
Reads from a Laravel queue
Requires Python: >=3.8

# Laravel Queue for Python

Currently:

- only supports reading
- only supports queues in postgres

### Create a Queue Object

```
from laravel_queue import Queue

connection_string = "postgresql://user:password@host:5432/db"
queue = Queue(connection_string)

```

#### Queue Args:

    connection: str or sqlalchemy.engine.base.Engine
    queue: str, default 'python', the queue name in the database
    jobs_table: str, default 'jobs.jobs', the table name for the jobs
    failed_jobs_table: str, default 'jobs.failed_jobs', the table name for the failed jobs

### Read Jobs from Queue

```
jobs = queue.jobs  ## List of jobs in queue object
```

### Running Jobs

```
while queue.jobs:
    jobs = queue.jobs
    for job in jobs:
        job.run(function) ## run any function
```

function can be any function to run for this job
Using the while loop allows any new jobs placed on the queue while processing to be carried out next.

#### Passing Params

To pass params in laravel to the python function, specify a `param_map` in the run function.

```
# laravel:
$this->groupId = 12;

# python
def function(group_id):
    pass

job.run(function, param_map={
    'groupId': 'group_id'
})
```

Additionally, you can specify a `cache_lock_uid`
This can be either a str or a list of strings.
This is to be used for managing the job cache if you are using the `ShouldBeUnique` or `ShouldBeUniqueUntilProcessing` properties in Laravel
The `cache_lock_uid` should resemble what you have set `uniqueId()` to in laravel.
If a list is sent, you can specify parameters to be filled with `$`:

```
# Laravel:
$this->param1 = 1
$this->param2 = 2

public function uniqueId(): string
    {
        return $this->param1 . '-' . $this->param2;
    }


# Python
job.run(function_name,
    param_map = {
        'param1': 'param1',
        'param2': param2'
    }
    cache_lock_uid = ['$param1', '-', '$param2'])

## $param1 and $param2 will be swapped in with the cooresponding value.

```

To use cache locks, you must specify the database as your cache for queue. You can do this as so:

```
public function uniqueVia(): Repository
    {
        return Cache::driver('database');
    }
```

If using the `ShouldBeUniqueUntilProcessing` property, you must specify that in you job runner as well.
By default (`unique_until_processing=False`), the cache lock will be relased after processing, emulating the `ShouldBeUnique` laravel property.
Setting this `unique_until_processing=True` will relase this lock at the start of the job, like `ShouldBeUniqueUntilProcessing`
procap 0.1.2
ProCap is a captcha solving service.
Keywords: python, captcha, solver, hcaptcha, procap, captcha solver, hcaptcha solver, captcha bypass, cheap solver, cheap captcha solver, cheap hcaptcha solver

# ProCap
ProCap is a captcha solving service that handle help you to bypass various type of captchas

# Installation
```
pip install procap
```

### ⚠️ Requirements
* Apikey : **Join [ProCap](https://procap.wtf/), to get api key**

### 💡 Examples

* 1 - Example (hCaptcha Solve)

```python
from ProCap import ProCap
apikey = "" # Api key (required)
url = "" # Link to captcha (required)
sitekey = "" # Sitekey (required)
proxy = "" # Proxy (optional)
userAgent = "" # User agent (optional)
rqdata = "" # RQData (optional)
solver = ProCap(apikey)
captchaToken = solver.solve(url=url, sitekey=sitekey, proxy=proxy, userAgent=userAgent, rqdata=rqdata, type="hCaptchaTask")
print(f"Captcha token : {captchaToken}")
```

* 2 - Example 2 (Create task for hCaptcha)

```python
from ProCap import ProCap
apikey = "" # Api key (required)
url = "" # Link to captcha (required)
sitekey = "" # Sitekey (required)
proxy = "" # Proxy (optional)
userAgent = "" # User agent (optional)
rqdata = "" # RQData (optional)
solver = ProCap(apikey)
captchaTask = solver.createTask(url=url, sitekey=sitekey, proxy=proxy, userAgent=userAgent, rqdata=rqdata, type="hCaptchaTask")
captchaTask.id # Task id
captchaTask.time # Time taken
captchaTask.message # Message
captchaTask.success # Success [True or False]
captchaTask.token # Captcha Token (if solved)
captchaTask.challengeKey # Captcha challenge key
captchaTask.response # Get api json response
```

* 3 - Example (Get Task Result)
```python
from ProCap import ProCap
apikey = "" # Your api key
solver = ProCap(apikey)
id = "Challenge ID" 
captchaTask = solver.checkTask(id)
captchaTask.id # Task id
captchaTask.time # Time taken
captchaTask.message # Message
captchaTask.success # Success [True or False]
captchaTask.token # Captcha Token (if solved)
captchaTask.challengeKey # Captcha challenge key
captchaTask.response # Get api json response
```

* 4 - Example (Get account information)
```python
from ProCap import ProCap
apikey = "" # Api key (required)
solver = ProCap(apikey)
user = solver.get_balance()
user.balance # Get user balance
user.daily_limit # Get user daily limit
user.next_reset # Get user next credits reset
user.daily_used # Get user daily used
user.daily_remaining # Get user daily remaining
user.plan_expire # Get user plan expiration
user.response # Get api json response
```
sqlpile 0.3.2
Add your description here
Requires Python: >=3.8

# SQLPile - SQL-Based Multi-Layered Caching (Arrow + SQLite + Postgres)

Full-featured multi-layered distributed cache using SQL databases. Why build a cache on top of a database? Largely because SQL has similar interfaces across many different databases, and it's easy to scale out. This project is a work in progress, and is not yet ready for production use.

Think about this project as if it's like Ibis, but for SQL caching. The goal is to have a simple interface that can be used to cache data in a SQL database. The project is designed to be used with a SQL database, and is not designed to be used with a NoSQL database. Just use redis at that point.


## Installation

```bash
pip install sqlpile
```

## Usage

```python
from sqlpile import sqlpile
import sleep


@sqlpile
def expensive_function():
    sleep.sleep(10)
    return 1


def main():
    for _ in range(10):
        # Moves slow at first, but speeds up over time
        print(expensive_function)
```

## Features
- Multi-layered caching using local (SQLite) and remote (Postgres) databases
-  Serialization and compression of cached values using cloudpickle and lz4
-  Hashing of cache keys using xxhash for efficient lookup
-  Automatic caching of function results using a decorator
-  Asynchronous support with asyncio and aiosqlite
-  Dependency management using pyproject.toml and hatch
-  Code style enforcement with ruff


## Configuration

```python
from sqlpile.config import Config

config = ApplicationSettings(
    local_database_type="sqlite",
    local_database_name="cache.db",
    remote_database_type="postgresql",
    # ...
)

```