This file contains hidden or 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
| defmodule BatailleRoyale do | |
| @cards 0..7 |> Enum.to_list |> List.duplicate(4) |> List.flatten | |
| def times(n) do | |
| results = | |
| 1..n | |
| |> Enum.map(fn _ -> play() end) | |
| |> Enum.map(fn {_, _, moves} -> moves end) |
This file contains hidden or 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.data._ | |
| import cats.effect.ExitCode | |
| import cats.implicits._ | |
| import cats.~> | |
| import org.http4s.dsl.Http4sDsl2 | |
| import org.http4s.server.blaze.BlazeServerBuilder | |
| import org.http4s.{ Http, Request, Response } | |
| import zio._ | |
| import zio.clock.Clock | |
| import zio.interop.catz._ |
This file contains hidden or 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.{ ExitCode, IO, IOApp } | |
| import tsec.cipher.symmetric.{ AAD, AADEncryptor, IvGen } | |
| import tsec.cipher.symmetric.jca.{ AES256GCM, SecretKey } | |
| import tsec.common._ | |
| import tsec.cipher.symmetric._ | |
| object CryptoApp extends IOApp { | |
| private val aad: AAD = AAD("KnQCxy4rW4KuxMRcvkVvAs9KufF7XR4b".utf8Bytes) |
This file contains hidden or 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 fs2.Stream | |
| import zio.interop.catz._ | |
| import zio.{ Runtime, Task } | |
| object FS2TaskInterop extends App { | |
| val runtime = Runtime.default | |
| val nonStream = Task(123).map(_ => BigDecimal("16:19:25.242056065Z")) | |
| val stream = Stream.eval(nonStream) |
OlderNewer