semvec/pypi-packages huggingface dataset:
rxntools-kit 0.1.0
A package of custom rdkit-based operations for reaction cheminformatics
Requires Python: <3.11,>=3.10

# RxnTools

RxnTools is a lightweight collection of RDKit-powered utilities for reaction-centric cheminformatics workflows. It grew out of template-extraction notebooks and now bundles reusable helpers for:

- parsing unmapped reaction strings, filtering cofactors, and building reaction descriptors
- tracing atom-mapped changes and extracting environment-specific SMARTS templates
- enumerating products from SMARTS templates (including optional stereochemical filters)
- visualising molecules or highlighting substructures inside Jupyter notebooks

Whether you are curating reaction datasets, prototyping retrosynthesis heuristics, or inspecting stereochemical templates, RxnTools provides the glue code built on top of RDKit so you do not have to rewrite it from scratch.

## Installation

### From PyPI (recommended)
```bash
pip install rxntools-kit
```

> **Note:** RxnTools targets Python 3.10. You must install an RDKit build that matches your platform; conda-forge is the most reliable source (`conda install -c conda-forge rdkit`).

### From source with Poetry
```bash
git clone https://github.com/<your-handle>/RxnTools.git
cd RxnTools
poetry env use /path/to/python3.10
poetry install
```

## Quickstart

```python
from rxntools.reaction import unmapped_reaction

# Provide a minimal cofactor list so helpers can filter them out
cofactors = ["O=C=O"]   # typically loaded from data/raw/cofactors.json

rxn = unmapped_reaction("CCO + O=C=O >> CC(=O)O + O")
substrates = rxn.get_substrates(cofactors_list=cofactors, consider_stereo=False)
products = rxn.get_products(cofactors_list=cofactors, consider_stereo=False)

print(substrates)  # ['CCO']
print(products)    # ['CC(=O)O', 'O']
```

Need to inspect transformed atoms? Switch to `rxntools.reaction.mapped_reaction`:

```python
from rxntools.reaction import mapped_reaction

rxn_smarts = "[CH3:1][CH2:2][OH:3].[C:4](=[O:5])=[O:6]>>[CH3:1][CH:2](=[O:5])[OH:3].[OH2:7]"
mr = mapped_reaction(rxn_smarts, include_stereo=True)
changed_atoms, broken_bonds, formed_bonds = mr.get_all_changed_atoms()
```

For template extraction, pass the mapped substrate SMARTS plus atom indices to `mapped_reaction.get_template_around_rxn_site`.

## Data Files

Two reference files ship with the source distribution and can be redistributed with your projects:

- `data/raw/all_cofactors.csv`
- `data/raw/cofactors.json`

Larger third-party datasets (e.g., `enzymemap*`) remain in the repository but are excluded from the published wheel to respect their original licenses. If you rely on them, keep a clone of the repository or source the datasets separately.

## Running Tests

```bash
poetry install --with dev  # ensure pytest and optional tooling are installed
poetry run pytest
```

## Contributing

Issues and pull requests are welcome. If you plan significant changes:

1. Fork the repository and create a topic branch.
2. Add or update tests that cover the new behaviour.
3. Run `poetry run pytest` before opening a PR.

## License

RxnTools is released under the [MIT License](LICENSE).
util-process-pool 0.1.0
简便的多进程调用工具，基于 concurrent.futures.ProcessPoolExecutor 的封装
Requires Python: >=3.7

# Util Process Pool

简便的多进程调用工具，基于 `concurrent.futures.ProcessPoolExecutor` 的封装。

## 特性

- 🚀 简化的多进程调用接口
- 📊 进度跟踪和错误处理
- 🔧 灵活的配置选项
- 📝 详细的日志记录
- 🎯 支持多种任务类型（CPU密集型、IO密集型）

## 安装

```bash
pip install util-process-pool
```

## 快速开始

### 基本使用

```python
from util_process_pool import parallel_map

# 简单的并行计算
numbers = list(range(10))
results = parallel_map(lambda x: x * x, numbers)
print(results)  # [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
```

### 使用 ProcessPool 类

```python
from util_process_pool import ProcessPool

def process_data(data):
    # 处理数据的函数
    return data * 2

with ProcessPool(max_workers=4) as pool:
    data_list = [1, 2, 3, 4, 5]
    results = list(pool.map(process_data, data_list))
    print(results)  # [2, 4, 6, 8, 10]
```

### 批量执行复杂任务

```python
from util_process_pool import batch_execute

def complex_task(param1, param2):
    # 复杂的处理逻辑
    return f"Processed: {param1} + {param2}"

# 准备参数列表
args_list = [
    (("hello", "world"),),  # 第一个任务
    (("foo", "bar"),),      # 第二个任务
]

results = batch_execute(complex_task, args_list, show_progress=True)
```

## API 文档

### ProcessPool 类

主要的进程池管理类。

```python
ProcessPool(
    max_workers=None,      # 最大工作进程数（默认：CPU核心数）
    initializer=None,      # 进程初始化函数
    initargs=(),           # 初始化函数参数
    logger=None            # 自定义日志记录器
)
```

**方法：**
- `submit(func, *args, **kwargs)`: 提交单个任务
- `map(func, iterable, timeout=None, chunksize=1)`: 并行映射
- `execute_batch(func, args_list, timeout=None, show_progress=False)`: 批量执行
- `wait_completion(timeout=None)`: 等待所有任务完成

### 工具函数

- `parallel_map(func, iterable, max_workers=None, chunksize=1, timeout=None)`
- `batch_execute(func, args_list, max_workers=None, timeout=None, show_progress=False)`

## 许可证

MIT License
ciit-lesson-plan 0.1.4
这是一个用于将Markdown格式的教学计划内容转换为Word文档（.docx）的Python脚本。该脚本使用python_docx库来处理Word文档，能够读取Markdown文件内容，并根据预定义的模板生成格式化的教案文档。
Keywords: lesson, plan, ciit, teaching, docx

# `lesson_plan.py` 使用说明

## 简介
`lesson_plan.py` 是一个用于将 Markdown 文件转换为格式化 Word 文档（.docx）的 Python 脚本。它主要用于生成教学教案文档，支持从 Markdown 文件中提取内容并按照预定义的模板格式化输出。

## 功能
- 从 Markdown 文件中提取内容。
- 将提取的内容填充到 Word 文档模板中。
- 支持自定义输出文件名。
- 支持复杂的表格格式，包括单元格合并、字体样式、背景颜色等。

## 依赖库
- `python-docx`: 用于创建和修改 Word 文档。
- `re`: 用于正则表达式操作。

## 使用方法
1. 准备一个 Markdown 文件，文件名格式为 `lesson_{number}.md`，其中 `{number}` 是一个数字。
2. 准备一个 Word 文档模板 `lesson_template.docx`。
3. 运行脚本：
  ```bash
  python lesson_plan.py
  ```

## 输入文件结构
Markdown 文件应包含以下部分：
- **项目名称**
- **授课类型**
- **授课周次**
- **授课学时**
- **知识目标**
- **能力目标**
- **素质目标**
- **学情分析**
- **教学重点**
- **教学难点**
- **教学方法**
- **教材资源**
- **课前:教学内容**
- **课前:学生活动**
- **课前:教师活动**
- **课前:设计意图**
- **项目导入:教学内容**
- **项目导入:学生活动**
- **项目导入:教师活动**
- **项目导入:设计意图**
- **内容展开:教学内容**
- **内容展开:学生活动**
- **内容展开:教师活动**
- **内容展开:设计意图**
- **课堂小结:教学内容**
- **课堂小结:学生活动**
- **课堂小结:教师活动**
- **课堂小结:设计意图**
- **课后:教学内容**
- **课后:学生活动**
- **课后:教师活动**
- **课后:设计意图**
- **教学反思:教学效果**
- **教学反思:诊断**
- **教学反思:改进**

## 输出文件
生成的 Word 文档将保存在当前目录下，文件名格式为 `{number}-{project_name}-教案.docx`，其中 `{number}` 是从 Markdown 文件名中提取的编号，`{project_name}` 是从 Markdown 文件中提取的项目名称。

## 注意事项
- 确保 Markdown 文件和 Word 模板文件路径正确。
- 确保 Markdown 文件内容格式正确，避免解析错误。
- 脚本中使用了复杂的表格格式化功能，确保 `python-docx` 版本支持这些功能。

## 作者
Yongshun Song

## 许可证
MIT License
py-apache-log-digest-xethhung12 0.0.3
A small package targeting to help on python project packaging process
Requires Python: >=3.11


# py_apache_log_digest_xethhung12

## Execution
Run through python interpreter:
```shell
python -m py_apache_log_digest_xethhung12 -h
```

Run through python project script
```shell
py-apache-log-digest-xethhung12 -h
```
## Development
The project requires `python` (3+ version) installed and `pip` ready for use on adding manage dependencies

#### Tools
|Name|Platform|Type|Description|
|---|---|---|---|
|install-dependencies.sh|shell|script| The scripts for installing depencies required|
|build.sh|shell|script| The scripts for build the package|
|build-and-deploy.sh|shell|script| The scripts for build and deploy the package|

* install-dependencies.sh
The script will install dependencies listed in `dev-requirements.txt` and `requirements.txt`. The first requirement file contains the dependencies for development like build and deploy tools. The second requirement file defined all required dependencies for the making the package works (**actual dependencies**).

## Useful Scripts
### Project Versioning
For version update in `pyproject.toml`.
This project use package [`xh-py-project-versioning`](https://github.com/xh-dev/xh-py-project-versioning) to manipulate the project version.

Simple usage includes:\
Base on current version, update the patch number with dev id
`python -m xh_py_project_versioning --patch` \
In case current version is `0.0.1`, the updated version will be `0.0.2-dev+000` 

To prompt the dev version to official version use command.
`python -m xh_py_project_versioning -r`.
Through the command, version `0.0.2-dev+000` will be prompt to `0.0.2` official versioning.

Base on current version, update the patch number directly
`python -m xh_py_project_versioning --patch -d` \
In case current version is `0.0.1`, the updated version will be `0.0.2` 

Base on current version, update the minor number directly
`python -m xh_py_project_versioning --minor -d` \
In case current version is `0.0.1`, the updated version will be `0.1.0` 

Base on current version, update the minor number directly
`python -m xh_py_project_versioning --minor -d` \
In case current version is `0.0.1`, the updated version will be `1.0.0`