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 scalaz.std | |
import scalaz.syntax.std._ | |
import scalaz.syntax.{ToEitherOps => _, _} | |
trait ToDataOps | |
extends ToIdOps | |
// with ToTreeOps | |
// with ToReducerOps | |
// with ToWriterOps | |
// with ToStateOps |
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
Минимальная разница суммы выездов между командами зоны: | |
https://static-maps.yandex.ru/1.x/?l=map&pt=27.561481,53.902512,pm2am~27.561481,53.902512,pm2am~28.147757,53.511751,pm2am~25.338609,52.709065,pm2am~26.102473,52.111406,pm2am~24.083384,51.791886,pm2am~28.63821,53.308832,pm2am~27.854853,52.216941,pm2am~28.495899,52.125767,pm2am~24.817092,53.149497,pm2am~23.666889,52.175368,pm2am~26.739298,53.479589,pm2bm~26.017609,53.132341,pm2bm~30.330654,53.894548,pm2bm~31.014272,52.42416,pm2bm~30.037813,52.892256,pm2bm~28.768349,55.485576,pm2bm~30.995111,54.283228,pm2bm~25.958338,54.615366,pm2bm~26.83893,54.307332,pm2bm~30.053237,53.082104,pm2bm~28.20109,54.041104,pm2bm | |
Зона A | |
11 команд | |
Команда Город Общее расстояние | |
БГУ Минск 4244.0 | |
Виктория Марьина-Горка 4300.0 | |
Динамо-Брест-1960 Малорита 5522.0 | |
Ивацевичи Ивацевичи 3824.0 | |
Мелиоратор Житковичи 4350.0 |
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
val compileTimes = inputKey[Unit]("Get compilation time for each folder") | |
compileTimes / aggregate := false, | |
compileTimes := { | |
import complete.DefaultParsers._ | |
// val ((depth, _), filter) = (NatBasic ~ " " ~ StringBasic).parsed | |
val (depth, filter) = spaceDelimited("depth filter").parsed match { | |
case Seq(depth, filter) => (depth.toInt, filter) | |
case _ => sys.error("expected depth and filter arguments, eg '2 /'") | |
} | |
val s = state.value |
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
client/compile | |
[debug] Checking for meta build source updates | |
[debug] Acquiring lock on file D:\Distrib\Coding\Java\scala\scastie\project\target\.sbt-compilation-infos\client-compile\.sbt-idea-lock ... | |
[debug] Other repositories: | |
[debug] "not up to date. inChanged = true, force = false | |
[debug] Updating apiJS2_12... | |
[debug] Default repositories: | |
[debug] Using inline dependencies specified in Scala. | |
[debug] Done updating apiJS2_12 | |
[debug] "not up to date. inChanged = true, force = false |
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
val swaggerTarget = settingKey[File]("") | |
swaggerTarget := crossTarget.value / "swagger" | |
Compile / sourceGenerators += Def.task { | |
import scala.collection.JavaConverters._ | |
val templateDir = swaggerTarget.value | |
templateDir.mkdirs() | |
val c = new _root_.io.swagger.codegen.config.CodegenConfigurator() | |
.setLang("io.swagger.codegen.languages.ScalaClientCodegen") | |
.setModelPackage("com.acme.swagger") | |
.setOutputDir(templateDir.absolutePath) |
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
object qwe extends App { | |
def str = { | |
def find[A](s: Stream[A])(p: A => Boolean): Option[A] = { | |
s.headOption match { | |
case Some(x) if p(x) => Some(x) | |
case None => None | |
case _ => find(s.tail)(p) | |
} | |
} | |
// Stream.iterate(1)(_ + 1).find(str => false).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
dependencies: | |
override: | |
- git checkout . | |
- git clean -f | |
- ./sbt-build testQuick | |
- rm -rf ./.git | |
cache_directories: | |
- "~/.sbt" | |
- ./ |
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
rules = [ | |
Disable, | |
DisableUnless, | |
DisableSyntax, | |
ExplicitResultTypes, | |
LeakingImplicitClassVal, | |
MissingFinal, | |
NoInfer, | |
RemoveUnusedImports, | |
RemoveUnusedTerms |
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 scala.language._ | |
import slick.dbio.{DBIOAction, Effect, NoStream, DBIO} | |
import scalaz.Leibniz.refl | |
import scalaz.{Monad, Unapply} | |
import scalaz.Scalaz._ | |
implicit def dbioActionMonad[E <: Effect] | |
: Monad[({ type M[A] = DBIOAction[A, NoStream, E] })#M] = | |
new Monad[({ type M[A] = DBIOAction[A, NoStream, E] })#M] { |
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
Getting net.java.dev.jna jna 3.2.3 ... | |
:: retrieving :: org.scala-sbt#boot-jna | |
confs: [default] | |
1 artifacts copied, 0 already retrieved (838kB/24ms) | |
Getting org.scala-sbt sbt 0.13.0-Beta2 ... | |
:: retrieving :: org.scala-sbt#boot-app | |
confs: [default] | |
44 artifacts copied, 0 already retrieved (12515kB/158ms) | |
Getting Scala 2.10.2-RC2 (for sbt)... | |
:: retrieving :: org.scala-sbt#boot-scala |
NewerOlder