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 EchoWebSocketResponse(BaseWebSocketResponse): | |
def after_open(self): | |
self.receive_until_closed() | |
def handle_text(self, text): | |
self.send_text(text) | |
def handle_request(self, request): |
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
HOMEBREW_VERSION: 0.9 | |
HEAD: 9d50a0ca0448c14bbdaa8f027b08b2cde6d90f08 | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_CELLAR: /usr/local/Cellar | |
CPU: quad-core 64-bit sandybridge | |
OS X: 10.7.4 | |
Kernel Architecture: x86_64 | |
Xcode: 4.3.2 | |
GCC-4.0: N/A | |
GCC-4.2: N/A |
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
HOMEBREW_VERSION: 0.9 | |
HEAD: 9d50a0ca0448c14bbdaa8f027b08b2cde6d90f08 | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_CELLAR: /usr/local/Cellar | |
CPU: quad-core 64-bit sandybridge | |
OS X: 10.7.4 | |
Kernel Architecture: x86_64 | |
Xcode: 4.3.2 | |
GCC-4.0: N/A | |
GCC-4.2: N/A |
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 unicodedata | |
def normalized_cmp(x, y): | |
if isinstance(x, unicode) and isinstance(y, unicode): | |
normalized_x = ([c for c in unicodedata.normalize('NFKD', x) if not unicodedata.combining(c)] + [''])[0] | |
normalized_y = ([c for c in unicodedata.normalize('NFKD', y) if not unicodedata.combining(c)] + [''])[0] | |
return cmp(normalized_x, normalized_y) | |
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
HOMEBREW_VERSION: 0.9 | |
HEAD: 55d79f45121f2739b7df7125be8a27eacc28d292 | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_CELLAR: /usr/local/Cellar | |
CPU: quad-core 64-bit sandybridge | |
OS X: 10.7.4 | |
Kernel Architecture: x86_64 | |
Xcode: 4.3.2 | |
GCC-4.0: N/A | |
GCC-4.2: N/A |
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
<?php | |
// TWEET NEST | |
// Load tweets (from JSON) | |
error_reporting(E_ALL ^ E_NOTICE); ini_set("display_errors", true); // For easy debugging, this is not a production page | |
@set_time_limit(0); | |
require_once "mpreheader.php"; | |
$p = ""; | |
// The below is not important, so errors surpressed |
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
<input type="hidden" name="__start__" value="${field.name}:mapping"/> | |
<div id="${field.oid}"> | |
<p>Solve this problem:</p> | |
<p class="turing-challange">${challenge}</p> | |
<input type="hidden" | |
name="${field.oid}-challenge" | |
value="${challenge}"/> | |
<input type="text" | |
name="${field.oid}"/> | |
</div> |
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 re | |
def strip_non_empty_lines(text): | |
return re.sub(r'^\s+(?=\S)', '', text) |
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
config.add_route('options', '/*path', request_method='OPTIONS', view='.utility_views.OptionsView') | |
config.add_route('trace', '/*path', request_method='TRACE', view='.utility_views.TraceView') |
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
[buildout] | |
parts = | |
.... | |
complexity | |
[complexity] | |
recipe = zc.recipe.egg | |
eggs = radon[tool] | |
scripts = radon=complexity |