semvec/pypi-packages huggingface dataset:
palindrome-validator-checker 0.1
A Python library to validate if a string is a palindrome.
Requires Python: >=3.6

# Palindrome Validator Checker
A Python library to validate if a string is a palindrome, ignoring case and non-alphanumeric characters.

## Usage

```python
from palindrome_validator_checker import is_palindrome

print(is_palindrome('Racecar'))
print(is_palindrome('hello world'))
```
structlog-journald 0.5.0
Structlog processor to send logs to journald
Requires Python: >=3.12
Keywords: journald, logging, structlog, systemd

# structlog-journald

![made-in-vietnam](https://madewithlove.vercel.app/vn?heart=true&colorA=%23ffcd00&colorB=%23da251d)
[![structlog-journald](https://badge.fury.io/py/structlog-journald.svg)](https://pypi.org/project/structlog-journald/)
[![ReadTheDocs](https://readthedocs.org/projects/structlog-journald/badge/?version=latest)](https://structlog-journald.readthedocs.io?badge=latest)
[![Common Changelog](https://common-changelog.org/badge.svg)](https://common-changelog.org)

[Structlog] processor to send logs to [journald].

Documentation: [https://structlog-journald.readthedocs.io](https://structlog-journald.readthedocs.io)

Installation
------------

To install `structlog-journald`, run:

```sh
pip install structlog-journald
```

You also need to install one of the journald binding implementations:

- CPython-based [`systemd-python`](https://pypi.org/project/systemd-python/).
- Cython-based [`cysystemd`](https://pypi.org/project/cysystemd/).

Usage
-----

Add the `structlog_journald.JournaldProcessor` to your list of `structlog` processors.
It will do nothing if the journald socket is not available,
in other words, the app was not started by systemd.

To let the log have more useful information, you should also add these processors before `JournaldProcessor`:

- `CallsiteParameterAdder`
- `format_exc_info`

Example:

```py
import getpass
import logging
import platform

import structlog

from structlog_journald import JournaldProcessor


structlog.configure(
    processors=[
        structlog.contextvars.merge_contextvars,
        structlog.processors.add_log_level,
        structlog.processors.CallsiteParameterAdder(),
        structlog.processors.format_exc_info,
        structlog.dev.set_exc_info,
        structlog.processors.TimeStamper(fmt='%Y-%m-%d %H:%M:%S', utc=False),
        structlog.processors.EventRenamer('message'),
        JournaldProcessor(),
        # This processor should be added for development environment only.
        structlog.dev.ConsoleRenderer(),
    ],
    # In this example, we want to print log entries of all levels
    wrapper_class=structlog.make_filtering_bound_logger(logging.NOTSET),
    context_class=dict,
    logger_factory=structlog.WriteLoggerFactory(),
    cache_logger_on_first_use=True,
)

log = structlog.stdlib.get_logger()

user = getpass.getuser()


log.info('Current Linux user: %s', user, linux=platform.freedesktop_os_release())
log.warning('This is a warning.', platform=platform.platform())
try:
    int('abc')
except ValueError:
    log.exception('Failed to convert string to integer.')
```

![Journalctl](https://raw.githubusercontent.com/hongquan/structlog-journald/refs/heads/main/misc/screenshot.png)

[structlog]: https://www.structlog.org
[journald]: https://www.freedesktop.org/software/systemd/man/latest/journalctl.html
cmlibs.maths 0.7.3
A collection of math functions and algorithms.
Requires Python: >=3.8
Keywords: Math, CMLibs, Zinc


===============
CMLibs Maths
===============

CMLibs maths functions.  This software can be found on PyPi and installed with the following command::

  pip install cmlibs.maths

Vector Operations
=================

A collection of functions that operate on python lists as if they were vectors.
A basic implementation to forgo the need to use numpy.

Algorithms
==========

A few basic functions for calculating line, plane intersections and plane normals.

Distribution
============

This software uses regex to extract the version number information from the package. The version number for this package is stored in 'src/cmlibs/maths/__init__.py'
mcpcc 0.1.4
Add your description here
Requires Python: >=3.13

# MCPCC - Excel读取MCP服务器

这是一个使用FastMCP构建的MCP服务器，专门用于读取Excel文件并返回JSON格式数据。

## 功能特性

- **read_excel_to_json工具**: 读取Excel文件并转换为JSON格式
  - 支持指定工作表名称
  - 自动检测文件存在性
  - 返回结构化的JSON数据，包含行数、列名、数据内容
- **greeting资源**: 动态生成个性化问候语

## 安装依赖

确保使用Python 3.13+，并安装以下依赖：

```bash
# 基础MCP依赖
pip install "mcp[cli]>=1.12.3"

# Excel处理依赖
pip install pandas openpyxl
```

## Excel工具使用方法

### 工具参数

- `file_path` (必需): Excel文件的完整路径
- `sheet_name` (可选): 工作表名称，如果不提供则读取第一个工作表

### 返回格式

```json
{
  "success": true,
  "sheet_name": "Sheet1",
  "rows": 3,
  "columns": ["姓名", "年龄", "城市", "工资"],
  "data": [
    {"姓名": "张三", "年龄": 25, "城市": "北京", "工资": 8000},
    {"姓名": "李四", "年龄": 30, "城市": "上海", "工资": 12000},
    {"姓名": "王五", "年龄": 35, "城市": "广州", "工资": 15000}
  ]
}

## 运行和调试方法

### 1. 直接运行服务器

```bash
# 方法1: 使用Python模块
python -m mcpcc

# 方法2: 使用运行脚本
python run_server.py
```

服务器将在stdio模式下运行，等待JSON-RPC消息。

### 2. 调试模式

运行调试脚本来测试服务器功能：

```bash
python debug_server.py
```

### 3. 客户端测试

使用测试客户端与服务器交互：

```bash
python test_client.py
```

### 4. VS Code调试

项目已配置了VS Code调试选项：

1. 打开VS Code
2. 按F5或转到"运行和调试"面板
3. 选择以下配置之一：
   - **Run MCP Server**: 运行服务器
   - **Debug MCP Server**: 调试模式运行
   - **Test MCP Client**: 运行客户端测试

## 手动测试JSON-RPC消息

如果要手动测试，可以向运行中的服务器发送JSON-RPC消息：

```json
// 初始化
{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {}}}

// 列出工具
{"jsonrpc": "2.0", "id": 2, "method": "tools/list"}

// 调用add工具
{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "add", "arguments": {"a": 5, "b": 3}}}

// 读取资源
{"jsonrpc": "2.0", "id": 4, "method": "resources/read", "params": {"uri": "greeting://World"}}
```

## 项目结构

```
mcpcc/
├── src/mcpcc/__init__.py    # 主服务器代码
├── debug_server.py          # 调试脚本
├── test_client.py           # 客户端测试
├── run_server.py            # 简单运行脚本
├── .vscode/launch.json      # VS Code调试配置
└── pyproject.toml           # 项目配置
```

## 开发建议

1. **添加新工具**: 在`__init__.py`中使用`@mcp.tool()`装饰器
2. **添加新资源**: 使用`@mcp.resource()`装饰器定义资源模式
3. **调试**: 使用`debug_server.py`快速测试功能
4. **集成测试**: 使用`test_client.py`进行完整的客户端-服务器测试

## 故障排除

如果遇到问题：

1. 确保Python路径正确设置
2. 检查依赖是否正确安装
3. 使用调试脚本测试基本功能
4. 查看终端输出了解详细错误信息
codewright 0.1.0
A CLI and utility package with decorators and tools to accelerate development.
Requires Python: >=3.8

# Codewright 🛠️

A CLI and utility package by Srajan with decorators and tools to accelerate Python development.

[![Build Status](https://img.shields.io/badge/build-passing-brightgreen)](https://github.com/Srajan04/codewright)
[![PyPI version](https://img.shields.io/pypi/v/codewright.svg)](https://pypi.org/project/codewright/)

## Installation

Once published to PyPI, you can install it via `pip`:
```bash
pip install codewright
```

For local development, clone this repository and run:

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

## Features

### 1. Utility Decorators

Simply import the decorators you need from `codewright`.

#### `@timer`

Measures and prints the execution time of any function.

```python
from codewright import timer
import time

@timer
def some_task():
    time.sleep(1)

# Prints: Finished 'some_task' in 1.0007 secs
some_task()
```

#### `@retry`

Retries a function if it throws an exception.

```python
from codewright import retry

@retry(tries=3, delay=1)
def connect_to_flaky_service():
    print("Attempting to connect...")
    raise ConnectionError("Connection failed!")

# This will attempt to run 3 times before failing.
connect_to_flaky_service()
```

#### `@cache`

Caches the results of function calls to avoid re-computation (memoization).

```python
from codewright import cache

@cache
def expensive_fibonacci(n):
    if n < 2: return n
    return expensive_fibonacci(n - 1) + expensive_fibonacci(n - 2)

# The first call is slow.
expensive_fibonacci(35) 

# This second call is instantaneous.
expensive_fibonacci(35)
```

### 2. CLI Scaffolding Tool

`codewright` includes a command-line tool to quickly set up new projects.

#### `setup`

Run this command in your terminal to create a standard project structure.

```bash
codewright setup my_new_project
```

This will generate a ready-to-use folder structure for `my_new_project`.

## Contributing

Contributions are welcome! Please feel free to open an issue or submit a pull request at [https://github.com/Srajan04/codewright](https://github.com/Srajan04/codewright).

## License

This project is licensed under the MIT License.
extract-video-frame 1.0.4
extract video frame to tmp folder
Requires Python: >=3.6

### extract video frame
        一个简单的工具，用于从视频中提取帧并按照毫秒时间戳保存为图像文件。
        
        ---
        ### 使用示例
        对视频进行分帧，使用示例：
        ```python
        from extract_video_frame import extract
            print("示例: extract_video(video.mp4")
            print("示例: extract_video(video.mp4,/path/to/output)")
        ```
EpsilonGreedy 0.1.1
A simple Epsilon-Greedy multi-armed bandit implementation
Requires Python: >=3.7

# Epsilon-Greedy Multi-Armed Bandit

A simple Python implementation of the Epsilon-Greedy algorithm for the multi-armed bandit problem. This package provides classes for creating bandit environments and an agent that learns to select the best action. It also includes a command-line interface for running simulations.

## Features

- **EpsilonGreedyAgent**: A configurable agent with parameters for exploration rate (`epsilon`), epsilon decay, and optimistic initial values.
- **MultiArmedBandit Environment**: Supports arms with different reward distributions:
  - **Bernoulli**: For modeling binary outcomes (e.g., click/no-click).
  - **Normal (Gaussian)**: For modeling continuous outcomes.
- **Simulation Runner**: A function to run experiments and collect results like average reward and optimal action rate.
- **Command-Line Interface**: A convenient CLI for running simulations without writing Python code.

## Project Structure

```
.
├── EpsilonGreedy/
│   ├── __init__.py
│   └── main.py
└── README.md
```

- [`EpsilonGreedy/main.py`](EpsilonGreedy/main.py): Contains all the core logic for the `Arm`, `MultiArmedBandit`, and `EpsilonGreedyAgent` classes, as well as the CLI entry point.
- [`EpsilonGreedy/__init__.py`](EpsilonGreedy/__init__.py): Makes the directory a Python package and exposes the main classes for easy import.

## Usage

You can use this project either as a Python library or as a command-line tool.

### As a Library

Import the necessary classes from the `EpsilonGreedy` package to build and run your own bandit simulations.

```python
from EpsilonGreedy import Arm, MultiArmedBandit, EpsilonGreedyAgent, run_bandit

# 1. Define the arms for the bandit problem
arms = [
    Arm(name="arm_1", distribution="bernoulli", p=0.1),
    Arm(name="arm_2", distribution="bernoulli", p=0.5),
    Arm(name="arm_3", distribution="bernoulli", p=0.9),
]

# 2. Create the bandit environment
bandit_env = MultiArmedBandit(arms=arms, seed=42)

# 3. Create the Epsilon-Greedy agent
agent = EpsilonGreedyAgent(
    n_actions=bandit_env.k,
    epsilon=0.1,
    seed=123
)

# 4. Run the simulation
results = run_bandit(env=bandit_env, agent=agent, steps=1000)

# 5. Print the results
print(f"Average reward: {results['avg_reward']:.4f}")
print(f"Optimal action selection rate: {results['optimal_action_rate']:.4f}")
print(f"Final Q-value estimates: {results['final_estimates']}")
```
piyush-math-calculator 0.1.0
A simple math utilities package for basic operations
Requires Python: >=3.6

# Piyush Math Calculator

A simple Python package for basic mathematical operations.

## Installation

```bash
pip install piyush-math-calculator
```

## Usage

```python
from mymath_utils import add, subtract, multiply, divide

# Basic operations
result = add(5, 3)        # Returns 8
result = subtract(10, 4)  # Returns 6
result = multiply(6, 7)   # Returns 42
result = divide(15, 3)    # Returns 5.0
```

## Features

- Addition
- Subtraction  
- Multiplication
- Division (with zero division protection)
- Power operations
- Square root calculations

## Requirements

- Python 3.6+

## License

MIT License
berroutils 0.2.0
Python utilities
Requires Python: >=3.10

# Berroutils

**Python utilities**

-----

*ListOfDictContainer*

Abstract Base Class to store content as list of dictionaries

Initiate it by passing a FileHandler

```python
from berroutils.container.list_of_dict_container import ListOfDictContainer
```

*FileHandler*

The type of
- JsonFileHandler
- PickleFileHandler

```python
from berroutils.plugins.file_handler import JsonFileHandler
```