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
- simple | |
- public over private | |
- personal vanity | |
- internet is global | |
- permalinks | |
- one important item per page | |
- don't break the browser | |
- don't wanker in technology | |
- a medium is not a grande | |
- break convention for your users |
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 | |
# encoding: utf-8 | |
"""Extract cartesian geometries from gaussian log files using openbabel. | |
Reads all files that end '.log' in the current working directory. | |
Puts corresponding .mol files in the 'Geometries' subdirectory. | |
Created by Richard West on 2009-10-15. | |
Copyright (c) 2009 MIT. All rights reserved. | |
""" |
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
import pybel | |
output = file('smiles.txt','w') | |
for inchi in file('inchis.txt'): | |
molecule = pybel.readstring("inchi",inchi) | |
output.write( molecule.write('smiles') ) |
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 | |
# Recursively search folders for '.log' files and scan them for a certain regular expression. | |
import re # regular expressions | |
import fileinput, sys, os | |
# precompile the search into a RegularExpression object to make it faster when we do it lots of times | |
searchExpression=re.compile("Sum\ of\ electronic\ and\ zero-point\ Energies=\s*([\-0-9.]+)") | |
def process_folder(folderpath): | |
#print "searching",folderpath |
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
% for paragraph summaries | |
\newcommand{\parsum}[1]{ | |
\marginpar{ | |
\raggedright{} | |
\footnotesize{ | |
{\sffamily \setlength{\baselineskip}{0.6\baselineskip}\textcolor{grey}{#1} \par} | |
} | |
} | |
} |
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
# Stop wasting my time compiling PowerPC-compatible C extensions on my intel Mac | |
import distutils.sysconfig | |
config = distutils.sysconfig.get_config_vars() | |
for key,value in config.iteritems(): | |
location = str(value).find('-arch ppc') | |
if location>=0: | |
print "removing '-arch ppc' from %s"%(key) | |
config[key] = value.replace('-arch ppc ','') | |
# Tip from Lisandro Dalcin: |
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
;; sort out backspace in .emacs on monch | |
(keyboard-translate ?\C-h ?\C-?) | |
(keyboard-translate ?\C-? ?\C-h) | |
(global-set-key "\C-h" 'delete-backward-char) |
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
# set up git author details for commits and merges | |
export GIT_AUTHOR_NAME="Richard West" | |
export [email protected] | |
export GIT_COMMITTER_NAME="Richard West" | |
export [email protected] | |
# change the default editor from vi to emacs | |
export GIT_EDITOR=emacs # doesn't work with the old version of git on monch | |
export VISUAL=emacs # a more generic system-wide editor command that does the trick |
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
TemperatureModel: Constant (K) 800 1000 1500 | |
PressureModel: Constant (atm) 1 5 10 | |
SpectroscopicDataEstimator: FrequencyGroups | |
PressureDependence: ReservoirState | |
PDepKineticsModel: Chebyshev | |
TRange: (K) 800 2000 7 4 | |
PRange: (bar) 1 10 3 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
!#/bin/sh | |
echo "Which version of chemkin?" | |
echo " Chemkin Regular (21 seats)" | |
echo " Chemkin Pro (1 seat)" | |
OPTIONS="standard pro" | |
select opt in $OPTIONS; do | |
if [ "$opt" = "standard" ]; then | |
xterm -ls -title 'Chemkin Regular - do not close before chemkin!' -bg grey -e ksh " | |
source /home/reaction/chemkin15101_linuxx8664/bin/chemkin_setup.ksh | |
echo 'QUIT CHEMKIN BEFORE CLOSING THIS WINDOW OR YOU MAY NOT CHECK IN THE LICENCE'; |
OlderNewer