Implementations for Advent of Code 2020
These are intended to be quick solutions. So generally there aren't tests or any of the other things one would add for a production system. I'm storing here just for my own recollection.
Some notes on how to run these:
-
Done at command line: Instructions
-
pbpaste | awk -f 02.01.awk | grep -v INVALID | wc -l pbpaste | awk -f 02.02.awk | grep -v INVALID | wc -l
-
python3 03.py 1 1 | awk '/#/' | wc -l python3 03.py 1 3 | awk '/#/' | wc -l python3 03.py 1 5 | awk '/#/' | wc -l python3 03.py 1 7 | awk '/#/' | wc -l python3 03.py 2 1 | awk '/#/' | wc -l
-
pbpaste | awk -f 04.01.awk | grep -v INVALID | wc -l pbpaste | awk -f 04.02.awk | grep -v INVALID | wc -l
-
python3 05.01.py | sort -n | tail -n 1 python3 05.02.py
-
pbpaste | awk -f 06.01.awk | awk '{sum += (0 + $0)} END {print sum}' pbpaste | awk -f 06.02.awk | awk '{sum += (0+$0)} END {print sum}'
-
python3 07.01.py | wc -l python3 07.02.py | wc -l
-
Instructions - requires awk to be gawk
pbpaste | awk -f 08.01.awk pbpaste | awk -f 08.02.awk | grep Success
-
python3 09.01.py python3 09.02.py