This repository was archived by the owner on Dec 31, 2021. It is now read-only.
File tree 21 files changed +28
-7
lines changed
21 files changed +28
-7
lines changed Original file line number Diff line number Diff line change 21
21
rev : v2.6.0
22
22
hooks :
23
23
- id : reorder-python-imports
24
+ args : [--application-directories=.:src/]
24
25
- repo : https://github.com/myint/docformatter
25
26
rev : v1.4
26
27
hooks :
Original file line number Diff line number Diff line change 1
1
"""--- Day 11: Dumbo Octopus ---"""
2
2
from pathlib import Path
3
3
4
- from aoc import open_utf8
5
4
from numpy import all as all_
6
5
from numpy import array
7
6
from numpy import byte
8
7
from numpy import where
9
8
9
+ from aoc import open_utf8
10
+
10
11
11
12
def __execute_step (data : array , bounds : [[]]) -> int :
12
13
"""Recursive function to simulate a single step in time for the input
Original file line number Diff line number Diff line change 2
2
from dataclasses import dataclass
3
3
from pathlib import Path
4
4
5
- from aoc import open_utf8
6
5
from numpy import array
7
6
from numpy import bitwise_or
8
7
from numpy import byte
9
8
from numpy import flip
10
9
from numpy import sum as sum_
11
10
from numpy import zeros
12
11
12
+ from aoc import open_utf8
13
+
13
14
14
15
@dataclass
15
16
class Fold :
Original file line number Diff line number Diff line change 3
3
from heapq import heappush
4
4
from pathlib import Path
5
5
6
- from aoc import open_utf8
7
6
from numpy import add
8
7
from numpy import array
9
8
from numpy import byte
10
9
from numpy import zeros
11
10
11
+ from aoc import open_utf8
12
+
12
13
13
14
class Node :
14
15
"""A star path node."""
Original file line number Diff line number Diff line change 2
2
from dataclasses import dataclass
3
3
from pathlib import Path
4
4
5
- from aoc import log
6
- from aoc import open_utf8
7
5
from numpy import array
8
6
from numpy import byte
9
7
from numpy import sum as sum_
10
8
9
+ from aoc import log
10
+ from aoc import open_utf8
11
+
11
12
12
13
@dataclass
13
14
class Bingo :
Original file line number Diff line number Diff line change 2
2
from dataclasses import dataclass
3
3
from pathlib import Path
4
4
5
- from aoc import log
6
- from aoc import open_utf8
7
5
from numpy import array
8
6
from numpy import byte
9
7
from numpy import product
10
8
from numpy import sort
11
9
10
+ from aoc import log
11
+ from aoc import open_utf8
12
+
12
13
13
14
@dataclass
14
15
class Location :
Original file line number Diff line number Diff line change 2
2
from pathlib import Path
3
3
4
4
import pytest
5
+
5
6
from aoc import log
6
7
from aoc import ROOT_PATH
7
8
from day1 import count_increases
Original file line number Diff line number Diff line change 2
2
from pathlib import Path
3
3
4
4
import pytest
5
+
5
6
from aoc import ROOT_PATH
6
7
from day10 import parse_data
7
8
Original file line number Diff line number Diff line change 2
2
from pathlib import Path
3
3
4
4
import pytest
5
+
5
6
from aoc import log
6
7
from aoc import ROOT_PATH
7
8
from day11 import execute_steps
Original file line number Diff line number Diff line change 2
2
from pathlib import Path
3
3
4
4
import pytest
5
+
5
6
from aoc import log
6
7
from aoc import ROOT_PATH
7
8
from day12 import enumerate_paths
Original file line number Diff line number Diff line change 2
2
from pathlib import Path
3
3
4
4
import pytest
5
+
5
6
from aoc import log
6
7
from aoc import ROOT_PATH
7
8
from day13 import do_origami
Original file line number Diff line number Diff line change 2
2
from pathlib import Path
3
3
4
4
import pytest
5
+
5
6
from aoc import log
6
7
from aoc import ROOT_PATH
7
8
from day14 import load_dataset
Original file line number Diff line number Diff line change 2
2
from pathlib import Path
3
3
4
4
import pytest
5
+
5
6
from aoc import log
6
7
from aoc import ROOT_PATH
7
8
from day15 import a_starify
Original file line number Diff line number Diff line change 2
2
from pathlib import Path
3
3
4
4
import pytest
5
+
5
6
from aoc import log
6
7
from aoc import ROOT_PATH
7
8
from day2 import compute_xy_product
Original file line number Diff line number Diff line change 2
2
from pathlib import Path
3
3
4
4
import pytest
5
+
5
6
from aoc import log
6
7
from aoc import ROOT_PATH
7
8
from day3 import DiagnosticRates
Original file line number Diff line number Diff line change 2
2
from pathlib import Path
3
3
4
4
import pytest
5
+
5
6
from aoc import ROOT_PATH
6
7
from day4 import Bingo
7
8
Original file line number Diff line number Diff line change 2
2
from pathlib import Path
3
3
4
4
import pytest
5
+
5
6
from aoc import log
6
7
from aoc import ROOT_PATH
7
8
from day5 import load_dataset
Original file line number Diff line number Diff line change 2
2
from pathlib import Path
3
3
4
4
import pytest
5
+
5
6
from aoc import log
6
7
from aoc import ROOT_PATH
7
8
from day6 import load_dataset
Original file line number Diff line number Diff line change 2
2
from pathlib import Path
3
3
4
4
import pytest
5
+
5
6
from aoc import log
6
7
from aoc import ROOT_PATH
7
8
from day7 import find_minima
Original file line number Diff line number Diff line change 2
2
from pathlib import Path
3
3
4
4
import pytest
5
+
5
6
from aoc import log
6
7
from aoc import ROOT_PATH
7
8
from day8 import decode_sequences
Original file line number Diff line number Diff line change 2
2
from pathlib import Path
3
3
4
4
import pytest
5
+
5
6
from aoc import log
6
7
from aoc import ROOT_PATH
7
8
from day9 import find_low_points
You can’t perform that action at this time.
0 commit comments