duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
| # Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail | |
| # Make sure you have IMAP enabled in your gmail settings. | |
| # Right now it won't download same file name twice even if their contents are different. | |
| import email | |
| import getpass, imaplib | |
| import os | |
| import sys | |
| detach_dir = '.' |
| def extract_form_fields(self, soup): | |
| "Turn a BeautifulSoup form in to a dict of fields and default values" | |
| fields = {} | |
| for input in soup.findAll('input'): | |
| # ignore submit/image with no name attribute | |
| if input['type'] in ('submit', 'image') and not input.has_key('name'): | |
| continue | |
| # single element nome/value fields | |
| if input['type'] in ('text', 'hidden', 'password', 'submit', 'image'): |
| <?php | |
| /* | |
| OpenCalais: A wrapper for Thomson Reuters' OpenCalais semantic parser | |
| (http://www.opencalais.com/) | |
| Author: Vaughn Hagerty | |
| Usage: new OpenCalais(api_key, submitter[, relevance]), OpenCalais->parse(HTML_formatted_article) | |
| api_key and submitter are required and created when registering for OpenCalais account | |
| relevance is a decimal value between 0 and 1 optional and determines how strictly you want to parse | |
| HTML_formatted_article is the article to parse |
| <?php | |
| /* | |
| YGeocode: A wrapper for Yahoo's Placemaker geocode service to access certain properties | |
| Author: Vaughn Hagerty | |
| Usage: new YGeocode(<API Key>), YGeocode->geocode(<query>), where <query> is an address | |
| Methods and properties: | |
| ->geocode(<query>) : geocode a non-urlescaped query (address, zip code, city) | |
| ->lat : return the latitude. If geocode fails, it returns 0 | |
| ->lon : return the longitude. If geocode fails, it returns 0 |
| <?php | |
| /* | |
| GGeocode: A wrapper for Google's geocode service to access certain properties | |
| Author: Vaughn Hagerty | |
| Usage: new GGeocode(), GGeocode->geocode(<query>), where <query> is an address | |
| Methods and properties: | |
| ->geocode(<query>) : geocode a non-urlescaped query (address, zip code, city) | |
| ->lat : return the latitude. If geocode fails, it returns 0 | |
| ->lon : return the longitude. If geocode fails, it returns 0 |