semvec/pypi-packages huggingface dataset:
jatto-compare-version-strings 0.0.1
Compare version strings
License: MIT

#### Ormuco and VanHack Code Challenge

> The Question
> The goal of this question is to write a software library that accepts 2 version string as input and returns whether one is greater than, equal, or less than the other. As an example: “1.2” is greater than “1.1”. Please provide all test cases you could think of.

#### My Solution

Get Started:

- Clone this repository:
```sh
$ git@github.com:jattoabdul/compare_version_strings.git
```
- Change into the `compare_version_strings` directory:
```sh
$ cd compare_version_strings
```
- Install all dependencies:
```sh
$ pip install -r requirements.txt
```
Run Test:
```sh
$ pytest
```

Run as Packaged Library:
- Install:
```sh
$ pip install jatto_compare_version_strings
```

- Usage:

````
from compare_version_strings.compare_version_strings import compare_versions, prepare_comparison_result

comparison_result = compare_versions('1.0.0.2.9', '1.0.0.3.4')

# It will return:
#     A positive number: If the first version is greater than the second  
#     A negative number: If the first version is smaller than the second
#     Zero: If the versions are equals

formated_result = prepare_comparison_result('1.0.0.2.9', '1.0.0.3.4')

# It will return:
#     '{version1}' is equal to '{version2}': If the comparison returns 0
#     '{version1}' is smaller than '{version2}': If the comparison returns -1
#     '{version1}' is greater than '{version2}': If the comparison returns 1
````
deeppyer 1.0.1
Deepfry images in Python.
License: MIT
Requires Python: >=3.6
Keywords: image manipulation deepfry meme

# deeppyer
![banner image](./banner.jpg)

deeppyer is an image deepfryer written in Python using [Pillow](https://python-pillow.org/)
and [OpenCV](https://pypi.org/project/opencv-python/).

NOTE: This *requires* at least Python v3.6 in order to run.

## How to use
You can either use deeppyer as a module, or straight from the command line.

### Command line usage
```
$ python deeppyer.py -h

usage: deeppyer.py [-h] [-v] [-o OUTPUT] [-f] FILE

Deepfry an image.

positional arguments:
  FILE                  File to deepfry.

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         Display program version.
  -o OUTPUT, --output OUTPUT
                        Filename to output to.
  -f, --flares          Try and detected faces for adding lens flares.
```

By default, flares will try to be added to the image, unless you're using the CLI script,
in which case it is off by default.

### Program usage
```py
from PIL import Image
import deeppyer, asyncio

async def main():
    img = Image.open('./foo.jpg')
    img = await deeppyer.deepfry(img)
    img.save('./bar.jpg')

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
```

## API Documentation
#### `async deepfry(img: Image, type=DeepfryTypes.RED, *, flares: bool = True)`
Deepfry a given image.

**Arguments**
 - *img* (PIL.Image) - Image to apply the deepfry effect on.
 - *[type]* (DeepfryTypes) - Colours to apply on the image.
 - *[flares] (bool) - Whether or not to try and detect faces for applying lens flares.

Returns:
  `PIL.Image` - Deepfried image.

## Why?
Â¯\\\_(ãƒ„)_/Â¯ Why not

## Contributing
If you wish to contribute something to this, go ahead! Just please make sure to format it with flake8 + isort, and that the test(s) pass fine.

## Testing
Simply run `tests/test.py` and make sure that all the images output properly.