semvec/pypi-packages huggingface dataset:
pylight-metrics 0.2.0
A zero-contention, thread-safe metrics aggregator for high-performance Python applications.
License: MIT
Requires Python: >=3.8

# Pylight Metrics

**Zero-Contention, High-Performance Observability for Python.**

`pylight-metrics` is a thread-safe metrics aggregator designed for high-throughput applications. It uses **Thread Local Storage (TLS)** to buffer metrics, ensuring your application's critical path remains lock-free.

## Features

- 🚀 **Zero-Contention:** Writes to thread-local buffers; global locks are only acquired during infrequent merges.
- 📊 **Rich Statistics:** Calculates P50, P90, P99, Standard Deviation, and Counts.
- 📈 **Exporters:** Supports JSON, **Prometheus**, and **CSV** (Excel) formats.
- 🔌 **Drop-in Ready:** Use decorators like `@fast_timer` and `@count_calls`.

## ⚡ Benchmarks

Comparison with `prometheus-client` (Official Library) on 50 concurrent threads.

| Metric Type | Library | Operations | Time | Speed (ops/sec) |
|------------|---------|------------|------|-----------------|
| **Timer** (P99 Calc) | `prometheus_client` | 1,000,000 | 1.70s | 585k |
| **Timer** (P99 Calc) | **pylight-metrics** | 1,000,000 | **1.27s** | **782k** |

**Result:** `pylight-metrics` is **~1.33x Faster** on the write path because it offloads heavy math (percentiles) to the background flush step.


## Installation

```bash
pip install pylight-metrics
paica 0.1.0
Saliency maps and Grad-CAM visualizations using TensorFlow and Keras
License: MIT
Requires Python: >=3.8

## Paica

A TensorFlow-based package for generating **Saliency Maps** and **Grad-CAM** visualizations for convolutional neural networks.

This package helps interpret deep learning models by highlighting the regions of an image that most influence model predictions.

---

## Features

- Easy image preprocessing & visualization
- Saliency map generation & visualization
- Grad-CAM++ generation & visualization
- Works with TensorFlow / Keras models
- Supports pretrained models (e.g. VGG16)

---

## Installation

```bash
pip install paica
```
---

## Sample Code

1. Saliency Maps

```python
import tensorflow as tf
from paica import create_image_tensors, smoothgrad_saliency
from paica import visualize_saliency_maps

# Load model
model = tf.keras.models.load_model(model_path)

# Create image tensors
dog_orig, dog_tensor = create_image_tensors(dog_img_path)
cat_orig, cat_tensor = create_image_tensors(cat_image_path)

# Define variables
alpha = 0.5
images = [dog_orig, cat_orig]
image_titles = ['Dog', 'Cat']

# Generate SmoothGrad Saliency Maps
saliency_map_dog = smoothgrad_saliency(model, dog_tensor, class_index=None, n_samples=25, noise_level=0.1)
saliency_map_cat = smoothgrad_saliency(model, cat_tensor, class_index=None, n_samples=25, noise_level=0.1)
saliency_maps = [saliency_map_dog, saliency_map_cat]

# Visualize Saliency Maps
visualize_saliency_maps(image_titles, images, saliency_maps, alpha)
```
---

2. GradCAM++ 

```python
import tensorflow as tf
from paica import create_image_tensors, gradcam_plus_plus
from paica import visualize_grad_cams

# Load model
model = tf.keras.models.load_model(model_path)

# Create image tensors
dog_orig, dog_tensor = create_image_tensors(dog_img_path)
cat_orig, cat_tensor = create_image_tensors(cat_image_path)

# Define variables
alpha = 0.5
images = [dog_orig, cat_orig]
image_titles = ['Dog', 'Cat']

# Find last conv layer name
for layer in model.layers[::-1]:
  if isinstance(layer, tf.keras.layers.Conv2D):
    last_conv_layer_name = str(layer.name)
    break

# Create GradCAM heatmaps
heatmap_dog = gradcam_plus_plus(model, dog_tensor, last_conv_layer_name=last_conv_layer_name,
                            class_index=None, smoothgrad=True, n_samples=15, noise_level=0.1)
heatmap_cat = gradcam_plus_plus(model, cat_tensor, last_conv_layer_name=last_conv_layer_name,
                            class_index=None, smoothgrad=True, n_samples=15, noise_level=0.1)

# Create heatmap list
heatmaps = [heatmap_dog, heatmap_cat]

# Visualize GradCAMs
visualize_grad_cams(image_titles, images, heatmaps, alpha)
```
vconsoleprint 1.0.2
Auto-colored Python console print replacement
License: MIT
Requires Python: >=3.6

# vconsoleprint

A Python package that automatically replaces the built-in `print` function with a better, colorful, developer-friendly console output — similar to `console.log` in JavaScript.

## 🚀 Features

- Automatically color-coded output by data type.
- Pretty-print lists, tuples, and nested dictionaries.
- Cleaner readability for debugging.
- No need to manually call the function — `print()` is auto-overwritten on import.

## 📦 Installation


## 🧠 Usage

Just import the package:

```python
import vconsoleprint

print("Hello", 10, 3.14, True, None)

Example Output:

Strings → green

Integers → yellow

Floats → cyan

Boolean → magenta

None → blue

Lists / Dicts → white (pretty formatted)

🛠 How it Works

When you import the package:

import vconsoleprint


It automatically overrides the built-in print with a cleaner, styled output function.

🤝 Contributing

Pull requests are welcome.
For major changes, please open an issue first.

📄 License

This project is licensed under the MIT License — see the LICENSE file.



---

# 🎯 Final Folder Structure

Make sure your project looks like this:

vconsoleprint/
init.py
printer.py
setup.py
README.md
LICENSE


---

# 🔥 Want me to generate **printer.py** and **__init__.py** again under this structure?  
Just say **"generate printer.py + init"** and I’ll provide clean versions suitable for a PyPI package.
ai-api-test-docs 1.0.1
AI-powered API test and documentation generator using Gemini
License: MIT
Requires Python: >=3.9

# ai_api_test_docs

AI-powered project tools for API testing, documentation, security auditing, and README generation using Google Gemini.

## Installation

```sh
pip install ai_api_test_docs
```

## Usage

```sh
ai_api_test_docs
```

### Instructions

1. Open your **command-line interface (CLI)**.
2. **Navigate to your project's parent directory** using `cd`. For example:

   ```sh
   cd path/to/your/projects/
   ```

3. **Run the tool**:

   ```sh
   ai_api_test_docs
   ```

4. Follow the on-screen prompts:
   - Select the **target project folder**.
   - Provide your **Google Gemini API key** when prompted.
   - Choose between generating:
     - a. API Test Writer
     - b. API Documentation Generator
     - c. CyberBackend Security Advisor
     - d. README Generator
   - Selections are made via **lettered options** (e.g., `a`, `b`, `c`, `d`).

5. Let the tool generate the content for you. Output files will be saved in the selected project folder.

### Delete Stored API Key

To remove your stored Gemini API key:

```sh
ai_api_test_docs delete_key
```

## Requirements

- Python 3.9 or higher
- Google Gemini API key (prompted automatically on first use)

> **Note:** This tool uses AI to generate tests, documentation, security audits, and READMEs. AI-generated content may contain mistakes or inaccuracies. Always **review and verify** the output before using it in production.

> **Function/Class/Module Description:**  
> Performs the specified operations as described in the implementation.
>
> **Author:** Ezeana Micheal  
> **Note:** This tool and documentation was created by Ezeana Micheal.
airflow-operators 0.16.0
Custom operators for Apache Airflow
License: MIT
Requires Python: <3.13,>=3.10

# airflow-operators

Custom operators for Apache Airflow

## Installation

> It is assumed that `Apache Airflow` is installed. It is not added to the dependencies for some reason.

> The `mysqlclient` dependency is used. If it is not installed, there may be errors during installation. 
> Install it explicitly using the [documentation](https://pypi.org/project/mysqlclient/).

## List of operators

### Kafka

- CustomConsumeFromTopicOperator
- ConsumeMessageDataOperator

### SQLAlchemy

- SQLAlchemySessionOperator
word-document-typeset 1.0.3
Word文档排版MCP服务
License: MIT
Requires Python: >=3.10

# Word文档排版 MCP服务

仅提供一个工具：Style_the_Heading（为指定级别标题应用样式）。

## 功能概述
- Style_the_Heading：为文档内的内置标题样式（Heading 1-9）统一设置字体、颜色、对齐及段前/段后间距。该操作直接修改文档样式，所有使用该标题样式的段落将统一更新。

## 安装要求
- Python 3.10+
- python-docx >= 1.1.0
- fastmcp >= 2.8.1

## 安装与运行

使用 uv（推荐）：
```bash
uv sync
```

或使用 pip：
```bash
pip install python-docx fastmcp
```

启动 MCP 服务器（两种方式均可）：
```bash
# 使用 uv 运行
uv run python -m word-document-typeset.main

# 或直接运行
python -m word-document-typeset.main
```

## MCP 客户端配置示例
将如下配置添加到您的 MCP 客户端配置文件中：
```json
{
  "mcpServers": {
    "Word文档排版": {
      "command": "uvx",
      "args": [
        "word-document-typeset"
      ],
      "env": {}
    }
  }
}
```

## 工具：Style_the_Heading

调用名称："Style_the_Heading"

参数说明：
- filename: 文档路径（可不带 .docx 扩展名）
- level: 标题级别（1-9）
- bold/italic/underline: "true" / "false" / ""（空表示不改）
- color: 颜色名称或十六进制（如 "red"、"#FF0000"）
- font_size: 字号（磅），>0 时生效
- font_name: 字体名称
- align: 对齐方式（left/center/right/justify）
- spacing_before/spacing_after: 段前/段后间距（磅，>=0 时生效）
- add_numbering: 是否添加多级编号（"true"/"false"/"" 不变）
- numbering_separator: 多级编号分隔符（默认 "."）
- numbering_suffix: 编号后缀（默认空格 " "，如设为 ". " 得到 "1. 标题"）
- remove_numbering: 是否移除编号前缀（"true"/"false"/"" 不变；优先级高于 add_numbering）
- remove_all_levels: 是否对所有标题级别移除编号（当 remove_numbering="true" 时生效）

示例（自然语言指令）：
```
请将文档 "example.docx" 的 Heading 1 设置为：居中、粗体、字号16、颜色蓝色，段前12磅、段后6磅。
```
示例（编号相关）：
```
移除 Heading 2 的编号：remove_numbering="true"，remove_all_levels="false"，level=2
移除所有级别编号：remove_numbering="true"，remove_all_levels="true"
为 Heading 2 添加多级编号：add_numbering="true"，level=2，numbering_separator=".", numbering_suffix=". "
```
```
请将文档 "example.docx" 的 Heading 1 设置为：居中、粗体、字号16、颜色蓝色，段前12磅、段后6磅。
```

## 颜色支持
- 预定义颜色：red, blue, green, black, white, yellow, orange, purple, gray/grey
- 十六进制：#RRGGBB 或 RRGGBB（如 #FF0000）

## 错误与校验
- 文件存在性与可写性校验（避免被其他程序占用）
- 标题级别范围校验（1-9）
- 样式存在校验（必须为内置样式，如 "Heading 1"）
- 参数类型与取值校验（字号/间距需为整数且有效）

## 注意事项
1. 修改的是样式对象（如 "Heading 1"），所有使用该样式的段落都会受影响。
2. 请确保文档未在其他软件中打开，以避免写入失败。
3. 间距与字号单位为磅（pt）。
4. 对齐值仅支持 left/center/right/justify。

## 许可证
MIT License

## 作者
Word MCP Services