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
package com.tlo.ahocorasick | |
import scala.collection.mutable | |
import scala.collection.immutable | |
import scala.annotation.tailrec | |
sealed trait Node { | |
def children: mutable.Map[Char, LetterNode] | |
} |
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
var Hoek = require('Hoek') | |
var defaults = {} | |
exports.register = function (plugin, options, next) { | |
options = Hoek.applyToDefaults(defaults, options) | |
plugin.route({ | |
path: '/foo', | |
method: 'GET', |
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
package tlo.reddit | |
object SentenceMangle { | |
val sampleInputs = Seq( | |
"This challenge doesn't seem so hard.", | |
"There are more things between heaven and earth, Horatio, than are dreamt of in your philosophy." | |
) | |
val challengeInputs = Seq( | |
"Eye of Newt, and Toe of Frog, Wool of Bat, and Tongue of Dog.", |
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.implicits._ | |
import fs2._ | |
class StreamMerger[F[_]] { | |
def priorityOrderBy[A, B: Order](s1: Stream[F, A], s2: Stream[F, A])(f: A => B): Stream[F, A] = { | |
def go(p1: Stream.StepLeg[F, A], p2: Stream.StepLeg[F, A]): Pull[F, A, Unit] = { |
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
package emberbroken | |
import cats._ | |
import cats.data.Kleisli | |
import cats.implicits._ | |
import cats.effect._ | |
import cats.effect.implicits._ | |
import natchez.{EntryPoint, Span, Trace} | |
import org.http4s._ | |
import org.http4s.client.blaze.BlazeClientBuilder |