Skip to content

Instantly share code, notes, and snippets.

Eddie Antonio Santos eddieantonio

Block or report user

Report or block eddieantonio

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
eddieantonio /
Created Mar 30, 2017
Zero-dependency Python 3 and Node IPC using UNIX sockets
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import socket
import json
server_address = '/tmp/example.sock'
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
eddieantonio /
Last active Dec 1, 2019
man page template in Markdown

% HELLO(1) Version 1.0 | Frivolous "Hello World" Documentation


hello — prints Hello, World!


View nrc-cnrc-logo-uncropped.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
eddieantonio /
Created Aug 12, 2019
Showcase of dataclasses and module __getattr__().
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
from dataclasses import dataclass
from random import randint
import re
dn = re.compile(r'd([123456789][0123456789]*)')
__all__ = ['Die']
eddieantonio / nrc_cr_cans.keyman-touch-layout
Last active Jul 9, 2019
Draft Plains Cree syllabics touch keyboard
View nrc_cr_cans.keyman-touch-layout
"phone": {
"font": "Euphemia",
"layer": [
"id": "default",
"row": [
"id": 1,
"key": [
View huff.erl
%% Huffman Code for nêhiyawêwin %%
%% Note: Cree strings must be written in "askiy":
%% - short vowels and consonants: written in ASCII
%% - long vowels: ê is written as e; "âîô" written as "AIO" respectively.
%% - it's a very grounded character encoding 😉
%% I haven't done extensive testing, but this usually uses half the bits to
%% represent Cree word forms. Maybe just gzip it instead?
-export([encode/1, decode/1, tryit/1]).
eddieantonio / $
Last active Jun 25, 2019
Count unigrams and bigrams in the Wolfart-Ahenakew corpus
View $

Cree Grapheme Stats

Count unigrams and bigrams in the Wolfart-Ahenakew nêhiyawêwin corpus!


When building a keyboard for typing Cree, it is useful to know which graphemes are typed often, and which pairs of graphemes are typed one

eddieantonio /
Created Sep 28, 2013
Fabric: task to authorize your SSH key on a remote host.
Installs your SSH key on other hosts. A fabfile for lazy people.
from fabric.api import task, run, put, env, cd
# Use sh instead of bash. = '/bin/sh -l -c'
eddieantonio / nonullfree.c
Last active Apr 10, 2019
nonullfree.c -- throw errors when you call free(NULL)
View nonullfree.c
* nonullfree.c -- throw errors when you call free(NULL)
* $ gcc -shared -fPIC nonullfree.c -ldl -o
* USAGE (Linux):
* $ LD_PRELOAD=./ ./my-program
eddieantonio /
Last active Mar 18, 2019
Demo of compiling a small C dynamic library in a Python script and directly loading it with ctypes.
import ctypes
import tempfile
import distutils.ccompiler
from pathlib import Path
from random import randint
int roll(void) {{
return {randint(1, 6)};
You can’t perform that action at this time.