Go to file
Tibor Bizjak 38923eb7a7 Final refactoring for days 1-10 2023-03-20 23:58:44 +01:00
input Removed trailing spaces in input files 2023-03-15 00:43:23 +01:00
LICENSE Added License 2023-03-13 23:38:46 +01:00
README.md Fixed README 2023-03-14 18:33:21 +01:00
day01.py Renamed solver to main 2023-03-14 00:13:50 +01:00
day02.py Renamed solver to main 2023-03-14 00:13:50 +01:00
day03.py Final refactoring for days 1-10 2023-03-20 23:58:44 +01:00
day04.py Added shebang to files 2023-03-13 23:36:25 +01:00
day05.py Rewrote intcode in iterator style 2023-03-15 18:20:23 +01:00
day06.py Renamed solver to main 2023-03-14 00:13:50 +01:00
day07.py Final refactoring for days 1-10 2023-03-20 23:58:44 +01:00
day08.py Final refactoring for days 1-10 2023-03-20 23:58:44 +01:00
day09.py Rewrote intcode in iterator style 2023-03-15 18:20:23 +01:00
day10.py Final refactoring for days 1-10 2023-03-20 23:58:44 +01:00
day11.py Rewrote intcode in iterator style 2023-03-15 18:20:23 +01:00
day12.py Fixed import issue for python <3.9 2023-03-14 16:17:27 +01:00
day14.py Added day 14 2023-03-14 00:58:34 +01:00
day15.py Rewrote intcode in iterator style 2023-03-15 18:20:23 +01:00
day16.py Optimized day 16 2023-03-20 18:37:27 +01:00
day18.py Added python3 shebangs 2023-03-20 08:50:40 +01:00
day19.py Added python3 shebangs 2023-03-20 08:50:40 +01:00
day20.py Added python3 shebangs 2023-03-20 08:50:40 +01:00
day21.py Added python3 shebangs 2023-03-20 08:50:40 +01:00
day22.py Added python3 shebangs 2023-03-20 08:50:40 +01:00
day24.py Added python3 shebangs 2023-03-20 08:50:40 +01:00
day25.py Added day 25 and added repl class to intcode 2023-03-20 11:37:19 +01:00
intcode.py Added day 25 and added repl class to intcode 2023-03-20 11:37:19 +01:00
lib.py Final refactoring for days 1-10 2023-03-20 23:58:44 +01:00
main.py Fixed scraper import 2023-03-20 09:12:26 +01:00
scraper.py Fixed typo 2023-03-20 08:56:33 +01:00

README.md

Advent of Code 2019

Solutions to Advent of Code 2019 in Python 3.

Usage

To solve all puzzles with implemented solutions run

$ python3 main.py 

For faster execution use pypy3

$ pypy3 main.py

or make the main program executable.

$ chmod +x main.py
$ ./main.py

To download your puzzle inputs (the inputs are different for each user), run ./main.py --fetch-session and input your session key. The session key can be found by inspecting the headers of a HTTP request made from a browser on which the user is logged in. The HTTP request header in question has the following format : Cookie : session=key.

For other options see ./main.py -h.

$ ./main.py -h
usage: main.py [-h] [-d DAY[-DAY]] [-i INPUT] [-t]

Solves Advent of Code 2019 puzzles. The puzzles are available at
https://adventofcode.com/2019/

optional arguments:
  -h, --help            show this help message and exit
  -d DAY[-DAY], --day DAY[-DAY]
                        solve puzzle of day DAY or of range DAY-DAY
  -i INPUT, --input INPUT
                        use INPUT as puzzle input
  -t, --test            run tests