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 | |
import sys | |
import optparse | |
parser = optparse.OptionParser( | |
usage=""" | |
usage: %prog [low] hi | |
Do an (integer) binary on the command line. Initial arguments are a lower and upper bound. | |
If only one argument is given, the lower bound will be assume 0. Iteratively state |
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 | |
import pickle | |
import optparse | |
import espresso.io | |
import sys | |
import os.path | |
import ase.io.cube | |
import ase.units |
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 | |
import os | |
import os.path | |
import optparse | |
import tempfile | |
parser = optparse.OptionParser(usage='%script <cube-filename>') |
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 | |
### List current import path for python | |
def ppath(): | |
import sys | |
for p in sys.path: | |
print(p) | |
if __name__ == '__main__': |
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 | |
### Print the installed location of a python module | |
def pwhichd(): | |
import optparse | |
import os | |
parser = optparse.OptionParser(usage="""%prog <module-name>""") | |
options, args = parser.parse_args() |
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 -eu | |
# Copyright, Max J. Hoffmann, 2012 | |
shopt -s expand_aliases | |
pdf_viewer="xpdf -z page " | |
show_pdf="" | |
#Default scaling | |
scaling="0.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
# Show bash prompt with timer information | |
# and git branch | |
export GIT_PS1_SHOWDIRTYSTATE=true | |
export export GIT_PS1_SHOWSTASHSTATE=true | |
# set a fancy prompt | |
declare -F | grep __git_ps1 > /dev/null | |
if [ "$?" -eq 0 ] | |
then | |
echo ${platform} |
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
export HISTIGNORE="&:ls:[bf]g:[cb]d:b:exit:[ ]*" |
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
# | |
# Example: | |
+x11 +xquartz | |
# +gcc48 | |
# +universal | |
+bash_completion |
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 | |
import pprint | |
try: | |
import io as StringIO | |
except: | |
import StringIO | |
import ase.io |