Skip to content

Instantly share code, notes, and snippets.

View timothyha's full-sized avatar
🤠
Mostly work projects, not my own at the moment

Timothy Ha timothyha

🤠
Mostly work projects, not my own at the moment
View GitHub Profile
@timothyha
timothyha / junior_parser.py
Last active May 8, 2022 19:34
NZCF junior rating list
from datetime import date
current_year = date.today().year
players = dict()
def readlist(timecontrol):
curplayer = ""
for line in lines:
field = 0
@timothyha
timothyha / fide_rating_breakdown.sh
Last active January 2, 2018 02:29
FIDE rating list breakdown
# download ratings in TXT format at https://ratings.fide.com/download.phtml and unzip
# wget http://ratings.fide.com/download/standard_rating_list.zip
# unzip standard_rating_list.zip
# less than 1200
cat standard_rating_list.txt | grep -v "FOA" | awk 'BEGIN{C=0;R=1200}{X=substr($0,114,4);if(X<R)C=C+1}END{S=R+99;print "0000-1199 "C}';
# from 1200 to 2900, go by groups of 100
RATING=1200