My python solutions for all days of Advent Of Code 2022.
I ran this code on python 3.10.8. It might work on other python 3 versions too.
Create a virtual environment and install dependencies.
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Code for each day is in src/day{i}.py
.
Inputs for each day are in inputs/day{i}/test.txt
and inputs/day{i}/task.txt
.
Solve all tasks:
python src/solve.py
Solve particular day:
python src/solve.py --day {day}
Other options:
--test
- run on test input--day {day} --input {filepath}
- run on a specified input file
Some days include code to produce matplotlib animations illustrating the solution.
You can see them by running
python src/dayX.py
Solve times from a single run on my computer. Available also as a csv file.