{"id":22437299,"url":"https://github.com/hacsoc/codegolf","last_synced_at":"2025-08-01T15:32:07.903Z","repository":{"id":3058280,"uuid":"4080320","full_name":"hacsoc/codegolf","owner":"hacsoc","description":"Code Golf Submission Repo","archived":false,"fork":false,"pushed_at":"2012-04-24T06:00:46.000Z","size":3594,"stargazers_count":9,"open_issues_count":0,"forks_count":8,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-08T02:21:25.293Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":false,"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/hacsoc.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}},"created_at":"2012-04-19T21:15:59.000Z","updated_at":"2017-07-05T19:23:22.000Z","dependencies_parsed_at":"2022-09-19T12:23:10.563Z","dependency_job_id":null,"html_url":"https://github.com/hacsoc/codegolf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hacsoc/codegolf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacsoc%2Fcodegolf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacsoc%2Fcodegolf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacsoc%2Fcodegolf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacsoc%2Fcodegolf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hacsoc","download_url":"https://codeload.github.com/hacsoc/codegolf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacsoc%2Fcodegolf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268250703,"owners_count":24219918,"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-08-01T02:00:08.611Z","response_time":67,"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-12-06T00:12:25.493Z","updated_at":"2025-08-01T15:32:07.610Z","avatar_url":"https://github.com/hacsoc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Code Golf Submission Repo\n=========================\n\nWe will be using this repo to submit the code for codegolf on Saturday April 21, 2012.\n\nRunning the Harness\n===================\n\n(not on linux? try harness\\_dumb.py)\n\nby Example:\n\n    $ python harness.py -d ../hacsoc_code_golf/ -r /tmp/results/results.micro python index.py /tmp/reviews/reviews.micro \n\nby Format:\n    \n    $ python harness.py -d \u003cdirectory of you code\u003e -r \u003cpath to results\u003e [your program] \u003cpath to reviews\u003e\n\nInterface\n=========\n\ncommand line arguments:\n\n    program path/to/reviews\n\nexample:\n\n    python index.py /tmp/reviews.micro\n\nindex phase\n-----------\n\nyou can write anything you want to stderr and stdout EXCEPT `\u003e` as soon as it\nsees a newline character the harness enters \"query phase\"\n\n\nquery phase\n-----------\n\nexample code: (python)\n\n    sys.stdout.flush()\n    while True:\n      sys.stdout.write('\u003e '); sys.stdout.flush()\n      try: inpt = sys.stdin.readline()\n      except: break;\n      if not inpt: continue\n      inpt = clean(inpt)\n      inpt = inpt.split()\n      query(*inpt)\n    sys.stdout.flush()\n\nwhat happens:\n\n- you write a `\u003e` to the stdout this is the \"prompt\"\n- then you read a line from the stdin\n- you do your query\n- you collect all the revids put them in a list\n- encode the list [\"revid1\", \"revid2\", ....] eg. as a json list\n- write the encoded list to the stdout\n\nClean Function\n==============\n\n    def clean(text):\n      return (\n          text\n          .lower()\n          .replace('/', '')\n          .replace('(', '')\n          .replace(')', '')\n          .replace(')', '')\n          .replace(':', '')\n          .replace('.', '')\n          .replace(',', '')\n          .replace(';', '')\n          .replace(';', '')\n          .replace('?', ' ?')\n          .replace('!', ' !')\n          .replace('-', ' - '))\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhacsoc%2Fcodegolf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhacsoc%2Fcodegolf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhacsoc%2Fcodegolf/lists"}