Skip to content

Instantly share code, notes, and snippets.

View gregrahn's full-sized avatar

Greg Rahn gregrahn

View GitHub Profile
@mbostock
mbostock / .block
Last active February 14, 2024 20:43 — forked from mbostock/.block
Cluster Dendrogram
license: gpl-3.0
height: 2000
border: no
redirect: https://beta.observablehq.com/@mbostock/d3-cluster-dendrogram
@marcelcaraciolo
marcelcaraciolo / atepassar_recommender.py
Created October 29, 2012 01:51
Atepassar Simple Algorithm for Friends Recommendation
#-*-coding: utf-8 -*-
'''
This module represents the FriendsRecommender system for recommending
new friends based on friendship similarity and state similarity.
'''
__author__ = 'Marcel Caraciolo <caraciol@gmail.com>'
@tobyhede
tobyhede / postsql.sql
Created May 17, 2012 03:08
PostgreSQL as JSON Document Store
-- PostgreSQL 9.2 beta (for the new JSON datatype)
-- You can actually use an earlier version and a TEXT type too
-- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8
-- Inspired by
-- http://people.planetpostgresql.org/andrew/index.php?/archives/249-Using-PLV8-to-index-JSON.html
-- http://ssql-pgaustin.herokuapp.com/#1
-- JSON Types need to be mapped into corresponding PG types
--
@miyagawa
miyagawa / strip_aac.pl
Created May 3, 2012 19:03
Strip iTunes purchase metadata from DRM-free AAC files
#!/usr/bin/env perl
use strict;
use File::Find::Rule;
use Capture::Tiny qw(capture);
sub atomic {
my($file, @cmd) = @_;
capture {
system "atomicparsley", $file, @cmd;
};