semvec/pypi-packages huggingface dataset:
gibberishpy 1.0.3
Using Markov chain to detect gibberish in text.
Requires Python: >=3.10

# gibberishpy

gibberishpy is a Python-based application designed to analyze and identify gibberish in a given string. The application leverages the principles of Markov Chains, a mathematical system that undergoes transitions from one state to other on a state space, to calculate both additive and multiplicative probabilities. gibberishpy allow users to build their own model with custom txt file.


## Usage Examples

Build Model
-----------

    from gibberishpy.scanner import GibberishScanner
    
    
    if __name__ == "__main__":
        scanner = GibberishScanner()
        scanner.build_model(corpus_path="path/to/corpus.txt", n_gram_size=2)
        scanner.save_model("transition_matrix_2d.tm", encoding="utf-8")

Scan Gibberish
--------------

    from gibberishpy.scanner import GibberishScanner
    
    
    if __name__ == "__main__":
        scanner = GibberishScanner()
        scanner.load_model(path="transition_matrix_2d.tm")
        additive_cum_proba, multiplicative_cum_proba = scanner.scan("ldfjgnkdfjnd")
        print(additive_cum_proba)
        print(multiplicative_cum_proba)
    
        # 0.00022810218978102192
        # 0.0
XPT2046-asukiaaa-python 1.0.0
A library to use XPT2046 touch module
Requires Python: >=3.7
Keywords: spi,touch,xpt2046

# XPT2046_asukiaaa_python

Python library for XPT2046 Touchscreen.
This library references [Luca8991/XPT2046-Python](https://github.com/Luca8991/XPT2046-Python) and [Adafruit_CircuitPython_RGB_Display](https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display).

## Usage

### Enable SPI for Raspberry Pi

```sh
sudo raspi-config nonint do_spi 0
```

No need to reboot.

### Wiring

| Raspberri Pi  | <--> | XPT2046 |
| :------------ |:---------------:| -----:|
| MOSI (GPIO10) | <--> | DIN |
| MISO (GPIO9) | <--> | DO |
| SCLK (GPIO11) | <--> | CLK |
| GPIO7 or any | <--> | CS |
| 3V3 | <--> | VCC |
| GND | <--> | GND |

This library does not use IRQ pin.

Code, same as in [tests/print_touch.py](https://github.com/asukiaaa/XPT2046_asukiaaa_python/blob/main/tests/print_touch.py) file:

```py
from XPT2046_asukiaaa_python import XPT2046
import board
import busio
from digitalio import DigitalInOut
from time import sleep

cs = DigitalInOut(board.D7)
spi = busio.SPI(board.SCLK, board.MOSI, board.MISO)
touch = XPT2046(spi, cs=cs)

print("start monitoring touch")

while True:
    touch.update()
    if touch.coordinate is not None:
        print(touch.coordinate)
    sleep(.01)
```

## License

MIT

## References

- [Packaging Python Projects](https://packaging.python.org/en/latest/tutorials/packaging-projects/)