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 |
from graphviz import Digraph | |
import torch | |
from torch.autograd import Variable, Function | |
def iter_graph(root, callback): | |
queue = [root] | |
seen = set() | |
while queue: | |
fn = queue.pop() | |
if fn in seen: |
import datetime | |
import linecache | |
import os | |
import pynvml3 | |
import torch | |
print_tensor_sizes = True | |
last_tensor_sizes = set() | |
gpu_profile_fn = f'{datetime.datetime.now():%d-%b-%y-%H:%M:%S}-gpu_mem_prof.txt' |
# prior - likelihood conflict | |
library(rethinking) | |
yobs <- 0 | |
mtt <- ulam( | |
alist( | |
y ~ dstudent(2,mu,1), | |
mu ~ dstudent(2,10,1) |
import torch | |
from torch import nn | |
from torch.autograd import Variable | |
import torch.nn.functional as F | |
import torch.optim as optim | |
# toy feed-forward net | |
class Net(nn.Module): | |
def __init__(self): |
import torch | |
from torch.utils._python_dispatch import TorchDispatchMode | |
from torch.utils._pytree import tree_map | |
import itertools | |
# cribbed from https://github.com/albanD/subclass_zoo/blob/main/logging_mode.py | |
class Lit: | |
def __init__(self, s): | |
self.s = s |
#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", |