Skip to content

Instantly share code, notes, and snippets.

View drewnoff's full-sized avatar
💭
🕊️

Andrey Romanov drewnoff

💭
🕊️
View GitHub Profile
@drewnoff
drewnoff / rddTypesafety.scala
Created June 19, 2018 15:16
scala rdd example
case class SiteId(val v: String) extends AnyVal {
override def toString = v.toString
}
case class ItemId(val v: String) extends AnyVal {
override def toString = v.toString
}
case class Item(siteId: SiteId, itemId: ItemId, price: Option[Double])
import org.nd4s.Implicits._
import org.nd4j.linalg.factory.Nd4j
import org.nd4j.linalg.api.ops.impl.indexaccum.IAMax
object IndexAccumOpsMain {
def main(args: Array[String]) {
/** Gist for https://github.com/deeplearning4j/nd4j/issues/1916#issuecomment-314520715 **/
@drewnoff
drewnoff / keybase.md
Created May 29, 2017 19:17
Keybase proof

Keybase proof

I hereby claim:

  • I am drewnoff on github.
  • I am drewnoff (https://keybase.io/drewnoff) on keybase.
  • I have a public key ASAGF5T9m1xIIrOGbDub8Al4rxO2Ql1GeAm4NHosPIXzRwo

To claim this, I am signing this object:

package com.github.drewnoff.algorithm
import scala.reflect.ClassTag
import scala.math.max
trait Associative[A] {
def id: A
def op(a: A, b: A): A
}