I hereby claim:
- I am ruippeixotog on github.
- I am ruippeixotog (https://keybase.io/ruippeixotog) on keybase.
- I have a public key ASD0tJQG240QfcQO6AkYd2EymdSmrbuXNC7Yxg4EfPbjKgo
To claim this, I am signing this object:
package net.ruippeixotog.jmh | |
import java.util.concurrent.TimeUnit | |
import scala.collection.immutable.ListSet | |
import org.openjdk.jmh.annotations.{Benchmark, BenchmarkMode, Mode, OutputTimeUnit} | |
import org.openjdk.jmh.infra.Blackhole | |
class ListSetBenchmark { |
I hereby claim:
To claim this, I am signing this object:
FROM alpine | |
ADD "arr[0].txt" / | |
CMD ["bash", "-c", "ls -la *.txt"] |
object Test { | |
trait MyTrait { type Out[_] } | |
object MyInstance extends MyTrait { type Out[A] = A } | |
implicit class RichMyTrait[Out0[_]](myStuff: MyTrait { type Out[A] = Out0[A] }) { | |
def f[A]: Out0[A] = ??? | |
} | |
MyInstance.f[String] |
import scala.language.experimental.macros | |
import scala.reflect.macros.blackbox | |
trait Derivation[A] { | |
def value: A | |
} | |
object Derivation { | |
case class Successful[A](value: A) extends Derivation[A] |
trait Mat[A] | |
object Mat { | |
def materializeMatImpl[A](c: whitebox.Context)(implicit tt: c.WeakTypeTag[A]): c.Tree = { | |
import c.universe._ | |
println(s"At ${weakTypeOf[A]} (${c.openImplicits.length})") | |
c.inferImplicitValue(weakTypeOf[A]) match { | |
case EmptyTree => c.abort(c.enclosingPosition, "fail") | |
case _ => q"new Mat[${weakTypeOf[A]}] {}" |
import os | |
from keras.models import Sequential | |
from keras.layers import Dense | |
from keras.optimizers import Adam | |
from common.gym_runner import GymRunner | |
from common.q_learning_agent import QLearningAgent | |
import os | |
from keras.models import Sequential | |
from keras.layers import Dense | |
from keras.optimizers import Adam | |
from common.gym_runner import GymRunner | |
from common.q_learning_agent import QLearningAgent | |
scalaVersion := "2.10.7" | |
libraryDependencies ++= Seq( | |
"com.chuusai" %% "shapeless" % "2.3.3", | |
compilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)) | |
scalacOptions += "-language:experimental.macros" |
import core._ | |
case class InnerConf(n: Int, str: String) | |
object InnerConf { | |
implicit val innerConfReader: ConfigReader[InnerConf] = { _ => InnerConf(42, "custom") } | |
} | |
case class OuterConf(k: Int, inners: List[InnerConf]) |