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
thiw is a demo |
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 | |
""" | |
Clean LaTeX build files with the option of doing so recursively. | |
Asks before removing files. | |
https://gist.github.com/klieret/b3e032095d78269c811f4f8c85f6227b | |
Kilian Lieret 2020 | |
MIT license |
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 typing import Callable, Optional, Dict, Any | |
import itertools | |
from tqdm.auto import tqdm | |
def product_call( | |
fct: Callable, | |
static: Optional[Dict[str, Any]] = None, | |
multi: Optional[Dict[str, Any]] = None, | |
progress=False | |
) -> Tuple[List[Dict[str, Any]], List[Any]]: |
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 | |
""" AVAILABLE AS A PACKAGE ON github.com/klieret/randomfiletree """ | |
import sys | |
import os | |
import random | |
import string | |
from pathlib import Path |
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
#!/bin/bash | |
# script to go through all figures, search all of our *.tex | |
# files to see if the figure is still included, and | |
# if not, print it to standard output | |
# pipe to rm to delete the unused ones then. | |
set -e | |
latex_dir="" |
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
#!/bin/bash | |
# Moves one file but searches through LaTeX source | |
# and also changes all path references to the file | |
# Arg 1: Current location of the file | |
# Arg 2: Target location of the file | |
set -e | |
latex_dir="" |
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
(* ::Package:: *) | |
(* ::Code::Initialization::Plain:: *) | |
superComplexContourPlot::usage="Plots a contour plot of a real expression in a complex variable, | |
together with 1D projections of the depedence on the real/imaginary part of the variable. | |
Arg 1: Expression to plot | |
Arg 2: Variable to plot | |
Opt 3: Plot label (def: '') | |
Opt 5: {min real part, max real part} (def: {1,1}) | |
Opt 6: {min im part, max im part} (def: {1,1})"; |
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 pyton3 | |
import re | |
import sys | |
subsup_regex = re.compile(r"\\text\{Subsuperscript\}\[([^\],]*),([^\],]*),([^\],]*)\]") | |
minimal_braces = True | |
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
debugPrint::usage="Arg 1 (bool): If False, do nothing. If True and Arg 2 is \ | |
a string, then the string is simply printed. If True and Arg 2 is not a string, then \ | |
first the unevaluated expression is printed, followed by the evaluated expression. \ | |
Additionally given rules influence the styling of the output. | |
Arg 3 (bool): Strip suffixes like $1234 (signalling internal variables)"; | |
unevaluatedExpression::usage="Print the argument without any kind of evaluation in \ | |
the same way it is given here as an argument | |
Arg 2(bool): Strip suffixes like $1234 (signalling internal variables)"; |
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/python3 | |
""" Illustrates the coloring of the plane used for Monsky's theorem. """ | |
from PIL import Image | |
import argparse | |
import os | |
import sys |
NewerOlder