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
proper_test_() -> | |
Properties = lists:filter(fun({F, _}) -> | |
case atom_to_list(F) of | |
"prop_" ++ _Rest -> | |
true; | |
_ -> | |
false | |
end | |
end, | |
bstrip_props:module_info(exports)), |
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
=========={{2011,8,30},{17,35,32}}========== | |
{trace,<0.3.0>,call, | |
{erl_prim_loader,apply_archive, | |
[{prim_state,false,undefined,"/Users/dreid/bcd/rebar"}, | |
#Fun<erl_prim_loader.14.99960715>, | |
{error,enoent}, | |
"/Users/dreid/bcd/rebar"]}} | |
{trace,<0.3.0>,call,{prim_file,read_file_info,["/Users/dreid/bcd/rebar"]}} | |
{trace,<0.3.0>,return_from, | |
{prim_file,read_file_info,1}, |
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
--- nacl-20110221/curvecp/nanoseconds.c 2011-02-20 17:49:34.000000000 -0800 | |
+++ NaCl/curvecp/nanoseconds.c 2011-10-01 16:56:43.000000000 -0700 | |
@@ -1,4 +1,8 @@ | |
#include <time.h> | |
+#ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time | |
+#include <mach/clock.h> | |
+#include <mach/mach.h> | |
+#endif | |
#include "nanoseconds.h" | |
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> | |
<script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
<script type="text/javascript"> | |
google.load("visualization", "1", {packages:["corechart"]}); | |
google.setOnLoadCallback(drawChart); | |
function drawChart() { | |
var data = new google.visualization.DataTable(); | |
data.addColumn('string', 'didpie'); | |
data.addColumn('number', 'percentage'); |
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
(Damn) This Desert Air - Ghost I Own | |
2nd Thought - Just Hang On | |
3 Doors Down - Here Without You | |
3 Doors Down - It's Not My Time | |
3 Doors Down - Kryptonite | |
3 Doors Down - When I'm Gone | |
3 Doors Down - When You're Young | |
3 Inches of Blood - Battles and Brotherhood | |
30 Seconds to Mars - Attack | |
30 Seconds to Mars - Closer to the Edge |
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
def fullyQualifiedName(obj): | |
if inspect.ismethoddescriptor(obj): | |
objclass = fullyQualifiedName(obj.__objclass__) | |
return '%s.%s' % (objclass, obj.__name__) | |
return txFullyQualifiedName(obj) |
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 functools import wraps | |
from twisted.internet.defer import maybeDeferred | |
def produces(contentType, encoder=None): | |
def maybeEncode(result, request): | |
request.setHeader("content-type", contentType) | |
if encoder is not None: | |
return encoder(result) |
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 twisted.internet.defer import maybeDeferred | |
def withDeferred(contextManager, f, *args, **kwargs): | |
contextManager.__enter__() | |
def _exit(result): | |
contextManager.__exit__(None, None, None) | |
return result | |
def _exitEb(failure): |
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
""" | |
twistd -n web --class=hello.resource | |
""" | |
from klein import route, resource | |
@route('/') | |
def home(request): | |
return 'Hello, world!' |
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
>>> (foo, bar) = xrange(1) | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
ValueError: need more than 1 value to unpack | |
>>> (foo, bar) = xrange(19) | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
ValueError: too many values to unpack |