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
" activates filetype detection | |
filetype plugin indent on | |
" activates syntax highlighting among other things | |
syntax on | |
" The width of a TAB is set to 4. | |
" Still it is a \t. It is just that | |
" Vim will interpret it to be having | |
" a width of 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
{ | |
"added_words": | |
[ | |
"diboson", | |
"Majorana", | |
"Higgs", | |
"collider", | |
"hadronic", | |
"leptonic", | |
"Feynman", |
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
[color] | |
ui = true | |
[alias] | |
b = branch | |
ca = commit --amend | |
can = commit --amend --no-edit | |
co = checkout | |
cb = checkout -b | |
cp = cherry-pick | |
cpc = cherry-pick --continue |
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 types | |
def list_import_versions(): | |
imports = [] | |
for val in globals().values(): | |
if isinstance(val, types.ModuleType) and val.__name__ != 'builtins': | |
full_name = val.__name__ | |
version = getattr(sys.modules[full_name], '__version__', None) # skips builtins | |
if version: |
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
#include <iostream> | |
#include <vector> | |
using namespace std; | |
class A { | |
public: | |
A(): thing(nullptr) {} |
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 | |
"""Look for "bad" directories with duplicate files (xxx.mp3 vs xxx 1.mp3), | |
empties, only artwork, etc | |
""" | |
import os | |
import re |
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 | |
""" | |
Get the Github Pull Request unique ID. | |
Needed for posting comments, etc | |
""" | |
from __future__ import print_function | |
import json |
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
all: | |
latexmk -bibtex -pdf -interaction=nonstopmode paper.tex | |
open paper.pdf |
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 | |
""" | |
Go through TeX files and count words, plot things. | |
TODO: | |
- improve timezone handling | |
- only count commits where tex file changed? | |
- add PDF pagecount? | |
""" |
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 | |
from copy import deepcopy | |
from contextlib import contextmanager | |
# Global bool to turn on/off plot saving for all plots in notebook | |
SAVE_PLOTS = True | |
def save_plot(filename): |
NewerOlder