This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
national_number | gen | english_name | japanese_name | primary_type | secondary_type | classification | percent_male | percent_female | height_m | weight_kg | capture_rate | base_egg_steps | hp | attack | defense | sp_attack | sp_defense | speed | abilities_0 | abilities_1 | abilities_2 | abilities_hidden | against_normal | against_fire | against_water | against_electric | against_grass | against_ice | against_fighting | against_poison | against_ground | against_flying | against_psychic | against_bug | against_rock | against_ghost | against_dragon | against_dark | against_steel | against_fairy | is_sublegendary | is_legendary | is_mythical | evochain_0 | evochain_1 | evochain_2 | evochain_3 | evochain_4 | evochain_5 | evochain_6 | gigantamax | mega_evolution | mega_evolution_alt | description | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | I | Bulbasaur | Fushigidane | grass | poison | Seed Pokémon | 88.14 | 11.86 | 0.7 | 6.9 | 45 | 5120 | 45 | 49 | 49 | 65 | 65 | 45 | Overgrow | Chlorophyll | 1.0 | 2.0 | 0.5 | 0.5 | 0.25 | 2.0 | 0.5 | 1.0 | 1.0 | 2.0 | 2.0 | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 | 0.5 | 0 | 0 | 0 | Bulbasaur | Level | Ivysaur | Level | Venusaur | There is a plant seed on its back right from the day this Pokémon is born. The see |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# === Parsing === | |
keys = [] | |
locks = [] | |
with open("input.txt", "r") as f: | |
contents = f.read() | |
for block in contents.split("\n\n"): | |
lines = block.splitlines() | |
counts = [col.count("#") - 1 for col in zip(*lines)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# === Parsing === | |
values = {} | |
dependencies = {} | |
zs = set() | |
with open("input.txt", "r") as f: | |
for line in iter(f.readline, "\n"): | |
wire, value = line.strip().split(": ") | |
values[wire] = int(value) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# === Parsing === | |
from collections import defaultdict | |
edges = defaultdict(set) | |
with open("input.txt", "r") as f: | |
for line in f: | |
n1, n2 = line.strip().split("-") | |
edges[n1].add(n2) | |
edges[n2].add(n1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# === Parsing === | |
with open("input.txt", "r") as f: | |
seeds = [int(line) for line in f] | |
# === Part 1 === | |
from collections import deque | |
from itertools import islice |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# === Parsing === | |
with open("input.txt", "r") as f: | |
codes = [line.strip() for line in f] | |
print(codes) | |
# === Part 1 === | |
numpad_pos = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# === Parsing === | |
valid = set() | |
start = None | |
end = None | |
with open("input.txt", "r") as f: | |
for y, line in enumerate(f): | |
for x, char in enumerate(line.strip()): | |
if char in ".SE": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# === Parsing === | |
with open("input.txt", "r") as f: | |
towels = tuple(f.readline().strip().split(", ")) | |
_ = f.readline() | |
patterns = [line.strip() for line in f] | |
# === Part 1 === |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# === Parsing === | |
from itertools import product | |
SIZE = 70 | |
with open("input.txt", "r") as f: | |
falling_bytes = [tuple(int(num) for num in line.split(",")) for line in f] | |
valid = set(product(range(SIZE + 1), repeat=2)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# === Parsing === | |
with open("input.txt", "r") as f: | |
register_a = int(f.readline().split()[-1]) | |
register_b = int(f.readline().split()[-1]) | |
register_c = int(f.readline().split()[-1]) | |
_ = f.readline() | |
program = [int(num) for num in f.readline().split()[-1].split(",")] | |
print(program, register_a, register_b, register_c) |
NewerOlder