Skip to content

Instantly share code, notes, and snippets.

View kylemacfarlane's full-sized avatar

Kyle MacFarlane kylemacfarlane

View GitHub Profile
#!./uwsgi --http-socket :9090 --async 100 ...
# same chat example but using uwsgi async api
# for pypy + continulets just run:
# uwsgi --http-socket :9090 --pypy-home /opt/pypy --pypy-wsgi-file tests/websockets_chat_async.py --pypy-eval "uwsgi_pypy_setup_continulets()" --async 100
import uwsgi
import time
import redis
import sys
@kylemacfarlane
kylemacfarlane / webaudio-fix.js
Last active July 27, 2018 20:43
Workaround to get a low latency audio context by accessing the microphone. https://bugs.chromium.org/p/chromium/issues/detail?id=635686
var audio_context = new window.AudioContext(),
mic_stream;
var fix_webaudio = function(max_attempts, interval, a) {
var attempt = a || 0;
if (audio_context.baseLatency < 0.2) {
if (attempt) {
if (mic_stream) {
mic_stream.getTracks()[0].stop();
This file has been truncated, but you can view the full file.
!This program cannot be run in DOS mode.
Richo{+
.text
`.rdata
@.data
.pdata
@_RDATA
@.rsrc
@.reloc
ffff
This file has been truncated, but you can view the full file.
! #+""# $+$*="%/"'/$0R%.P"$*%,F$,M "'"$, %. !# ! "%6#(<!#,%.Q'1\"%9"'='-Y$*Q"'F+Dv0Y
! !K+hcF&db
! $ ' * - 0 3 6 9 < ? B E H K N Q T W Z ] ` c f i l o r u x { ~
! /*$9+&@1,E73L?:QHEPKJQHEPHCRIDSGAOA8O:.T:-D30'%&
!! ;AE6AAGNO>87.%!92,VRLPLFA85H:6*!
!!!#$)A$)C!#,#*?#+G!!"
!!!$!'!*!-!0!3!6!9!<!?!B!E!H!K!N!Q!T!W!Z!
!!!$!'!*!-!0!3!6!9!<!?!B!E!H!K!N!Q!T!W!Z!
!!!?'''B'D'P'T'Y'n(())+
!!$(&1R#0N!(28CCF`_JdiXjrMgo>_e8TW6V\9]bC\[RMEORK:hg/dg8XWMKBWC7WB7<502::*GE&EB#FB%8:%79&BE
import cProfile
from optparse import OptionParser
from z3c.rml import rml2pdf
parser = OptionParser()
parser.add_option('-c', '--cells',
action='store', dest='cells', default=0,
help='number of table cells (34 attributes)')
parser.add_option('-p', '--paras',
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
# This can get stupid. When running all migrations from scratch such as
# during tests then dependant apps will need to be initialised before this