Skip to content

Instantly share code, notes, and snippets.

Niklas Fiekas niklasf

Block or report user

Report or block niklasf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View spanish-corrections.patch
--- a/masters.pgn 2016-02-08 16:00:16.000000000 +0100
+++ b/masters.pgn 2016-02-16 16:34:55.645514341 +0100
@@ -39522220,21 +39522220,21 @@
[WhiteElo "2591"]
[BlackElo "2327"]
[PlyCount "93"]
[EventDate "2010.11.13"]
[EventType "swiss"]
[EventRounds "9"]
[EventCountry "CHN"]
niklasf /
Created Jan 3, 2016
Compress and decompress chess games using huffman encoding
import bitarray
import chess
import chess.pgn
import sys
import pickle
import textwrap
def base_counts():
counts = {}
niklasf /
Last active Sep 17, 2015
Fuzz testing for UCI engines
# Fuzz testing for UCI engines using python-chess.
import chess
import chess.uci
import random
import logging
import sys
niklasf /
Last active Oct 18, 2019
An implementation of the Bratko-Kopec Test using python-chess
import chess
import chess.uci
import sys
import time
MOVETIME = 120.0
niklasf /
Last active Aug 29, 2015
Nagios plugin that checks the temperature of thermal_zone0
# Copyright (c) 2014 Niklas Fiekas <>
# 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 / feasible.c
Last active Aug 29, 2015
Compute a deterministic strategy to sustain the highest feasible discounted payoff in the battle of the sexes
View feasible.c
#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;
import random
import math
# Model
# =====
class TicTacToeGrid(object):
def __init__(self):
# Ausführen um Raspbian (oder ein anderes Debian) zu einem Anzeiger für IServ
# zu konfigurieren.
# Superuser Rechte holen.
if [ $(id -u) -ne 0 ]; then
echo Superuser Rechte nötig.
exit 1
View calculator.c
#include <avr/io.h>
void USART_Init( unsigned int ubrr){
/* Set baud rate */
UBRR1H = (unsigned char)(ubrr>>8);
UBRR1L = (unsigned char)ubrr;
/* Enable receiver and transmitter */
UCSR1B = (1<<RXEN1)|(1<<TXEN1);
/* Set frame format: 8data, 2stop bit */
UCSR1C = (1<<USBS1)|(1<<UCSZ11)|(1<<UCSZ10);
View timer.c
#include <avr/io.h>
#include <avr/interrupt.h>
#include <stdio.h>
#include <stdlib.h>
#define C2
#define DDR_SPI DDRB
#define DD_MOSI DDB2
You can’t perform that action at this time.