Example PDF: http://cl.ly/3i322w1V2s3F
This file contains hidden or 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
// Small example to show working with multimaps | |
// See cplusplus.com: http://www.cplusplus.com/reference/map/multimap/l | |
#include <map> | |
#include <iostream> | |
int main() { | |
std::multimap<int, double> mymultimap; // binid, multiplicity | |
mymultimap.insert(std::pair<int, double>(199, 20.1)); |
This file contains hidden or 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{panda}[2014/07/14 PANDAs Name with Style] | |
% INFO: | |
% Prints the PANDA experiment's name with a well-looking bar on top of the P | |
% Works for bold-faced as well italic (slanted)-faced type faces | |
% | |
% Created by Andreas Herten, 2014-07-10 | |
% Based on code provided by Enrico Gregorio (egreg) at StackExchange (http://tex.stackexchange.com/a/188725/56326) | |
% |
This file contains hidden or 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
#!/usr/bin/env bash | |
# Backups the local version of my PhD thesis to Dropbox and Google Drive | |
# Andreas Herten, 2014 | |
main() { | |
local baseDir="/Users/Andi/Documents/Studium/Promotion/Thesis/LaTeX" | |
local logFile="thesis.log" | |
local gDriveTargetDir="Thesis/Backup/" | |
local gDriveLogfile=$baseDir/"gsync."$logFile |
There are different ways of handeling ROOT's NTuple / Trees.
I summarize them in the different methods of analyze.C
and compare their performances.
generate.C
generates real-looking, though fake data needed to run over with analyze.C
.
See my blog post on the results and explanation: LINK.
This file contains hidden or 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
import urllib2, argparse | |
from bs4 import BeautifulSoup | |
def getWidthAndHeight(videoURL): | |
video = urllib2.urlopen(videoURL) | |
videoSoup = BeautifulSoup(video) | |
width = height = 0 | |
for element in videoSoup.find_all('meta'): | |
if (element.get('property') == 'og:video:width'): | |
width = int(element.get('content')) |
This file contains hidden or 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
import numpy as np #numerical stuff | |
import pylab as pl #for poly line fit | |
import sys | |
import prettyplotlib as ppl # makes nicer colors and generally better to look at graphs | |
from prettyplotlib import plt # This is "import matplotlib.pyplot as plt" from the prettyplotlib library | |
from prettyplotlib import mpl # This is "import matplotlib as mpl" from the prettyplotlib library | |
# change font to Open Sans (has some kerning issues, though) | |
mpl.rcParams.update({'font.family':'Open Sans'}) |
This file contains hidden or 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
#! /bin/bash | |
# fast mount of home at remote server by its name or alias in .ssh/config | |
# usage: autosshfs <server-name> (without trailing : or path) | |
SERVER=$1 | |
MOUNT_DIR=/Volumes | |
if [[ -z $SERVER ]]; then | |
echo "usage: sshvol <server-name>[:<server_path>]" | |
exit 1 |
This file contains hidden or 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
;\aleph | ℵ | |
---|---|---|
;\forall | ∀ | |
;\hbar | ℏ | |
;\emptyset | ∅ | |
;\exists | ∃ | |
;\imath | ı | |
;\nabla | ∇ | |
;\neg | ¬ | |
;\surd | √ | |
;\flat | ♭ |
This file contains hidden or 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
tkvm | Thank you very much | |
---|---|---|
ddate | 【date:full】 | |
ttime | 【time:short】 | |
:-) |  | |
(c) | © | |
(r) | ® | |
(p) | ℗ | |
TM | ™ | |
c/o | ℅ | |
1/2 | ½ |