Skip to content

Instantly share code, notes, and snippets.

View alecbz's full-sized avatar

Alec Benzer alecbz

View GitHub Profile
#!/bin/bash
set -u
git fetch --all --quiet
for b in $(git for-each-ref refs/heads --format="%(refname:short)"); do
if [[ ! $(git cherry -v origin/master $b | grep "^+") ]]; then
git branch -D $b
elif git diff --exit-code --quiet "origin/master...${b}"; then
git branch -D $b
fi
/* rendered css */
.info { background-color: #eff4ff; padding: 25px; }
.info:before { content: "\f05a"; padding-right: 10px; }
.info:before { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; display: inline-block; font-style: normal; font-variant: normal; font-weight: normal; line-height: 1; }
.info:before { font-family: 'Font Awesome 5 Free'; font-weight: 900; }
# https://www.reddit.com/r/askmath/comments/kic0id/uneven_probabilities/
from collections import defaultdict
from functools import lru_cache
import math
import matplotlib.pyplot as plt
from pytablewriter import MarkdownTableWriter
PROB = {