- Thunk
- Trap
- Trampoline
- Restart
- Transports/Protocols
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
def jit_toposort(dep_map): | |
"expects a dict of {item: set([deps])}" | |
ret, orig_dep_map, dep_map = [], dep_map, dict(dep_map) | |
if not dep_map: | |
return [] | |
extras = set.union(*dep_map.values()) - set(dep_map) | |
dep_map.update([(k, set()) for k in extras]) | |
remaining = dict(dep_map) | |
ready = set() | |
while remaining: |
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
Traceback (most recent call last): | |
File "prefork.py", line 306, in <module> | |
pidfile=args.pidfile).run(args.daemonize) | |
File "prefork.py", line 222, in run | |
self.handle_signals(os.read(r, 4096)) | |
File "prefork.py", line 193, in handle_signals | |
handler_meth(signo, None) | |
File "prefork.py", line 242, in SIGCLD_handler | |
self.remove_worker(self.pid_to_workers[pid]) | |
KeyError: 26600 |
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
body { | |
margin: 5em 0; | |
background-color: rgb(237, 224, 206); | |
} | |
article, header { | |
background-color: #fff; | |
color: #222222; | |
margin: auto; | |
padding: 1.5em; | |
width: 600px; |
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
>>> __builtins__ = {'file': __builtins__.file} | |
>>> file('/dev/null') | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
IOError: file() constructor not accessible in restricted mode |
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
def raise_it(): | |
raise | |
def do_it(): | |
try: | |
dumb() | |
except: | |
raise_it() | |
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
markdown input.md | tidy -i -w 1024 -q | xclip -selection "clipboard" |
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
# cropping mp4 video in ffmpeg. | |
# | |
# this does require a re-encode but the following process created video | |
# half the size with no perceptible change in quality. audio is unaffected. | |
# detect area to crop | |
ffplay -i show.mp4 -vf "cropdetect=24:16:0" | |
# crop to 944x720, x-offset=170, y-offset=0 (removing vertical black bars) | |
ffmpeg -i show.mp4 -vf "crop=944:720:170:0" show_cropped.mp4 |
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
$ python | |
Python 2.7.6 (default, Mar 22 2014, 22:59:56) | |
[GCC 4.8.2] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import sys | |
>>> sys.maxint | |
9223372036854775807 | |
>>> xrange(0, 2 ** 64 - 1) | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> |
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
catsym:{`$sv[x]each string flip y} | |
accttypes:("SSSS";enlist",")0:hsym`$"..\\..\\..\\accttypes.csv" | |
accttypes:`accttype xkey select from accttypes where fi=`interracu.com | |
lcsv: {("****SDSFS**SSS";enlist",")0:hsym`$x} /load csv from filename | |
chkopens:{[f] | |
/f:first fs | |
end:"D"$ssr[;".csv";""] f; | |
begin:`date$`month$end; | |
t:update `accttypes$account_code,route:catsym["";(zip5;crrt)] from lcsv f; | |
during:select opens:count i by route from t where account_code.serv=`Checking,account_open_date within (begin,end); /checking accounts opened during (begin,end) month period |
OlderNewer