This file contains hidden or 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 | |
| ## Simple draft mode followed by pdflatex once by using the print hook. | |
| ## With no arguments, it will follow a 'latexmkrc' file if there is one. | |
| ## You still get the nice error messages at the end: | |
| latexmk -pdf -pdflatex='pdflatex -draftmode %O %S && touch %D' -print=pdf -e '$lpr_pdf=q|pdflatex -interaction=batchmode -synctex=1 %R|' "$@" |
This file contains hidden or 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
| #ifndef __pythonlike_h__ | |
| #define __pythonlike_h__ | |
| /* | |
| Author: Yotam Gingold <yotam (strudel) yotamgingold.com> | |
| License: Public Domain [CC0](http://creativecommons.org/publicdomain/zero/1.0/) | |
| Adapted from my old "stl.h" | |
| On GitHub as a gist: https://gist.github.com/yig/32fe51874f3911d1c612 | |
| */ |
This file contains hidden or 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 saveAs( blob, name ) { | |
| "use strict"; | |
| // Inspired by Syntax: http://stackoverflow.com/questions/23451726/saving-binary-data-as-file-using-javascript-from-a-browser/23451803#23451803 | |
| // Initially created to work around a bug in eligray/FileSaver.js | |
| // which prevented saving multiple files | |
| // (Issue 165: https://github.com/eligrey/FileSaver.js/issues/165 ). | |
| // Create a hidden `a` element. | |
| var a = document.createElement("a"); |
This file contains hidden or 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 __future__ import print_function, division | |
| from math import sqrt | |
| ''' | |
| The Orient2D, Area2D, and ShewchukArea3D functions are | |
| from "Lecture Notes on Geometric Robustness" by Jonathan Richard Shewchuk (2013). | |
| URL: http://www.cs.berkeley.edu/~jrs/meshpapers/robnotes.pdf | |
| ''' |
This file contains hidden or 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 __future__ import print_function, division | |
| from math import * | |
| from numpy import * | |
| from pprint import pprint | |
| def get_rotation_matrix( axis, radians ): | |
| ''' | |
| Given the axis, angle rotation defined by 'axis' and 'radians', returns a |
This file contains hidden or 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 python2.7 | |
| ''' | |
| Author: Yotam Gingold <yotam (strudel) yotamgingold.com> | |
| Any copyright is dedicated to the Public Domain. | |
| http://creativecommons.org/publicdomain/zero/1.0/ | |
| ''' | |
| import os, sys |
This file contains hidden or 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 | |
| from glob import glob | |
| import os | |
| import subprocess | |
| kHarmful = False | |
| argv = list( sys.argv ) | |
| try: |
This file contains hidden or 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 | |
| import os, hashlib | |
| kDryRun = True | |
| ## From: http://stackoverflow.com/questions/1131220/get-md5-hash-of-a-files-without-open-it-in-python | |
| def md5_for_file(f, block_size=2**20): | |
| md5 = hashlib.md5() | |
| while True: |
This file contains hidden or 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 -OO | |
| import sys | |
| import os | |
| harmful = False | |
| overwrite = False | |
| full_path = False | |
| def usage(): |
This file contains hidden or 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
| %% Make everything look better. | |
| %% http://tex.stackexchange.com/questions/553/what-packages-do-people-load-by-default-in-latex | |
| %% http://www.howtotex.com/packages/9-essential-latex-packages-everyone-should-use/ | |
| \usepackage{microtype} | |
| %% Shrink space around figures. | |
| %% This beats manually adding negative \vspace commands everywhere. | |
| %\setlength{\textfloatsep}{0pt} | |
| %\setlength{\textfloatsep}{20pt plus 2pt minus 4pt} | |
| %\setlength{\textfloatsep}{10pt plus 2pt minus 4pt} |