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 html.parser import HTMLParser | |
from colour import Color | |
from pylatex.utils import escape_latex, NoEscape | |
import re | |
import wx | |
def get_default_entity(): | |
return { | |
'tag': None, |
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 TexSoup.data import TexNode, TexEnv, TexCmd | |
from TexSoup import TexSoup | |
latexMathEnvs1 = ['align', 'equation', 'gather'] | |
latexMathEnvs2 = [x + '*' for x in latexMathEnvs1] | |
latexMathEnvs = ['\\begin{%s}' % x for x in (latexMathEnvs1 + latexMathEnvs2)] | |
latexMathEnvs_set = set(latexMathEnvs) | |
def get_node_text(node): | |
return ''.join(list(node.text)) |
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 numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
from matplotlib.animation import FuncAnimation | |
tessellatePieces = 300 | |
assert tessellatePieces % 2 == 0 | |
bigCircleAngles = np.linspace(0.0, 2.0 * np.pi, tessellatePieces, endpoint=False) | |
smallCircleAngles = np.linspace(0.0, 2.0 * np.pi, tessellatePieces // 2, endpoint=False) |
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
require 'digest/sha1' | |
module Jekyll | |
module JekyllIndexTermFilter | |
# html display name, index name | |
def getnames(matchedString) | |
stripped = matchedString.strip() | |
matchResult = stripped.match(/(?<!\\)@/) |
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 TexSoup.data import TexNode, TexEnv, TexCmd, RArg | |
from TexSoup import TexSoup | |
import re | |
import copy | |
import html as htmlib | |
class Tex2HTML: | |
def __init__(self): |
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
require 'digest/sha1' | |
module Jekyll | |
module JekyllIndexTermFilter | |
@@show_warning = true | |
@@tag_re = /(%+)({)(.*?)(}%)/ | |
@@tag_alias_re = /(?<!\\)@/ | |
@@TagInfo = Struct.new(:type, :raw, :segments) |
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
\section{Math} | |
\makeatletter | |
\begin{longtable}{|l|l|l|l|l|l|l|} | |
\hline | |
Deadline & No. & Lorem Ipsum & Dolor Sit & Amet Consectetuer & Adipiscing Elit & Aenean Commodo \\ \hline | |
\def\@linkcolor{blue}\hyperref[subsec-2020-07-15]{2020-07-15} & \def\@linkcolor{green}\hyperref[subsubsec-2020-07-15-basic]{1} & \def\@linkcolor{red}\hyperref[figure-2020-07-15-basic-lorem-ipsum]{4.43} & \def\@linkcolor{red}\hyperref[figure-2020-07-15-basic-dolor-sit |
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
inspect = require "inspect.lua" | |
function raise_error(...) | |
local arg = {...} | |
local description = "a luaprogtable package exception occured:\n" .. table.concat(arg, ", ") | |
tex.error(description) | |
error(description) | |
end | |
local _spacer = lpeg.S(" \t\f\v\n\r") |
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 sys | |
import numpy as np | |
from PIL import Image, ImageFont, ImageDraw, ImageEnhance | |
import matplotlib.pyplot as plt | |
# parameters | |
font_size = 12 | |
threshold = 0.9 | |
emoji = ':a_:' |
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
\documentclass{article} | |
\usepackage[paperwidth=8cm, paperheight=8cm, margin=2mm]{geometry} | |
\usepackage[T1]{fontenc} | |
\usepackage{fancyhdr} | |
\usepackage{expl3} | |
\usepackage{enumitem} | |
\usepackage{hyperref} | |
\pagestyle{empty} |
OlderNewer