semvec/pypi-packages huggingface dataset:
mundane 0.1.1
Pythonic Money class. Correct. Type-safe. Matches expectations.
Requires Python: >=3.12

# mundane
Pythonic Money class. Correct. Type-safe. Matches expectations.

## Installation
```sh
pip install mundane
```

Required Python version: 3.12.

## Usage
```py
>>> from mundane import EUR, PLN, Money
>>> PLN(50) < PLN(100)
True
>>> PLN(50) < EUR(50)
TypeError: '<' not supported between money in 'PLN' and 'EUR'
>>> PLN(50) / 2
PLN('25')
>>> def do_something_with_money(money: Money):
...     print(money)
...
>>> do_something_with_money(PLN(25))
PLN 25
>>> do_something_with_money(EUR(50))
EUR 50
```

See [tests/test_money.py](tests/test_money.py) for more examples.

Supported operations (a and b are money instances with matching currency):
* a == b, a != b, a < b, a <= b, a > b, a >= b
* +a, -a, abs(a)
* a + b, a - b, 2 * a, a * 2, a / 2, a / b
* round(a), round(a, 2), math.trunc(a), math.floor(a), math.ceil(a)
* str(a), repr(a), hash(a)

## Define your own currency
```py
from mundane import TypedMoney

class BTC(TypedMoney):
    pass

print(BTC('0.0000000000000000000000000001'))
# BTC 0.0000000000000000000000000001
```
peer-measure 0.0.1
Implementation of the measure Probability of Equal Expected Rank
Requires Python: >=3.8

# Probably of Equal Expected Rank

This package is the Python implementation of the MLIR fairness measure 
"Probability of Equal Expected Rank" using `ir_measures`. 

## How to use it

You can either directly install it from PyPi through
```bash
pip install peer_measure
```

Or install the GitHub version
```bash
pip install pip@git+https://github.com/hltcoe/peer_measure
```

When importing, please import both `peer_measure` and `ir_measures`. 
```python
from peer_measure import PEER
import ir_measures
```

Please refer to the documentation of `ir_measures` for the general usage. 

## Parameters

`PEER` takes two required parameters: `weights` and `lang_mapping`. 
- `weights`: a int-to-float dictionary specifying the weight for each relevance level. The weight have be sum up to 1.0. 
- `lang_mapping`: a str-to-str dictionary with keys being the `doc_id` and values being the language id of the correspoding document. 

You can specify these parameters and the rank cutoff when declaring the measure instance. For example,
```python
measure = PEER(weights={0: 0, 1: 0.5, 2:0, 3: 0.5}, lang_mapping=...)@20
```

Please refer to our paper for detail definition and implication of the parameters. 

## Citation

Please consider citing our paper if you use this measure. 

```bibtex
@inproceedings{peer,
	author = {Eugene Yang and Thomas Jänich and James Mayfield and Dawn Lawrie},
	title = {Language Fairness in Multilingual Information Retrieval},
	booktitle = {Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR) (Short Paper) (Accepted)},
	year = {2024}, 
    doi = {10.1145/3626772.3657943}
}
```
newsly-mail 0.2
Send emails for a new Newsletter

The library newsly_mail allows you to send customized emails in your python project. 

1. Download the package from pip:

pip install newsly-mail

2. Import the send_email function from the library:

from newsly_mail import send_email

3. Send customized emails by calling the send_email function in your code:

send_email(
                sender_email='test@xyz.com',
                receiver_email=user.email,
                subject="Headline",
                body="Mail Body",
                smtp_server='smtp.xyz.com',
                smtp_port=SMTP_PORT,
                smtp_username='test@abc.com',
                smtp_password='*************'
            )