semvec/pypi-packages huggingface dataset:
code-runner-sdk 0.1.1
Code Runner Sandbox服务的Python SDK
Requires Python: >=3.7

# Code Runner Python SDK

Code Runner服务的Python SDK，提供简单易用的API接口来执行代码和运行测试。

## 安装

```bash
pip install code-runner-sdk
```

## 快速开始

### 初始化客户端

```python
from code_runner_sdk import CodeRunnerClient, ProgrammingLanguage

# 创建客户端实例
client = CodeRunnerClient(
    host="localhost",
    port=8000,
    protocol="http",
    api_key="your-api-key"  # 可选
)
```

### 直接运行代码

```python
# 运行Python代码
result = client.run_code(
    code='print("Hello, World!")',
    language=ProgrammingLanguage.PYTHON
)

print(f"输出: {result['output']}")
print(f"执行时间: {result['execution_time']}ms")
print(f"内存使用: {result['memory_usage']}KB")
```

### 执行代码并运行测试

```python
from code_runner_sdk import TestCase

# 定义测试用例
test_cases = [
    TestCase(
        input={"a": 1, "b": 2},
        expected_output=3,
        description="1 + 2 = 3"
    ),
    TestCase(
        input={"a": -1, "b": 1},
        expected_output=0,
        description="-1 + 1 = 0"
    )
]

# 执行代码和测试
code = """
def add(a, b):
    return a + b
"""

response = client.execute_code(
    code=code,
    language=ProgrammingLanguage.PYTHON,
    test_cases=test_cases
)

print(f"状态: {response.status}")
print(f"通过测试: {response.passed_tests}/{response.total_tests}")
print(f"执行时间: {response.execution_time}ms")
print(f"内存使用: {response.memory_usage}KB")

# 查看详细测试结果
for result in response.test_results:
    print(f"\n测试用例 {result.test_case}:")
    print(f"输入: {result.input}")
    print(f"预期输出: {result.expected_output}")
    print(f"实际输出: {result.actual_output}")
    print(f"通过: {'是' if result.passed else '否'}")
    if result.error:
        print(f"错误: {result.error}")
```

## 支持的编程语言

- Python
- JavaScript
- Java
- Kotlin
- C++
- Go
- Rust
- Bash
- Objective-C
- Swift

## 异常处理

```python
from code_runner_sdk.exceptions import (
    APIError,
    ValidationError,
    ConfigurationError,
    TimeoutError
)

try:
    result = client.run_code(
        code='print("Hello, World!")',
        language=ProgrammingLanguage.PYTHON
    )
except ValidationError as e:
    print(f"验证错误: {e}")
except APIError as e:
    print(f"API错误: {e}")
    print(f"状态码: {e.status_code}")
    print(f"响应: {e.response}")
except TimeoutError as e:
    print(f"超时错误: {e}")
except ConfigurationError as e:
    print(f"配置错误: {e}")
```

## 配置选项

- `host`: API服务器主机地址（默认：localhost）
- `port`: API服务器端口（默认：8000）
- `protocol`: 协议（http/https，默认：http）
- `api_key`: API密钥（可选）
- `timeout`: 请求超时时间（秒，默认：30）

## 开发

1. 克隆仓库：
```bash
git clone https://github.com/yourusername/code-runner-sdk.git
cd code-runner-sdk
```

2. 安装依赖：
```bash
pip install -r requirements.txt
```

3. 运行测试：
```bash
python -m pytest tests/
```

## 许可证

MIT License
code-runner-sandbox-sdk 0.1.1
Code Runner Sandbox服务的Python SDK
Requires Python: >=3.7

# Code Runner Python SDK

Code Runner服务的Python SDK，提供简单易用的API接口来执行代码和运行测试。

## 安装

```bash
pip install code-runner-sdk
```

## 快速开始

### 初始化客户端

```python
from code_runner_sdk import CodeRunnerClient, ProgrammingLanguage

# 创建客户端实例
client = CodeRunnerClient(
    host="localhost",
    port=8000,
    protocol="http",
    api_key="your-api-key"  # 可选
)
```

### 直接运行代码

```python
# 运行Python代码
result = client.run_code(
    code='print("Hello, World!")',
    language=ProgrammingLanguage.PYTHON
)

print(f"输出: {result['output']}")
print(f"执行时间: {result['execution_time']}ms")
print(f"内存使用: {result['memory_usage']}KB")
```

### 执行代码并运行测试

```python
from code_runner_sdk import TestCase

# 定义测试用例
test_cases = [
    TestCase(
        input={"a": 1, "b": 2},
        expected_output=3,
        description="1 + 2 = 3"
    ),
    TestCase(
        input={"a": -1, "b": 1},
        expected_output=0,
        description="-1 + 1 = 0"
    )
]

# 执行代码和测试
code = """
def add(a, b):
    return a + b
"""

response = client.execute_code(
    code=code,
    language=ProgrammingLanguage.PYTHON,
    test_cases=test_cases
)

print(f"状态: {response.status}")
print(f"通过测试: {response.passed_tests}/{response.total_tests}")
print(f"执行时间: {response.execution_time}ms")
print(f"内存使用: {response.memory_usage}KB")

# 查看详细测试结果
for result in response.test_results:
    print(f"\n测试用例 {result.test_case}:")
    print(f"输入: {result.input}")
    print(f"预期输出: {result.expected_output}")
    print(f"实际输出: {result.actual_output}")
    print(f"通过: {'是' if result.passed else '否'}")
    if result.error:
        print(f"错误: {result.error}")
```

## 支持的编程语言

- Python
- JavaScript
- Java
- Kotlin
- C++
- Go
- Rust
- Bash
- Objective-C
- Swift

## 异常处理

```python
from code_runner_sdk.exceptions import (
    APIError,
    ValidationError,
    ConfigurationError,
    TimeoutError
)

try:
    result = client.run_code(
        code='print("Hello, World!")',
        language=ProgrammingLanguage.PYTHON
    )
except ValidationError as e:
    print(f"验证错误: {e}")
except APIError as e:
    print(f"API错误: {e}")
    print(f"状态码: {e.status_code}")
    print(f"响应: {e.response}")
except TimeoutError as e:
    print(f"超时错误: {e}")
except ConfigurationError as e:
    print(f"配置错误: {e}")
```

## 配置选项

- `host`: API服务器主机地址（默认：localhost）
- `port`: API服务器端口（默认：8000）
- `protocol`: 协议（http/https，默认：http）
- `api_key`: API密钥（可选）
- `timeout`: 请求超时时间（秒，默认：30）

## 开发

1. 克隆仓库：
```bash
git clone https://github.com/yourusername/code-runner-sdk.git
cd code-runner-sdk
```

2. 安装依赖：
```bash
pip install -r requirements.txt
```

3. 运行测试：
```bash
python -m pytest tests/
```

## 许可证

MIT License
tripo 0.2.1
Tripo Python Client
Requires Python: >=3.11

# Tripo Python Client
[![PyPI version](https://badge.fury.io/py/tripo.svg)](https://badge.fury.io/py/tripo)

This is a Python client for the [Tripo API](https://platform.tripo3d.ai/docs/introduction).

## Installation

```bash
pip install tripo
```

```bash
export TRIPO_API_KEY="your_api_key"
```

## Usage

This first example is to get the balance.

```python
from tripo import Client

with Client() as client:
    balance = client.get_balance()
    print(f"Balance: {balance.balance}, Frozen: {balance.frozen}")
```

This example is to generate a model from text.

```python
import time
from tripo import Client

# Initialize the client
with Client() as client:
    # Create a task to generate a model from text
    success_task = client.text_to_model(
        prompt="A 3D model of a futuristic car",
        model_version="v2.0-20240919",
        texture=True,
        pbr=True
    )
    print(f"Created task with ID: {success_task.task_id}")

    # Get 3d model
    print("Waiting for the model to be ready...")
    while True:
        data = client.try_download_model(success_task.task_id)
        if data is not None:
            data.save("model.glb")
            break
        time.sleep(1)
```

This is the 3D model generated by the previous example.

![3D Model](assets/model.png)

The next example is to generate a model from an image.

```python
import time
from tripo import Client

# Initialize the client
with Client() as client:
    # Upload a file
    file_token = client.upload_file('path/to/your/image.jpg')
    # Or upload a byte array
    # byte_image = open('path/to/your/image.jpg', "rb").read()
    # file_token = client.upload_file(byte_image)
    print(f"Uploaded file token: {file_token.file_token}")

    # Create a task to generate a model from an image
    success_task = client.image_to_model(
        file_token=file_token,
        model_version='v1.4-20240625',
        texture=True,
        pbr=True
    )
    print(f"Created task with ID: {success_task.task_id}")

    # Get 3d model
    print("Waiting for the model to be ready...")
    while True:
        data = client.try_download_model(success_task.task_id)
        if data is not None:
            data.save("model.glb")
            break
        time.sleep(1)
```
jserpy 0.1.3
A Python library for serializing and deserializing complex objects to and from JSON
Requires Python: >=3.10

# JSerPy

JSerPy is a Python library for serializing and deserializing complex objects to and from JSON. It provides robust support for handling various Python types including dataclasses, enums, numpy arrays, and custom objects.

## Installation

You can install the package directly from GitHub:

```bash
pip install git+https://github.com/ronpik/jserpy.git
```

## Usage

Here's a simple example of how to use JSerPy:

```python
from dataclasses import dataclass
from jserpy import serialize_json, deserialize_json

@dataclass
class Person:
    name: str
    age: int

# Create an instance
person = Person(name="John", age=30)

# Serialize to JSON
json_str = serialize_json(person)

# Deserialize back to object
restored_person = deserialize_json(json_str, Person)

assert person == restored_person
```

## Features

- Supports serialization of complex Python objects
- Handles dataclasses, enums, numpy arrays, and custom objects
- Type-safe deserialization
- Customizable serialization behavior

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the LICENSE file for details.
pyclimonitor 1.1
PyCliMonitor: A python command line tool that monitoring current system's CPU, GPU, RAM, SSD and Networks.

# PyCliMonitor
A python command line tool that monitoring current system's CPU, GPU, RAM, SSD and Networks.

# PyCliMonitor - System Resource Monitor for Command Line

PyCliMonitor is a powerful command-line tool for monitoring your system's resources in real-time, including CPU, GPU, RAM, disk usage, and network activity. It provides a clean, colorful interface directly in your terminal.

## Features

- Real-time monitoring of:
  - CPU usage (per core) with frequency information
  - GPU usage, memory, and temperature
  - Memory and swap usage
  - Disk usage and I/O activity
  - Network interface activity with upload/download speeds
- Multi-language support (English and Chinese)
- Color-coded display based on resource usage levels
- Clean, non-flickering interface using ANSI escape sequences

## Installation

### Option 1: Install via pip

```bash
pip install pyclimonitor
```

### Option 2: Clone the repository

```bash
git clone https://github.com/EasyCam/PyCliMonitor.git
cd PyCliMonitor
pip install -e .  # Install in development mode
```

## Usage

After installation, you can run PyCliMonitor directly from the command line:

### English Interface (default)

```bash
python -m pyclimonitor
```

### Chinese Interface

```bash
python -m pyclimonitor cn
```

You can also run it directly from Python:

```python
from pyclimonitor import monitor

# For English interface
monitor("en")

# For Chinese interface
monitor("cn")
```

## Requirements

PyCliMonitor automatically installs its dependencies, which include:
- psutil
- GPUtil
- tabulate

## Controls

- Press `Ctrl+C` to exit the monitor

## Screenshots

### English Interface
![English Interface](./images/en.png)

### Chinese Interface
![Chinese Interface](./images/cn.png)

## License

GNU General Public License v3.0 (GPLv3)