Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.Id | |
import cats.data.StateT | |
import spire.math.Rational | |
/** | |
* | |
* This exercise should show you how you can combine parsers using `flatMap`. | |
* We will parse one of standard ACM assignments... | |
* |
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
object FoldTest extends App { | |
import cats.implicits._ | |
val maps = | |
List(Map("a" -> 1), Map("a" -> 2), Map("b" -> 3)) | |
/** | |
* COMPILES | |
* |
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
object RecursiveStreamComplexity extends App { | |
val integer = new AtomicInteger() | |
val foo: Stream[Int] = 1 #:: foo.map(i => { | |
integer.incrementAndGet() | |
i + 2 | |
}) |
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
#!/usr/bin/env bash | |
AGENT='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36'; | |
PANOID='Xow4B2hLPjwWMR10JcaB7A'; | |
for j in {0..12}; do | |
jj=$(printf %02d $j) | |
for i in {0..25}; do | |
ii=$(printf %02d $i) |
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
package cz.blindspot.armorway.analytics.configuration; | |
import com.fasterxml.jackson.core.JsonParser; | |
import com.fasterxml.jackson.core.JsonProcessingException; | |
import com.fasterxml.jackson.core.TreeNode; | |
import com.fasterxml.jackson.databind.DeserializationContext; | |
import com.fasterxml.jackson.databind.JsonDeserializer; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.fasterxml.jackson.databind.module.SimpleModule; | |
import com.mongodb.*; |