Skip to content

Instantly share code, notes, and snippets.

View mattmess1221's full-sized avatar
🫥

Matthew Messinger mattmess1221

🫥
View GitHub Profile
import enum
from typing import Dict, Tuple
import aoc
import bytecode
def main():
instrs = load_instructions()
w = World(instrs)
from typing import List
import aoc
def read_layers(data: List[int], width: int, height: int):
size = width * height
for layer in range(len(data) // size):
yield Layer(data[size * layer:size * (layer + 1)], width, height)
#!/usr/bin/env python
import importlib
import sys
def open_input(name):
return open(f"input/{name}.txt")
def main():
from collections import defaultdict
from typing import NamedTuple, List
import aoc
class Orbit(NamedTuple):
origin: str
name: str
from typing import List
import aoc
P_MODE_POSITION = 0
P_MODE_IMMEDIATE = 1
class Opcodes(dict):
def __call__(self, code):
import re
def NewType(name, base=object):
class _NewType(base):
pass
_NewType.__name__ = name
return _NewType
import aoc
from typing import NamedTuple
class Point(NamedTuple):
x: int
y: int
def up(self, distance):
#!/usr/bin/env python
import importlib
import sys
def open_input(name):
return open("inputs/" + name + ".txt")
def main():
#!/usr/bin/python3.7
import json
import sys
from collections import defaultdict
import tsrg
mcpc_file = sys.argv[1]
package mnm.mods.tabbychat.util.config
import com.google.common.reflect.TypeToken
import kotlin.reflect.KProperty
sealed class AbstractValue<T> {
abstract val type: TypeToken<T>?
abstract val value: T
override fun toString(): String {