Skip to content

Instantly share code, notes, and snippets.

View mxm's full-sized avatar

Maximilian Michels mxm

View GitHub Profile
@mxm
mxm / heaps.erl
Created April 24, 2014 21:01 — forked from larsmans/heaps.erl
% Copyright (c) 2010-2014, Lars Buitinck
% May be used, redistributed and modified under the terms of the
% GNU Lesser General Public License (LGPL), version 2.1 or later
% Heaps/priority queues in Erlang
% Heaps are data structures that return the entries inserted into them in
% sorted order. This makes them the data structure of choice for implementing
% priority queues, a central element of algorithms such as best-first/A*
% search and Kruskal's minimum-spanning-tree algorithm.
@mxm
mxm / burgerbot.rb
Created October 7, 2015 12:41 — forked from daxadax/burgerbot.rb
burgerbot
#!/usr/bin/env ruby
# modified from https://gist.github.com/pbock/3ab260f3862c350e6b5f #
require 'watir-webdriver'
class BurgerBot
def initialize
@attempt_count = 0
@mxm
mxm / MultiSourceWindowCoGroupTest.java
Last active November 23, 2016 14:40 — forked from saarw/MultiSourceWindowCoGroupTest.java
MultiSourceWindowCoGroupTest
import com.google.common.annotations.VisibleForTesting;
import org.apache.flink.api.common.functions.CoGroupFunction;
import org.apache.flink.api.common.functions.MapFunction;
import org.apache.flink.api.common.functions.ReduceFunction;
import org.apache.flink.api.common.state.ReducingState;
import org.apache.flink.api.common.state.ReducingStateDescriptor;
import org.apache.flink.api.common.typeutils.base.LongSerializer;
import org.apache.flink.api.java.functions.KeySelector;
import org.apache.flink.api.java.tuple.Tuple;
import org.apache.flink.api.java.tuple.Tuple2;
@mxm
mxm / gist for elias
Last active October 3, 2017 08:16 — forked from turbo-ele/gist for max
Crazy POSIX-compliant magic for passing space-containing arguments to exec
#!/bin/sh
# OPTIONS:
# -d: start the daemon in the background
# -p <filename>: log the pid to a file (useful to kill it later)
# -v: print crate version to stdout
# -h: print usage information
# -D: set a java system property value
# -C: set a Crate property value
# -X: set a nonstandard java option