Skip to content

Instantly share code, notes, and snippets.

View ClintWeathers's full-sized avatar

Clint Weathers ClintWeathers

  • Target
  • Minneapolis, MN
View GitHub Profile
@ClintWeathers
ClintWeathers / dplyrwoes.txt
Created December 10, 2015 21:35
Aggregation using Dplyr
library(dplyr); library(magrittr)
#To Create The Dataframe of Fake Orders
set.seed(867.5309)
onums <- paste("AA", as.integer(runif(20) * 1e8), sep = "")
prices <- round((runif(20) * 1000), 2)
orders <- as.data.frame(cbind(onums, prices))
@ClintWeathers
ClintWeathers / Jupyter_Busy_Indicator.txt
Created June 27, 2016 15:15
How to change Jupyter notebook busy indicator to something more visible
Most of this is just following the steps here:
http://sherifsoliman.com/2016/01/11/theming-ipython-jupyter-notebook/
On a recent Juypter version, open up the custom.css in your favorite editor which should be Sublime Text 3 or Vim and definitely not emacs.
~/.jupyter/custom/custom.css (on my VM this lives in C:\Users\username\.ipython\profile_default\static\custom -- YMMV)
Do a search for kernel_busy_icon
# List unique values in a DataFrame column
# h/t @makmanalp for the updated syntax!
df['Column Name'].unique()
# Convert Series datatype to numeric (will error if column has non-numeric values)
# h/t @makmanalp
pd.to_numeric(df['Column Name'])
# Convert Series datatype to numeric, changing non-numeric values to NaN
# h/t @makmanalp for the updated syntax!
@ClintWeathers
ClintWeathers / ubuntu_thing.md
Created July 24, 2018 03:46
Getting The Ubuntu Thing Working

The Main Idea

Get a datascience environment built on a VM.

In theory, this gives me a few things:

  • The umph of my overbuilt desktop machine minus a few gig of ram and a couple cores
  • The ability to SSH/VNC/RDP in and just use my chromebook as a cheap thin client when Im out and about.
  • Experience dealing with the install and usage of Drill, Zeppelin, and some other tools.

So far I've:

  1. Downloaded the Bionic ubuntu iso