[ Launch: Tributary inlet ] 5148488 by mbildner See Previous Inlet [ Gist ]
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> | |
<title></title> | |
</head> | |
<body> | |
<button id="startButton">Start</button> | |
<video id="remoteView" height="300" width="300" autoplay></video> |
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> | |
<title></title> | |
<!-- based on http://simpl.info/rtcdatachannel/js/main.js --> | |
</head> | |
<body> | |
<textarea id="dataChannelSend"></textarea> | |
<textarea id="dataChannelReceive"></textarea> |
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
from time import time | |
import requests | |
languages_list = [ | |
"English", | |
"French", | |
"German", | |
"Swahili", |
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 timeit | |
import grequests | |
import requests | |
def blocking_get(): | |
url = "http://www.google.com" |
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
""" | |
One of my first Desktop apps, this lets users split a check among several users. Just add each user, and the % amount they like to tip (eg: "Moshe Bildner, 16%"), add any foods on the bill, as well as their prices (the app comes preloaded with a sample dinner for two, but you can delete that and add your own), and assign each person the foods they are responsible for. The consequent personalized bills will be shown in the command line. | |
Commands: | |
Ctrl+Left-Click-drag: from a food to a person to assign responsibility to that person. Responsibility may be split among an unlimited number of people. | |
Left-Click-drag: move a food or person for easier viewing. Responsibility lines and the checks will be kept in sync. |
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
""" | |
This is a simple example of WebSocket + Tornado + Redis Pub/Sub usage. | |
Do not forget to replace YOURSERVER by the correct value. | |
Keep in mind that you need the *very latest* version of your web browser. | |
You also need to add Jacob Kristhammar's websocket implementation to Tornado: | |
Grab it here: | |
http://gist.github.com/526746 | |
Or clone my fork of Tornado with websocket included: | |
http://github.com/pelletier/tornado | |
Oh and the Pub/Sub protocol is only available in Redis 2.0.0: |
NewerOlder