Skip to content

Instantly share code, notes, and snippets.

@greeness
greeness / gist:4041029
Created November 8, 2012 19:38
sentiment analysis
http://danzambonini.com/self-improving-bayesian-sentiment-analysis-for-twitter/
http://www.laurentluce.com/posts/twitter-sentiment-analysis-using-python-and-nltk/
[PDF]
Sentiment Analysis of Twitter Data - Department of Computer ...
www.cs.columbia.edu/~julia/papers/Agarwaletal11.pdf
@greeness
greeness / gist:4021817
Created November 6, 2012 01:17
google tech stack
http://michaelnielsen.org/blog/lecture-course-the-google-technology-stack/
@greeness
greeness / gist:3985998
Last active May 28, 2017 04:02
q-learning example
from random import random, choice, randint
"""
+++++++++++++++++++++
+ 10 + 1 + 1 + 1 +
+++++++++++++++++++++
+ 1 + 1 + 1 + 1 +
+++++++++++++++++++++
+ 1 + 1 + 1 + 1 +
+++++++++++++++++++++
+ 1 + 1 + 1 + 1 +
@greeness
greeness / gist:3950139
Created October 25, 2012 02:35
netflix
http://www.timelydevelopment.com/demos/NetflixPrize.aspx
@greeness
greeness / gist:3948657
Created October 24, 2012 20:28
query parser example
from random import sample
def search(word):
s = sample(range(10), len(word))
print '-- SEARCH %-12s %68s %-60s' % (word, '', str(sorted(s)))
return set(s)
def set_op(operator, set1, set2):
if operator == 'AND':
return set1 & set2
@greeness
greeness / gist:3869552
Created October 11, 2012 01:11
fix heap size on mac for weka
https://list.scms.waikato.ac.nz/mailman/htdig/wekalist/2008-June/013553.html
It did help, indeed!
Perfect!
Thanks alot!
Cheers,
Frank
Am 31.05.2008 um 01:10 schrieb Mark Hall:
@greeness
greeness / gist:3838378
Created October 5, 2012 06:18
sort a tab-delimited file
Linux tip: sort a tab-delimited file
The Linux command “sort” is both powerful and confusing. The manpage tells us that the “-t” switch can be used to set the field delimiter.
If you’ve tried various combinations of “-t” and “\t” to tell sort that your file is tab-delimited without success, try this (bash shell):
TAB=`echo -e "\t"`
sort -t"$TAB" myfile
@greeness
greeness / gist:3823054
Created October 2, 2012 20:24
keyword extraction
http://code.google.com/p/maui-indexer/
http://wikipedia-miner.cms.waikato.ac.nz/
http://www.nzdl.org/Kea/description.html
http://www.linkedin.com/groupItem?view=&srchtype=discussedNews&gid=131222&item=166116452&type=member&trk=eml-anet_dig-b_pd-ttl-cn&ut=2oJEISf0wd7Rs1
@greeness
greeness / gist:3751554
Created September 19, 2012 19:05
datagotham 2012 notes

==== foursquare Realtime recommendation from signals:

  • location
  • time of day
  • personal check-in history
  • personal/friends preferences
  • venue similarities
  • aggregate historical data (which places are popular and when)