Skip to content

Instantly share code, notes, and snippets.

View alistairwalsh's full-sized avatar

Alistair Walsh alistairwalsh

  • Reservoir, Victoria, Australia
View GitHub Profile
@alistairwalsh
alistairwalsh / pubmed_search.py
Created May 17, 2017 06:06 — forked from langner/pubmed_search.py
A class that searches Pubmed for a list of PMIDs via the BioPython Entrez module and returns the results in a simpler dictionary format.
"""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.
"""
@alistairwalsh
alistairwalsh / plos_sunburnt_demo.py
Created November 25, 2016 01:28 — forked from drewbuschhorn/plos_sunburnt_demo.py
PLOS API code for use with SunBurnt
#Sample PLOS api code for use with python Solr library Sunburnt
#( https://github.com/tow/sunburnt )
#!Note! requires sunburnt's external libraries: httplib2,lxml
#https://groups.google.com/d/topic/plos-api-developers/zv591sFz6TM/discussion
import sunburnt,urllib2
class PlosInterface(sunburnt.SolrInterface):
def __init__(self,api_key):
plos_url = "http://api.plos.org/search"
#either