aoc

Advent of Code
git clone https://git.pngu.org/aoc
Log | Files | Refs | README

commit a614a9cf2bc18134b4f58551b4116aa9263b5341
parent b75dee23d9302386a6227079b064e198dc6d922c
Author: Jack Sangdahl <jack@pngu.org>
Date:   Thu,  4 Dec 2025 10:20:15 +0100

Add readme

Diffstat:
Areadme.md | 25+++++++++++++++++++++++++
1 file changed, 25 insertions(+), 0 deletions(-)

diff --git a/readme.md b/readme.md @@ -0,0 +1,25 @@ +## Advent of Code + +This repository contains Python solutions for [AoC][https://adventofcode.com] for years 2020 - 2025. + +Run from the top level by specifying the day. Most recent years set the input in the code itself: +``` +$ python 2025/1_2025.py +1078 +6412 +``` + +The [`data.py`](data.py) script can be used to automatically fetch the daily input. This script depends on `python-dotenv` to read your cookie from a `.env` file: +```sh +# .env + +SESSION_ID=371fe5f3a0bb53914c8f8e97adfe06a7 +``` + +In Firefox (and probably similarly in mostly other browsers), this cookie can be found by... + +1. After signing in, open any input page (eg. [adventofcode.com/2025/day/1/input](https://adventofcode.com/2025/day/1/input)) +2. Right click -> Accessibility Properties -> Network -> Reload +3. Click on one of the network requests and under "Cookies" tab on right, copy `session` cookie + +This running this script will fetch the input file (timezone agnostically) and open a Python file and the data file in `$EDITOR`.