Skip to content

Instantly share code, notes, and snippets.

View comckay's full-sized avatar

Connor McKay comckay

  • Pluralsight
  • Boston, MA
View GitHub Profile
@comckay
comckay / linucb.py
Last active September 28, 2021 13:40
from typing import List
import numpy as np
class LinUCB:
def __init__(self, models: List[str], n_features: int, alpha: float):
self.models, self.n_models = models, len(models)
self.alpha = alpha
@comckay
comckay / ucb.py
Last active September 28, 2021 13:43
from typing import List
import numpy as np
class UCB1:
def __init__(self, models: List[str]):
self.models, n_models = models, len(models)
self.model_successes = np.zeros((n_models))
from typing import List
import random
import numpy as np
class EGreedy:
def __init__(self, models: List[str], epsilon: float = 0.1):
self.models, n_models = models, len(models)
@comckay
comckay / giratchive.sh
Created March 2, 2016 20:52 — forked from markrickert/giratchive.sh
Git Archive Bash Script
#!/bin/bash
# Takes one parameter: a remote git repository URL.
#
# This is the stuff this script does:
#
# 1. Clones the repository
# 2. Fetches all remote branches
# 3. Compresses the folder
# 4. Deletes the cloned folder.