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
\usepackage{xcolor} | |
\usepackage{hyperref} | |
\definecolor{textColorDark}{HTML}{bdc1c6} | |
\definecolor{bgColorDark}{HTML}{202124} | |
\definecolor{blueDark}{HTML}{8ab4f8} | |
\definecolor{redDark}{HTML}{f9968b} | |
\pagecolor{bgColorDark} | |
\color{textColorDark} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 python | |
"""Extract the longest numeric suffix from each line in stdin and output the sum.""" | |
from __future__ import print_function | |
import sys | |
import argparse | |
numstr = '.0123456789' |
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
*.aux | |
*.bbl | |
*.blg | |
*.log | |
*.out | |
*.toc | |
*.brf | |
*.lot | |
*.lof |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
"Takes a Jinja2 template file and a JSON context file as input. Returns rendered output." | |
import json | |
import argparse | |
import jinja2 | |
def render(template_path, context_path, output_path): | |
with open(template_path) as tfp: |
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
{ | |
"W": 640, | |
"H": 480, | |
"binW": 200, | |
"binH": 120, | |
"items": [ | |
{"size": 0.5, "cumSize": 0.0, "packBin": 0, "packPos": 0.0}, | |
{"size": 0.4, "cumSize": 0.5, "packBin": 1, "packPos": 0.0}, | |
{"size": 0.3, "cumSize": 0.9, "packBin": 0, "packPos": 0.5}, | |
{"size": 0.3, "cumSize": 1.2, "packBin": 1, "packPos": 0.4}, |
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 | |
"""Downloads all the files necessary to compile a LaTeX paper | |
as per the instructions of SOCG21.""" | |
import sys | |
import os | |
from urllib.request import urlopen | |
from zipfile import ZipFile |
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 ast | |
def check_matroid(indsets): | |
if () not in indsets: | |
return () | |
# check hereditary |
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 | |
import argparse | |
from sympy import Matrix, ImmutableMatrix, Rational | |
def to_print_type(a): | |
return a | |
def cga(Q, b, x, n, err_thresh=0, opt=None): |