/aoc-2023

Solution for Advent of Code 2023

Primary LanguagePython

Advent of Code 2023 Solutions

Library used for data: https://github.com/wimglenn/advent-of-code-data.

Main things:

  • Fetch your token (help)
  • Save the value in ~/.config/aocd/token

Downloading inputs

# Today's data
aocd > in.txt

# Data of a specific puzzle
aocd 3 2020 > in.txt

Starting a new day

There's a script to start a new day:

./new_day.sh $day_number

Running the script will create a new folder with the template files for a Python solution under python/<day_number>.

Running the solutions

  • Go to the directory of the day you want to run (e.g. cd python/04)
  • Run python sol.py to run the solution against your individual input
  • ... or run python sol.py X to run the solution against the input stored in the file sX.txt in the same directory

Shortcut for starting a day:

./new_day.sh X && cd python/XX && code sol.py