Skip to content

gereleth/AdventOfCode2022

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code 2022

My python solutions for all days of Advent Of Code 2022.

Prerequisites

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

Layout

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.

Usage

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

Animations

Some days include code to produce matplotlib animations illustrating the solution.

You can see them by running

python src/dayX.py

Solve times

Solve times from a single run on my computer. Available also as a csv file.

Solve times horizontal bar chart