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 tokenize(string): | |
return string.replace('(', ' ( ').replace(')', ' ) ').split() | |
def parse(tokens): | |
expression, estack = [], [] | |
for token in tokens: | |
if token is '(': |
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
addr opcode p1 p2 p3 p4 p5 comment | |
---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- | |
0 Init 0 44 0 00 | |
1 Integer 10 1 0 00 | |
2 OpenRead 1 214248 0 6 00 | |
3 OpenRead 2 2 0 0 00 | |
4 OpenRead 3 4184000 0 0 00 | |
5 OpenRead 0 24914 0 1 00 | |
6 Once 0 16 0 00 | |
7 OpenAutoin 4 4 0 k(4,nil,ni 00 |
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
addr opcode p1 p2 p3 p4 p5 | |
---------- ---------- ---------- ---------- ---------- ---------- ---------- | |
0 Init 0 34 0 00 | |
1 CreateInde 0 1 0 00 | |
2 OpenWrite 0 1 0 5 00 | |
3 NewRowid 0 2 0 00 | |
4 String8 0 3 0 index 00 | |
5 String8 0 4 0 result2_co 00 | |
6 String8 0 5 0 labs 00 | |
7 Copy 1 6 0 00 |
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
Call graph: | |
695 Thread_576732 DispatchQueue_1: com.apple.main-thread (serial) | |
695 start (in libdyld.dylib) + 1 [0x7fff975d15fd] | |
695 main (in sqlite3) + 2319 [0x10d761f47] | |
695 process_input (in sqlite3) + 1297 [0x10d7673b2] | |
695 shell_exec (in sqlite3) + 1478 [0x10d765c1a] | |
695 sqlite3_step (in libsqlite3.0.dylib) + 576 [0x10d77f139] | |
479 sqlite3VdbeExec (in libsqlite3.0.dylib) + 9936 [0x10d7ec6c3] | |
+ 362 vdbeSorterListToPMA (in libsqlite3.0.dylib) + 74 [0x10d7f9ddb] | |
+ ! 311 vdbeSorterSort (in libsqlite3.0.dylib) + 113 [0x10d7f9f45] |
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
Call graph: | |
1875 Thread_576732 DispatchQueue_1: com.apple.main-thread (serial) | |
1875 start (in libdyld.dylib) + 1 [0x7fff975d15fd] | |
1875 main (in sqlite3) + 2319 [0x10d761f47] | |
1875 process_input (in sqlite3) + 545 [0x10d7670c2] | |
1875 do_meta_command (in sqlite3) + 2713 [0x10d762f27] | |
1875 process_input (in sqlite3) + 1297 [0x10d7673b2] | |
1875 shell_exec (in sqlite3) + 1478 [0x10d765c1a] | |
1875 sqlite3_step (in libsqlite3.0.dylib) + 576 [0x10d77f139] | |
1852 sqlite3VdbeExec (in libsqlite3.0.dylib) + 2240 [0x10d7ea8b3] |
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
# because... emacs | |
unbind C-b | |
set -g prefix C-z | |
# intuitive window splitting | |
unbind % | |
bind | split-window -h | |
bind _ split-window -v |
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 https://gist.github.com/bahamas10/6567725 to fix stupid bash issues | |
# http://stackoverflow.com/questions/2575037/how-to-get-the-cursor-position-in-bash | |
# print the current column of the cursor | |
curcol() { | |
local pos oldstty row=0 col=0 | |
exec < /dev/tty | |
oldstty=$(stty -g) | |
stty raw -echo min 0 | |
tput u7 > /dev/tty | |
IFS=';' read -r -d R -a pos |
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
export PS1="\w > " | |
export PATH="~/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/heroku/bin" | |
export EDITOR=emacs | |
alias l="ls -aG" | |
alias ll="ls -alG" | |
alias ls="ls -G" | |
alias k="kill" |
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
<html> | |
<head> | |
<style> | |
.node circle { | |
fill: white; | |
stroke: steelblue; | |
stroke-width: 1.5px; | |
} | |
.node { |
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
<html> | |
<head> | |
<style> | |
.node circle { | |
fill: white; | |
stroke: steelblue; | |
stroke-width: 1.5px; | |
} | |
.node { |