Skip to content

Instantly share code, notes, and snippets.

View niklasf's full-sized avatar

Niklas Fiekas niklasf

View GitHub Profile
@niklasf
niklasf / fuzz-engine.py
Last active September 17, 2015 03:49
Fuzz testing for UCI engines
#!/usr/bin/python3
# Fuzz testing for UCI engines using python-chess.
import chess
import chess.uci
import random
import logging
import sys
random.seed(123456)
@niklasf
niklasf / check_temperature.pl
Last active August 29, 2015 14:09
Nagios plugin that checks the temperature of thermal_zone0
#!/usr/bin/perl
#
# Copyright (c) 2014 Niklas Fiekas <niklas.fiekas@tu-clausthal.de>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@niklasf
niklasf / feasible.c
Last active August 29, 2015 14:09
Compute a deterministic strategy to sustain the highest feasible discounted payoff in the battle of the sexes
#include <stdio.h>
#include <gmp.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
if (argc <= 1) {
printf("Give number of iterations as arguments!\n");
}
mpq_t husband, wife, value, delta;
#!/usr/bin/python2
import random
import math
# Model
# =====
class TicTacToeGrid(object):
def __init__(self):