start new:
tmux
start new with session name:
tmux new -s myname
#!/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 |
#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') |
{ | |
"lines.linewidth": 2.0, | |
"examples.download": true, | |
"patch.linewidth": 0.5, | |
"legend.fancybox": true, | |
"axes.color_cycle": [ | |
"#30a2da", | |
"#fc4f30", | |
"#e5ae38", | |
"#6d904f", |
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. |
import threading | |
import logging | |
from functools import wraps | |
logger = logging.getLogger(__name__) | |
def timeout(secs=None): | |
def my_decorator(target, *args, **kwargs): |
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. |
#!/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 |