Norwegian is slightly strange
- Two written forms
- Idiosyncratic capitalization rules
- Normativish grammar
- Semantically driven
Recommended tools
- UDPipe: http://ufal.mff.cuni.cz/udpipe
# Copyright @ Bjarte Johansen 2012 | |
# License: http://ljos.mit-license.org/ | |
from AppKit import NSApplication, NSApp, NSWorkspace | |
from Foundation import NSObject, NSLog | |
from PyObjCTools import AppHelper | |
from Quartz import kCGWindowListOptionOnScreenOnly, kCGNullWindowID, CGWindowListCopyWindowInfo | |
class AppDelegate(NSObject): | |
def applicationDidFinishLaunching_(self, notification): |
#!/usr/bin/env python | |
# | |
# cocoa_keypress_monitor.py | |
# Copyright © 2016 Bjarte Johansen <Bjarte.Johansen@gmail.com> | |
# | |
# The MIT License (MIT) | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining | |
# a copy of this software and associated documentation files (the | |
# “Software”), to deal in the Software without restriction, including |
p ← •BQN ¨ •file.Lines ⊑ •args | |
T1 ← +´1↓»⊸< | |
T2 ← +´˘3↕⊢ | |
•Show T1 p | |
•Show T1∘T2 p |
% The first task is to find numbers in a list that sum up to 2020. We | |
% will solve this problem using constraint logic programming over | |
% finite domains in prolog. | |
:- use_module(library(clpfd)). | |
:- use_module(library(dcg/basics)). | |
% In the first part we are given a list of numbers and we want to find | |
% 2 numbers that sum up to the value 2020 and then calculate the | |
% product of those two numbers. We therefore want a predicate that | |
% takes the length of the list of numbers to find (Length), and will |
Norwegian is slightly strange
Recommended tools
#! /usr/bin/python2.6 | |
# I COULD ONLY GET IT TO RUN IN PYTHON2.6 | |
# Running it in python2.7, installed from homebrew results in a segfault. | |
# I haven't been able to investigate why. | |
# Code translated from http://osxbook.com/book/bonus/chapter2/alterkeys/ | |
# License: http://ljos.mit-license.org/ | |
from Quartz import ( | |
CGEventGetIntegerValueField, CGEventSetIntegerValueField, | |
kCGKeyboardEventKeycode, | |
kCGEventKeyDown, kCGEventKeyUp, |
#! /usr/bin/env python3 | |
import codecs | |
import csv | |
import re | |
import sys | |
import time | |
def parse_date(s): | |
# We assume that the date is always in the format '10.01.2014'. |
#!/bin/bash | |
# Slack notification script for Munin | |
# Mark Matienzo (@anarchivist) | |
# | |
# To use: | |
# 1) Create a new incoming webhook for Slack | |
# 2) Edit the configuration variables that start with "SLACK_" below | |
# 3) Add the following to your munin configuration: | |
# |
from os import listdir | |
from os.path import join | |
from re import match, findall, search, M | |
from time import mktime, strptime | |
from tldextract import extract | |
from collections import defaultdict | |
from HTMLParser import HTMLParser | |
class FindAllAs(HTMLParser): | |
def __init__(self, siteURL): |
A small project using timeplot, joseki and xslt to create graphs over time. The rdfs used in the searches here are ones created in a xslt you can find as another gist. The code is meant to run on as a part of a joseki sparql endpoint. At least that is where we sent the queries.
Code released under GPLv3.