Skip to content

Commit d2ce925

Browse files
committed
Integrate advent.py into utils module
1 parent 16251d0 commit d2ce925

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+86
-90
lines changed

2018/original_solutions/advent.py

-1
This file was deleted.

2018/original_solutions/day01.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44

55
advent.setup(2018, 1)
66

2018/original_solutions/day02.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44

55
advent.setup(2018, 2)
66
fin = advent.get_input()

2018/original_solutions/day03.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44

55
advent.setup(2018, 3)
66

2018/original_solutions/day04.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44

55
advent.setup(2018, 4)
66

2018/original_solutions/day05.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from collections import defaultdict
55
from string import ascii_lowercase
66

2018/original_solutions/day06.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from collections import namedtuple, defaultdict
55

66
advent.setup(2018, 6)

2018/original_solutions/day07.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from collections import defaultdict, namedtuple
55
from string import *
66

2018/original_solutions/day08.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44

55
advent.setup(2018, 8, dry_run=True)
66
fin = advent.get_input()

2018/original_solutions/day09.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
import sys
55

66
from blist import blist

2018/original_solutions/day10.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
import sys
55

66
advent.setup(2018, 10, dry_run=True)

2018/original_solutions/day11.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44

55
advent.setup(2018, 11, dry_run=True)
66
fin = advent.get_input()

2018/original_solutions/day12.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
import heapq
55

66
advent.setup(2018, 12, dry_run=True)

2018/original_solutions/day13.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44

55
import sys
66
import copy

2018/original_solutions/day14.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44

55
import sys
66
import heapq

2018/original_solutions/day15.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44

55
import sys
66
import copy

2018/original_solutions/day16.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44

55
advent.setup(2018, 16, dry_run=False)
66
fin = advent.get_input()

2018/original_solutions/day17.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
import re
55

66
advent.setup(2018, 17, dry_run=True)

2018/original_solutions/day18.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44

55
import sys
66
import copy

2018/original_solutions/day19.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44

55
import re
66
import sys

2018/original_solutions/day20.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44

55
import sys
66
import networkx as nx

2018/original_solutions/day21.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from utils import *
55

66
advent.setup(2018, 21, dry_run=True)

2018/original_solutions/day22.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from utils import *
55
from functools import lru_cache
66

2018/original_solutions/day23.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from utils import *
55
import z3
66

2018/original_solutions/day24.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from utils import *
55

66
advent.setup(2018, 24, dry_run=True)

2018/original_solutions/day25.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from utils import *
55

66
advent.setup(2018, 25, dry_run=True)

2018/solutions/advent.py

-1
This file was deleted.

2018/solutions/day01.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44

55
advent.setup(2018, 1, dry_run=True)
66
fin = advent.get_input()

2018/solutions/day02.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from string import ascii_letters
55
from collections import Counter
66

2018/solutions/day03.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from collections import defaultdict
55

66
advent.setup(2018, 3, dry_run=True)

2018/solutions/day04.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from collections import defaultdict
55

66
def get_hour(event):

2018/solutions/day05.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from string import ascii_lowercase, ascii_uppercase
55
from collections import deque
66

2018/solutions/day07.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
import copy
55
import heapq
66
from collections import defaultdict

2018/solutions/day08.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from collections import namedtuple
55

66
Node = namedtuple('Node', ['length', 'children', 'metadata'])

2018/solutions/day09.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from collections import deque
55

66
def play(nplayers, max_marble):

2018/solutions/day10.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
import re
55

66
def simulate(pts, t):

2018/solutions/day12.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44

55
def simulate(first_gen, rules, days):
66
cur_gen = first_gen

2018/solutions/day16.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
import re
55
import z3
66

2018/solutions/day17.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
import re
55

66
# This program assumes that a situation like

2019/original_solutions/advent.py

-1
This file was deleted.

2019/original_solutions/day01.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from utils import *
55

66
advent.setup(2019, 1)

2019/original_solutions/day02.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from utils import *
55
from itertools import product
66

2019/original_solutions/day03.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from utils import *
55

66
fin = advent.get_input()

2019/original_solutions/day04.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from utils import *
55

66
fin = advent.get_input()

2019/original_solutions/day05.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from utils import *
55
from operator import add, mul
66
import sys

2019/original_solutions/day06.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from utils import *
55

66
fin = advent.get_input()

2019/original_solutions/day07.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from utils import *
55
from itertools import permutations
66

2019/original_solutions/day08.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from utils import *
55

66
fin = advent.get_input()

2019/original_solutions/day09.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from utils import *
55

66
##################################################

2019/original_solutions/day10.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from utils import *
55
from fractions import Fraction
66

2019/original_solutions/day11.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22

3-
import advent
3+
from utils import advent
44
from utils import *
55
from lib.intcode import IntcodeVM
66

0 commit comments

Comments
 (0)