This file contains hidden or 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
from pyqtgraph.Qt import QtGui, QtCore | |
import numpy as np | |
import pyqtgraph as pg | |
## Start Qt event loop unless running in interactive mode or using pyside. | |
if __name__ == '__main__': | |
import sys | |
from window import CustomWindow | |
This file contains hidden or 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 sys | |
import subprocess | |
import logging | |
import pstats | |
try: | |
from gprof2dot import PstatsParser, DotWriter, SAMPLES, themes | |
except ImportError: | |
logging.warning( |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
== 2015-12-21 02:17:12,683 runpy.EB_GCC INFO This is EasyBuild 2.5.0 (framework: 2.5.0, easyblocks: 2.5.0) on host precise32. | |
== 2015-12-21 02:17:12,684 runpy.EB_GCC INFO This is easyblock EB_GCC from module easybuild.easyblocks.gcc (/home/vagrant/.local/easybuild/software/EasyBuild/2.5.0/lib/python2.7/site-packages/easybuild_easyblocks-2.5.0-py2.7.egg/easybuild/easyblocks/g/gcc.pyc) | |
== 2015-12-21 02:17:12,684 runpy.EB_GCC INFO Build dir set to /home/vagrant/.local/easybuild/build/GCC/4.7.2/dummy-dummy | |
== 2015-12-21 02:17:12,685 runpy.EB_GCC INFO Software install dir set to /home/vagrant/.local/easybuild/software/GCC/4.7.2 | |
== 2015-12-21 02:17:12,686 runpy.EB_GCC INFO Module install dir set to /home/vagrant/.local/easybuild/modules/all | |
== 2015-12-21 02:17:12,686 runpy.EB_GCC INFO Init completed for application name GCC version 4.7.2 | |
== 2015-12-21 02:17:12,687 runpy.easyblock INFO Obtained application instance of for GCC (easyblock: None) | |
== 2015-12-21 02:17:12,688 runpy.EB_GCC INFO building and installing GCC/ |
This file contains hidden or 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
var sheet = SpreadsheetApp.getActive().getSheetByName('Overview'); | |
function userSubmitsForm(e) { | |
var user = {name: e.namedValues['Full Name'][0], email: e.namedValues['E-mail'][0], | |
committees : e.namedValues['Which PDA Committee are you interested in to volunteer?'][0] | |
}; | |
var committees = user.committees.split(', ');//space is important! |
This file contains hidden or 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 cPickle | |
from rmgpy.species import Species | |
from rmgpy.reaction import Reaction | |
a = Species(...) | |
b = Species(...) | |
r = Reaction() | |
r.reactants = [a,b] |
This file contains hidden or 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/python | |
import openbabel as ob | |
""" | |
This gist shows how to create a molecule from an OB mol. | |
OpenBabel does not have the obmol.GetAtomByIdx(int) method. | |
""" |
This file contains hidden or 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 openbabel as ob | |
from rdkit import Chem | |
""" | |
This snippet shows that the IDx getter of OpenBabel and RDKit differ in implementation. | |
Openbabel IDx: starts at 1 | |
RDKit IDx: starts at 0 |
This file contains hidden or 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
from functools import wraps | |
#From High Performance Python | |
def timefn(fn): | |
@wraps(fn) | |
def measure_time(*args, **kwargs): | |
t1 = time.time() | |
result = fn(*args, **kwargs) | |
t2 = time.time() | |
print ("@timefn:" + fn.func_name + " took " + str(t2 - t1) + " seconds") | |
return result |
This file contains hidden or 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
This gist parses the tab separated text file 'goldsmith_table3.tsv', adds the uncertainty data to the RMG thermo library 'DFT_QC_thermo.py' and saves it to a new library 'DFT_QC_thermo_new.py' |