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 | |
import sys | |
import os, shutil | |
import subprocess | |
import os.path | |
from datetime import datetime | |
######################## Functions ######################### |
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
""" | |
Use a Counter to find the most common words in "The Wonderful Wizard of Oz" by | |
L. Frank Baum. | |
Available in plain text at: | |
https://ia700500.us.archive.org/2/items/thewonderfulwiza00055gut/wizoz10.txt | |
short link: http://bit.ly/thewonderfulwizard | |
Note: This code also counts the words in the header, so it's not a *realistic* |
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
"""Tools for searching Pubmed for a list of PMIDs. | |
The goal here is to search for many PMIDs at once, since searching | |
sequentially can take a long time. Using the the BioPython Entrez module | |
is super convenient to this end. | |
The results results are returned in a simple dictionary format. | |
""" | |
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
No boost binaries for MSVC 2012 available, so... | |
Delete all other Python versions other than Python 2.7 (not sure if necessary...) | |
Unzip Boost 1.49.0 to C:\Boost\boost_1_49_0 | |
cd into it | |
bootstrap # to create bjam | |
bjam.exe --with-regex --with-python --with-date_time --with-thread link=shared toolset=msvc-11.0 release install -j4 | |
bjam.exe --with-thread --with-date_time toolset=msvc-11.0 release stage -j4 # Then copy from C:\Boost\boost_1_49_0\stage\lib |
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 | |
import os | |
import io | |
import sys | |
import shutil | |
import re | |
import string | |
from datetime import date, datetime, time |
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
# Note that this script attempts to delete directories (Folders) called 'temp' and 'dateutil' | |
# within Pythonista as part of installation. It will also overwrite files in directories | |
# named 'github' and 'githubista'. If you are using Pythonista 1.3 or above please check | |
# that you have not created any Folders with these names before running this script as | |
# any files inside them will be irretrievably lost. | |
import os | |
import urllib2 | |
import tarfile | |
import shutil | |
import traceback |