Skip to content

Instantly share code, notes, and snippets.

View ejmurray's full-sized avatar

Ernest Murray ejmurray

View GitHub Profile
# 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
#!/usr/bin/python
import os
import io
import sys
import shutil
import re
import string
from datetime import date, datetime, time
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
"""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.
"""
@ejmurray
ejmurray / count_words.py
Created January 19, 2016 13:42 — forked from bradmontgomery/count_words.py
playing with python's `collections.Counter`
"""
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*
@ejmurray
ejmurray / organize-photos.py
Created January 22, 2016 15:54 — forked from cliss/organize-photos.py
Photo management script. This script will copy photos from "~/Pictures/iPhone Incoming" into a tree the script creates, with folders representing month and years, and photo names timestamped. Completely based on the work of the amazing Dr. Drang; see here: http://www.leancrew.com/all-this/2013/10/photo-management-via-the-finder/ You can see more…
#!/usr/bin/python
import sys
import os, shutil
import subprocess
import os.path
from datetime import datetime
######################## Functions #########################