Code to compete in the kaggle titanic challenge