Skip to content

Instantly share code, notes, and snippets.

View rebeccabilbro's full-sized avatar

Rebecca Bilbro rebeccabilbro

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rebeccabilbro
rebeccabilbro / Git_Workshop_v4.ipynb
Last active December 27, 2016 21:19
An introduction to using Git and Github, including resolving a merge conflict.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rebeccabilbro
rebeccabilbro / get_hobbies.py
Created June 27, 2018 15:43
Load the yellowbrick hobbies corpus
import os
from sklearn.datasets.base import Bunch
from yellowbrick.download import download_all
## The path to the test data sets
FIXTURES = os.path.join(os.getcwd(), "data")
## Dataset loading mechanisms
datasets = {
@rebeccabilbro
rebeccabilbro / doctor.go
Created August 19, 2018 21:48
System doctor
package main
import (
"fmt"
"log"
"github.com/shirou/gopsutil/mem"
"github.com/shirou/gopsutil/cpu"
"github.com/shirou/gopsutil/disk"
"github.com/shirou/gopsutil/host"
@rebeccabilbro
rebeccabilbro / get_walking_data.py
Created August 23, 2018 21:40
Download & wrangle walking dataset
import os
import zipfile
import requests
import pandas as pd
WALKING_DATASET = (
"https://archive.ics.uci.edu/ml/machine-learning-databases/00286/User%20Identification%20From%20Walking%20Activity.zip",
)
def download_data(path='data', urls=WALKING_DATASET):
@rebeccabilbro
rebeccabilbro / classifier_comparison.py
Created June 5, 2019 13:00
Produce customizable classifier comparison plots
#!/usr/bin/python
# -*- coding: utf-8 -*-
# plot_classifier_comparison.py
"""
A comparison of a several classifiers in scikit-learn on synthetic datasets.
The point of this example is to illustrate the nature of decision boundaries
of different classifiers.
Particularly in high-dimensional spaces, data can more easily be separated
linearly and the simplicity of classifiers such as naive Bayes and linear SVMs
#!/usr/bin/env python3
# toto.py
# Adds the ID line to directory files using git metadata.
#
# Author: Rebecca Bilbro
# Created: Sun Aug 11 11:27:57 EDT 2019
#
"""
Scans local directory for git repository metadata and adds ID line to file headers.
@rebeccabilbro
rebeccabilbro / barnacle.py
Last active October 8, 2019 15:48
Adds the ID line to Golang directory files using git metadata.
#!/usr/bin/env python3
# barnacle.py
# Adds the ID line to directory files using git metadata.
#
# Author: Rebecca Bilbro
# Created: Sat Sep 14 13:26:53 EDT 2019
#
"""
Scans local directory for git repository metadata and adds ID line to file footers.
import matplotlib.pyplot as plt
from yellowbrick.datasets import load_occupancy
from yellowbrick.model_selection import CVScores
from yellowbrick.classifier import ConfusionMatrix
from sklearn.svm import SVC
from sklearn.model_selection import StratifiedKFold
from sklearn.model_selection import train_test_split as tts