Skip to content

Instantly share code, notes, and snippets.

View mok0's full-sized avatar

Morten Kjeldgaard mok0

  • Samsø, Denmark
View GitHub Profile
# Example of state pattern by code EV
# https://youtu.be/8rynRTOr4mE
class State:
def receive_payment(self):
raise NotImplementedError()
def ship(self):
raise NotImplementedError()
@mok0
mok0 / ordliste-5-bogstaver.txt
Created April 15, 2022 09:24
Dansk ordliste 5 bogstaver
afbud
afsky
aften
aftog
agere
agter
agtig
agurk
ajour
akter
@mok0
mok0 / vikingebøf.md
Created March 3, 2022 09:32
Vikingbøf

4 personer

Opskriften stammer fra Viking Bøfhus fra en gang i 60′erne. Min onkel Peter Hilligsøe var tilsyneladende en så god kunde at han fik opskriften (Deres livsgrundlag).

  • 2-3 svinemørbrad (ca 1 kg)
  • 125 g margarine (evt. lidt mindre)

Sauce:

  • ½ l piskefløde
@mok0
mok0 / system.sources
Created December 26, 2021 12:40
Ubuntu /etc/apt/sources.list.d/system.sources file. Replace "focal" with whatever release you are using.
X-Repolib-Name: Ubuntu System Sources
Enabled: yes
Types: deb deb-src
URIs: http://archive.ubuntu.com/ubuntu/
Suites: focal focal-security focal-updates focal-backports
Components: main restricted universe multiverse
X-Repolib-Default-Mirror: http://archive.ubuntu.com/ubuntu/
@mok0
mok0 / sources.list
Created December 26, 2021 10:04
sources.list file for Ubuntu
# Replace DISTRIBUTION with the code name of the desired distribution, e.g. hirsute
deb http://archive.ubuntu.com/ubuntu DISTRIBUTION main restricted
deb http://archive.ubuntu.com/ubuntu DISTRIBUTION-updates main restricted
deb http://archive.ubuntu.com/ubuntu DISTRIBUTION universe
deb http://archive.ubuntu.com/ubuntu DISTRIBUTION-updates universe
deb http://archive.ubuntu.com/ubuntu DISTRIBUTION multiverse
deb http://archive.ubuntu.com/ubuntu DISTRIBUTION-updates multiverse
deb http://archive.ubuntu.com/ubuntu DISTRIBUTION-security main restricted
deb http://archive.ubuntu.com/ubuntu DISTRIBUTION-security universe
deb http://archive.ubuntu.com/ubuntu DISTRIBUTION-security multiverse
## Infrastructure notes ########################################################
# I am running this in docker image rocker/tidyverse:3.6.1
# Load packages
library(tidyverse)
library(EpiEstim)
## Fetch data from the covid19data API #########################################
url <- "https://api.covid19data.dk/ssi_newly_hospitalized"
# -*- coding: utf-8 -*-
# pylint: disable=C0326
# ISO-3166 alpha2, alpha3 and numerical codes ("nisos"). Negative
# nisos are not defined officially, here they are used to create
# compatibility with SB statistics, which includes now defunct
# countries. The ISO definition is used whenever possible.
iso3166 = {
@mok0
mok0 / sst_scrape.py
Created March 12, 2020 19:58
Scrape the website of Danish Health Services SST to obtain their daily updated statistics about the covid19 epidemic.
#! /usr/bin/env python3
# Scrape the website of Danish Health Services SST to obtain their
# daily updated statistics about the covid19 epidemic. The function
# `scrape` returns a dict with data from Denmark, Faeroe Islands,
# global and EU+EAA+UK. It looks like this (2020-03-12):
#
#{'Danmark': (3038, 674, 0),
# 'Færøerne': (92, 2, 0),
# 'Globalt': (None, 125518, 4617),
@mok0
mok0 / rendog-lets-play.md
Created September 12, 2019 12:49
Short list of Rendog's Let's Play Videos

Rendogs Minecraft Survival Vanilla 1.12 Lets Play

Welcome, Youtube Minecraft viewer, to my little corner of Planet Minecraft! This is my brand new long term Minecraft Survival Series, and I am very pleased that you have taken time out of your life to watch!

In this Minecraft Youtube Series we focus on the best things about this amazing PC game – Minecraft building and Minecraft adventures!

@mok0
mok0 / arbejdstid.csv
Last active May 12, 2019 09:32
Weekly work hours per day in Denmark vs. year.
1900 60
1915 56
1919 50.5
1920 48
1958 47
1959 46
1960 45
1966 44
1967 42.5
1971 41.75