Useful for understanding the relationship between data and the graphic representation in d3.
http://mbostock.github.com/d3/tutorial/circle.html
This seems to be the key to working with d3.
http://piwik.org/features/ | |
http://www.openwebanalytics.com/ | |
iStats? |
# From: http://www.mcqn.com/cgi-bin/weeknotecalc | |
def weeknote_week(this_week) | |
registration_date = Date.civil(2010,3,29) | |
# Get the start of the week for each of those dates | |
if registration_date.wday == 0 | |
# wday of 0 is Sunday, and we want our weeks to start on Monday | |
registration_date = registration_date - 6 | |
else | |
registration_date = registration_date - (registration_date.wday - 1) |
var Logging = (function () { | |
function create(source) { | |
function F() {} | |
F.prototype = source; | |
return new F(); | |
}; | |
var LoggerBase = function (opts) { | |
var opts = opts || {}; |
javascript:if(document.createElement && document.childNodes){var bm = document.createElement('script');var head = document.getElementsByTagName('head')[0];head.appendChild(bm);bm.setAttribute('src', 'https://raw.github.com/gist/1594792/grid.js');}else{alert('Sorry, your browser cannot do this')} |
def hash_to_ostruct(object) | |
return case object | |
when Hash | |
object = object.clone | |
object.each do |key, value| | |
object[key] = hash_to_ostruct(value) | |
end | |
OpenStruct.new(object) | |
when Array | |
object = object.clone |
Useful for understanding the relationship between data and the graphic representation in d3.
http://mbostock.github.com/d3/tutorial/circle.html
This seems to be the key to working with d3.
View this code at http://livecoding.io/5162494
# This is a very basic script to backup oyster card data to a scraperwiki vault | |
# Notes: | |
# 1) You need an oyster card that has been registered on tfl.gov.uk | |
# 2) This script requires you to enter your username and password (this about what that means before progressing, and do so at your own risk) | |
# 3) This script should be run in a PRIVATE SCRAPERWIKI VAULT ONLY https://scraperwiki.com/pricing/ not a public scraper, or the world will know your password | |
import scraperwiki | |
import mechanize | |
import lxml.html | |
from lxml.etree import tostring |
res.header('Access-Control-Allow-Origin', '*'); | |
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE'); | |
res.header('Access-Control-Allow-Headers', 'X-Requested-With, Accept, Origin, Referer, User-Agent, Content-Type, Authorization'); | |
// intercept OPTIONS method | |
if ('OPTIONS' == req.method) { | |
res.send(200); | |
} | |
else { | |
next(); |
<div class="slides"> | |
<section data-background="assets/image1.png"> | |
<h2></h2> | |
</section> | |
<section data-background="assets/image2.png"> | |
<h2></h2> | |
</section> | |
<section data-background="assets/image1.png"> |