Skip to content

Instantly share code, notes, and snippets.

View willium's full-sized avatar
🧛

William Wolf willium

🧛
View GitHub Profile
@willium
willium / index.html
Created December 26, 2015 00:12
labels VL, will/bar-lebel
<!DOCTYPE html>
<meta charset="utf-8">
<script src="../../d3/d3.min.js"></script>
<script src="../../vega/vega.js"></script>
<script src="../../vega-lite/vega-lite.js"></script>
<div id="vis"></div>
<script type="text/javascript">
@willium
willium / vega.json
Created December 24, 2015 06:12
"labels" on bars
{
"width": 400,
"height": 400,
"padding": {"top": 10, "left": 30, "bottom": 20, "right": 10},
"data": [
{
"name": "table",
"values": [
{"category":"A", "amount":28},
{"category":"B", "amount":55},
@willium
willium / analysis.R
Last active November 19, 2015 21:12
###############################################
# SETUP
###############################################
# set working directory
setwd("/Users/willium/Documents/School/uw/2015-2016/Quarter 1/Stat 311/assignments/group-2")
# load data.csv into variable d
d <- read.csv("raw_data.csv", header=TRUE, as.is=TRUE, na.strings=c("", "NA")) # d is data
@willium
willium / population.R
Created November 14, 2015 09:42
Population variance and standard deviation in R
pop.var <- function(x) var(x) * (length(x)-1) / length(x)
pop.sd <- function(x) sqrt(pop.var(x))
@willium
willium / index.html
Created November 13, 2015 10:56
d3 interpolation
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<style>
path {
fill: none;
stroke: steelblue;
stroke-width: 2px;
}
@willium
willium / analysis.R
Last active October 22, 2015 22:39
Group Project 1, first R project
###############################################
# SETUP
###############################################
# set working directory
setwd("/Users/willium/Documents/School/uw/2015-2016/Quarter 1/Stat 311/assignments/group-1")
# load data.csv into variable d
d <- read.csv("data.csv", header=TRUE, as.is=TRUE, na.strings=c("", "NA")) # d is data
@willium
willium / _.md
Last active August 29, 2015 14:25
Tributary inlet
@willium
willium / css
Created January 18, 2015 16:09
Less
@bg: #262626;
@primary: #D6D6D6;
@secondary: #979797;
@light: #d8d8d8;
@gold: #FACB60;
@green: #50E3C2;
@height: 600px;
@border: 5px;
@width: (2/3) * @height;
# From Andrzej Szelachowski's ~/.bash_profile:
# Note that a variable may require special treatment
#+ if it will be exported.
DARKGRAY='\e[1;30m'
LIGHTRED='\e[1;31m'
GREEN='\e[32m'
YELLOW='\e[1;33m'
@willium
willium / henry.py
Last active December 13, 2015 17:48 — forked from anonymous/gist:4950095
print ("This program will find Mass(kg), Radius(m) or Time(s) via Kepler's law's")
print ("Enter x for the unknown value")
m = (input("Mass: "))
r = (input("Radius: "))
t = (input("Time: "))
x = ("unknown")
if m == x:
m = ((4*3.14*r**3)/(.0000000000667*t**2))
print ("m=")
elif r == x: