semvec/pypi-packages huggingface dataset:
nonebot-plugin-mcmod 1.3.7b4
通过 https://www.mcmod.cn 获取模组、整合包、教程等信息。
License: MIT
Requires Python: <4.0,>=3.9

<h1 align="center"> nonebot-plugin-mcmod </h1>

<p align="center">
  <a href="https://github.com/chrysoljq/nonebot-plugin-mcmod">
    <img src="https://img.shields.io/github/license/chrysoljq/nonebot-plugin-mcmod" alt="LICENSE">
  </a>
  <a href="https://pypi.python.org/pypi/nonebot_plugin_mcmod">
    <img src="https://img.shields.io/pypi/v/nonebot_plugin_mcmod" alt="PyPI">
  </a>
  <img src="https://img.shields.io/badge/python-3.9+-blue.svg" alt="Python">
  <a href="https://github.com/nonebot/nonebot2">
    <img src="https://img.shields.io/badge/nonebot2-2.3.0+-red" alt="NoneBot">
  </a>
</p>

<p align="center">
  基于 NoneBot2 的 模组百科 (MCMOD) 查询插件
</p>

## 📖 介绍

一个简单的 NoneBot2 插件，用于在 https://www.mcmod.cn (我的世界百科) 搜索模组、整合包、教程和资料等信息。

通过指令在 QQ 群从查询 Minecraft 中文模组百科相关内容。以转发消息的形式展示搜索信息，目前支持搜索、标题、正文文本和图片内容获取。

![示例](img/image.png)

## 💿 安装
**使用 git:**
```bash
git clone https://github.com/chrysoljq/nonebot-plugin-mcmod
```
然后将 `nonebot-plugin-mcmod/nonebot_plugin_mcmod` 复制到你的插件目录下。

**使用 pip:**

```bash
pip install nonebot_plugin_mcmod
```

**使用 nb-cli:**

```bash
nb plugin install nonebot_plugin_mcmod
```

安装后，请在你的 `bot.py` 或 `pyproject.toml` 中加载插件：

```python
# bot.py
nonebot.load_plugin("nonebot_plugin_mcmod")
```

```toml
# pyproject.toml
[tool.nonebot]
plugins = ["nonebot_plugin_mcmod"]
```

## 🚀 使用

**指令格式:**

```
#百科[分类] <关键词> [序号]
```
若无序号，则会等待用户下一次数字输入

**参数说明:**

  * `[分类]`: 可选参数，用于指定搜索范围。可选值为 `整合包`, `模组`, `教程`, `资料`。如果省略，则在所有分类中搜索。
  * `<关键词>`: 必填参数，你要搜索的内容。可以包含空格。
  * `[序号]`: 可选参数，当搜索结果多于一个时，可以通过序号选择查看特定结果的详细信息（序号从 1 开始）。

**示例:**

  * `#百科模组 工业` - 搜索分类为“模组”，关键词为“工业”的内容。
  * `#百科整合包 石头世界` - 搜索分类为“整合包”，关键词为“石头世界”的内容。
  * `#百科 巫妖 恐怖生物` - 在所有分类中搜索关键词为“巫妖 恐怖生物”的内容。
  * `#百科 暮色森林 2` - 查看“暮色森林”搜索结果中的第 2 条详细信息。

## 📝 TODO

  * [x] 获取整合包/模组支持的 Minecraft 版本信息。
  * [x] 完善搜索结果中的图片爬取与展示。
  * [ ] 增加配置项，例如结果数量限制等。
  * [ ] 为对话流程添加超时机制
  * [ ] 控制消息长度

## 🙏 致谢

  * [mcmod.cn](https://www.mcmod.cn/) - 提供数据来源。
  * [nonebot2](https://github.com/nonebot/nonebot2) - 插件开发框架。
  * [Gemini](https://gemini.google.com/app) - 代码助手，大大加快开发流程。
  * [limbang/mirai-console-mcmod-plugin](https://github.com/limbang/mirai-console-mcmod-plugin) - 提供灵感来源。

## 📄 开源许可

本项目使用 [MIT License](https://www.google.com/search?q=LICENSE) 开源。
Purity-Threshold-Pruning 0.1.0
A pruning algorithm for the scikit-learn RandomForestClassifier which minimizes model complexity while considering a user-specified tolerance for accuracy loss.
License: MIT
Requires Python: >=3.6

# Purity-Threshold-Pruning

## About
Purity Threshold Pruning is a bagging‑based tree‑ensemble pruning algorithm for scikit‑learn’s RandomForestClassifier that minimizes model complexity under a user‑specified accuracy‑loss tolerance.

The main advantages are:
 - Explicitly consider node purity (i.e., class distribution), preventing the pruning of low purity nodes that may cause catastrophic accuracy degradation.
 - Iteratively search for the minimum purity threshold that satisfies the tolerance, resulting in the smallest possible model that satisfies the desired performance.
 - Systematical pruning prevents the model from overgrowing or being over-pruned.

## Installation

### From PyPI (recommended)
```
pip install purity-threshold-pruning
```

### From GitHub
```
git clone https://github.com/Datou0718/Purity-Threshold-Pruning
cd Purity-Threshold-Pruning
pip install .
```

## Quick Start

```
from PurityThresholdPruning import PurityThresholdPruning
from sklearn.ensemble import RandomForestClassifier

# train a Random Forest
rf = RandomForestClassifier(...)
rf.fit(X_train, y_train)

# Pruned the model with 5% tolerable accuracy loss
tolerance = 0.05 
rf = PurityThresholdPruning(rf, tolerance, X_train, y_train)
```

## API
```PurityThresholdPruning(forest, tolerance, X_train, y_train)```
- forest: a fitted `RandomForestClassifier` with `oob_score=True`.
- tolerance: Maximum tolerable accuracy drop in OOB estimation (e.g., `0.05` for 5%).
- X, y: Training data (np.ndarray) used to compute OOB score.
Returns the `RandomForestClassifier` pruned with the minimum purity threshold.
probctrl 0.1.2
A lightweight Python decorator toolkit for probabilistic, delayed, and throttled execution.
License: MIT
Requires Python: >=3.6


# probctrl

`probctrl` 是一个轻量的 Python 装饰器库，支持三种函数执行控制方式：

- `@p(prob)`：按概率触发函数
- `@delay(seconds)`：延迟指定秒数后异步执行
- `@throttle(rate)`：限制函数每秒最大调用频率，超过频率后将自动延迟执行

## 安装

```bash
pip install probctrl
```

## 示例

```python
from probctrl import p, delay, throttle

@p(0.5)
def maybe_func():
    print("有 50% 的概率会执行")

@delay(2)
def delayed_func():
    print("这个函数会延迟 2 秒异步执行")

@throttle(3)
def throttled_func():
    print("受节流控制的函数")
```
codedepth 3.0.0
Generates scores for how many layers of local imports/exports are in a file
License: MIT
Keywords: abstraction, level, directory, abstract, imports, import

# codedepth

###### Generates and graphs how many levels of imports are needed for each file in a project

##### Supported Languages
- Python 🟢
- Lua 🟢
- JavaScript 🟡 (Some styles of import statement may not be detected as a dependency)

## Dependencies

You will need Graphviz v2.48.0 installed as an application - installation instructions can be found at https://graphviz.org/download/

## Quickstart

From the command line (this will use default parameters and output a ranked directional graph as a PDF):

```
> python -m codedepth <path of the target directory>
```
The PDF will be generated in the working directory.
If `<path of the target directory>` is omitted, the working directory will be used as the target.

In a python script:

```python
from codedepth import Scorer

scorer = Scorer(r"<path of the target directory>")  # Replace this path string with your own

# Calculates scores for all files in the target directory
scorer.parse_all()

"""
Generates a PDF saved in the working directory,
containing a ranked directional graph of the file dependencies for the target directory.
Once this is generated, it will be opened automatically.
Also generates and saves a file containing the DOT code required to create the graph
"""
scorer.plot_ranked()
```