semvec/pypi-packages huggingface dataset:
myresume 0.0.0
MyResume
License: MIT
Requires Python: >=3.7,<4.0

# MyResume

[![PyPI](https://img.shields.io/pypi/v/myresume.svg)][pypi_]
[![Status](https://img.shields.io/pypi/status/myresume.svg)][status]
[![Python Version](https://img.shields.io/pypi/pyversions/myresume)][python version]
[![License](https://img.shields.io/pypi/l/myresume)][license]

[![Read the documentation at https://myresume.readthedocs.io/](https://img.shields.io/readthedocs/myresume/latest.svg?label=Read%20the%20Docs)][read the docs]
[![Tests](https://github.com/56kyle/myresume/workflows/Tests/badge.svg)][tests]
[![Codecov](https://codecov.io/gh/56kyle/myresume/branch/main/graph/badge.svg)][codecov]

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit]
[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)][black]

[pypi_]: https://pypi.org/project/myresume/
[status]: https://pypi.org/project/myresume/
[python version]: https://pypi.org/project/myresume
[read the docs]: https://myresume.readthedocs.io/
[tests]: https://github.com/56kyle/myresume/actions?workflow=Tests
[codecov]: https://app.codecov.io/gh/56kyle/myresume
[pre-commit]: https://github.com/pre-commit/pre-commit
[black]: https://github.com/psf/black

## Features

- TODO

## Requirements

- TODO

## Installation

You can install _MyResume_ via [pip] from [PyPI]:

```console
$ pip install myresume
```

## Usage

Please see the [Command-line Reference] for details.

## Contributing

Contributions are very welcome.
To learn more, see the [Contributor Guide].

## License

Distributed under the terms of the [MIT license][license],
_MyResume_ is free and open source software.

## Issues

If you encounter any problems,
please [file an issue] along with a detailed description.

## Credits

This project was generated from [@cjolowicz]'s [Hypermodern Python Cookiecutter] template.

[@cjolowicz]: https://github.com/cjolowicz
[pypi]: https://pypi.org/
[hypermodern python cookiecutter]: https://github.com/cjolowicz/cookiecutter-hypermodern-python
[file an issue]: https://github.com/56kyle/myresume/issues
[pip]: https://pip.pypa.io/

<!-- github-only -->

[license]: https://github.com/56kyle/myresume/blob/main/LICENSE
[contributor guide]: https://github.com/56kyle/myresume/blob/main/CONTRIBUTING.md
[command-line reference]: https://myresume.readthedocs.io/en/latest/usage.html
modulos 0.2.0
Simple python library for modulo operations
License: MIT
Requires Python: >=3.5

# Modulos

Simple pure Python library implementing modulo operations

![Tests](https://github.com/samhanic/modulos/actions/workflows/tests.yml/badge.svg)

## Purpose

Modulo operation implement remainder of a division, based on this simple formula, with an integer quotient:
$$ dividend = divisor * quotient + remainder$$

However, as quotient can be any integer, multiple definitions of modulo can outputs different result, depending of the implementation used. This can be seen with math.fmod which explicitely says that it may have different output from % symbol.

This library fixes that by adding 5 different implementations of the operation :

* Euclidean modulo (output smallest positive remainder. Probably the one you're looking for if you're coming from mathematical background)
* Rounded modulo (output closest to zero remainder)
* Floored modulo (output remainder with same sign as divisor)
* Truncated modulo (outputs remainder with same sign as dividend)
* Ceiled modulo (outputs remainder with opposite sign as divisor)

This may be useful for (but not limited to):

* Port code from another language implementing different definition of modulo
* Use specific mathematical properties of a definition (especially euclidean or rounded)
* Use same mathematical definition for integers and floats values

## Example

```python
from modulos.modulos import euclidean_modulo, rounded_modulo, floored_modulo, ceiled_modulo, truncated_modulo

print(f"{euclidean_modulo(5,3)=}")
print(f"{rounded_modulo(5,3)=}")
print(f"{floored_modulo(5,3)=}")
print(f"{truncated_modulo(5,3)=}")
print(f"{ceiled_modulo(5,3)=}")

```

### Why would I use these library when Python math library already contains some of its functions ?

Contrary to math.fmod (for truncated modulo) and math.remainder (for rounded modulo), this library keeps same type as inputs (if both are same type).
This can be particularly interesting when working with Decimal library, to avoid rounding issues.

Be aware that this means this library does not cast values from the types they were in. Generally it does not cause any issue, but if your dividend and divisor types does not support division between them, you will have to manually perform the cast. This is for example the case between Decimal built-in library and Numpy types. It does also mean it does not correct roundness issues within float.

## Contributions

You're welcome to contribute to the source code by opening issue or pull request ;)  

A basic test setup have been implemented, here are the steps to run the unit tests on a linux environment:

```bash
cd modulos
python3 -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install -e .
pip install -r requirements_dev.txt
pytest
```