Skip to content

Instantly share code, notes, and snippets.

View ddugovic's full-sized avatar
💭
I may be slow to respond.

Daniel Dugovic ddugovic

💭
I may be slow to respond.
View GitHub Profile

Lichess games CSV export

This is a direct export from lichess database. Some fields are binary encoded.

Head

_id,so,s,v,if,us,p0.ai,p0.e,p1.ai,p1.e,c,mt,w,an,ra,pg,ca
"04tbfylw",1,33,,,"[ ""miroslavm970"", ""redlightning530"" ]",,1480,,1072,0500000884000B930000000000,4665B5,true,,true,23242B55806A801C6140,2013-11-14T07:59:10.945Z
@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 / atomic.md5sums
Last active November 16, 2016 15:29
MD5SUMS of 5 piece atomic syzygy tables
5f09f78f986d440d5fda3cd28b335eb3 KBBBvK.atbw
30405c5366213d43f4acf68b10c5ca58 KBBBvK.atbz
8314a33d3042c8ab76ca365d492c7fd2 KBBNvK.atbw
996aa9ef24cadf6342e15212b8ca91a1 KBBNvK.atbz
2087b9823af4ca34e0f1692b917650e5 KBBPvK.atbw
19b934721c02787d50b471ef44e99bd7 KBBPvK.atbz
0b12a60dcd347e5db4dcb3a19a351b1f KBBvK.atbw
2cdbcd87dbd5a2e069b121d08eb68138 KBBvK.atbz
6d57f8073f620c5a4c0e33ecda89e79a KBBvKB.atbw
a382621f6953995d3948b5f45d5cf7bb KBBvKB.atbz
@WOnder93
WOnder93 / check_benches.sh
Last active March 29, 2018 12:37
Stockfish - scripts for automated bench comparison
#!/bin/bash
if [ $# -eq 0 ]; then
echo "usage: [SYZYGY_PATH='...'] [BENCH_ARGS='...'] $0 COMMIT..."
echo
echo " Prints bench for each COMMIT. Output is stored in 'bench-COMMIT.log'."
echo
echo " Command-line arguments:"
echo " COMMIT... list of commits to check"
echo
@mathieuancelin
mathieuancelin / GoodOldPlayframework.scala
Last active April 28, 2019 19:06
A really dirty way to use Playframework without Guice
package old.play
import java.sql.Connection
import java.util.concurrent.atomic.{AtomicInteger, AtomicReference}
import java.util.concurrent.{Executors, ThreadFactory}
import akka.actor.{ActorSystem, Scheduler}
import akka.stream.Materializer
import play.api.ApplicationLoader.Context
import play.api.Mode.Mode
<html>
<head>
<style>
body {
font-family: 'Noto Sans';
overflow: hidden;
}
input {
width: 100%;
}
@niklasf
niklasf / bratko-kopec.py
Last active February 24, 2020 15:37
An implementation of the Bratko-Kopec Test using python-chess
#!/usr/bin/python
import chess
import chess.uci
import sys
import time
MOVETIME = 120.0
@beefy
beefy / chess_scrape.py
Last active December 29, 2020 03:56
Scrapes all live chess game PGNs from chess.com and concatenates the resulting files
#!/usr/bin/python
import spynner
import pyquery
import urllib
import os
# author: Nate Schultz
# contact: github.com/beefy
# created: 10/22/16
@ornicar
ornicar / lichess.proxy.conf
Last active July 16, 2021 07:08
Set up a lichess proxy to bypass firewalls and play chess at school/work
# /etc/nginx/sites-enabled/lichess.proxy.conf
# Replace "lichess.scalex.org" by your own domain.
# Note: This only works for the "en" subdomain.
server {
listen 80;
server_name socket.en.lichess.scalex.org;
location / {
proxy_set_header Host socket.en.lichess.org;
proxy_http_version 1.1;
@ornicar
ornicar / How to ask technical questions.md
Last active October 1, 2021 13:08
How to ask technical questions

How to ask technical questions

Doing it right will save everyone a lot of time, and will motivate others to help you.

  1. Try to find the answer by yourself, using documentation and search engines

If you can't find the answer, here's how to ask other people. Following these steps is the best way to quickly get quality answers.