Skip to content

Instantly share code, notes, and snippets.

View mrlevitas's full-sized avatar

Roman Levitas mrlevitas

View GitHub Profile
@jnothman
jnothman / transform_feature_names.py
Last active April 20, 2017 01:50
Creates transform_feature_names singledispatch allowing feature names to be calculated in a pipeline
from singledispatch import singledispatch
from sklearn.pipeline import Pipeline, FeatureUnion
from sklearn.feature_selection.base import SelectorMixin
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.decomposition import LatentDirichletAllocation
from sklearn.preprocessing import Imputer
from sklearn.preprocessing import FunctionTransformer
#from eli5 import explain_weights
require('babel-loader')
var webpack = require('webpack');
var CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: {
path: './src/main.js'
},
output: {
path: './build',
@crazymykl
crazymykl / profile_me.rb
Last active March 1, 2017 20:41
Ruby-prof wrapper script
def profile(**options)
fail "U WOT M8" unless block_given?
result = RubyProf.profile { yield }
Tempfile.open %w[vmm .cachegrind] do |tmp|
RubyProf::CallTreePrinter.new(result).print(tmp, **options)
spawn 'qcachegrind', tmp.path
end
@joanhard
joanhard / index
Last active January 25, 2016 20:56
Make full height colum on css foundation zurb
<div class="row">
<div class="large-8 column">
<div class="main">My Main</div>
</div>
<div class="large-4 column full-height">
<aside class="sidebar">
My Sidebar
</aside>
</div>
</div>