This file contains 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
import streamlit as st | |
css = """ | |
[data-testid="stVerticalBlock"].red [data-testid="stText"] { | |
color: red; | |
} | |
[data-testid="stVerticalBlock"].big [data-testid="stText"] { | |
font-size: 2em; | |
} |
This file contains 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
#!/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() |
This file contains 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
#!/usr/bin/env python3 | |
import os | |
import sys | |
import random | |
src = open("input.txt", "r").readlines() | |
src2 = """ | |
Player 1: | |
9 |
This file contains 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
#!/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.
This file contains 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
^(((a(b(b(a(((aa|ab)a|(aa)b)a)|b(((ab)b|(a(b|a)|bb)a)b|((ba|ab)a|(ab)b)a))|a(b(b(a(aa)|b(bb|ab))|a(a(bb|ab)|b(ab|b(b|a))))|a((a(aa|ba)|b(ab))b|((bb|(b|a)a)a|(ba|a(b|a))b)a)))|a(b(a(a((ba|ab)b|(ab)a)|b(b(ba|bb)|a(aa|ab)))|b(b((aa|bb)a|((b|a)(b|a))b)|a((bb|ab)b|(aa|ab)a)))|a((((bb|(b|a)a)b|(ab)a)b|(b(aa|ab)|a(ab))a)a|(a(((b|a)(b|a))b|(aa|ba)a)|b((ba|ab)a|(aa|ab)b))b)))|b(b(((a((aa)b|(a(b|a)|bb)a)|b((bb)b|((b|a)(b|a))a))a|(b((bb)b|((b|a)(b|a))a)|a((ba|bb)a))b)b|(a(((ab)b|(a(b|a)|bb)a)b|((bb|(b|a)a)a|(ba|ab)b)a)|b(b(a(bb|ab)|b(a(b|a)|bb))|a((ab)b|(a(b|a)|bb)a)))a)|a(a(a(((ba|bb)a|(bb)b)b|(a((b|a)(b|a))|b(ba|ab))a)|b(b(b(bb)|a((b|a)(b|a)))|a((ab|b(b|a))a|(ab)b)))|b(a((b(ba|ab)|a(ba|bb))b|(a(ab|b(b|a))|b(bb))a)|b(((a(b|a)|bb)a)a|((bb)a|(a(b|a)|bb)b)b)))))|(a(b(b(a(((aa|ab)a|(aa)b)a)|b(((ab)b|(a(b|a)|bb)a)b|((ba|ab)a|(ab)b)a))|a(b(b(a(aa)|b(bb|ab))|a(a(bb|ab)|b(ab|b(b|a))))|a((a(aa|ba)|b(ab))b|((bb|(b|a)a)a|(ba|a(b|a))b)a)))|a(b(a(a((ba|ab)b|(ab)a)|b(b(ba|bb)|a(aa|ab)))|b(b((aa|bb)a|((b|a)(b|a))b)|a((bb|ab)b|(aa|ab) |
This file contains 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
#!/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 |
This file contains 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
#!/usr/bin/env python3 | |
from itertools import product | |
from copy import deepcopy | |
src = open("input.txt", "r").readlines() | |
# src = """ | |
# .#. | |
# ..# | |
# ###""".splitlines() |
This file contains 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
#!/usr/bin/env python3 | |
import os | |
import sys | |
import random | |
from collections import defaultdict | |
import re | |
src = open("input.txt", "r").readlines() | |
# src = """ |
This file contains 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
#!/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(",")] |
This file contains 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
#!/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() |
NewerOlder