semvec/pypi-packages huggingface dataset:
luhncheck 2.3.0
Simple validator for identification numbers based on the Luhn algorithm
Requires Python: >=3.10
Keywords: credit-card, identification, imei, luhn, validator

# LuhnCheck

A Python package to validate identification numbers using the Luhn algorithm with additional optional checks.

## 📖 Overview

The Luhn algorithm or Luhn formula, also known as the "modulus 10" or "mod 10" algorithm, named after its creator, IBM scientist Hans Peter Luhn, is a simple checksum formula used to validate a variety of identification numbers, such as:

- US National Provider Identifier numbers
- Canadian Social Insurance Numbers
- Saudi Arabia National and Resident ID numbers
- South African ID numbers
- Swedish National identification numbers
- Swedish Corporate Identity Numbers (OrgNr)
- Greek Social Security Numbers (ΑΜΚΑ)
- Credit card numbers
- IMEI numbers

The algorithm is in the public domain and is in wide use today. It was designed to protect against accidental errors. Most credit cards and many government identification numbers use the algorithm to distinguish valid numbers from mistyped or otherwise incorrect numbers.

## ✨ Features

- Simple API to validate numbers based on the Luhn algorithm
- Extended validation to cover number length and prefix(es)
- Can validate numbers containing hyphens or spaces
- Full type annotations and 100% test coverage
- Zero runtime dependencies

## 📦 Installation

To install using `uv`, run:

```shell
uv add luhncheck
```

To install using `pip`, run:

```shell
pip install luhncheck
```

## 🚀 Basic Usage

```python
from luhncheck import is_luhn

# Simple checksum validation
print(is_luhn("1101798278"))  # True

# Additional check for length (9 digits)
print(is_luhn("1101798278", 9))  # False

# Additional checks for prefix (either 1 or 2)
print(is_luhn("1101798278", 10, ["1", "2"]))  # True

# Validate numbers containing hyphens
print(is_luhn("01-055102-109831-4", None, "01"))  # True
```

## 📚 API Reference

### <kbd>function</kbd> `is_luhn`

```python
is_luhn(
    number: str,
    length: int | None = None,
    prefix: str | list[str] | None = None
) -> bool
```

Validate checksum and format of an identification number based on the Luhn algorithm.

**Args:**

- **`number`**: Identification number to validate.
- **`length`**: How many digits the number must contain. (The default is `None`, which implies skipping the length check).
- **`prefix`**: Exact digit(s) the number must start with. When a list of digits is provided, one of the values must match. (The default is `None`, which implies skipping the prefix check).

**Returns:**

- `True` when the number is valid; otherwise, `False`.

## 🤝 Contributing

If you're interested in contributing, please check out the [Contributing](https://github.com/dralshehri/luhncheck/blob/main/CONTRIBUTING.md) guide for more information on how you can help!

## 📄 License

This project is licensed under the terms of the MIT license.
ytrssil 0.8.1
Subscribe to YouTube RSS feeds and keep track of watched videos
Requires Python: >=3.12

# YouTube RSS manager

This is a simple CLI to manage YouTube subscriptions through RSS feeds
and watch new videos using `mpv`.

## Configuration

It looks for a configuration in `$XDG_CONFIG_HOME/ytrssil/config.json`
(~/.config/ by default).

Example:

```json
{
    "token": "token",
    "api_url": "https://example.com",
    "max_resolution": "1080"
}
```
explain-ai-generated-text 0.1.1.1.7
A library to explain whether text is AI-generated or human-written using SHAP
Requires Python: >=3.8
Keywords: AI, text-classification, explainability, SHAP

# Detect and explain AI generated text

A library to detect and explain whether text is AI-generated or human-written using SHAP (SHapley Additive exPlanations).

## Features

- **AI vs Human Text Classification**: Distinguish between AI-generated and human-written text
- **Explainability**: Uses SHAP to provide detailed feature importance explanations
- **Multiple Models**: Includes XGBoost and Random Forest models for robust predictions
- **Comprehensive Feature Analysis**: Analyzes 40+ linguistic features including:
  - Readability metrics
  - Sentiment analysis
  - Syntactic complexity
  - Stylistic patterns
  - And more

## Installation

```bash
pip install explain_ai_generated_text
```

Or install from source:

```bash
git clone <repository-url>
cd explain_ai_generated_text
pip install -e .
```

## Usage

```python
from explain_ai_generated_text import shap_explainer

# Analyze text
text = "Your text here..."
result = shap_explainer(text)

# Returns:
# {
#     "prediction": 0 or 1,  # 0 = Human, 1 = AI
#     "features": {
#         "feature_name": {
#             "value": feature_value,
#             "shap_value": shap_contribution,
#             "importance": relative_importance
#         },
#         ...
#     }
# }
```

## Requirements

- Python >= 3.8
- joblib
- shap
- xgboost
- spacy
- language-tool-python
- textblob
- pandas
- numpy
- scikit-learn
- nltk
- textstat
- matplotlib
- scipy

## Development

Install development dependencies:

```bash
pip install -e ".[dev]"
```

Run tests:

```bash
pytest
```

## License

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

## Citation

If you use this library in your research, please cite:

```bibtex
@software{explain_ai_generated_text,
  title={Explainable AI Generated Text Detection},
  year={2025},
  url={<repository-url>}
}
```
apxctrl 0.5.0
APx500 Control Server - Remote control for Audio Precision test equipment
Requires Python: >=3.11

# APx Control Server

A Flask-based web server for controlling Audio Precision APx500 test equipment remotely.

## Architecture

This server acts as a shim between a Linux client and the Windows-based APx500 application.
It exposes a REST API that wraps the APx500 .NET API.

```
┌─────────────┐      HTTP         ┌─────────────┐      .NET API      ┌──────────────┐
│   Client    │  ─────────────►   │   apxctrl   │  ───────────────►  │  APx500      │
│             │  ◄─────────────   │             │  ◄───────────────  │  Application │
└─────────────┘                   └─────────────┘                    └──────────────┘
```

### Design Principles

- **1:1 client model**: One client, one server, sequential requests
- **State tracking**: Server tracks APx state, loaded project (name + SHA256)

## Installation

On Windows, install Python and uv:

```powershell
# Install uv (Python package manager)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
$env:Path = "C:\Users\$env:USERNAME\.local\bin;$env:Path"

# Install Python 3.11
uv python install 3.11.4
```

Install dependencies:

```bash
uv pip install -e .
```

## Running tests

```bash
uv run py.test -v
```

## Running the Server

Allow access through firewall

```bash
netsh firewall add portopening TCP 5000 "apxctrl"
netsh advfirewall firewall add rule name="apxctrl TCP Port 5000" dir=in action=allow protocol=TCP localport=5000
netsh advfirewall firewall add rule name="apxctrl TCP Port 5000" dir=out action=allow protocol=TCP localport=5000
```

Basic usage of server:

```bash
uv run apxctrl --kill-existing
```

Note that you can't run this from a no-GUI terminal (like an SSH session), it will not work.

With options:

### Command Line Options

| Option | Description | Default |
|--------|-------------|---------|
| `--kill-existing` | Kill running APx500 processes on startup | False |
| `--host HOST` | Host to bind to | 0.0.0.0 |
| `--port PORT` | Port to bind to | 5000 |
| `--debug` | Enable Flask debug mode | False |

Basic usage of client (demonstrates API usage):

```bash
uv run apxctrl-client --help
```