1. Load MySQL Database from Dump

    In terminal... mysql -u root -p In mysql console... create database dbname; exit; Install pv if you don't have it. Gives you a progress bar. Very useful for larger data. pv structure.file | mysql -u root -p dbname pv data.file | mysql -u root -p dbname

  2. Rodeo

    Rodeo is to Python as RStudio is to R. It's a very new Python IDE that looks very promising. Installation is fairly straightforward, but does have some required packages. sudo apt-get install python-pip sudo apt-get install libxft-dev libfreetype6-dev sudo apt-get install python-matplotlib pip install jupyter # Download wget https://www.yhat.

  3. Invalid Multibyte string

    Quite an annoying problem, commonly found when receiving data from systems outside of your sphere of influence or from a variety of different sources. Some basic strategies for dealing with this: First, try to read it in as UTF-8. You'll get good error messages that identify the first offender. So

  4. Bootstrap with logistic regression

    A quick example of bootstraping a logistic regression. Nothing special here, example could be extended to any other type of model that has a coef() method. library(boot) logit_test <- function(d,indices) { d <- d[indices,] fit <- glm(your ~ formula, data = d, family = "binomial"

  5. Git pull aborts

    Frequently, I'll be working on a remote and a local copy at the same time. Perhaps this is a bad overall workflow and needs to be rethought. But often, I'll make changes in two locations but only wish to save one but wish to update the other with the changes.