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
#!/usr/bin/env python | |
""" | |
Usage: index-sentences.py FILE | |
print an index of the parsed sentences in FILE | |
""" | |
import re | |
import sys |
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
;; setup for requiring and installing packages | |
(require 'cl) | |
(require 'package) | |
;; add extra ELPA archives | |
(add-to-list 'package-archives | |
'("melpa" . "http://melpa.milkbox.net/packages/") t) | |
;; initialize package system |
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
(require 'cl) | |
(require 'package) | |
(add-to-list 'package-archives | |
'("melpa" . "http://melpa.milkbox.net/packages/") t) | |
(package-initialize) | |
(defun ensure-package (package) |
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
#!/usr/bin/env python | |
""" | |
Convert a document in the corpus to the brat ANN format. | |
Call like 'doc2ann.py <path>/<document id>'. Outputs two files in the current | |
directory <file>.txt and <file>.ann, where <file> is names from the command-line | |
argument. | |
""" |
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
#!/usr/bin/env python | |
import dbus | |
import time | |
bus = dbus.SessionBus() | |
obj = bus.get_object("org.freedesktop.Notifications", | |
"/org/freedesktop/Notifications") | |
ni = dbus.Interface(obj, "org.freedesktop.Notifications") |
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
/* | |
* Compile with "g++ -std=c++0x main.cc -lncurses && ./a.out" to check it out! | |
*/ | |
#include <curses.h> | |
#undef getch | |
#undef border | |
#undef hline | |
#undef addch | |
#include <exception> |