I hereby claim:
- I am kowey on github.
- I am kowey (https://keybase.io/kowey) on keybase.
- I have a public key whose fingerprint is C2AA 42B7 D683 2C01 164B 17D6 054A CEC2 08AC 04F9
To claim this, I am signing this object:
def _surrounding_paragraph(edu): | |
""" | |
Determine which paragraph (if any) surrounds this EDU. | |
Try to accomodate the occasional off-by-a-smidgen error by | |
folks marking these EDU boundaries, eg. original text: | |
Para1: "Magazines are not providing us in-depth information on | |
circulation," said Edgar Bronfman Jr., .. "How do readers feel | |
about the magazine?... | |
Research doesn't tell us whether people actually do read the |
# pylint: disable=too-few-public-methods, redefined-builtin, invalid-name | |
class Torpor(object): | |
""" | |
Announce that we're about to do something, then do it, | |
then say we're done. | |
Usage: :: | |
with Torpor("doing a slow thing"): | |
some_slow_thing |
def add_fold_choice_args(psr): | |
"ability to select a subset of the data according to a fold" | |
fold_grp = psr.add_argument_group('fold selection') | |
fold_grp.add_argument("--fold-file", metavar="FILE", | |
type=argparse.FileType('r'), | |
help="read folds from this json file") | |
fold_grp.add_argument("--fold", metavar="INT", | |
type=int, | |
help="fold to select") |
# straightforward replacements | |
_PTB_MAPPING = {"``": "\"", | |
"''": "\"", | |
"-LRB-": "(", | |
"-RRB-": ")", | |
"-LSB-": "[", | |
"-RSB-": "]", | |
"-LCB-": "{", | |
"-RCB-": "}", | |
} |
main(L) :- | |
datr_query('TEST', [unwords|L], Vs), | |
foreach(member(V,Vs), write(V)), | |
nl, | |
halt. |
% `Debug:<trace path...>` is meant to work as functionally | |
% a drop-in replacement for `path...`, except that it also | |
% prints it out to stderr. | |
% This can be useful if you want to avoid recomputing | |
% the local path (for example, if it's stateful and you want | |
% to avoid changing the meaning of the code) | |
'Debug'([trace|P], GN, GP, P) :- 'Debug'([writeline|P], GN, GP, []). | |
% `Debug:<writeline>` sends its output to stderr, so that you can | |
% avoid confusing it up with any actual output you may want to |
I hereby claim:
To claim this, I am signing this object:
main :- do_loop(10). | |
do_loop(N) :- N =< 0. | |
do_loop(N) :- | |
jpl_new('java.lang.Integer', [0], _), | |
%garbage_collect_atoms, | |
statistics(atoms, NumAtoms), | |
write(NumAtoms), nl, | |
Nm1 is N-1, | |
do_loop(Nm1). |
% year digits | |
#vars $yd1: 0 1 2 3 4 5 6 7 8 9 . | |
#vars $yd2: 0 1 2 3 4 5 6 7 8 9 . | |
#vars $yd3: 0 1 2 3 4 5 6 7 8 9 . | |
#vars $yd4: 0 1 2 3 4 5 6 7 8 9 . | |
#vars $d01: 0 1 . | |
#vars $d02: 0 1 2 . | |
#vars $d12: 1 2 . | |
#vars $d09: 0 1 2 3 4 5 6 7 8 9 . |
import re | |
class State: | |
""" | |
Holds the resources and the buildups | |
""" | |
def __init__(self, state_chunk): #state_chunk is actually line.split("|")[4] | |
item_list = state_chunk.replace('|',',').split(",") | |
res_list = [] | |
build_list = [] |