I hereby claim:
- I am judy2k on github.
- I am judy (https://keybase.io/judy) on keybase.
- I have a public key whose fingerprint is 1F8A C55A EC5F F23B 013A DDD2 F298 5834 FAE5 4325
To claim this, I am signing this object:
var preloadImage = function(url, callback) { | |
var loaded = false, | |
loadHandler = function() { | |
if (!loaded) { | |
callback(url); | |
} | |
loaded = true; | |
}, | |
img = $('<img>') | |
.one('load', loadHandler) |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import re, sys | |
def magic_match(pattern, target): | |
frame = sys._getframe(1) | |
result = re.match(pattern, target) | |
# This is properly, properly evil. Don't do this: |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python | |
def outer(): | |
i = [0] | |
def inner(): | |
i[0] += 1 | |
print i[0] | |
return inner | |
f = outer() |
Traceback (most recent call last): | |
File "./uc.py", line 7, in <module> | |
u += '/' + b | |
UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 1: ordinal not in range(128) |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from functools import wraps | |
def test(condition): | |
def test_decorator(f): | |
@wraps(f) | |
def test_wrapper(n): |
def call_me(names=[]): | |
names.append('Stupid') | |
print ' '.join(names) | |
for _ in range(10): | |
call_me() |
for f in `ls`; do | |
if [ -d $f/.git ]; then | |
fb=$(git --git-dir=$f/.git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* //") | |
echo $f: $fb | |
fi | |
done |
import sys | |
import math as _math | |
__doc__ = _math.__doc__ | |
class NewMath(object): | |
_pi = _math.pi | |
@property | |
def pi(self): |
Io Typing | |
========= | |
Io> 1 + 1 | |
==> 2 | |
Io> 1 + "one" | |
Exception: argument 0 to method '+' must be a Number, not a 'Sequence' | |
--------- |