{"id":29126384,"url":"https://github.com/tkr-sh/customcodingameclient","last_synced_at":"2026-02-25T22:04:40.515Z","repository":{"id":153721204,"uuid":"630438256","full_name":"tkr-sh/CustomCodinGameClient","owner":"tkr-sh","description":"This is a custom client for codingame","archived":false,"fork":false,"pushed_at":"2023-05-14T14:10:14.000Z","size":309,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-29T23:05:07.565Z","etag":null,"topics":["client","codingame","docker","proxy"],"latest_commit_sha":null,"homepage":"","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/tkr-sh.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}},"created_at":"2023-04-20T11:34:41.000Z","updated_at":"2023-07-11T14:08:12.000Z","dependencies_parsed_at":"2023-06-30T04:45:21.153Z","dependency_job_id":null,"html_url":"https://github.com/tkr-sh/CustomCodinGameClient","commit_stats":null,"previous_names":["tkr-sh/customcodingameclient"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tkr-sh/CustomCodinGameClient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkr-sh%2FCustomCodinGameClient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkr-sh%2FCustomCodinGameClient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkr-sh%2FCustomCodinGameClient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkr-sh%2FCustomCodinGameClient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkr-sh","download_url":"https://codeload.github.com/tkr-sh/CustomCodinGameClient/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkr-sh%2FCustomCodinGameClient/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29842897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T21:18:31.832Z","status":"ssl_error","status_checked_at":"2026-02-25T21:18:29.265Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["client","codingame","docker","proxy"],"created_at":"2025-06-29T23:05:04.417Z","updated_at":"2026-02-25T22:04:40.497Z","avatar_url":"https://github.com/tkr-sh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cp style='text-align: center; margin: 0; padding: 0'\u003eCustomCodinGameClient\u003c/p\u003e\n\nThis codingame client is not fully replaceable by the original codingame client.\nIt is, for the moment, complementary to the original website.\n\nHere is what this client adds:\n\n- A shorter version of python for fastest and reverse. This modified version of python, modifies the AST of your original code to add, transform some built-in classes like int, list or str into an extended version of these classes.\n- A way to test the code locally (without hidden test cases) by simply pressing a key, [RSHIFT] (by default). As well as a way to submit the code to the server by pressing a key [RCTRL] (by default) \n- A way to automatically receive the problem you are facing with a more sober HTML and a more basic display, which always shows the test cases you missed first.\n  \n\n## How does it work?\n### Shorter python\nAs said before, there is a \"modified\" version of python in this client. But what makes it useful, is that it's also written in python and therefore it's possible to translate the code of the modified version of the code, to a real python code. \n\nAll that logic is made in `translate_ast.py`.\n\nIn this shorter python there is also some new built-ins functions and some operators have new meanings.\n\nFor example `0@10` is the same as `range(0,10)`. (Operators overloading in python are annoying, so I wasn't able to overload `:` for example.)\n\n- In `prog.py` it's the program that you write\n- In `classes.py` is everything related to the modified classes.\n- In `default_values.py` there are a lot of built-ins default_values.\n- In `functions.py` there is everything related to the functions.\n- In `translate_ast.py` the program modifies the AST of prog.py, default_values.py and functions.py. After that, it merges all of them, and add classes.py at the top, with some extra text. And now... the program is a valid python program!\n- In `./test/*` there are all the files that tests a function. You can run all the tests with `./test_all.sh`\n  \nIf you don't want to read all the code, you can read `documentation.md` that explain all the new features of this Python superset.\n\n## Installation\nThe installation isn't the easiest part.\nThere are a lot of things to do for that client to work.\n\n### Docker\nTo test the code locally, you will have to install docker, to run the programs in a new environment that is always the same.\n\nDebian:\n```sh\nsudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin\n```\n\nArch:\n```sh\nsudo pacman -S docker\n```\n\nGentoo:\n```sh\nsudo emerge -av app-emulation/docker\n```\n\nAfter that, you will need to build the Dockerfiles.\nIn `./Docker` there is a `build.sh` program.\nYou can just do `./Docker/build.sh \u003clang\u003e` with lang being python or ruby.\n\n### Python libraries\nYou will also have to install libraries for the programs to work.\nAll the required librairies are in REQUIREMENTS.txt.\nYou can install them with\n```sh\npip install -r REQUIREMENTS.txt\n```\n\n### Cookies and .env\nNow, you will need to get the cookie of your account.\nTo do so, you can `Ctrl + Shift + I`, go on Network, click on almost any XHR request, and in Request Headers, you should see the raw cookies.\n\n\n\u003cdiv style=\"width: 100%;\"\u003e\n    \u003cimg src=\"assets/firefox.png\" style=\"width: 49%\"\u003e\n    \u003cimg src=\"assets/chromium.png\" style=\"width: 49%\"\u003e\n\u003c/div\u003e\n\nCopy them. This is what authenticate you. So don't share them to anyone else.\n\nAfter that you copied them, create a `.env` file that follows the same syntax as `template.env` and in `COOKIE`, paste the cookie.\n\nLast thing that you need to do, is to get the ID of your account.\nIn most request, it's just going to be the first argument of the Payload / Request.\nIts in this format: 1234567.\nIn the .env, the ID should be the ID of your account that you just got.\n\n\n\n### Proxy\nNow the part about intercepting requests.\nIf the program can know when the clash is launched, it is thanks to a proxy.\nFor the interception of requests, the tool used is `mitmproxy`, which as its name indicates, is not necessarily made for that, however, it largely does the job.\nYou can find more informations on how to install it at \nhttps://mitmproxy.org/\n\nIn this program we're going to use the CLI interface with the python API.\n\n\nFor mitmproxy to work, you'll need your browser to listen to the proxy created by mitmproxy.\nYou can find more information on that here: https://docs.mitmproxy.org/stable/overview-getting-started/\n\nWhen everything is configured that, as well as the previous steps are done, you can now move on to how to use the program\n\n\n\n## Usage\n\nFirst, you will need to start 2 programs.\n- `key.py`. With `python3 key.py`. This program will listen for the key press, and when (r_shit, r_ctrl) are pressed, will automatically (test the code locally, submit it). (Note: if the test in local are all OK and that you are in fastest of reverse, the code will automatically be submitted.)\n- `listener.py`. With `mitmproxy -s listener.py`. This will launch a program that will listen to your requests with mitmproxy.\nEach time a request comes in, it will execute the `response` function. This function will then see if the response gives any information about the problem.\nIf it does, then it will get the information about the problem, get the test cases, and open a new window with the problem.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkr-sh%2Fcustomcodingameclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkr-sh%2Fcustomcodingameclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkr-sh%2Fcustomcodingameclient/lists"}