This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spork.prefork do | |
require "rails/application" | |
# Prevent Devise from loading the User model super early with it's route hacks for Rails 3.1 rc4 | |
# see also: https://github.com/timcharper/spork/wiki/Spork.trap_method-Jujutsu | |
Spork.trap_method(Rails::Application, :reload_routes!) | |
Spork.trap_method(Rails::Application::RoutesReloader, :reload!) | |
# rest of your prefork here... | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from sklearn.utils import shuffle | |
# Data comes from y = f(x) = [2, 3].x + [5, 7] | |
X0 = np.random.randn(100, 2) - 1 | |
X1 = np.random.randn(100, 2) + 1 | |
X = np.vstack([X0, X1]) | |
t = np.vstack([np.zeros([100, 1]), np.ones([100, 1])]) |