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
In light of the recent (mis)handling of the Occupy protestors in the Bay Area, | |
I'd like to share a short anecdote from my parents in Portland, OR -- a story that, sadly, | |
you're pretty unlikely to hear on the media. Today (11/13/2011), the Occupy protestors | |
(or most of them, anyway) complied with a request to leave the park, and moved to a | |
street corner on 4th. After some time, the police were instructed to clear the intersection. | |
It was a familiar scene, easy to conjure: A line of policemen in full gear, face to face with | |
a line of protestors, tense, in the middle of the road. A policeman on a loudspeaker announced | |
that the intersection was going to be opened and that anyone who remained would be arrested. | |
And then the policemen moved. Backwards. The police line stepped backwards out of the road. |
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
""" | |
This module provides very simple Django middleware that sleeps on every request. | |
This is useful when you want to simulate slow response times (as might be | |
encountered, say, on a cell network). | |
To use, add this middleware, and add a value for SLEEP_TIME to your settings. | |
Possible future feature: Look for an X-Django-Sleep header on each request, | |
to let the client specify per-request sleep time. |
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
from time import time | |
import pylab as pl | |
import scipy as sp | |
import numpy as np | |
from sklearn.decomposition import MiniBatchDictionaryLearning | |
from sklearn.feature_extraction.image import PatchExtractor | |
from sklearn.feature_extraction.image import reconstruct_from_patches_2d | |
from sklearn.pipeline import Pipeline |
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 | |
""" | |
sample theano trampoline | |
""" | |
import numpy | |
import theano | |
import theano.tensor as T | |
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
Process: GitX [86438] | |
Path: /Applications/GitX.app/Contents/MacOS/GitX | |
Identifier: nl.frim.GitX | |
Version: 0.8.4 (0.8.4) | |
Code Type: X86-64 (Native) | |
Parent Process: launchd [251] | |
Date/Time: 2012-07-25 10:26:13.205 -0700 | |
OS Version: Mac OS X 10.7.4 (11E53) | |
Report Version: 9 |
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
[with apologies to Carly Rae Jepsen and Herman Melville] | |
We're on a hunt for a whale, | |
Too many leagues been at sail, | |
The endless seas like a jail, | |
And now we're on our way | |
Ahab's bent on revenge, | |
His every muscle is clenched, |
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
Incident Identifier: E7DD51C4-D520-4D0A-BCED-4F15BF0DF608 | |
CrashReporter Key: f06c5111b7e4bc75011a07aa9dfb1c515d296210 | |
Hardware Model: iPhone3,1 | |
Process: xkcd [512] | |
Path: /var/mobile/Applications/95AB618A-D2DF-41DD-A698-16E9BF2ADA1E/xkcd.app/xkcd | |
Identifier: xkcd | |
Version: ??? (???) | |
Code Type: ARM (Native) | |
Parent Process: launchd [1] |
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 binascii | |
# To run doctests, do something like: | |
# python3 -m doctest binconvtest.py | |
def ascii_to_bin(input_string): | |
""" | |
ascii_to_bin converts a string of ASCII characters into a binary string | |
>>> ascii_to_bin("A") |
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
$ go test net | |
--- FAIL: TestResolveGoogle (0.00 seconds) | |
dialgoogle_test.go:32: ResolveTCPAddr failed: lookup www.google.com: no such host | |
dialgoogle_test.go:32: ResolveTCPAddr failed: lookup www.google.com: no such host | |
dialgoogle_test.go:32: ResolveTCPAddr failed: lookup www.google.com: no such host | |
--- FAIL: TestDialGoogle (0.00 seconds) | |
dialgoogle_test.go:65: Dial failed: dial tcp: lookup www.google.com: no such host | |
dialgoogle_test.go:65: Dial failed: dial tcp4: lookup www.google.com: no such host | |
dialgoogle_test.go:61: test disabled; use -ipv6 to enable | |
--- FAIL: TestDialGoogleIPv4 (0.01 seconds) |
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
$ go test net | |
--- FAIL: TestDialGoogleIPv4 (0.01 seconds) | |
dialgoogle_test.go:143: lookup www.google.com: lookup www.google.com: no such host | |
--- FAIL: TestLookupIANACNAME (0.00 seconds) | |
lookup_test.go:98: LookupCNAME("www.iana.org.") = "", lookup www.iana.org: no such host, want "*.icann.org.", nil | |
--- FAIL: TestShutdown (0.00 seconds) | |
net_test.go:31: Accept: accept tcp 127.0.0.1:49962: too many open files | |
net_test.go:55: client Read: 0, EOF | |
--- FAIL: TestShutdownUnix (0.00 seconds) | |
net_test.go:87: Accept: accept unix /var/folders/jw/xrvq7wz95p5bwvjyx9yc2npm09k844/T/go_net_unixtest272364341: too many open files |
OlderNewer