semvec/pypi-packages huggingface dataset:
tomos 0.1.4b2
Code Tomographies for AyED2
License: MIT
Requires Python: <4.0,>=3.10

# τόμος  -  tomos

Tomographies for your code

![code tomography logo](https://github.com/user-attachments/assets/1138b7bb-815a-43e4-8384-c742ce029c76)


## What it's tomos?

It's and interpreter of AyED2 language, and also a memory visualizer of executions.

The grammar of the language can be found
[here](https://github.com/jmansilla/tomos/blob/main/tomos/ayed2/parser/grammar.lark).
You can also find simple examples in [this folder](https://github.com/jmansilla/tomos/tree/main/demo/ayed2_examples), and a bit more complex ones with these [linked_list](https://github.com/jmansilla/tomos/tree/main/demo/linked_list) or [bubble_sort](https://github.com/jmansilla/tomos/tree/main/demo/bubble_sort) ones.

### installation & usage

A simple pip install should do it. It's recommened to install it on a virtual environment, but it's up to you.

```
]$ pip install tomos
```

After installed, you should have a new command named `tomos`, and you can check everything it's working fine by running

```
]$ tomos --version
```

Assuming you have a valid AyED2 file (example.ayed), you can run the interpreter like this:

```
]$ tomos example.ayed
```

that should show on screen the final state of such execution.

If you want to generate the visualization trace, add the parameter `--autoplay`.

For a complete list of options, use `--help`
lzhgriperwithforcesensor 0.1.0
An async TCP client wrapper for controlling a gripper with force sensing and callback support.
License: MIT
Requires Python: >=3.7


# 控制抓手 (带力传感器) 的 TCP 客户端

## 示例
```python
# Expample:

form lzh_griper_with_force_sensor import GriperWithForceSensor

GRIPPER_IP = '192.168.0.123'
gripper = GriperWithForce_sensor(host=GRIPPER_IP)

gripper.set_mode(1)             # 设置抓取模式 (1~4)
gripper.prepare()               # 准备抓取
gripper.grip()                  # 抓取
gripper.release()               # 释放
gripper.force()                 # 查询力值 (kg)
gripper.force_sensor_zeroing()  # 力传感器调零
gripper.status()                # 抓手当前状态汇总
    
# 回调函数相关 (非必须)
def callback(kg: float):        # 定义一个回调函数
    print(f'New force value print from callback : {kg} kg')

gripper.set_force_callback(     # 设置差值模式回调
    callback = callback,
    callback_threshold = 0.1,
    single_callback_mode = False
)
gripper.set_force_callback(     # 设置单阈值模式回调
    callback = callback,
    callback_threshold = 3.0,
    single_callback_mode = True
)
```
## 安装 - [PyPI](https://pypi.org/project/lzhgriperwithforcesensor/)
```shell
pip install lzhgriperwithforcesensor
```

## API
[Document](https://zhhtdm.github.io/griper-with-force-sensor/)