Skip to content

Instantly share code, notes, and snippets.

View cdfox's full-sized avatar

Christopher Fox cdfox

View GitHub Profile
@cdfox
cdfox / gist:1037261
Created June 21, 2011 04:44
Twitter LSI
import json
import urllib
import urllib2
from gensim import corpora, models, similarities
import logging
import sys
# First 20 Twitter search results for "python"
tweets = [u'Long Integer Objects \u2014 Python v2.7.2 documentation http://bit.ly/jEzUVi',
@cdfox
cdfox / gist:1031073
Created June 17, 2011 08:31
twitter lsi test with query "haskell", 3 topics
Topic 0:
ICFP Programming Contest 2011 (Lambda: The Gathering) http://bit.ly/mfpZk6 #fp #fsharp #ocaml #haskell #scala #lisp #racket #scheme
[(0, 0.96213088834451832), (1, -0.053502204689306387), (2, -0.07951428719352148)]
RT @rickasaurus: ICFP Programming Contest 2011 (Lambda: The Gathering) http://bit.ly/mfpZk6 #fp #fsharp #ocaml #haskell #scala #lisp #racket #scheme
[(0, 0.99540683458237178), (1, -0.034752233550864223), (2, -0.065158846734593753)]
RT @rickasaurus: ICFP Programming Contest 2011 (Lambda: The Gathering) http://bit.ly/mfpZk6 #fp #fsharp #ocaml #haskell #scala #lisp #racket #scheme
[(0, 0.99540683458237178), (1, -0.034752233550864223), (2, -0.065158846734593753)]
@cdfox
cdfox / gist:1031054
Created June 17, 2011 08:07
twitter lsi test with query "haskell"
Topic 0:
ICFP Programming Contest 2011 (Lambda: The Gathering) http://bit.ly/mfpZk6 #fp #fsharp #ocaml #haskell #scala #lisp #racket #scheme
[(0, 0.95871468032041129), (1, 0.079066183724039785)]
RT @rickasaurus: ICFP Programming Contest 2011 (Lambda: The Gathering) http://bit.ly/mfpZk6 #fp #fsharp #ocaml #haskell #scala #lisp #racket #scheme
[(0, 0.99229220887802994), (1, 0.062785061633268899)]
RT @rickasaurus: ICFP Programming Contest 2011 (Lambda: The Gathering) http://bit.ly/mfpZk6 #fp #fsharp #ocaml #haskell #scala #lisp #racket #scheme
[(0, 0.99229220887802994), (1, 0.062785061633268899)]
@cdfox
cdfox / twitter_lsi.py
Created June 17, 2011 05:29 — forked from anonymous/twitter_lsi.py
Applying LSI to Twitter search
import json
import urllib
import urllib2
from gensim import corpora, models, similarities
import logging
import sys
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure