I hereby claim:
- I am banjiewen on github.
- I am banjiewen (https://keybase.io/banjiewen) on keybase.
- I have a public key whose fingerprint is 44CC 8CC2 11DB 3E86 8A82 6AF3 551D DB08 1878 1D01
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
html { | |
font-family: 'Bitstream Vera Sans Mono'; | |
font-size: 14px; | |
background-color: #fdf6e3; /* base3 */ | |
color: #657b83; /* base00 */ | |
} | |
body {} | |
.url { color: #d33682; } /* magenta */ | |
.address {} |
function(doc) { | |
emit([doc.year, doc.ngram], null); | |
} |
-module(avern_leveldb). | |
-export([ | |
delete/3, | |
read/4, | |
write/2 | |
]). | |
-spec delete(binary(), pos_integer, list()) -> any(). | |
delete(Metric, Until, LevelDB) -> |
get_random_line(#file{bin=Bin, size=Size}=F) -> | |
I = random:uniform(Size), | |
case binary:match(Bin, <<"\n">>, [{scope, {I, Size - I}}]) of | |
nomatch -> get_random_line(F); | |
{Start, _} -> | |
case binary:match(Bin, <<"\n">>, [{scope, Start + 1, Size - (Start +1)}]) of | |
nomatch -> get_random_line(F); | |
{End, _} -> | |
binary:part(Bin, Start, End) |
Weight = Count * DeltaT, | |
Waiting1 = try | |
OldWeight = dict:fetch(Metric, Index), | |
{value, Value} = gb_trees:lookup(OldWeight, Waiting), | |
NewValue = lists:delete(OldWeight, Value), | |
case NewValue of | |
[] -> gb_trees:delete(OldWeight, Waiting); | |
V -> gb_trees:insert(OldWeight, V, Waiting) | |
end | |
catch |
>>> import emacs | |
>>> a = [(1, 2), (3, 4)] | |
a = [(1, 2), (3, 4)] | |
>>> for x, y in a: | |
for x, y in a: | |
... print x | |
print x | |
... | |
1 |
;; Integrate terminal emacs with OSX pasteboard | |
(defun copy-from-osx () | |
(shell-command-to-string "pbpaste")) | |
(defun paste-to-osx (text &optional push) | |
(let ((process-connection-type nil)) | |
(let ((proc (start-process "pbcopy" "*Messages*" "pbcopy"))) | |
(process-send-string proc text) | |
(process-send-eof proc)))) |
joxa-is> (defn foo () (io/format "asdf~p~n" '(14))) | |
ok | |
joxa-is> foo | |
:0:0 *error* reference does not exist: foo | |
error | |
joxa-is> (foo) | |
Function: 'interactive-name'/0 | |
error: {error,function_clause} : [{code,load_binary,['joxa-is',[],error],[{file,"code.erl"},{line,164}]}, | |
{'joxa-compiler','post-compile-process',1, | |
[{file,"/home/emerritt/workspace/joxa/src/joxa-compiler.jxa"}, |