semvec/pypi-packages huggingface dataset:
kaiban 0.1.0
Python SDK for Kaiban
Requires Python: >=3.7

# Kaiban Python SDK

Python implementation of the Kaiban SDK.

## Installation

```bash
pip install kaiban
```


```python
from kaiban import hello
hello.world() # Outputs: Hello from Kaiban!
```

## Development
1. Clone the repository
2. Navigate to the Python SDK directory: `cd python`
3. Install development dependencies: `pip install -e ".[dev]"`
4. Run tests: `pytest`
lib-headspace 0.1.0
Basic API client for Headspace
Requires Python: >=3.13

# lib-headspace

> [!NOTE]
> **This library is not affiliated with Headspace in any way.**
>
> I have reverse-engineered the API and it could change, and thus break this library, at any time.

This is a simple library to interact with the (private) Headspace API.

It is meant for _reading_ data; **writing** data or **accessing the audio** content is not supported and likely never will be.

## Using the library

See [demos/readme.md](demos/readme.md) for a quick start guide.

## Dev

[`uv`](https://docs.astral.sh/uv/) is used as a replacement for `poetry`.
[Install](https://docs.astral.sh/uv/getting-started/installation/) `uv` first and then it's quick/easy to get going:

```shell
# Note: Yes, this really does need 3.13!
❯ uv venv --python=3.13
Using CPython 3.13.0
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate
# Install dependencies; consider --group=dev
❯ uv sync
Resolved 21 packages in 13ms
<...>
 + pycparser==2.22
 + pyjwt==2.10.0
 + pytest==8.3.3
 + ruff==0.7.4
 + structlog==24.4.0
 + yarl==1.18.0
```

### .pre-commit

`uv` will have taken care of installing [pre-commit](https://pre-commit.com/) if you used `uv sync --group=dev` to install dev dependencies.

As long as `pre-commit` is in your `$PATH`, connecting it to `git` is simple:

```shell
❯ pre-commit install
pre-commit installed at .git/hooks/pre-commit
```

You can run `pre-commit run --all-files` to lint and format your code.

> [!NOTE] The first time you run `pre-commit`, it will take a while to download and install the hooks.

```shell
❯ pre-commit run --all-files
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/astral-sh/ruff-pre-commit.
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
```

## TODO

- [ ] Tests for the client; currently could use a bit of a refactor.
- [ ] GHA automations
  - [ ] Automation to clean up old GHA runs
brainiac-model 0.1.1
A 3D ResNet50 model for brain MRI analysis
Requires Python: >=3.6

# BrainIAC Model

This is the official implementation of the BrainIAC model, a 3D ResNet50-based architecture designed for brain image analysis.

## Model Description

BrainIAC is built on a modified ResNet50 architecture that processes 3D brain imaging data. The model has been adapted to handle volumetric inputs through 3D convolutions and produces feature vectors that capture relevant brain imaging characteristics.

## Model Architecture
- Base Architecture: ResNet50 (modified for 3D)
- Input: 3D brain volumes [batch_size, 1, D, H, W]
- Output: Feature vector of dimension 2048
- First layer: 3D convolution (1 channel input)
- Final layer: Identity (returns features directly)

## Usage

```python
from transformers import AutoModel
import torch

# Load model
model = AutoModel.from_pretrained("your-username/brainiac")
model.eval()

# Prepare your input tensor
# Adjust D, H, W according to your requirements
batch_size = 1
D, H, W = 16, 224, 224  # Example dimensions
input_tensor = torch.randn(batch_size, 1, D, H, W)

# Get features
with torch.no_grad():
    features = model(input_tensor)

print(f"Output feature shape: {features.shape}")  # Should be [batch_size, 2048]
```

## Requirements
```
torch>=1.9.0
monai
transformers
```

## Citation
If you use this model in your research, please cite:
[Add your citation information]

## License
[Add your license information]
dbini-torch 1.0.2
PyTorch optimized bilateral normal integration
Requires Python: >=3.10.1

<h1 align="center">dbini-torch</p>

<p align="center">
    <a href="https://badge.fury.io/py/dbini-torch"><img src="https://badge.fury.io/py/dbini-torch.svg" alt="PyPI version" height="18"></a>
    <a href="https://github.com/sampepose/dbini-torch/actions/workflows/pytest.yml"><img src="https://github.com/sampepose/dbini-torch/actions/workflows/pytest.yml/badge.svg" alt="PyTest" height="18"></a>
    <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" height="18"></a>
</p>

Pytorch version of bilateral normal integration (BiNI).

Especially optimized for fast CUDA execution.

## Installation

```bash
pip install dbini-torch
```

## Acknowledgements

This project is based on the original author's work in [numpy](https://github.com/xucao-42/bilateral_normal_integration).

Project boilerplate borrowed from the great @jonmorton and [haven](https://github.com/jonmorton/haven).
decisify 0.1.0
Add your description here
Requires Python: >=3.10

# Decisify

Decisify is a Python package that leverages generative AI to explain decisions made by optimization models. 

## Introduction

Mathematical optimization is a critical tool in operations research, enabling businesses to make data-driven decisions that maximize efficiency and minimize costs. However, the complexity of these models often makes it difficult for stakeholders to understand and trust the decisions being made. 

Decisify addresses this challenge by using generative AI to provide clear, understandable explanations for the decisions produced by optimization models. By enhancing transparency and trust, Decisify aims to drive greater adoption of optimization techniques across diverse industries.

## Features

- Explain optimization model decisions using generative AI
- Improve transparency and trust in operations research
- Facilitate the adoption of optimization techniques in various industries

## Installation

You can install Decisify using pip:

```bash
pip install decisify
```

## Usage

Here's a simple example of how to use Decisify:

```python
import decisify

# Your optimization model code here
(1) Just define the Pydantic Models for (a) Input (b) Output
(2) Concrete implementation of optimization model
(3) A method to read, the solution
```

Now, you are read to use decisify, its simple from this point onwards


```python
# Generate explanations for the model's decisions
trnsprt_model = TransportationModel()
solution = trnsprt_model.get_solution(input_data)
print(solution.model_dump_json())
interrogator = GurobiInterrogator(trnsprt_model, input_data)
answer = interrogator.answer("What is the optimal solution for the transportation problem?")
print(answer)
answer = interrogator.answer("How many factories and how many distribution centers are there?")
print(answer)
#Now, lets assume the user wants to change the supply at warehouse W1 to 20
answer = interrogator.what_if("the courier company just doubled the transportation costs, how does this affect the total cost?")
print(answer)
answer = interrogator.what_if("The demand at customer C1 has increased by 100 times, how does this affect the total cost?")
print(answer)
```

## Contributing

We welcome contributions to Decisify! Please see our [contributing guidelines](CONTRIBUTING.md) for more information.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Contact

For any questions or suggestions, please contact us at support@decisify.ai.
chrome-profile-manager 0.1.0
A friendly Chrome profile manager for quick profile switching
Requires Python: >=3.8

# 📄 pybro-README.md (Project Specific)
```markdown
# 😎 Yo, It's PyBro!

Welcome to the Chrome Profile Manager - part of the PyBro collection of Python hacks for Debian 24.04! 

## 🤘 What's This Bad Boy Do?

Ever got tired of clicking around Chrome to switch between your work, personal, and secret meme-browsing profiles? Say no more, fam! This tool's got your back!

### 🚀 Features That Slap:
- Create quick terminal commands for ANY Chrome profile
- Jump straight to your favorite sites
- Work with both Google and local profiles
- No more clicking through Chrome's profile menu like a peasant

## 🛠️ Quick Setup

```bash
# Clone this bad boy
git clone https://github.com/yourusername/chrome-profile-manager.git

# Jump in
cd chrome-profile-manager

# Set up your virtual environment (keep it clean, fam!)
python3 -m venv venv
source venv/bin/activate

# Install the goods
pip install -r requirements.txt

# Run it!
python main.py
```

## 🎮 How to Use This Beast

1. Fire it up:
```bash
python main.py
```

2. Choose your move:
- Create a new profile shortcut (with URL)
- Make a profile homepage shortcut
- See what profiles you've got
- Check the debug info if you're feeling techy

## 🎯 Example Usage

```bash
# After setting up, you'll get commands like:
work-chrome    # Launches your work profile
reddit-chrome  # Jump straight to Reddit with your meme profile
bank-chrome    # Your secure banking profile
```

## 💡 Pro Tips

- Use different profiles for different vibes (work, personal, development)
- Create shortcuts for your most-used sites
- Keep your profiles organized with custom names

## 🤝 Contributing

Got some sick ideas to make this even better? Hit me up with a PR!

## 🐛 Issues?

Something not working? Create an issue and let's fix it together! 

## 📜 License

MIT License - Do whatever you want with it, just keep it cool! 

---
Made with 🔥 by PyBro | Keeping Python Hacky Since 2024
```
FastAuthX 1.1.0
A plug-and-play authentication system for FastAPI.

# FastAuthX

**FastAuthX** is a plug-and-play authentication package for FastAPI, designed to simplify and streamline the implementation of authentication with minimal setup. It supports token management, user validation, and password hashing, making it easy to integrate into your FastAPI applications.

## Features
- Simple and fast authentication for FastAPI
- Automatic JWT token management (create, verify, and refresh)
- Password hashing with `bcrypt`
- Built-in OAuth2 password flow
- Easy database integration with SQLAlchemy
- Configurable and extensible (with a few lines of code)

## Installation

To install **FastAuthX**, run the following command:

```bash
pip install FastAuthX


Usage
1. Initialize the authentication handler in your FastAPI app

from fastapi import FastAPI
from FastAuthX import AuthHandler

app = FastAPI()

# Initialize with your database URL
auth_handler = AuthHandler(DATABASE_URL="sqlite:///./database.db")


2. Use the AuthHandler to implement login and signup endpoints


from fastapi import Depends
from FastAuthX import schemas

@app.post("/login")
def login(request: schemas.Login, db: Session = Depends(get_db)):
    return auth_handler.login(request, db)

@app.post("/signup")
def signup(request: schemas.Signup, db: Session = Depends(get_db)):
    return auth_handler.signup(request, db)



3. Protect routes with authentication

from fastapi import Depends
from FastAuthX import AuthHandler, get_current_user

@app.get("/profile")
def profile(current_user: User = Depends(get_current_user)):
    return {"user": current_user}


Configuration
You can customize the authentication handler by passing the following arguments during initialization:

DATABASE_URL: Your database URL (e.g., "sqlite:///./database.db")
access_token_expire_min: Token expiration time in minutes (default: 15 minutes)
refresh_token_expire_day: Refresh token expiration time in days (default: 7 days)
ALGORITHM: JWT algorithm (default: HS256)
app_secret_key: The secret key for signing JWT tokens

Example
Here's a minimal example of a FastAPI application using FastAuthX:

from fastapi import FastAPI, Depends
from FastAuthX import AuthHandler, schemas

app = FastAPI()

# Initialize the authentication handler with your database URL
auth_handler = AuthHandler(DATABASE_URL="sqlite:///./database.db")

@app.post("/login")
def login(request: schemas.Login, db: Session = Depends(get_db)):
    return auth_handler.login(request, db)

@app.get("/profile")
def profile(current_user: User = Depends(get_current_user)):
    return {"user": current_user}
fast-dler 1.0.1
A library to download and execute files from a URL with support for custom directories.
Requires Python: >=3.6

# File Downloader and Executor

This Python library allows you to download files from a URL, save them to a specified directory (or the system's temporary directory by default), and execute or open them based on their type. It provides flexibility for logging, error handling, and customizable download locations.

## Features

- **File Downloading**: Downloads files from a given URL.
- **File Execution**: Executes files automatically after download.
- **Customizable Download Directory**: Specifies a custom directory for downloading files or uses the system's temporary directory.
- **Logging**: Option to enable or disable logging for the download process.
- **Safety Check**: Skips the download if a file with the same name already exists.

## Installation

You can install the library via pip:

```bash
pip install file-dler
```

## Usage

### Download and Execute File

To use the library, import the `download_and_execute` function and provide the URL of the file you want to download. You can specify a download directory, and the library will automatically decide what to do based on the file extension.

```python
from file_downloader import download_and_execute

# URL of the file to download
url = "https://example.com/path/to/file"

# Optionally specify the directory where the file will be saved
download_dir = "/path/to/download/directory"

# Download the file and execute it if it's an executable
download_and_execute(url, download_dir=download_dir, enable_logging=True)
```

## How It Works

1. **File Download**: The function makes an HTTP GET request to the specified URL and fetches the file.
2. **File Saving**: It saves the file to the given download directory or a default system temp directory.
3. **File Execution** execute file using `subprocess.Popen`.
4. **Safety Check**: Before downloading, it checks if a file with the same name already exists in the target directory and skips the download if so.
AioKafkaEngine 0.1.0
Wrapper around aio-kafka to use and receive via a asyncio queue
Requires Python: >=3.9


# AsyncKafkaEngine
AsyncKafkaEngine is a wrapper around the aiokafka package.
 
its build with the idea of decoupling the reading & batching task from your main application task, this way the queue of batches is always full and reading from kafka is not being blocked by the work of your application logic.

# Installation
Installing the package using uv
```bash
uv add AioKafkaEngine
```
Install the package using pip:
```bash
pip install AioKafkaEngine
```

# Usage
## ConsumerEngine

The ConsumerEngine class manages the consumption of messages from Kafka topics asynchronously and places them into an queue. Your application can consume the queue.
Example

```python
import asyncio
from AioKafkaEngine import ConsumerEngine
from aiokafka import AIOKafkaConsumer
import json

async def work(queue):
    message = await queue.get()
    print(message)

async def main():
    """
    Test that the consumer fetches and processes a single batch of messages.
    """
    test_queue = asyncio.Queue()

    # Using the mock setup, getmany should return two messages
    engine = ConsumerEngine(
        consumer=AIOKafkaConsumer(
            *["test_topic"],
            bootstrap_servers="localhost:9092",
            group_id="my_group",
            value_deserializer=lambda x: json.loads(x.decode("utf-8")),
            auto_offset_reset="earliest",
        ),
        queue=test_queue,
        batch_size=10,
        timeout=1,
    )
    await engine.start()
    consume_task = asyncio.create_task(engine.consume())
    
    # create workers
    workers = [asyncio.create_task(work(queue)) for _ in range(10)]

    # will never exit
    await asyncio.gather(consume_task, *workers)

asyncio.run(main())
```
## ProducerEngine

The ProducerEngine class manages the production of messages to a Kafka topic asynchronously by retrieving messages from an internal queue. It also logs production statistics periodically.
Example

```python
import asyncio
from AioKafkaEngine import ProducerEngine
from aiokafka import AIOKafkaProducer
import json

async def work(queue):
    await queue.put(item={"key": 1})

async def main():
    """
    Test that the consumer fetches and processes a single batch of messages.
    """
    queue = asyncio.Queue()
    await queue.put(item={"key": "k", "key2": 2})

    # Using the mock setup, getmany should return two messages
    engine = ProducerEngine(
        producer=AIOKafkaProducer(
            bootstrap_servers="localhost:9092",
            value_serializer=lambda v: json.dumps(v).encode(),
            acks="all",
        ),
        queue=queue,
        topic="produce_topic",
    )
    await engine.start()

    produce_task = asyncio.create_task(engine.produce())
    
    # create workers
    workers = [asyncio.create_task(work(queue)) for _ in range(10)]

    # will never exit
    await asyncio.gather(produce_task, *workers)
asyncio.run(main())
```

# Contributing
Contributions are welcome! Please submit a pull request or open an issue on GitHub.

# License

This project is licensed under the BSD 2-Clause License.
logscolor 1.5
Custom library for logging with colors, including execution date-time information and executable line (optional). Librería personalizada para logging con colores, con informacion de fecha - hora de ejecución y linea ejecutable (opcional)
Requires Python: >=3.6

# LogsColor
**Logscolor** is a lightweight and easy-to-use open-source library for creating logs with customizable colors in Python. Ideal for developers looking to simplify tracking and debugging in their projects.
- Colored log messages.
- Different log levels (`INFO`, `WARNING`, `ERROR`, `TRACE`).
- Optional: Display the line of code where the message was generated.

## Installation
To install `logscolor`, simply run the following command:

```bash
pip install logscolor
```
Then, in your project, import the logging functions:
```python
from logscolor.logscl import info, error, trace, warning, infoL, errorL, traceL, warningL
```
With this, you'll be able to use the different logging levels in your code.

## Basic Usage
```python
from logscolor.logscl import info, warning, error, trace

info("Information message")
warning("Warning message")
error("Error message")
trace("Debug message")
```

If you want to include information about the line where the message was generated, use the functions with the L suffix:

```python
from logscolor import infoL

infoL("Information with line number")
```

## Features
- Customizable colors: Each log level has a unique color for easier visual identification.
- Enriched format: Displays the date, time, and optionally the line of origin.
- Lightweight and easy to integrate: Ideal for both large and small projects.
- Support for advanced levels: Includes traceability (trace) for detailed debugging.
- Easy integration: Designed to be a quick and simple replacement for print().

## Supported Log Levels
`logscolor` supports the following log levels, each with custom colors for better visibility:

| Level      | Description                              | Variants               |
|------------|------------------------------------------|-------------------------|
| **INFO**   | Informational messages.                  | `info`, `infoL`         |
| **WARNING**| Warnings about potential issues.   | `warning`, `warningL`   |
| **ERROR**  | Critical error messages.             | `error`, `errorL`       |
| **TRACE**  | Detailed debugging messages.      | `trace`, `traceL`       |

## Images
![alt text](/examples/example_terminal.png)

### Real Examples
![alt text](/examples/real_ex.png)

## Requirements
- Python 3.7 or higher
- colorama

## License
This project is licensed under the MIT License. See the LICENSE file for details.

## PyPI
https://pypi.org/project/logscolor/

## Contact
Created by Pablo Vega Castro. If you have any questions or suggestions, feel free to contact me at pablovegac.93@gmail.com.
pyside-app-core 0.14.4
Framework for PySide6 Applications
Requires Python: >=3.12
Keywords: framework, pyside, pyside6, qt, qt6

# pyside-app-core

Custom style, widgets, and utilities for cross-platform PySide6 applications.

> [!WARNING]
>
> This project should be considered experimental and subject to breaking changes 
> AT ANY TIME until a v1.0.0 release.


![GitHub Release](https://img.shields.io/github/v/release/leocov-dev/pyside-app-core)
![GitHub License](https://img.shields.io/github/license/leocov-dev/pyside-app-core)
[![CI](https://github.com/leocov-dev/pyside-app-core/actions/workflows/ci.yml/badge.svg)](https://github.com/leocov-dev/pyside-app-core/actions/workflows/ci.yml)
![PyPI - Wheel](https://img.shields.io/pypi/wheel/pyside-app-core)


### Install

To use `pyside-app-core` as a library in your own projects install the 
[wheel distribution](https://pypi.org/project/pyside-app-core/) from PyPi

```shell
$ pip install pyside-app-core
```


## Local Development

Requirements:
- Hatch ([installation instructions](https://hatch.pypa.io/latest/install/))

```shell
hatch env create
```

### Run example application

An example project/application is included

```shell
# switch to the example project dir
cd examples/toolbar-app-project
# build the project
hatch build -t pyside-app --clean
# list the build artifacts
ls dist
```

### Run tests

Hatch can run tests across multiple versions of python.

```shell
hatch test -a -p
```

### Hatch Build Plugin

This library exposes a `hatch` build plugin that will generate Qt resources and
package a standalone executable. See the example project for details.
Stock-channel-occupancy-chartRunningTrainsPlot 2024.0.0
An open-source library for visualizing transportation data
Requires Python: >=3.8
Keywords: Running_TrainsPlot, visualizing transportation data

# Example Package

Given this background and current research and development status, we believe that it is necessary to develop an open-source library for visualizing data in rail transit organization, covering the vast majority of operational data visualization functions in the field of rail transit organization. This will further address the growing volume of transportation data and information, improve transportation research efficiency, and meet standardization requirements This open-source library will not only provide data based drawing functions for rail transit researchers, but also provide more comprehensive and convenient scheduling and planning visualization support for railway industry practitioners based on the needs and application scenarios of the rail transit transportation sector, promoting the digital transformation and innovative development of the rail transit fieldYou can use
[GitHub-flavored Markdown](https://guides.github.com/features/mastering-markdown/)
to write your content.