This file contains hidden or 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
#!/usr/bin/env python3.4 | |
import argparse | |
import math | |
import sys | |
from collections import defaultdict, namedtuple | |
from itertools import chain | |
from pcfg import read_pcfg | |
# Data type for constituents |
This file contains hidden or 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
#!/usr/bin/env python3.4 | |
import argparse | |
import gzip | |
import json | |
import operator | |
import random | |
import sys | |
from collections import defaultdict | |
from itertools import chain |
This file contains hidden or 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
execve("/home/jojo/.bin/exercism", ["exercism", "upgrade"], [/* 68 vars */]) = 0 | |
arch_prctl(ARCH_SET_FS, 0xb9fdc8) = 0 | |
sched_getaffinity(0, 8192, [f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...]) = 64 | |
mmap(0xc000000000, 65536, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc000000000 | |
munmap(0xc000000000, 65536) = 0 | |
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fae48c40000 | |
mmap(0xc820000000, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc820000000 | |
mmap(0xc81fff8000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc81fff8000 | |
mmap(0xc000000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc000000000 | |
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fae48c30000 |
This file contains hidden or 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
type Link<T> = Option<Box<Node<T>>>; | |
#[derive(Debug)] | |
pub struct BST<T: Ord> { | |
root: Link<T> | |
} | |
pub struct IntoIter<T: Ord>(Link<T>); | |
impl<T: Ord + Copy> BST<T> { |
This file contains hidden or 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
(ns annotare.db | |
(:require [cljs.reader])) | |
; TODO: Create schema for state | |
;; Initial state | |
(def default-value | |
{:projects (sorted-map) ;; All available projects | |
:documents (sorted-map) | |
:active-panel :front ;; Currently active page/panel |
This file contains hidden or 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
(defproject annotare "0.1.0-SNAPSHOT" | |
:description "Annotate linguistic data." | |
:url "http://github.com/jbaiter/annotare" | |
:dependencies [[org.clojure/clojure "1.8.0"] | |
[luminus/config "0.5"] | |
[ring-middleware-format "0.7.0"] | |
[metosin/ring-http-response "0.6.5"] | |
[bouncer "1.0.0"] |
This file contains hidden or 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
(defn linking-tool [tags tokens empty_tag] | |
(let [show-suggestions (subscribe [:get :show-suggestions])] | |
(fn [] | |
(log "Called with: " tags) | |
[:div.linking-tool | |
[:table.table>tbody | |
(doall | |
(for [[idx {:keys [tokens tag] :as ent}] | |
(indexed (extract-entities tokens tags empty_tag))] | |
(let [name (string/join " " tokens) |
This file contains hidden or 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
import itertools | |
import sys | |
import numpy as np | |
import yaml | |
with open(sys.argv[1]) as fp: | |
data = yaml.load(fp) |
This file contains hidden or 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
extern crate libc; | |
extern crate fst; | |
use std::ffi::{CStr,CString}; | |
use std::fs::File; | |
use std::io; | |
use std::mem; | |
use fst::{IntoStreamer, Streamer, Levenshtein, Set, SetBuilder}; | |
fn cstr_to_str<'a>(s: *mut libc::c_char) -> &'a str { |
This file contains hidden or 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
fontane_wuthenow_1883 http://stabikat.de/DB=1/SET=12/TTL=1/CMD?ACT=SRCHA&IKT=1016&SRT=YOP&TRM=614257492 | |
marx_bonaparte_1869 http://stabikat.de/DB=1/SET=12/TTL=1/CMD?ACT=SRCHA&IKT=1016&SRT=YOP&TRM=428189873 | |
eckermann_goethe03_1848 http://stabikat.de/DB=1/SET=12/TTL=1/CMD?ACT=SRCHA&IKT=1016&SRT=YOP&TRM=601943449 | |
brentano_kasperl_1838 http://stabikat.de/DB=1/SET=12/TTL=1/CMD?ACT=SRCHA&IKT=1016&SRT=YOP&TRM=434627437 | |
spielhagen_problematische01_1861 http://stabikat.de/DB=1/SET=12/TTL=1/CMD?ACT=SRCHA&IKT=1016&SRT=YOP&TRM=439585031 | |
brentano_gockel_1838 http://stabikat.de/DB=1/SET=12/TTL=1/CMD?ACT=SRCHA&IKT=1016&SRT=YOP&TRM=410740594 | |
ideler_wahnsinn_1847 http://stabikat.de/DB=1/SET=12/TTL=1/CMD?ACT=SRCHA&IKT=1016&SRT=YOP&TRM=62722122X | |
fontane_briest_1896 http://stabikat.de/DB=1/SET=12/TTL=1/CMD?ACT=SRCHA&IKT=1016&SRT=YOP&TRM=876213794 | |
stifter_nachsommer03_1857 http://stabikat.de/DB=1/SET=12/TTL=1/CMD?ACT=SRCHA&IKT=1016&SRT=YOP&TRM=875044506 | |
rapsilber_reichstagsgebaeude_1895 http://stabikat.de/DB=1/SET=12/TTL=1/CMD?AC |