semvec/pypi-packages huggingface dataset:
universal-cuda-tools 0.8.0
Comprehensive device management for PyTorch & TensorFlow & Universal
License: MIT
Requires Python: >=3.7

# universal-cuda-tools

Universal device management for Python, PyTorch, TensorFlow and NumPy. Supports automatic device selection, mixed precision, retry, timeout, telemetry, checkpointing, and full GPU acceleration even for pure Python math via CuPy.

Provides decorators and context managers for:
- Automatic device selection
- Mixed precision (AMP)
- Memory profiling
- Timeout watchdog
- Telemetry
- TPU & Distributed (experimental)

## Installation
```bash
pip install universal-cuda-tools
```
# Example Usage
## Simple Decorator
```python
from cuda_tools import cuda

@cuda(device='cuda:0', use_amp=True)
def infer(model, x):
    return model(x)
```
## Advanced decorator
```python
from cuda_tools import cuda

@cuda.advanced(auto_benchmark=True, use_amp=True, retry=2, timeout=300)
def train_step(model, x, y):
    # training logic
    loss = model(x).mean()
    return loss
```
## Context manager
```python
from cuda_tools.context import DeviceContext

with DeviceContext(device='cuda:0', use_amp=True):
    output = model(input)
``` 
## Universal Python Code on CUDA

If you want *any* pure-Python or NumPy-based math to run on GPU, use `auto_tensorize=True`:

```python
from cuda_tools import cuda

@cuda(auto_tensorize=True, device='cuda:0')
def pure_python_math(x, y):
    # x,y can be int, float, list or numpy array
    import numpy as np
    a = np.array(x) * np.array(y)
    return np.sin(a) + 5

print(pure_python_math([1,2,3], 10))
```
_Or with context manager:_
```python
from cuda_tools.context import DeviceContext

with DeviceContext(device='cuda:0', universal=True):
    import numpy as np
    result = np.linspace(0,5,1000)**2  # will be computed with CuPy under the hood
```
*src/universal_cuda_tools/decorators.py*:Simple and advanced decorators for device management.
*src/universal_cuda_tools/context.py*: Context manager for device and precision setup/teardown.
*src/universal_cuda_tools/utils.py*: Utility functions for device management.
huawuque-cryptool 0.2.2
一个具有GUI界面的加密工具，支持AES、RSA和混合加密
License: MIT
Requires Python: >=3.8
Keywords: encryption, cryptography, security, gui, aes, rsa

# huawuque-cryptool

一个具有图形界面的加密工具，支持多种加密算法。

> **注意：PyPI 包名为 `huawuque-cryptool`，导入时仍然使用 `cryptool` 作为模块名。**

## 功能特点

- 支持 AES、RSA 和混合加密
- 直观的图形用户界面
- 文件加密和解密
- Base64 编码/解码
- 密钥管理系统
- 详细的操作日志
- 支持密钥轮换
- 安全的密钥存储

## 安装

```bash
pip install huawuque-cryptool==0.2.1
```

## 使用方法

1. 命令行启动：
```bash
cryptool
```

2. 或在 Python 中导入：
```python
from cryptool.gui.main import main
main()
```

## 环境要求

- Python 3.8 或更高版本
- 操作系统：Windows/Linux/macOS

## 配置

1. 创建 `.env` 文件，包含以下配置：
```
DB_HOST=localhost
DB_PORT=3306
DB_USER=your_username
DB_PASSWORD=your_password
DB_NAME=crypto_keystore
MASTER_KEY=your_master_key
```

2. 确保 `logs` 目录存在并可写

## 开发

1. 克隆仓库：
```bash
git clone https://github.com/hwq/cryptool.git
```

2. 安装依赖：
```bash
pip install -r requirements.txt
```

3. 运行测试：
```bash
pytest
```

## 更新日志

### v0.2.0
- 包名正式更名为 huawuque-cryptool
- 适配 PyPI 上传规范
- 更新Python版本要求到3.8+
- 添加密钥轮换功能
- 改进密钥存储安全性
- 优化GUI界面
- 增加更多测试用例

## 许可证

MIT License