Skip to content

Instantly share code, notes, and snippets.

@toxford
toxford / chart
Created April 2, 2015 15:57
chart style April 2
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,700,600,400' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<style>
.bigChart {
width: 100%;
max-width: 600px;
margin: 0 auto 130px;
}
@amundo
amundo / gist:288282
Created January 27, 2010 23:40
Super short intro to using cosine similarity in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# see http://www.fileslip.net/news/2010/02/04/language-id-project-the-basic-algorithm/
from math import sqrt
you = {'pennies': 1, 'nickels': 2, 'dimes': 3, 'quarters': 4 }
me = {'pennies': 0, 'nickels': 3, 'dimes': 1, 'quarters': 1 }
abby = {'pennies': 2, 'nickels': 1, 'dimes': 0, 'quarters': 3 }