Skip to content

Instantly share code, notes, and snippets.

View gedcom2sunburst.py
#!/usr/bin/env python3
import json
import sys
import dateutil.parser
import gedcom.parser
parser = gedcom.parser.Parser()
parser.parse_file(sys.argv[1], False)
countries = {
View gpfft.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View english.ebnf
%import common.WS
%ignore WS
ADJ: "big" | "red" | "tall" | "narrow" | "mine" | "blue" | "green" | "large" | "small" | "short" | "little" | "wide"
DET: "that" | "any" | "an" | "a" | "the"
NOUN: "block" | "pyramid" | "box" | "that" | "cube" | "table" | "thing" | "colour" | "object" | "steeple" | "superblock"
PREP: "into" | "onto" | "in" | "on top of" | "on" | "behind"
PREPT: "before" | "while"
VERB: "pick up" | "pick" | "contain" | "support" | "own" | "touch"
DIR: "left" | "right"
@davidar
davidar / prolog.md
Last active Aug 19, 2019
Prolog relative clauses
View prolog.md

Pointless Prolog

This document proposes relative clauses as syntactic sugar for Prolog, which allow us to write more concisely by avoiding repetitively naming variables. Relative clauses are written as a list of predicates surrounded by curly braces. They introduce a new variable, which is constrained by applying all of the included predicates to it. For example:

{red, block}

is equivalent to the query

View ilo-pona.txt
a
ᴇᴛʏᴍᴏʟᴏɢʏ: A priori, possibly onomatopoeic
ɪɴᴛᴇʀᴊᴇᴄᴛɪᴏɴ
• (emotion word) ah, oh, uh, ha
ᴘᴀʀᴛɪᴄʟᴇ
• (adds emphasis) ah, yes, really, indeed
ɴᴏᴛᴇꜱ
Often used repeatedly (e.g 'a a a') to signify laughter
akesi
View ld360.md
abbreviation
You write some parts but not all parts of a long word. When someone sees what you wrote, they know it means the same as this long word.
ability
What someone can do.
about
Thinking or saying what this thing is, what it does, and what happens to it.
Near.
Around.
A short time before.
Very much like but not the same as and not more than.
Not much more than or much less than.
View wind.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View flow.py
#!/usr/bin/env python3
from util import *
from lam import *
from ty import *
def extract(t, *kind):
if type(t) is Lam:
res = extract(t.args[1], *kind)
if Lam in kind: res.add(t)
if Var in kind: res.add(t.args[0])
View pbmtobraille.c
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<string.h>
#include<ctype.h>
void handle_args(int argc, char*argv[], char *neg, FILE **fp);
int main(int argc, char*argv[])
{
View readability-proxy.js
var jsdom = require("jsdom").jsdom;
var Readability = require("./index").Readability;
var express = require("express");
var app = express();
function removeCommentNodesRecursively(node) {
for (var i = node.childNodes.length - 1; i >= 0; i--) {
var child = node.childNodes[i];
if (child.nodeType === child.COMMENT_NODE) {