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 python3 | |
import argparse | |
import pathlib | |
import numpy as np | |
from PIL import Image | |
bayer2x2 = 1/4 * np.array([ | |
[0, 2], |
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
PROJECT=main | |
build/${PROJECT}.pdf: build/${PROJECT}.bbl | |
lualatex --output-directory=build ${PROJECT} | |
build/${PROJECT}.bbl: build/${PROJECT}.bcf | |
biber build/${PROJECT} | |
build/${PROJECT}.bcf: ${PROJECT}.tex | |
lualatex --output-directory=build ${PROJECT} |
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
" .vimrc | |
" | |
" Kevin Dungs <kevin@dun.gs> | |
" 2016-07-16 | |
filetype plugin on | |
set enc=utf-8 | |
" Defaults |
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
#pragma once | |
#include <string> | |
#include <utility> | |
struct Constant { | |
double value; | |
}; | |
double eval(const Constant& c) { return c.value; } |
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
""" Define a Check monad and corresponding functions. | |
""" | |
from functools import partial | |
class Check: | |
""" This super class is not really necessary but helps make the structure | |
clear. | |
data Check a = Pass a | Fail Message |
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 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from scipy.stats import linregress | |
# Set nice options for plots and use of LaTeX. | |
from matplotlib import rc | |
rc('text', usetex=True) | |
rc('font', family='serif') |
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
--[[ | |
Name: | |
Author: | |
Version: | |
Description: | |
]]-- | |
--[[ | |
This event is called, at the beginning of the round. The current map is | |
passed to it, so you can analize it, get it ready for pathfinding and search |
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
var Robot = function(robot) { | |
}; | |
var found = false; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
if (!found) { | |
robot.rotateCannon(1); | |
robot.ahead(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
P = test_gsl | |
OBJECTS = test_gsl.c | |
CFLAGS = -g -Werror -O3 -std=gnu11 `pkg-config --cflags gsl` | |
LDLIBS = `pkg-config --libs gsl` | |
CC = gcc-mp-4.7 | |
$(P): $(OBJECTS) | |
clean: | |
rm $(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
#!/usr/bin/env python | |
# coding=utf-8 | |
from __future__ import division | |
import itertools as it | |
import random as r | |
from sys import argv | |
def play_round(switch_choice=True): |
NewerOlder