advent-of-code/2019-python
Anders Ytterström d9142068ea Solve 2019:09 "Sensor Boost"
This was a hard one. I would not have made it
without r/adventofcode where all assertions
in __main__ were fetched. For values it was
straight forward enough, but for some reason
it did not work for positioning.

I still do not understand how one is supposed to
chew the WALL OF TEXT each day of 2019 and figure
out these stuffs on your own.

It took 10-12 hours to solve part 1. AoC day 9
is no joke.

Links that helped me:

- https://www.reddit.com/r/adventofcode/comments/e8aw9j/2019_day_9_part_1_how_to_fix_203_error/
- https://www.reddit.com/r/adventofcode/comments/jr9xrn/comment/gbwr85k/
2023-12-19 14:51:11 +01:00
..
output Solve 2019:09 "Sensor Boost" 2023-12-19 14:51:11 +01:00
.gitignore Initiate AoC 2019 in python 2023-12-19 14:51:11 +01:00
aoc.py Solve 2019:09 "Sensor Boost" 2023-12-19 14:51:11 +01:00
README.md Initiate AoC 2019 in python 2023-12-19 14:51:11 +01:00

Advent of Code 2019

Solutions for #aoc2019 in Python 3 (3.11.5).

Help scripts

Display all solved puzzles:

python aoc.py

To bootstrap a new puzzle (creates input/<day_no>.txt and output/day_<day_no>.py):

python aoc.py <dag_no> "<puzzle_name>"

Manually copy the puzzle input from https://adventofcode.com and paste it in input/<day_no>.txt to start coding.

Solve separate puzzle (replace XX with the puzzle number):

python -m output.day_XX

Solve separate puzzle using stdin (replace XX with the puzzle number):

xclip -selection clipboard -o | python -m output.day_XX
cat tmpfile | python -m output.day_XX

Execute separate puzzle on file save (replace XX with the puzzle number):

ls output/*.py | entr -c -s 'xclip -selection clipboard -o | python -m output.day_XX'
ls output/*.py | entr -c -s 'cat tmpfile | python -m output.day_XX'
ls output/*.py | entr -c -r python -m output.day_XX

(requires entr and xclip, Mac users can instead use pbpaste)