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 ctypes | |
import tempfile | |
import distutils.ccompiler | |
from pathlib import Path | |
from random import randint | |
SOURCE_CODE = f""" | |
int roll(void) {{ | |
return {randint(1, 6)}; |
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 | |
# -*- coding: UTF-8 -*- | |
# Copyright 2019 Eddie Antonio Santos <easantos@ualberta.ca> | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
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 | |
# -*- coding: UTF-8 -*- | |
# Install `fst_lookup` using pip: | |
# | |
# $ pip install fst-lookup | |
# | |
# Or, if you're using pipenv: | |
# | |
# $ pipenv install fst-lookup |
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 | |
# -*- coding: UTF-8 -*- | |
""" | |
dull(1) dull(1) | |
NAME | |
dull -- the opposite of pointed |
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 | |
# -*- coding: UTF-8 -*- | |
import re | |
from dataclasses import dataclass | |
from functools import partial | |
from typing import TypeVar, Generic, Callable | |
from unicodedata import normalize | |
A = TypeVar('A') |
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
<script> | |
var url = URL.createObjectURL(new Blob(['(', MyWebWorker.toString(), '())'], { | |
type: 'text/javascript' | |
})); | |
console.log(url); | |
var worker = new Worker(url); | |
worker.onmessage = function (event) { | |
console.log("from worker:", event); | |
} |
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
class Duration { | |
constructor(number) { | |
this._number = number; | |
} | |
valueOf() { | |
return this._number; | |
} | |
then(fn) { |
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 | |
# -*- coding: UTF-8 -*- | |
""" | |
Some ideas about how to organize data from the FST, to how to store Cree | |
wordforms. | |
Usage: | |
Analyzing a wordform descriptively yields "raw" FST output: |
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 python2.7 | |
# -*- coding: UTF-8 -*- | |
import os | |
import signal | |
import sys | |
from contextlib import contextmanager | |
from random import randint | |
from signal import SIGUSR1, SIGTERM | |
from time import sleep |
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
# The source analyser and generator FSTs are done entirely in Standard Roman | |
# Orthography (Latn). However, we require Canadian Aboriginal syllabics | |
# versions of both. This Makefile converts SRO FSTs in the equivillent | |
# syllabics FSTs. | |
# | |
# analyser-gt-desc.Cans-to-Cans.hfstol | |
# : An analyzer that accepts input in Canadian Aboriginal syllabics | |
# and produces a morphological analysis with its lemma also written in syllabics. | |
# "Descriptive" means it is able to understand non-standard orthography. | |
# |