{"id":47803173,"url":"https://github.com/jtreeves/advent_of_code_2025_solutions","last_synced_at":"2026-04-03T17:16:30.617Z","repository":{"id":327015826,"uuid":"1107403691","full_name":"jtreeves/advent_of_code_2025_solutions","owner":"jtreeves","description":"Python solutions for the 2025 Advent of Code problems","archived":false,"fork":false,"pushed_at":"2025-12-01T07:46:59.000Z","size":131,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-03T18:49:31.203Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/jtreeves.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-01T04:59:18.000Z","updated_at":"2025-12-01T07:47:02.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jtreeves/advent_of_code_2025_solutions","commit_stats":null,"previous_names":["jtreeves/advent_of_code_2025_solutions"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/jtreeves/advent_of_code_2025_solutions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtreeves%2Fadvent_of_code_2025_solutions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtreeves%2Fadvent_of_code_2025_solutions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtreeves%2Fadvent_of_code_2025_solutions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtreeves%2Fadvent_of_code_2025_solutions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jtreeves","download_url":"https://codeload.github.com/jtreeves/advent_of_code_2025_solutions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jtreeves%2Fadvent_of_code_2025_solutions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31365424,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T17:13:05.644Z","status":"ssl_error","status_checked_at":"2026-04-03T17:13:04.413Z","response_time":107,"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":[],"created_at":"2026-04-03T17:16:29.535Z","updated_at":"2026-04-03T17:16:30.612Z","avatar_url":"https://github.com/jtreeves.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advent of Code: 2025 - Solutions\n\n_My solutions to the annual challenge problems_\n\nThis repo contains my solutions to the **Advent of Code** challenge problems from [2025](https://adventofcode.com/2025). The code is written in **Python**.\n\n## Setup\n\n### Prerequisites\n\n-   Python3 (v3.11.4 ideally): `python3 --version`\n\n### Installation\n\n1.  Clone this repository: `git clone https://github.com/jtreeves/advent_of_code_2025_solutions.git`\n2.  Enter the newly created directory, then create an environment for it: `python3 -m venv aocenv`\n3.  Activate the new environment: `source aocenv/bin/activate`\n4.  Install requirements: `pip3 install -r requirements.txt`\n\n## Viewing the Solutions\n\n-   Ensure the environment is active: `source aocenv/bin/activate`\n-   From the root of the repo, run the `main.py` file, with a positional argument for the day to run: `python3 main.py 1` (substituting the specific day for `1`)\n-   Optionally, provide an additional boolean positional argument to select between viewing solutions from the practice data or the final data, where `True` is for the final data and `False` is for the practice data: `python3 main.py 1 False` (if not provided, it defaults to `True`)\n-   Each solution printed will indicate its day and provide the values for both parts 1 and 2, along with a cumulative execution time\n\nExample solution summary:\n\n```\nDAY 1 SOLUTIONS\nPart 1: 55712\nPart 2: 55413\nTotal execution time: 0.009216785430908203 seconds\n```\n\n-   To view solutions for all days up to and including today, omit the day positional argument: `python3 main.py`\n-   To deactivate the environment after working with this repo: `deactivate`\n\n## Code Analysis\n\nUnlike most coding challenge approaches, this repo is written more like a library, with type annotations for documentation, and it uses a more OOP approach overall.\n\n### General Patterns\n\n-   snake_case used for file names unless the file is for a class, in which case PascalCase is used\n-   each day has its own folder for its solution\n-   strong type annotation is used throughout\n-   OOP approach utilized over a more direct functional programming approach\n-   verbose variables used instead of single-character alternatives\n-   abstraction orients itself around the problem statement as opposed to the attempting to reduce functionality to bitwise operations\n\n### Key Folders and Files\n\n-   files at the root\n    -   `main.py`: module entry point for repo, exposing the `print_solution_for_day` function\n    -   `setup.cfg`: indicates any deviations from PEP 8 default styling rules\n    -   `pyrightconfig.json`: indicates any deviations from Pyright default type-checking rules\n-   `day_` folders for each day's files (e.g., `day_1`)\n    -   `solution.py`: code for solving that day's problem\n    -   `data.txt`: puzzle input, individuated by AOC for each user\n    -   `practice.txt`: general test input, provided by AOC in the initial question\n-   `utils` folder for reusable code\n    -   classes for common objects, indicated by PascalCase names (e.g., `SolutionResults.py`)\n    -   granular functions for common tasks, indicated by snake_case names (e.g., `extract_data_from_file.py`)\n\n### Code Examples\n\n**Reusable class for working with coordinate pairs containing some sort of content in `utils/Cell.py`**\n\n```py\nclass Cell:\n    def __init__(self, x: int, y: int, content: str) -\u003e None:\n        self.x = x\n        self.y = y\n        self.content = content\n\n    def __repr__(self) -\u003e str:\n        return f\"({self.x}, {self.y}): {self.content}\"\n\n    def __hash__(self) -\u003e int:\n        return hash((self.x, self.y))\n\n    def __eq__(self, other: object) -\u003e bool:\n        if isinstance(other, Cell):\n            if self.x == other.x and self.y == other.y:\n                return True\n            else:\n                return False\n        else:\n            return False\n\n    def has_identical_x(self, other: object) -\u003e bool:\n        if isinstance(other, Cell):\n            return self.x == other.x\n        else:\n            return False\n\n    def has_identical_y(self, other: object) -\u003e bool:\n        if isinstance(other, Cell):\n            return self.y == other.y\n        else:\n            return False\n```\n\n**Finds a sequence of cells containing digits from a grid in `day_3/solution.py`**\n\n```py\ndef find_part_number(self, core_cell: Cell) -\u003e PartNumber:\n    cells: List[Cell] = [core_cell]\n    left_cell = self.grid.get_left_cell(core_cell)\n    right_cell = self.grid.get_right_cell(core_cell)\n    while left_cell is not None and left_cell.content.isdigit():\n        cells.insert(0, left_cell)\n        left_cell = self.grid.get_left_cell(left_cell)\n    while right_cell is not None and right_cell.content.isdigit():\n        cells.append(right_cell)\n        right_cell = self.grid.get_right_cell(right_cell)\n    part_number = PartNumber(cells)\n    return part_number\n```\n\n## Future Goals\n\nI would to include solutions to each day's problems in multiple programming languages, with different versions emphasizing that specific language's unique idioms. If time permits, I would like to add these:\n\n-   C\n-   Java\n-   Ruby\n-   PHP\n-   Perl\n-   Lisp\n-   Scala\n-   Go\n-   Rust\n-   Haskell\n-   Fortran\n\nIt would be cute to orient it as 12 Coding Languages of Christmas, if I end up being able to add all of them. If I really wanted to stretch, I could somehow do 25 languages total and include things like SQL.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjtreeves%2Fadvent_of_code_2025_solutions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjtreeves%2Fadvent_of_code_2025_solutions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjtreeves%2Fadvent_of_code_2025_solutions/lists"}