Go to file
Tibor Bizjak 4d0f594c03 Added python3 shebangs 2023-03-20 08:50:40 +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 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 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 Rewrote intcode in iterator style 2023-03-15 18:20:23 +01:00
day08.py Added shebang to files 2023-03-13 23:36:25 +01:00
day09.py Rewrote intcode in iterator style 2023-03-15 18:20:23 +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 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 Added day 16 2023-03-14 22:14:48 +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
intcode.py Rewrote intcode in iterator style 2023-03-15 18:20:23 +01:00
lib.py Rewrote intcode in iterator style 2023-03-15 18:20:23 +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