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 | |
#Postinstall for Ubuntu 9.10 -- 14.04 | |
#Install as root! | |
#after sudo su | |
echo "================================================================" | |
echo "Update and upgrade the system" | |
sudo apt-get install aptitude | |
sudo aptitude update | |
sudo aptitude -y safe-upgrade | |
echo "================================================================" |
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 python | |
'''one dimension kinematics | |
to be run from: | |
$ ipython -pylab | |
[1]: run movement.py | |
''' | |
from __future__ import division | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import sys |
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 python | |
#From arXiv:1107.5216 | |
from __future__ import division | |
from visual import * | |
craft = sphere(pos = vector(10e7,0,0), color = color.white, radius = 1e6) | |
Earth = sphere(pos = vector(0,0,0), color = color.blue, radius = 6.3e6) | |
trail = curve(color = craft.color) | |
G = 6.67e-11 |
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
/* Copyright (c) Colorado School of Mines, 2011.*/ | |
/* All rights reserved. */ | |
/* SUTTOZ: $Revision: 1.20 $ ; $Date: 2011/11/16 23:21:55 $ */ | |
#include "su.h" | |
#include "segy.h" | |
#include "header.h" | |
/*********************** self documentation ******************************/ |
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
def dictionarizearray(x,list_of_columns): | |
""" | |
Assigns a dictionary key to each of the m-columns | |
of the (n,m) x array | |
EXAMPLE in some code which loads this function: | |
>>> names=['var1','var2',...,'varN'] | |
>>> xnames=dictionarizearray(x,names) | |
>>> xmask=x[xnames['var1']<xnames['var2']] | |
#instead of |
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
*.aux | |
*.glo | |
*.idx | |
*.log | |
*.toc | |
*.ist | |
*.acn | |
*.acr | |
*.alg | |
*.bbl |
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 python | |
"""Convert a master latex file, | |
into a single document by including | |
automatically all the LaTeX documents | |
which are arguments of | |
\include or \input | |
ignoring any \includeonly | |
""" | |
import sys | |
if len(sys.argv)==3: |
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 | |
pattern=$1 | |
replace=$2 | |
list=$3 | |
if ! [ $replace ]; then | |
echo USAGE: $0 PATTERN REPLACEMENT LIST | |
echo EXAMPLE: $0 \""R-\\([a-z]\\+\\)"\" \"\\\$R\\\$-"\1"\" \"\*.tex\" | |
fi | |
for i in $list; do | |
sed 's/'"$pattern"'/'"$replace"'/g' $i > /tmp/tmpfile |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer