I hereby claim:
- I am thinrhino on github.
- I am thinrhino (https://keybase.io/thinrhino) on keybase.
- I have a public key whose fingerprint is 76EB 936C 5D76 6E82 E9A9 68FF 96C8 359B CC53 9C5F
To claim this, I am signing this object:
from __future__ import division | |
from bs4 import BeautifulSoup as bs | |
import requests | |
import re | |
import time | |
from pymongo import MongoClient | |
from time import mktime | |
from datetime import datetime | |
import plotly.plotly as py | |
import plotly.graph_objs as go |
function FindProxyForURL(url, host) | |
{ | |
if (dnsDomainIs(host, ".pandora.com")) | |
return "PROXY 199.189.84.217:3128" | |
if (dnsDomainIs(host, ".spotify.com")) | |
return "PROXY 54.246.92.203:80" | |
return "DIRECT" | |
} |
I hereby claim:
To claim this, I am signing this object:
# First download the twitter archive | |
# Get API_KEY and API_SECRET from developer.twitter.com | |
import os | |
import json | |
import glob | |
import base64 | |
import requests | |
from requests_oauthlib import OAuth1Session |
;; Enable mouse support | |
(unless window-system | |
(require 'mouse) | |
(xterm-mouse-mode t) | |
(global-set-key [mouse-4] '(lambda () | |
(interactive) | |
(scroll-down 1))) | |
(global-set-key [mouse-5] '(lambda () | |
(interactive) | |
(scroll-up 1))) |
#!/usr/bin/env python -i | |
""" | |
A local interactive IPython shell for Google App Engine on Mac OSX. | |
Usage: | |
cd /to/project/folder/with/app.yaml | |
python gae_shell.py | |
Notes: |
$(document).ready(function() { | |
$(chart_id).highcharts({ | |
chart: chart, | |
title: title, | |
xAxis: xAxis, | |
yAxis: yAxis, | |
series: series | |
}); | |
}); |
#!/bin/sh | |
# Change these settings to match what you are wanting to do | |
FILE=/File/To/Copy | |
SERVER=localhost | |
PATH=/Where/To/Put/File | |
OPTIONS=`vagrant ssh-config | awk -v ORS=' ' '{print "-o " $1 "=" $2}'` | |
scp ${OPTIONS} $FILE vagrant@$SERVER:$PATH |
# ref: http://www.tfidf.com/ | |
# Example: | |
# Consider a document containing 100 words wherein the word cat appears 3 times. | |
# The term frequency (i.e., tf) for cat is then (3 / 100) = 0.03. Now, assume we | |
# have 10 million documents and the word cat appears in one thousand of these. | |
# Then, the inverse document frequency (i.e., idf) is calculated as log(10,000,000 / 1,000) = 4. | |
# Thus, the Tf-idf weight is the product of these quantities: 0.03 * 4 = 0.12. | |
# | |
# Hence: | |
# 1. Calculate term frequency |
from collections import defaultdict | |
import matplotlib.pyplot as plt | |
data = open('<data_file>', 'r') | |
r_data = [] | |
# reading relevant data | |
while True: | |
l = data.readline() | |
if l == '': |