My solutions to Advent of Code 2022
- Setup python environment
# create venv
virtualenv venv
# install requirements
pip install -r requirements.txt
- Copy and fill environment variables into .env file
cp .env.sample .env
I'm using https://github.com/direnv/direnv to automatically drop me into the Python virtual environment
- solve each day in the correct directory
cp -r day00 $DAY
- create directory for a new problemaoc-download-input
- download the input into$DAY/input.txt
- implement solution in the
compute
function pytest part1.py
- run part1 testspython part1.py input.txt
- run the part1 script directlypython part1.py input.txt | aoc-submit --part 1
- submit answer for part1cp part1.py part2.py
- copy part1 script into part2
pre-commit install
Inspired by https://github.com/anthonywritescode/aoc2022 and https://youtu.be/CZZLCeRya74
Developed under the MIT license.