Skip to content

Instantly share code, notes, and snippets.

View brianspiering's full-sized avatar

Brian Spiering brianspiering

  • San Francisco, CA, USA
View GitHub Profile
@brianspiering
brianspiering / bst.py
Last active March 7, 2018 05:20
Binary Search Tree (with tests)
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""A demonstration implementation of a Binary Search Tree (BST)
"""
class Node:
"""Base Binary Tree Data Structure"""
def __init__(self, data=None, left=None, right=None):
self.data = data
self.left = left
@brianspiering
brianspiering / cleanup_git_history.sh
Last active September 18, 2024 00:19
Remove big files from git history (Data Scientists are silly)
# Remove data from git history
git clone --mirror https://github.com/brianspiering/intro_course_data_science_for_good-1.git
cd intro_course_data_science_for_good-1.git/
# What are we dealing with?
git count-objects -vH
# Use a silver bullet
# https://github.com/rtyley/bfg-repo-cleaner
bfg --delete-files *.csv
@brianspiering
brianspiering / quilt_for_text_data_.py
Last active June 3, 2018 18:59
Quilt to manage text data
import os
# Put text data into folder. In this case it is shakespeare/shakespeare.txt
# Build
os.system('quilt build BrianSpering/shakespeare shakespeare')
# Push
os.system('quilt push BrianSpering/shakespeare --public')
@brianspiering
brianspiering / mathematical_gotchas_in_python.ipynb
Last active June 21, 2018 19:11
Python's Mathematical Gotchas
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@brianspiering
brianspiering / brewfile
Last active September 13, 2019 21:21
homebrew backup, including brew, cask, mac
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-fonts"
tap "homebrew/cask-versions"
tap "homebrew/core"
brew "ammonite-repl"
brew "openssl"
brew "awscli"
brew "bash"
brew "bash-completion"
@brianspiering
brianspiering / unicode_symbols_for_greek_and_math.md
Last active September 8, 2021 13:22
Unicode for Greek letters and common Mathematical symbols

Greek Letters

Α α Alpha
Β β Beta
Γ γ Gamma
Δ δ Delta
Ε ε Epsilon
Ζ ζ Zeta
Η η Eta

@brianspiering
brianspiering / compare_classifiers_on_noisy_data.ipynb
Last active November 16, 2018 03:26
Explore the performance of common classifier in the presence of noise
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@brianspiering
brianspiering / Scala_Quickstart.md
Last active November 28, 2018 20:11
Scala Quickstart
  1. Teaching Tech Together A must-read on how to teach anything computer related in an inclusive way for non-traditional classrooms

  2. Five Easy Lessons: Strategies for Successful Physics Teaching The first half of the book covers general principles of active learning for technical topics. The goal is to get students to participate as much as possible and constructive challenge their misconceptions that are in the way of learning more advanced materials.

  3. Teaching Statistics: A Bag of Tricks Hands-on activities to experimentally learn probability and statistics.

  4. Active Learning: A Practical Guide for College Faculty Not great but has useful nuggets.

@brianspiering
brianspiering / multi-label_classification_a_quick_start_guide.md
Last active February 27, 2022 21:32
Multi-label classification for text: A Quick Start Guide

Multi-label classification for text: A Quick Start Guide

Multi-label classification is assigning one or more labels to a data instance. Whereas, multi-class classification is assigning the single best label to a data instance. Common examples of multi-label classification are tagging objects in an image or tagging questions on question answering website. This guide will only cover the text applications.

Start by reading the Wikipedia article on multi-label classification.

The following readings are suggested to get oriented to the problem definition and possible approaches:

  1. A Review on Multi-Label Learning Algorithms by Zhang and Zhou. Worth a skim.