I hereby claim:
- I am tomverran on github.
- I am tomverran (https://keybase.io/tomverran) on keybase.
- I have a public key whose fingerprint is C8CF B320 8C28 B08D D171 A69A DA79 910D F5D8 49E2
To claim this, I am signing this object:
import xml.etree.cElementTree as ET | |
from ftplib import FTP | |
import StringIO | |
import gzip | |
import time | |
import re | |
import json | |
import boto3 | |
import tempfile |
I hereby claim:
To claim this, I am signing this object:
import shapeless._ | |
import shapeless.syntax.singleton._ | |
import shapeless.labelled._ | |
case class Foo(name: String) | |
val f = LabelledGeneric[Foo] | |
case class Lens[O, K, V](get: O => V) |
import scala.language.higherKinds | |
// trying to understand why shapeless does things it does by reimplementing them | |
/* | |
* scalaVersion := "2.11.8" | |
* resolvers += Resolver.sonatypeRepo("releases") | |
* addCompilerPlugin("org.spire-math" %% "kind-projector" % "0.9.3") | |
*/ |
type NestedEither = Either[Either[String, Int], Double] | |
val foo: NestedEither = Left(Right(5)) | |
sealed trait Extractor[H, N] { | |
def value(a: H): Option[N] | |
} | |
implicit def FoundExtractor[A] = new Extractor[A, A] { | |
def value(a: A) = Some(a) | |
} |
import shapeless.{:+:, CNil, Coproduct, HList, LabelledGeneric} | |
import shapeless.ops.hlist.{Align, Intersection} | |
/** | |
* Allows you to convert between case classes which have compatible generic representations | |
* i.e. Foo(bar: String) is convertable to Baz(bar: String) due to the field names & types being the same | |
*/ | |
trait Converter[A, B] { | |
def convert(a: A): B | |
} |
import shapeless._ | |
import shapeless.labelled._ | |
trait DeepGeneric[T] { | |
type Repr <: HList | |
def to(t: T): Repr | |
} | |
trait LowPriority { | |
implicit def plainHconsDeepGeneric[H, T <: HList]( |
import fs2._ | |
import cats.effect.IO | |
import cats.instances.int._ | |
val none = IO[Option[Int]](None) | |
Stream.eval(none).unNone.groupAdjacentBy(identity).compile.drain.unsafeRunSync |
package com.ovoenergy.green.demo | |
import cats.effect.IO._ | |
import cats.effect.{ConcurrentEffect, ExitCode, IO, IOApp} | |
import cats.implicits._ | |
import fs2._ | |
import fs2.concurrent.Queue | |
import org.scalajs.dom.document.body | |
import org.scalajs.dom.{Element, Event, Node} | |
import scalatags.JsDom.all._ |
import cats.effect.IO | |
import cats.effect.unsafe.{IORuntime, IORuntimeConfig, Scheduler} | |
import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach, Suite} | |
import java.time.Instant | |
import java.time.temporal.ChronoUnit.MILLIS | |
import java.util.concurrent.atomic.AtomicReference | |
import scala.concurrent.duration.FiniteDuration | |
trait TimeTravelTest extends BeforeAndAfterAll with BeforeAndAfterEach { self: Suite => |