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 Mathlib.Algebra.Category.FGModuleCat.Basic | |
import Mathlib.Algebra.Category.Grp.Colimits | |
import Mathlib.Algebra.Category.ModuleCat.Colimits | |
import Mathlib.CategoryTheory.Limits.Constructions.LimitsOfProductsAndEqualizers | |
-- Kind of just importing everything | |
-- Goal: Reprove that MonCat has colimits by constructing equivalence between MonCat and | |
-- category of finitely supported functions, or something | |
open scoped DirectSum |
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 os | |
import ctypes | |
import requests | |
import subprocess | |
from tarfile import TarFile | |
# from logging import log | |
def get_env(env_name: str, error: bool = True) -> str: | |
res = os.environ[env_name] |
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
function _tc_activation | |
set act_nature $argv[1] | |
set tc_prefix $argv[2] | |
set argv $argv[3..-1] | |
set pass | |
set from | |
set to | |
if test "$act_nature" = "activate" | |
set from "" | |
set to "CONDA_BACKUP_" |
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 sys | |
content = sys.stdin.read().rstrip() | |
grid = [list(line) for line in content.split('\n')] | |
r, c = len(grid), len(grid[0]) | |
def is_valid(cr): | |
return 0 <= cr[0] < r and 0 <= cr[1] < c |
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
from decimal import * | |
getcontext().prec = 100 | |
# abstract into two blocks, air and water | |
# let height of water be x | |
# then water CoM has position x / 2 and mass x * d_w | |
# and air CoM has position (h + x) / 2 and mass (h - x) * d_a | |
# and combined CoM has position c and mass x * d_w + (h - x) * d_a |