semvec/pypi-packages huggingface dataset:
chas 0.8.0
Framework for creating and running cron jobs.

## Chas

### Installation
Install library through pip 
```bash
pip install chas
```
Add decorator to function in your script called `job_jobname.py` (note: it must start with prefix `job_`) that you want to run as cron job. For example:
```python
from chas import chas

@chas.job("08:00")
def print_hello_world():
    print("Hello, World!")
```
Finally, you can start up a server by running. This starts the cron scheduler, which will execute the function at given times, and also you can view and manage jobs on `localhost:5000`.
```bash
chas start --http-server
```

### Command line
Chas is convenient even from running jobs from your command line. You can do
```bash
chas list
```
Which prints out all the registered jobs
```
Job                Next run             Last run             Last status
print_hello_world  22-12-2018 08:00:00  N/A                  N/A 
```
You can run any of these jobs by typing
```bash
chas run print_hello_world
```

### Decorators
As already mentioned, `@chas.job(time)` registers a job at a particular time. There another decorator `@chas.setup()` which simply executes the script inside during the import time. This should be used for setting up environment variables. For example`

```python
import os
from chas import chas

@chas.setup()
def setup_environment():
    os.environ["foo"] = "bar"

@chas.job("09:00")
def print_env_var():
    print(os.environ["foo"])
```
On run would print `bar`.


### Packages
In case you structure your directory as a Python package, you will need to export all scripts with `@chas.job` from the package. Then, you will run all shell commands as above, but with adding parameter `--package folder_name` where `folder_name` specifies the entry point to your package.
For example, if you structure your package in the following way:
```
.
|-- src
|   -- __init__.py
|   -- script_one.py
|   -- script_two.py 
|-- LICENSE
|-- README.md
```
Then you can run `chas list --package src`.


### Prometheus
When starting the server with option `--http-server`, `chas` automatically opens up Prometheus metrics endpoint on `/metrics`. This allows you to easily monitor your chas script with Prometheus and complementary tools like Grafana, Alertmanager etc.
The two metrics gathered are Counter-type objects named `job_runs_total` and `job_runs_status_total`, first denoting the number of times a job was run and the second also counting their statuses, either `failed` or `succeeded`.

## Troubleshooting
What to do in case of ModuleNotFound error?
- This can happen due to incorrect PYTHONPATH environment variable. Make sure current working directory is in there. You can check it by `echo $PYTHONPATH`. Otherwise to append current working directory, run `export PYTHONPATH="${PYTHONPATH}:${PWD}"`.
cairocffi-stubs 0.1.2
Stubs for cairocffi. 
Requires Python: >=3.8,<4.0

# cairocffi-stubs

This package contains type stubs to provide more precise static types and type inference for cairocffi.

## Installation

```
pip install cairocffi-stubs
```

## Usage

```python
from io import BytesIO
import cairocffi as cairo
import matplotlib.pyplot as plt

surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 300, 200)
context = cairo.Context(surface)
context.show_text('Hello World!')
img = BytesIO(surface.write_to_png())  # overloaded
plt.imshow(plt.imread(img))
plt.show()
```

Static type checker can correctly recognize the return type of `surface.write_to_png()` as `bytes` when passing no arguments. No type errors will be raised.

## Style Guidelines

Follow the same style guidelines as [typeshed](https://github.com/python/typeshed/blob/master/CONTRIBUTING.md).
obj-encrypt 0.7.0
obj-encrypt is an encryption library based on the AES-256 algorithm. It uses Python objects as the basic unit, which can convert objects into binary ciphertext and support decryption. Objects encrypted with obj-encrypt support TCP communication, database storage, and more.

# obj_encrypt

[Chinese Version](https://github.com/Cyberbolt/obj_encrypt/blob/main/README_CHN.md)

obj-encrypt is an encryption library based on the 'AES-256-GCM' algorithm. It uses Python objects as the basic unit and it can convert objects into binary 'ciphertext' and support decryption. Objects encrypted with obj-encrypt support TCP communication, database storage, and more.


### Installation

Recommended Environment: Python 3+

1. Enter the command window, create a virtual environment, and enter the following commands in turn

Linux and macOS:


```python
python3 -m venv venv # Create a virtual environment.
. venv/bin/activate # Activate the virtual environment.
```

Windows:


```python
python -m venv venv # Create a virtual environment.
venv\Scripts\activate # Activate the virtual environment.
```

2. Install obj-encrypt, enter in turn


```python
pip install --upgrade pip
pip install obj-encrypt
```

### Use

```
from obj_encrypt import Secret


def main():
    # Initialize the secret instance, the key is an AES-256 key, and the maximum size cannot exceed 32 strings.
    secret = Secret(key='0123456789')
    # build the data dictionary
    data = {
        'author': 'Cyberbolt',
        'personal_website': 'https://www.cyberlight.xyz/',
        'time': '2022-02-10'
    }
    ciphertext = secret.encrypt(data) # Convert the object to binary ciphertext and get the ciphertext.
    print(ciphertext, ' ', type(ciphertext))
    plaintext = secret.decrypt(ciphertext) # Decrypt ciphertext as object.
    print(plaintext)


if __name__ == '__main__':
    main()
```

Output

```
b'U2FsdGVkX18IANYgINODlF8BjkxI3AaKJ/+10Iexgh65qyEKFY21HK5LSjiTuy37arjYAuIQQls+amqCdEdVdy0V1E6xECJXOFBb0kfIzQuxOimOaFFVvtq4IntjJNdCHLiTwuExVfwAW7CjqaD554B71IoT0o9xqrFch3N0vtq+UP0uXyMmMCsvu8zY7vrCuw9qM+kOW2VWsC2c2ePDnofvakchgDW9bGF8fTC3prE+TPksoJ4l6ERCjjRid54gP6+HmzB+TwOVSGaj+4VIdm1g7qv591tBU1U6Lxm83Hk='   <class 'bytes'>
{'author': 'Cyberbolt', 'personal_website': 'https://www.cyberlight.xyz/', 'time': '2022-02-10'}
```

You can encrypt your own objects in addition to Python dictionaries, and the encrypted binary can be stored in a database or used for TCP communication.

If this module was helpful to you, I hope to receive your GitHub Star! Thank you so much!

[GitHub](https://github.com/Cyberbolt/obj_encrypt)

[CyberLight](https://www.cyberlight.xyz/)
package-processing-image 0.0.2
Estudos de pacotes - Image Processing
Requires Python: >=3.8

# package-processing-Image

## Description.

Bootcamp Cognizant Cloud Data Engineer - DIO

Descrição O pacote "package-processing-image" é usado para:

Módulo "Processamento":

Correspondência de histograma; Similaridade estrutural; Redimensionar imagem;

Módulo "Utils":

Ler imagem; Salvar imagem; Plotar imagem; Resultado do gráfico; Plotar histograma;

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install package-processing-Image

```bash
pip install package-processing-image
```

## Usage

```python
from processing_image.utils import io, plot
from processing_image.processing import combination, transformation
```

## Author
Marlon Martins

## License
[MIT](https://choosealicense.com/licenses/mit/)