This file contains hidden or 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
# Do this in a rails console @ footprint-tracker | |
# Weekend | |
we = [12, 13, 14, 19, 20] | |
#Workdays | |
wd = [11, 15, 16, 17, 18, 21, 22, 23] | |
#2D Matrices for weekend and worddays, Weekdays x Requests_per_distinct_mac | |
we_a = [] | |
wd_a = [] |
This file contains hidden or 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
## | |
# Call with: | |
# curl -i -H "Accept: application/json" "http://localhost:4567/?foo=1" | |
# or post with: | |
# curl -X POST -H "Accept: application/json" "http://localhost:4567/?foo=1" --data "foo=2" | |
## | |
require 'rubygems' | |
require 'sinatra' | |
require 'json' | |
This file contains hidden or 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
import tornado.httpserver | |
import tornado.websocket | |
import tornado.ioloop | |
import tornado.web | |
import time | |
import random | |
# Preload data | |
# ... use from previous gists | |
#import numpy as np |
This file contains hidden or 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
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
<link type="text/css" rel="stylesheet" href="flare-style.css"/> | |
<style type="text/css"> | |
path.arc { | |
cursor: move; | |
fill: #fff; | |
} |
This file contains hidden or 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
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"/> | |
<title>SUJ Geo walks</title> | |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script> | |
<script type="text/javascript"> | |
var path = []; |
This file contains hidden or 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
# Run with PATH=/Applications/Julia.app/Contents/Resources/julia/bin:/usr/bin:/bin:/usr/sbin:/sbin FONTCONFIG_PATH=/Applications/Julia.app/Contents/Resources/julia/etc/fonts PKG_CONFIG_PATH=/Applications/Julia.app/Contents/Resources/julia/lib/pkgconfig GIT_EXEC_PATH=/Applications/Julia.app/Contents/Resources/julia/libexec/git-core GIT_TEMPLATE_DIR=/Applications/Julia.app/Contents/Resources/julia/share/git-core /Applications/Julia.app/Contents/Resources/julia/bin/julia -p 2 | |
# Typically n > 2000000000 | |
@everywhere function pbench(n) | |
it = time() | |
nheads = @parallel (+) for i=1:n | |
int(randbool()) | |
end | |
ft = time()-it | |
end |
This file contains hidden or 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"> | |
<style> | |
.node { | |
font: 10px sans-serif; | |
} | |
.link { | |
stroke: steelblue; |
NewerOlder