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
# extract tgz from http://www.blahedo.org/novial/nl.html | |
with open("novial.txt", "w", encoding="utf-8") as novial: | |
for i in range(ord("A"), ord("Z")): | |
with open("%c.txt" % i, encoding="iso-8859-1") as f: | |
lines = f.readlines() | |
texts = [] | |
for i, line in enumerate(lines): | |
line = line.strip() | |
if i > 1 and not line: | |
if texts: |
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
// http://personal.southern.edu/~caviness/Volapuk/Misc/eng-vol.htm | |
// http://personal.southern.edu/~caviness/Volapuk/Misc/vol-eng.htm | |
// https://gist.github.com/7shi/de072cd867f3899aa285bc9343110bff | |
#load "XmlParser.fsx" | |
open System | |
open System.IO | |
open System.Text | |
open XmlParser |
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
open System | |
open System.IO | |
open System.Text | |
let entities = | |
( | |
"acirc,â;aelig,æ;agrave,à;amp,&;auml,ä;ccedil,ç;deg,°;eacute,é;" + | |
"ecirc,ê;egrave,è;euml,ë;gt,>;hellip,…;iuml,ï;laquo,«;ldquo,“;" + | |
"lsaquo,‹;lt,<;mdash,—;nbsp, ;ndash,–;ocirc,ô;oelig,œ;ordf,ª;" + | |
"ordm,º;ouml,ö;quot,\";raquo,»;rdquo,”;rsaquo,›;rsquo,’;shy,;" + |
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
// https://github.com/kyegupov/ido_web_dictionary | |
// https://gist.github.com/7shi/de072cd867f3899aa285bc9343110bff | |
#load "XmlParser.fsx" | |
open System | |
open System.IO | |
open System.Text | |
open XmlParser |
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 | |
CMDNAME=`basename $0` | |
INSERT="✔ " | |
DICT="" | |
MAX="50" | |
WORD="0" | |
OPTS="-i" | |
COLOR="--color=always" | |
function usage () { | |
echo "usage: $CMDNAME -d DICT [-c] [-m max] [-w] words ..." 1>&2 |
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
' Save this VBS as UTF-16 LE | |
' ref. https://bugzilla.mozilla.org/show_bug.cgi?id=1544143 | |
Const target = "Microsoft Hoda" | |
Const text = "السلام عليكم" | |
Const output = "test.wav" | |
Set voice = Nothing | |
Set cat = CreateObject("SAPI.SpObjectTokenCategory") |
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
# CC0 http://creativecommons.org/publicdomain/zero/1.0/ | |
usage = "[-n max sentences (default 10)] [-m max translations] languages..." | |
import tatoeba, sys | |
argi = 0 | |
def getarg(): | |
global argi | |
if argi + 1 >= len(sys.argv): return None |
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 dbm, os, sys | |
slangdb = "sentences-lang.db" | |
stextdb = "sentences-text.db" | |
linksdb = "links-all.db" | |
llangdb = "links-lang.db" | |
print("Compiling sentences.csv ...") | |
slang = None if os.path.exists(slangdb) else dbm.open(slangdb, "n") | |
stext = None if os.path.exists(stextdb) else dbm.open(stextdb, "n") |
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 | |
if test "$1" = "."; then | |
explorer.exe . | |
else | |
cmd.exe /c start $@ | |
fi |
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
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tingle.js@0.15.2/dist/tingle.min.css"> | |
<script src="https://cdn.jsdelivr.net/npm/tingle.js@0.15.2/dist/tingle.min.js"></script> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/nils-soderman/CtxMenu-Javascript@0.1.3/ctxmenu/ctxmenu.min.css"> | |
<script src="https://cdn.jsdelivr.net/gh/nils-soderman/CtxMenu-Javascript@0.1.3/ctxmenu/ctxmenu.min.js"></script> | |
<script> | |
document.addEventListener("DOMContentLoaded", () => { | |
let modal = new tingle.modal(); | |
modal.setContent('<textarea readOnly rows="10" style="width:100%;resize:none;border:none;white-space:pre-wrap;"></textarea>'); | |
modal.getContent().style.padding = "1rem 1rem"; | |
CtxMenu(".katex").addItem("Show TeX Commands", e => { |