Skip to content

Instantly share code, notes, and snippets.

View jayelm's full-sized avatar

Jesse Mu jayelm

View GitHub Profile
We can't make this file beautiful and searchable because it's too large.
-0.077709 0.149783 0.256109 0.224514 0.093126 0.261685 -0.007795 -0.047023 0.084129 0.337066 0.172014 -0.063369 -0.015219 0.053277 -0.055675 -0.139981 0.129056 0.273224 0.228618 -0.174408 -0.213103 -0.034061 0.162580 0.266921 0.212209 -0.020353 0.066753 0.087186 0.046093 0.158467 -0.238940 0.246970 0.071708 0.044725 -0.094469 -0.028163 -0.306692 0.150777 0.083379 -0.000724 0.175186 -0.338446 -0.206074 -0.014390 0.122420 -0.125712 -0.144950 0.097734 0.323000 -0.282750 0.213719 0.032570 0.146699 0.172559 0.124033 -0.272105 0.316080 -0.003835 -0.088711 -0.419845 0.247369 0.133099 0.153687 0.092116 -0.242148 0.435301 0.154582 -0.127496 0.050410 -0.008653 0.120244 -0.242726 0.321186 -0.489628 0.434109 0.071279 -0.058971 -0.040261 0.045671 0.017411 -0.265096 -0.284714 0.092979 0.170229 0.016413 0.011602 0.173791 0.222625 0.174836 0.156307 0.132448 -0.294564 0.252246 -0.189660 -0.197140 -0.135401 -0.039114 0.100365 -0.231006 0.295340 -0.062513 0.205744 0.265017 0.055648 -0.075210 -0.068220 -0.073566 0.149855 -0.1483
@jayelm
jayelm / clustercounter.py
Last active October 11, 2016 14:50
Convenient Cluster Counter
"""
Neat wrapper around a autoincrementing defaultdict. Most useful for assigning
unique numbers to unseen examples while clustering, but probably has other uses
as well.
Example usage
In [1]: cc = ClusterCounter()
In [2]: cc['setosa']
@jayelm
jayelm / vmeasure.R
Last active May 16, 2018 15:47
V-Measure (Rosenberg, 2007) Implementation in R. This almost exactly follows scikit-learn's implementation (http://scikit-learn.org/stable/modules/generated/sklearn.metrics.homogeneity_completeness_v_measure.html)
library(infotheo)
v.measure <- function(a, b) {
mi <- mutinformation(a, b)
entropy.a <- entropy(a)
entropy.b <- entropy(b)
if (entropy.a == 0.0) {
homogeneity <- 1.0
} else {
homogeneity <- mi / entropy.a
@jayelm
jayelm / buttondown.css
Created October 13, 2015 02:33 — forked from ryangray/buttondown.css
A clean, minimal CSS stylesheet for Markdown, Pandoc and MultiMarkdown HTML output.
/*
Buttondown
A Markdown/MultiMarkdown/Pandoc HTML output CSS stylesheet
Author: Ryan Gray
Date: 15 Feb 2011
Revised: 21 Feb 2012
General style is clean, with minimal re-definition of the defaults or
overrides of user font settings. The body text and header styles are
left alone except title, author and date classes are centered. A Pandoc TOC
@jayelm
jayelm / bitcoin_transactions.csv
Created March 24, 2014 06:48
bitcoin_transactions
date symbol transactions
1/3/2009 SPY 1
1/4/2009 SPY 0
1/5/2009 SPY 0
1/6/2009 SPY 0
1/7/2009 SPY 0
1/8/2009 SPY 0
1/9/2009 SPY 14
1/10/2009 SPY 31
1/11/2009 SPY 106
@jayelm
jayelm / bitcoin
Created March 24, 2014 06:44
bitcoin_transactions
date,transactions,symbol
01/03/2009,1,SPY
01/04/2009,0,SPY
01/05/2009,0,SPY
01/06/2009,0,SPY
01/07/2009,0,SPY
01/08/2009,0,SPY
01/09/2009,14,SPY
01/10/2009,31,SPY
01/11/2009,106,SPY
@jayelm
jayelm / transactions
Last active August 29, 2015 13:57
Bitcoin Transactions History CSV
date,transactions
2009-01-03,1
2009-01-04,0
2009-01-05,0
2009-01-06,0
2009-01-07,0
2009-01-08,0
2009-01-09,14
2009-01-10,31
2009-01-11,106