semvec/pypi-packages huggingface dataset:
yyyy-mm-dd 0.1.2
Helper functions for easy string-based manipulation of dates in python
License: MIT
Requires Python: >=3.6

# yyyy_mm_dd

[![Build Status](https://img.shields.io/github/workflow/status/rogeriochaves/yyyy_mm_dd/Python%20package?style=for-the-badge)](https://github.com/rogeriochaves/yyyy_mm_dd/actions)

Easy string-based date manipulation library for Python

[Documentation](https://rogeriochaves.github.io/yyyy_mm_dd/yyyy_mm_dd/index.html)

## Installation

    $ pip install yyyy_mm_dd

## Why?

When writing some python code for a quick investigation in a notebook, do you also think it's a lot of boilerplate to work with dates? Do you always have to google the solution and copy it from stackoverflow because you never remember and just want the most quick and easy solution?

If you answered yes, then you are going to love this library. In yyyy_mm_dd you can work with strings directly, no need to convert back and forth, like to add +1 day to a date:

```python
>>> from yyyy_mm_dd import *
>>> move_yyyy_mm_dd("2020-03-14", 1)
'2020-03-15'
```

There are many operations in the library that you can do with a single functions, no need to think on how to compose them, the most common operations should have a function available, for example the amount of days between two dates:

```python
>>> diff_yyyy_mm_dd("2020-03-14", "2020-03-16")
2
```

Same operations can be done at various levels, and the name is easy to remember, just using the pattern of the date itself (operation + yyyy_mm, yyyy_mm_dd, yyyy_mm_dd_hh_mm_ss, etc). For example the difference in months between two dates:

```python
>>> diff_yyyy_mm("2020-03", "2020-07")
4
>>> diff_yyyy_mm("2020-03-01", "2020-07-01")
4
```

Or to add a month:

```python
>>> move_yyyy_mm("2020-03-14", 1)
'2020-04-14'
```

But not only strings, you can also pass a datetime as argument in case you already have it, and there is no need for any conversion:

```python
>>> import datetime
>>> move_yyyy_mm_dd_hh(datetime.datetime(2020, 3, 14, 5, 0), 1)
datetime.datetime(2020, 3, 14, 6, 0)
```

Check the [documentation](https://rogeriochaves.github.io/yyyy_mm_dd/yyyy_mm_dd/index.html) to see all functions available, and if there is an operation you regularly need to do which is not there, please [open an issue](https://github.com/rogeriochaves/yyyy_mm_dd/issues)

## TODO:

- Support timezones
- Make it fully compatible with [RFC 3339](https://tools.ietf.org/html/rfc3339)

## Contributing

Any contributions are very welcome. To run locally, install the dependencies:

```
pip install -r requirements.txt
```

The tests are inside the docs, to run them simply execute:

```
python -m doctest yyyy_mm_dd/__init__.py
```

If you want to check the type hints:

```
mypy yyyy_mm_dd
```

If you want to regenerate docs:

```
pdoc --html -o ./docs yyyy_mm_dd --force
```
styletx 1.0.5
Initial release with StyleTransfer
License: MIT
Requires Python: >3.8

# StyleTx
**StyleTx** is a python project that applies effects of an image to another image using machine learning.

## Installation
You can install the StyleTx package using the command given below

```
pip3 install styletx
```

## Requirements
Requires Python >=3.8

Required packages are specified in [requirements.txt](https://github.com/dinesh-GDK/StyleTx/blob/master/requirements.txt) file, which you can install using

```
pip3 install -r requirements.txt
```

`torch` and `torchvision` versions in `requirements.txt` are CPU only, if you want to use the GPU versions that suit your hardware requirements visit this [link](https://pytorch.org/).


## Implementation

```python
# import necessary packages
from styletx import StyleTransfer
from PIL import Image
import matlibplot.pyplot as plt

# import the images
content_image = Image.open('path/filename')
style_image = Image.open('path/filename')

# implement StyleTransfer
output_image = StyleTransfer(content_image, style_image, alpha=1, beta=10, epochs=500)

# display the results
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(20, 10))
ax1.imshow(content_image)
ax2.imshow(output_image)
plt.show()
```
The above code will apply the effects of the `style_image` to `content_image`.

# Inputs
`content_image` - a PIL object\
`style_image` - a PIL object\
`alpha` - a positive integer\
`beta` - a positive integer\
`epochs` - a positive integer

By default `alpha` = 1, `beta` = 10 and `epochs` = 500.
You can play around these values to get desired output image.

## Example
![](https://raw.githubusercontent.com/dinesh-GDK/StyleTx/master/images/Result.png)

## License
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/dinesh-GDK/StyleTx/blob/master/LICENSE.txt)

## Resources
- The complete theory behind the **StyleTransfer** can be found in this [link](https://www.cv-foundation.org/openaccess/content_cvpr_2016/papers/Gatys_Image_Style_Transfer_CVPR_2016_paper.pdf).

- https://github.com/udacity/deep-learning-v2-pytorch/tree/master/style-transfer