Chord diagrams show directed relationships among a group of entities. This example also demonstrates simple interactivity by using mouseover filtering. Layout inspired by Martin Krzywinski's beautiful work on Circos.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a sample file | |
http://d3js.org/ | |
http://www.personal.psu.edu/cab38/ColorBrewer/ColorBrewer.html | |
http://bl.ocks.org/AndrewRP/raw/7468330/ | |
http://bl.ocks.org/AndrewRP/7468330 | |
https://gist.github.com/mbostock/1046712 | |
http://bl.ocks.org/mbostock/1046712 | |
https://github.com/mbostock/d3/wiki/Gallery | |
http://bl.ocks.org/mbostock | |
http://bl.ocks.org/mbostock/4062006 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var entity = [16657, 586163, 54119, 112654, 185593, 570264, 19441, 843876] | |
var matrix = [ | |
// 16657, 586163, 54119, 112654, 185593, 570264, 19441, 843876 | |
[0, 10020, 0, 22500, 0, 0, 2500, 0], // 16657 | |
[0, 0, 0, 9988, 0, 0, 0, 0], // 586163 | |
[0, 0, 0, 0, 0, 0, 0, 0], // 54119 | |
[0, 20000, 0, 0, 2500, 0, 0, 0], // 112654 | |
[0, 0, 0, 0, 0, 0, 0, 17500], // 185593 | |
[2487, 0, 0, 0, 0, 0, 2478, 0], // 570264 |
Adatao stuff.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
A listagent is a factory to conveniently instanstiating sliceagents. | |
A sliceagent can access and mutate an original list "live": it never | |
creates any copy of the original and only refers to it via "address | |
translation" -- normalizing its indices by the size of the original list on | |
every operation. | |
>>> x = [22, 7, 2, -5, 8, 4] | |
>>> listagent(x)[1:].sort() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.6 | |
""" | |
Usage: python ./rsa_tuples [-s] n | |
Generate `n` RSA tuples using 200-digit primes. | |
Requires: | |
ent.py <http://modular.fas.harvard.edu/ent/ent_py> | |
stream.py <http//github.com/aht/stream.py> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"rand" | |
"time" | |
"flag" | |
"fmt" | |
) | |
func getCoord(rg *rand.Rand) float64 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){ | |
var importJs=function(jsUrl){ | |
var s=document.createElement("script"); | |
s.setAttribute("src",jsUrl); | |
document.body.appendChild(s); | |
}; | |
importJs("http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"); | |
})(); | |
$('iframe').contents().find('iframe').each(function() { | |
this.contentWindow.onclick = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> db['similar_items.tanhxdiv5ratings_cosinesimilarities.6'].count() | |
27745186 | |
> db['similar_items.tanhxdiv5ratings_cosinesimilarities.6'].getIndexes() | |
[ | |
{ | |
"v" : 1, | |
"key" : { | |
"_id" : 1 | |
}, | |
"ns" : "osapi_int.similar_items.tanhxdiv5ratings_cosinesimilarities.6", |
OlderNewer