Skip to content

Instantly share code, notes, and snippets.

# “””
stuart_ratings.py — drop-in ratings module for generate-predictions.py
Replaces compute_match_ratings() and compute_xg_ratings() with the blended
methodology from Stuart’s Championship model.
## Blend formula
blended_att(team) = 0.50 * xGF/g + 0.50 * actual_GF/g
blended_def(team) = 0.50 * xGA/g + 0.50 * actual_GA/g
@scfrisby
scfrisby / Model.py
Created March 3, 2026 19:23
Model.py
# “””
stuart_ratings.py — drop-in ratings module for generate-predictions.py
Replaces compute_match_ratings() and compute_xg_ratings() with the blended
methodology from Stuart’s Championship model.
## Blend formula
blended_att(team) = 0.50 * xGF/g + 0.50 * actual_GF/g
blended_def(team) = 0.50 * xGA/g + 0.50 * actual_GA/g
# “””
stuart_ratings.py — drop-in ratings module for generate-predictions.py
Replaces compute_match_ratings() and compute_xg_ratings() with the blended
methodology from Stuart’s Championship model.
## Blend formula
blended_att(team) = 0.50 * xGF/g + 0.50 * actual_GF/g
blended_def(team) = 0.50 * xGA/g + 0.50 * actual_GA/g
@scfrisby
scfrisby / championship_sim.py
Last active March 3, 2026 13:27
Championship simulation 2025-2026
# “””
EFL Championship 2025/26 — Monte Carlo Simulation
Standalone script. No external dependencies beyond the Python standard library.
Produces:
1. League standings simulation (promotion / relegation probabilities)
1. Coventry City season goals projection
Add an extra variable to the headblock of the post like this:
hero_image: file.png
And then inside the {{entry}} blog you can reference that variable using:
{{metadata.hero_image}}
@scfrisby
scfrisby / sf_m_d
Created August 11, 2014 17:20
socialfixer_menu_deuglifier.css
#pagelet_welcome_box {
padding-top: 10px;
}
a#bfb_options_button.fbJewel {
background-image: url(/rsrc.php/v2/yZ/r/RSBchxyfpum.png);
background-repeat: no-repeat;
background-size: auto;
background-position: -37px -31px;
cursor: pointer;
@scfrisby
scfrisby / commoffit.css
Last active December 16, 2015 00:29
Hide all comments except those written by the creator of the shot
/* Show only the comments of the original author */
li.response:not(.owner) {
display: none;
}
/* Alternatively, only show the first comment */
li.response:not(:first-child) {
display: none;
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@stuartfrisby">
<meta name="twitter:url" content="{post-url}">
<meta name="twitter:title" content="{post-title}">
<meta name="twitter:description" content="{post-abstract}">
<meta name="twitter:image" content="http://mrfrisby.com/stu.png">
@scfrisby
scfrisby / gist:3230037
Created August 1, 2012 19:44
WE'LL DO IT LIVE!
alfredapp://customsearch/live/live/ascii/url=http://cl.ly/0r1b0n3b2A1a351y1v0v/cNFbw.jpg
$(document).keyup(function(e) {
var url = false;
// back arrow - previous post
if (e.which == 37) { url = $('.previous').attr('href'); }
// forward arrow - next post (unless this post is the most recent one).
else if (e.which == 39) { url = $('body:not(.latest) .next').attr('href'); }
// the 'H' key takes you to the homepage.
else if (e.which == 72) { url = '../'; }
// Go
if (url) {