[ Launch: Three Circles Setup ] cc617eaa11e8ac77cb3f by ahlusar1989[ Launch: Three Circles Answer ] 6258892 by lewis500[ Launch: Three Circles Answer ] 5565405 by lewis500
๐
[ Launch: colorscale ] e66354bd25b0f9abbe87 by ahlusar1989
[ Launch: Another Inlet ] aa98d2ec6c87c9a33820 by ahlusar1989
[ Launch: Clickable Line Setup ] c4c80b0cfacaf4845b3c by ahlusar1989[ Launch: Clickable Line ] 5565482 by lewis500[ Launch: Clickable Line ] 5565480 by lewis500
[ Launch: Ball on Line - Setup ] 97ae2795a7bbf6ee334a by ahlusar1989[ Launch: Tributary inlet ] 5565487 by lewis500 See Previous Inlet [ Gist ]
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
""" Small script that shows hot to do one hot encoding | |
of categorical columns in a pandas DataFrame. | |
See: | |
http://scikit-learn.org/dev/modules/generated/sklearn.preprocessing.OneHotEncoder.html#sklearn.preprocessing.OneHotEncoder | |
http://scikit-learn.org/dev/modules/generated/sklearn.feature_extraction.DictVectorizer.html | |
""" | |
import pandas | |
import random |
This file contains hidden or 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 __future__ import division | |
from numpy import * | |
class AdaBoost: | |
def __init__(self, training_set): | |
self.training_set = training_set | |
self.N = len(self.training_set) | |
self.weights = ones(self.N)/self.N | |
self.RULES = [] |
[ Launch: Electron 1 ] 26109e789eb01a5de6d7 by ahlusar1989
Contours of San Francisco overlayed over OpenStreeMap vector tiles using code from mbostock's vector tiles with multiple layers example. View the hi-res file
See gist for code used to generate contours.
This file contains hidden or 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 multiprocessing | |
import pandas as pd | |
import numpy as np | |
def _apply_df(args): | |
df, func, kwargs = args | |
return df.apply(func, **kwargs) | |
def apply_by_multiprocessing(df, func, **kwargs): | |
workers = kwargs.pop('workers') |