Skip to content

Instantly share code, notes, and snippets.

View mndrake's full-sized avatar
🏠
Working from home

David Carlson mndrake

🏠
Working from home
View GitHub Profile
@mndrake
mndrake / sas_export.py
Last active August 13, 2020 03:04
SAS dataset to sqlite wrapper of the sas7bdat python package
#!/usr/bin/python
# Filename: sas_export.py
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 06 18:40:09 2015
@author: David Carlson
modified version for sas7bdat 2.0.1 of Charlie Huang version at:
http://www.sasanalysis.com/2014/08/python-extension-functions-to-translate.html
"""
@mndrake
mndrake / feature_notebook.ipynb
Created January 29, 2015 02:43
IfSharp notebook ala OS X
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mndrake
mndrake / ifsharp_nvd3.ipynb
Created February 1, 2015 00:11
attempt to use nvd3 in ifsharp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mndrake
mndrake / ifsharp_nvd3_2.ipynb
Created February 2, 2015 03:33
nvd3 attempt using require.js
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mndrake
mndrake / nvd3_charting.ipynb
Created February 3, 2015 12:04
proof of concept wrapper of NVD3.js for IfSharp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mndrake
mndrake / metricsgraphics.ipynb
Last active August 29, 2015 14:14
metricsgraphics.js wrapper for ifsharp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mndrake
mndrake / dc_boxplot.ipynb
Created February 9, 2015 17:31
dc.js boxplot example in ifsharp notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mndrake
mndrake / charting_example.ipynb
Created June 29, 2015 12:54
charting example using IfSharp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mndrake
mndrake / install.R
Created August 11, 2015 19:37
h2o domino
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Install h2o
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# The following two commands remove any previously installed H2O packages for R.
if ("package:h2o" %in% search()) { detach("package:h2o", unload=TRUE) }
if ("h2o" %in% rownames(installed.packages())) { remove.packages("h2o") }
# Next, we download packages that H2O depends on.
if (! ("methods" %in% rownames(installed.packages()))) { install.packages("methods") }
library(xgboost)
library(Matrix)
library(data.table)
library(caret)
source('gini.R')
df <- read.csv('data/train.csv')
df.matrix <- model.matrix(Hazard~.-1,df)
set.seed(107)