semvec/pypi-packages huggingface dataset:
promptmasker 0.0
Heuristic prompt masking utility for sensitive data
Requires Python: >=3.8
Keywords: llm, prompt, masking, redaction, security

# PromptMasker

PromptMasker is a **prompt-sanitization utility** that heuristically detects and masks
sensitive data in raw text before it is sent to LLMs, logs, or external services.

It is designed to sit **before** your model call or logging layer and reduce the risk of
accidentally leaking credentials or personal data.

This is **redaction**, not encryption.

---

## Why PromptMasker exists

LLMs are often fed:
- raw user input  
- debugging prompts  
- logs copied from real systems  

Those inputs frequently contain:
- API keys
- emails
- phone numbers
- internal IDs

PromptMasker is built to **intercept that text early** and neutralize obvious sensitive
tokens without requiring rigid schemas or strict formatting.

---

## What it masks

PromptMasker attempts to detect and mask:

- **API keys / secrets**  
  Context-aware, alphanumeric tokens near phrases like *“api key”*

- **Email addresses**  
  Detected by structure and local intent

- **Phone / mobile numbers**  
  Numeric tokens (8–15 digits) near phone-related phrases

- **Generic sensitive tokens**  
  Long numeric or mixed alphanumeric identifiers via fallback heuristics

---

## How detection works (important)

Detection is **heuristic and layered**, not rule-perfect:

- Fuzzy keyword matching  
  (`api key`, `email id`, `phone no`, etc.)

- Sliding context windows  
  (tokens near intent phrases are prioritized)

- Structural heuristics  
  (length, digits, alphanumeric composition)

- Global fallback  
  for obviously sensitive-looking tokens

This means:
- false positives are possible  
- behavior is intentionally conservative  

That trade-off is deliberate.

---

## What PromptMasker is NOT

- Not encryption  
- Not anonymization  
- Not compliance-grade security  

If you need cryptographic guarantees, **do not use this**.

---

## Installation

```bash
pip install promptmasker
```
---

## Sample Usage

```bash
from promptmasker import PromptMasker

masker = PromptMasker(mode="hash", salt="session")
text = "My api key is sk-1234567890 and email test@example.com"

print(masker.mask(text))
```
gen3-tracker 0.0.7rc28
A CLI for adding version control to Gen3 data submission projects.


![](docs/gen3_tracker-logo.png)
# Gen3 Tracker

Utilities to manage Gen3 schemas, projects and submissions.

## Quick Start
### Installation
```

$ pip install gen3_tracker

$ g3t version
version: 0.0.1

```
#### Optional: install the dtale package for interactive data exploration
* called from `g3t meta dataframe --dtale`
```
pip install g3t[dtale].
```


### Use

```
$ g3t --help
Usage: g3t [OPTIONS] COMMAND [ARGS]...

  Gen3 Tracker: manage FHIR metadata and files.

Options:
  --format [yaml|json|text]  Result format. G3T_FORMAT  [default: yaml]
  --profile TEXT             Connection name. G3T_PROFILE See
                             https://bit.ly/3NbKGi4

  --version
  --help                     Show this message and exit.

Commands:
  init          Initialize a new repository.
  add           Update references to data files to the repository.
  status        Show changed files.
  push          Push changes to the remote repository.
  pull          Fetch from and integrate with a remote repository.
  clone         Clone a repository into a new directory
  ls            List files in the repository.
  rm            Remove a single file from the server index, and MANIFEST.
  ping          Verify gen3-client and test connectivity.
  meta          Manage the META directory.
  collaborator  Manage project membership.
  projects      Manage Gen3 projects.



```

## User Guide
* See [use cases and documentation](https://aced-idp.github.io/)

## Contributing
* See [CONTRIBUTING.md](CONTRIBUTING.md)
pyrokid-crx-clientm 0.0.1
A python port of the com.rokid.crx.client-m Java library.
Requires Python: >=3.6
Keywords: rokid, crx, client-m, glasses, rokid glasses, com.rokid.crx.client-m

# com.rokid.crx.client-m library for Python

A python port of the com.rokid.crx.client-m Java library.

The idea is to allow you to use the CRX-M SDK on any device with bluetooth.

Library supports Python 3.6+ (confirmed using `vermin`), for as far as Bleak supports.


**This repo is NOT an official Rokid Glasses repo. We're not associated with Rokid.**
*This is just a personal project to port CRX-M to python, so it can be used on any platform, instead of only phones with android 10+*


## Info

The Rokid Glasses do have to be re-paired in order for this to connect.

Guide below should help you. If you were to run into issues after you done all the steps according to your display,
then you could make an issue if there isn't one for your display yet.


## Current Status

Currently as of v0.0.1-alpha, only the libcaps.so library is ported.

I already have more code, which connects to the glasses and then already allows me to read events,
but it's not perfect and is just unusable at the moment. I'm still decompiling and developing the rest.
Consider giving me my time to work it out ;) Anyways, as always God bless and peace out!


## Setting up

Install this library using `pip install pyrokid-crx-clientm`


## API/Example

Here is an example code with comments to explain the API functions:

```py
# Imports
from pyrokid_crx_clientm.libcaps import Caps

# Decode bytes to a Caps object
bytes_variable = b'\x00\x00\x00\x99\x05\x05SSSuu$xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\x11MA:C0:AD:DR:ES:SSTxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==\x01\x01'
caps = Caps.from_bytes(bytes_variable)
print(caps)
print('socketUuid:', caps[0].get_string())
print('macAddress:', caps[1].get_string())
print('rokidAccount:', caps[2].get_string())
print('glassesType:', caps[3].get_uint()) # 0-no display, 1-have display

# Encode Caps object to bytes
caps = Caps()
caps.write_uint(0x1004)
caps.write_uint(1)
caps.write_uint(5)
caps.write('TestDevice')
caps.write_ulong(1765983621057)
data = caps.serialize()
print(data)

```


Extra API documentation can be found on the [ReadTheDocs](https://pyrokid-crx-clientm.readthedocs.io/en/latest/) documentation.
helmet-detector 2.1.0
头盔检测工具 - 基于YOLOv12的视频/图片头盔佩戴检测，支持违规告警通知
Requires Python: >=3.8
Keywords: helmet, detection, yolo, computer-vision, safety, notification

# 头盔检测工具 (Helmet Detector) v2.1

基于 YOLOv12 的头盔佩戴检测工具，支持二次检测复验、违规时间记录、违规视频片段保存、**违规告警通知**。

## 安装

```bash
pip install helmet_detector-2.1.0-py3-none-any.whl
```

## 使用方法

### 命令行

```bash
# 检测视频，结果保存到指定目录（默认1秒违规片段）
helmet-detect --source video.mp4 --output D:/my_results

# 自定义违规视频片段时长（2秒）
helmet-detect --source video.mp4 --output results/ --clip-duration 2

# 检测图片
helmet-detect --source image.jpg --output results/

# 调整置信度阈值
helmet-detect --source video.mp4 --output results/ --conf 0.6

# 实时显示检测画面
helmet-detect --source video.mp4 --output results/ --show
```

### 参数说明

| 参数 | 简写 | 说明 | 默认值 |
|------|------|------|--------|
| `--source` | `-s` | 输入视频或图片路径 | 必填 |
| `--output` | `-o` | 输出目录路径 | detection_results |
| `--conf` | `-c` | 置信度阈值 | 0.5 |
| `--model` | `-m` | 自定义模型路径 | 内置模型 |
| `--tracker` | | 跟踪算法 (botsort/bytetrack) | botsort |
| `--clip-duration` | | 违规视频片段时长（秒） | 1.0 |
| `--show` | | 实时显示检测画面 | 否 |
| `--no-video` | | 不保存标注视频 | 否 |
| `--no-notify` | | 禁用违规通知 | 否 |
| `--notify-config` | | 通知配置文件路径 | notification_config.yaml |

### Python API

```python
from helmet_detector_pkg import HelmetDetector

# 初始化检测器
detector = HelmetDetector(confidence=0.5)

# 视频检测（带违规视频片段）
result = detector.detect_video(
    video_path="video.mp4",
    output_dir="D:/my_results",
    clip_duration=2.0,  # 违规视频片段时长（秒）
    show=False
)

# 图片检测
detections = detector.detect_image(
    image_path="image.jpg",
    output_dir="results/"
)
```

## 输出内容

检测完成后，输出目录结构：

```
detection_results/
├── violation_frames/        # 违规帧（带标注框）
│   └── violation_id1_frame94.jpg
├── violation_avatars/       # 违规头像（裁剪图）
│   └── avatar_id1_frame94.jpg
├── violation_videos/        # 违规视频片段
│   └── violation_id1_frame94.mp4
├── violation_records.txt    # 违规记录（含时间）
└── detected_xxx.mp4         # 标注后的完整视频
```

### 违规记录示例

```
============================================================
Track_ID: 19 | Frame: 94
违规时间: 00:03.13 (视频第 3.13 秒)
初检置信度: 0.71 | 复验置信度: 0.71
违规帧: violation_frames/violation_id19_frame94.jpg
违规头像: violation_avatars/avatar_id19_frame94.jpg
违规视频: violation_videos/violation_id19_frame94.mp4
============================================================
```

## 新功能 (v2.1)

- **🔔 违规告警通知** - 支持邮件/企业微信/Server酱/钉钉多渠道通知
- **智能触发** - 可配置置信度阈值和冷却时间
- **附带截图** - 邮件通知可携带违规截图

## 功能列表 (v2.0+)

- **递增编号目录** - 每次运行自动创建新目录，不会覆盖
- **二次检测复验** - 提高检测准确性，减少误报
- **违规时间记录** - 精确记录违规发生的时间点
- **违规视频片段** - 自动截取违规前后的视频片段

## 检测类别

- ✅ **With Helmet** - 已佩戴头盔 (绿色框)
- ⚠️ **Without Helmet** - 未佩戴头盔 (红色框，触发复验)
sphinxfortran-ng 0.5.6
An improved version of the sphinx-fortran python module
Requires Python: >=3.8

# sphinxfortran_ng

[![PyPI](https://img.shields.io/pypi/v/sphinxfortran-ng.svg)](https://pypi.org/project/sphinxfortran-ng)

An improved version of the original sphinx-fortran python module.

This code is based on the following original software:

- [sphinx-fortran](https://gitlab.com/l_sim/sphinx-fortran), on the "l_sim" working branch
- [sphinx-fortran](https://pypi.org/project/sphinx-fortran/), original sphinx-fortran project
- [crackfortran](https://github.com/numpy/numpy/tree/main/numpy/f2py) from the Numpy/f2py python module
mnemo-cli 0.1.2
Local CLI tool for indexing and searching personal notes
Requires Python: >=3.11

# mnemo | Local Notes Indexer

`mnemo` is a local CLI tool for indexing and searching personal notes.

It builds a searchable index of your notes and lets you quickly find and open relevant entries from the terminal.

Everything works locally.

### Why mnemo

I keep notes in multiple apps over many years. Searching them efficiently became harder than writing new ones.

mnemo is a small CLI tool that solves this problem locally and predictab.

It works just fine for me.

### Supported sources

- Apple Notes
- Bear (macOS)

### Installation

Run without installation (via uv):

```bash
uvx --from mnemo-cli mnemo --help
```

Install as a CLI tool:

```bash
uv tool install mnemo-cli
mnemo --help
```

### Usage

Initialize a project and build the index:

```bash
mnemo init
```

Search notes:

```bash
mnemo search python ai
```

Open a note from search results:

```bash
mnemo open 1
```

Rebuild the index:

```bash
mnemo rebuild
```

### Notes

- Index is stored locally in the project directory (`.mnemo`)
- Designed for personal knowledge bases
- Optimized for fast iteration and extensibility

### Status

Early-stage MVP.

### Possible next steps

- Improved search ranking
- Improved result snippets with highlighted matches
- Additional note sources (Notion, Google Docs)
- Indexing local folders (`txt`, `md`)
sec_gemini 1.1.6
Sec-Gemini Python SDK
Requires Python: >=3.10

# Sec-Gemini Python SDK

## Install dependencies

```bash
uv sync --all-extras --dev
```

## Basic Usage

Set your SecGemini API key in the `SEC_GEMINI_API_KEY` environment variable (or add it to the `.env` file).

Then, see `./scripts/basic_example.py` or `./scripts/basic_openai_example.py` as examples.

You can run them with: `uv run ./scripts/basic_example.py`


# Testing

The tests mostly use mock objects. However, a few tests also expect to hit a live backend. By default such tests hit the prod backend, but the tests can be configured to hit a local backend as well.

These are the relevant environment variables:
- `SEC_GEMINI_API_KEY`: must be a valid SecGemini API key.
- `SEC_GEMINI_API_HTTP_URL`: specify a custom HTTP(s) endpoint for the API, e.g., `http://localhost:8000`.
- `SEC_GEMINI_API_WEBSOCKET_URL`: specify a custom websocket(s) endpoint for the API, e.g., `ws://localhost:8000`.

Then, to run the tests: `uv run -m pytest`.
rcsb.utils.citation 0.28
RCSB Python Wrapper Module for Citation Utilities
Requires Python: >=3.9

# RCSB Python Citation Data Utility Classes

[![Build Status](https://dev.azure.com/rcsb/RCSB%20PDB%20Python%20Projects/_apis/build/status/rcsb.py-rcsb_utils_citation?branchName=master)](https://dev.azure.com/rcsb/RCSB%20PDB%20Python%20Projects/_build/latest?definitionId=10&branchName=master)

## Introduction

This module containsA collection of Python utility classes for managing PDB citation data.

### Installation

Download the library source software from the project repository:

```bash

git clone --recurse-submodules https://github.com/rcsb/py-rcsb_utils_citation.git

```

Optionally, run test suite (Python versions 3.9) using
[tox](http://tox.readthedocs.io/en/latest/example/platform.html):

```bash
tox
```

Installation is via the program [pip](https://pypi.python.org/pypi/pip).

```bash
pip install rcsb.utils.citation

or install the local repository using:

pip install -e .
```