Skip to content

Instantly share code, notes, and snippets.

@bpeck
bpeck / Halton.html
Created February 23, 2012 03:11
Halton Sequence example using GameJS
<!DOCTYPE html>
<html>
<head>
<title>GameJS Application</title>
<!-- Styling -->
<style type=text/css>
body{
background:#fff;
color:#222;
margin:1em 0 2em 6em;
@bpeck
bpeck / Backend.py
Last active February 15, 2016 15:00
flask inside multiprocessing
import multiprocessing
import multiprocessing.queues
from flask import Flask
from flask import request
class Backend(object):
def __init__(self, command_queue, host='0.0.0.0', port=8000, debug=True):
self.command_queue = command_queue
self.flask_app = Flask('Backend')
self.flask_app.add_url_rule('/', "handleRequest", self.handleRequest, methods=['GET'])