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
git clone https://github.com/farhanferoz/MultiNest.git | |
cd MultiNest_v3.12_CMake/multinest/ | |
mkdir build | |
cd build | |
cmake .. | |
make all | |
sudo make install |
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
function git_branch_search_stale { | |
echo "ahead | behind | branch name" | |
git for-each-ref --format="%(refname:short) %(upstream:short)" refs/remotes | \ | |
while read remote | |
do | |
git rev-list --left-right origin/master...${remote} -- 2>/dev/null >/tmp/git_upstream_status_delta || continue | |
BEHIND=$(grep -c '^<' /tmp/git_upstream_status_delta) | |
AHEAD=$(grep -c '^>' /tmp/git_upstream_status_delta) | |
echo "$AHEAD $BEHIND $remote" | |
done | \ |
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
""" | |
Rotation velocity of DM | |
======================= | |
""" | |
import matplotlib | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib.ticker import MaxNLocator |
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
""" | |
Pie chart of Bayes factor | |
========================= | |
""" | |
import matplotlib | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib.ticker import MaxNLocator |
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
""" | |
WIMP miracle | |
============ | |
""" | |
import matplotlib | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib.ticker import MaxNLocator |
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
\NeedsTeXFormat{LaTeX2e}[1994/06/01] | |
\ProvidesPackage{shadow}[2017/09/13 shadow] | |
% code adapted from http://tex.stackexchange.com/a/11483/3954 | |
\usepackage{tikz} | |
\usetikzlibrary{shadows,calc} | |
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
\NeedsTeXFormat{LaTeX2e}[1994/06/01] | |
\ProvidesPackage{highlight}[2017/09/13 Highlight] | |
% All credit to https://tex.stackexchange.com/a/6029/35729 | |
\usepackage{soul} | |
\usepackage{tikz} | |
\usetikzlibrary{calc} | |
\usetikzlibrary{decorations.pathmorphing} |
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
""" | |
Plot evidences for simple and complicated models | |
================================================ | |
by Andrew Fowlie. | |
""" | |
import matplotlib | |
import numpy as np | |
import matplotlib.pyplot as plt |
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
""" | |
Convert arXiv code into markdown entry for webpage in Hugo academic theme | |
========================================================================= | |
Main usuage e.g., | |
>>> markdown('1607.06608') | |
to scrape https://arxiv.org/abs/1607.06608 into a publication for Hugo | |
academic theme. |
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
""" | |
Load functions from a dynmaic library via the header file | |
========================================================= | |
""" | |
import ctypes | |
import numpy as np | |
import json | |
import sys | |
from collections import OrderedDict as odict |
NewerOlder