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
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Dimensional Charting</title> | |
<link rel="stylesheet" type="text/css" href="http://dc-js.github.io/dc.js/css/dc.css"/> | |
<script type="text/javascript" src="http://dc-js.github.io/dc.js/js/d3.js"></script> | |
<script type="text/javascript" src="http://dc-js.github.io/dc.js/js/crossfilter.js"></script> | |
<script type="text/javascript" src="http://dc-js.github.io/dc.js/js/dc.js"></script> | |
</head> |
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 WebSocketHandler(websocket.WebSocketHandler): | |
def open(self): | |
print 'Connection established.' | |
#close connection | |
def on_close(self): | |
print 'Connection closed.' | |
# Our function to send new (random) data for charts |
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
#!/usr/bin/env python2.7 | |
import json | |
import random | |
from tornado import websocket, web, ioloop | |
import datetime | |
from time import time | |
# Random number generator | |
r = lambda: random.randint(0,255) |
NewerOlder