Added shebang to files

master
Tibor Bizjak 2023-03-13 23:36:25 +01:00
parent 4cb82e81e3
commit 143bbf3c10
11 changed files with 19 additions and 1 deletions

View File

@ -1,3 +1,5 @@
#!/usr/bin/env python3
from itertools import product from itertools import product
from operator import mul, add from operator import mul, add

View File

@ -1,3 +1,5 @@
#!/usr/bin/env python3
up = lambda v: (v[0], v[1] + 1) up = lambda v: (v[0], v[1] + 1)
down = lambda v: (v[0], v[1] - 1) down = lambda v: (v[0], v[1] - 1)
left = lambda v: (v[0] - 1, v[1]) left = lambda v: (v[0] - 1, v[1])

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python3
def preproc(puzzle_input): def preproc(puzzle_input):
space = tuple(map(int, puzzle_input.split('-'))) space = tuple(map(int, puzzle_input.split('-')))

View File

@ -1,3 +1,5 @@
#!/usr/bin/env python3
from intcode import Interpreter, SingletonIO from intcode import Interpreter, SingletonIO
def preproc(puzzle_input): def preproc(puzzle_input):

View File

@ -1,3 +1,5 @@
#!/usr/bin/env python3
from lib import Graph from lib import Graph
def preproc(puzzle_input): def preproc(puzzle_input):

View File

@ -1,3 +1,5 @@
#!/usr/bin/env python3
from intcode import Interpreter, makeIO, Singleton, Halted from intcode import Interpreter, makeIO, Singleton, Halted
from itertools import permutations from itertools import permutations

View File

@ -1,3 +1,4 @@
#!/usr/bin/env python3
ZERO, ONE, TWO = "012" ZERO, ONE, TWO = "012"

View File

@ -1,3 +1,5 @@
#!/usr/bin/env python3
from intcode import Interpreter, SingletonIO from intcode import Interpreter, SingletonIO
def preproc(puzzle_input): def preproc(puzzle_input):

View File

@ -1,3 +1,5 @@
#!/usr/bin/env python3
from fractions import gcd, Fraction from fractions import gcd, Fraction
from itertools import product from itertools import product
from functools import total_ordering from functools import total_ordering

View File

@ -1,3 +1,5 @@
#!/usr/bin/env python3
from advent import read_input from advent import read_input
from intcode import Interpreter from intcode import Interpreter
from collections import defaultdict from collections import defaultdict

1
lib.py
View File

@ -1,3 +1,4 @@
#!/usr/bin/env python3
class Graph(dict): class Graph(dict):
nodes = dict.keys nodes = dict.keys