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/local/bin/python2.7 | |
import datetime | |
import time | |
import re | |
import os | |
from twython import Twython | |
import sys | |
import traceback | |
import httplib, urllib #used in the Pushover code |
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
## this little script shows off the use of the pubmed API through bioconductor | |
## requires installing Biopython (using pip) | |
## also requires installing the DTD files for each of the Entrez API calls, | |
## but the instructions for this are given when you run the script | |
## useful list of Entrez databases that can be queried through API | |
# pmc_pubmed PubMed citations for these articles | |
# pmc_refs_pubmed PubMed article citing PMC article | |
# pmc_pmc_cites PMC articles that given PMC article cites | |
# pmc_pmc_citedby PMC article citing given PMC article |
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
I've seen links around the web for a list of items and a single 'add to amazon cart' button. | |
I don't know how to do this more easily through an amazon-provided UI, but it seems that you can hack it together through URL params easy enough, like so: | |
https://www.amazon.com/gp/aws/cart/add.html?AssociateTag=your_tag&tag=your_tagQ&ASIN.1=B012NH05UW&Quantity.1=1&ASIN.2=B012M8LXQW&Quantity.2=1 | |
* ASINs are the string after /dp/ in amazon URLs. (amazon.com/dp/string_is_here) | |
* Add as URL params w/ incrementing identifiers and quantity couplets (ASIN.1, Quantity.1, ASIN.2, Quantity.2…) |
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 pyphen | |
import prodigy | |
from prodigy.components.loaders import JSONL | |
from prodigy.components.db import connect | |
hyphenator = pyphen.Pyphen(lang="en_US") | |
def construct_html(text): | |
hyphend = hyphenator.inserted(text) |