{"id":22206387,"url":"https://github.com/manik2000/drinker-fate-analysis","last_synced_at":"2025-07-28T01:34:41.355Z","repository":{"id":155219839,"uuid":"423145862","full_name":"Manik2000/drinker-fate-analysis","owner":"Manik2000","description":"Dash application with modelling the chances of safe-home return of a heavy drinker.","archived":false,"fork":false,"pushed_at":"2023-09-14T21:51:08.000Z","size":8869,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T03:36:40.932Z","etag":null,"topics":["dash","python","stochastic-processes"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Manik2000.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-31T12:47:07.000Z","updated_at":"2023-09-14T21:51:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"1bde0401-ce9e-4355-8534-7fbff0c3f599","html_url":"https://github.com/Manik2000/drinker-fate-analysis","commit_stats":null,"previous_names":["manik2000/drinker-fate-analysis"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Manik2000/drinker-fate-analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Manik2000%2Fdrinker-fate-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Manik2000%2Fdrinker-fate-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Manik2000%2Fdrinker-fate-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Manik2000%2Fdrinker-fate-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Manik2000","download_url":"https://codeload.github.com/Manik2000/drinker-fate-analysis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Manik2000%2Fdrinker-fate-analysis/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267451144,"owners_count":24089293,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["dash","python","stochastic-processes"],"created_at":"2024-12-02T18:11:40.684Z","updated_at":"2025-07-28T01:34:41.331Z","avatar_url":"https://github.com/Manik2000.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Drinker fate analysis\n\nDash application with modelling the chances of safe-home return of a heavy drinker.\n\n![](images/application_view.png)\n\nThe motion of the drinker is modelled as a 2D Brownian motion $\\mathbf{B}_t$ with drift $\\mathbf{v}$, so:\n\n$$\n\\left(x_t, y_t\\right) = \\left(\\mathbf{B}^{(1)}_t + \\mathbf{v}^{(1)}, \\mathbf{B}^{(2)}_t + \\mathbf{v}^{(2)}\\right).\n$$\n\nCars appear at random, according to mixed Poisson process jump times (distribution used for modelling is simply uniform distribution). Cars move with constant speed.\n\n---\n## Files description\n\n* `analysis.ipynb` contains conclusions from many simulations perfomed for different sets of parameters.\n* `app.py` implements Dash application in which user can run the simluations for chosen parameters and check the fate of the drinker with their own eyes thanks to animation.\n* `scripts/animation.py` contains a function creating Plotly animation.\n* `scripts/utils.py` contains classes `Car` and `Drinker` and mixed Poisson generating functions.\n* `scripts/simulation.py` contains function that returns the trajectories of a drinker and cars for chosen simulation parameters.\n\n---\n## Running the app\n\nIf you want to run the Dash application, please install packages listed in `requirements.txt` and run command\n```shell\npython app.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanik2000%2Fdrinker-fate-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanik2000%2Fdrinker-fate-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanik2000%2Fdrinker-fate-analysis/lists"}