{{ message }}

Instantly share code, notes, and snippets.

# GloriaVictis

Created Dec 20, 2015
Calculation for the Chess SE question: http://chess.stackexchange.com/questions/8561/top-player-with-the-lowest-drawing-rate
View draw_rates.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 #!/usr/bin/python from __future__ import division from collections import Counter import pgn import operator import os from matplotlib import pyplot as plt from matplotlib import rcParams rcParams.update({'figure.autolayout': True}) import numpy as np
Created Dec 20, 2015
Calculation for the Chess SE question: http://chess.stackexchange.com/questions/13137/whats-the-average-piece-density
View piece_densities.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 #!/usr/bin/python import pgn import numpy as np from matplotlib import pyplot as plt import sys initial_piece_density = 0.5 decrease_per_capture = 0.015625 pgn_file = open(sys.argv[1], 'r')
Last active Aug 11, 2021
Calculatation for the Chess SE question: http://chess.stackexchange.com/questions/9891/what-is-the-average-age-to-become-a-grandmaster
View chess.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 import urllib.parse import urllib.request import re import json import numpy as np import matplotlib.pyplot as plt from collections import Counter page = "List_of_chess_grandmasters"