{"id":18810089,"url":"https://github.com/pokle/coding-exercise-traffic-counter","last_synced_at":"2026-01-10T15:30:14.130Z","repository":{"id":137101757,"uuid":"134933303","full_name":"pokle/coding-exercise-traffic-counter","owner":"pokle","description":"Stats about cars that pass a traffic counter 🚗🚙","archived":false,"fork":false,"pushed_at":"2018-05-28T10:33:49.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-29T23:24:30.316Z","etag":null,"topics":["coding-exercise"],"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/pokle.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":"2018-05-26T05:49:06.000Z","updated_at":"2018-05-27T15:04:41.000Z","dependencies_parsed_at":"2023-06-26T01:54:02.415Z","dependency_job_id":null,"html_url":"https://github.com/pokle/coding-exercise-traffic-counter","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/pokle%2Fcoding-exercise-traffic-counter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pokle%2Fcoding-exercise-traffic-counter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pokle%2Fcoding-exercise-traffic-counter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pokle%2Fcoding-exercise-traffic-counter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pokle","download_url":"https://codeload.github.com/pokle/coding-exercise-traffic-counter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239743985,"owners_count":19689581,"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":["coding-exercise"],"created_at":"2024-11-07T23:18:52.282Z","updated_at":"2026-01-10T15:30:14.087Z","avatar_url":"https://github.com/pokle.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Traffic counter\n[![Build Status](https://travis-ci.org/pokle/coding-exercise-traffic-counter.svg?branch=master)](https://travis-ci.org/pokle/coding-exercise-traffic-counter)\n- Single pass line by line streaming (tested on a large file)\n    - Constant memory usage ~12mb ram\n    - Can process about 130,000 lines/second on my 2013 macbook pro.\n- Current bottleneck is CPU.\n\n## Running it\nEnsure you have python 3 installed (brew install python3)\n\nVerify everything's in order by running the tests: `make test`\n\nThen you're good to go:\n\n```\n$ python3 traffic_report.py data.file\n## Count of cars grouped by date\n2016-12-01 179\n2016-12-05 81\n2016-12-08 134\n2016-12-09 4\n## Total cars =  398\n## Top 3 half hours\n2016-12-01T07:30:00 46\n2016-12-01T08:00:00 42\n2016-12-08T18:00:00 33\n## 1.5 hour period with ​least​ cars = 20 cars [2016-12-01T15:00:00 .. 2016-12-01T23:30:00]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpokle%2Fcoding-exercise-traffic-counter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpokle%2Fcoding-exercise-traffic-counter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpokle%2Fcoding-exercise-traffic-counter/lists"}