{"id":23689207,"url":"https://github.com/zebraalgebra/flusim","last_synced_at":"2025-10-16T00:14:13.022Z","repository":{"id":210343806,"uuid":"726319660","full_name":"ZebraAlgebra/flusim","owner":"ZebraAlgebra","description":"Repo for python package flusim (uploaded to testpypi)","archived":false,"fork":false,"pushed_at":"2023-12-04T22:15:36.000Z","size":13481,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-30T00:37:44.021Z","etag":null,"topics":["markov-chain","python","simulation","testpypi"],"latest_commit_sha":null,"homepage":"https://test.pypi.org/project/flusim/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZebraAlgebra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-12-02T03:20:09.000Z","updated_at":"2023-12-04T22:17:21.000Z","dependencies_parsed_at":"2023-12-02T06:24:01.257Z","dependency_job_id":"1996be74-d110-4c84-908f-f35c63950fb6","html_url":"https://github.com/ZebraAlgebra/flusim","commit_stats":null,"previous_names":["zebraalgebra/flusim"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZebraAlgebra%2Fflusim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZebraAlgebra%2Fflusim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZebraAlgebra%2Fflusim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZebraAlgebra%2Fflusim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZebraAlgebra","download_url":"https://codeload.github.com/ZebraAlgebra/flusim/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239749066,"owners_count":19690376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["markov-chain","python","simulation","testpypi"],"created_at":"2024-12-30T00:37:53.282Z","updated_at":"2025-10-16T00:14:12.946Z","avatar_url":"https://github.com/ZebraAlgebra.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flusim\n\n## Overview\n\nThis repository holds the files for the `flu-sim` Python package. This is a package used for simulating, calculating and visualizing some statistics related to a simple flu-spread problem.\n\nFor example, one can visualize a single flu spread:\n\n![](img/demo_single.gif)\n\nor simulate a flu spread multiple times and plot the computed confidence intervals:\n\n![](img/demo_multiple.png)\n\nTo use this package, run\n\n```bash\npip install -i https://test.pypi.org/simple/ flusim\n```\n\nTo customize upon this package, clone this repository, and run:\n\n```bash\npython setup.py bdist_wheel sdist\npip install .\n```\n\n## Usage\n\nFor usage, please refer to this [link](https://github.com/ZebraAlgebra/flusim/blob/main/app/README.md).\n\nFor a demo, you may refer to this [Jupyter notbook](https://github.com/ZebraAlgebra/flusim/blob/main/notebooks/package_demo.ipynb) or preview the [generated HTML file](https://htmlpreview.github.io/?https://github.com/ZebraAlgebra/flusim/blob/main/notebooks/package_demo.html).\n\n## Problem Definition\n\nThe **flu-spread problem** is defined as follows.\nSuppose inside a closed environment, there are:\n\n1. `n + 1` people in it, labeled `0, 1, ..., n`\n2. no people sick before day `0`, and `k` people\n   sick at day `0`\n3. on each day, a sick person has a probability `p`\n   contaminating a healthy person\n4. these events are independent\n5. each person once get sick, will get healthy after\n   precisely `l` days\n\nthen the problem is to calculate the expectation, variance of:\n\n1. the end date of flu\n2. the number of sick people in each day\n\nThis problem can be formulated as a Markov process, and simulations, solvers can be designed to solve this question.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzebraalgebra%2Fflusim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzebraalgebra%2Fflusim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzebraalgebra%2Fflusim/lists"}