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
FROM python | |
WORKDIR /usr/src/app | |
RUN pip install pandas | |
# Change the above line for the following to get the expected table not found error | |
# RUN pip install pandas sqlalchemy | |
RUN echo 'import pandas as pd\n\ | |
saconnstring="sqlite:///test.db"\n\ | |
print(pd.read_sql_table("test", saconnstring))\n\ | |
print("Done")\n' >> testscript.py |
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 re | |
import itertools | |
import pybel | |
def permuteSMILESStereo(smile): | |
stereo = re.search(r"(\[[^\]]+@+[^\]]*\]|[/\\])", smile) | |
if stereo: | |
left = smile[:stereo.start()] | |
rights = permuteSMILESStereo(smile[stereo.end():]) |
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
CREATE DATABASE mychem_match_test; | |
USE mychem_match_test; | |
CREATE TABLE `compound_mol` ( | |
`compound_id` int(11) NOT NULL AUTO_INCREMENT, | |
`mol` text, | |
PRIMARY KEY (`compound_id`) | |
) ENGINE=MyISAM DEFAULT CHARSET=utf8; | |
INSERT INTO `compound_mol` (`mol`) VALUES (SMILES_TO_MOLECULE('c1ccccc1')), (SMILES_TO_MOLECULE('c1ccccc1O')), (SMILES_TO_MOLECULE('c1cnccc1')); | |
CREATE TABLE `compound_ser_mol` ( | |
`compound_id` int(11) NOT NULL, |
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
--- ../scripts/python/pybel.py 2012-10-03 21:08:52.000000000 +0200 | |
+++ /usr/local/lib/pybel.py 2013-06-24 22:40:30.024896494 +0200 | |
@@ -495,7 +495,9 @@ | |
Tkinter and Python Imaging Library are required for image display. | |
""" | |
- if not "png2" in outformats: | |
+ obconversion = ob.OBConversion() | |
+ formatok = obconversion.SetOutFormat("_png2") | |
+ if not formatok: |
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/python | |
# CLI program to control the mediakeys on OS X. Used to emulate the mediakey on a keyboard with no such keys. | |
# Easiest used in combination with a launcher/trigger software such as Quicksilver. | |
# Main part taken from http://stackoverflow.com/questions/11045814/emulate-media-key-press-on-mac | |
# Glue to make it into cli program by Fredrik Wallner http://www.wallner.nu/fredrik/ | |
import Quartz | |
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
benz | |
ChemDraw03281210432D | |
6 6 0 0 0 0 0 0 0 0999 V2000 | |
-0.7145 0.4125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | |
-0.7145 -0.4125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | |
0.0000 -0.8250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | |
0.7145 -0.4125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | |
0.7145 0.4125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | |
0.0000 0.8250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 |