semvec/pypi-packages huggingface dataset:
bigmathex 0.0.3
A small, easy-to-use wrapper around Python's Decimal with configurable precision and rounding.
License: MIT
Requires Python: >=3.7

# bigmathex — Arbitrary-Precision Decimal Numbers for Python

`bigmathex` is a tiny wrapper around Python’s built-in [`decimal.Decimal`](https://docs.python.org/3/library/decimal.html) type.

It gives you:

- Easy, consistent handling of **big numbers** (money, crypto, prices, etc.)
- **Configurable precision** (`DP`) and **rounding mode** (`RM`)

Perfect when `float` is too imprecise and you want something safer but still easy to use.

---

## Features

- ✅ Arbitrary-precision decimal arithmetic  
- ✅ Global defaults for decimal places (`DP`) and rounding mode (`RM`)  
- ✅ Minimal, focused API  
- ✅ Works with `str`, `int`, `float`, `Decimal`, and `Big` values  

---

## Installation

If you’ve published this as a package:

```bash
pip install bigmathex
```

## Quick Start

```python
from bigmathex import Big

# Basic construction
a = Big("0.1")
b = Big("0.2")

# Addition
c = a + b
print(c)           # -> 0.3

# Or using methods, if you added them:
# c = a.add(b)

# Multiplication
d = Big("1.23") * Big("4")
print(d)           # -> 4.92
```

Because Big uses Decimal under the hood, you don’t get the usual floating-point surprises:

```python
from bigmathex import Big

print(0.1 + 0.2)        # 0.30000000000000004 (float)
print(Big("0.1") + Big("0.2"))  # 0.3 (Big)
```

## Configuration

`Big` exposes two important global settings:

```python
from bigmathex import Big

# Maximum decimal places for division, sqrt, etc.
Big.DP = 20    # default: 20

# Rounding mode (like big.js)
# 0: ROUND_DOWN
# 1: ROUND_HALF_UP      (default)
# 2: ROUND_HALF_EVEN
# 3: ROUND_UP
Big.RM = 1
```

Internally, these map to decimal’s rounding modes via _ROUND_MAP.

You can also use decimal.localcontext() for temporary precision overrides inside your own code, but for most use cases, setting Big.DP and Big.RM is enough.

## Creating Big Numbers

```python
from bigmathex import Big
from decimal import Decimal

Big("1.2345")         # from string
Big(12345)            # from int
Big(1.2345)           # from float (not recommended for exact finance values)
Big(Decimal("1.2345"))# from Decimal
Big(Big("1.2345"))    # from another Big
```

Under the hood, the constructor converts the value to a Decimal and stores it as self._d.

## Arithmetic

The exact API here depends on how you implemented `Big`.

Below is a typical pattern using operator overloading.

### Addition

```python
x = Big("1.1")
y = Big("2.2")
print(x + y)      # -> 3.3
```

### Subtraction

```python
x = Big("5")
y = Big("2.5")
print(x - y)      # -> 2.5
```

### Multiplication

```python
x = Big("1.5")
y = Big("3")
print(x * y)      # -> 4.5
```

### Division

Division respects Big.DP and Big.RM:

```python
from bigmathex import Big

Big.DP = 10
Big.RM = 1  # ROUND_HALF_UP

x = Big("1")
y = Big("3")

print(x / y)  # -> 0.3333333333  (10 decimal places)
```

## License

MIT License

Copyright (c) 2025 Matt Henry
transpdf 0.1.2
Translate PDFs to any language by also preserving layout and quality.
License: MIT
Requires Python: >=3.8

# TransPDF

Translate PDFs to any language using TransPDF — with one command.


## Requirements
- **Python 3.8+**
- **Node.js 18+** ([Download](https://nodejs.org))

## Install
```bash
pip install transpdf
nonebot-plugin-word-censor 0.3.1
一个用于拦截 Bot 发送包含敏感词或正则匹配内容的消息审查插件
License: MIT
Requires Python: <4.0,>=3.8
Keywords: nonebot, nonebot2, plugin, censor, filter

<!-- markdownlint-disable MD033 MD036 MD041 -->

<p align="center">
  <a href="https://v2.nonebot.dev/"><img src="https://v2.nonebot.dev/logo.png" width="200" height="200" alt="nonebot"></a>
</p>

<div align="center">

# nonebot-plugin-word-censor

_✨ 基于 NoneBot2 的词汇与正则消息审查拦截插件 ✨_

<a href="https://raw.githubusercontent.com/ChlorophyTeio/nonebot-plugin-word-censor/refs/heads/main/LICENSE">
    <img src="https://img.shields.io/github/license/he0119/nonebot-plugin-treehelp.svg" alt="license">
</a>
<a href="https://pypi.python.org/pypi/nonebot-plugin-word-censor">
    <img src="https://img.shields.io/pypi/v/nonebot-plugin-word-censor.svg" alt="pypi">
</a>
<img src="https://img.shields.io/badge/python-3.8+-blue.svg" alt="python">

</div>

## 📖 介绍

`nonebot-plugin-word-censor` 是一个用于审查 NoneBot2 机器人**发送内容**的插件。

它可以防止机器人因为意外触发某些关键词或匹配到特定正则表达式而发送不当消息。支持通过指令实时动态管理黑名单的功能。

## 💿 安装

<details open>
<summary>使用 nb-cli 安装（推荐）</summary>
<pre><code>nb plugin install nonebot-plugin-word-censor</code></pre>
</details>

<details>
<summary>使用 pip 安装</summary>
<pre><code>pip install nonebot-plugin-word-censor</code></pre>
</details>

## ⚙️ 配置

插件使用 `nonebot-plugin-localstore` 管理数据文件。
文件存储位置会根据操作系统不同而变化，您可以通过以下方式查看：
1. 查看插件启动日志。
2. 发送指令 `word blacklist list` 查看当前文件路径。

在 NoneBot2 项目的 `.env` 文件中添加以下配置（可选）：

```dev
SUPERUSERS = ["2428451170"]    # 管理员
SEND_WORD_PRIORITY = 100    # 优先级，没啥用
```

## 🎮 使用方法

**⚠️ 注意**：以下指令仅 **SUPERUSER** (超级用户) 可用。

### 1. 基础指令 (普通词汇)

| 指令         | 格式                        | 说明                 |
| **添加词汇** | `word blacklist add <内容>` | 将指定内容加入黑名单 |
| **删除词汇** | `word blacklist del <内容>` | 将指定内容移出黑名单 |

### 2. 高级指令 (正则表达式)

支持 Python `re` 模块的语法。

| 指令         | 格式                                | 示例                                |
| **添加正则** | `word blacklist add regex <表达式>` | `... add regex \d{11}` (拦截手机号) |
| **删除正则** | `word blacklist del regex <表达式>` | `... del regex \d{11}`              |

### 3. 其他指令

* **查看列表**：`word blacklist list`
  * 查看当前生效的所有规则（普通词汇会脱敏显示）。
* **刷新配置**：`word blacklist refresh`
  * 如果你手动修改了 JSON 文件，可使用此指令热重载。
* **帮助**：`word blacklist help`

---

<div align="center">
  <p>本项目使用 <a href="./LICENSE">MIT 许可证</a> 开源</p>
</div>