{"id":17001433,"url":"https://github.com/alexaegis/advent-of-code","last_synced_at":"2025-04-06T02:07:17.241Z","repository":{"id":34179079,"uuid":"161316257","full_name":"AlexAegis/advent-of-code","owner":"AlexAegis","description":"My solutions for Advent of Code","archived":false,"fork":false,"pushed_at":"2025-01-01T17:03:34.000Z","size":6232,"stargazers_count":67,"open_issues_count":1,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-30T01:04:53.561Z","etag":null,"topics":["advent-of-code","advent-of-code-2015","advent-of-code-2016","advent-of-code-2017","advent-of-code-2018","advent-of-code-2019","advent-of-code-2020","advent-of-code-2021","advent-of-code-2022","advent-of-code-2023","advent-of-code-javascript","advent-of-code-python","advent-of-code-rust","advent-of-code-typescript","python","rust","typescript"],"latest_commit_sha":null,"homepage":"https://adventofcode.com/","language":"TypeScript","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/AlexAegis.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/funding.yml","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},"funding":{"github":[],"patreon":null,"open_collective":null,"ko_fi":"AlexAegis","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":"AlexAegis","custom":["https://paypal.me/alexaegis"]}},"created_at":"2018-12-11T10:22:20.000Z","updated_at":"2025-03-17T02:38:03.000Z","dependencies_parsed_at":"2025-01-28T01:11:00.504Z","dependency_job_id":"97ee26c1-22fa-472c-b421-0d0c9d1af2f7","html_url":"https://github.com/AlexAegis/advent-of-code","commit_stats":{"total_commits":879,"total_committers":5,"mean_commits":175.8,"dds":"0.012514220705347023","last_synced_commit":"4a318deb4835bb7f19d27d3b7d91ec1136c94a5a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexAegis%2Fadvent-of-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexAegis%2Fadvent-of-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexAegis%2Fadvent-of-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexAegis%2Fadvent-of-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexAegis","download_url":"https://codeload.github.com/AlexAegis/advent-of-code/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423512,"owners_count":20936626,"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-2015","advent-of-code-2016","advent-of-code-2017","advent-of-code-2018","advent-of-code-2019","advent-of-code-2020","advent-of-code-2021","advent-of-code-2022","advent-of-code-2023","advent-of-code-javascript","advent-of-code-python","advent-of-code-rust","advent-of-code-typescript","python","rust","typescript"],"created_at":"2024-10-14T04:24:55.654Z","updated_at":"2025-04-06T02:07:17.221Z","avatar_url":"https://github.com/AlexAegis.png","language":"TypeScript","funding_links":["https://ko-fi.com/AlexAegis","https://otechie.com/AlexAegis","https://paypal.me/alexaegis"],"categories":[],"sub_categories":[],"readme":"# [Advent of Code](https://adventofcode.com/)\n\n[![typescript ci](https://github.com/AlexAegis/advent-of-code/actions/workflows/cicd.yml/badge.svg)](https://github.com/AlexAegis/advent-of-code/actions/workflows/cicd.yml)\n[![rust ci](https://github.com/AlexAegis/advent-of-code/actions/workflows/rust.yml/badge.svg)](https://github.com/AlexAegis/advent-of-code/actions/workflows/rust.yml)\n[![python ci](https://github.com/AlexAegis/advent-of-code/actions/workflows/python.yml/badge.svg)](https://github.com/AlexAegis/advent-of-code/actions/workflows/python.yml)\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/b135807698614bf19dab83afeac9bd15)](https://www.codacy.com/gh/AlexAegis/advent-of-code/dashboard?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=AlexAegis/advent-of-code\u0026utm_campaign=Badge_Grade)\n[![Maintainability](https://api.codeclimate.com/v1/badges/5df3d3d67dfe389dc929/maintainability)](https://codeclimate.com/github/AlexAegis/advent-of-code/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/5df3d3d67dfe389dc929/test_coverage)](https://codeclimate.com/github/AlexAegis/advent-of-code/test_coverage)\n[![codecov](https://img.shields.io/codecov/c/github/AlexAegis/advent-of-code.svg?label=node%20coverage)](https://codecov.io/gh/AlexAegis/advent-of-code)\n[![Coverage Status](https://img.shields.io/coveralls/github/AlexAegis/advent-of-code.svg?label=rust%20coverage)](https://coveralls.io/github/AlexAegis/advent-of-code?branch=master)\n\n[![Last commit on GitHub](https://img.shields.io/github/last-commit/AlexAegis/advent-of-code.svg)](https://github.com/AlexAegis/advent-of-code)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n\n\u003e This is a multi-language repository, for easy usage, all of them share the\n\u003e same root level. You need to individually set up each language you wish to\n\u003e use.\n\n## Usage\n\nThe repository does not contain task inputs as my own inputs are located in a\nprivate repository. If you wish to use this repository with your own inputs\nprovide them in the following folder structure:\n\n```sh\nresources\n├── 2015\n│   ├── 01\n│   │   └── input.txt\n│   ├── 02\n│   │   └── input.txt\n│   │  ...\n│   └── 25\n│       └── input.txt\n│   ...\n└── 2024\n    ├── 01\n    │   ├── example.1.txt\n    │   ├── example.2.txt\n    │   └── input.txt\n    │  ...\n    └── 25\n        └── input.txt\n```\n\n### Cloning\n\n\u003e Reference for myself, cloning with my private inputs\n\n```sh\ngit clone --recurse-submodules -j8 git@github.com:AlexAegis/advent-of-code.git\n```\n\n[Why and how](#working-with-private-files)\n\n## [TypeScript](./solutions/typescript)\n\n[![2024 TypeScript Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/typescript/2024.json)](/solutions/typescript/2024/)\n[![2023 TypeScript Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/typescript/2023.json)](/solutions/typescript/2023/)\n[![2022 TypeScript Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/typescript/2022.json)](/solutions/typescript/2022/)\n[![2021 TypeScript Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/typescript/2021.json)](/solutions/typescript/2021/)\n[![2020 TypeScript Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/typescript/2020.json)](/solutions/typescript/2020/)\n[![2019 TypeScript Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/typescript/2019.json)](/solutions/typescript/2019/)\n[![2018 TypeScript Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/typescript/2018.json)](/solutions/typescript/2018/)\n[![2017 TypeScript Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/typescript/2017.json)](/solutions/typescript/2017/)\n[![2016 TypeScript Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/typescript/2016.json)](/solutions/typescript/2016/)\n[![2015 TypeScript Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/typescript/2015.json)](/solutions/typescript/2015/)\n\n### Setup TypeScript workspace\n\nInstall latest stable `node` and `pnpm`\n\n```sh\npnpm install\n```\n\n### Running individual TypeScript solutions\n\n```sh\n# Navigate to the solution\ncd solutions/typescript/2024/01\npnpm p1\npnpm p2\n```\n\n### Debugging TypeScript solutions using VS Code\n\nOpen the solutions file, then run the `[TS] Current File` debug profile.\n\n### Testing all TypeScript solutions\n\n```sh\npnpm test\n```\n\n### Testing individual TypeScript solutions\n\n```sh\n# Navigate to the solution\ncd solutions/typescript/2024/01\npnpm test\n```\n\n### Benchmarking individual TypeScript solutions\n\n```sh\n# Navigate to the solution\ncd solutions/typescript/2024/01\npnpm bench\n```\n\n### Linting all TypeScript solutions\n\n```sh\npnpm lint\n```\n\n### Linting individual TypeScript solutions\n\n```sh\n# Navigate to the solution\ncd solutions/typescript/2024/01\npnpm lint:tsc\npnpm lint:es\npnpm lint:format\n```\n\n## [Rust](./solutions/rust)\n\n![2024 Rust Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/rust/2024.json)\n![2023 Rust Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/rust/2023.json)\n![2022 Rust Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/rust/2022.json)\n![2021 Rust Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/rust/2021.json)\n![2020 Rust Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/rust/2020.json)\n[![2019 Rust Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/rust/2019.json)](/solutions/rust/2019/)\n[![2018 Rust Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/rust/2018.json)](/solutions/rust/2018/)\n[![2017 Rust Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/rust/2017.json)](/solutions/rust/2017/)\n[![2016 Rust Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/rust/2016.json)](/solutions/rust/2016/)\n[![2015 Rust Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/rust/2015.json)](/solutions/rust/2015/)\n\n## [Python](./solutions/python)\n\n![2024 Python Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/python/2024.json)\n![2023 Python Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/python/2023.json)\n[![2022 Python Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/python/2022.json)](/solutions/python/year2022/)\n![2021 Python Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/python/2021.json)\n![2020 Python Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/python/2020.json)\n![2019 Python Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/python/2019.json)\n![2018 Python Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/python/2018.json)\n![2017 Python Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/python/2017.json)\n![2016 Python Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/python/2016.json)\n![2015 Python Progress](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/AlexAegis/advent-of-code/master/.github/badges/python/2015.json)\n\n### Setup Python workspace\n\nInstall latest stable `python` and `pipenv`\n\n```sh\npipenv install\npipenv shell\n```\n\n## Working with private files\n\nIf you wish to replicate the same input setup that I have so that it's compliant\nwith [Advent of Code](https://adventofcode.com/)'s rules, you should not keep\nyour inputs in a publicly hosted repository. I think the best solution to this\nis to keep them in a private submodule, keeping your inputs private, but your\nsolutions public and keeping your CI happy and operational.\n\n### Why?\n\nSee the _\"Can I copy/redistribute part of Advent of Code?\"_ section at\n\u003chttps://adventofcode.com/2023/about\u003e\n\n### How?\n\n1. Collect your input files into a new \"advent-of-code-inputs\" repository\n\n2. Get a fresh clone of your repository!\n\n3. [Install `git-filter-repo`](https://github.com/newren/git-filter-repo/blob/main/INSTALL.md)\n\n   \u003e You will completely rewrite your repository's history, so first educate\n   \u003e yourself on how\n   \u003e [`git-filter-repo`](https://github.com/newren/git-filter-repo) works. (The\n   \u003e tool you might find for this first is the BFG Repo cleaner, however\n   \u003e git-filter-repo is much more capable and can clean out huge repositories in\n   \u003e just milliseconds.)\n\n4. Clean out the repository:\n   `git filter-repo --invert-paths --path-glob '*.txt' --path inputs`\n\n   \u003e This is just an example command, add more globs or paths if needed\n\n5. Verify that apart from the unwanted files everything is in order. Check older\n   commits too!\n\n   \u003e Maybe in previous years you stored these files differently, and/or you\n   \u003e refactored them at some point!\n\n6. Add back your inputs as a git submodule:\n\n   ```sh\n   git submodule add git@github.com:AlexAegis/advent-of-code-inputs.git resources\n   git commit -m 'added inputs submodule'\n   ```\n\n7. Adjust your CI so that it checks out submodules too.\n\n   \u003e If you're using GitHub Actions and actions/checkout:\n\n   ```yaml\n   - name: checkout\n     uses: actions/checkout@v4\n     with:\n       fetch-depth: 1\n       submodules: true\n   ```\n\n8. Verify if everything works locally\n\n9. If everything looks right, re-add your remote and force push the changes.\n   (Since you started with a fresh clone, your old can be used to restore it if\n   anything goes wrong at any point)\n\n   ```sh\n   git remote add origin git@github.com:AlexAegis/advent-of-code.git\n   git push --force\n   ```\n\n10. Clean out remaining branches by either force pushing them too or just\n    removing them.\n\n## Disclaimer\n\n[Advent of Code](https://adventofcode.com/) is made by\n[Eric Wastl](http://was.tl/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexaegis%2Fadvent-of-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexaegis%2Fadvent-of-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexaegis%2Fadvent-of-code/lists"}