semvec/pypi-packages huggingface dataset:
sampy-abm 1.0.3
Library for ABM development in epidemiology.
Requires Python: >=3.8

Sampy is a library designed to simplify ABM development in epidemiology.

A proper documentation with tutorials, benchmarks and examples will be included in the 1.1 version (hopefully, during summer 2024).
In the meantime, the library's content is documented in the code.

More information is available as a preprint at:
https://www.preprints.org/manuscript/202211.0556/v2

If you have any question, modelling needs that the current version cannot support or if you want to contribute to the project, feel free to send a mail to 
sampy.project@gmail.com
xrframes 0.0.4
Similar to ``xmovie``, make animations from xarray objects.
Requires Python: ~=3.9

# xrframes

[![Version on PyPI](https://img.shields.io/pypi/v/xrframes.svg)](https://pypi.org/project/xrframes/)
[![Project Status: Concept – Minimal or no implementation has been done yet, or the repository is only intended to be a limited example, demo, or proof-of-concept.](https://www.repostatus.org/badges/latest/concept.svg)](https://www.repostatus.org/#concept)

Similar to (and inspired by) [jbusecke/xmovie](https://github.com/jbusecke/xmovie),
make animations from [xarray](https://xarray.dev/) objects
by applying a [matplotlib](https://matplotlib.org/)-based plotting function along a dimension.

## Install

```sh
pip install xrframes
```

Install and use Dask[^a] or joblib[^b] to parallelize the frame creation step.

`.to_gif()` uses ImageMagick (`magick` or `convert` required on PATH);
`.to_mp4()` uses FFmpeg (`ffmpeg` required on PATH).
Both are available via conda-forge[^c], as well as other package managers.

## Example

Basic example, using just the xarray object's plot method:

```python
import xarray as xr
from xrframes import Frames

# Note: `pooch` required
ta = xr.tutorial.open_dataset("air_temperature").air.isel(time=slice(0, 10))

frames = Frames(ta, lambda da: da.plot(size=2.5, aspect=1.7), dim="time")
frames.write(dpi=120)  # serial
frames.to_gif("./ta_basic.gif", fps=5)
```

A bit fancier example with the same data, using Cartopy:

```python
import cartopy.crs as ccrs
import cartopy.feature as cfeature
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import xarray as xr
from xrframes import Frames

# Note: `pooch` required
ta = xr.tutorial.open_dataset("air_temperature").air.isel(time=slice(0, 10))

proj = ccrs.Mercator()
tran = ccrs.PlateCarree()

def plot(da, **kwargs):
    fig, ax = plt.subplots(figsize=(6, 3), layout="constrained", subplot_kw=dict(projection=proj))

    ax.coastlines()
    ax.add_feature(cfeature.BORDERS)
    ax.add_feature(cfeature.STATES)
    ax.gridlines(draw_labels=True)

    da.plot.contourf(**kwargs, levels=np.arange(230, 305, 5), extend="both", ax=ax, transform=tran)

    ax.set_title("")
    ax.set_title(pd.Timestamp(da.time.item()).strftime(r"%Y-%m-%d %H:%M"), loc="left", size=10)

    return fig

frames = Frames(ta, plot, dim="time")
frames.write()  # serial
frames.to_mp4("./ta_cartopy.mp4", fps=5)
```

[^a]: `dask` on PyPI, `dask-core` on conda-forge, more info [here](https://docs.dask.org/en/stable/install.html)
[^b]: `joblib` on PyPI and on conda-forge
[^c]: `conda install -c conda-forge imagemagick ffmpeg`
modal-migrate 0.1.1
Migrate Modal codebases automatically.
Requires Python: >=3.8

# modal-migrate

[![PyPI - Version](https://img.shields.io/pypi/v/modal-migrate.svg)](https://pypi.org/project/modal-migrate)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/modal-migrate.svg)](https://pypi.org/project/modal-migrate)

-----

**Table of Contents**

- [Installation](#installation)
- [License](#license)

## Installation

```console
pip install modal-migrate
```

## License

`modal-migrate` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
surquest-split-balancer 0.0.6
A Python package for dividing a set of units into two most comparable groups based on their characteristics.

![GitHub](https://img.shields.io/github/license/surquest/python-split-balancer?style=flat-square)
![GitHub Workflow Status (with branch)](https://img.shields.io/github/actions/workflow/status/surquest/python-split-balancer/test.yml?branch=main&style=flat-square)
![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/surquest/373e1859cb547514516a8f22cd8f18a7/raw/python-split-balancer.json&style=flat-square)
![PyPI - Downloads](https://img.shields.io/pypi/dm/surquest-GCP-secret-assessor?style=flat-square)

# Introduction

This project provides a Python package and REST API applications for dividing a set of units into two most comparable groups based on their characteristics.

## Problem Statement

Balancing Numeric Characteristics Across Two Groups

### Input:

* A set of units, where each unit possesses one or more numeric characteristics.
* Desired size for each of the two groups.
* (Optional) Pre-assignment constraints:
    
   - Specify units that must belong to a particular group (Group A or Group B).
   - Specify units that cannot belong to a particular group (Group A or Group B).

### Objective:

Partition the units into two groups (Group A and Group B) of the specified size, ensuring maximum similarity between the groups. Similarity is measured by minimizing the sum of absolute differences in mean values for each characteristic across the two groups.

### Constraints:

* Each unit is assigned to either Group A, Group B, or remains unassigned.
* The final size of Group A and Group B must match the specified desired size.

### Output:

* A list of units assigned to Group A and Group B.
* The mean values for each characteristic in Group A and Group B.
* The sum of absolute differences in mean values for each characteristic across the two groups.


# Local development

You are more than welcome to contribute to this project. To make your start easier we have prepared a docker image with all the necessary tools to run it as interpreter for Pycharm or to run tests.


## Build docker image
```
docker build `
     --tag surquest/surquest/split-balancer:latest `
     --file package.base.dockerfile `
     --target test .
```


## Run docker container
```
docker run --rm -it `
 -v "${pwd}:/opt/project" `
 -w "/opt/project/test" `
 surquest/surquest/split-balancer:latest pytest
```


# REST API Quick Start

```powershell

# Build the docker image

docker build `
     --no-cache `
     --tag surquest/app-split-balancer:latest `
     --file app.base.dockerfile `
     --target base .

docker build `
     --no-cache `
     --tag python/instore/pmp-integration-proxy `
     --file app.base.dockerfile `
     --target app .

# Run the docker container
docker run --rm -it `
    --name pmp-integration-proxy `
    -v "$(pwd):/opt/project" `
    -p 1010:8080 surquest/app-split-balancer:latest
```
st-comments 0.0.14
Streamlit Component for Comments
Requires Python: >=3.6

# Streamlit Comments Component

This component display comments / notes in your app. I am using it in combination with a streamlit form to collect user feedback. The feedback is saved in an sql table. 

Check out the [live demo](tbd)!


## Installation

To install st_comments, you can use pip:

````
pip install st_comments
````

## Usage

To use the st_comments component, you just need to import it in your Streamlit script and call it like any other Streamlit function:
    
```` python
from st_comments import st_comments
````

```` python
def st_comments(comments,delete_keyword="", max_height="500px",custom_css="",key="st_comments",min_height="100px",
                custom_font_awesome_url = "https://kit.fontawesome.com/c7cbba6207.js", delete_user="all")
````

## Parameters

- **comments**: List of comments to be displayed. Default: [] <br>
```` python
#Example Input:
comments = [
    {"id": 1, "user": "User 1", "date": "2023-01-01", "text": "Comment 1"},
    {"id": 2, "user": "User 2", "date": "2023-01-02", "text": "Comment 2"},
    {"id": 3, "user": "User 3", "date": "2023-01-03", "text": "Comment 3"},
     {"id": 4, "user": "User 1", "date": "2023-01-01", "text": "Comment 1"},
    {"id": 5, "user": "User 2", "date": "2023-01-02", "text": "Comment 2"},
    {"id": 6, "user": "User 3", "date": "2023-01-03", "text": "Comment 3"},
]
````

- **delete_keyword**: Text that will be displayed in the delete button (accepts HTML). Default: "" <br>

- **max_height**: Maximum height of the component. Default: "500px" <br>

- **custom_css**: Custom CSS to be applied to the table. Can just be a string like  `.MuiTableCell-root {color:red;}`  Default: "". The text will be rendered in `<style>` tags above the component. <br>

- **key**: Key of the component. Default: "st_comments" <br>

- **min_height**: Minimum height of the component. Default: "100px" <br>

- **custom_font_awesome_url**: URL of the font awesome library. Default: "https://kit.fontawesome.com/c7cbba6207.js". <br>

- **delete_user**: If "all", all users can delete all comments. If "own", users can only delete their own comments. Default: "all", if "none" no comments can be deleted <br>

## Note worthy

"Deleting" a will not actually delete anything. What happens is that the comments will not be visible in the frontend anymore and that the component returns a the orginial input with the deleted comment missing.
poetry-demo-jcc-v1 0.1.2
J'son's first Poetry attempt! Just the How Long process wrapper.
Requires Python: <4.0,>=3.9

=============================================
how_long - JCC First Poetry project, v1, yay!
=============================================

Simple Decorator to measure a function execution time.

Example
_______

.. code-block:: python

    from how_long import timer


    @timer
    def some_function():
        return [x for x in range(10_000_000)]