semvec/pypi-packages huggingface dataset:
pychu 1.0.1
Layered configuration powered by Pydantic

# pychu

[![pytest](https://github.com/doom/pychu/workflows/pytest/badge.svg)](https://github.com/doom/pychu/actions?query=branch%3Amain)
[![pypi](https://img.shields.io/pypi/v/pychu.svg)](https://pypi.python.org/pypi/pychu)
[![license](https://img.shields.io/github/license/doom/pychu.svg)](https://github.com/doom/pychu/blob/main/LICENSE)

Layered configuration loading built on [Pydantic](https://pydantic-docs.helpmanual.io/).

With Pychu, you can define your program's configuration as a Pydantic model, then load it from multiple providers.
Providers are ordered as levels of layers, thus allowing upper layers to override values from lower layers.

At the moment, the following providers are implemented :
- Program arguments
- Environment variables
- JSON
- TOML (with the `pychu[toml]` extension)
- YAML (with the `pychu[yaml]` extension)

## Requirements

Pychu requires Python 3.6+ and Pydantic 1.7.3+.

## Installing

Pychu can be installed through pip.

```
$ pip3 install pychu        # Install the basic version
$ pip3 install pychu[yaml]  # Install the YAML extension
```

## Example

The following example loads configuration from a JSON file, but also allows overriding using program arguments.

```python
from pydantic import BaseModel
from pychu.args import args
from pychu.json import json
from pychu import load

class RabbitMQ(BaseModel):
    host: str
    username: str
    password: str
    port: int = 5671

rabbitmq = load(
    target=RabbitMQ,
    providers=[
        args(),
        json("./config.json")
    ]
)
print(rabbitmq)
```

```
$ cat config.json
{"host": "localhost", "port": 5671, "username": "user", "password": "pass"}
$ ./example.py
host='localhost' username='user' password='pass' port=5671
$ ./example.py --port 5672
host='localhost' username='user' password='pass' port=5672
```
Telegrask 0.2.1
Flask-inspired Telegram bot micro framework for Python.
Requires Python: >=3.6
Keywords: flask-like framework bot library telegram

# Telegrask

Flask-inspired Telegram bot micro framework for Python. 
Main idea is to use callback function decorators and make bot 
creating more intuitive for developer.

## Installing

```shell
$ python3 -m pip install Telegrask
```

## Simple "Hello World" bot example

```python
from telegrask import Telegrask

bot = Telegrask("BOT_TOKEN")


@bot.command("hello", help='display "Hello, World!"')
def hello_command(update, context):
    update.message.reply_text("Hello, World!")


if __name__ == "__main__":
    bot.run(debug=True)
```

More examples in [examples](./examples) folder.

## Equivalent in pure [python-telegram-bot](https://python-telegram-bot.org/)

```python
from telegram.ext import Updater, CommandHandler
from telegram import ParseMode
import logging

logging.basicConfig(format="%(levelname)s - %(message)s", level=logging.DEBUG)
logger = logging.getLogger(__name__)


def hello_command(update, context):
    update.message.reply_text("Hello, World!")


def help_command(update, context):
    help_content = """*Available commands*

/hello
display "Hello, World!"

/help
display this message
"""
    update.message.reply_text(help_content, parse_mode=ParseMode.MARKDOWN)


def main():
    global updater
    updater = Updater("BOT_TOKEN")
    dispatcher = updater.dispatcher
    dispatcher.add_handler(CommandHandler("hello", hello_command))
    dispatcher.add_handler(CommandHandler(["help", "start"], help_command))
    updater.start_polling()
    updater.idle()


if __name__ == "__main__":
    main()
```
rl4uc-pwdemars 0.0.1
Reinforcement learning environment for the unit commitment problem
Requires Python: >=3.6

# RL4UC: Reinforcement Learning for Unit Commitment

This project contains an RL environment for the unit commitment problem.

## Installation

You can install this repository by running: 

```
git clone https://github.com/pwdemars/rl4uc.git
cd rl4uc
pip install .
```

## Example usage:

Below we will try an action on the 5 generator system. An action is a commitment decision for the following time period, defined by a binary numpy array: 1 indicates that we want to turn (or leave) the generator on, 0 indicates turn or leave it off. 

```python 
from rl4uc.environment import make_env
import numpy as np

# Create an environment, 5 generators by default.
env = make_env()

# Reset the environment to a random demand profile.
obs_init = env.reset()

# Define a commitment decision for the next time period.
action = np.array([1,1,0,0,0]) # Turn on generators 0 & 1, turns all others off.

# Take the action, observe the reward.
observation, reward, done = env.step(action)

print("Dispatch: {}".format(env.disp))
print("Finished? {}".format(done))
print("Reward: {:.2f}".format(reward))
```
sponsorblock 0.1.3
A mirror package for sponsorblock.py. Please install that instead.
Keywords: sponsorblock.py documentation sponsorblock python wrapper

### This is a mirror package!

It is recommended to install [`sponsorblock.py`](https://pypi.org/project/sponsorblock.py/) instead.

PYPI: <https://pypi.org/project/sponsorblock.py/>\
GitHub: <https://github.com/wasi-master/sponsorblock.py/tree/main>\
Documentation: <https://sponsorblockpy.readthedocs.io/en/latest/>