semvec/pypi-packages huggingface dataset:
EVNTDispatch 0.0.2
EVNTDispatch is a Python event system for seamless event-driven programming, offering flexibility and efficiency in handling and dispatching events.
Keywords: EVNTDispatch,event system,event dispatcher,event-driven programming,synchronous events,asynchronous events,publish-subscribe,developer tools,Python 3,cross-platform

# EVNTDispatch

EVNTDispatch is a versatile Python library designed to facilitate event-driven programming by providing a flexible event dispatcher. Whether you are building a graphical user interface, a command-line application, or a complex system with asynchronous components, the Event System simplifies communication and coordination between different parts of your code.

## Key Features
* **Event Dispatching:** Easily define and dispatch events to notify components of changes or user interactions.

* **Asynchronous Support:** Seamlessly integrate asynchronous event listeners for efficient handling of time-consuming tasks without blocking the main execution.

* **Priority and Max Responders:** Control the order of event listener execution and limit the number of responders for fine-grained control over event handling.
 
* **Task Scheduling:** Schedule tasks to be executed after a specified delay, adding a layer of automation to your application.
## Basic Async Example

```python
import asyncio

from EVNTDispatch import EventDispatcher, PEvent, EventType

dispatcher = EventDispatcher()

# All event listeners must have a single parameter of type PEvent
async def process_message(event: PEvent):
    message_data, user_id = event.data
    
    # Simulate processing the message, e.g., storing it in a database or applying business logic
    print(f"Processing Message from User {user_id}: {message_data}")
    await asyncio.sleep(1)
    
    print("Message Processed")

async def send_message(user_id: int, message: str):
    # Trigger an event called 'new_message', notifying any listeners subscribed to 'new_message'
    await dispatcher.async_trigger(PEvent("new_message", EventType.Base, data=(message, user_id)))

async def main():
    # Start the event dispatcher
    dispatcher.start()
    
    # Subscribe 'process_message' to events called 'new_message'
    dispatcher.add_listener("new_message", process_message)

    # Tasks to simulate users sending messages
    tasks = [
        send_message(1, "Hello, how are you?"),
        send_message(2, "I'm doing well, thanks!"),
        send_message(1, "What's new?"),
        send_message(3, "Not much, just relaxing.")
    ]
    
    # Execute tasks concurrently
    await asyncio.gather(*tasks)
    
    # Close the dispatcher to wait for all tasks to finish
    await dispatcher.close()

if __name__ == "__main__":
    asyncio.run(main())
```

### License
This project is licensed under the MIT License.
parenx-anisotropi4 0.4.7
GeoJSON network simplification using raster image skeletonization and Voronoi polygons
Requires Python: >=3.8

# parex
Simplify (or "pare") a GeoJSON network ("nx") using raster image skeletonization an Voronoi polygons

This uses image skeletonization or Voronoi polygons to simplify network, and output GeoPKG layers corresponding to the input, simplified and primal network. Where a primal network only contains straight line segments

The sample data set is of the Princes Street in Edinburgh, kindly shared by Robin Lovelace

## Installation
To install the following will install the project into an activated `python` virtual environment:

    (venv) $ pip install parenx

This places the `skeletonization.py` and `voronoi.py` scripts into the executable search path

## Examples
A `bash` helper script `run.sh` and example data is available under the `sitepackage` project directory under `venv`. The exact path varies with module and `python` version

### Skeletonization
The following creates a simplified network by applying skeletonization to a buffered raster array in `output.gpkg`
    
    (venv) $ ./skeletonize.py data/rnet_princes_street.geojson
   
### Voronoi
The following creates a simplified network by creating set of Voronoi polygons from points on the buffer in `output.gpkg`
   
    (venv) $ ./voronoi.py data/rnet_princes_street.geojson

### Simple operation
The `run.sh` script sets a python virtual environment and executes the script against a data file in the `data` directory

    $ ./run.sh

The `run.sh` script optionally takes a filename and file-extension. To simplify a file, say `somewhere.geojson` and output to `GeoPKG` files `sk-simple.gpkg` and `vr-simple.gpkg`
    
    $ ./run.sh somewhere.geojon simple

### Locating the `run.sh` script
To copy the `run.sh` script into your local directory the following could help

    $ find . -name run.sh -exec cp {} . \;


## Notes
Both are the skeletonization and Voronoi approach are generic approaches, with the following known issues:

* This does not maintain a link between attributes and the simplified network
* This does not identify a subset of edges that need simplification
* The lines are a bit wobbly
* It is quite slow
compress-comics-TheHardew-tests 0.0.1
Compress images in cbz/cbr files with jpegxl, fast.
Requires Python: >=3.11

## compress\_comics

Find all the cbz/cbr files in the current directory and subdirectories and compress all the jpg/png/gif images inside with jpeg xl.  
Output files preserve the folder structure.  
Repacks cbr into cbz.  

By default, compresses with:
```
--brotli_effort 11
-e / --effort 9
-d / --distance 0 (lossless)
-E / --modular_nb_prev_channels 3 
-j / --lossless_jpeg 1
```

Compresses as many images in parallel as there are threads.  
Because of that, it may run out of memory on bigger resolutions.  

Basic usage:  
`python compress_comics.py output_directory`  

To check all program options:  
`python compress_comics.py -h`

Needs `cjxl` installed and in PATH.  
Needs the patool library.
SortFile 2.0.0
A package for sorting files based on a specified pattern.
Requires Python: >=3.7
Keywords: python,Sort,SortFile,Sorting,Data

# SortFile - File Sorting Utility

### Install the tool 
```
pip install SortFile
```

### Description:
SortFile is a command-line utility that helps you organize and sort files based on a specific pattern.

### Usage:
```
SortFile [Pattern] [FolderName]
```

> Pattern: The pattern to match the files you want to sort. Enclose the pattern in double quotes.
> FolderName: The name of the folder where the sorted files will be moved.

## Examples:
``` 
$ SortFile "namefile.*" file
```
- Sorts files with the pattern "namefile.*" and moves them to a folder named "file".

```
$ SortFile "name*.pdf" file
```
- Sorts PDF files with names starting with "name" and moves them to a folder named "file".

### Note:
- The folder name should not include any symbols, only English letters.
- If the specified folder already exists, you will be prompted to choose whether to move files to it or not.

Command-line Options:
-h, help    Display this help message.
the-weather 1.5
Package for getting weather data based on a zipcode
Requires Python: >=3.7

[![Generic badge](https://img.shields.io/badge/Licence-MIT-blue.svg)](https://shields.io/)
[![Generic badge](https://img.shields.io/badge/Maintained-yes-green.svg)](https://shields.io/)
[![Generic badge](https://img.shields.io/badge/Python-3.7-yellow.svg)](https://shields.io/)
[![Generic badge](https://img.shields.io/badge/the_weather-1.5-red.svg)](https://pypi.org/project/the-weather/)
![PyPI - Downloads](https://img.shields.io/pypi/dm/the_weather)

## Package
Package for getting weather data using a zipcode.

## Usage
```python
from the_weather import *

weather = Weather(22025)

d = weather.daily_forecast("2023-09-17")
print(d[0])

# Output
Sunday 2023-09-17 [05:00 PM] - 19° 50%: Scattered Showers

```
hid-ups 0.7.0
A Python library for interacting with USB HID UPS devices.
Requires Python: >=3.11

# HID_UPS

Uses hidapi to listen for UPS data.

Currently only tested working with a `CyberPower CP1500PFCLCD`

## Dependencies

Uses [zenlib](https://github.com/desultory/zenlib) and [hidapi](https://github.com/trezor/cython-hidapi)

## Usage

This must be run as root unless the user has privileges to use the `hidraw` socket the UPS uses.

This package can be installed with `sudo pip install --break .` then run with `sudo hid_ups`.

Once started, `hid_ups` will attempt to find UPS devices and listen for stats.

A `SIGHUP` can be sent to the process to re-scan for devices.

> This will close current listeners, and will momentarily throw errors until the socket is re-opened

## Device detection

`hid_ups` detects the device using vendor/device strings. Only one is currently added. The are defined in [hid_devices](src/hid_ups/hid_devices.py)
penelopa 0.0.30
Penelopa: AI-driven codebase modifier using OpenAI GPT models
Requires Python: >=3.6

[![GitHub top language](https://img.shields.io/github/languages/top/chigwell/penelopa)](https://github.com/chigwell/penelopa)
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
[![Downloads](https://static.pepy.tech/badge/penelopa)](https://pepy.tech/project/penelopa)
[![PyPI - Version](https://img.shields.io/pypi/v/penelopa?color=blue)](https://pypi.org/project/penelopa/)

# Penelopa: AI-driven Codebase Modifier

Penelopa is an innovative tool designed to leverage OpenAI's GPT models for intelligent and automated codebase modifications. It comprehends and executes code changes based on natural language task descriptions, bringing a new level of efficiency to code maintenance.

![Penelopa](https://penelopa.uk/penelopa.gif)

## Installation

Install Penelopa easily using pip:

```bash
pip install penelopa
```

## Usage

Run Penelopa from the command line with various options:

```bash
penelopa --task=<task description> 
         --gpt_key=<OpenAI GPT key>
         --config_path=<path to config> 
         --logging=<True/False> 
         --project=<project name> 
         --path=<project path> 
         --model=<GPT model> 
         --temperature=<float> 
         --top_p=<float> 
         --max_tokens=<int> 
         --gitignore=<True/False> 
         --listing=<path to listing file> 
         --updated_listing=<True/False> 
         --assistant_id=<assistant id>
```

### Arguments

- `--config_path`: Path to the YAML configuration file.
- `--logging`: Enable verbose logging (True/False).
- `--project`: Name of the project for contextual understanding.
- `--path`: Path to the project directory.
- `--task`: Description of the task for the AI to understand and perform.
- `--gpt_key`: API key for OpenAI services.
- `--model`: OpenAI GPT model to use.
- `--temperature`: Level of creativity for AI responses.
- `--top_p`: Diversity of AI responses.
- `--max_tokens`: Maximum word count for AI responses.
- `--gitignore`: Consider .gitignore rules (True/False).
- `--listing`: Path to project file listing for context.
- `--updated_listing`: Flag to update the listing file (True/False).
- `--assistant_id`: Identifier for the AI assistant instance.

## Contributing

Your contributions are welcome! Feel free to create [issue requests](https://github.com/chigwell/penelopa/issues) to enhance Penelopa's functionalities.

## License

This project is licensed under the [GNU Affero General Public License v3.0](https://www.gnu.org/licenses/agpl-3.0).