This file contains 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 cats._ | |
import cats.implicits._ | |
import cats.effect._ | |
import cats.effect.concurrent._ | |
import cats.effect.implicits._ | |
trait Memoize[F[_], Key, A] { | |
def get(id: Key): F[A] | |
} |
This file contains 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 cats.effect.Async | |
import com.google.common.util.concurrent.{FutureCallback, Futures, ListenableFuture} | |
import scala.concurrent.ExecutionContext | |
object GuavaFutures { | |
implicit class RichListenableFuture[T](lf: ListenableFuture[T]) { | |
def toAsync[F[_]: Async](implicit ec: ExecutionContext): F[T] = { |
This file contains 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 io.circe._ | |
import io.circe.generic.semiauto._ | |
import cats.syntax.all._ | |
object JsonTagger { | |
private implicit class Tagger[A](d: Decoder[A]) { | |
def tag(accessor: String): Decoder[Decoder[A]] = | |
Decoder |
This file contains 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
{ | |
"type" : "record", | |
"name" : "TimeExamples", | |
"namespace": "com.example", | |
"fields" : [ | |
{ | |
"name": "aDate", | |
"type": "int" | |
"logicalType": "date" | |
}, |
This file contains 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 static com.google.common.base.Preconditions.checkNotNull; | |
import static com.google.common.collect.Iterables.filter; | |
import static com.google.common.collect.Iterators.cycle; | |
import static java.util.Arrays.asList; | |
import java.util.Iterator; | |
import com.google.common.base.Function; | |
import com.google.common.base.Predicate; | |
import com.google.common.collect.FluentIterable; |
OlderNewer