Skip to content

Instantly share code, notes, and snippets.

@ussserrr
ussserrr / homebrew-search-orphaned-packages.sh
Last active January 9, 2021 16:49
List installed Homebrew packages that are not being dependencies of any other
#!/bin/sh
echo "Orphaned packages:\n"
for BREW_PKG in $(brew list --formula -1)
do
BREW_USES_PKG=$(brew uses $BREW_PKG --installed --recursive)
if [ -z "$BREW_USES_PKG" ]
then
echo "$BREW_PKG"
@ussserrr
ussserrr / 24.py
Created January 31, 2019 20:59
Simple example of how to use matplotlib animation to visualize 24 real-time channels simultaneously
import matplotlib.pyplot as plt, matplotlib.animation as animation, numpy as np
# use oscilloscope-like style and hide matplotlib toolbar for more space
from matplotlib import rcParams
plt.style.use('dark_background'); rcParams['toolbar']='None'
N_ROWS = 12; N_COLS = 2
N_POINTS = 250 # number of points in each line
interval = 50 # in ms, interval of updating plots for FuncAnimation
N_XTICKLABELS = 10