semvec/pypi-packages huggingface dataset:
py-trans 0.6.1
Free python library to translate text to different languages.
License: MIT
Keywords: google translate,text translator,translator,py-trans

# py-trans
```py
from py_trans import PyTranslator

tr = PyTranslator()
print(tr.google("Hi", "es"))
```

<p align="center">
  A Fast, hassle-free way to translate text 📖
<p>

<p align="center">
  <kbd><a href="#features"><b>Features</b></a></kbd>
  <kbd><a href="#installation"><b>Install</b></a></kbd>
  <kbd><a href="#usage"><b>Usage</b></a></kbd>
</p>


## Features
- Simple and free
- Multiple translators to choose
- Both synchronous & asynchronous versions


## Supported translators
|                      Engine                      |   Function   |
| ------------------------------------------------ | --------------- |
|[Google Translate](https://translate.google.com/) | `google`        |
|[translate.com](https://www.translate.com/)       | `translate_com` |
|[MyMemory](https://mymemory.translated.net/)      | `my_memory`     |
|[Translate Dict](https://www.translatedict.com/)  | `translate_dict`     |


## Installation

```sh
pip3 install py-trans
```

<details>
  <summary><b>Install from source</b></summary>

  ```sh
  pip install git+https://github.com/Itz-fork/py-trans.git
  ```
</details>


## Usage

```py
# Sync version
from py_trans import PyTranslator

# Async version
from py_trans import Async_PyTranslator
```

- Detect language of the provided text
    - `detect`
    - 
        ```py
        tr.detect("Hello!")
        ```
- Translate text using Google translate
    - `google`
    - 
        ```py
        tr.google("Hello!", "es")
        ```
- Translate text using Translate.com
    - `translate_com`
    - 
        ```py
        tr.translate_com("Hello!", "es")
        ```
- Translate text using My Memory
    - `my_memory`
    - 
        ```py
        tr.my_memory("Hello!", "es")
        ```
- Translate text using Translate dict
    - `translate_dict`
    - 
        ```py
        tr.translate_dict("Hello!", "es")
        ```
- Get language code/name
    - 
        ```py
        # Sync version
        tr.get_lang_code("arabic")
        tr.get_lang_name("ar")

        # Async version
        tr.get_lang_code_async("arabic")
        tr.get_lang_name_async("ar")
        ```

> [!NOTE]
> All the above examples also applies to async version (`Async_PyTranslator`)


## License
- Copyright (C) 2023 [@Itz-fork](https://github.com/Itz-fork)
- Licensed under [MIT](/LICENSE)
iso3166KOR 0.0.1
Self-contained ISO 3166-1 country definitions.
License: MIT
Requires Python: >=3.6
Keywords: iso 3166-1:KOR,iso country Korean

# 한글 국가명 -> iso3166 표준 국가명, 코드 값



참조해서 만듬. https://github.com/deactivated/python-iso3166/tree/master



```
$pip install iso3166KOR
```

```
>>> from iso3166KOR import countries
>>> countries.get('미국')
Country(name='미국', apolitical_name='UNITED STATES', numeric='840', alpha2='US', alpha3='USA')
>>> countries.get('미합중국')
Country(name='미합중국', apolitical_name='United States of America', numeric='840', alpha2='US', alpha3='USA')
```
multiprocshapefinder 0.12
detects and analyzes shapes in images using parallel processing.
License: MIT
Keywords: multiprocessing,shape,matching,finder


# detects and analyzes shapes in images using parallel processing. 

## pip install multiprocshapefinder

### Tested against Python 3.11 / Windows 10


### Advantages:

#### Parallel Processing: 

The module utilizes parallel processing (cpus parameter) to speed up the shape detection process, 
which can be advantageous for analyzing multiple images simultaneously.

#### Flexible Input: 

It accepts images in various formats, providing flexibility in the source of the images.

#### Caching: 

The option to use caching (usecache) can save time on the same images.

#### Visualization: 

The module provides a function (draw_results) for visualizing the detected shapes on the original images,
making it easier for users to interpret and verify the results.

#### Configurability: 

The module exposes various parameters, such as Canny edge detection thresholds and contour approximation factors, 
allowing users to fine-tune the shape detection process based on their requirements.


```python

# Importing functions from the multiprocshapefinder module
from multiprocshapefinder import find_all_shapes, draw_results

# List of image URLs to be processed
images = [
    r"https://raw.githubusercontent.com/hansalemaos/screenshots/main/findshapes_1.png",
]  # accepts almost all formats (url/path/buffer/base64/np/PIL) - https://github.com/hansalemaos/a_cv_imwrite_imread_plus

# Calling find_all_shapes function to detect and analyze shapes in the given images
df = find_all_shapes(
    images,
    threshold1=10,
    threshold2=90,
    approxPolyDPvar=0.01,
    cpus=5,  # Number of CPU cores to use for parallel processing
    chunks=1,  # Number of chunks to split the image processing into
    print_stderr=True,  # Print error messages to stderr
    print_stdout=False,  # Do not print standard output messages
    usecache=True,  # Use caching for intermediate results
)

# Printing the resulting DataFrame containing shape information
print(df)

# Calling draw_results function to visualize the detected shapes on the original image
draw_results(
    df,
    images[0],  # Using the first image in the list - filter the DF (df.loc) if len(images)>1
    min_area=5,  # Minimum area threshold for shapes to be considered
    shapes=("rectangle", "triangle", "circle", "pentagon", "hexagon", "oval"),  # Shapes to be visualized
    cv2show=True,  # Display the result using OpenCV
)


```