View keybase.md

Keybase proof

I hereby claim:

  • I am Rembane on github.
  • I am eqroot (https://keybase.io/eqroot) on keybase.
  • I have a public key whose fingerprint is A05D 2DCD 038E 751E B1A1 DDDD 88AA 23B7 AEA5 8DCE

To claim this, I am signing this object:

View klapasnelhest.py
from collections import Counter
from operator import itemgetter
# Javascript för att hämta data från val.sverok.se.
# Array.from(document.querySelectorAll('#content > div > table > tbody > tr td:nth-child(4)')).map(x => x.textContent).join(', ')
# Resulterande data.
orter = "Skövde , Helsingborg  , Trollhättan , Ålberga , Upplands Väsby , Lövestad ,  , Göteborg , Nybro , Göteborg ,  ,  , Norrköping , Malmö ,  ,  , Hagfors ,  , Kalmar ,  , Kristinehamn  , Linköping , Göteborg  , Lindome , Krokom ,  ,  , Jönköping ,  ,  ,  , Göteborg , Lund , Göteborg ,  ,  , Göteborg , Malmö , Karlstad , Göteborg ,  ,  , Lund , Norrköping , Norrköping , Malmö , Jonkoping ,  , Malmö ,  ,  , Göteborg , Burträsk , Västervik , Visby , Sävar , Lund , Staffanstorp , Västerås , Göteborg ,  , Limhamn , Göteborg , Linköping ,  ,  ,  , Huskvarna  , Eskilstuna , Norrköping , Karlskrona , Linköping , Tyringe , Luleå , Göteborg , Farsta ,  , Stockholm ,  , UMEÅ , Ålberga , Lund ,  , Skövde ,  ,  , Genarp ,  , Malmö ,  , Rydsgård , Karlsh
View NiceHaskell.hs
runRandom :: State StdGen a -> IO a
runRandom x = do
g <- newStdGen
return $ evalState x g
View cosplaying_ints.c
#include <stdio.h>
int main() {
int x = 42;
int *p = &x;
printf("Value of the cosplayer: %d", p);
}
View get_and_group_photos.py
#!/usr/bin/env python3
import os
import os.path
import re
import subprocess
currdir = os.path.dirname(os.path.realpath(__file__))
picpattern = re.compile(r'(jpg|cr2)$', flags=re.IGNORECASE)
datepattern = re.compile(r'(\d{4}):(\d{2}):(\d{2})')
View FizzBuzz4.hs
module Main where
continue :: ([a] -> [b]) -> [a] -> [b]
continue _ [] = []
continue f (x:xs) = f (x:xs)
f1, f2, f3, b1, b2, b3, b4, b5 :: [Int] -> [(Bool, String)]
f1 (x:xs) = (False, show x):continue f2 xs
f2 (x:xs) = (False, show x):continue f3 xs
View msgorder.erl
-module(msgorder).
-compile(export_all).
% How to get messages in correct order, even though things outside of our
% control try to put them in a semi-random order.
f(T, X) ->
Parent = self(),
Ref = make_ref(),
spawn_link(fun() -> timer:send_after(T, Parent, {Ref, {T, X}}) end),
View threading_bla.py
import sys
from time import sleep
from threading import Thread
def communicator():
print('This does not print')
sys.stdout.flush()
while(True):
#frame.evaluateJavaScript('document.getElementById("footer").appendChild(document.createTextNode("Hejjibejj"));')
#fr.evaluateJavaScript('alert("Yo");')
View FizzBuzz3.hs
import Data.Maybe
mrd n x | mod n x == 0 = Just n
| otherwise = Nothing
lp = map (\n -> head . catMaybes $ zipWith (\f v -> v >> return f) ["FizzBuzz", "Fizz", "Buzz", show n] (map (mrd n) [15, 3, 5, 1])) [1..]
main :: IO ()
main = putStr $ unlines $ take 100 lp
View ssnLab.hs
import Data.Char
import Data.List
type Personnummer = [Int]
mod10 x = mod x 10
cleanAndConvert :: String -> Maybe Personnummer
cleanAndConvert cs = return $ map digitToInt $ filter isDigit cs