This repository contains my solutions to the Advent of Code puzzles. Each folder contains all the Python solutions for a given year, and each file contains the solution for a given day.
Advent of Code is an Advent calendar of small programming puzzles that has been running since 2015. The puzzles are released daily, and each puzzle is unlocked after the previous one is solved. The puzzles are designed to be solved in any programming language.
I'm using this repository to have fun using python syntax and learn new and interesting way of solving problems. If you are not afraid of oneliners and/or pythonic code, you are welcome to have a look at the code.
The project uses uv to manage dependencies and virtual environments, but you can also use
pip or your global python installation if you have the packages listed in pyproject.toml
installed. To install the
project packages, run:
uv sync
Before running the solution, you must add your input in the correct folder with the name input
.
While being in a python env, you can run each day's solution with ./main.py
directly from the day's folder. Otherwise,
use uv run main.py
.
To generate the directory for the current day, save your session cookie in the session_cookie
file and run
./generate.py dd
.
The project uses ruff for linting and formating the code. You can use ruff format
to format and ruff check
to lint
The contents of this repository are covered under the MIT License.