In your command-line run the following commands:
brew doctor
brew update
In your command-line run the following commands:
brew doctor
brew update
# start postgresql | |
pg_ctl -D /usr/local/var/postgres start | |
# stop postgresql | |
pg_ctl -D /usr/local/var/postgres stop |
import Control.Monad | |
------------------------------------------------------------------------------- | |
-- State Monad Implementation | |
------------------------------------------------------------------------------- | |
newtype State s a = State { runState :: s -> (a,s) } | |
instance Monad (State s) where | |
return a = State $ \s -> (a, s) |
""" | |
Given a dictionary, transform it to a string. Then byte encode that string. Then base64 encode it and since this will go | |
on a url, use the urlsafe version. Then decode the byte string so that it can be else where. | |
""" | |
data = base64.urlsafe_b64encode(json.dumps({'a': 123}).encode()).decode() | |
# And the decode is just as simple... | |
data = json.loads(base64.urlsafe_b64decode(query_param.encode()).decode()) | |
# Byte encode the string, base64 decode that, then byte decode, finally transform it to a dictionary |
package org.example; | |
import scala.Function1; | |
import scala.collection.generic.CanBuildFrom; | |
import scala.collection.immutable.List; | |
import scala.collection.immutable.List$; | |
import scala.collection.immutable.Vector; | |
import scala.collection.immutable.Vector$; | |
import scala.collection.mutable.Builder; |
type Valid[M[_], A] = EitherT[M, AccountServiceException, A] | |
type AccountOperation[M[_], A] = Kleisli[Valid[M, ?], AccountRepository[M], A] |
I hereby claim:
To claim this, I am signing this object:
object KafkaStreamsTest extends TestSuite[KafkaLocalServer] with Serializers { | |
def setup(): KafkaLocalServer = { | |
val s = KafkaLocalServer(true) | |
s.start() | |
s | |
} | |
def tearDown(server: KafkaLocalServer): Unit = { | |
server.stop() | |
} |
// build.sbt | |
val catsVersion = "1.0.0-RC1" | |
val catsEffectVersion = "0.5" | |
val catsCore = "org.typelevel" % "cats-core_2.12" % catsVersion | |
val catsFree = "org.typelevel" % "cats-free_2.12" % catsVersion | |
val catsEffect = "org.typelevel" %% "cats-effect" % catsEffectVersion | |
val monix = "io.monix" %% "monix" % "3.0.0-8084549" | |
val monixCats = "io.monix" %% "monix-cats" % "2.3.2" |