semvec/pypi-packages huggingface dataset:
bitspec 0.4.4
Bit pattern mini-language for instruction encodings. Bytes in, IR out!
Requires Python: >=3.8

Bit pattern mini-language for instruction encodings. Bytes in, IR out!

See [docs](https://amtal.github.io/bitspec) for a step-by-step tutorial and API
reference. Here's a complete example:
```python
>>> import bitspec
>>> @bitspec.bitspec('11 xy:1 11101 0xCB nn:s8 00 000 r:3', op='RLC')
... @bitspec.bitspec('11 xy:1 11101 0xCB nn:s8 00 001 r:3', op='RRC')
... @bitspec.bitspec('11 xy:1 11101 0xCB nn:s8 00 010 r:3', op='RL ')
... @bitspec.bitspec('11 xy:1 11101 0xCB nn:s8 00 011 r:3', op='RR ')
... @bitspec.bitspec('11 xy:1 11101 0xCB nn:s8 00 100 r:3', op='SLA')
... @bitspec.bitspec('11 xy:1 11101 0xCB nn:s8 00 101 r:3', op='SRA')
... @bitspec.bitspec('11 xy:1 11101 0xCB nn:s8 00 110 r:3', op='SL1') # "SLL"
... @bitspec.bitspec('11 xy:1 11101 0xCB nn:s8 00 111 r:3', op='SRL')
... @bitspec.bitspec('11 xy:1 11101 0xCB nn:s8 10 b:3 r:3', op='RES')
... @bitspec.bitspec('11 xy:1 11101 0xCB nn:s8 11 b:3 r:3', op='SET')
... class Z80UndocBitOps:    # NORTHERN BYTES Volume 3 #10 (October 1982)
...     def __str__(self):   # mirrored at http://z80.info/z80undoc.htm
...         dst = ['B,', 'C,', 'D,', 'E,', 'H,', 'L,', '', 'A,'][self.r]
...         bit = '' if self.b == None else f'{self.b},'
...         src = ['IX', 'IY'][self.xy]
...         return f'{self.op} {dst}{bit}({src}{self.nn:+})'
...     def __repr__(self): return f'<{self!s}>'
...     def __init__(self, xy, nn, r, op, b=None):
...         self.xy, self.nn, self.r, self.op, self.b = xy, nn, r, op, b

>>> code = bytes.fromhex('fdCB7f17 ddCBfe88 fdCB0125')
>>> Z80UndocBitOps.from_bytes(code)
<RL  A,(IY+127)>

>>> {hex(op.addr):op for op in Z80UndocBitOps.iter_bytes(code, addr=0x50)}
{'0x50': <RL  A,(IY+127)>, '0x54': <RES B,1,(IX-2)>, '0x58': <SLA L,(IY+1)>}
```

Install from [Pypi](https://pypi.org/project/bitspec) or just copy `bitspec.py`
into your project. [Bugs](https://github.com/amtal/bitspec/issues), questions,
or [other feedback](https://github.com/amtal/bitspec/discussions) are welcome!
snetra 1.1
A Python based scanner uses shodan-internetdb to scan the IP.

<h1 align="center">
<img src="https://github.com/R0X4R/snetra/raw/main/static/logo.png" width="30%">
</h1>

A python based script which takes IPs as stdin and scans for open ports and vulnerabilities using [`shodan-internetdb`](https://internetdb.shodan.io/)


> **Note:** _I made it just to check if I implement [`https://gitlab.com/shodan-public/nrich`](https://gitlab.com/shodan-public/nrich) in python or not._


#### **InternetDB**
The InternetDB API provides a fast way to see the open ports for an IP address. It gives a quick, at-a-glance view of the type of device that is running behind an IP address to help you make decisions based on the open ports.

#### **Installation**


```bash
$ pip3 install snetra
```

#### **Usage**


```bash
$ cat ip.list | snetra
```


![image.png](https://github.com/R0X4R/snetra/raw/main/static/snetra.png)

**Inspired from:** [`https://gitlab.com/shodan-public/nrich`](https://gitlab.com/shodan-public/nrich)


<br>

---
pylx16a 1.1.0
A modern Python library for controlling HiWonder's LX-16A servos
Requires Python: >=3.10

# PyLX-16A

A modern Python library for controlling HiWonder's (previously LewanSoul's) LX-16A servos.

## Install and Setup

Simply copy `lx16a.py` into your project directory.

Don't try to guess the port your controller is connected to. On Linux, run `sudo dmesg` after plugging it in, which prints the most recent kernel messages. It should say something like `ch341-uart converter now attached to ttyUSB0`, in which case the port you want is `/dev/ttyUSB0`.

There's also the possibility that your program doesn't have access to the port you want to use. In this case, we need to modify the permissions of the port (e.g. `/dev/ttyUSB0`). To make it publicly readable and writable, run `sudo chmod a+rw /dev/ttyUSB0`.

## Documentation

Refer to `documentation.md`.

## Example program

```python
from math import sin, cos, pi
from lx16a import *
import time

LX16A.initialize("/dev/ttyUSB0")

try:
    servo1 = LX16A(1)
    servo2 = LX16A(2)
    servo1.set_angle_limits(0, 240)
    servo2.set_angle_limits(0, 240)
except ServoTimeoutError as e:
    print(f"Servo {e.id_} is not responding. Exiting...")
    quit()

t = 0
while True:
    servo1.move(sin(t) * 60 + 60)
    servo2.move(cos(t) * 60 + 60)

    time.sleep(0.05)
    t += 0.1
```