AoC2021
is a set of python solutions for the
Advent of Code 2021 problems.
To solve a specific day, you can use solve
, passing in the input file for
the current day using poetry.
poetry run aoc2021 inputs/day01.txt
Or pass in multiple days to solve multiple inputs.
poetry run aoc2021 inputs/*
You can automatically download the input for a given day by setting your session cookie in an environment variable:
export AOC_SESSION=[your session]
Then using the helper function, e.g. for today's input:
> from aoc2021.helpers import *
> get_input()