I hereby claim:
- I am atamborrino on github.
- I am atamborrino (https://keybase.io/atamborrino) on keybase.
- I have a public key ASBtyXFwZvKC4C4JCyiktqVzas0I6gsAnKjZp2OodH54Ogo
To claim this, I am signing this object:
| import akka.NotUsed | |
| import akka.stream.scaladsl.Source | |
| import redis.clients.jedis.{Jedis, JedisCluster, ScanParams} | |
| import scala.collection.JavaConverters._ | |
| import scala.concurrent.Future | |
| class RedisStream(maxNodeParallelism: Int) | |
| (implicit jedisCluster: JedisCluster, | |
| blockingEC: RedisBlockingEC) { |
| import akka.actor.Scheduler | |
| import scala.concurrent.{ExecutionContext, Future, Promise} | |
| import scala.concurrent.duration.FiniteDuration | |
| object FutureHelper { | |
| private val log = ScalaLogger.get(this.getClass) | |
| /** | |
| * Retry concurrently the async execution ''f'' every ''delay'' while no execution completes. | |
| * Number of retries is bounded by ''maxSpeculativeExecutions''. |
| import java.util.concurrent._ | |
| import akka.dispatch.{Dispatcher, ExecutorServiceDelegate} | |
| import config.Config | |
| import helpers.ScalaLogger | |
| class ExecutionContextMonitor()(implicit metricsService: MetricsClient, config: Config) { | |
| private val log = ScalaLogger.get(this.getClass) | |
| private val scheduler = Executors.newSingleThreadScheduledExecutor() |
| import ml.combust.mleap.runtime.{LeapFrame, LocalDataset, Row} | |
| import ml.combust.mleap.runtime.types.{DoubleType, StructField, StructType, TensorType} | |
| import ml.combust.mleap.tensor.Tensor | |
| import resource._ | |
| import ml.combust.mleap.runtime.MleapSupport._ | |
| import scala.collection.JavaConverters._ | |
| import com.google.common.jimfs.{Configuration, Jimfs} | |
| import ml.combust.bundle.BundleFile | |
| import java.nio.file.{FileSystems, Files} |
| import cats.derived._, eq._, legacy._ | |
| import cats.implicits._ | |
| case class Foo(a: String, b: Int) | |
| case class Bar(c: Boolean) | |
| Foo("a", 0) === Foo("b", 0) // compile | |
| Foo("a", 0) === Bar(true) // does not compile | |
| Foo("a", 0) == Bar(true) // compile with warning |
| import java.time.Instant | |
| import shapeless._ | |
| import simulacrum._ | |
| import scala.concurrent.duration.FiniteDuration | |
| import scala.language.implicitConversions | |
| import scala.concurrent.duration._ | |
| @typeclass | |
| trait Timed[A] { | |
| def getInstant(a: A): Instant |
I hereby claim:
To claim this, I am signing this object:
| # src: https://www.kaggle.com/aglotero/another-iou-metric | |
| def iou_metric(y_true_in, y_pred_in, print_table=False): | |
| labels = y_true_in | |
| y_pred = y_pred_in | |
| true_objects = 2 | |
| pred_objects = 2 | |
| intersection = np.histogram2d(labels.flatten(), y_pred.flatten(), bins=(true_objects, pred_objects))[0] |