This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en" dir="ltr"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Basic responsive template</title> | |
<style> | |
/* a centred div with a maximum width */ | |
/* if you want really nice fonts use a Google font */ | |
.container { | |
max-width: 600px; |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en" dir="ltr"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Centred Column</title> | |
<style> | |
.container { | |
max-width: 600px; | |
margin: 0 auto; |
This file contains hidden or 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
# Finding topics of interest by using the filtering capablities it offers. | |
import twitter, json, sys, csv | |
# == OAuth Authentication == | |
# The consumer keys can be found on your application's Details | |
# page located at https://dev.twitter.com/apps (under "OAuth settings") | |
# this app is being run by cast laboratory..@CASTlaboratory (4003669463) | |
consumer_key="" | |
consumer_secret="" |
This file contains hidden or 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 nltk, sys, csv | |
from nltk.tokenize import TweetTokenizer | |
from nltk.corpus import stopwords | |
from datetime import datetime | |
import pandas as pd | |
import numpy as np | |
import string | |
from collections import Counter | |
This file contains hidden or 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 twitter, json, sys, csv | |
# == OAuth Authentication == | |
CONSUMER_KEY = '' | |
CONSUMER_SECRET = '' | |
OAUTH_TOKEN = '' | |
OAUTH_TOKEN_SECRET = '' | |
auth = twitter.oauth.OAuth(OAUTH_TOKEN, | |
OAUTH_TOKEN_SECRET, |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Simple Marker Map using Google Maps JavaScript API</title> | |
<style> | |
html, | |
body, | |
#map-canvas { |
This file contains hidden or 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
'''Tweet Streaming API consumer''' | |
import twitter, csv, sys | |
# == OAuth Authentication == | |
consumer_key="" | |
consumer_secret="" | |
access_token="" | |
access_token_secret="" | |
This file contains hidden or 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
# dont keep this script in public_html!!!! | |
import twitter, sys,json,csv, time | |
def twitter_user_timeline(twitter_api, q): | |
''' get last tweet ID so we can paginate down from that 200 at a time to 3,200 | |
''' | |
user_timeline = twitter_api.statuses.user_timeline(screen_name=q,count=1) | |
print user_timeline[0]['id'] | |
ids = [user_timeline[0]['id']] | |
statuses = [] |
This file contains hidden or 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
# dont keep this script in public_html!!!! | |
import twitter | |
import sys,json,csv | |
def twitter_search(twitter_api, q, max_results=200): | |
# See https://dev.twitter.com/docs/api/1.1/get/search/tweets and | |
# https://dev.twitter.com/docs/using-search for details on advanced | |
# search criteria that may be useful for keyword arguments | |
# See https://dev.twitter.com/docs/api/1.1/get/search/tweets |
NewerOlder