View telegram_markdown_corpus.py
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 python3 | |
"""Convert Telegram channel JSON export to a Markdown text corpus""" | |
import sys | |
import json | |
import argparse | |
parser = argparse.ArgumentParser(description=sys.modules[__name__].__doc__) | |
parser.add_argument('export_json', help='Exported JSON file', type=argparse.FileType('r', encoding='utf-8')) | |
parser.add_argument('markdown_corpus', help='Markdown text corpus', type=argparse.FileType('w', encoding='utf-8')) | |
args = parser.parse_args() |
View Makefile
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
# Train Tesseract OCR for Akkadian language | |
LANG = akk | |
CORPUS = corpus-12pt.txt | |
LANGDATA_ROOT = ../langdata | |
FREQ_DAWG_SIZE = 100 | |
FONTS := "CuneiformNAOutline Medium" "CuneiformOB" "CuneiformComposite" "Segoe UI Historic" | |
FONTSJOINED := CuneiformNAOutlineMedium CuneiformOB CuneiformComposite SegoeUIHistoric | |
EXPOSURES := 0 |
View oracc-export.py
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 | |
"""Export cuneiform corpus from ORACC | |
""" | |
import sys | |
import os | |
import argparse | |
import logging | |
import re | |
import shutil |
View aktuellparser.py
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
import re | |
from html.parser import HTMLParser | |
RE_TEILLISTE = re.compile(r'/Teilliste_\w\.html$', re.IGNORECASE) | |
def get_url(attrs): | |
"""Find href attribute and join it with base URL""" | |
for key, value in attrs: | |
if key == 'href': | |
return urljoin(START_URL, value) |
View giitotext.xsl
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
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:output method="text" encoding="utf-8" omit-xml-declaration="yes"/> | |
<xsl:strip-space elements="*"/> | |
<xsl:variable name="newline"><xsl:text> | |
</xsl:text></xsl:variable> | |
<xsl:variable name="space"><xsl:text> </xsl:text></xsl:variable> | |
<xsl:variable name="tab" select="concat($space, $space, $space, $space)"/> | |
<xsl:template match="/dokumente"> |
View Vagrantfile
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
required_plugins = %w( vagrant-vbguest vagrant-disksize ) | |
_retry = false | |
required_plugins.each do |plugin| | |
unless Vagrant.has_plugin? plugin | |
system "vagrant plugin install #{plugin}" | |
_retry=true |
View batch_tester.patch
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
--- export/batch_tester/batch_tester.cc.orig 2016-02-09 12:38:34.000000000 +0000 | |
+++ export/batch_tester/batch_tester.cc 2019-04-27 20:04:32.358891300 +0000 | |
@@ -37,11 +37,11 @@ | |
using thrax::GrmManager; | |
using thrax::InputBuffer; | |
using thrax::OpenOrDie; | |
-using thrax::Split; | |
+//using thrax::Split; | |
-typedef StringCompiler<StdArc> Compiler; |
View make_me.sh
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
#!/bin/sh | |
# | |
# Function switcher for USB armory | |
if [ $# -eq 0 -o $# -eq 1 -a \( "$1" != "stick" -a "$1" != "stick-win" -a "$1" != "stick-mac" -a "$1" != "host" \) ] | |
then | |
echo "Usage: $0 stick|stick-win|stick-mac|host" | |
exit 1 | |
fi |
View abc2svg.html
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>abc2svg test</title> | |
<style> | |
#output { | |
position: absolute; | |
top: 0; | |
right: 0 |
NewerOlder