Skip to content

Instantly share code, notes, and snippets.

View cs's full-sized avatar
🤟
Always busy building the next thing ...

Christoph Schiessl cs

🤟
Always busy building the next thing ...
View GitHub Profile
@cs
cs / summary.txt
Created September 27, 2016 08:09
Dealing with suspended Merchants
# Dealing with suspended Merchants and Employees
We need just one, maybe two decisions:
(1) When somebody activates the _employees_ feature toggle in the BO, should the
system create {Employee}s for suspended {Merchant}s? Yes or No?
**Notes**
(a) I want to make it clear that all {Employee}s are shown in the table in
the backend - no exceptions. This can not be changed.
(b) The assigned {Employee}s' assigned {Merchant}s are already filtered,
@cs
cs / shore
Created November 5, 2015 13:17
Sync Helper for Shore DBs
#!/usr/bin/env runhaskell
--
-- ## Prerequisites
--
-- ```shell
-- $ brew install ghc
-- $ brew install cabal-install
-- $ cabal install shelly
-- ```
@cs
cs / pygments.scss
Last active August 29, 2015 13:59 — forked from zmanji/pygments.css
.highlight {
background-color: #073642;
color: #93a1a1;
& .c { color: #586e75 !important; font-style: italic !important; }
& .cm { color: #586e75 !important; font-style: italic !important; }
& .cp { color: #586e75 !important; font-style: italic !important; }
& .c1 { color: #586e75 !important; font-style: italic !important; }
& .cs { color: #586e75 !important; font-weight: bold !important; font-style: italic !important; }
& .err { color: #dc322f !important; background: none !important; }
& .k { color:#cb4b16 !important; }
module Text.Parsec.Custom (many1Till) where
import Control.Monad
import Text.Parsec.Prim
import Text.Parsec.Combinator
many1Till :: (Stream s m t, Show end) => ParsecT s u m a -> ParsecT s u m end -> ParsecT s u m [a]
many1Till p end = do
notFollowedBy end
first <- p
rest <- manyTill p end
@cs
cs / hierachical_clustering.rb
Created June 20, 2012 08:34
Implementation of the Hierachical Clustering Algroithm (as presented in the lecture "Knowledge Discovery in Databases" at LMU Munich) in Ruby.
require "rubygems"
gem "activesupport"
require "active_support/all"
def manhattenDistance objectA, objectB
return (objectA.first - objectB.first).abs + (objectA.second - objectB.second).abs
end
def allInterClusterObjectDistances clusterA, clusterB
distances = []
@cs
cs / knn.hs
Created June 19, 2012 09:39
Implementation of the k-Nearest Neighbour Algorithm (as presented in the lecture "Knowledge Discovery in Databases" at LMU Munich) in Haskell.
module Main where
import Data.List
------------------------------------------------------------------------
-- k Nearest Neighbor Algorithm
------------------------------------------------------------------------
type Distance = Double
class FeatureVector fv where
dist :: fv -> fv -> Distance
@cs
cs / apriori.hs
Created June 11, 2012 08:34
Implementation of the Apriori Algorithm (as presented in the lecture "Knowledge Discovery in Databases" at LMU Munich) in Haskell including HUnit tests.
module Main where
import qualified Data.List as List
import qualified Data.Set as Set
import Test.HUnit
main :: IO ()
main = do { runTestTT allTests ; return () }