Skip to content

Instantly share code, notes, and snippets.

View sammoorhouse's full-sized avatar

Sam Moorhouse sammoorhouse

View GitHub Profile
{
"executionTime": "2015-09-17 09:25:07 AM",
"stationBeanList": [
{
"id": 72,
"stationName": "W 52 St & 11 Ave",
"availableDocks": 30,
"totalDocks": 39,
"latitude": 40.76727216,
"longitude": -73.99392888,
@sammoorhouse
sammoorhouse / CircularProgress.js
Last active October 8, 2015 03:21
Circular Progress Control
function CircularProgress(element, settings){
var duration = settings.duration || 500;
var w = settings.width || 200;
var h = settings.height || w;
var outerRadius = settings.outerRadius || w/2;
var innerRadius = settings.innerRadius || (w/2) * (80/100);
var range = settings.range || {min: 0, max: 100};
var fill = settings.fill || "#F20100";
var svg = d3.select(element)
x = 1
if x == 1:
# indented four spaces
print("x is 1.")
import pyowm
owm = pyowm.OWM('{API-KEY}')
observation = owm.weather_at_place('London,uk')
w = observation.get_weather()
w.get_wind()
w.get_humidity()
@sammoorhouse
sammoorhouse / index.html
Last active October 16, 2017 12:00
Circular percentage control
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>D3: Pie layout</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:200' rel='stylesheet' type='text/css'>
<style type="text/css">
text {
print("hello")
a = [1, 15, 94, 13, 12, 11, 5, 22, 65]
b = 3 * 2
print (a[b])
print ("goodbye")
print("hello")
a = [1, 15, 94, 13, 12, 11, 5, 22, 65]
b = 3 * 2
if b > 3:
print (a[b])
else:
print("too small")
print ("goodbye")
print("hello")
a = [1, 15, 94, 13, 12, 11, 5, 22, 65]
b = 3 * 2
for n in range(9):
print(a[n] + b)
print ("goodbye")
print("hello")
a = [1, 15, 94, 13, 12, 11, 5, 22, 65]
b = 3 * 2
for n in range(9):
print(a[n] + b)
for n in range(9):
print(a[n] + b)
print("hello")
a = [1, 15, 94, 13, 12, 11, 5, 22, 65]
b = 3 * 2
def printNums():
for n in range(9):
print(a[n] + b)
printNums()