Skip to content

Instantly share code, notes, and snippets.

@jeffeb3
jeffeb3 / aoc_2021_day14.py
Created December 14, 2021 17:22
Advent of code, day 14 of 2021 less than optimal solution
import time
# See reddit post where people wanted to see it: https://www.reddit.com/r/adventofcode/comments/rgacln/2021_day_14_less_than_optimal_solution/
# I just copy/pasted this from my input, instead of dealing with the input parsing.
poly = 'PBFNVFFPCPCPFPHKBONB'
pairs = {}
with open('input', 'r') as inp:
for line in inp:
@jeffeb3
jeffeb3 / requirements.txt
Last active December 4, 2022 00:09
speedRecorder
speedtest-cli
fastcli
adafruit-io
@jeffeb3
jeffeb3 / visualize.py
Last active December 8, 2022 15:26
Color 0-9 grid based on jet coloring scheme to the command line
trees =[]
with open('input') as data:
for line in data:
trees.append([int(x) for x in line.strip()])
red = [[]]*10
grn = [[]]*10
blu = [[]]*10
def interp(val, xmin, ymin, xmax, ymax):