{"id":16108404,"url":"https://github.com/zh-plus/code_library_python","last_synced_at":"2025-09-13T07:39:34.615Z","repository":{"id":113946032,"uuid":"160620195","full_name":"zh-plus/Code_Library_Python","owner":"zh-plus","description":"Elegant code library --- Python.","archived":false,"fork":false,"pushed_at":"2019-10-21T15:40:06.000Z","size":2425,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-10T20:46:25.911Z","etag":null,"topics":[],"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/zh-plus.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":"2018-12-06T04:49:02.000Z","updated_at":"2024-08-25T02:05:15.000Z","dependencies_parsed_at":"2023-04-04T13:02:20.165Z","dependency_job_id":null,"html_url":"https://github.com/zh-plus/Code_Library_Python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zh-plus/Code_Library_Python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zh-plus%2FCode_Library_Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zh-plus%2FCode_Library_Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zh-plus%2FCode_Library_Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zh-plus%2FCode_Library_Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zh-plus","download_url":"https://codeload.github.com/zh-plus/Code_Library_Python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zh-plus%2FCode_Library_Python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266856975,"owners_count":23995775,"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-24T02:00:09.469Z","response_time":99,"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":[],"created_at":"2024-10-09T19:26:42.042Z","updated_at":"2025-07-24T14:39:04.951Z","avatar_url":"https://github.com/zh-plus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hao Zheng's Algorithm Code Library.\n~~The very first reason I start this repo is preparing for google's SWE interview using Python.~~\nBut in order to keep my Java skills warm, I'll maintain a Java version of Code Library in [there](https://github.com/zh-plus/Code_Library_Java).\nAs a CS major student, I will try my best to make my implementation elegant in both of them.\n\nCurrently, there's Codeforces and CodeJam waiting for me.\n\n## Codeforces\nWell known OJ platform.\n\n#### Tips:\nIn order to pass the time-limited Codeforces tests, I recommend [PyPy 3.5 (6.0.0)](https://pypy.org/) as interpreter, which is several times \nfaster than origin Python interpreter nowadays(2018.12).\n\n\n## CodeJam\nGoogle OJ questions.\nAll the questions resolved currently can be retrieved on [Kick Start](https://codingcompetitions.withgoogle.com/kickstart/archive)\n\nThe input of almost all the questions is file, thus I reload the `input` as `input = lambda: input_file.readline().rstrip('\\n')`.\nHowever, the `print` is not reloaded since I want to see the output in the console. \n\nThere'll be other OJ involved in the future.\n\n#### template:\nThe python implementation of some common algorithms.\nMost of them originate from the sudo code of [Introduction to Algorithms, Third Edition](https://mitpress.mit.edu/books/introduction-algorithms-third-edition)\n\nIn order to illustrate their performance intuitively, there will be a comparison between my implementation and python implementation.\n\nBy the way, the `Timer` class from template/tool_kit.py is quite convenient for me. It is worth encasing your code into `Timer`\n```\nwith Timer():\n    # your code\n```\ninstead of \n```\nstart = perf_counter()\n# your code\nprint(perf_counter() - start, 's')\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzh-plus%2Fcode_library_python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzh-plus%2Fcode_library_python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzh-plus%2Fcode_library_python/lists"}