code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
/* * Copyright 2015 Netflix, Inc. * * 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 t...
rspieldenner/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/stacklang/CallSuite.scala
Scala
apache-2.0
1,014
/* * 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 ...
yew1eb/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/scala/expressionDsl.scala
Scala
apache-2.0
36,774
package net.liftmodules.ng package test.snippet import Angular._ import net.liftweb.common.Empty import net.liftweb.http.{S, SessionVar} import net.liftweb.json.DefaultFormats import net.liftweb.util.Schedule import net.liftweb.util.Helpers.TimeSpan object Server2ClientBindTests { case class ListWrap(l:List[String]...
joescii/lift-ng
test-project/src/main/scala/net/liftmodules/ng/test/snippet/Server2ClientBindTests.scala
Scala
apache-2.0
1,415
package com.thenewmotion.externalconfiguration package examples /** * @author Yaroslav Klymko */ object ExternalConfigurationExample { // by default it will configure logback, typesafe config, lift props ExternalConfiguration.load() // if default options are not enough for you val myConfConfigurable: Exter...
thenewmotion/externalconfiguration
src/main/scala/com.thenewmotion.externalconfiguration/examples/ExternalConfigurationExample.scala
Scala
apache-2.0
539
package io.scalaland.chimney.examples package trip { case class PersonForm(name: String, age: String, height: String) case class Person(name: String, age: Int, height: Double) case class TripForm(tripId: String, people: List[PersonForm]) case class Trip(id: Int, people: Vector[Person]) case class User(nam...
scalalandio/chimney
chimney/src/test/scala/io/scalaland/chimney/examples/Trip.scala
Scala
apache-2.0
359
/* * 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 may ...
zhanghan1990/Yosemite
core/src/main/scala/Yosemite/framework/slave/ui/SlaveWebUI.scala
Scala
apache-2.0
6,672
package ex8.cs class ex7 { var counter = 0 def trueLabalCounter = { counter += 1 } def parser(s: String) = { val a = s.split(" ") a.length match { case 3 => findOpration3(a(0), a(1), a(2)) case 1 => findOpration1(a(0)) } } def moveStackPointer = {} def arrOp(o: ...
semlie/TheElemOfCompSys
ex8/cs/ex7.scala
Scala
gpl-2.0
1,229
/** * 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 writing, software * distributed ...
ksmpartners/ernie
ernie-engine/src/test/scala/com/ksmpartners/ernie/engine/ActorsTest.scala
Scala
apache-2.0
11,295
package screens import app.AppRouter.Page import autowire._ import chandu0101.scalajs.react.components.Implicits._ import chandu0101.scalajs.react.components.materialui.{ MuiCheckbox, MuiList, MuiListItem, MuiMuiThemeProvider, MuiRaisedButton, MuiTextField } import japgolly.scalajs.react.extra.router.RouterCtl import ...
workingDog/SilverworkReact
clientAdmin/src/main/scala/screens/DeleteAccountsScreen.scala
Scala
apache-2.0
2,912
package com.catinthedark.shapeshift import com.badlogic.gdx.{Gdx, Input} import com.badlogic.gdx.graphics.{GL20, Texture} import com.badlogic.gdx.graphics.g2d.SpriteBatch import com.catinthedark.lib.{KeyAwaitState, Stub, TextureState} import com.catinthedark.lib.Magic._ class GameWinScreen(val shared: Shared0) extend...
cat-in-the-dark/old48_35_game
src/main/scala/com/catinthedark/shapeshift/GameWinScreen.scala
Scala
mit
688
package sri.sangria.mongoserver import java.time._ import cats.data.Xor import io.circe.{DecodingFailure, Encoder, Decoder, Json} import reactivemongo.bson.BSONObjectID import scala.util.Try /** * Circe Json to BSON conversion */ package object mongo2circe { val $OID = "$oid" val $DATE_TIME = "$datetime" ...
chandu0101/sri-sangria-example
server/src/main/scala/sri/sangria/mongoserver/mongo2circe/package.scala
Scala
apache-2.0
1,349
package org.bruchez.tessel import scala.concurrent.duration._ import scala.scalajs.js import scala.scalajs.js.Dynamic.{global ⇒ g} /** * This is a quick demo of using Tessel 2 from Scala. I uses the `relay-mono` module and on-board LEDs. */ object Demo extends js.JSApp { def main(): Unit = { println(s"sta...
ebruchez/tessel-scala
src/main/scala/org/bruchez/tessel/Demo.scala
Scala
mit
948
package org.vds.discoverscala.core.ch02 import org.scalatest.{Matchers, WordSpec} /** * Example for loop-s */ class LoopExampleTest extends WordSpec with Matchers { "Type of look" when { "We use while loop" should { "add increment value and return string with contains number 1,2,3,4,5" in { v...
dawid-swist/discover-scala
src/test/scala/org/vds/discoverscala/core/ch02/LoopExampleTest.scala
Scala
gpl-3.0
804
package multip; import scala.collection.mutable.HashMap import math._ import scala.io._ import java.io._ import java.io.FileWriter import scala.util.Random object Utils { def deepCopy[A](a: A)(implicit m: reflect.Manifest[A]): A = util.Marshal.load[A](util.Marshal.dump(a)) def count[A](xs:List[A]): HashMap[A...
cocoxu/multip
src/main/scala/Common.scala
Scala
gpl-3.0
3,573
package tutorial.webapp import lib._ import org.scalajs.dom import org.scalajs.dom.html.{Element} import rx.core.{Var, Rx} import scala.scalajs.js.{JSApp} import scala.util.{Failure, Success} import scala.scalajs.concurrent.JSExecutionContext.Implicits.runNow import scalatags.JsDom.tags2.section import scalatags.J...
YusukeKokubo/understanding-git-data-structure
src/main/scala/tutorial/webapp/TutorialApp.scala
Scala
mit
5,829
package uk.co.bocuma.mailinator import net.ceedubs.ficus.Ficus._ import com.typesafe.config.ConfigFactory object Mailinator extends MailinatorImpl trait MailinatorImpl { val config = ConfigFactory.load() val environment = Option(System.getenv("SCALA_ENV")).getOrElse("development") val baseUrl = "https://ap...
cammellos/mailinator-scala-api
src/main/scala/uk/co/bocuma/mailinator/Mailinator.scala
Scala
lgpl-3.0
779
package com.github.aselab.activerecord.validations import java.util.{Date, UUID} import java.sql.Timestamp import com.github.aselab.activerecord._ import inner._ object Models { import com.github.aselab.activerecord.dsl._ import annotation.meta._ type CustomAnnotation = sample.CustomAnnotation @field case c...
aselab/scala-activerecord
activerecord/src/test/scala/validations/ValidationSupportSpec.scala
Scala
mit
13,793
package org.sameersingh.scalaplot.metrics /** * @author sameer */ object Stats { def mean(points: Seq[Double]): Double = points.sum / points.size def meanAndVariance(points: Seq[Double]): (Double, Double) = { var n = 0.0 var mv = 0.0 var m2 = 0.0 for (x <- points) { n += 1.0 // delt...
nightscape/scalaplot
src/main/scala/org/sameersingh/scalaplot/metrics/Stats.scala
Scala
bsd-2-clause
677
/* * 10.9.2015 * * Overuse of underscore in Scala. * * There are N uses of the poor '_' in Scala. * * Some of these are not really necessary. * * Ref. http://www.slideshare.net/normation/scala-dreaded */ class Underscores { import collection.{ Map =>_, _ } var count : Int = _ def sum = (_:Int) + (_:Int) def s...
akauppi/HelsinkiScalaClub
src/main/scala/OverUnderscore.scala
Scala
unlicense
1,214
/* * Copyright 2015-2016 Snowflake Computing * Copyright 2015 TouchType Ltd * * 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 * * Un...
snowflakedb/spark-snowflake
src/test/scala/net/snowflake/spark/snowflake/UtilsSuite.scala
Scala
apache-2.0
5,010
/* * 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 may ...
icexelloss/spark
core/src/test/scala/org/apache/spark/ResourceName.scala
Scala
apache-2.0
963
package org.powlab.jeye.tests import org.powlab.jeye.tests.member._ import org.powlab.jeye.decompile._ package member { class MemberTest1Test extends DecompileTestClass(classOf[MemberTest1]) {} //TODO: FAIL: дженерики и инициализация в конструкторе @org.junit.Ignore class MemberTest2Test extends DecompileTe...
powlab/jeye
src/test/scala/org/powlab/jeye/tests/MemberTests.scala
Scala
apache-2.0
770
package org.skycastle.core.map /** * */ trait Ecotype { // TODO: creatures habitating in it, used to initialize habitat zone simulation for some area // Terrain surface texture (dry & wet?), slope texture // topsoil texture / type when dug? // regolith texture? // bedrock texture? // Treetypes etc? ...
zzorn/skycastle
src/main/scala/org/skycastle/core/map/Ecotype.scala
Scala
gpl-2.0
390
package scommons.client.ui.popup import scommons.client.ui.popup.raw.NativeModal._ import scommons.react._ case class PopupProps(onClose: () => Unit, closable: Boolean = true, focusable: Boolean = true, onOpen: () => Unit = () => (), ...
viktor-podzigun/scommons
ui/src/main/scala/scommons/client/ui/popup/Popup.scala
Scala
apache-2.0
1,072
import scala.tools.partest.BytecodeTest import scala.jdk.CollectionConverters._ package p1 { package p2 { object Singleton { object Singleton { object Singleton } } } } class A1 { class B1 { class C1 } } class A2 { class B2 { class C2 } def f: B2#C2 = null } object...
martijnhoekstra/scala
test/files/jvm/t8582.scala
Scala
apache-2.0
2,369
/** * Copyright 2015 Adrian Hurtado (adrianhurt) * * 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 l...
adrianhurt/play-bootstrap3
play26-bootstrap3/module/app/views/b3/package.scala
Scala
apache-2.0
14,165
package com.samstarling.prometheusfinagle.filter import com.samstarling.prometheusfinagle.UnitTest import com.twitter.finagle.http.{Method, Request, Response, Status} import org.specs2.specification.Scope class HttpServiceLabellerSpec extends UnitTest { trait Context extends Scope { val request = Request(Metho...
samstarling/finagle-prometheus
src/test/scala/com/samstarling/prometheusfinagle/filter/HttpServiceLabellerSpec.scala
Scala
mit
942
package com.twitter.scalding import cascading.flow.FlowDef import cascading.pipe.Pipe import cascading.tuple.Fields import cascading.tuple.Tuple import cascading.tuple.TupleEntry import java.io.Serializable import com.twitter.algebird.{Monoid, Ring, Aggregator} import com.twitter.scalding.typed.{Joiner, CoGrouped2, ...
AoJ/scalding
src/main/scala/com/twitter/scalding/TypedPipe.scala
Scala
apache-2.0
18,181
package sledtr.source import scala.collection.mutable.Map import sledtr.shelf._ import sledtr.section._ import sledtr.MyPreDef._ import sledtr.plugin._ import sledtr.actors._ import sledtr._ import scala.xml._ class Ch2 private(chapter: Chapter, map: ConfigMap) extends Source(chapter, map) { val params: Map[String, ...
K2Da/sledtr
src/main/scala/sledtr/source/Ch2.scala
Scala
gpl-3.0
1,481
/* Stratagem is a model checker for transition systems described using rewriting rules and strategies. Copyright (C) 2013 - SMV@Geneva University. Program written by Edmundo Lopez Bobeda <edmundo [at] lopezbobeda.net>. This program is free software; you can redistribute it and/or modify it under the terms of the GNU G...
didierbuchs/oldstratagem
src/test/scala/ch/unige/cui/smv/stratagem/adt/ADTTest.scala
Scala
gpl-2.0
5,222
package web.base import com.sun.net.httpserver.HttpExchange import scala.collection.mutable.HashMap /** * Introduces http server with the possibility to respond as a PartialFunction reply * * @author Tibor Botos */ abstract class SimpleHttpServer extends SimpleHttpServerBase { def handle(exchange: HttpExchang...
tiborbotos/domino
domino-testweb/src/main/scala/web/base/SimpleHttpServer.scala
Scala
lgpl-3.0
724
package mesosphere.marathon.core.task.termination.impl import akka.Done import akka.actor.ActorRef import mesosphere.marathon.core.task.Task import mesosphere.marathon.core.task.termination.{ TaskKillReason, TaskKillService } import org.slf4j.LoggerFactory import scala.concurrent.{ Future, Promise } import scala.coll...
timcharper/marathon
src/main/scala/mesosphere/marathon/core/task/termination/impl/TaskKillServiceDelegate.scala
Scala
apache-2.0
1,247
package com.tuvistavie.scalog package models sealed trait UserInput case class Import(module: String) extends UserInput case class Query(formula: Formula, seenRules: List[Rule] = List.empty) extends UserInput { def atoms: List[Atom] = formula.atoms }
tuvistavie/scalog
src/main/scala/com/tuvistavie/scalog/models/Query.scala
Scala
mit
256
/* * 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 may ...
brandon-edwards/incubator-spot
spot-ml/src/test/scala/org/apache/spot/utilities/DomainProcessorTest.scala
Scala
apache-2.0
5,964
/* * 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 may ...
amplab/spark-indexedrdd
src/test/scala/edu/berkeley/cs/amplab/spark/indexedrdd/KeySerializerSuite.scala
Scala
apache-2.0
3,781
package com.twitter.finatra.http.integration.doeverything.main.domain import com.twitter.finatra.request.Header case class CreateUserRequest( @Header requestId: String, name: String, age: Int)
joecwu/finatra
http/src/test/scala/com/twitter/finatra/http/integration/doeverything/main/domain/CreateUserRequest.scala
Scala
apache-2.0
202
package at.logic.gapt.formats.shlk_parsing import at.logic.gapt.formats.simple.TypeParsers import at.logic.gapt.proofs.HOLSequent import at.logic.gapt.proofs.lk.solve import scala.util.parsing.combinator._ import scala.util.matching.Regex import java.io.InputStreamReader import at.logic.gapt.expr.schema._ import at.l...
loewenheim/gapt
src/main/scala/at/logic/gapt/formats/shlk/sFOparser.scala
Scala
gpl-3.0
37,153
/* * * ____ __ ____________ ______ * / __/______ _/ /__ /_ __/ _/ //_/_ / * _\\ \\/ __/ _ `/ / _ `// / _/ // ,< / /_ * /___/\\__/\\_,_/_/\\_,_//_/ /___/_/|_| /___/ * * A PGF/TIKZ plot library for Scala. * */ package scalatikz.pgf.automata.enums import enumeratum._ import scala.collectio...
vagmcs/ScalaTIKZ
src/main/scala/scalatikz/pgf/automata/enums/EdgeType.scala
Scala
lgpl-3.0
929
package example.base.hook import example.base.logging.Logger import scalikejdbc.GlobalSettings trait Listener { self: Logger => GlobalSettings.queryCompletionListener = (sql: String, params: scala.collection.Seq[Any], millis: Long) => { logger.info( Map( "sql" -> sql, "params" ...
t-mochizuki/scala-study
template/base/src/main/scala/example/base/hook/Listener.scala
Scala
mit
771
package chandu0101.scalajs.react.components.materialui import japgolly.scalajs.react._ import materialui.Mui import scala.scalajs.js import scala.scalajs.js.Dynamic.{literal => json} import scala.scalajs.js.{Array => JArray} /** * key: PropTypes.string, style: PropTypes.js.Any, ref: PropTypes.String, className: R...
saileshs/scalajs-react-components
core/src/main/scala/chandu0101/scalajs/react/components/materialui/MuiMenus.scala
Scala
apache-2.0
8,234
package at.logic.gapt.provers.sat import at.logic.gapt.expr._ import org.specs2.mutable._ class MiniSATTest extends Specification { if ( !MiniSAT.isInstalled ) skipAll "find a model for an atom" in { MiniSAT.solve( SATProblems.getProblem1() ) must beSome } "see that Pc and -Pc is unsat" in { MiniSAT.solve( SA...
gebner/gapt
tests/src/test/scala/at/logic/gapt/provers/sat/MiniSATTest.scala
Scala
gpl-3.0
1,322
package com.sksamuel.akka.patterns import akka.actor.{Actor, ActorRef} import scala.collection.mutable.{Map => MMap} /** @author Stephen Samuel */ class Resequencer(target: ActorRef, sequenceStart: Int = 1) extends Actor { val buffer = MMap.empty[Int, Envelope[_]] var expectedSequenceNo = sequenceStart def re...
stoopbrain/akka-patterns
src/main/scala/com/sksamuel/akka/patterns/Resequencer.scala
Scala
apache-2.0
816
/* * Copyright (c) 2012-2016 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apach...
haensel-ams/snowplow
3-enrich/scala-common-enrich/src/test/scala/com.snowplowanalytics.snowplow.enrich.common/enrichments/registry/apirequest/OutputSpec.scala
Scala
apache-2.0
2,479
package sampler.example.abc.flockMortality.util import scala.language.existentials import org.apache.commons.math3.distribution.NormalDistribution import org.apache.commons.math3.random.MersenneTwister import org.apache.commons.math3.random.RandomGenerator import org.apache.commons.math3.random.SynchronizedRandomGener...
tearne/Sampler
sampler-examples/src/main/scala/sampler/example/abc/flockMortality/util/Model.scala
Scala
apache-2.0
6,532
package org.jetbrains.plugins.scala.lang.parameterInfo.functionParameterInfo class FunctionParameterInfoFunctionTypeTest extends FunctionParameterInfoTestBase { override def getTestDataPath: String = s"${super.getTestDataPath}functionType/" def testFunctionType(): Unit = doTest() def testFunctionTypeTwo():...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/parameterInfo/functionParameterInfo/FunctionParameterInfoFunctionTypeTest.scala
Scala
apache-2.0
387
package scala.collection.immutable import java.lang.Integer.bitCount import java.lang.Math.ceil private[immutable] final object Node { final val HashCodeLength = 32 final val BitPartitionSize = 5 final val BitPartitionMask = (1 << BitPartitionSize) - 1 final val MaxDepth = ceil(HashCodeLength.toDouble / ...
rorygraves/perf_tester
corpus/scala-library/src/main/scala/collection/immutable/ChampCommon.scala
Scala
apache-2.0
5,381
package mesosphere.marathon package integration.setup import java.io.File import java.lang.management.ManagementFactory import java.net.{URLDecoder, URLEncoder} import java.nio.charset.Charset import java.nio.file.Files import java.util.UUID import java.util.concurrent.ConcurrentLinkedQueue import akka.Done import ak...
gsantovena/marathon
tests/integration/src/test/scala/mesosphere/marathon/integration/setup/MarathonTest.scala
Scala
apache-2.0
39,834
package feh.tec.agent.game import feh.tec.util._ import concurrent.{Promise, ExecutionContext, Future, Await} import java.util.UUID import akka.pattern._ import scala.concurrent.duration._ import scala.collection.mutable import akka.actor.{ActorSystem, Props, Actor, ActorRef} import feh.tec.util.HasUUID.AsyncSendMsgHa...
fehu/agent-tareas
agent/src/main/scala/feh/tec/agent/game/Game.scala
Scala
mit
15,721
/* * 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 may ...
BryanCutler/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/namedExpressions.scala
Scala
apache-2.0
15,984
package com.github.izmailoff.marshalling.objectid import org.bson.types.ObjectId import spray.httpx.unmarshalling.{Deserializer, MalformedContent} import spray.routing.PathMatcher trait ObjectIdSupport { implicit val String2ObjectIdDeserializer = new Deserializer[String, ObjectId] { def apply(value: String) = ...
izmailoff/Spray-mongo-record
marshallers/src/main/scala/com/github/izmailoff/marshalling/objectid/ObjectIdSupport.scala
Scala
mit
764
package controllers import javax.inject.{Inject, Singleton} import io.flow.healthcheck.v0.models.json._ import io.flow.healthcheck.v0.models.Healthcheck import play.api.mvc._ import play.api.libs.json._ @Singleton class Healthchecks @Inject() ( val controllerComponents: ControllerComponents ) extends BaseControlle...
flowcommerce/dependency
api/app/controllers/Healthchecks.scala
Scala
mit
465
package tech.sda.arcana.spark.classification.cnn import com.intel.analytics.bigdl.nn.ClassNLLCriterion import tech.sda.arcana.spark.neuralnetwork.model.DyLeNet5Model import com.intel.analytics.bigdl.nn.L1Cost import tech.sda.arcana.spark.neuralnetwork.model.AlexNetModel import tech.sda.arcana.spark.neuralnetwork.model....
SmartDataAnalytics/ARCANA
src/main/scala/tech/sda/arcana/spark/classification/cnn/Trainer.scala
Scala
gpl-3.0
5,800
package forms import com.google.inject.Inject import models.token.JwtToken import play.api.data.Form import play.api.data.Forms._ import services.jwt.authenticator.JwtAuthenticator class JwtTokenForm @Inject()(jwtAuthenticator: JwtAuthenticator) { val form = Form( mapping( "jwtToken" -> text )(jwtAuth...
GMadorell/play-jwt
app/forms/JwtTokenForm.scala
Scala
mit
382
/* * 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 may ...
ConeyLiu/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/HashAggregateExec.scala
Scala
apache-2.0
46,184
package com.cloudwick.generator.benchmarks import com.cloudwick.generator.utils.Utils /** * Benchmark runs (internal only) * @author ashrith */ object Benchmark extends App { val utils = new Utils utils.time("concatenating random ip addresses using mkString()") { val random = scala.util.Random (1 to ...
vaagrawa/generator
src/main/scala/com/cloudwick/generator/benchmarks/Benchmark.scala
Scala
apache-2.0
807
package octopus.example.domain import octopus.dsl._ import octopus.{AppError, AsyncValidatorM} import scala.language.higherKinds trait EmailService[M[_]] { def isEmailTaken(email: String): M[Boolean] def doesDomainExists(email: String): M[Boolean] } trait GeoService[M[_]] { def doesPostalCodeExist(postalCode:...
krzemin/octopus
octopus/src/test/scala/octopus/example/domain/AsyncValidators.scala
Scala
apache-2.0
1,816
package com.twitter.scrooge.goldfile import com.twitter.io.Files import com.twitter.scrooge.Main import com.twitter.scrooge.testutil.TempDirectory import java.io.File import java.util.regex.Pattern import org.scalatest.{BeforeAndAfter, FunSuite} import scala.io.Source /** * Compares the output of a generator to a se...
thirstycrow/scrooge
scrooge-generator-tests/src/test/scala/com/twitter/scrooge/goldfile/GoldFileTest.scala
Scala
apache-2.0
3,442
package com.realitygames.couchbase import com.couchbase.client.java.view.{Stale, ViewQuery} import com.realitygames.couchbase.json.circe._ import com.realitygames.couchbase.models.TestStructure import com.realitygames.couchbase.query.QueryResult.SuccessQueryResult import io.circe.generic.auto._ import org.scalatest.co...
RealityGamesLtd/couchbase-java-sdk-scala-wrapper
src/test/scala/com/realitygames/couchbase/ScalaAsyncBucketViewQueryTest.scala
Scala
mit
4,638
/* * #%L * GatlingCql * %% * Copyright (C) 2014 Mikhail Stepura * %% * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to...
infomaven/GatlingCql
src/test/scala/io/github/gatling/cql/CqlCompileTest.scala
Scala
mit
2,826
package lila.common import org.joda.time.{ DateTime, DateTimeZone } import play.api.data.format.Formats._ import play.api.data.format.Formatter import play.api.data.FormError import play.api.data.Forms._ import play.api.libs.json._ object Form { def options(it: Iterable[Int], pattern: String) = it map { d => d...
clarkerubber/lila
modules/common/src/main/Form.scala
Scala
agpl-3.0
2,466
package nasa.nccs.cdas.kernels import java.io._ import scala.xml import java.nio.{ByteBuffer, ByteOrder, FloatBuffer} import nasa.nccs.cdapi.cdm._ import nasa.nccs.cdapi.data.{HeapFltArray, _} import nasa.nccs.cdapi.tensors.CDFloatArray.{ReduceNOpFlt, ReduceOpFlt, ReduceWNOpFlt} import nasa.nccs.cdapi.tensors.{CDArr...
nasa-nccs-cds/CDAS2
src/main/scala/nasa/nccs/cdas/kernels/process.scala
Scala
gpl-2.0
62,317
package com.bwsw.commitlog import java.io._ import java.security.{DigestOutputStream, MessageDigest} import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.{AtomicInteger, AtomicLong, AtomicReference} import javax.xml.bind.DatatypeConverter import com.bwsw.commitlog.CommitLogFlushPolicy.{ICommitLogFl...
bwsw/tstreams-transaction-server
src/main/scala/com/bwsw/commitlog/CommitLog.scala
Scala
apache-2.0
5,184
/** * Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0 * See accompanying LICENSE file. */ package kafka.manager import java.util.Properties import akka.actor.{ActorRef, ActorSystem, Props} import akka.pattern._ import akka.util.Timeout import com.typesafe.config.{Config, ConfigFactory} imp...
wking1986/kafka-manager
test/kafka/manager/TestKafkaManagerActor.scala
Scala
apache-2.0
4,882
package lv.ddgatve.math class Chunk(val tstamp:String, val text:String) { val cc = tstamp.split(":") val seconds = 60*cc(0).toInt + cc(1).toInt def getSeconds(): Int = seconds }
kapsitis/ddgatve-stat
src/main/scala/lv/ddgatve/math/Chunk.scala
Scala
apache-2.0
191
/* * Copyright 2013 Twitter Inc. * * 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...
twitter/storehaus
storehaus-mysql/src/test/scala/com/twitter/storehaus/mysql/MySqlStoreProperties.scala
Scala
apache-2.0
6,572
/* *\\ ** \\ \\ / _) \\ \\ / \\ | ** ** \\ \\ / | __ \\ _ \\ __| \\ \\ / |\\/ | ** ** \\ \\ / | | | __/ | \\ \\ / | | ** ** \\_/ _| .__/ \\___| _| \\_/ _| _| ** ** _| ...
hsyl20/Scala_ViperVM
src/main/scala/org/vipervm/runtime/mm/data/Matrix.scala
Scala
gpl-3.0
3,125
/* * Copyright 2017 Datamountaineer. * * 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...
datamountaineer/stream-reactor
kafka-connect-hazelcast/src/test/scala/com/datamountaineer/streamreactor/connect/hazelcast/sink/TestHazelCastSinkConnector.scala
Scala
apache-2.0
1,413
package io.udash.bootstrap package dropdown import com.avsystem.commons.misc.{AbstractCase, AbstractValueEnum, AbstractValueEnumCompanion, EnumCtx} import io.udash._ import io.udash.bindings.modifiers.Binding import io.udash.bindings.modifiers.Binding.NestedInterceptor import io.udash.bootstrap.button.UdashButton impo...
UdashFramework/udash-core
bootstrap4/.js/src/main/scala/io/udash/bootstrap/dropdown/UdashDropdown.scala
Scala
apache-2.0
12,118
package ch.ninecode.model import com.esotericsoftware.kryo.Kryo import com.esotericsoftware.kryo.Serializer import com.esotericsoftware.kryo.io.Input import com.esotericsoftware.kryo.io.Output import org.apache.spark.sql.Row import ch.ninecode.cim.CIMClassInfo import ch.ninecode.cim.CIMContext import ch.ninecode.cim....
derrickoswald/CIMScala
CIMReader/src/main/scala/ch/ninecode/model/InfCongestionRevenueRights.scala
Scala
mit
11,442
package com.avsystem.commons package mongo.core.ops import com.avsystem.commons.mongo.BsonRef class BsonRefUpdating[T](val bsonRef: BsonRef[_, T]) extends AnyVal with BaseUpdating[T] with BsonRefKeyValueHandling[T]
AVSystem/scala-commons
commons-mongo/jvm/src/main/scala/com/avsystem/commons/mongo/core/ops/BsonRefUpdating.scala
Scala
mit
227
package wav.devtools.sbt.karaf import sbt._ object Dependencies { val slf4j = "org.slf4j" % "slf4j-api" % "1.7.12" val slf4jSimple = "org.slf4j" % "slf4j-simple" % "1.7.12" val commonsLang = "org.apache.commons" % "commons-lang3" % "3.4" val commonsIo = "commons-io" % "commons-io" % "2.4"...
wav/osgi-tooling
project/Dependencies.scala
Scala
apache-2.0
2,335
package com.sprayed.chat import akka.actor.ActorSystem import akka.event.Logging import spray.can.Http import akka.actor.Props import akka.io.IO object Boot extends App { implicit val system = ActorSystem("spray-api-service") val log = Logging(system, getClass) val service = system.actorOf(Props[SprayApiDemoS...
Wirwing/spray-sandbox
src/main/scala/com/sprayed/chat/Boot.scala
Scala
mit
423
package controllers import javax.inject.{Inject, Singleton} import akka.stream.scaladsl.{FileIO, Source} import be.objectify.deadbolt.scala.{ActionBuilders, AuthenticatedRequest} import model.auth.AdminRole import model.config.{DeadboltConfig, QuestionsServiceConfig} import model.questions.Question import play.api.li...
BandOf3/assignment-system-web
app/controllers/AdminController.scala
Scala
mit
4,274
package utils import scala.concurrent.Future import scala.concurrent.duration._ import scala.concurrent.Await /** * Utility implementation to get Results out of Futures. */ object Awaits { def get[T](sec:Int,f:Future[T]):T = { Await.result[T](f, sec seconds) } }
tnddn/iv-web
portal/rest-portal/app/utils/Awaits.scala
Scala
apache-2.0
278
package com.twitter.util import com.twitter.conversions.DurationOps._ import org.scalatest.funsuite.AnyFunSuite class ClosableOnceTest extends AnyFunSuite { private def ready[T <: Awaitable[_]](awaitable: T): T = Await.ready(awaitable, 10.seconds) test("wrap") { var closedCalls = 0 val underlying = ...
twitter/util
util-core/src/test/scala/com/twitter/util/ClosableOnceTest.scala
Scala
apache-2.0
1,258
/* * 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 may ...
sgururajshetty/carbondata
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/mutation/DeleteExecution.scala
Scala
apache-2.0
14,986
/* * 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 may ...
mike0sv/spark
sql/core/src/main/scala/org/apache/spark/sql/jdbc/OracleDialect.scala
Scala
apache-2.0
3,758
package gust.linalg.cuda import breeze.generic.UFunc import jcuda.jcublas.{JCublas2, cublasHandle} import breeze.linalg.{DenseMatrix, DenseVector} import org.netlib.util.intW import jcuda.driver.{CUfunction, CUmodule, JCudaDriver} import gust.util.cuda.{CuContext, CuDevice} import spire.syntax.cfor._ import gust.linal...
piotrMocz/gust
src/main/scala/gust/linalg/cuda/CuQR.scala
Scala
apache-2.0
12,536
package com.typesafe.slick.testkit.tests import com.typesafe.slick.testkit.util.{AsyncTest, JdbcTestDB} import org.junit.Assert._ import slick.ast.ColumnOption import slick.model._ import slick.jdbc.SQLiteProfile import slick.jdbc.meta.MTable import slick.relational.RelationalProfile import slick.sql.SqlProfile @d...
nafg/slick
slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/ModelBuilderTest.scala
Scala
bsd-2-clause
20,040
/* * * * Copyright 2015 Skymind,Inc. * * * * 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...
Mageswaran1989/aja
src/main/scala/org/aja/dhira/src/main/scala/org/dhira/core/util/StringCluster.scala
Scala
apache-2.0
2,908
class Foo[T[_, _], F[_], A, B](val fa: T[F[A], F[B]]) object Test { def x[T[_, _]](tmab: T[Either[Int, String], Either[Int, Int]]) = new Foo(tmab) }
lampepfl/dotty
tests/pos/i9478.scala
Scala
apache-2.0
156
package mapmartadero package model import net.liftweb.record.{Field, MetaRecord, Record} import net.liftweb.squerylrecord.KeyedRecord import org.squeryl.annotations._ import net.liftweb.record.field._ import net.liftweb.http.{Templates, SHtml, S, RequestVar} import org.squeryl.dsl.{OneToMany, ManyToOne} import net.lif...
jgenso/mapamartadero
src/main/scala/mapmartadero/model/ActivityType.scala
Scala
apache-2.0
1,215
/* * Part of NDLA learningpath-api. * Copyright (C) 2016 NDLA * * See LICENSE * */ package no.ndla.learningpathapi.validation import io.lemonlabs.uri.dsl._ import no.ndla.learningpathapi.model.api.ValidationMessage class UrlValidator() { val noHtmlTextValidator = new TextValidator(allowHtml = false) def v...
NDLANO/learningpath-api
src/main/scala/no/ndla/learningpathapi/validation/UrlValidator.scala
Scala
gpl-3.0
1,265
package at.logic.gapt.proofs import at.logic.gapt.expr.Polarity.{ Negative, Positive } import at.logic.gapt.expr.{ Formula, Polarity } import at.logic.gapt.formats.babel.{ BabelExporter, BabelSignature } import cats.Functor import cats.kernel.Monoid import scala.collection.GenTraversable /** * Represents an index o...
gebner/gapt
core/src/main/scala/at/logic/gapt/proofs/sequents.scala
Scala
gpl-3.0
15,594
package org.apache.flink.contrib.tensorflow.graphs import org.tensorflow.Graph /** * Abstract loader to inspect and load a graph. */ trait GraphLoader { /** * Load the graph. */ def load(): Graph }
cookieai/flink-tensorflow
flink-tensorflow/src/main/scala/org/apache/flink/contrib/tensorflow/graphs/GraphLoader.scala
Scala
apache-2.0
209
package com.arcusys.learn.models.request import com.arcusys.learn.service.util.Parameter import com.arcusys.valamis.model.SkipTake import org.scalatra.ScalatraBase import com.arcusys.learn.models.BaseCollectionRequest object UserRequest extends BaseCollectionRequest { val UserId = "userID" val ResultAs = "resultA...
ViLPy/Valamis
learn-portlet/src/main/scala/com/arcusys/learn/models/request/UserRequest.scala
Scala
lgpl-3.0
1,882
/* * Copyright (C) 2015 Stratio (http://stratio.com) * * 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 app...
danielcsant/sparta
sdk/src/test/scala/com/stratio/sparta/sdk/OperatorEntityCountTest.scala
Scala
apache-2.0
1,758
package processes.freeMonads.vanillaScala.multiple import scala.concurrent.Future import play.api.mvc.AnyContent import play.api.mvc.Request import play.api.mvc.Result import processes.PatchAssignment import processes.Services import processes.freeMonads.Id import processes.freeMonads.multiple.HappyFlowOnlyProgramPar...
EECOLOR/scala-clean-code-patterns
src/main/scala/processes/freeMonads/vanillaScala/multiple/HappyFlowOnly.scala
Scala
mit
2,045
package smtlib package theories package experimental import trees.Terms._ import Strings._ import Ints.NumeralLit import org.scalatest.funsuite.AnyFunSuite import org.scalatest.matchers.should.Matchers class StringsTests extends AnyFunSuite with Matchers { override def suiteName = "Strings theory test suite" ...
regb/scala-smtlib
src/test/scala/smtlib/theories/experimental/StringsTests.scala
Scala
mit
4,264
package gdg.blaze import gdg.blaze.codec.PlainCodec import org.apache.spark.streaming.dstream.DStream trait Plugin extends Serializable trait Filter extends Plugin with ((DStream[Message]) => DStream[Message]) trait Input extends Plugin with (() => DStream[Message]) trait CodecFactory[T <:Codec] extends ((PluginC...
micahrupersburg/blaze-of-glory
src/main/scala/gdg/blaze/Plugin.scala
Scala
apache-2.0
1,485
package pureconfig.module import org.joda.time.format.{DateTimeFormat, DateTimeFormatter} import org.joda.time.{DateTimeZone, Duration, Instant, Interval} import pureconfig.ConfigConvert.{catchReadError, viaNonEmptyString} import pureconfig.{ConfigConvert, ConfigReader} package object joda { implicit def instantCo...
melrief/pureconfig
modules/joda/src/main/scala/pureconfig/module/joda/package.scala
Scala
mpl-2.0
1,044
/* * Copyright 2012 Comcast Cable Communications Management, LLC * * 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 require...
Comcast/money
money-core/src/main/scala/com/comcast/money/core/async/ConfigurableNotificationHandler.scala
Scala
apache-2.0
816
/* * Copyright (c) 2016 SnappyData, Inc. All rights reserved. * * 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 ap...
vjr/snappydata
cluster/src/test/scala/org/apache/spark/sql/IndexTest.scala
Scala
apache-2.0
9,666
package net.andimiller.iql import scala.util.Try import cats.syntax._ import cats.implicits._ import cats._ import cats.data._ object Parser { import fastparse.all._ case class NamedFunction[T, V](f: T => V, name: String) extends (T => V) { def apply(t: T) = f(t) override def toString() = name ...
andimiller/integrated-query-language
core/shared/src/main/scala/net/andimiller/iql/Parser.scala
Scala
mit
4,246
package chat.tox.antox.callbacks import android.content.Context import chat.tox.antox.data.State import chat.tox.antox.wrapper.FriendInfo import im.tox.tox4j.core.enums.ToxUserStatus class AntoxOnUserStatusCallback(private var ctx: Context) { def friendStatus(friendInfo: FriendInfo, status: ToxUserStatus)(state: U...
wiiam/Antox
app/src/main/scala/chat/tox/antox/callbacks/AntoxOnUserStatusCallback.scala
Scala
gpl-3.0
414
package inloopio.indicator import inloopio.collection.ArrayList import inloopio.math.timeseries.Null import inloopio.math.timeseries.TBaseSer import inloopio.math.timeseries.TStampedMapBasedList import inloopio.math.timeseries.TVar import inloopio.math.indicator.Plot import java.awt.Color import scala.collection.immut...
dcaoyuan/inloopio-libs
inloopio-indicator/src/main/scala/inloopio/indicator/SpotIndicator.scala
Scala
bsd-3-clause
3,445
/* * 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 may ...
bravo-zhang/spark
mllib/src/main/scala/org/apache/spark/ml/linalg/JsonMatrixConverter.scala
Scala
apache-2.0
3,188
package fr.neuville.lombok import com.intellij.codeInspection.LocalQuickFix import de.plushnikov.intellij.lombok.problem.ProblemBuilder sealed trait Problem { def message: String def fixes: Seq[LocalQuickFix] } case class Error(message: String, fixes: LocalQuickFix*) extends Problem case class Warning(message: St...
gneuvill/lombok-intellij-plugin
processor-core/src/main/scala/fr/neuville/lombok/Problem.scala
Scala
bsd-2-clause
604
/* * Copyright 2001-2019 Artima, Inc. * * 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 agre...
dotty-staging/scalatest
scalatest/src/main/scala/org/scalatest/matchers/dsl/package.scala
Scala
apache-2.0
799
/* Copyright 2012 Twitter, Inc. 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 writing, software distr...
AoJ/scalding
src/main/scala/com/twitter/scalding/serialization/KryoHadoop.scala
Scala
apache-2.0
4,750