Skip to content

Instantly share code, notes, and snippets.

View fishcorn's full-sized avatar

Josephine Moeller fishcorn

View GitHub Profile
@annalee
annalee / sample-slack-coc.md
Last active April 11, 2024 21:14
A sample code of conduct for social slack teams.

[SLACKNAME] Code of Conduct

Welcome!

[BRIEF DESCRIPTION OF THE SLACK AND ITS PURPOSE]

The current admins are:

  • [NAMES]
@amueller
amueller / abomination.py
Created July 28, 2016 21:02
binary operators on all estimators
from sklearn.base import BaseEstimator
def piper(self, other):
from sklearn.pipeline import make_pipeline, Pipeline
if isinstance(self, Pipeline):
steps = ([estimator for (name, estimator) in self.steps] + [other])
return make_pipeline(*steps)
else:
return make_pipeline(self, other)
@glguy
glguy / gist:74960a3f1531b64a201b
Last active August 29, 2015 14:05
Lens Cookbook

Optic Cookbook

The imports for building the various field-oriented optics are pretty minimal. It's not until you make a Getter or a Fold that you need to look outside of base.

This cookbook only covers the field oriented optics and not the constructor oriented ones. If you want to build a Prism or an Iso without a lens dependency, you should copy the definition of lens' prism and iso combinators and add a profunctors dependency to your project. Those two combinators are quite self-contained.