Skip to content

Instantly share code, notes, and snippets.

View durka's full-sized avatar

Alex Burka durka

View GitHub Profile
word: bacru
rafsi: ba'u
examples: No examples.
definitions:
en:
place structure: x1 utters verbally/says/phonates/speaks [vocally makes sound]
x2.
notes: Also voices; does not necessarily imply communication or audience; ('says'
is usually {cusku}). See also {krixa}, {cusku}, {casnu}, {tavla}, {voksa},
{pinka}.
word: xekri
rafsi:
- xek
- xe'i
examples: No examples.
definitions:
en:
place structure: x1 is black/extremely dark-colored [color adjective].
notes:
- See also {blabi}, {grusi}, {manku}, {skari}, {xekri}, {kandi}, {carmi}, {blanu},
def mangle(self, s):
rdict = {'\\(':'\\)', '\\)':'\\(', '\\[':'\\]', '\\]':'\\[', '\\<':'\\>', '\\>':'\\<', '\\{':'\\}', '\\}':'\\{'}
robj = re.compile('|'.join(rdict.keys()))
rdict = {'(':')', ')':'(', '[':']', ']':'[', '<':'>', '>':'<', '{':'}', '}':'{'}
s = s[::-1]
s = robj.sub(lambda m: rdict[m.group(0)], s)
return s
@durka
durka / placenums.txt
Last active August 29, 2015 14:02
gismu place numbers
gimste$ for g in {experimental_,}gismu/*/*.yaml; do echo -e $(python <<<"import rtyaml; print(rtyaml.load(open('$g','r'))['definitions']['en']['place structure'])" | grep -o 'x\d' | sort | uniq | wc -l) '\t' $(echo $g | cut -d/ -f 3 | cut -d. -f 1); done | sort > placenums.txt
0 broda
0 brode
0 brodi
0 brodo
0 brodu
1 bikla
1 blabi
1 blanu
Configuring for a x86_64-apple-darwin12.5.0 ...
The C compiler is ANSI-compliant.
Checking the sizes of integers and pointers...
Wow! A 64 bit architecture!
This is a little-endian architecture.
Doubles can be word-aligned.
64-bit integers can be word-aligned.
Native division and modulus have round-towards-zero semantics,
will use them.
ranlib found
@durka
durka / 01.python
Last active August 29, 2015 14:03
brew gist-logs --config --doctor pillow && brew info python
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-2.7
creating build/lib.macosx-10.9-x86_64-2.7/PIL
copying PIL/__init__.py -> build/lib.macosx-10.9-x86_64-2.7/PIL
copying PIL/_binary.py -> build/lib.macosx-10.9-x86_64-2.7/PIL
copying PIL/_util.py -> build/lib.macosx-10.9-x86_64-2.7/PIL
copying PIL/ArgImagePlugin.py -> build/lib.macosx-10.9-x86_64-2.7/PIL
seas491:ilmentufa alex$ time ../camxes-py/camxes.py -r text "coi ro do"
["text",["text_part_2",[["free",["vocative",[["COI_clause",[["COI","coi"]]]]],["sumti",["sumti_1",["sumti_2",["sumti_3",["sumti_4",["sumti_5",["quantifier",["number",["PA_clause",[["PA","ro"]]]],["BOI"]],["sumti_6",["KOhA_clause",[["KOhA","do"]]]]]]]]]],["DOhU"]]]]]
real 0m1.565s
user 0m1.489s
sys 0m0.071s
seas491:ilmentufa alex$ time ../camxes-py/camxes.py -r text "coi ro do" --fast
{"text":[{"intro_null":[[],{"intro_si_clause":[]}]},[],{"text_part_2":[{"free":[{"vocative":[{"COI_clause":[{"COI_pre":[{"pre_clause":null},{"COI":[{"c":[[],"c"]},{"o":[[],"o"]},{"i":[[],"i"]}]}]},{"post_clause":[]}]},[]]},{"sumti":{"sumti_1":{"sumti_2":[{"sumti_3":{"sumti_4":{"sumti_5":[{"quantifier":[{"number":[{"PA_clause":[{"PA_pre":[{"pre_clause":null},{"PA":[{"r":[[],"r"]},{"o":[[],"o"]}]}]},{"post_clause":[]}]},[]]},{"BOI_elidible":null},[]]},{"sumti_6":[{"KOhA_clause":[{"KOhA_pre":[{"pre_clause":null},{"KOhA":[{"d":[[],"d"]},{"o":[[],"o"]}]},{"spaces
@durka
durka / gist:96cb6e236f38e6665432
Last active August 29, 2015 14:04
initial consonant pairs
tc
ts
dj
dz
pl
pr
tr
kl
kr
fl
@durka
durka / Prometheus in Lojban
Last active August 29, 2015 14:05
The story of Prometheus (translated from http://www.authorama.com/old-greek-stories-5.html)
.
@durka
durka / app.py
Last active August 29, 2015 14:05
nginx, uwsgi, flask, zeromq
from flask import Flask, Module, request, redirect, url_for
from flaskext.genshi import render_response
from vlasisku.extensions import database
from vlasisku.utils import etag, compound2affixes, dameraulevenshtein
from vlasisku.database import TYPES
app = Module(__name__)