A Cates plot in d3, styled after that of David Spiegelhalter.
The MIT License (MIT)
© 2014 Tom Counsell
require 'erb' | |
metapost_command = 'mpost' | |
puts "Loading template '#{ARGV[0]}'" | |
template = IO.readlines(ARGV[0]).join | |
support_library = File.basename(ARGV[0],'.*') | |
support_module = support_library.split(/[^a-zA-Z0-9]/).map { |w| w.capitalize }.join | |
metapost_name = ARGV[1] || (File.basename(ARGV[0],'.*') + '.mp') |
<!DOCTYPE html> | |
<html> | |
<header> | |
<script src="http://mbostock.github.com/d3/d3.js" type="text/javascript" ></script> | |
</header> | |
<body> | |
<script type='text/javascript'> | |
function draw(data) { | |
var lists = d3.select("body").selectAll("ul") |
# Setup | |
require 'active_record' | |
require 'paperclip' | |
require 'sqlite3' | |
ActiveRecord::Base.establish_connection( | |
:adapter => 'sqlite3', | |
:database => ':memory:') | |
class AddTables < ActiveRecord::Migration |
Sub ShowAllLinksInfo() 'requires a worksheet to be added to the 'workbook and named LinksList | |
Dim aLinks As Variant | |
Dim i As Integer | |
Dim anyWS As Worksheet | |
Dim anyCell As Range | |
Dim reportWS As Worksheet | |
Dim nextReportRow As Long | |
Set reportWS = ThisWorkbook.Worksheets("LinksList") | |
reportWS.Cells.Clear |
A Cates plot in d3, styled after that of David Spiegelhalter.
The MIT License (MIT)
© 2014 Tom Counsell
window.twentyfifty.views.primary_energy_chart = function() { | |
// This is the maximum value of the energy charts | |
max_value = 4000; // CHANGED | |
// This is called before the view is first selected | |
// and produces the three empty charts | |
this.setup = function() { | |
$('.primary_energy_notes').show(); |
'use strict'; | |
var AWS = require('aws-sdk'); | |
var cloudwatch = new AWS.CloudWatch({apiVersion: '2010-08-01'}); | |
function getMetric(metricName, callBack) { | |
var now = new Date(); | |
var anHourAgo = new Date() | |
anHourAgo.setHours(now.getHours()-1); | |
var params = { |
#include <ESP8266WiFi.h> | |
#include <WiFiClientSecure.h> | |
#include <ESP8266WiFiMulti.h> | |
// This code | |
// 1. Connects to a WiFi network | |
// 2. Loops: | |
// a. Makes an http request to a URL | |
// b. Parses the response, expecting an integer between 0 and 1000 | |
// c. Outputs that on PIN D0 as a voltage between 0 and 3.6V |
Homebrew build logs for ffmpeg on macOS 10.12.4 | |
Build date: 2017-05-04 14:29:48 |
#!/usr/bin/env ruby | |
require 'json' | |
require 'optparse' | |
$shutDownSimulators = false | |
$bootSimulators = false | |
$leaveExisting = false | |
$alterDates = true |