start new:
tmux
start new with session name:
tmux new -s myname
| #!/bin/bash | |
| # Script for installing tmux on systems where you don't have root access. | |
| # tmux will be installed in $HOME/local/bin. | |
| # It's assumed that wget and a C/C++ compiler are installed. | |
| # exit on error | |
| set -e | |
| TMUX_VERSION=1.8 |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import scipy.optimize as so | |
| def find_confidence_interval(x, pdf, confidence_level): | |
| return pdf[pdf > x].sum() - confidence_level | |
| def density_contour(xdata, ydata, nbins_x, nbins_y, ax=None, **contour_kwargs): | |
| """ Create a density contour plot. |
| import threading | |
| import logging | |
| from functools import wraps | |
| logger = logging.getLogger(__name__) | |
| def timeout(secs=None): | |
| def my_decorator(target, *args, **kwargs): |
| def with_setup_args(setup, teardown=None): | |
| """Decorator to add setup and/or teardown methods to a test function:: | |
| @with_setup_args(setup, teardown) | |
| def test_something(): | |
| " ... " | |
| The setup function should return (args, kwargs) which will be passed to | |
| test function, and teardown function. |
| { | |
| "lines.linewidth": 2.0, | |
| "examples.download": true, | |
| "patch.linewidth": 0.5, | |
| "legend.fancybox": true, | |
| "axes.color_cycle": [ | |
| "#30a2da", | |
| "#fc4f30", | |
| "#e5ae38", | |
| "#6d904f", |
| #for C++ look here: https://gist.github.com/cranmer/b67830e46d53d5f7cf2d | |
| import ROOT | |
| import numpy as np | |
| def testMomentMorph(): | |
| #Going to make a few statistical models we want to interpolate | |
| #initialize workspace with some common background part | |
| w = ROOT.RooWorkspace('w') | |
| w.factory('Exponential::e(x[-5,15],tau[-.15,-3,0])') | |
| x = w.var('x') |
| #!/usr/bin/python | |
| from __future__ import print_function, division | |
| import os | |
| import re | |
| import sys | |
| import itertools | |
| from pprint import pprint | |
| import subprocess | |
| from distutils.spawn import find_executable | |
| from collections import defaultdict |
| #!/bin/bash | |
| # assumes that XCode and XCode command line tools have been installed | |
| # xcode-select --install | |
| # assumes that gfortran has been installed | |
| # https://gcc.gnu.org/wiki/GFortranBinaries | |
| # install pyenv & set 2.7.11 as current | |
| # See: https://github.com/yyuu/pyenv-installer | |
| # See: https://github.com/yyuu/pyenv | |
| curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash |