Skip to content

Instantly share code, notes, and snippets.

View gr-a-m's full-sized avatar

Grant Marshall gr-a-m

View GitHub Profile
@gr-a-m
gr-a-m / kdcrawler.py
Created April 17, 2015 09:03
kdcrawler.py
from bs4 import BeautifulSoup
import urllib2
import json
import time
mm = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12']
def extract_tags(url):
""" This function extracts any "tag" links from a url. """
f = urllib2.urlopen(url)
@gr-a-m
gr-a-m / get_itemsets.py
Created April 17, 2015 09:04
get_itemsets.py
import fileinput
import json
import urllib2
def main():
submit_object = {
"threshold": 12,
"documents": []
}
@gr-a-m
gr-a-m / get-slides.py
Last active August 29, 2015 14:13
Slideshare Post Retrieval and Processing
import hashlib
import requests
import sys
import time
def main():
# Extract the keyword to search as the command-line argument
keyword = ' '.join(sys.argv[1:])
# Set up the auth for the request