semvec/pypi-packages huggingface dataset:
montecarlosim 0.1.0
MonteCarlo simulation library
License: MIT
Requires Python: >=3.10.0,<4.0.0

# MonteCarlo simulation algorithm

## Installation
`pip install montecarlosim`

## Requirements
Python 3.10.0+
Currently working to introduce support to old version.

## Getting started
- Clone the repository the way you like;
- Create a virtualenv (with pyenv and virtualenv you can run `pyenv virtualenv 3.10.0 <name_you_like>`) otherwise install poetry and run `poetry install`, it will take care of the virtualenv itself;
- Now you can lunch the tests with `poetry run tests` and it will tests all environment inside tox.ini `envlist`;
- Create a branch, do your changes, push them and open a PR.

## Repository structure
Repository configuration files are:
- `pyproject.toml`;
- `tox.ini`, tests;
- `src`, contains the actual repository code;
- `src/montecarlo.py`, contains the Montecarlo class (where magic happens);
- `src/functions.py`, contains example functions to be used with Montecarlo class;
- `src/exceptions.py`, contains custom exception that are used to better handle errors;
- `tests`, contains python tests file that is launched by tox;
- `run_tests.py`, simple function that run `subprocess.run('tox')`.
fieldday 1.0.0
package for managing lists of fields for IoT
License: MIT
Requires Python: >=3.7

# FieldDay
Package for helping to manage groups of data fields, the kind that may be passed around an IoT system.

[FieldDay](https://github.com/jmfife/fieldday) offers the possibility of coding and decoding named fields as groups.
For example, if a list of json values is obtained from an IoT device, those fields
can easily be renamed, decoded, recoded, labeled with descriptions, and 
converted to different units.

## Installation

To install directly from GitHub:
```
python3 -m pip install "git+https://github.com/jmfife/fieldday.git#egg=fieldday[qty]"
```

If you have cloned or forked the repo already to your local directory and want to use it in live (editable mode):
```
python3 -m pip install -e ".[qty]"
```
Note in both cases above, the dependencies needed to use the pint-based data types (with built-in units) 
are also installed.

## Quickstart

Install the package from GitHub:
```
python3 -m pip install "git+https://github.com/jmfife/fieldday.git#egg=fieldday[qty]"
```

Example of loading a JSON payload with certain fields and field types expected, then taking advantage of the
extra dependency `qty` (see setup.py which associates `qty` with the `Pint` package under the hood) 
and converting the units on one of the fields from mV to V:
```
>>> import fieldday
>>> fieldtypes = {'V': (fieldday.FieldQty, {'desc': 'Battery voltage'}),
...               'L': (fieldday.FieldStr, {'desc': 'Load state'})}
>>> fieldset = fieldday.FieldSet('{"V": "12800 mV", "LOAD": "ON"}', field_types=fieldtypes)
>>> fieldset
{'V': FieldQty('12800 millivolt', 'Battery voltage', '', ''), 'LOAD': 'ON'}
>>> print(fieldset)
V: Battery voltage: 12800 millivolt
LOAD: ON
>>> fieldset.modify_fields({"V": lambda x: x.convert("V")})
>>> fieldset
{'V': FieldQty('12.8 volt', 'Battery voltage', '', ''), 'LOAD': 'ON'}
>>> print(fieldset)
V: Battery voltage: 12.8 volt
LOAD: ON
>>> fieldset.encode()
'{"V": "12.8 volt", "LOAD": "ON"}'
 ```