Skip to content

Instantly share code, notes, and snippets.

import numpy as np
import scipy.stats as stats
from matplotlib import pyplot as plt
class BetaThompson:
def __init__(self, num_bandits, prior_a, prior_b):
self.num_bandits = num_bandits
self.a = prior_a
self.b = prior_b
@vasanthk
vasanthk / System Design.md
Last active May 16, 2024 20:21
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@andrie
andrie / repr options.R
Created September 25, 2015 15:16
Changing plot size in Jupyter IRkernel
library(repr)
# Change plot size to 4 x 3
options(repr.plot.width=4, repr.plot.height=3)
curve(sin(x), from = 0, to=2*pi, n = 100)
# Change plot size to 8 x 3
options(repr.plot.width=8, repr.plot.height=3)
curve(sin(x), from = 0, to=4*pi, n = 200)