semvec/pypi-packages huggingface dataset:
jconfigpy 0.2.4
configuration utility which easily integrated into project using gnu make as build system
License: MIT
Requires Python: >=3.6
Keywords: configuration utility make

# jconfigpy  

[![PyPI version](https://badge.fury.io/py/jconfigpy.svg)](https://pypi.org/project/jconfigpy/)
[![Python 3.6+](https://img.shields.io/badge/python-3.6%2B-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

> configuration utility compatible to GNU Make

## Motivation

> many C / C++ projects configured heavily based on macro variables and they make project readability worse. If project scale is getting larger, macro variables are added much more and macro branch points also become too complicated to manage project properly. and I really didn't like this kind of messy hell and started new project inspired from kconfig used in linux kernel build system.

## About

> jconfigpy is an implementation effort of a few points that are considered to be able to resolve many issues mentioned preceeding section.

+ configuration should be less intrusive as possible to source code
+ configuration description (or meta data) should be distributed into directory where each configuration is related to
+ configuration should be isolated from each other (the change in one source directory doesn't affect to the other)
+ no additional script or language just for configuration.
+ configuration utility should be able to resolve dependencies by itself.

> jconfigpy is inspired from kconfig in linux in many parts. actually, I tried it first, however, it was less portable and require another set of script language. it's quite simple though, we have a lots of familiar scripts or markup language suitable for representing configuration description model. (and I choose JSON) so I decided to
rewrite old stuff using new tools

## Getting Started

you can see how it works by input following in command line

```shell
$python jconfigpy -c -i ../example/config.json
```

or you can load configuration to generate header file and resolve dependencies

```shell
$python jconfigpy.py -s -i ../configs/config -t ../example/config.json
```

## Feature

1. JSON based configuration script (ease of use)
2. Keep source code (even Makefile) simple (good readability)
3. dependencies resolution (git)
4. Adding new module or dependency is simple and isolated from other source tree (improve project scalability)

## Required

> 1. python 3.6+
> 2. GNU Make utility

## Licnese

> MIT
simple-word-filter 1.0.3
A simple word filtering library for Python.
License: MIT
Requires Python: >=3.10
Keywords: filter, word, text, censor, profanity


# simple-word-filter

`simple-word-filter` 是一个轻量、可扩展的 Python 敏感词过滤库，内置多种匹配算法，可快速集成到文本审核或内容过滤场景中。

## 主要特性

- **多种匹配模式**：内置 `simple`、`regex`、`trie` 三种匹配器，按需取舍准确性与性能。
- **可扩展架构**：通过装饰器即可注册自定义匹配器，满足特殊匹配策略。
- **统一 API**：`contains`、`match_all`、`match_first`、`replace` 等方法在各匹配器间保持一致。
- **性能自测**：提供 `WordFilter.matcher_speed_test`，快速评估不同匹配器的运行效率。
- **现代 Python**：基于 3.10+ 类型注解，易读、易维护。

## 环境要求

- Python 3.10 及以上

## 安装

```bash
pip install simple-word-filter
```

## 快速上手

```python
from simple_word_filter import WordFilter

blocked = ["敏感词", "违禁品", "badword"]
wf = WordFilter(blocked, mode="trie")

text = "这是一段包含敏感词的文本"

wf.contains(text)
# True

wf.match_all(text)
# [('敏感词', 4)]

wf.replace(text, repl_char="*")
# '这是一段包含***的文本'
```

### 选择匹配模式

| 模式     | 适用场景 | 特点 |
|----------|----------|------|
| `simple` | 词库较小、实现最简洁 | 顺序扫描文本，易理解，性能中等 |
| `regex`  | 需要正则表达式能力 | 支持复杂模式匹配，灵活但构造成本较高 |
| `trie`   | 词库较大、追求性能 | 基于 Trie 树，查询效率高 |

可调用 `BaseMatcher.available_matchers()` 查看当前可用模式。

```python
from simple_word_filter import BaseMatcher

print(BaseMatcher.available_matchers())
# ['simple', 'regex', 'trie']
```

### 自定义匹配器

```python
from simple_word_filter import BaseMatcher

@BaseMatcher.matcher("suffix")
class SuffixMatcher(BaseMatcher):
	def match_all(self, text: str):
		matches = []
		for word in self._word_list:
			if text.endswith(word):
				matches.append((word, len(text) - len(word)))
		return matches

	def match_first(self, text: str):
		return self.match_all(text)[0] if self.match_all(text) else None

# 注册后即可像内置模式一样使用
```

### 性能快速评估

```python
from simple_word_filter import WordFilter

best_filter = WordFilter.matcher_speed_test(
	word_list=["foo", "bar", "baz"],
	sample_words=["foo", "bar", "baz", "qux"],
)

print(best_filter.mode)
# 依据测试结果输出运行最快的模式
```

## 开发者指南

```bash
git clone https://github.com/Sparrived/simple-word-filter.git
cd simple-word-filter
uv sync --dev  # 或使用 pip 安装开发依赖
```

运行测试：

```bash
pytest
```

## 发布流程

仓库已配置 GitHub Actions。向 `master` 推送包含 `src/simple_word_filter/__init__.py` 中 `__version__` 变更的提交后，将自动：

1. 构建发布包并上传到 GitHub Release（标签 `v<version>`）。
2. 将同一制品上传到 PyPI。

也可在 GitHub 上手动触发 `Upload Python Package` workflow。

## 许可证

MIT License © [Sparrived](https://github.com/Sparrived)
opensoar 2.1.1
Open source python library for glider flight analysis
License: MIT

OpenSoar
========

.. image:: https://img.shields.io/pypi/v/opensoar.svg
    :target: https://pypi.org/project/opensoar/
    :alt: pypi version and link
    
.. image:: https://readthedocs.org/projects/opensoar/badge/?version=latest
    :target: http://opensoar.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

The OpenSoar python library is meant to provide open source tooling for glider flight analysis. This may vary from 
thermal detection to competition scoring.

Installation
=============
::

    pip install opensoar


Reading in files with aerofiles
================================

.. image:: https://raw.githubusercontent.com/Turbo87/aerofiles/master/img/logo.png
    :target: https://github.com/Turbo87/aerofiles

OpenSoar only performs analyses after the files have been read in. The `aerofiles library <https://github.com/Turbo87/aerofiles>`_ provides the functionality
to read the files.

Example race task
==================
::

    from aerofiles.igc import Reader
    from opensoar.competition.soaringspot import get_info_from_comment_lines
    from opensoar.task.trip import Trip
    
    with open('example.igc', 'r') as f:
        parsed_igc_file = Reader().read(f)

    # example.igc comes from soaringspot and contains task inforamtion
    task, _, _ = get_info_from_comment_lines(parsed_igc_file)
    _, trace = parsed_igc_file['fix_records']
    
    trip = Trip(task, trace)
    task_distance_covered = sum(trip.distances)
    

Releasing
==========

- add version number in changelog
- change `__version__` in opensoar/version.py
- merge to master
- push tag, ci publishes to pypi