Skip to content

Instantly share code, notes, and snippets.

View emkael's full-sized avatar

Michał Klichowicz emkael

View GitHub Profile
@emkael
emkael / scrape-tc-pbn.py
Created January 8, 2024 09:21
Scrape TC PBN
import json
import requests
import sys
import time
from urllib import parse
results_url = parse.urlparse(sys.argv[1])
tournament_name = results_url.path.strip('/').split('/')[-1]
scoring_group = int(sys.argv[2]) if len(sys.argv) > 2 else 1
@emkael
emkael / rozstawienie.sql
Created September 12, 2017 13:08
SQL równoważący linie turnieju na "piątkach" w JFR Pary
-- modify table to store intermediate data
ALTER TABLE zawodnicy ADD COLUMN linia INT(4);
ALTER TABLE zawodnicy ADD COLUMN los DECIMAL(6,2);
ALTER TABLE zawodnicy MODIFY COLUMN grupa INT(4);
-- first, some entropy
UPDATE zawodnicy SET los = RAND() * 10000;
-- mising pairs will be on tables #5 in the last lines, for now
-- and put in the weakest (last) group
@emkael
emkael / etckeeper-detailed-post-install.patch
Last active October 23, 2016 12:36
etckeeper-detailed-post-install.patch
diff --git a/post-install.d/50vcs-commit b/post-install.d/50vcs-commit
index 53138c8..f07ba52 100755
--- a/post-install.d/50vcs-commit
+++ b/post-install.d/50vcs-commit
@@ -3,6 +3,43 @@ set -e
pl="/var/cache/etckeeper/packagelist"
+get_changes () {
+ if [ "$VCS" = git ]; then
@emkael
emkael / 1946-1953-qualy
Created October 27, 2014 22:55
1946 - 1953 qualifying results
position,car_number,race,date,driver,country
1,18,1946 Nations Grand Prix – heat 1,1946-07-20,Jean-Pierre Wimille,France
2,20,1946 Nations Grand Prix – heat 1,1946-07-20,Achille Varzi,Italy
3,24,1946 Nations Grand Prix – heat 1,1946-07-20,Luigi Villoresi,Italy
4,4,1946 Nations Grand Prix – heat 1,1946-07-20,Reg Parnell,United Kingdom
5,2,1946 Nations Grand Prix – heat 1,1946-07-20,Prince Bira,Thailand
6,22,1946 Nations Grand Prix – heat 1,1946-07-20,Raymond Sommer,France
7,8,1946 Nations Grand Prix – heat 1,1946-07-20,George Bainbridge,United Kingdom
8,10,1946 Nations Grand Prix – heat 1,1946-07-20,Raph,France
9,16,1946 Nations Grand Prix – heat 1,1946-07-20,Eric Verkade,Netherlands