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 time | |
import random | |
import json | |
import datetime | |
from tornado import websocket, web, ioloop | |
from datetime import timedelta | |
from random import randint | |
paymentTypes = ["cash", "tab", "visa","mastercard","bitcoin"] | |
namesArray = ['Ben', 'Jarrod', 'Vijay', 'Aziz'] |
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
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 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
#!/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