Skip to content

Instantly share code, notes, and snippets.

MareinK MareinK

  • Netherlands
Block or report user

Report or block MareinK

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@MareinK
MareinK / introai19schedule.md
Last active Nov 4, 2019
Intro AI B 2019 TA schedule
View introai19schedule.md
Date TAs
6/11 Rita, Nick, Noah, Danny
7/11 Chris, Sanne, Laurens, Marein
13/11 Rita, Nick, Noah, Danny
15/11 Chris, Sanne, Laurens, Marein
20/11 Rita, Nick, Noah, Danny
21/11 Chris, Sanne, Laurens, Marein
27/11 Rita, Nick, Noah, Danny
29/11 Chris, Sanne, Laurens, Marein
@MareinK
MareinK / firebase.py
Created Oct 28, 2019
experiments for firebase two-way data binding in python
View firebase.py
import collections
import itertools
from typing import List
import dpath
import firebase_admin.credentials
import firebase_admin.db
import abstract
View .py
def ignore_first_call(fn):
called = False
def wrapper(*args, **kwargs):
nonlocal called
if called:
return fn(*args, **kwargs)
else:
called = True
return None
return wrapper
View monadic_parsing.icl
module monadic_parsing
import Control.Applicative
import Control.Monad
import Data.Func
import Data.Functor
import qualified Data.Map
import Data.Maybe
import Data.Tuple
import StdEnv
View lockpick.py
import random
import statistics
class RandomLock:
def __init__(self, n):
self.open = False
self.buttons = set(range(n))
self._code = list(self.buttons)
random.shuffle(self._code)
@MareinK
MareinK / .py
Last active Apr 27, 2018
asof multi key monkey patch
View .py
import pandas as pd
merge = pd.core.reshape.merge
errors = pd.errors
common = pd.core.dtypes.common
def _validate_specification(self):
super(merge._AsOfMerge, self)._validate_specification()
@MareinK
MareinK / boeken.txt
Last active Apr 19, 2018
Marein geeft boeken weg
View boeken.txt
Academisch:
☐ Modern Control Systems - Richard C Dorf, Robert H Bishop
☐ Artificial Intelligence - David L Poole, Alan K Mackworth
☐ Statistiek voor de psychologie 1 t/m 4 - Jules L Ellis
☐ Problem Solving with C++ - Walter Savitch
☐ An Introduction to Brain and Behavior 3e editie - Bryan Kolb, Ian Q Whishaw
☐ An Introduction to Brain and Behavior 4e editie - Bryan Kolb, Ian Q Whishaw
☐ Evolutionary Algorithms in Theory and Practise - Thomas Bäck
☐ Logica voor informatica - JFAK van Benthem
☐ Functional Programming and Parallel Graph Rewriting - Rinus Plasmeijer
View standupmaths_rugpuzzle_2.py
import functools
import itertools
import operator
def is_shape(ps):
return all(map(connected, itertools.product(ps, repeat=2))) and not flat(ps)
def connected(ps):
View standupmaths_rugpuzzle.py
import itertools
def is_triangle(ps):
p1, p2, p3 = ps
return (connected(*p1, *p2)
and connected(*p2, *p3)
and connected(*p3, *p1)
and not flat(*p1, *p2, *p3))
View advent17_7b.py
import collections
import re
Entry = collections.namedtuple('Entry', ['name', 'weight', 'children'])
pattern = re.compile('(\w*) \((\w*)\)(?: -> (.*))?')
groups = [pattern.match(line).groups() for line in open('7.txt').readlines()]
entries = [Entry(n, int(w), c.split(', ') if c else []) for n, w, c in groups]
programs = dict()
You can’t perform that action at this time.