Skip to content

Instantly share code, notes, and snippets.

View andrewfowlie's full-sized avatar

Andrew Fowlie andrewfowlie

View GitHub Profile
@andrewfowlie
andrewfowlie / rotation.py
Created November 6, 2017 00:59
Figure showing DM velocity curve
"""
Rotation velocity of DM
=======================
"""
import matplotlib
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.ticker import MaxNLocator
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 | \
@andrewfowlie
andrewfowlie / install_multinest.bash
Last active July 18, 2023 01:53
Install MultiNest
git clone https://github.com/farhanferoz/MultiNest.git
cd MultiNest_v3.12_CMake/multinest/
mkdir build
cd build
cmake ..
make all
sudo make install
@andrewfowlie
andrewfowlie / data.json
Last active March 28, 2025 06:36
stanhf example
{
"_metadata": {
"fix_mu": "from POI.stan_data_card [config.py:L155]",
"fixed_mu": "from POI.stan_data_card [config.py:L155]",
"lu_mu": "from POI.stan_data_card [config.py:L155]",
"nominal_channel_background": "from Sample.stan_data_card [sample.py:L73]",
"nominal_channel_signal": "from Sample.stan_data_card [sample.py:L73]",
"observed_channel": "from Channel.stan_data_card [channel.py:L66]"
},
"fix_mu": 0,