Skip to content

Instantly share code, notes, and snippets.

View N-McA's full-sized avatar

N-McA

View GitHub Profile
@N-McA
N-McA / install-hooks.py
Created February 1, 2019 15:55
Install git hooks
#!/usr/bin/env python3
import subprocess
import shlex
import os
from pathlib import Path
def chdir_to_script_location():
abspath = os.path.abspath(__file__)
@N-McA
N-McA / mcmc_ranking.py
Created October 24, 2021 10:47
Main Code for "Features in Trueskill"
import numpy as np
import theano.tensor as T
import pymc3 as pm
from utils import add_params_property
import ranking
from ranking import tennis_data, MPTrueSkill1V1NoDrawRanker
import collections
import dataclasses
import itertools
import typing as tp
from functools import partial
import numpy as np
from scipy.optimize import minimize
DEFAULT_CI_SIZE = 0.95