Skip to content

Instantly share code, notes, and snippets.

import streamlit as st
css = """
[data-testid="stVerticalBlock"].red [data-testid="stText"] {
color: red;
}
[data-testid="stVerticalBlock"].big [data-testid="stText"] {
font-size: 2em;
}
@kung-foo
kung-foo / day24.py
Last active December 24, 2020 08:11
#!/usr/bin/env python3
import os
import sys
import random
import re
import numpy as np
from collections import defaultdict
src = open("input.txt", "r").readlines()
#!/usr/bin/env python3
import os
import sys
import random
src = open("input.txt", "r").readlines()
src2 = """
Player 1:
9
@kung-foo
kung-foo / day19.py
Last active December 19, 2020 20:03
#!/usr/bin/env python3
import re
import sys
# sys.setrecursionlimit(10000)
src = open("input.txt", "r").readlines()
src = [r.strip() for r in src if r.strip()]
This file has been truncated, but you can view the full file.
#!/usr/bin/env python3
import regex as re
bg = re.compile(r"\([^)(]*+(?:(?R)[^)(]*)*+\)", re.VERSION1)
src = open("input.txt", "r").readlines()
src2 = """
1 + 2 * 3 + 4 * 5 + 6
#!/usr/bin/env python3
from itertools import product
from copy import deepcopy
src = open("input.txt", "r").readlines()
# src = """
# .#.
# ..#
# ###""".splitlines()
#!/usr/bin/env python3
import os
import sys
import random
from collections import defaultdict
import re
src = open("input.txt", "r").readlines()
# src = """
@kung-foo
kung-foo / day15.py
Last active December 15, 2020 08:27
#!/usr/bin/env python3
from collections import defaultdict
src = open("input.txt", "r").read()
# src = "0,3,6"
# src = "3,1,2"
src = [int(x) for x in src.split(",")]
#!/usr/bin/env python3
import os
import sys
import random
import re
from collections import defaultdict
from itertools import permutations, product
src = open("input.txt", "r").readlines()