Skip to content

Instantly share code, notes, and snippets.

View christinebuckler's full-sized avatar

Christine christinebuckler

View GitHub Profile
@dontlaugh
dontlaugh / runbook.md
Created August 26, 2020 20:32
What's a runbook?

What's a Runbook?

A runbook is a precise list of steps for doing routine tasks, or debugging a system.

Good candidates for runbooks:

  • procedures with a relatively precise begin state and end state
  • lists of commands for launching a kubernetes cluster
  • lists of commands for tearing down a kubernetes cluster
  • links to dashboards for troubleshooting problems with a particular system,
@AustinRochford
AustinRochford / hmc-oss-pymc3-odsc-west-2018.ipynb
Last active October 16, 2019 08:40
The HMC Revolution is Open Source - Probabilistic Programming with PyMC3
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bshishov
bshishov / forecasting_metrics.py
Last active April 20, 2024 04:29
Python Numpy functions for most common forecasting metrics
import numpy as np
EPSILON = 1e-10
def _error(actual: np.ndarray, predicted: np.ndarray):
""" Simple error """
return actual - predicted
@cheevahagadog
cheevahagadog / extract_feature_effect_per_prediction.py
Last active November 17, 2020 05:36
Builds off the SHAP package to list out the feature effects per row on an XGBoost model.
#!/usr/bin/env python
# Python 3.6.4
import numpy as np
import pandas as pd
import iml
import xgboost
import shap
from tqdm import tqdm
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active July 16, 2024 09:07
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@schnell18
schnell18 / macosx_remove_java9.sh
Created October 8, 2016 13:26
MacOS X remove Java 9
sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
@amyghotra
amyghotra / pygame_snow2.py
Last active December 20, 2018 17:19
Using python, create continuously falling snow.
import pygame
import random
# Define some colors
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
GREEN = (0, 255, 0)
RED = (255, 0, 0)
BLUE = (0, 0, 255)
@karpathy
karpathy / min-char-rnn.py
Last active July 12, 2024 06:09
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@jlln
jlln / separator.py
Last active November 9, 2023 19:59
Efficiently split Pandas Dataframe cells containing lists into multiple rows, duplicating the other column's values.
def splitDataFrameList(df,target_column,separator):
''' df = dataframe to split,
target_column = the column containing the values to split
separator = the symbol used to perform the split
returns: a dataframe with each entry for the target column separated, with each element moved into a new row.
The values in the other columns are duplicated across the newly divided rows.
'''
def splitListToRows(row,row_accumulator,target_column,separator):
split_row = row[target_column].split(separator)