Skip to content

apolichronopoulos/adventofcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

adventofcode

Personal repository for advent of code challenges

Starting this year, there will be 12 days of puzzles each December.

1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12

1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 24 - 25

1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 24 - 25

Development Setup

brew install pyenv pyenv-virtualenv pre-commit scarvalhojr/tap/aoc-cli

Python

Create a pyenv with custom requirements

pyenv virtualenv 3.12 aoc
pyenv local aoc

Update requirements

cd ./python
pip install -r requirements.txt
pip install --upgrade pip

Run puzzles

Use pyenv (or any other python env you want)

pyenv local aoc

Run specific puzzle

cd ./python && year=2024 && day=01
python -m ${year}.puzzle_${year}_${day} ../puzzles

Run all puzzles

Run as module

cd ./python
year=$(date -v -11m +%Y)
for day in {01..25}
do
  python -m ${year}.puzzle_${year}_${day} ../puzzles
done

or include path, to use utils

cd ./python
export PYTHONPATH=$(pwd)
year=$(date -v -11m +%Y)
for day in {01..25}
do
  python ./${year}/puzzle_${year}_${day}.py ../puzzles
done

aoc-cli

Download puzzle description and/or input using aoc-cli

Note: to use authenticated requests put your session token in ~/.adventofcode.session

AOC_YEAR=2025 AOC_DAYS=12 ./scripts/download-aoc-files.sh

About

Personal repository for advent of code challenges

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published