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
| package gameoflife | |
| final case class Cell(x: Long, y: Long) | |
| // Actual solution | |
| object Life { | |
| def proximity(c: Cell): Set[Cell] = | |
| (for { | |
| x <- -1 to 1 |
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 info.fotm.crawler.ObservableStream | |
| val sink = new ObservableStream[Int] { | |
| def put(x: Int) = super.publish(x) | |
| } | |
| val othersink = new ObservableStream[Int] { | |
| def put(x: Int) = super.publish(x) | |
| } |
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
| /* | |
| Назовем набор кортежей целых чисел кластером | |
| Входные данные алгоритма: один кластер | |
| Выходные данные: разбиение входного кластера на непересекающиеся подкластеры | |
| */ | |
| abstract class Clusterer { | |
| type V = Vector[Double] | |
| type Cluster = Seq[V] | |
| def clusterize(input: Cluster): Set[Cluster] |
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
| /* | |
| В одном проекте и даже одном файле может быть объявлено несколько приложений (или точек входа). | |
| Запуск нужного производится следующей командой: | |
| $ sbt "run-main <полное имя объекта>" | |
| Пример: | |
| $ sbt "run-main Integers" | |
| */ |
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
| Main | |
| - [ ] Implement Monitor's dependencies for Google cloud VM backend | |
| - [ ] Storage | |
| - [ ] Pub/sub | |
| - [ ] Analytics | |
| - [ ] Implement brain | |
| Architecture | |
| - [ ] Move modules to separate folders (monitor/ brain/ etc) | |
| - [ ] Create tests for each module | |
| - [ ] Track code coverage |
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
| using System; | |
| using numl.Model; | |
| using numl.Unsupervised; | |
| namespace KmeansError | |
| { | |
| class Program | |
| { | |
| class DataPoint | |
| { |
NewerOlder