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
Version = 5 | |
Booleans = {'caretLineVisible': True, 'preferFixed': True, 'useSelFore': True} | |
CommonStyles = {'attribute name': {'fore': 13236445}, | |
'attribute value': {'fore': 3100463}, | |
'bracebad': {'back': 6710886, 'bold': 1, 'fore': 13421823}, | |
'bracehighlight': {'bold': 1, 'fore': 16777215}, | |
'classes': {'fore': 8578762}, | |
'comments': {'fore': 10066329, 'italic': False}, |
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 python | |
# -*- coding: utf-8 -*- | |
"""Simple gevent POC to check how to get ZMQ sockets working with | |
subprocesses spawned by a simple process.""" | |
# this code doesn't seem to work properly; it has a | |
# tendency to hang at various parts of the req/rep process | |
# all of this stuff works flawlessly if you change: |
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
travis@lappie:/usr/local/src/eio(master)$ time python perf_test.py | |
other greenlet running! | |
reading 50 megs from /dev/urandom | |
done. | |
real 0m4.656s | |
user 0m0.031s | |
sys 0m4.624s |
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
#!/bin/bash | |
rsync -av rsync.stunnel.org::stunnel stunnel_clone | |
cd stunnel_clone | |
mkdir tmp | |
cp -p obsolete/*/*tar.gz tmp/ | |
cp *.tar.gz tmp/ | |
cd tmp | |
( | |
cat <<'EOF' |
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
$ cat > ~/bin/TODO | |
#!/bin/sh | |
open ~/Desktop/TODO.rtf | |
^C | |
$ cd /usr/local/src/ | |
$ git clone git://abackstrom.com/appify.git | |
$ cd appify/ | |
$ sh appify.sh ~/bin/TODO ~/bin/TODO.app |
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
diff --git a/session1/main.py b/session1/main.py | |
index 93a204c..6508d12 100644 | |
--- a/session1/main.py | |
+++ b/session1/main.py | |
@@ -3,6 +3,7 @@ | |
"""The user interface for our app""" | |
import os,sys | |
+import gevent | |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Backbone example</title> | |
<script type="text/javascript" src="jquery.min.js"></script> | |
<script type="text/javascript" src="underscore.js"></script> | |
<script type="text/javascript" src="backbone.js"></script> |
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
import os | |
import sys | |
import fcntl | |
import gevent | |
from gevent.socket import wait_read | |
def print_every(s, repeat=1): | |
print s | |
if repeat: |
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
"""The :mod:`zmq` module wraps the :class:`Socket` and :class:`Context` found in :mod:`pyzmq <zmq>` to be non blocking | |
""" | |
__zmq__ = __import__('zmq') | |
from gevent.hub import _threadlocal | |
from gevent.socket import wait_read, wait_write | |
__patched__ = ['Context', 'Socket'] | |
globals().update(dict([(var, getattr(__zmq__, var)) | |
for var in __zmq__.__all__ | |
if not (var.startswith('__') |
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
import sys | |
import gevent | |
from gevent.monkey import patch_all; patch_all() | |
from gevent import server, event, socket | |
from multiprocessing import Process, current_process, cpu_count | |
""" | |
Simple multiprocess StreamServer that proxies messages between clients. | |
Avoids using a multiprocessing.Event since it blocks on a semaphore. |