{"id":22901163,"url":"https://github.com/d-w-arnold/python-hackerrank","last_synced_at":"2025-04-01T05:41:33.693Z","repository":{"id":110635948,"uuid":"415049505","full_name":"d-w-arnold/python-hackerrank","owner":"d-w-arnold","description":"Solutions to Python problems on hackerrank.com 🔐 🌎","archived":false,"fork":false,"pushed_at":"2024-12-03T22:22:14.000Z","size":78,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-07T03:41:48.837Z","etag":null,"topics":["hackerrank","hackerrank-solutions","problem-solving","python","unittest"],"latest_commit_sha":null,"homepage":"https://hackerrank.com","language":"Python","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/d-w-arnold.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,"publiccode":null,"codemeta":null}},"created_at":"2021-10-08T16:05:09.000Z","updated_at":"2024-12-03T22:22:18.000Z","dependencies_parsed_at":"2025-02-07T03:41:29.504Z","dependency_job_id":"0da4cfaa-4631-4bbf-8ae4-a7888ab02a96","html_url":"https://github.com/d-w-arnold/python-hackerrank","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-w-arnold%2Fpython-hackerrank","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-w-arnold%2Fpython-hackerrank/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-w-arnold%2Fpython-hackerrank/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-w-arnold%2Fpython-hackerrank/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d-w-arnold","download_url":"https://codeload.github.com/d-w-arnold/python-hackerrank/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246591782,"owners_count":20801984,"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":["hackerrank","hackerrank-solutions","problem-solving","python","unittest"],"created_at":"2024-12-14T01:32:06.571Z","updated_at":"2025-04-01T05:41:33.670Z","avatar_url":"https://github.com/d-w-arnold.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python HackerRank Solutions\n\n[My HackerRank Profile](https://www.hackerrank.com/dwarnold)\n\nNB. I have other solutions in [Java](https://github.com/d-w-arnold/java-hackerrank) that pre-date this repo ^_^\n\nThe `src` directory contains a hierarchy of Python solutions for different HackerRank problems.\n\nThe `tests` directory contains a hierarchy of unit test classes, with each unit test class corresponding to a specific\nHackerRank problem.\n\n### Run all Unit Tests\n\n```shell\npython -m unittest discover -s \u003cPATH_TO_REPO\u003e/python-hackerrank/tests\n```\n\n### Add Git Hooks\n\nSee `pre-push` shell script in `hooks/`. When pushing to the `main` branch, a push is only successful when all unit\ntests pass.\n\nTo utilise this `pre-push` git hook, run the following commands in the project root directory:\n\n```shell\n# Copy all repo git hooks, into the `.git/hooks/` dir.\ncp -av hooks/* .git/hooks\n\n# Set all git hooks to executable, if not already set.\nchmod +x .git/hooks/*\n```\n\n### Generate Python packages for both `src` and `tests` directories\n\nIn `main.py`, see `generate_packages()` function.\n\nCan be run with `main()` method:\n\n```shell\npython main.py --sep \"/\" --path InterviewPreparationKit/Miscellaneous\npython main.py --sep \".\" --path InterviewPreparationKit.Miscellaneous\n```\n\nResult (Will create each if they each do not already exist):\n\n```text\nsrc/InterviewPreparationKit/\nsrc/InterviewPreparationKit/__init__.py\nsrc/InterviewPreparationKit/Miscellaneous/\nsrc/InterviewPreparationKit/Miscellaneous/__init__.py\ntests/InterviewPreparationKit/\ntests/InterviewPreparationKit/__init__.py\ntests/InterviewPreparationKit/Miscellaneous/\ntests/InterviewPreparationKit/Miscellaneous/__init__.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-w-arnold%2Fpython-hackerrank","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd-w-arnold%2Fpython-hackerrank","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-w-arnold%2Fpython-hackerrank/lists"}