Skip to content

Instantly share code, notes, and snippets.

View niklasf's full-sized avatar

Niklas Fiekas niklasf

View GitHub Profile
@niklasf
niklasf / bench-parallel.sh
Created April 6, 2018 10:42 — forked from ianfab/bench-parallel.sh
bench script
#!/bin/bash
if [[ $# -ne 3 ]]; then
echo "usage:" $0 "base test n_runs"
echo "example:" $0 "./stockfish_base ./stockfish_test 10"
exit 1
fi
base=$1
test=$2
n_runs=$3
@niklasf
niklasf / asyncio-private-loop.py
Last active September 23, 2019 19:36
A ChildWatcher that does not require the asyncio loop to be running in the main thread
#!/usr/bin/python
import asyncio
import os
import sys
import threading
import time
import warnings
@niklasf
niklasf / .gitignore
Last active September 22, 2020 15:16
Sierpinski triangle generator
/target
type Square = number;
type Piece = 'p' | 'n' | 'b' | 'r' | 'q' | 'k' |
'P' | 'N' | 'B' | 'R' | 'Q' | 'K';
interface Board {
turn: boolean;
fmvn: number;
pieces: {
[s: number]: Piece