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/env bash | |
# Returns a BibTeX (www.bibtex.org) entry for one or more given DOIs | |
# (https://www.doi.org/). | |
# | |
# Call it like this: | |
# | |
# $ doi2bibtex.sh 10.1093/bioinformatics/btu533 | |
# | |
# Can also be used for several DOIs at once: |
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
wget --user-agent="not wget" $1 |
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 re import search | |
from urllib2 import urlopen | |
root_url = 'http://apod.nasa.gov/apod/' | |
html = urlopen(root_url).read() | |
m = search('a href="(.+jpg)\"', html) | |
img = urlopen(root_url + m.groups()[0]).read() | |
with open(m.groups()[0].split('/')[-1], 'wb') as w: | |
w.write(img) |
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
### Keybase proof | |
I hereby claim: | |
* I am rymc on github. | |
* I am ryanmcconville (https://keybase.io/ryanmcconville) on keybase. | |
* I have a public key whose fingerprint is F2B4 BD37 3C2B 141E FD97 6B58 DFDE 9735 A4F0 944D | |
To claim this, I am signing this object: |