semvec/pypi-packages huggingface dataset:
zarnevis 0.0.1
Zarnevis, a tool for writing RTL text in computer vision projects
License: MIT
Keywords: persian,arabic,rtl,text,cv,computer-vision

# Zarnevis : RTL Text for your computer vision projects

## Installation 
### The `pip` way 

Just run this on your machine: 

```
pip install zarnevis
``` 

### The `git` way 

First, clone this repository using this command:

```
git clone https://github.com/prp-e/zarnevis
```

Then run these commands:

```
cd zarnevis && pip install -e . 
``` 

_NOTE_: This method is only suggested for when you're going to do some development and tests on the project. If you want to do something else (such as using this tool in a face tracker drone) just use the `pip` way and don't make trouble for yourself :) 

## Example 

It is pretty straight-forward. I actually made this because I wanted to do some cool stuff and I didn't want to make it so complex. This is an example code: 

```python
import cv2
from zarnevis import Zarnevis

image = cv2.imread('example.jpg')

processor = Zarnevis(image=image, text="اهواز زیبا", font_file='vazir.ttf', font_size=36, text_coords=(200,20), color=(255,0,100))
image = processor.draw_text()


cv2.imwrite('example_zarnevis.jpg', image)
``` 

### Image - Before 

![Example Image](example.jpg)

### Image - After 

![Example Image with Zarnevis](example_zarnevis.jpg)

## Special Thanks

- Amin Sharifi - Because he did a great job teaching this method on his [website](https://bigm.ir/persian-character-in-opencv/) and [YouTube channel](https://www.youtube.com/watch?v=RPb1X6Cf-ZU).
- Touhid Arastu - He pointed out in [this issue](https://github.com/prp-e/zarnevis/issues/1) that in new versions of Pillow, we don't really need reshaping and stuff and if we don't want to run our code on many different platforms, it can handle the thing itself.
hamptt 0.3.1
Implementation of Push-To-Talk board for ham radio transmitters like Baofeng UV-5R
License: MIT
Requires Python: >=3.8,<4.0

Ham PTT
=======

Bluetooth PTT switch for ham radio transmitters like Baofeng UV-5R.  
Board helps to control transmitter from PC.

Problematic
-----------

Testing of UART interface showed unstable connection. During transmit via UART an usb-ttl 
chip periodically crashes and stops working. Cause is some radio strong interference 
on USB cable. So Bluetooth serial protocol stack chosen instead.

Schematic
---------

Host -> (Bluetooth) -> Esp-32 Arduino -> Relay -> Transmitter PTT button

* Hardware

    - Host PC with Bluetooth (tested Ubuntu 20.04)
    - Esp32 DevKit v1 (or similar esp32)
    - Relay shield
    - Baofeng UV-5R

Examples
--------

- Find BT devices `hcitool scan`
- Python

```python3
from hamptt import open_ptt

with open_ptt(bt_addr="A0:B1:C2:D3:E4:F5") as ptt:
    ptt.begin()
    # I.e. play message to transmitter or something else
    ptt.end()
```

Install
-------

* Host PC machine

    - Python 3.8
    - Bluetooth's libs (required for pybluez)

      ```shell
      sudo apt-get install bluez libbluetooth-dev
      ```

    - Pip
      ```shell
      python3 -m pip install "hamptt[bt]"
      ```


* Esp32

    - Upload sketch to your esp-32 via PlatformIO  
      NOTE! Check your board config in `platformio.ini` (see: https://platformio.org/)
      ```
      pio run -t upload
      ``` 

    - Connect pins Esp-32 to relay

        - VVC -> Relay +
        - GND -> Relay -
        - GPIO D25 -> Relay IN

    - Connect relay and audio, for Baofeng UV-5R it looks like:

      ![Baofeng UV-5R Pins](https://www.dxzone.com/dx33739/baofeng-mic-pin-out-and-programming-cable-schematics.jpg "Baofeng UV-5R Pins")  
      NOTE: You can rebuild your hands-free cable or buy another one

Development
===========

* Build and install
  ```shell
  pip3 uninstall hamptt
  rm -rf dist && poetry build && pip3 install ./dist/*.whl
  ```
  
* Publish
  - Prepare  
     ```shell
    poetry config repositories.testpypi https://test.pypi.org/legacy/
    poetry config pypi-token.testpypi <TOKEN>
    
    poetry config repositories.pypi https://upload.pypi.org/legacy/
    poetry config pypi-token.pypi <TOKEN>
    ```  
  
  - Publish
    ```shell
    poetry publish --build -r testpypi
    
    poetry publish --build -r pypi
    ````