Skip to content

Instantly share code, notes, and snippets.

Spencer spencercarter

Block or report user

Report or block spencercarter

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@spencercarter
spencercarter / xgboost_permission_fail.py
Last active Jan 28, 2018
Sample code to create silent permission failure in xgboost 0.4
View xgboost_permission_fail.py
import xgboost as xgb
import numpy as np
from subprocess import call
# Initialize
X = np.random.normal(size=[10, 5])
y = np.random.randint(0,2,10)
dtrain = xgb.DMatrix(X, label=y)
# Model
@spencercarter
spencercarter / model_web_service_flask_post_p1.py
Last active Nov 16, 2018
Gists containing code to run the Models as a Web Service blog post
View model_web_service_flask_post_p1.py
# Part 1: Model
import sklearn as sk
import numpy as np
from sklearn.datasets import load_boston
from sklearn.linear_model import LassoCV
import pandas as pd
from flask import Flask
from flask import request
import requests
You can’t perform that action at this time.