Skip to content

Instantly share code, notes, and snippets.

View gartho's full-sized avatar

Garth O gartho

  • SAS Institute
  • Isle of Wight, UK
View GitHub Profile
@gartho
gartho / gist:8899240
Created February 9, 2014 13:41
Example Groovy Script for using Twitter Streaming API
@Grab(group="org.twitter4j", module="twitter4j-core", version="3.0.5")
@Grab(group="org.twitter4j", module="twitter4j-stream", version="3.0.5")
import twitter4j.*
def stream = new TwitterStreamFactory().getInstance()
def listener = new StatusListener() {
@Override
void onStatus(Status status) {
#!/usr/bin/python
import sys
import os, shutil
import subprocess
import os.path
from datetime import datetime
######################## Functions #########################