Skip to content

Instantly share code, notes, and snippets.

View shandou's full-sized avatar

Shan Dou shandou

  • Vancouver, Canada
View GitHub Profile
@shandou
shandou / wix_code_snippet.html
Created February 23, 2020 13:50
Snippet for adding code snippet to Wix blog
<!-- CSS style sheets for Prism.js -->
<link
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.19.0/themes/prism.min.css"
rel="stylesheet"
/>
<link
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.19.0/plugins/line-numbers/prism-line-numbers.min.css"
rel="stylesheet"
/>
<!-- Code snippet content -->
from sklearn.metrics import roc_curve, roc_auc_score, auc
from scipy import stats
import matplotlib.pyplot as plt
# %matplotlib inline
def plot_roc_curve(y, y_pred, gini, ks):
fpr, tpr, thresholds = roc_curve(y, y_pred)
roc_auc = auc(fpr, tpr)
fig = plt.figure()
@shandou
shandou / System Design.md
Created May 25, 2022 05:40 — forked from vasanthk/System Design.md
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?