Part of a series of examples. See:
View nb2rst.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
"""starting point for IPython Notebook to Restructured Text | |
using pandoc in various places | |
""" | |
import os,sys,shutil | |
import glob | |
import tempfile | |
import base64 |
View logstash RPM spec
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
Name: logstash | |
Version: 1.1.0 | |
Release: 1%{?dist} | |
Summary: logstash is a tool for managing events and logs | |
Group: System/Logging | |
License: ASL 2.0 | |
URL: http://logstash.net/ | |
Source0: http://semicomplete.com/files/logstash/logstash-%{version}-monolithic.jar | |
Source1: logstash |
View README.md
D3’s default path interpolation is the same as its string interpolation: it finds numbers embedded in strings, and interpolates those numbers. So, the default behavior when interpolating two paths is like this:
M x0, y0 L x1, y1 L x2, y2 L x3, y3
↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
M x0, y1 L x1, y2 L x2, y3 L x3, y4
For example, the first point ⟨x0,y0⟩ is interpolated to ⟨x0,y1⟩. Since x0 is the same, all you see are the y-values changing (see example)—you don't see the path slide to the left as intended.
What you want to happen here is something like this:
View index.html
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> | |
<title>One Graph</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script> | |
<script type="text/javascript" src="simple-graph.js"></script> | |
<style type="text/css"> | |
body { font: 13px sans-serif; } | |
rect { fill: #fff; } |
View README.md
An example of an SVG interaction layer over a canvas rendering layer. Data from the USDA Nutrition Database.
This example has a few design differences from most parallel coordinates:
- requestAnimationFrame for gradual rendering
- shuffled rendering order (Fisher-Yates)
- bezier curves with canvas
- autoscaling opacity
- tick toggles
- dark/light themes
View index.html
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Projection Demo</title> | |
<script type='text/javascript' src='http://mbostock.github.com/d3/d3.js'></script> | |
<script type='text/javascript' src='http://mbostock.github.com/d3/d3.geo.js'></script> | |
<style type='text/css'> | |
body { | |
margin:5px auto; | |
} |
View learning_gabor_filters.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
import numpy as np | |
import matplotlib.pyplot as plt | |
from sklearn.datasets import fetch_mldata | |
from sklearn.decomposition import FastICA, PCA | |
from sklearn.cluster import KMeans | |
# fetch natural image patches | |
image_patches = fetch_mldata("natural scenes data") | |
X = image_patches.data |
View linkedin-api-invite
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
function invite() { | |
var url = '/people/~/mailbox', | |
body = { | |
recipients: { | |
values: [{ | |
person: { |
View index.html
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> | |
<title>Chronological Diagram of Asia</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script> | |
<style type="text/css"> | |
.chart { | |
shape-rendering: crispEdges; | |
} |
OlderNewer