Go to file
Tibor Bizjak da8778d527 Added day 15 2023-03-14 22:07:11 +01:00
input Added input directory 2023-03-14 00:07:15 +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 Renamed solver to main 2023-03-14 00:13:50 +01:00
day04.py Added shebang to files 2023-03-13 23:36:25 +01:00
day05.py Added shebang to files 2023-03-13 23:36:25 +01:00
day06.py Renamed solver to main 2023-03-14 00:13:50 +01:00
day07.py Refactored with Interpreter.pipe_from 2023-03-14 12:45:17 +01:00
day08.py Added shebang to files 2023-03-13 23:36:25 +01:00
day09.py Renamed solver to main 2023-03-14 00:13:50 +01:00
day10.py Fixed deprecated imports. Now works with pypy3. Added pypy3 to README 2023-03-14 12:52:27 +01:00
day11.py Removed old import 2023-03-14 00:15:33 +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 Added day 15 2023-03-14 22:07:11 +01:00
intcode.py Added pipes to intcode 2023-03-14 12:44:43 +01:00
lib.py Added memoize to lib 2023-03-14 12:44:57 +01:00
main.py Added code to download user input by session key 2023-03-14 18:02:48 +01:00
scrapper.py Added code to download user input by session key 2023-03-14 18:02:48 +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