Skip to content

Instantly share code, notes, and snippets.

View taoliu's full-sized avatar
🌎
Working from the earth

Tao Liu (τν) taoliu

🌎
Working from the earth
View GitHub Profile
@taoliu
taoliu / wrapToSGE
Created January 6, 2012 21:20
SGE script wrapper
#!/usr/bin/env python
import subprocess
import sys
import os
import time
#time_stamp=time.strftime("%y-%m-%d_%H-%M-%S")
time_stamp=str(time.time())
@taoliu
taoliu / prockmon
Created January 6, 2012 21:15
Monitor user time and memory usage of a process
#!/bin/bash
if [[ $# < 2 ]];then
echo 'need two parameters: $0 <interval> <pid>'
exit 1;
fi
INTERVAL=$1
PID=$2
@taoliu
taoliu / pyprofile
Created June 19, 2011 20:06 — forked from anonymous/pyprofile
pyrprofile: profile Python script
#!/usr/bin/env bash
## pyprofile: profile Python script
## $Revision$
## Copyright 2011 Michael M. Hoffman <[email protected]>
## Modified by Tao Liu: Correctly get the command name.
set -o nounset
set -o pipefail