Skip to content

Instantly share code, notes, and snippets.

View mhoffman's full-sized avatar

Max Hoffmann mhoffman

View GitHub Profile
#!/usr/bin/env python
import pickle
import optparse
import espresso.io
import sys
import os.path
import ase.io.cube
import ase.units
#!/usr/bin/env python
import os
import os.path
import optparse
import tempfile
parser = optparse.OptionParser(usage='%script <cube-filename>')
#!/usr/bin/env python
### List current import path for python
def ppath():
import sys
for p in sys.path:
print(p)
if __name__ == '__main__':
#!/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()
#!/bin/bash -eu
# Copyright, Max J. Hoffmann, 2012
shopt -s expand_aliases
pdf_viewer="xpdf -z page "
show_pdf=""
#Default scaling
scaling="0.3"
@mhoffman
mhoffman / .bashrc
Last active November 8, 2017 17:34
# 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}
export HISTIGNORE="&:ls:[bf]g:[cb]d:b:exit:[ ]*"
#
# Example:
+x11 +xquartz
# +gcc48
# +universal
+bash_completion
#!/usr/bin/env python
import pprint
try:
import io as StringIO
except:
import StringIO
import ase.io
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.