semvec/pypi-packages huggingface dataset:
opt-einsum-torch 0.1.0
Memory-efficient optimum einsum using opt_einsum planning and PyTorch kernels.
License: MIT
Requires Python: >=3.6

# opt-einsum-torch

There have been many implementations of Einstein's summation. numpy's 
`numpy.einsum` is the least efficient one as it only runs in single thread on 
CPU. PyTorch's `torch.einsum` works for both CPU and CUDA tensors. However,
since there is no virtual CUDA memory, `torch.einsum` will run out of CUDA 
memory for large tensors. 

This code aims at implementing a memory-efficient `einsum` function using
PyTorch as the backend. This code also uses the `opt_einsum` package to 
optimizes the contraction path to achieve the minimal FLOPS.

### Usage

```python
from opt_einsum_torch import EinsumPlanner
import torch

# Some huge tensors
arr1, arr2 = ..., ...
ee = EinsumPlanner(torch.device('cuda:0'), cuda_mem_limit=0.9)
result = ee.einsum('ijk,jkl->il', arr1, arr2)

```

The resulting tensor `result` will be a PyTorch CPU tensor. You could convert
it into numpy array by simply calling `result.numpy()`.

### Future works

- Support multiple GPUs.
- Memory efficient einsum kernels.
- CUDA data transfer profilers.
pyfreetts 0.1.1
Convert text to speech with the pretty voices
License: MIT
Requires Python: >=3.6,<4.0

<p align="center"><img src="https://raw.githubusercontent.com/tquangsdh20/pyfreetts/master/.github/logo.svg"></p>

<p align="center"> <img src="https://github.com/tquangsdh20/pyfreetts/actions/workflows/test.yml/badge.svg?style=plastic"> <a href="https://codecov.io/github/tquangsdh20/pyfreetts/commit/5d0da7ae595f845c64742d9d64260d7018453856"><img src="https://codecov.io/gh/tquangsdh20/pyfreetts/branch/master/graphs/badge.svg?branch=master"></a></p>


## Features

- Support text to speech with many pretty voices options
- Support download file mp3 from TTS

## Installation
**Windows**
```
python -m pip install pyfreetts
```
**Linux**
```
pip install pyfreetts
```
**macOS**
```
sudo pip3 install pyfreetts
```
## How does it work?

### Setup Language for Converting

To setup language and voice using the method `setup_voice(language_code)`, where `language_code` :

- English US : `am`
- English UK : `br`
- Portuguese (Brazil): `pt-br`
- Portuguese (Portugal): `pt`
- The other languages : `ISO LANGUAGE CODE 639-1`

```python
from pyfreetts import Text2Speech

module = Text2Speech()
module.setup_voice("am")
module.convert("how are you?")
module.save_to_file("test.mp3")
module.close()
```

Output

```
>> All voices for your language:
>>    1. Joey - Male - SAPI5
>>    2. Justin - Male - SAPI5
>>    3. Matthew - Male - SAPI5
>>    4. Salli - Female - SAPI5
>>    5. Joanna - Female - SAPI5
>>    6. Ivy - Female - SAPI5
>> Make your choice: 3
```

<a href="https://github.com/tquangsdh20/mateco"><p align="center"><img src="https://img.shields.io/badge/Github-tquangsdh20-orange?style=social&logo=github"></p></a>
matchshapes 1.1.3
matchshapes is a new Shape Matching technology
License: MIT

## MATCHSHAPES
"match shapes" is a new Shape Matching technology.

### Installation
```
pip install matchshapes
```
### About "matchshapes"
Shape recognition is an intrinsic property of the human intellect. Kids aged 1.5-2 years old can recognize shapes even if they differ in size, position, orientation, or are severely deformed. They, for example, can easily combine identical shapes from the picture below into three groups.

<p align="center"><img src="https://boriskravtsov.com/images/shapes.png">

To simulate such recognition capability, we introduce the MATCHSHAPES library and its only one function match(), which calculates the similarity of two compared shapes:
<p align="center">similarity = match(shape_1, shape_1)</p>

Here the shape is a grayscale contour image whose maximum dimension is not more than 100 pixels. 
In general, compared shapes may differ in size. The similarity value ranges from 0 to 1.0 (complete identity). 
The calculation time is about 7-9 seconds.

Our website demonstrates the effectiveness of the MATCHSHAPES technology on a large amount of data.


### How to use:
```Python
import cv2 as cv
import time
import matchshapes as ms

shape_1 = cv.imread(path_1, cv.IMREAD_GRAYSCALE)
shape_2 = cv.imread(path_2, cv.IMREAD_GRAYSCALE)

print(f'\nWait...')

timer_start = time.time()

similarity = ms.match(shape_1, shape_2)

seconds = time.time() - timer_start

if similarity < 0:
    print(f'\nERROR: Incorrect shape format')
else:
    print(f'\nSimilarity = {round(similarity, 5)}\n\nTime = {round(seconds, 1)} sec')
```