This is a place for me to test new ideas for my 7 Wonders statistics site.
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> | |
<meta charset="utf-8"> | |
<body> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script type="text/javascript" src="tabletop.js"></script> | |
<script> | |
document.addEventListener('DOMContentLoaded', function() { | |
var gData | |
// https://docs.google.com/spreadsheets/d/1Whyq_IPIWrm7L6qTeu4IuSQ2RWnwtfwWiVwhA-jGEtQ/pubhtml | |
var key = 'https://docs.google.com/spreadsheet/pub?key=0AmhWglGO45rldFBiek84a1FHRmhPQjZaVzRSRGJZbXc&output=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
node_modules |
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> | |
<title>7 Wonders scores as stacked bars</title> | |
<style type="text/css"> | |
svg { | |
width: 960px; | |
height: 500px; | |
border: solid 1px #ccc; | |
font: 10px sans-serif; |
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> | |
<meta charset="utf-8"> | |
<title>7 Wonders Streamgraph</title> | |
<style> | |
body { | |
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
margin: auto; | |
position: relative; | |
width: 960px; | |
} |
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
#! ruby | |
# This script will take the words in a file or passed argument and alphabetize them. Then they will be put out with a line for each starting letter. | |
# This will help me with grabbing all the keywords and organzing them alphabetically by line so that in the future adding keywords to the Edict language spec will be easier since they are in an alphabetical list. | |
if ARGV.size == 1 | |
lines = [] | |
input = "" | |
output = "" |
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
class Chop | |
def chop(target, values) | |
size = values.size | |
if size == 0 | |
-1 | |
elsif size == 1 | |
(values[0] == target ? 0 : -1) | |
else | |
if target < values[size/2] |
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
#! ruby | |
# This will generate a negative number set that i can use for testing my compression analysis | |
# | |
# Example: | |
# NegNumSet numberOfPoints [max] [freq] | |
# | |
# Arguments (all are optional so far): | |
# 1: numberOfPoints - the number of points to generate | |
# 2: Max - the maximum distance from zero that the data point values can have |
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
#! ruby | |
# | |
# Gets the unique OPC methods from the OPC analyzer trace log of all the methods TopView Configurator and Engine uses | |
# Assumes that it has been given a valid file name | |
if ARGV.length == 1 and File.exists?(ARGV[0]) | |
input = File.open(ARGV.first, "r").read | |
# Build up a unique array of OPC methods | |
opc_methods = [] |
OlderNewer