repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
frozenspider/fs-common-utils
src/main/scala/org/fs/utility/collection/RichCollectionImplicits.scala
package org.fs.utility.collection import java.io.ByteArrayInputStream import java.io.ByteArrayOutputStream import java.util.zip.GZIPInputStream import java.util.zip.GZIPOutputStream import scala.collection.{ GenIterableLike => GIL } import scala.collection.{ GenTraversableLike => GTL } import scala.collection.Indexed...
frozenspider/fs-common-utils
src/test/scala/org/fs/utility/StopWatchSpec.scala
package org.fs.utility import org.junit.runner.RunWith import org.scalatest.Spec import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class StopWatchSpec extends Spec { def `peek ` = { val sw = new StopWatch Thread.sleep(100) val peek = sw.peek assert(peek >= 100 && peek <= 150) }...
frozenspider/fs-common-utils
src/test/scala/org/fs/utility/RichGeneralImplicitsSpec.scala
package org.fs.utility import org.junit.runner.RunWith import org.scalatest.Spec import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class RichGeneralImplicitsSpec extends Spec { object `rich throwable -` { import RichGeneralImplicits.RichThrowable def `stackTraceString ` = { val t...
frozenspider/fs-common-utils
src/main/scala/org/fs/utility/internal/Helpers.scala
<filename>src/main/scala/org/fs/utility/internal/Helpers.scala package org.fs.utility.internal import java.io.ByteArrayOutputStream import java.io.InputStream /** * @author FS */ object Helpers { // We won't rely on IOUtils.readFully to avoid dependency on commons-io protected[utility] def readFully(is: InputS...
frozenspider/fs-common-utils
src/main/scala/org/fs/utility/Imports.scala
<gh_stars>0 package org.fs.utility import org.fs.utility.collection.RichCollectionImplicits trait Imports extends RichGeneralImplicits with RichCollectionImplicits object Imports extends Imports
frozenspider/fs-common-utils
build.sbt
<reponame>frozenspider/fs-common-utils<filename>build.sbt name := "fs-common-utils" version := "0.1.3" scalaVersion := "2.12.3" crossScalaVersions := Seq("2.11.11", "2.12.3") coverageExcludedPackages := "org.fs.utility.internal.*" libraryDependencies ++= Seq( // Test "junit" % "junit" % ...
frozenspider/fs-common-utils
src/test/scala/org/fs/utility/collection/RichCollectionImplicitsSpec.scala
<filename>src/test/scala/org/fs/utility/collection/RichCollectionImplicitsSpec.scala package org.fs.utility.collection import org.junit.runner.RunWith import org.scalatest.Spec import org.scalatest.junit.JUnitRunner import scala.collection.GenIterableLike import scala.collection.GenIterable import scala.collection.Ind...
frozenspider/fs-common-utils
src/main/scala/org/fs/utility/StopWatch.scala
<reponame>frozenspider/fs-common-utils<gh_stars>0 package org.fs.utility /** * @author FS */ class StopWatch { val startMs = System.currentTimeMillis def peek: Long = System.currentTimeMillis - startMs } /** * @author FS */ object StopWatch { /** Execute code block and return execution result along wit...
precog/tectonic2
test/src/test/scala/tectonic/csv/ParserSpecs.scala
/* * Copyright 2020 Precog Data * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
precog/tectonic2
test/src/test/scala/tectonic/MultiplexingPlateSpecs.scala
/* * Copyright 2020 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
precog/tectonic2
test/src/main/scala/tectonic/test/json/package.scala
/* * Copyright 2020 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
precog/tectonic2
fs2/src/test/scala/tectonic/fs2/StreamParserSpecs.scala
<filename>fs2/src/test/scala/tectonic/fs2/StreamParserSpecs.scala<gh_stars>0 /* * Copyright 2020 Precog Data * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.o...
precog/tectonic2
build.sbt
import scala.collection.Seq ThisBuild / crossScalaVersions := Seq("2.12.12", "2.13.1") ThisBuild / scalaVersion := "2.12.12" ThisBuild / githubRepository := "tectonic2" homepage in ThisBuild := Some(url("https://github.com/precog/tectonic2")) scmInfo in ThisBuild := Some(ScmInfo( url("https://github.com/precog/te...
precog/tectonic2
benchmarks/src/main/scala/tectonic/csv/ParserBenchmarks.scala
<reponame>precog/tectonic2<filename>benchmarks/src/main/scala/tectonic/csv/ParserBenchmarks.scala /* * Copyright 2020 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * htt...
precog/tectonic2
version.sbt
<filename>version.sbt<gh_stars>0 version in ThisBuild := "15.0.0"
kharole/fpinscala
answers/src/main/scala/fpinscala/iomonad/fp13.scala
<filename>answers/src/main/scala/fpinscala/iomonad/fp13.scala<gh_stars>0 package fpinscala.iomonad import fpinscala.iomonad import fpinscala.parallelism.Nonblocking.Par object fp13 { //13.1 def freeMonad[F[_]]: Monad[({type f[a] = Free[F, a]})#f] = new Monad[({type f[a] = Free[F, a]})#f] { override def unit[...
kharole/fpinscala
answers/src/main/scala/fpinscala/testing/fp8.scala
import fpinscala.parallelism.Par import fpinscala.parallelism.Par.Par object fp8 { import java.util.concurrent.{Callable, CountDownLatch, ExecutorService} import RNG._ import fpinscala.parallelism.Actor import fpinscala.testing.Prop.Passed import scala.collection.immutable //8.1 /* sum: List[Int] => ...
kharole/fpinscala
answers/src/main/scala/fpinscala/monads/fp11.scala
<filename>answers/src/main/scala/fpinscala/monads/fp11.scala<gh_stars>0 package fpinscala.monads import fpinscala.datastructures import fpinscala.laziness.Stream import fpinscala.monads.fp11.Reader import fpinscala.parallelism.Nonblocking.Par import fpinscala.parsing.Sliceable import fpinscala.parsing.SliceableTypes.P...
kharole/fpinscala
answers/src/main/scala/fpinscala/localeffects/fp14.scala
package fpinscala.localeffects import scala.annotation.tailrec object fp14 { sealed trait ST[S, A] { self => protected def run(s: S): (A, S) def map[B](f: A => B): ST[S, B] = new ST[S, B] { def run(s: S) = { val (a, s1) = self.run(s) (f(a), s1)...
kharole/fpinscala
answers/src/main/scala/fpinscala/applicative/fp12.scala
<reponame>kharole/fpinscala package fpinscala.applicative import fpinscala.monads.{Functor, fp11} import fpinscala.monoids.fp10 import fpinscala.state.State object fp12 { //noinspection DuplicatedCode //12.1 trait Applicative[F[_]] extends Functor[F] { // primitive combinators def map2[A, B, C](fa: F[A...
kharole/fpinscala
answers/src/main/scala/fpinscala/monoids/fp10.scala
package fpinscala.monoids import fp10._ import fpinscala.parallelism.Nonblocking.Par import fpinscala.testing.Gen.listOfN import fpinscala.testing.Prop.forAll import fpinscala.testing.{Gen, Prop} object fp10 { trait Monoid[A] { def op(a1: A, a2: A): A def zero: A } //10.1 val intAddition: Monoid[In...
kharole/fpinscala
answers/src/main/scala/fpinscala/parsing/fp9.scala
import scala.util.matching.Regex object fp9 { trait Parsers[ParseError, Parser[+ _]] { self => def run[A](p: Parser[A])(input: String): Either[ParseError, A] def or[A](s1: Parser[A], s2: Parser[A]): Parser[A] def simple: Parser[String] = ??? def trimmed: Parser[String] = ??? def string...
rajthilakmca/megam_play
app/models/json/tosca/PolicySerialization.scala
<reponame>rajthilakmca/megam_play /* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unles...
rajthilakmca/megam_play
app/models/json/tosca/ContiniousIntegrationResultSerialization.scala
<reponame>rajthilakmca/megam_play /* ** Copyright [2012-2013] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unles...
rajthilakmca/megam_play
app/models/tosca/Assembly.scala
/* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or ag...
rajthilakmca/megam_play
test/tosca/CSARLinksSpec.scala
<reponame>rajthilakmca/megam_play /* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unles...
rajthilakmca/megam_play
test/tosca/AssembliesSpec.scala
<gh_stars>0 /* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicab...
rajthilakmca/megam_play
app/controllers/funnel/FunnelResponse.scala
/* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or ag...
rajthilakmca/megam_play
app/Global.scala
<gh_stars>0 /* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicabl...
rajthilakmca/megam_play
app/models/tosca/CSARLinks.scala
<filename>app/models/tosca/CSARLinks.scala /* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 **...
rajthilakmca/megam_play
app/models/json/tosca/ComponentResultSerialization.scala
/* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or ag...
rajthilakmca/megam_play
app/models/tosca/Organizations.scala
/* ** Copyright [2012-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or ag...
rajthilakmca/megam_play
app/models/CloudToolSettings.scala
/* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or ag...
rajthilakmca/megam_play
app/models/json/AppRequestResultSerialization.scala
/* ** Copyright [2012-2013] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or ag...
rajthilakmca/megam_play
test/tosca/CSARsSpec.scala
<reponame>rajthilakmca/megam_play<filename>test/tosca/CSARsSpec.scala /* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache....
rajthilakmca/megam_play
app/models/tosca/CSARs.scala
<filename>app/models/tosca/CSARs.scala /* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** ...
rajthilakmca/megam_play
test/PredefCloudsSpec.scala
<filename>test/PredefCloudsSpec.scala /* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** U...
rajthilakmca/megam_play
app/controllers/stack/MConfig.scala
<reponame>rajthilakmca/megam_play /* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unles...
rajthilakmca/megam_play
app/controllers/funnel/package.scala
<gh_stars>0 /* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicab...
rajthilakmca/megam_play
test/tosca/ContiniousIntegrationSpec.scala
/* ** Copyright [2012-2013] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or ag...
rajthilakmca/megam_play
app/models/tosca/package.scala
/* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or ag...
rajthilakmca/megam_play
test/tosca/ComponentsSpec.scala
<reponame>rajthilakmca/megam_play<filename>test/tosca/ComponentsSpec.scala /* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.ap...
rajthilakmca/megam_play
app/models/MarketPlaceAddons.scala
/* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or ag...
rajthilakmca/megam_play
app/models/AppRequests.scala
/* ** Copyright [2012-2013] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or ag...
rajthilakmca/megam_play
app/models/json/tosca/ComponentSerialization.scala
/* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or ag...
rajthilakmca/megam_play
app/models/tosca/ContiniousIntegration.scala
<reponame>rajthilakmca/megam_play<filename>app/models/tosca/ContiniousIntegration.scala /* ** Copyright [2012-2013] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** ...
rajthilakmca/megam_play
app/models/json/tosca/CISerialization.scala
<reponame>rajthilakmca/megam_play<filename>app/models/json/tosca/CISerialization.scala<gh_stars>0 /* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License...
rajthilakmca/megam_play
app/models/package.scala
<reponame>rajthilakmca/megam_play<gh_stars>0 /* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ...
rajthilakmca/megam_play
app/models/tosca/CSARJson.scala
/* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or ag...
rajthilakmca/megam_play
app/models/json/RequestResultSerialization.scala
/* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or ag...
rajthilakmca/megam_play
app/models/json/tosca/ServiceInputsSerialization.scala
/* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or ag...
rajthilakmca/megam_play
app/models/json/tosca/ComponentOthersSerialization.scala
/* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or ag...
rajthilakmca/megam_play
app/models/tosca/Components.scala
/* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or ag...
rajthilakmca/megam_play
app/models/PlatformAppPrimer.scala
<reponame>rajthilakmca/megam_play /* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unles...
rajthilakmca/megam_play
app/models/Accounts.scala
<filename>app/models/Accounts.scala /* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unl...
rajthilakmca/megam_play
app/controllers/funnel/FunnelResponseSerialization.scala
/* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or ag...
rajthilakmca/megam_play
app/models/json/tosca/ComponentOtherSerialization.scala
/* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or ag...
rajthilakmca/megam_play
app/models/json/tosca/ComponentInputsSerialization.scala
/* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or ag...
rajthilakmca/megam_play
app/models/json/tosca/ArtifactsSerialization.scala
/* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or ag...
rajthilakmca/megam_play
app/models/tosca/Assemblies.scala
/* ** Copyright [2013-2014] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or a...
birdie7761/kafka-manager
app/kafka/manager/utils/zero82/LogConfig.scala
<reponame>birdie7761/kafka-manager /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Vers...
jvz/sbt-rat-plugin
src/main/scala/org/musigma/sbt/rat/SbtRatPlugin.scala
<reponame>jvz/sbt-rat-plugin /* Copyright 2018 <NAME> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable...
jvz/sbt-rat-plugin
src/sbt-test/sbt-rat/apache-headers/build.sbt
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
jvz/sbt-rat-plugin
build.sbt
<reponame>jvz/sbt-rat-plugin import xerial.sbt.Sonatype.GitHubHosting import ReleaseTransformations._ lazy val metadataSettings = Seq( name := "SBT Release Audit Tool", organization := "org.musigma", moduleName := "sbt-rat", licenses := Seq("Apache License, Version 2.0" -> url("https://www.apache.org/licenses/...
adamwkaczmarek/akka-streams-kafka-examples
project/plugins.sbt
addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill" % "1.6.1") addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.19")
adamwkaczmarek/akka-streams-kafka-examples
core/src/main/scala/com/softwaremill/k8s/example/User.scala
package com.softwaremill.k8s.example case class User(userId: String, regionId: String, gender: String)
adamwkaczmarek/akka-streams-kafka-examples
core/src/main/scala/com/softwaremill/k8s/example/UserDao.scala
package com.softwaremill.k8s.example import com.typesafe.scalalogging.StrictLogging class UserDao extends StrictLogging { def saveUser(user: User): Unit = logger.info(s"Saving user ${user}") }
adamwkaczmarek/akka-streams-kafka-examples
core/src/test/scala/com/softwaremill/k8s/example/UserConsumersManagerSpec.scala
<reponame>adamwkaczmarek/akka-streams-kafka-examples<filename>core/src/test/scala/com/softwaremill/k8s/example/UserConsumersManagerSpec.scala package com.softwaremill.k8s.example import akka.Done import akka.actor.ActorSystem import akka.kafka.scaladsl.Consumer.DrainingControl import akka.kafka.{CommitterSettings, Con...
adamwkaczmarek/akka-streams-kafka-examples
core/src/main/scala/com/softwaremill/k8s/example/UserConsumersManager.scala
package com.softwaremill.k8s.example import akka.Done import akka.actor.ActorSystem import akka.kafka.{CommitterSettings, ConsumerSettings, Subscriptions} import akka.kafka.scaladsl.Consumer.DrainingControl import akka.kafka.scaladsl.{Committer, Consumer} import com.typesafe.scalalogging.StrictLogging import scala.co...
adamwkaczmarek/akka-streams-kafka-examples
core/src/main/scala/com/softwaremill/k8s/example/Main.scala
<reponame>adamwkaczmarek/akka-streams-kafka-examples<filename>core/src/main/scala/com/softwaremill/k8s/example/Main.scala package com.softwaremill.k8s.example import java.io.StringWriter import java.util.concurrent.atomic.AtomicBoolean import akka.actor.ActorSystem import akka.stream.ActorMaterializer import cats.eff...
scalamorphing/slowparser
shared/src/main/scala/expert/scalamorphing/slowparser/SlowParser.scala
<gh_stars>0 package expert.scalamorphing.slowparser import fastparse.core.Implicits._ import fastparse.core._ import fastparse.parsers.Combinators._ class SlowParserImpl[+T, Elem, Repr](self: Parser[T, Elem, Repr]) (implicit repr: fastparse.utils.ReprOps[Elem, Repr], delimiters: Par...
scalamorphing/slowparser
build.sbt
<gh_stars>0 import sbt.Keys.version scalaVersion in ThisBuild := "2.11.8" lazy val slowparser = { crossProject in file(".") }.settings( Seq( name := "slowparser", version := "0.0.1", organization := "expert.scalamorphing", libraryDependencies += "com.lihaoyi" %%% "fastparse" % "0.4.1", librar...
scalamorphing/slowparser
shared/src/test/scala/expert/scalamorphing/slowparser/SlowParserTest.scala
package expert.scalamorphing.slowparser import org.scalatest.{FlatSpec, Matchers} import scala.collection.mutable.ArrayBuffer class SlowParserTest extends FlatSpec with Matchers { implicit val delimiters = Set[Char](" \n\r\t" :_*) import expert.scalamorphing.slowparser.api._ "plurals" should "be parsed" in { ...
scalamorphing/slowparser
jvm/build.sbt
name := "slowparser" version := "0.0.1"
scalamorphing/slowparser
project/plugins.sbt
resolvers += "Typesafe Repository" at "https://repo.typesafe.com/typesafe/releases/" addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.14") addSbtPlugin("com.sksamuel.scapegoat" %% "sbt-scapegoat" % "1.0.4")
laidback/cbdi
build.sbt
name := "fti-jerry-service" version := "1.0" maintainer := "<NAME> <<EMAIL>>" packageSummary := "Jerry internal API Service" //javaHome := Some(file("/path/to/java")) //javaOptions += "-Xmx256" //javacOptions ++= Seq("-source", "1.5", "-target", "1.5") scalaVersion := "2.11.8" //scalaHome := Some(file("/path/to...
laidback/cbdi
src/main/scala/Main.scala
package io.github.laidback.cbdi import akka.Done import akka.NotUsed import akka.util._ import akka.event.{Logging, LoggingAdapter} import akka.actor._ import akka.stream._ import akka.stream.scaladsl._ import akka.http._ import akka.http.scaladsl._ import akka.http.scaladsl.server._ import akka.http.scaladsl.server.D...
laidback/cbdi
src/test/scala/RoutesTestkit.scala
<reponame>laidback/cbdi package de.fti.skeleton import org.scalatest._ import akka.http.scaladsl.server._ import akka.http.scaladsl.model._ import akka.http.scaladsl.testkit.ScalatestRouteTest import com.typesafe.config.ConfigFactory class RoutesTestkit extends WordSpec with Matchers with ScalatestRouteTest wit...
laidback/cbdi
src/main/scala/Project.scala
package io.github.laidback.cbdi case class Project(name: String, user: User) trait ProjectRepositoryComponent { val projectRepository: ProjectRepository trait ProjectRepository { def create(project: Project): Unit } } trait ProjectRepositoryComponentImpl extends ProjectRepositoryComponent { override val...
laidback/cbdi
src/main/scala/User.scala
<gh_stars>0 package io.github.laidback.cbdi case class User(username: String, password: String) trait UserRepositoryComponent { val userRepository: UserRepository trait UserRepository { def create(user: User): Unit } } trait UserRepositoryComponentImpl extends UserRepositoryComponent { override val user...
laidback/cbdi
src/main/scala/RemoteService.scala
package io.github.laidback.cbdi case class Remote(username: String, password: String) trait RemoteRepositoryComponent { val userRepository: RemoteRepository trait RemoteRepository { def create(user: Remote): Unit } } trait RemoteRepositoryComponentImpl extends RemoteRepositoryComponent { override val us...
laidback/cbdi
project/plugins.sbt
<reponame>laidback/cbdi<gh_stars>0 resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/" resolvers += "Scoverate bintray" at "https://dl.bintray.com/sksamuel/sbt-plugins/" addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.2.0-M8") addSbtPlugin("com.typesafe.sbt" % "sbt-git" % ...
EvanKrall/marathon
src/test/scala/mesosphere/marathon/state/MarathonStoreTest.scala
package mesosphere.marathon.state import java.lang.{ Boolean => JBoolean } import java.util.concurrent.{ ExecutionException, Future => JFuture } import mesosphere.marathon.state.PathId._ import mesosphere.marathon.{ MarathonSpec, StorageException } import org.apache.mesos.state.{ InMemoryState, State, Variable } impo...
EvanKrall/marathon
src/main/scala/mesosphere/marathon/tasks/PortsMatcher.scala
<filename>src/main/scala/mesosphere/marathon/tasks/PortsMatcher.scala<gh_stars>0 package mesosphere.marathon.tasks import scala.util.{ Try, Random } import org.apache.mesos.Protos.Offer import mesosphere.mesos.protos import mesosphere.mesos.protos.{ RangesResource, Resource } import mesosphere.marathon.PortResourceExc...
EvanKrall/marathon
src/main/scala/mesosphere/marathon/health/MarathonHealthCheckManager.scala
package mesosphere.marathon.health import javax.inject.{ Inject, Named } import scala.concurrent.Future import scala.concurrent.duration._ import akka.actor.{ ActorRef, ActorSystem, Props } import akka.event.EventStream import akka.pattern.ask import akka.util.Timeout import org.apache.mesos.Protos.TaskStatus import...
EvanKrall/marathon
src/test/scala/mesosphere/marathon/api/v2/AppUpdateTest.scala
<reponame>EvanKrall/marathon package mesosphere.marathon.api.v2 import javax.validation.Validation import mesosphere.marathon.MarathonSpec import mesosphere.marathon.health.HealthCheck import mesosphere.marathon.state.Container._ import mesosphere.marathon.state.{ Container, PathId, Timestamp, UpgradeStrategy } impor...
EvanKrall/marathon
src/test/scala/mesosphere/marathon/MarathonSchedulerTest.scala
package mesosphere.marathon import akka.actor.ActorSystem import akka.event.EventStream import akka.testkit.{ TestKit, TestProbe } import com.codahale.metrics.MetricRegistry import com.fasterxml.jackson.databind.ObjectMapper import com.google.common.collect.Lists import mesosphere.marathon.Protos.MarathonTask import m...
EvanKrall/marathon
src/test/scala/mesosphere/marathon/tasks/TaskTrackerTest.scala
<reponame>EvanKrall/marathon package mesosphere.marathon.tasks import java.io.{ ByteArrayInputStream, ByteArrayOutputStream, ObjectInputStream, ObjectOutputStream } import com.codahale.metrics.MetricRegistry import com.google.common.collect.Lists import mesosphere.marathon.Protos.MarathonTask import mesosphere.marath...
EvanKrall/marathon
src/test/scala/mesosphere/marathon/health/HealthCheckTest.scala
<reponame>EvanKrall/marathon package mesosphere.marathon.health import mesosphere.marathon.{ MarathonSpec, Protos } import mesosphere.marathon.state.Command import mesosphere.jackson.CaseClassModule import Protos.HealthCheckDefinition.Protocol import scala.concurrent.duration.FiniteDuration import scala.collection.Jav...
EvanKrall/marathon
src/main/scala/mesosphere/marathon/api/v2/InfoResource.scala
package mesosphere.marathon.api.v2 import javax.ws.rs.core.{ MediaType, Response } import javax.ws.rs.{ Consumes, GET, Path, Produces } import com.google.inject.Inject import mesosphere.chaos.http.HttpConf import mesosphere.marathon.event.EventConfiguration import mesosphere.marathon.event.http.HttpEventConfiguration...
parwen68/advent-of-code-2017
shared/src/test/scala/se/parwen/adoc/day18/SolverSpec.scala
package se.parwen.adoc.day18 import org.scalatest._ import se.parwen.adoc.day18.Solver._ class SolverSpec extends FlatSpec with Matchers { "Solver parse" should "return" in { val a = Solver.parse("""set a 1 |add a 2 |mul a a |mod a 5 |...
parwen68/advent-of-code-2017
shared/src/main/scala/se/parwen/adoc/day18/Solver.scala
<reponame>parwen68/advent-of-code-2017 package se.parwen.adoc.day18 import scala.annotation.tailrec import scala.util.matching.Regex object Solver { case class ExecCtx( ptr: Long, regs: Map[Char, Long], lastPlayedSnd: Long, inQ: List[Long] = List(), outQ: List[Long] = List(), sends: Int = 0...
parwen68/advent-of-code-2017
shared/src/main/scala/se/parwen/adoc/day20/Solver.scala
<filename>shared/src/main/scala/se/parwen/adoc/day20/Solver.scala package se.parwen.adoc.day20 object Solver { case class Coord(x: Int, y: Int, z: Int) { def dist: Int = Math.abs(x) + Math.abs(y) + Math.abs(z) } object Coord { def apply(x: String, y: String, z: String) : Coord = { Coord(x.trim.toI...
parwen68/advent-of-code-2017
shared/src/test/scala/se/parwen/adoc/day6/SolverSpec.scala
<filename>shared/src/test/scala/se/parwen/adoc/day6/SolverSpec.scala package se.parwen.adoc.day6 import org.scalatest._ class SolverSpec extends FlatSpec with Matchers { import Solver._ "The Solver" should "return 5" in { solveStep1(List(0, 2, 7, 0)) should be (5) } "The Solver" should "return 4" in { ...
parwen68/advent-of-code-2017
shared/src/test/scala/se/parwen/adoc/day20/SolverSpec.scala
package se.parwen.adoc.day20 import org.scalatest._ import se.parwen.adoc.day20.Solver.{Coord, Pixel} class SolverSpec extends FlatSpec with Matchers { "The Solver parser" should "return parsed result" in { val a = Solver.parse("""p=< 3,0,0>, v=< 2,0,0>, a=<-1,0,0> |p=< 4,0,0>, v=< 0...
parwen68/advent-of-code-2017
shared/src/main/scala/se/parwen/adoc/day12/Input.scala
<reponame>parwen68/advent-of-code-2017 package se.parwen.adoc.day12 object Input { val input2 = """0 <-> 795 |1 <-> 156 |2 <-> 715 |3 <-> 1361, 1698 |4 <-> 551, 672 |5 <-> 514 |6 <-> 1806 |7 <-> 1700 ...
parwen68/advent-of-code-2017
shared/src/main/scala/se/parwen/adoc/day1/Solver.scala
<filename>shared/src/main/scala/se/parwen/adoc/day1/Solver.scala<gh_stars>0 package se.parwen.adoc.day1 object Solver { def solveStep1(input: String) = { val pairs = input.zip(input.drop(input.length / 2) + input.take(input.length / 2)) pairs.foldLeft(0)((acc, v) => if(v._1 == v._2) acc + (v._1 - '0') else ...
parwen68/advent-of-code-2017
shared/src/test/scala/se/parwen/adoc/day9/SolverSpec.scala
package se.parwen.adoc.day9 import org.scalatest.{FlatSpec, Matchers} class SolverSpec extends FlatSpec with Matchers { "The solvers step1" should "return 0 fo <>" in { import Solver._ val r = solveStep1("<>") r should be (0) } "The solvers step1" should "return 1 for {}" in { import Solver._ ...
parwen68/advent-of-code-2017
shared/src/test/scala/se/parwen/adoc/day7/SolverSpec.scala
package se.parwen.adoc.day7 import org.scalatest.{FlatSpec, Matchers} class SolverSpec extends FlatSpec with Matchers { "The solver" should "return tknk" in { import Solver._ val r = solveStep1("""pbga (66) |xhth (57) |ebii (61) |havc (66) |ktlj (57) ...
parwen68/advent-of-code-2017
shared/src/main/scala/se/parwen/adoc/day7/Input.scala
<gh_stars>0 package se.parwen.adoc.day7 object Input { val input = """cfkcj (74) |kmwhbm (32) |uuvdgc (58) |siyms (98) |jgtvhkv (1885) -> ykqcpiv, gvupyd, vuyxvq |ppdypq (86) |lovxjut (90) -> fmvna, ddneaes, sakwdmk, lqm...