Skip to content

Instantly share code, notes, and snippets.

# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r
@zdepablo
zdepablo / search-twitter.py
Created March 3, 2014 15:36
Search tweets using TwitterAPI
from TwitterAPI import TwitterAPI
# Go to http://dev.twitter.com and create an app.
# The consumer key and secret will be generated for you after
consumer_key = <consumer-key>
consumer_secret = <consumer-secret>
# After the step above, you will be redirected to your app's page.
# Create an access token under the the "Your access token" section
access_token_key = <access-token-key>
@zdepablo
zdepablo / tag-sentiment-textalytics.py
Created March 3, 2014 15:34
Tag a twitter using Textalytics Media Analysis API
import smaclient
license_key = <textalytics-license-key>;
textalytics = smaclient.SmaClient(license_key)
doc = smaclient.Document('0', 'Italia se indigna por la negativa de #Barilla a hacer anuncios con gays')
doc.language = 'es'
doc.source = 'TWITTER'