I hereby claim:
- I am chuwy on github.
- I am chuwy (https://keybase.io/chuwy) on keybase.
- I have a public key ASC4yihj3aD9BK2glw6wm-sUNqbq9Qj8uWYJMcb3KhGjrQo
To claim this, I am signing this object:
#!/bin/sh | |
cp -R ../snowplow . | |
cd snowplow/ | |
git filter-repo \ | |
--path 3-enrich/scala-common-enrich \ | |
--path 3-enrich/spark-enrich \ | |
--path 3-enrich/beam-enrich \ |
data Option a where | |
Some : a -> Option a | |
None : Option a | |
instance Functor | |
fmap : (a -> b) -> Option a -> Option b | |
fmap f (Some a) = Some (f a) | |
fmap _ None = None | |
deriving instance Show given Show a |
trait Mutability[F[_]] { | |
def init[A](a: A): F[Mutability.Var[F, A]] | |
} | |
object Mutability { | |
trait Var[F[_], A] { | |
def get: F[A] | |
def put(a: A): F[Unit] | |
} |
/** Always positive integer, nobody can do `new PositiveInt(-3)` */ | |
class PositiveInt private(value: Int) extends AnyVal | |
/** Set of constructors for PositiveInt */ | |
object PositiveInt { | |
/** The only proper constructor. Everything else is workaround */ | |
def fromInt(int: Int): Option[PositiveInt] = if (int > 0) Some(new PositiveInt(int)) else None | |
/** | |
* This is a workaround and must be called ONLY when caller is sure the `int` is positive |
object WeirdChunks { | |
import cats.effect.concurrent.Ref | |
import fs2.concurrent.Queue | |
import scala.concurrent.duration._ | |
implicit val t = IO.timer(scala.concurrent.ExecutionContext.global) | |
implicit val cs = IO.contextShift(scala.concurrent.ExecutionContext.global) | |
def init: IO[(Ref[IO, Int], Queue[IO, String])] = |
{ | |
"anyOf": [ | |
{ | |
"description": "Resolution error - schema could not be found on specified repositories, defined by ResolutionError ADT in Iglu Client", | |
"properties": { | |
"repositories": { | |
"description": "Defined by LookupHistory ADT in Iglu Client", | |
"properties": { | |
"name": { | |
"type": "string", |
import cats._ | |
import cats.implicits._ | |
import cats.effect._ | |
import cats.effect.implicits._ | |
object Db { | |
private val cache = collection.mutable.Map.empty[String, String] | |
def expensiveIO(input: String): IO[String] = | |
IO { Thread.sleep(1000); println("Executed expensive action"); input ++ input } |
Only in hosted: com.admo-analytics | |
Only in hosted: com.adxtracking | |
Only in hosted: com.angelrush | |
Only in hosted: com.calltracks | |
Only in hosted: com.certivox | |
Only in repo: com.convertro | |
Only in hosted: com.duproprio | |
Only in hosted: com.duproprio_comfree | |
Only in hosted: com.findly | |
Only in hosted: com.finerylondon |
I hereby claim:
To claim this, I am signing this object:
package jsonschemavalidator | |
import scala.language.implicitConversions | |
import cats.syntax.either._ | |
import cats.syntax.semigroup._ | |
import cats.syntax.semigroupk._ | |
import cats.syntax.validated._ | |
import cats.data.ValidatedNel | |
import cats.instances.all._ |