semvec/pypi-packages huggingface dataset:
ffpp 0.0.15
A simple way to connect and interact with your 3D printer.
Requires Python: >=3.8

# FlashForge 3D Printer Protocol

Async python protocol for flashforge printers.
A simple way to connect and interact with your 3D printer.

Tested on FlashForge Adventure 4, most likly to be working with other FlashForge printers.

## How to use
```
from ffpp.Printer import Printer
myPrinter = Printer('192.168.0.1', 8899) # Change to the ip of your printer.
await myPrinter.connect()

print(f"{myPrinter.machine_type} is {myPrinter.machine_status}")
```
Check out example to learn more.

## Important note
You need to call the `update()` to get the current status, temperature and print percent from printer.
```
await myPrinter.update()
print(myPrinter.print_percent)
await myPrinter.update()
print(myPrinter.print_percent)
```

## Information from 3D printer
This is the information collected from the printer.
- myPrinter.machine_type
- myPrinter.machine_name
- myPrinter.firmware
- myPrinter.machine_SN
- myPrinter.maxX
- myPrinter.maxY
- myPrinter.maxZ
- myPrinter.extruder_count
- myPrinter.mac_address
- myPrinter.machine_status
- myPrinter.move_mode
- myPrinter.status
- myPrinter.led
- myPrinter.current_file
- myPrinter.print_percent

## To get some temperature you need to get right tool. 
Run this line to return the extruder tool:
```
extruder = myPrinter.extruder_tools.get()
# or by index
extruder2 = myPrinter.extruder_tools.get(1)
```
You can do the same for your bed in myPrinter.bed_tools

Then you can do:
```
extruder.now # Current temperature.
extruder.target # Target temperature.
```
python-glass 0.1.64
OpenGL wrapper for Glass-Engine
Requires Python: >=3.7

# Glass -- 为 Glass Engine 提供 OpenGL 易用封装

**Glass** 为 **Glass Engine** 的子项目，为 OpenGL Assistant 的缩写。
OpenGL 函数的底层接口的设计为了跨平台，牺牲了易用性。
为了使 OpenGL 的调用对 Python 用户更友好，封装了 **Glass** 库。
该库简化了大量 OpenGL 概念以及函数调用方法，几项重点简化包括：

* 支持从文件编译 Shader，支持在 Shader 中使用 ``include``，并将报错行号指向真实的 include 文件；
* ShaderProgram 自动采用增量编译策略，仅当文件和依赖改变时重新编译；
* 设置 Uniform/Uniform Block/Shader Storage Block 变量时，Python 对象可直接赋值给 Shader 中的对应结构变量；
* 提供 Vertices/Indices 类对顶点和索引进行管理，用户无需接触 VBO/VAO/EBO 等直接操作显存的概念；
* 变化的顶点和索引采用增量拷贝算法同步到显存，提高拷贝效率。

下面是一段不完整的代码展示了 glass 操作 OpenGL 的方法：

```python
from glass import *

# 在一个合法的 OpenGL 上下文中：

# 创建 shader 程序
program = ShaderProgram()
program.compile("path/to/vertex_shader.vs")
program.compile("path/to/fragment_shader.fs")
# 上述两个 compile 并不会每次运行都编译，仅首次以及 Shader 文件修改后才编译
# shader 文件中可含有 #include 语法

# 将 Python 变量 pyvar 直接赋值给 Shader 端的 Uniform 结构体变量 uniform_var
# 只要 Python 变量中含有对应的属性
program["uniform_var"] = pyvar

# 纹理 uniform 变量可用如下方法赋值
# 对用户隐藏纹理单元概念
program["sampler_var"] = sampler2D("path/to/image.png")

# 创建顶点数组
vertices = Vertices() # 像 list 一样操作 vertices，只不过元素只能为 Vertex 类型

# 添加顶点
vertices.append(Vertex(position=glm.vec2(-0.5,-0.5), color=glm.vec3(1,0,0)))
vertices.append(Vertex(position=glm.vec2(0.5,-0.5), color=glm.vec3(0,1,0)))
vertices.append(Vertex(position=glm.vec2(0,0.5), color=glm.vec3(0,0,1)))
# 构建顶点 Vertex 时，属性名可为任意值
# 只要在 vertex shader 中的 layout 指定了该属性名并且类型匹配

# 创建索引数组
indices = Indices() # 像 list 一样操作 indices，只不过元素只能为 glm.uvec3 类型
indices.append(glm.uvec3(0, 1, 2))

# 绘制三角形
program.draw_triangles(vertices=vertices, indices=indices)

# vertices 和 indices 可在任意时刻动态修改内部元素，以及动态增加删除元素
# 所有修改将在下次绘制时同步到显存
```

你可以在任意需要使用 OpenGL 的地方使用 **Glass**，
但其初衷是为 **Glass Engine** 提供 OpenGL 的封装，因此不过多介绍 **Glass** 的用法，欢迎访问 **Glass Engine** 项目：

* [文档](https://glass-engine-doc.readthedocs.io/zh/latest/)
* [Github 项目主页](https://github.com/Time-Coder/Glass-Engine)
* [Gitee 项目主页](https://gitee.com/time-coder/Glass-Engine)
* [PyPI 索引](https://pypi.org/project/glass-engine/)
assimpy 5.4.3.3
3D model loader for Glass-Engine
Requires Python: >=3.7

# Assimpy -- 为 Glass Engine 提供 3D 模型加载功能

**Assimpy** 为 **Glass Engine** 的子项目，是 Assimp 项目的 Python 绑定，为 Glass Engine 提供 3D 模型加载功能。
仅提供 ``load(file_name:str, flags:int)->Model`` 函数用于加载模型。其优势在于：

* 使用 assimp 加载模型后，不做任何的中间类型拷贝，直接将原生内存 buffer 暴露给 python
* 支持内置纹理加载

你可以在任意需要加载 3D 模型的时候使用 **Assimpy**，并在其源码中找见加载上来的模型结构，
但不建议你这么做。因为其初衷是为 **Glass Engine** 提供 3D 模型的加载功能，
因此不过多介绍 **Assimpy** 的用法，欢迎访问 **Glass Engine** 项目：

* 文档：<https://glass-engine-doc.readthedocs.io/zh/latest/>
* Github 项目主页：<https://github.com/Time-Coder/Glass-Engine>
* Gitee 项目主页：<https://gitee.com/time-coder/Glass-Engine>
* PyPI 索引：<https://pypi.org/project/glass-engine/>

**Glass Engine** 中的模型加载功能用法请参考：

<https://glass-engine-doc.readthedocs.io/zh/latest/model/model.html>
tunnelmate 1.1.0
Full-featured SSH tunnel & Cloudflare DNS management library and CLI
Requires Python: >=3.7

# tunnelmate

🚀 **A robust SSH tunnel and automatic Cloudflare DNS management library & CLI**

Easily create, manage, and auto-reconnect SSH tunnels—with automatic SSH key generation and seamless Cloudflare CNAME linking. Use as a Python library or a lightning-fast CLI tool.

---

## Installation

```bash
pip install .
```

---

## CLI Usage

```bash
tunnelmate \
  --tunnel localhost:3000:my-app.example.com \
  --cf-zone-id <ZONE_ID> \
  --cf-api-token <API_TOKEN>
```
The tool will generate an SSH key if not already present and prints the public key to add to your destination server.

---

## Library Usage

```python
from tunnelmate.core import SSHTunnel

tunnels = [
    {"local_host": "localhost", "local_port": 3000, "subdomain": "my-app.example.com"},
]

t = SSHTunnel(
    tunnels=tunnels,
    key_path="/root/.ssh/id_ed25519"
)
t.run_tunnel()
```

---

## Features

- Autogenerates SSH keys if not found, and prints your public key.
- Automatic reconnection if the tunnel closes.
- Accepts all configuration—ports, hosts, Cloudflare API and DNS details—from CLI, environment, or YAML.
- Live logs and easy-to-use interface for managing as many tunnels as you want.
- CLI and Python API both supported.
- Clean, maintainable code—ready to extend or integrate.

---

## Cloudflare CNAME Update Example (Python):

```python
from tunnelmate.cloudflare import update_cname

resp = update_cname(
    zone_id="yourZoneId",
    api_token="yourToken",
    subdomain="my-app.example.com",
    content="target.example.com"
)
print(resp)
```

---

## Folder structure

```
ssh_tunneler/
  core.py         # Tunnel and key handling core logic
  cli.py          # Command-line interface (entrypoint)
  config.py       # Loading config from yaml/env
  cloudflare.py   # Cloudflare DNS API routines
  ssh_utils.py    # SSH key/tool helpers
  __init__.py
setup.py
README.md
```

---

Developed by Parsa Lakzian  
Architected by Tara AI
miniacsincome 0.0.3
MiniACSIncome: A benchmark for fairness verification of neural networks.
Requires Python: >=3.10

# MiniACSIncome
A benchmark for fairness verification of neural networks.
The benchmark is based on the ACSIncome dataset from the `folktables` package.
MiniACSIncome is based on USA census data from 2018.

## Examples
Load a `MiniACSIncome` dataset.
```python
from miniacsincome import MiniACSIncome

dataset = MiniACSIncome(num_variables=5)
dataset[0]
# (tensor([ 0.,  1.,  1.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,
#           0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,  0.,
#           0.,  1.,  0.,  0.,  0.,  0., 60.,  0.,  0.,  1.,  0.,  0.]),
#  tensor(0)
```
The `MiniACSIncome` class is a `torch.utils.data.Dataset`.
It can be used with the usual PyTorch dataloaders.

Load a trained MiniACSIncome dataset from the benchmark.
```python
from miniacsincome import get_network

get_network(num_variables=5)
# Sequential(
#   (0): Linear(in_features=40, out_features=10, bias=True)
#   (1): ReLU()
#   (2): Linear(in_features=10, out_features=2, bias=True)
# )
```

The last part of MiniACSIncome are the input distributions (population models) 
for each MiniACSIncome dataset.
```python
from miniacsincome import get_population_model, get_network
import torch

pop_model, input_space, input_transform = get_population_model(5)
input_space.input_shape
# torch.Size([40])
input_space.input_bounds
# (tensor([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
#          0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.,
#          0., 0., 0., 0.]),
#  tensor([ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
#           1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
#           1.,  1.,  1.,  1.,  1.,  1., 99.,  1.,  1.,  1.,  1.,  1.]))

data = pop_model.sample(100, seed=0).to(torch.float32)
data.shape
# torch.Size([100, 40])

net = get_network(num_variables=5)
net(input_transform(data)).argmax(dim=-1).float().mean()
# tensor(0.2900)
```

## Population Model
The population models are trained in `population_model.ipynb`.
Each population model is derived from the population model for MiniACSIncome-8.
The marginal distributions of this population model are:

![marginal distributions](resources/marginal-distributions.png)

The covariance of the population model matches the covariance of the original dataset reasonably well.

![covariance matrix comparison](resources/covariance.png)

## Citation
If you use this dataset in your research, please cite:
```
@inproceedings{probspec,
  author       = {David Boetius and Stefan Leue and Tobias Sutter},
  title        = {Solving Probabilistic Verification Problems of Neural Networks using Branch and Bound},
  booktitle    = {{ICML}},
  series       = {Proceedings of Machine Learning Research},
  volume       = {267},
  publisher    = {{PMLR}},
  year         = {2025},
}
```
protocolx 0.6.0
A type-safe protocol composition and runtime synthesis tool for Python, enabling plugin-based architectures and automatic protocol binding with full support for runtime checking, serialization, and IDE/type checker integration.
Requires Python: >=3.11

# ProtocolX

**ProtocolX** 是一个先进的 Python Protocol 组合与动态生成工具，支持类型安全的协议合成与运行时检查，适用于构建插件化、解耦、自动化协议体系的现代 Python 工程。

---

## 特性

-   **类型安全**：仅允许 Protocol 子类组成集合。
-   **组合协议唯一性**：任意协议组合，无论顺序如何，生成的匿名 Protocol 类全局唯一且可缓存。
-   **支持 runtime_checkable**：可选开启运行时 `isinstance`/`issubclass` 检查。
-   **pickle/import 兼容**：所有匿名协议类均可序列化，跨进程、分布式环境直接复用。
-   **高性能惰性实现**：协议集合属性延迟计算，内存与性能开销极低。
-   **丰富的单元测试和类型注释**：开发、维护、迁移无压力。

---

## 快速开始

### 安装

```bash
pip install protocolx
# 或者，若本地开发：
pip install -e .
```

### 导入

```python
from protocolx import ProtocolSequence, compose_protocol
from typing import Protocol
```

### 最小用法示例

```python
class Foo(Protocol):
    def foo(self) -> int: ...

class Bar(Protocol):
    def bar(self) -> str: ...

seq = ProtocolSequence([Foo, Bar])
Composed = compose_protocol(seq, runtime=True)

class MyImpl:
    def foo(self) -> int:
        return 42
    def bar(self) -> str:
        return "hello"

assert isinstance(MyImpl(), Composed)  # True
```

## 作为 TypeVar Bound

你可以用组合后的协议类作为泛型类型参数的 bound：

```python
from typing import TypeVar

seq = ProtocolSequence([Foo, Bar])
Composed = compose_protocol(seq)

T = TypeVar("T", bound=Composed)

def process_plugin(plugin: T):
    plugin.foo()
    plugin.bar()
```

---

## 典型应用场景

-   设计可扩展/解耦插件框架的协议约束
-   自动化类型安全的多协议混合
-   在 runtime 环境下动态生成可检测协议组合
-   支持跨进程、分布式环境 protocol 类型统一

---

## API 文档

### ProtocolSequence

```python
ProtocolSequence(protocols: Sequence[type])
```

-   **功能**：构造有序、唯一、类型安全的 Protocol 集合。
-   **常用属性**：

    -   `.names` —— 返回有序协议名元组
    -   `.items`（可迭代）—— 协议类型组成

### compose_protocol

```python
compose_protocol(bases: ProtocolSequence, *, runtime: bool = False) -> type
```

-   **参数**

    -   `bases`：ProtocolSequence，协议组合（顺序无关）
    -   `runtime`：是否支持 `isinstance`/`issubclass` 检查（默认为 `False`）

-   **返回**

    -   匿名协议类（全局唯一、可 pickle/import）

---

## 高级说明

-   支持 Python 3.8+。
-   `ProtocolSequence` 只接受 Protocol 子类，自动去重并按类名排序。
-   `compose_protocol` 所有返回类均自动挂载至虚拟模块 `__anon_protocol__`，确保序列化与反序列化一致。
-   强类型注释，支持 IDE 与 mypy 静态类型检查。

---

## 许可证

本项目采用 MIT License 开源。

---

## 贡献与支持

欢迎 Issue、PR、建议和改进！