This file contains 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 | |
# copies a file to the gsi lx-pool, | |
# prints it and then removes it. | |
# | |
if [ "$#" -eq 2 ]; then | |
scp $2 gsi:$2 | |
ssh gsi "pop -p$1 $2 2>&1 ; rm $2" > /tmp/log | |
cat /tmp/log && rm /tmp/log | |
else |
This file contains 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 | |
ps -C skippy-xd &> /dev/null && pkill skippy-xd || skippy-xd |
This file contains 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 python2 | |
from ROOT import TGraph, gPad | |
filename = raw_input("Filename: ") | |
plot = TGraph(filename) | |
title = filename.split('.')[0] | |
plot.Draw() | |
plot.SetTitle(title) | |
gPad.Print(title + ".pdf") |
This file contains 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
let g:pathogen_disabled = [] | |
call add(g:pathogen_disabled, 'cpp-enhanced') | |
call add(g:pathogen_disabled, 'cpp') | |
execute pathogen#infect() | |
"" Shows command as it is being entered | |
set showcmd | |
set t_Co=256 | |
colorscheme badwolf | |
syntax on |
This file contains 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 | |
# print a size sorted list | |
# of all programs installed | |
# | |
## equery s '*' | sed 's/(\|)/ /g' | sort -n -k 9 | gawk '{printf("%s %.3gMB\n",$1,$9/1048576)}' | |
# this version is much faster: | |
qsize -asm | sed 's/,//g' | sort -n -k 6 | awk '{printf "%dMB %s\n",$6,$1}' |
This file contains 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
class Example(object): | |
def __init__(self, x=None, y=None): | |
self._x = x | |
self._y = y | |
@property | |
def x(self): | |
return self._x |
This file contains 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
""" Two python implementations of the quicksort algorithm.""" | |
__all__ = ["sort_np", "sort_pure"] | |
import numpy as np | |
def sort_np(array): | |
""" For numpy arrays, with masking. """ | |
if len(array) <= 1: | |
return array | |
pivot = array[0] |
This file contains 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
from __future__ import print_function | |
import sys | |
if len(sys.argv) == 1: | |
dimx, dimy = 4, 3 | |
elif len(sys.argv) == 3: | |
dimx, dimy = [int(var) for var in sys.argv[1:3]] | |
else: | |
sys.exit('Wrong amount of parameters') |
This file contains 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 | |
whymask() { | |
find /usr/portage/profiles/ -name '*.mask' -exec \ | |
awk -vRS= "/${*/\//.}/ { | |
print \" \" FILENAME \":\", \"\n\" \"\n\" \$0 \"\n\" | |
}" {} + | less | |
} | |
whymask $1 |
This file contains 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
# Define geant4 env. variables | |
source /usr/share/Geant4-9.6.2/geant4make/geant4make.sh | |
echo "Geant4 Set" | |
# Define additional variables used by geant4, but that are different in gentoo | |
export QTMOC="/usr/bin/moc-qt4" | |
export QTFLAGS="-I/usr/include/qt4 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL" | |
export QTLIBS="-L/usr/lib/qt4 -lQtCore -lQtGui" | |
export GLQTLIBS="-L/usr/lib/qt4 -lQtCore -lQtGui -lQtOpenGL" | |
echo "QT Set" |
OlderNewer