semvec/pypi-packages huggingface dataset:
tremolo-login 1.1.1
tremolo-login is basically an extension of tremolo-session.
Requires Python: >=3.6

# tremolo-login
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=nggit_tremolo-login&metric=coverage)](https://sonarcloud.io/summary/new_code?id=nggit_tremolo-login)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=nggit_tremolo-login&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=nggit_tremolo-login)

tremolo-login is basically an extension of [tremolo-session](https://github.com/nggit/tremolo-session).

You can use it just like tremolo-session but with additional methods like `login()`, `logout()`, and `is_logged_in()`.

## Installation
```
python3 -m pip install --upgrade tremolo_login
```

## Usage
```python
#!/usr/bin/env python3

from hmac import compare_digest

from tremolo import Application
from tremolo_login import Session

app = Application()

# this is a session middleware
# that enables you to use request.ctx.session
Session(app, expires=1800)


@app.route('/')
async def index(request, **server):
    session = request.ctx.session

    if session is None or not session.is_logged_in():
        return b'You are not logged in. <a href="/login">Login</a>.'

    return b'Welcome to Dashboard. <a href="/logout">Logout</a>.'


@app.route('/login')
async def login(request, **server):
    session = request.ctx.session

    if request.method == b'POST':
        form_data = await request.form()

        if ('password' in form_data and
                compare_digest(form_data['password'][0], 'mypass')):
            # password match! set current session as logged in:
            session.login()
            # the return value is a `token`, if you want to use
            # `Authorization: sess <token>`

            return b'Login success! Go to <a href="/">Dashboard</a>.'

    return (b'<form action="/login" method="post"><div>'
            b'<label for="password">Password:</label> '
            b'<input type="text" name="password" placeholder="mypass" /> '
            b'<input type="submit" value="Login" /></div>'
            b'</form>')


@app.route('/logout')
async def logout(request, response, **server):
    session = request.ctx.session

    session.logout()

    # if you want the session data to be deleted:
    # the session id will also rotate on the next login
    # session.delete()

    response.set_status(302, b'Found')
    response.set_header(b'Location', b'/')

    return b''


if __name__ == '__main__':
    app.run('0.0.0.0', 8000, debug=True, reload=True)
```

## Testing
Just run `python3 -m tests`.

Or if you also want measurements with [coverage](https://coverage.readthedocs.io/):

```
coverage run -m tests
coverage combine
coverage report
coverage html # to generate html reports
```

## License
MIT License
noie-nds-api 3.0.6
NDS Protocol Buffers types for Python (generated from nds-api/spec).
Requires Python: >=3.14

# NDS-API - Python SDK

[![PyPI](https://img.shields.io/pypi/v/noie-nds-api.svg)](https://pypi.org/project/noie-nds-api/)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](../LICENSE)

Protocol SDK for **NDS-API** (NoieDigitalSystem) on Python.

- Protocol spec: `../spec/proto/`
- Repo docs index: [`../docs/README.md`](../docs/README.md)

## Installation

```bash
pip install noie-nds-api==3.0.4
```

## Features

- **Protocol types**: Identity / Asset / Event / Transaction / Result / Context
- **Proto compatibility**: matches the NDS Protocol Buffers specification
- **Runtime-agnostic**: no Bukkit/Paper, no database, no network stack dependencies

## Quick Start

### Decimal

```python
from nds.common import common_pb2

d = common_pb2.Decimal(value="1.23", scale=2)
print(d.value)
```

## Packages

| Package | Description |
|---------|-------------|
| `noie-nds-api` | Python protobuf DTOs (`*_pb2.py`) |

## Compatibility

- Python 3.14

## Notes (generated code)

- Protobuf DTOs are generated from `../spec/proto/**` via Buf.
- Generation template: `../spec/buf.gen.yaml`
i21y 0.4.1
The simple library for i18n support.
Requires Python: >=3.11
Keywords: i18n

[![PyPI](https://img.shields.io/pypi/v/i21y)](https://pypi.org/project/i21y/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/i21y)
![PyPI - License](https://img.shields.io/pypi/l/i21y)
[![Documentation Status](https://readthedocs.org/projects/i21y/badge/?version=latest)](https://i21y.readthedocs.io/en/latest/?badge=latest)

# i21y

i21y (a.k.a internationalization.py) is library for support i18n in Python. It is easy to use.

**Features:**

- Zero dependencies by default
- Simple design
- Utilities to simplify keys

## Installation

- Normal: `pip install i21y`
- YAML support: `pip install i21y[yaml]`
- Fast JSON (by orjson) support: `pip install i21y[fast-json]`

## Example

### Basic

```python
from i21y import Translator
from i21y.loaders.json import Loader

t = Translator(Loader("locale"))

assert t("main.responses.not_found", locale="ja") == "見つからなかった。"
```

### Advanced

```python
from i21y import locale_str

LONG_KEY = locale_str("very.long.locale.key.yeah_so_long")
print(LONG_KEY.but_easy_to_use) # very.long.locale.key.yeah_so_long.but_easy_to_use

assert t(LONG_KEY.but_easy_to_use, locale="ja") == "とても長いキーでも簡単に使える。"
assert t(LONG_KEY + "but_easy_to_use", locale="ja") == "とても長いキーでも簡単に使える。"
```

## Documentation

See the [documentation](https://i21y.readthedocs.io/) for usage and details.

## License

This project is licensed under the MIT License.

## Contributing Guide

This project is managed by the package manager uv.  
In coding, please use Ruff as a code formatter and pyright for type checking. The configuration is described in `pyproject.toml`.  
Please write what you have done in a complete sentence and use the original form of the verb. e.g. `Fix that locale_str can't join`.
rnet-client 0.0.2
rnet client wrapper
Requires Python: >=3.11

# rnet_client

Обёртка над библиотекой [rnet](https://github.com/0x676e67/rnet) для создания [самого быстрого](https://github.com/0x676e67/rnet/blob/main/python/benchmark/benchmark_results.csv) HTTP-клиента в Python с расширенными настройками: случайная эмуляция браузера, кастомные редиректы и оптимальные тайм-ауты. Возвращает готовый клиент с низкоуровневой эмуляцией, с настраиваемыми возможностями TLS, JA3/JA4 и HTTP/2, на базе [wreq](https://github.com/0x676e67/wreq).

## Установка

```bash
uv add rnet-client
```

Требуется RC-релиз rnet: `uv add --upgrade --prerelease allow rnet`

## Быстрый старт

```python
from rnet_client import get_rnet_client

# Создание клиента с настройками по умолчанию
client = get_rnet_client()

# Асинхронный запрос
async def main():
    response = await client.get("https://httpbin.org/get")
    print(await response.text())
```

## API

### `get_rnet_client()`

Фабрика для создания сконфигурированного `rnet.Client`.

| Параметр | Тип | По умолчанию | Описание |
|----------|-----|--------------|----------|
| `browser` | `Browsers \| list[str] \| None` | `None` | Семейство браузеров для эмуляции |
| `max_redirects` | `int` | `36` | Максимальное количество редиректов |
| `ignore_in_redirects` | `list[str] \| None` | `None` | Подстроки URL для прерывания редиректов |
| `connect_timeout` | `int` | `15` | Тайм-аут соединения (сек) |
| `read_timeout` | `int` | `20` | Тайм-аут чтения (сек) |
| `pool_idle_timeout` | `int` | `90` | Время простоя соединения в пуле (сек) |
| `pool_max_idle_per_host` | `int` | `15` | Макс. простаивающих соединений на хост |
| `headers` | `dict[str, str] \| None` | `None` | Дополнительные заголовки |
| `referer` | `bool` | `True` | Автоматический заголовок `Referer` |
| `gzip` | `bool` | `True` | Поддержка gzip |
| `brotli` | `bool` | `True` | Поддержка brotli |
| `deflate` | `bool` | `True` | Поддержка deflate |
| `zstd` | `bool` | `True` | Поддержка zstd |

### `Browsers`

Доступные семейства браузеров для эмуляции:

- `'Chrome'`
- `'Edge'`
- `'Firefox'`
- `'SafariDesktop'`
- `'iOS'`

## Примеры

### Эмуляция конкретного браузера

```python
# Только Chrome
client = get_rnet_client(browser='Chrome')

# Chrome или Firefox
client = get_rnet_client(browser=['Chrome', 'Firefox'])
```

### Кастомные редиректы

```python
# Прерывать редиректы при переходе на определённые домены
client = get_rnet_client(
    max_redirects=10,
    ignore_in_redirects=['login.example.com', 'auth.']
)
```

### Настройка тайм-аутов

```python
client = get_rnet_client(
    connect_timeout=30,
    read_timeout=60,
    pool_idle_timeout=120
)
```

### Дополнительные заголовки

```python
client = get_rnet_client(
    headers={
        'X-Custom-Header': 'value',
        'Accept-Language': 'ru-RU,ru;q=0.9'
    }
)
```
Xcedl-Image-Detection 0.1.1
Advanced image fingerprinting and scam detection library
Requires Python: >=3.8

# Xcedl-Image-Detection

A professional-grade Python library implementing advanced image fingerprinting and similarity detection algorithms, utilizing perceptual hashing techniques and multi-signal verification for robust content analysis and moderation.

## Key Features

- **Enterprise-Level Fingerprinting**: Simulates Discord's compression pipeline for consistent hash generation
- **Multi-Signal Verification**: Combines perceptual hashing, wavelet hashing, difference hashing, and color histogram analysis
- **Production-Ready**: Optimized for high-performance content moderation and duplicate detection
- **Configurable Parameters**: Tunable thresholds for accuracy optimization across different use cases

## Installation

```bash
pip install Xcedl-Image-Detection
```

For development and testing:
```bash
pip install Xcedl-Image-Detection[dev]
```

## Usage

```python
from PIL import Image
from xcedl_image_detection import MilitaryGradeFingerprinter, find_matching_scam

# Generate comprehensive image fingerprint
img = Image.open('target_image.jpg')
fingerprint = MilitaryGradeFingerprinter.generate_nuclear_fingerprint(img)

# Perform database matching against known content
database_entries = load_content_database()  # Your database loading function
match = find_matching_scam(fingerprint, database_entries)

if match:
    print(f"Content match detected: {match['reason']}")
```

## API Reference

### MilitaryGradeFingerprinter

- `nuclear_normalize(img)`: Normalize image through compression simulation pipeline
- `generate_nuclear_fingerprint(img)`: Generate complete multi-dimensional fingerprint

### Core Functions

- `verify_multisignal(test_fp, db_fp)`: Execute multi-signal similarity verification
- `find_matching_scam(test_fp, database)`: Perform optimized database search and matching

## Technical Specifications

- **Dependencies**: Pillow, imagehash, numpy
- **Python Support**: 3.8+
- **License**: MIT
- **Architecture**: Modular design for enterprise integration

## Performance Characteristics

- Optimized for high-throughput content processing
- Memory-efficient fingerprint generation
- Configurable accuracy vs. performance trade-offs
- Comprehensive error handling and logging

## Use Cases

- Content moderation and spam detection
- Duplicate image identification
- Digital asset management
- Copyright infringement detection
- Social media content analysis
sdevpy 1.0.6
Python package for Finance
Requires Python: >=3.6

# SDev.Python

Python repository for various tools and projects in Machine Learning for Quantitative Finance. In the current release,
we focus on stochastic volatility surfaces and their calibration through Machine Learning methods. See other work on our main 
website [SDev-Finance](http://sdev-finance.com/).

## Stochastic volatility calibration

In this project we use Neural Networks to improve the calibration speed for stochastic volatility models. For now
we consider only the direct map, i.e. the calculation from model parameters to implied volatilities.

We first generate datasets of parameters (inputs) and vanilla option prices (outputs) and then train the network to replicate the prices.
In this manner, the learning model is used as a pricing function to replace costly closed-forms or PDE/MC price calculations.

Our models can be saved to files for later usage, and can be re-trained from a saved state. We cover (Hagan) SABR, No-Arbitrage SABR
(i.e. the actual SABR dynamic), Free-Boundary SABR, ZABR and Heston models.

Jupyter notebooks are available for demo under ./notebooks.

Trained models are saved under ./models/stovol. Sample training data is provided under ./datasets/stovol. However, these are only small sets for demo
(50k samples). The larger sets we used for training (500k-2m) can be downloaded from our [Kaggle account](https://www.kaggle.com/sebastiengurrieri/datasets).

The notebook ./notebooks/StoVol Dataset Generation.ipynb can be used to generate samples (beware of setting up output paths to your local drive).
The notebook ./notebooks/StoVol Training.ipynb can be used to train models (pre-trained or not) on the samples. The .py scripts corresponding to these
notebooks are under sdevpy/projects/stovol.

## AAD Monte-Carlo

In script ./projects/aad/aad_mc.py, we show how to calculate 1st and 2nd order Greeks on a Monte-Carlo simulation of Black-Scholes model (1 asset) using AAD. We compare the results with standard Monte-Carlo Greeks by Finite Differences and the closed-form. We make use of payoff smoothers for both AAD and Standard MC.

In ./projects/aad/aad_mc_nd.py, we compare AAD to standard MC and Closed-Form on a product with generic dimension. We can then benchmark the performance of AAD compared to MC bump-based sensitivities varying dimension and number of simulations.

## Other Tools

The package contains various other tools including Black-Scholes/Bachelier formulas, Monte-Carlo simulation of vanilla prices and 
other utilities. It also features a wrapper class above Keras for easier management of trained models with their scalers,
as well as custom callbacks and learning schedules.

Jupyter notebooks of previous work are also available (PINNs, AAD Monte-Carlo) but are not yet integrated in the framework.
cangling-ai 0.1.12
cangling ai library
Requires Python: >=3.10

# cangling ai library

## 准备
```shell
pip install twine
pip install build
```

## 编译打包
```shell
pip -m build
```

## 预发布
```shell
python -m twine upload --repository testpypi dist/*
```

## 发布
```shell
python -m twine upload -r nexus dist/*
```

## 使用
```shell
pip install cangling-ai
```



## 发布到repo.cangling.cn
> 在HOME目录下创建 .pypirc 文件
> 内容如下
```toml
[distutils]
index-servers =
    nexus

[nexus]
repository = https://repo.cangling.cn/repository/cangling-py/
username = cangling
password = <PASSWORD>
```

## 客户端配置
Create or edit your pip.conf (Linux/macOS: ~/.config/pip/pip.conf; Windows: %APPDATA%\pip\pip.ini):

```toml
[global]
index-url = https://repo.cangling.cn/repository/pypi-all/simple
trusted-host = repo.cangling.cn
```
ssp4onnx 1.0.4
Simple Split for ONNX. A simple tool that automatically splits ONNX models of specified weight sizes.
Requires Python: >=3.10.12
Keywords: onnx, deep-learning, machine-learning

# ssp4onnx
**S**imple **Sp**lit for ONNX. A simple tool that automatically splits ONNX models of specified weight sizes.

[![Downloads](https://static.pepy.tech/personalized-badge/ssp4onnx?period=total&units=none&left_color=grey&right_color=brightgreen&left_text=Downloads)](https://pepy.tech/project/ssp4onnx) ![GitHub](https://img.shields.io/github/license/PINTO0309/ssp4onnx?color=2BAF2B) [![PyPI](https://img.shields.io/pypi/v/ssp4onnx?color=2BAF2B)](https://pypi.org/project/ssp4onnx/)  [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/PINTO0309/ssp4onnx)

## Usage
```bash
pip install ssp4onnx

ssp4onnx -i model.onnx --auto_split_max_size 1GB
```
<img width="646" height="155" alt="image" src="https://github.com/user-attachments/assets/cdc7e1c4-4a34-44fd-ac16-92a96d38434f" />

<img width="539" height="330" alt="image" src="https://github.com/user-attachments/assets/6779d186-3f4c-4f5c-b860-49ffc2843967" />

Options:
- `-i/--input_onnx_file`: input ONNX file (required)
- `-o/--output_dir`: output directory (optional, default: same directory as input)
- `-s/--auto_split_max_size`: target partition size, supports `KB`, `MB`, `GB` (default: `100MB`)

## Sample reuslts

  |Split.1 (1.1GB)|Split.2 (1.1GB)|Split.3 (0.4GB)|
  |:-:|:-:|:-:|
  |<img width="615" height="656" alt="20260131213930" src="https://github.com/user-attachments/assets/6e622d15-e1d6-422f-aee5-d8a21c1c10fc" />|<img width="651" height="669" alt="20260131213947" src="https://github.com/user-attachments/assets/1a300e8e-3bd2-4994-b1e6-713837b2ea51" />|<img width="640" height="641" alt="20260131214003" src="https://github.com/user-attachments/assets/d12add6b-a390-41ec-91bc-69a928910521" />|
jwt-signature-validator 0.2.0
An ASGI Middleware to sign payload using JWT
Requires Python: >=3.10

<h1 align="center">
    <strong>JWT Signature Validator</strong>
</h1>
<p align="center">
    <a href="https://github.com/iudeen/jwt-signature-validator" target="_blank">
        <img src="https://img.shields.io/github/last-commit/iudeen/ASGIJWTSignatureValidatorMiddleware" alt="Latest Commit">
    </a>
        <img src="https://img.shields.io/github/workflow/status/iudeen/ASGIJWTSignatureValidatorMiddleware/CI">
        <img src="https://img.shields.io/codecov/c/github/iudeen/jwt-signature-validator">
    <br />
    <a href="https://pypi.org/project/jwt-signature-validator" target="_blank">
        <img src="https://img.shields.io/pypi/v/jwt-signature-validator" alt="Package version">
    </a>
    <img src="https://img.shields.io/pypi/pyversions/jwt-signature-validator">
    <img src="https://img.shields.io/github/license/iudeen/ASGIJWTSignatureValidatorMiddleware">
</p>

JWT Signature Middleware is a pure ASGI Middleware that can be used with AGSI frameworks like FastAPI, Starlette and Sanic.


## Installation

```bash
pip install jwt-signature-validator
```

## Usage

```python
from fastapi import FastAPI
from jwt_signature_validator import EncodedPayloadSignatureMiddleware
from pydantic import BaseModel

app = FastAPI()

app.add_middleware(
    EncodedPayloadSignatureMiddleware,
    jwt_secret="hello",
    jwt_algorithms=["HS256"],
    protect_hosts=["*"]
)


class Model(BaseModel):
    text: str


@app.post("/")
def check(req: Model):
    return req

```

## License

This project is licensed under the terms of the MIT license.
sweepy-cli 0.1.7
Sweep away unused imports from your codebase
Requires Python: >=3.10

# sweepy

Sweep away unused imports from your codebase.

A minimal, zero-dependency Python tool that detects unused imports. Just point it at any local directory or GitHub URL.

## Installation

```bash
pip install sweepy-cli
```

## Usage

```bash
# Local directory
sweepy .
sweepy /path/to/repo

# GitHub URL (no clone needed)
sweepy https://github.com/user/repo

# Specific branch
sweepy https://github.com/user/repo/tree/develop
sweepy https://github.com/user/repo/tree/feature/new-api
```

### Options

```bash
# Exclude directories
sweepy . --exclude-dir migrations --exclude-dir tests

# Exclude files
sweepy . --exclude-file conftest.py
```

### Python API

```python
from sweepy import analyze

result = analyze("https://github.com/user/repo")

print(result.summary())

for item in result.unused_imports:
    print(f"{item.file}:{item.line} - {item.module}")
```

## Example Output

```
============================================================
SWEEPY ANALYSIS REPORT
============================================================
Repository: https://github.com/user/repo
Files analyzed: 42
Files skipped: 3
Unused imports: 5

------------------------------------------------------------

src/utils.py
   Line   3: json
   Line   7: typing

src/main.py
   Line   1: os
   Line   4: sys
   Line   5: re
```

## Why sweepy?

| | sweepy | ruff | autoflake |
|---|--------|------|-----------|
| Zero dependencies | O | O | X |
| GitHub URL support | O | X | X |
| Single purpose | O | X | X |
| Setup required | None | Config | Config |

sweepy does one thing: find unused imports. No config files, no complex rules, no setup.

## License

MIT
dataset-csv-generator 0.1.0
Generates CSV files from a classification dataset
Requires Python: >=3.8
Keywords: csv, dataset

# dataset_csv_generator

Generates CSV files from a classification dataset

![logo](https://raw.githubusercontent.com/trucomanx/DatasetCsvGenerator/main/screenshot.png)

## 1. Installing

To install the package from [PyPI](https://pypi.org/project/dataset_csv_generator/), follow the instructions below:


```bash
pip install --upgrade dataset_csv_generator
```

Execute `pip show dataset_csv_generator` to see where it was installed, probably in `/home/USERNAME/.local/lib/python3.10/site-packages`.

### Using

To start, use the command below:

```bash
csv-generator
csv-generator-gui
csv-split-gui
```
## 2. More information

If you want more information go to [doc](https://github.com/trucomanx/DatasetCsvGenerator/blob/main/doc) directory.

## 3. Buy me a coffee

If you find this tool useful and would like to support its development, you can buy me a coffee!  
Your donations help keep the project running and improve future updates.  

[☕ Buy me a coffee](https://ko-fi.com/trucomanx) 

## 4. License

This project is licensed under the GPL license. See the `LICENSE` file for more details.