Skip to content

Instantly share code, notes, and snippets.

@ljos
ljos / slack_munin.sh
Created December 22, 2015 15:03 — forked from anarchivist/slack_munin.sh
Slack notification script for Munin
#!/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:
#
@ljos
ljos / no_nlp.org
Last active May 2, 2019 13:50
Introduction to NLP for Norwegian text

Introduction to NLP for Norwegian text

Norwegian is slightly strange

  • Two written forms
  • Idiosyncratic capitalization rules
  • Normativish grammar
  • Semantically driven

Recommended tools

@ljos
ljos / advent_01.pl
Last active December 10, 2020 17:17
Advent of code, 2020
% 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
@ljos
ljos / advent_01.bqn
Last active December 3, 2021 13:49
adventofcode2021.bqn
p ← •BQN ¨ •file.Lines ⊑ •args
T1 ← +´1↓»⊸<
T2 ← +´˘3↕⊢
•Show T1 p
•Show T1∘T2 p