Skip to content

Code from my attempts at the Advent of Code challenges

Notifications You must be signed in to change notification settings

avaines/advent_of_code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code

This repository provides all my attempts at AdventOfCode puzzles, mainly in Python. As this is a once of year thing, this README is to remind me how it all works at the start of the year.

Features

  • Automatically creates directories for puzzles if they don't exist.
  • Fetches puzzle details (title and input) using Advent of Code API.
  • Supports setting up and using a Python virtual environment via pyenv.
  • Offers a Makefile for simplified project management.

Requirements

  • Python 3.12+
  • Pyenv

Setup

  1. Clone the repository.
  2. Install pyenv and set up the virtual environment:
    make setup

Usage

Fetch Today's Puzzle

To download and set up today's Advent of Code puzzle (if it's December):

make run

Fetch a Specific Puzzle

To download and set up a puzzle for a specific year and day:

make target YEAR=2026 DAY=1

Structure

  • Each year's puzzles are stored in ./<year>/<puzzle-title>.
  • Templates for each puzzle are stored in ./<year>/template/.

Notes

  • Ensure you have a valid Advent of Code session cookie to fetch puzzle details and inputs.
  • The script will prompt for the session cookie if not provided as a command-line argument.

Progress

2015

Day Part 1 Part 2
1
2
3
4
5
6

2018

Day Part 1 Part 2
1
2
3
4
5

2019

Day Part 1 Part 2
1
2
3
4
5
6
7
8
9
10
11

2020

Day Part 1 Part 2
1
2
3
4
5
6
7
8
9
10

2021

Turns out I am bad at JS, I got a blog post out of it though

Day Part 1 Part 2
1
2
3

2022

Day Part 1 Part 2
1
2
3
4
5
6
7
8
9
10
11

2023

Day Part 1 Part 2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

2024

Day Part 1 Part 2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

About

Code from my attempts at the Advent of Code challenges

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published