This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TARGET = program | |
CXXFLAGS += -g -std=c++11 | |
.PHONY: default all clean | |
default: $(TARGET) | |
all: default | |
SOURCES = $(wildcard **/*.cpp) $(wildcard *.cpp) | |
OBJECTS = $(patsubst %.cpp, %.o, $(SOURCES)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Test case for a bug in networkx.algorithms.maximal_matching version 1.8.1 | |
It seems that depending on the order of the nodes in the edges ( (a,b) vs (b,a) ) | |
maximal_matching does return different results. | |
""" | |
import networkx as nx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Epidemiologie | |
> Epidemionlogie befasst sich mit der Untersuchung der Verteulung von Krankheiten und deren Einflussfakturen in menschlichen Bevölkerungsgruppen und deren Umsetzung zur Kontrole des Gesundheitswesens | |
##Klassische Epidemiologie | |
* Risikofaktoren im Zusammenhang mit dem gehäuften Auftreten einer Krankheit mit Hilfe einer gezielten Untersuchung | |
* Anlässe | |
* geographische Unterschiede | |
* Auftreten von Clustern (meistens nur bei relativ seltenen Erkrankungen) | |
* zeitliche Veränderungen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This will the fixup command to git | |
#git fixup $commit will use your current index to fixup the specified commit | |
#This is done by doing git commit --fixup $commit and then using rebase with autosquash | |
#Based upon http://stackoverflow.com/a/21148981/460564 | |
[alias] | |
fixup = "!sh -c '(git diff-files --quiet || (echo Unstaged changes, please commit or stash with --keep-index; exit 1)) && COMMIT=$(git rev-parse $1) && git commit --fixup=$COMMIT && git rebase -i --autosquash $COMMIT~1' -" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int | |
dtls1_process_heartbeat(SSL *s) | |
{ | |
unsigned char *p = &s->s3->rrec.data[0], *pl; | |
unsigned short hbtype; | |
unsigned int payload; | |
unsigned int padding = 16; /* Use minimum padding */ | |
/* Read type and payload length first */ | |
hbtype = *p++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Compile with gcc, because clang does not support alignment of stack values (and does not even warn about that). | |
g++-mp-4.8 -march=native -mtune=native -std=c++11 benchmark.cpp -O3 -o benchmark | |
Results on my computer: | |
naive: 22.6027 (1) | |
hadd: 10.0168 (0.443169) | |
hadd_2: 9.88255 (0.437228) | |
movemask: 9.85698 (0.436097) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
import fnmatch | |
from itertools import chain | |
from inspect import getframeinfo, stack | |
import math | |
from collections import OrderedDict | |
import pygit2 as git | |
import cairocffi as cairo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdint> | |
#ifdef MAKE_IT_WORK | |
#undef _GLIBCXX_USE_CLOCK_MONOTONIC //if this is undefined, the 'correct' clock will be used | |
#endif | |
#include <mutex> | |
extern "C" { | |
using mutex = std::recursive_timed_mutex; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <limits> | |
#include <functional> | |
#include <chrono> | |
using namespace std; | |
#define likely(x) __builtin_expect (!!(x), 1) | |
#define unlikely(x) __builtin_expect (!!(x), 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#Replay commits from submodule in main git repository | |
#For each commit in the submodule in range, create a commit in the | |
#main repository that adds the commit of the submodule with the same | |
#commit message as the submodule | |
SUBMODULE=$1 | |
RANGE=$2 |
OlderNewer