{"id":20281270,"url":"https://github.com/badouralix/adventofcode-2018","last_synced_at":"2025-04-11T06:38:33.271Z","repository":{"id":40984926,"uuid":"159889906","full_name":"badouralix/adventofcode-2018","owner":"badouralix","description":"Advent of Code 2018","archived":false,"fork":false,"pushed_at":"2024-05-03T20:47:31.000Z","size":5205,"stargazers_count":29,"open_issues_count":5,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-25T04:33:08.282Z","etag":null,"topics":["advent-of-code","advent-of-code-2018"],"latest_commit_sha":null,"homepage":"https://adventofcode.com/2018","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/badouralix.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-11-30T23:33:31.000Z","updated_at":"2024-02-19T15:26:41.000Z","dependencies_parsed_at":"2024-11-14T18:30:24.694Z","dependency_job_id":"115aa4b3-9142-46d1-807f-dfb1a4b51d64","html_url":"https://github.com/badouralix/adventofcode-2018","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/badouralix%2Fadventofcode-2018","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badouralix%2Fadventofcode-2018/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badouralix%2Fadventofcode-2018/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badouralix%2Fadventofcode-2018/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badouralix","download_url":"https://codeload.github.com/badouralix/adventofcode-2018/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248358547,"owners_count":21090401,"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":["advent-of-code","advent-of-code-2018"],"created_at":"2024-11-14T13:39:48.407Z","updated_at":"2025-04-11T06:38:33.251Z","avatar_url":"https://github.com/badouralix.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advent of code 2018 solutions\n\n⁣    🌟  \n    🎄  \n   🎄🎄  \n  🎄🎄🎄  \n 🎄🎄🎄🎄  \n🎄🎄🎄🎄🎄  \n  🎁🎁🎁\n\nThese are proposed solutions for the [Advent of Code 2018](http://adventofcode.com/2018).\n\nThe solutions are automatically tested with travis.\n\n[![Build Status](https://travis-ci.org/badouralix/advent-of-code-2018.svg?branch=master)](https://travis-ci.org/badouralix/advent-of-code-2018)\n\n## Usage\n\nuse `./aoc` script\n\n```text\nusage: aoc \u003ccommand\u003e [\u003cargs\u003e]\n\naoc commands are:\n   run      Runs submissions\n   create   Creates a new submission\n   config   Configures user's parameters\n```\n\n### Examples\n\n#### Run last problem\n\n```shell\n./aoc run\n```\n\n```shell\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nRunning submissions for day 04:\n\n* part 2:\n---------------------------------------------------\nAvg over all inputs\n---------------------------------------------------\n----------  ----------  -----------  ---\nsilvestre      78452        1.99 ms  py\ndegemer        43695        2.39 ms  py\njules          23037        2.49 ms  py\ndavid          36371        2.94 ms  py\nthomas          9763        2.97 ms  py\nayoub         136461        5.85 ms  cpp\nevqna          49137        6.65 ms  cpp\nbadouralix     51232        7.26 ms  go\ntpxp           41668      133.63 ms  rb\n----------  ----------  -----------  ---\n```\n\n#### Run specific problems from specific users\n\n```shell\n./aoc run -d 1 -d 2 -p 1 -a ayoub -a david\n```\n\n```shell\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nRunning submissions for day 01:\n\n* part 1:\n---------------------------------------------------\nAvg over all inputs\n---------------------------------------------------\n-----  -------  -----------  ---\ndavid    543        0.46 ms  py\nayoub    445        4.94 ms  cpp\n-----  -------  -----------  ---\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nRunning submissions for day 02:\n\n* part 1:\n---------------------------------------------------\nAvg over all inputs\n---------------------------------------------------\n-----  --------  -----------  ---\ndavid    5658        1.22 ms  py\nayoub    6448        4.84 ms  cpp\n-----  --------  -----------  ---\n```\n\nYou can use `-r` to run each submission on it's own input, or `-e` to print non-aggregated results.  \nsee `./aoc run -h` for full arguments description.\n\n## Contribute\n\nFor now we support `c`, `c++`, `java`, `javascript`, `go`, `python 3` (+ `cython`), `ruby`, `rust (stable)` and `bash` scripts.\n\nYou can use `./aoc create` tool to create a new empty submission:\n\n```text\nusage: aoc create [-h] [-a AUTHOR] [-d DAY] [-p PART]\n                  [-l {c,cpp,go,java,js,py,pyx,rb,rs,sh}]\n\nCreate a new submission\n\noptional arguments:\n  -a AUTHOR, --author AUTHOR\n                        submission author\n  -d DAY, --day DAY     problem day\n  -p PART, --part PART  problem part\n  -l {c,cpp,go,java,js,py,pyx,rb,rs,sh}, --language {c,cpp,go,java,js,py,pyx,rb,rs,sh}\n                        submission language\n```\n\nyou can also use `./aoc config` to setup your local profile\n\n```text\nusage: aoc config [-h] username {c,cpp,go,java,js,py,pyx,rb,rs,sh}\n\nConfigures user parameters\n\npositional arguments:\n  username              prefered username\n  {c,cpp,go,java,js,py,pyx,rb,rs,sh}\n                        prefered programming language\n```\n\n### Using python\n\nIf you don't use `create.py` tool you should follow this convention:\n\n```bash\nday-[number]/part-[number]/[username].py    # your submission code\nday-[number]/input/[username].txt           # your input file\n```\n\nYour submission code should inherit from the `SubmissionPy` class from `runners.python` module:\n\n```python\nfrom tool.runners.python import SubmissionPy\n\nclass MyAwesomeSubmission(SubmissionPy):\n\n    def run(self, s):\n        # :param s: input in string format\n        # :return: solution flag\n        pass\n```\n\nYou can add other functions \u0026 modules if you need to. Any external dependency should be added to `requirements.txt`.\n\nOnce you tested your solution you can submit it by making a PR.\n\n## History\n\n- [Advent of Code 2017](https://github.com/lypnol/adventofcode-2017)\n- [Advent of Code 2016](https://github.com/lypnol/adventofcode-2016)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadouralix%2Fadventofcode-2018","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadouralix%2Fadventofcode-2018","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadouralix%2Fadventofcode-2018/lists"}