{"id":15578541,"url":"https://github.com/chomelc/millennium-falcon-challenge","last_synced_at":"2026-05-08T10:36:59.422Z","repository":{"id":219780617,"uuid":"499490275","full_name":"chomelc/millennium-falcon-challenge","owner":"chomelc","description":"A web application to compute and display the odds that the Millennium Falcon reaches Endor in time and saves the galaxy.","archived":false,"fork":false,"pushed_at":"2022-06-11T22:02:45.000Z","size":410,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-09T22:36:10.309Z","etag":null,"topics":["angular","cli","flask-restx","python"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chomelc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-06-03T11:44:16.000Z","updated_at":"2024-01-29T15:21:40.000Z","dependencies_parsed_at":"2024-01-29T19:52:53.399Z","dependency_job_id":null,"html_url":"https://github.com/chomelc/millennium-falcon-challenge","commit_stats":null,"previous_names":["chomelc/millennium-falcon-challenge"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chomelc/millennium-falcon-challenge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chomelc%2Fmillennium-falcon-challenge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chomelc%2Fmillennium-falcon-challenge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chomelc%2Fmillennium-falcon-challenge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chomelc%2Fmillennium-falcon-challenge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chomelc","download_url":"https://codeload.github.com/chomelc/millennium-falcon-challenge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chomelc%2Fmillennium-falcon-challenge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32776982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["angular","cli","flask-restx","python"],"created_at":"2024-10-02T19:11:24.844Z","updated_at":"2026-05-08T10:36:59.402Z","avatar_url":"https://github.com/chomelc.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :rocket: Millennium Falcon Challenge @ [Dataiku](https://www.dataiku.com/)\n\n:book: [Project's Specification](https://github.com/dataiku/millenium-falcon-challenge)\n\n**Before anything else, please add the following lines to your RUNCOM (`.bashrc`, `.zshrc`, etc. depending on your shell) file:**\n\n```shell\nexport MFC_PATH=~/\u003cpath_to_this_folder\u003e\nsource $MFC_PATH/cli/give-me-the-odds.sh\n```\n\n**You will then need to open a new shell for changes to take effect.**\n\n---\n\n## :floppy_disk: Database Creation \u0026 Population\n\nThe following command creates and populates the `universe.db` database based on `universe.sql`:\n\n```bash\ncat universe.sql | sqlite3 universe.db\n```\n\n_**Note:** this command doesn't need to be run if you do not modify `universe.sql`, since the database is already initialized in this repo._\n\nThe `ROUTES` table of `universe.db` contains the following data:\n\n|  origin  | destination | travel_time |\n| :------: | :---------: | :---------: |\n| Tatooine |   Dagobah   |      6      |\n| Dagobah  |    Endor    |      4      |\n| Dagobah  |    Hoth     |      1      |\n|   Hoth   |    Endor    |      1      |\n| Tatooine |    Hoth     |      6      |\n\n---\n\n## :gear: Backend\n\n**Navigate to `/backend`.**\n\n### :bookmark_tabs: Dependencies\n\n- [Python 3](https://www.python.org/downloads/)\n- [Flask](https://flask.palletsprojects.com/en/1.1.x/)\n- [Flask-RESTX](https://flask-restx.readthedocs.io/en/latest/index.html)\n- [Flask-CORS](https://flask-cors.readthedocs.io/en/latest/)\n- [pytest](https://docs.pytest.org/en/6.2.x/contents.html)\n- [NetworkX](https://networkx.org/)\n\nInstall all the dependencies locally with:\n\n```bash\npip3 install -r requirements.txt\n```\n\n### :gear: Launching the backend\n\nLaunch the backend with:\n\n```bash\npython3 app.py\n```\n\nAnd navigate to http://localhost:5000/ to explore the [Swagger](https://swagger.io/) documentation of the backend RESTful API.\n\n### :white_check_mark: Unit testing\n\nRun the following command to run [pytest](https://docs.pytest.org/en/6.2.x/contents.html)'s unit tests:\n\n```bash\npython3 -m pytest --no-header --no-summary -v\n```\n\nAll tests should pass and print the following content to the console:\n\n```bash\n============================= test session starts ==============================\ncollected 4 items\n\nbackend/tests/gmto_test.py::TestComputeOdds::test_first_sample PASSED    [ 25%]\nbackend/tests/gmto_test.py::TestComputeOdds::test_fourth_sample PASSED   [ 50%]\nbackend/tests/gmto_test.py::TestComputeOdds::test_second_sample PASSED   [ 75%]\nbackend/tests/gmto_test.py::TestComputeOdds::test_third_sample PASSED    [100%]\n\n============================== 4 passed in 0.04s ===============================\n```\n\n---\n\n## :round_pushpin: Frontend\n\n**Navigate to `/frontend`.**\n\n:gear: _This frontend app was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.3.5._\n\n:art: _UI inspiration from [rémi on CodePen](https://codepen.io/remsrob/pen/ZRyqNx)._\n\n### :gear: Running the app\n\nInstall or update dependencies with:\n\n```bash\nnpm install\n```\n\nRun `npm run start` for a dev server and navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.\n\nMake sure the backend is running on http://localhost:5000/.\n\n### :eyes: Application overview\n\n![Millennium Falcon Dashboard](frontend/src/assets/gmto-screenshot.png)\n\nWhen landing on the application you will be able to:\n\n- visualize the data from `unvierse.db` - ie. the different routes and the corresponding travel time between each planet of the universe ;\n- upload an `empire.json` file containing the data intercepted by the rebels about the plans of the Empire to compute the odds of the mission's success.\n\n  The `empire.json` file should follow this format:\n\n  ```json\n  {\n    \"countdown\": 6,\n    \"bounty_hunters\": [\n      { \"planet\": \"Tatooine\", \"day\": 4 },\n      { \"planet\": \"Dagobah\", \"day\": 5 }\n    ]\n  }\n  ```\n\n  Some sample `empire.json` files are located in `sample-data/`.\n\n---\n\n## CLI\n\nYou can use the `give-me-the-odds` command:\n\n`give-me-the-odds \u003cmillennium-falcon.json\u003e \u003cempire.json\u003e` will return the probability of success of the mission as a number ranging from 0 to 100.\n\nIt takes 2 file paths as input - respectively the paths toward the `millennium-falcon.json` and `empire.json` files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchomelc%2Fmillennium-falcon-challenge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchomelc%2Fmillennium-falcon-challenge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchomelc%2Fmillennium-falcon-challenge/lists"}