/advent-of-code

Advent of Code Solutions

Primary LanguagePythonThe UnlicenseUnlicense

Advent of Code

My solutions for Advent of Code.

Run solutions by passing the year, day and puzzle input like so:

$ python aoc <year> <day> [input]

If no input is provided, and you have a .token file in the root of the project, the script will attempt to automatically download your puzzle input from the Advent of Code website. Steps to get your session token are in the Puzzle Input Tip section below.

Solutions

2015
2019
2021
2022
2023

Puzzle Input Tip

If you have your Advent of Code session token saved to a file like .token, you can download your test input with curl:

$ curl "https://adventofcode.com/2022/day/1/input" \
       --header "Cookie: $(cat .token)"

You can find your session token by looking at the Cookie header in the network tab in your browser tools when navigating to https://adventofcode.com/2022/day/1/input. Save the value of this Cookie header in .token. e.g.

session=XXXX