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
from sklearn.datasets import make_regression | |
from sklearn.model_selection import train_test_split | |
from sklearn.linear_model import Ridge | |
from sklearn.metrics import mean_squared_error | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# generate data | |
X, y, w = make_regression(n_samples=1000, n_features=200, coef=True, | |
random_state=1, bias=0, noise=3, tail_strength=0.9, effective_rank=10) |
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
require 'benchmark' | |
require 'set' | |
[1, 10, 100, 110, 125, 150, 200, 250, 500, 1000, 10000].each do |i| | |
arr = (0..i).to_a.shuffle | |
set_time = Benchmark.realtime do | |
set = Set.new arr | |
i.times do |j| | |
set.include? j |
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
require "active_record" | |
namespace :db do | |
db_config = YAML::load(File.open('config/database.yml')) | |
db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'}) | |
desc "Create the database" | |
task :create do | |
ActiveRecord::Base.establish_connection(db_config_admin) |
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 React, { Component, PropTypes } from 'react'; | |
import popperJS from 'popper.js'; | |
export default class Popper extends Component { | |
constructor(props) { | |
super(props); | |
this.state = {}; | |
this.update = this.update.bind(this); | |
} |
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
### Keybase proof | |
I hereby claim: | |
* I am ebakan on github. | |
* I am ebakan (https://keybase.io/ebakan) on keybase. | |
* I have a public key whose fingerprint is 3419 FDB4 1E03 8E08 7DF1 F16E 0B9A C1B4 E0BF F2F9 | |
To claim this, I am signing this object: |
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
Verifying that +ebakan is my Bitcoin username. You can send me #bitcoin here: https://onename.io/ebakan |