Skip to content

Instantly share code, notes, and snippets.

@freininghaus
freininghaus / linkerd-first-steps.ipynb
Created September 9, 2019 10:38
First steps with Linkerd 2.0
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import unittest
import itertools
class Expression:
"""Expressions in algebraic normal form consist of terms which are combined with XOR, where each term is a
combination of variables which are ANDed together, see
https://en.wikipedia.org/wiki/Algebraic_normal_form
@freininghaus
freininghaus / groupby.cpp
Created November 29, 2016 22:47
Simple groupBy example in C++
#include <boost/iterator/iterator_facade.hpp>
#include <boost/range/iterator_range.hpp>
#include <iostream>
#include <vector>
template <typename Iterator, typename Key>
class GroupedRange
{
public:
@freininghaus
freininghaus / overlap.h
Last active September 7, 2016 06:18
Make a number of bitsets non-overlapping
#ifndef OVERLAP_H
#define OVERLAP_H
#include <bitset>
#include <unordered_set>
#include <vector>
using Bitset = std::bitset<64>;
using Iterator = std::vector<Bitset>::iterator;