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 (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.internal.scaladsl.persistence.cassandra import akka.actor.ActorSystem import com.lightbend.lagom.internal.persistence.ReadSideConfig import com.lightbend.lagom.internal.persistence.cassandra.CassandraReadSideSetti...
rcavalcanti/lagom
persistence-cassandra/scaladsl/src/main/scala/com/lightbend/lagom/internal/scaladsl/persistence/cassandra/ScaladslCassandraOffsetStore.scala
Scala
apache-2.0
870
package diameter.Dictionary case class DictionaryApplication(val id:Long, val name:String) extends DictionaryObject { override def toString() = {id +"["+name+"]"} def ==(that:DictionaryApplication):Boolean = {id == that.id} } object DictionaryApplication { def apply(id:Int)(implicit dictionary:GenericDictionary...
dbuhryk/DiameterCoder
Diameter/src/main/scala/diameter/Dictionary/DictionaryApplication.scala
Scala
mit
860
package net.shift package common import net.shift.security.SecurityFailure import scala.util.{Failure, Success, Try} trait Functor[F[_]] { def unit[A](a: A): F[A] def fmap[A, B](f: A => B): F[A] => F[B] } trait ApplicativeFunctor[F[_]] extends Functor[F] { def <*>[A, B](f: F[A => B]): F[A] => F[B] def map2...
mariusdanciu/shift
shift-common/src/main/scala/net/shift/common/FunctionalDefs.scala
Scala
apache-2.0
4,161
/* * Copyright 2017 HM Revenue & Customs * * 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...
liquidarmour/ct-calculations
src/test/scala/uk/gov/hmrc/ct/computations/MachineryAndPlantValidationSpec.scala
Scala
apache-2.0
21,661
/* * Copyright (c) 2013-16 Miles Sabin * * 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 agr...
lambdista/shapeless
core/src/test/scala/shapeless/singletons.scala
Scala
apache-2.0
16,080
package jp.co.bizreach.elasticsearch4s.generator case class ESCodegenConfig( outputDir: String = "src/main/scala", packageName: String = "models", jsonFiles: Seq[String] = Seq("schema.json"), classMappings: Map[String, String] = Map.empty, typeMappings: Map[String, String] = Map.empty, arrayProperties: Map...
dasoran/elastic-scala-httpclient
elastic-scala-codegen/src/main/scala/jp/co/bizreach/elasticsearch4s/generator/ESCodegenConfig.scala
Scala
apache-2.0
2,168
package com.mesosphere.cosmos.thirdparty.marathon.model case class MarathonAppContainer(`type`: String, docker: Option[MarathonAppContainerDocker])
movicha/cosmos
cosmos-model/src/main/scala/com/mesosphere/cosmos/thirdparty/marathon/model/MarathonAppContainer.scala
Scala
apache-2.0
149
import http.HttpServer import stock.mock.MockStockPriceService // Mock server object Mock extends App with HttpServer with MockStockPriceService { // Increment port to allow simultaneous real and mock servers override def port = super.port + 1 }
linearregression/akka-streams-http-intro
src/test/scala/Mock.scala
Scala
apache-2.0
259
/* * Copyright 2016 The BigDL Authors. * * 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 agr...
intel-analytics/BigDL
scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/nn/internal/Merge.scala
Scala
apache-2.0
8,008
/*********************************************************************** * Copyright (c) 2017-2020 IBM * Copyright (c) 2013-2020 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which ac...
ccri/geomesa
geomesa-cassandra/geomesa-cassandra-datastore/src/main/scala/org/locationtech/geomesa/cassandra/package.scala
Scala
apache-2.0
1,161
/* * 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...
avibryant/algebird
algebird-util/src/test/scala/com/twitter/algebird/util/UtilAlgebraProperties.scala
Scala
apache-2.0
1,594
/* * 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 ...
yelshater/hadoop-2.3.0
spark-core_2.10-1.0.0-cdh5.1.0/src/main/scala/org/apache/spark/TaskEndReason.scala
Scala
apache-2.0
2,530
/** * Author : Florian Simon <florian@tentwentyfour.lu> * Role : Alternate entry point that spawns a preconfigured game * (used for testing). */ import Game.{Character, Facts, Game, Grid, Point, Stat, Team}; import Views.Swing.SwingInterface; import Controllers.GameView; import scala.swing.Color; import...
floriansimon1/learning.trpg
src/PreconfiguredGame.scala
Scala
mit
2,705
package controllers.api.protocol import play.api.libs.json.Json /** * Wrapper to generate a response that has an array of users. * * @param users A list of users */ case class UsersResponse(users: List[UserProtocolModel]) /** * The companion object. Provides implicit Json formatting. */ object UsersRespo...
HiP-App/HiPCMS
app/controllers/api/protocol/UsersResponse.scala
Scala
apache-2.0
400
package io.circe import io.circe.scalajs.convertJsToJson import scala.scalajs.js.JSON import scala.util.control.NonFatal package object parser extends Parser { final def parse(input: String): Either[ParsingFailure, Json] = ( try convertJsToJson(JSON.parse(input)) catch { case NonFatal(exception) => Le...
travisbrown/circe
modules/parser/js/src/main/scala/io/circe/parser/package.scala
Scala
apache-2.0
551
package spark.storage import java.nio.ByteBuffer import akka.actor._ import org.scalatest.FunSuite import org.scalatest.BeforeAndAfter import org.scalatest.PrivateMethodTester import org.scalatest.concurrent.Eventually._ import org.scalatest.concurrent.Timeouts._ import org.scalatest.matchers.ShouldMatchers._ import...
koeninger/spark
core/src/test/scala/spark/storage/BlockManagerSuite.scala
Scala
bsd-3-clause
28,670
/* * Copyright (c) 2011-15 Miles Sabin * * 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 agr...
liff/shapeless
core/src/main/scala/shapeless/ops/maps.scala
Scala
apache-2.0
1,625
/* * Copyright 2009-2010 LinkedIn, 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 ...
thesiddharth/norbert
network/src/main/scala/com/linkedin/norbert/network/NetworkServerComponent.scala
Scala
apache-2.0
2,121
package fr.univ.nantes.roomanager import fr.univ.nantes.roomanager.Origine.Origine import fr.univ.nantes.roomanager.Titre.Titre class Demandeur(var no_dem: Int, var nom: String, var adresse: Adresse, var origine: Origine, var titre: Titre) { var reser...
P1erreGaultier/workspace
Roomanager/src/scala/fr/univ/nantes/roomanager/Demandeur.scala
Scala
unlicense
356
/* * Copyright (c) 2013 */ package controllers import play.api.data.Form import play.api.libs.json._ import play.api.libs.functional.syntax._ abstract class JsResponse(status: String, message: String, data: JsValue = JsString("")) { def getStatus = status def getMessage = message def getData = data } case c...
kompot/play2sec
test/controllers/JsResponse.scala
Scala
apache-2.0
890
package com.avsystem.commons package redis.util import java.io.{DataInputStream, DataOutputStream} import akka.util._ import com.avsystem.commons.serialization.{GenCodec, StreamInput, StreamOutput} /** * Author: ghik * Created: 27/09/16. */ object ByteStringSerialization { def write[T: GenCodec](value: T): B...
AVSystem/scala-commons
commons-redis/src/main/scala/com/avsystem/commons/redis/util/ByteStringSerialization.scala
Scala
mit
629
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * 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 * * https://www.apache.org/licenses/LICENSE...
adarro/ddo-calc
subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/religions/Amaunator.scala
Scala
apache-2.0
1,008
/* * Copyright 2016 The BigDL Authors. * * 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 agr...
intel-analytics/BigDL
scala/dllib/src/test/scala/com/intel/analytics/bigdl/dllib/models/ModelGraientCheckSpec.scala
Scala
apache-2.0
7,003
/* * 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 ...
gioenn/xSpark
mllib/src/main/scala/org/apache/spark/ml/clustering/GaussianMixture.scala
Scala
apache-2.0
14,061
package io.youi.material.impl import scala.scalajs.js @js.native trait MDCTopAppBarImplementation extends js.Object { }
outr/youi
gui/src/main/scala/io/youi/material/impl/MDCTopAppBarImplementation.scala
Scala
mit
122
package pl.combosolutions object TestTag { val IntegrationTest = "integration" val FunctionalTest = "functional" val UnitTest = "unit" val DisabledTest = "disabled" }
sriramkp/test01
modules/common/src/test/scala/pl/combosolutions/TestTag.scala
Scala
mit
176
/* * 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 ...
aniketadnaik/carbondataStreamIngest
integration/spark2/src/main/scala/org/apache/spark/sql/internal/CarbonSqlConf.scala
Scala
apache-2.0
7,867
/* * Copyright 2017 Zhang Di * * 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 ...
statgenetics/seqspark
src/main/scala/org/dizhang/seqspark/ds/Region.scala
Scala
apache-2.0
6,295
package sampler.abc.actor.root.state import org.scalatest.FreeSpec class GatheringTest extends FreeSpec { "Gathering should" - { "Ignore report completed message" in { fail("TODO") } "Worker failure triggers allocation of new job" in { fail("TODO") // TODO consider ability to realloca...
tearne/Sampler
sampler-abc/src/test/scala/sampler/abc/actor/root/state/GatheringTest.scala
Scala
apache-2.0
964
package scalakurs.option sealed trait Gender case object Female extends Gender case object Male extends Gender case class User(id: Int, firstName: String, lastName: String, age: Int, gender: Option[Gender], spouseId: Option[Int]) { laz...
elacin/scala-kurs
oppgaver/src/main/scala/scalakurs/option/UserRepository.scala
Scala
apache-2.0
847
package org.jetbrains.plugins.scala.annotator.element import com.intellij.lang.annotation.HighlightSeverity import com.intellij.openapi.project.Project import com.intellij.openapi.util.TextRange import com.intellij.psi.PsiFile import junit.framework.Test import org.jetbrains.plugins.scala.annotator.AnnotatorHolderMock...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/annotator/element/ScStringLiteralAnnotatorTest.scala
Scala
apache-2.0
3,376
/* * Copyright © 2014 TU Berlin (emma@dima.tu-berlin.de) * * 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...
emmalanguage/emma
emma-lib-flink/src/test/scala/org/emmalanguage/lib/ml/clustering/KMeansFlinkSpec.scala
Scala
apache-2.0
1,392
/* * Copyright 2011-2014 Chris de Vreeze * * 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 agree...
EBPI/yaidom
src/main/scala/nl/ebpi/yaidom/queryapi/ScopedElemApi.scala
Scala
apache-2.0
3,553
package gr.cslab.ece.ntua.musqle.plan.hypergraph import java.util import gr.cslab.ece.ntua.musqle.MuSQLEContext import gr.cslab.ece.ntua.musqle.engine._ import gr.cslab.ece.ntua.musqle.plan.Cache import gr.cslab.ece.ntua.musqle.plan.spark._ import org.apache.log4j.Logger import scala.collection.JavaConversions._ imp...
gsvic/MuSQLE
src/main/scala/gr/cslab/ece/ntua/musqle/plan/hypergraph/DPhyp.scala
Scala
apache-2.0
8,653
/** * Copyright (C) 2014 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 ap...
Stratio/streaming-cep-engine
api/src/test/scala/com/stratio/decision/api/StreamingAPIListOperationTest.scala
Scala
apache-2.0
4,426
/* * Copyright (C) 2015 Original Work Marios Iliofotou * Copyright (C) 2016 Modified Work Benjamin Finley * * This file is part of ReSurfAlt. * * ReSurfAlt is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundatio...
finleyb/ReSurfAlt
src/test/scala/com/resurf/common/TestTemplate.scala
Scala
gpl-2.0
1,543
/* * Copyright (c) 2013-2019 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.a...
RetentionGrid/snowplow
2-collectors/scala-stream-collector/core/src/main/scala/com.snowplowanalytics.snowplow.collectors.scalastream/monitoring/JMX.scala
Scala
apache-2.0
2,026
/** * Licensed to the Minutemen Group under one or more contributor license * agreements. See the COPYRIGHT file distributed with this work for * additional information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in complian...
mohiva/silhouette
modules/authenticator/src/main/scala/silhouette/authenticator/AuthenticatorProvider.scala
Scala
apache-2.0
2,216
/******************************************************************************* * Copyright 2010 Olaf Sebelin * * This file is part of Verdandi. * * Verdandi is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Found...
osebelin/verdandi
src/main/scala/verdandi/ui/workdayeditor/WorkDayEditorAction.scala
Scala
gpl-3.0
3,891
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This file is part of Rudder. * * Rudder is free software: you can redistribute it and/or modify * it under the...
bmwjanos/rudder
rudder-web/src/main/scala/com/normation/rudder/web/rest/RestDeploy.scala
Scala
gpl-3.0
2,438
/*! * Copyright 2013-2014 Dennis Hörsch. * * 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 ...
dhs3000/dropwizard-scala
src/main/scala/de/dennishoersch/util/dropwizard/views/jasmine/JasmineTestBundle.scala
Scala
apache-2.0
1,307
package io.getquill.context.mirror import scala.reflect.ClassTag import io.getquill.util.Messages.fail case class Row(data: Any*) { def add(value: Any) = Row((data :+ value): _*) def apply[T](index: Int)(implicit t: ClassTag[T]) = data(index) match { case v: T => v case other => fail(s"Invalid c...
mentegy/quill
quill-core/src/main/scala/io/getquill/context/mirror/Row.scala
Scala
apache-2.0
389
/** * Copyright (c) 2002-2012 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundati...
dksaputra/community
cypher/src/main/scala/org/neo4j/cypher/internal/pipes/matching/PatterMatchingBuilder.scala
Scala
gpl-3.0
5,784
package com.codahale.jerkson.ser import java.lang.reflect.Modifier import com.codahale.jerkson.JsonSnakeCase import com.codahale.jerkson.Util._ import com.fasterxml.jackson.core.JsonGenerator import com.fasterxml.jackson.annotation.{ JsonIgnore, JsonIgnoreProperties, JsonProperty } import com.fasterxml.jackson.databin...
mDialog/jerkson
src/main/scala/com/codahale/jerkson/ser/CaseClassSerializer.scala
Scala
mit
1,934
// Project: Default (Template) Project // Module: // Description: // Distributed under the MIT License (see included file LICENSE) package slogging /** * Common interface for LoggerS (this interface is compatible to the slf4j logging API) */ trait UnderlyingLogger { def isErrorEnabled: Boolean def isW...
jokade/slogging
shared/src/main/scala/slogging/UnderlyingLogger.scala
Scala
mit
1,902
package org.automanlang.core.policy.aggregation import java.io.ObjectInputStream object PrecompTable { def load(resource_name: String) : Option[PrecompTable] = { try { val is = new ObjectInputStream(getClass.getResourceAsStream(resource_name)) val table = is.readObject().asInstanceOf[PrecompTable] ...
dbarowy/AutoMan
libautoman/src/main/scala/org/automanlang/core/policy/aggregation/PrecompTable.scala
Scala
gpl-2.0
1,448
package debop4s.data.slick3.tests import debop4s.data.slick3.AbstractSlickFunSuite import debop4s.data.slick3.TestDatabase._ import debop4s.data.slick3.TestDatabase.driver.api._ import slick.ast.NumericTypedType /** * RelationalTypeFunSuite * @author sunghyouk.bae@gmail.com */ class RelationalTypeFunSuite extends ...
debop/debop4s
debop4s-data-slick3/src/test/scala/debop4s/data/slick3/tests/RelationalTypeFunSuite.scala
Scala
apache-2.0
2,986
package mesosphere.marathon.core import akka.actor.ActorSystem import com.google.inject.Inject import com.twitter.common.zookeeper.ZooKeeperClient import mesosphere.marathon.api.LeaderInfo import mesosphere.marathon.core.auth.AuthModule import mesosphere.marathon.core.base.{ ActorsModule, Clock, ShutdownHooks } import...
ss75710541/marathon
src/main/scala/mesosphere/marathon/core/CoreModuleImpl.scala
Scala
apache-2.0
5,754
import sbt._ object Version { final val Scala = "2.12.1" final val ScalaTest = "3.0.1" final val Vertx = "3.4.2" } object Library { val vertx_codegen = "io.vertx" % "vertx-codegen" % Version.Vertx % "provided" val vertx_lang_scala = "io.vertx" %% "vertx-lang-scala" % Version.Vertx val vertx_hazelcast = "i...
giampaolotrapasso/vertx-ydl
frontend/project/Dependencies.scala
Scala
apache-2.0
4,274
package japgolly.scalajs.react import org.scalajs.dom import scala.scalajs.js import js.{Dynamic, UndefOr, ThisFunction, ThisFunction0, Object, Any => JAny, Function => JFn} import js.annotation.{JSBracketAccess, JSName} object React extends React trait React extends Object { /** * Create a component given a sp...
russpowers/scalajs-react
core/src/main/scala/japgolly/scalajs/react/React.scala
Scala
apache-2.0
19,996
import java.lang.Thread.State import java.lang.Thread.State._ object Test { def f(state: State) = state match { case NEW | WAITING => true case RUNNABLE => false // and I forget the rest } }
yusuke2255/dotty
tests/untried/neg/sealed-java-enums.scala
Scala
bsd-3-clause
215
package biz.gsconsulting.play.loadbalancer import scala.collection.JavaConversions._ import play.api._ import biz.gsconsulting.play.util._ class LoadBalancerPlugin(app: Application) extends Plugin with Logs{ private[this] var unsafeLoadBalancers: Option[Map[String, LoadBalancer]] = None def balancers() = un...
gregsymons/play-loadbalancer
app/biz/gsconsulting/play/loadbalancer/LoadBalancerPlugin.scala
Scala
apache-2.0
1,066
/* * 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 ...
prccaraujo/openwhisk
tests/src/test/scala/whisk/core/controller/test/migration/SequenceActionApiMigrationTests.scala
Scala
apache-2.0
7,894
/* Copyright 2020 Coursera 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, soft...
coursera/courier
scala/runtime/src/test/scala/org/coursera/courier/templates/EnumTemplateRaceTest.scala
Scala
apache-2.0
3,807
/* * 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 ...
Panos-Bletsos/spark-cost-model-optimizer
sql/core/src/main/scala/org/apache/spark/sql/execution/WholeStageCodegenExec.scala
Scala
apache-2.0
17,744
package net.fwbrasil.bond import scala.reflect.macros.whitebox.Context import scala.util.Failure import scala.util.Success import scala.util.Try import net.fwbrasil.smirror.SInstanceMethod import net.fwbrasil.smirror.runtimeMirror import net.fwbrasil.smirror.sClassOf object Macros { private val classLoader = getCl...
fwbrasil/bond
src/main/scala/net/fwbrasil/bond/AMacros.scala
Scala
lgpl-2.1
2,526
package inputdata import org.apache.spark.mllib.recommendation.Rating import org.apache.spark.rdd.RDD /** * Created by Ondra Fiedler on 8.8.14. */ /** * Basis for DataHolders of Netflix data (http://www.netflixprize.com/) * @param dataDirectoryPath Directory containing the Netflix data */ abstract class Netflix...
OndraFiedler/spark-recommender
src/main/scala/inputdata/NetflixDataHolder.scala
Scala
mit
2,996
package test.scala import org.specs.Specification import org.specs.mock.Mockito import org.mockito.Matchers._ import com.protose.resque._ import com.protose.resque.Machine._ import com.protose.resque.FancySeq._ import com.redis.Redis import java.util.Date object WorkerSpec extends Specification with Mockito { val ...
jamesgolick/scala-resque-worker
src/test/scala/WorkerSpec.scala
Scala
mit
1,674
/* * 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 ...
grgrzybek/camel
components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala
Scala
apache-2.0
9,164
package ml.wolfe.nlp.discourse import ml.wolfe.nlp.CharOffsets /** * Created by matko on 3/20/15. */ case class DiscourseRelation(arg1: DiscourseArgument, arg2: DiscourseArgument, connective: DiscourseArgument, id: String, ...
wolfe-pack/wolfe
wolfe-nlp/src/main/scala/ml/wolfe/nlp/discourse/Discourse.scala
Scala
apache-2.0
753
package epic.features import breeze.linalg.Counter import epic.framework.Feature import epic.features.LongestFrequentSuffixFeaturizer.LongestFrequentSuffix import breeze.numerics.I /** * TODO * * @author dlwh **/ class LongestFrequentSuffixFeaturizer private (fixedMap: Map[String, Feature], ...
langkilde/epic
src/main/scala/epic/features/LongestFrequentSuffixFeaturizer.scala
Scala
apache-2.0
2,036
package pt1.week4 import org.scalatest.{FunSuite, Matchers} import pt1.week5.{BondPricing, ShortRateLattice} class FuturesPricingSpec extends FunSuite with Matchers { private val sharePriceLattice = SharePriceLattice.generate(initialPrice = 100.0, termInYears = 0.25, volatility = 0.3, numberOfPeriods = 15, int...
ligasgr/fe-and-rm
src/test/scala/pt1/week4/FuturesPricingSpec.scala
Scala
apache-2.0
1,604
import java.net.ServerSocket import scala.util.Random object UniquePortGenerator { private[this] val usingPorts = collection.mutable.HashSet.empty[Int] def getOpt(): Option[Int] = synchronized { @annotation.tailrec def loop(loopCount: Int): Option[Int] = { val socket = new ServerSocket(0) val...
eiennohito/ScalaPB
e2e/src/test/scala/UniquePortGenerator.scala
Scala
apache-2.0
755
/* * The MIT License * * Copyright (c) 2019 Fulcrum Genomics LLC * * 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 us...
fulcrumgenomics/fgbio
src/main/scala/com/fulcrumgenomics/vcf/UpdateVcfContigNames.scala
Scala
mit
3,743
/** * 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...
KevinLiLu/kafka
core/src/test/scala/other/kafka/TestTruncate.scala
Scala
apache-2.0
1,549
package edu.rice.habanero.benchmarks.bndbuffer import edu.rice.habanero.actors.{HabaneroActor, HabaneroDeclarativeSelector} import edu.rice.habanero.benchmarks.bndbuffer.ProdConsBoundedBufferConfig._ import edu.rice.habanero.benchmarks.{Benchmark, BenchmarkRunner} import edu.rice.hj.Module0.finish import edu.rice.hj.a...
shamsmahmood/savina
src/main/scala/edu/rice/habanero/benchmarks/bndbuffer/ProdConsHabaneroDeclSelectorBenchmark.scala
Scala
gpl-2.0
5,739
package org.kongo.kafka.metrics import java.util.regex.Pattern import com.yammer.metrics.core.Metric import com.yammer.metrics.core.MetricName import com.yammer.metrics.core.MetricPredicate case class RegexMetricPredicate(include: Option[Pattern], exclude: Option[Pattern]) extends MetricPredicate { def matches(met...
kongo2002/kafka-statsd-reporter
src/main/scala/org/kongo/kafka/metrics/RegexMetricPredicate.scala
Scala
apache-2.0
699
/* * This file is part of P2pCore. * * Copyright (C) 2012 Timur Mehrvarz, timur.mehrvarz(at)gmail.com * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation <http://www.gnu.org/licenses/>, eith...
mehrvarz/P2pCore
src/P2pEncrypt.scala
Scala
gpl-3.0
10,828
/* * Copyright 2014–2018 SlamData 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 agr...
jedesah/Quasar
blueeyes/src/test/scala/quasar/blueeyes/json/JPathSpec.scala
Scala
apache-2.0
3,257
/* * Copyright (C) 2005, The Beangle Software. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This...
beangle/data
jdbc/src/main/scala/org/beangle/data/jdbc/engine/Dialect.scala
Scala
lgpl-3.0
2,462
package dotty.tools.dotc package transform package init import dotty.tools.dotc._ import ast.tpd import tpd._ import dotty.tools.dotc.core._ import Contexts._ import Types._ import Symbols._ import StdNames._ import dotty.tools.dotc.transform._ import Phases._ import Semantic._ class Checker extends Phase { ov...
dotty-staging/dotty
compiler/src/dotty/tools/dotc/transform/init/Checker.scala
Scala
apache-2.0
2,366
package play.api /** * Contains test helpers. */ package object test { /** * Provided as an implicit by WithServer and WithBrowser. */ type Port = Int }
michaelahlers/team-awesome-wedding
vendor/play-2.2.1/framework/src/play-test/src/main/scala/play/api/test/package.scala
Scala
mit
165
/* * Random Access list. * Copyright (C) 2014 Michael Thorsley * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later ver...
Vyzen/trout
src/main/scala/com/eigenvektor/collections/RandomAccessList.scala
Scala
gpl-3.0
13,667
/* * sbt * Copyright 2011 - 2018, Lightbend, Inc. * Copyright 2008 - 2010, Mark Harrah * Licensed under Apache License 2.0 (see LICENSE) */ package sbt.util import java.util.concurrent.ConcurrentHashMap import org.apache.logging.log4j.{ LogManager => XLogManager, Level => XLevel } import org.apache.logging.log4j...
xuwei-k/xsbt
internal/util-logging/src/main/scala/sbt/util/LogExchange.scala
Scala
apache-2.0
7,122
package com.mesosphere.cosmos.jsonschema import com.github.fge.jsonschema.main.JsonSchemaFactory import io.circe.Json import io.circe.JsonObject import io.circe.jawn.parse import io.circe.syntax._ import org.scalatest.FreeSpec import org.scalatest.Tag import scala.io.Source import scala.util.Right class JsonSchemaSpe...
dcos/cosmos
cosmos-test-common/src/test/scala/com/mesosphere/cosmos/jsonschema/JsonSchemaSpec.scala
Scala
apache-2.0
2,389
package scorex.network import akka.actor.Actor.Receive import akka.actor.Cancellable import scorex.app.Application import scorex.block.Block import scorex.block.Block._ import scorex.crypto.encode.Base58.encode import scorex.network.Coordinator.{AddBlock, SyncFinished} import scorex.network.NetworkController.DataFromP...
alexeykiselev/WavesScorex
scorex-basics/src/main/scala/scorex/network/BlockchainSynchronizer.scala
Scala
cc0-1.0
13,891
/* * 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 ...
shaneknapp/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala
Scala
apache-2.0
23,353
package org.jetbrains.plugins.scala package codeInsight.intention.controlflow import com.intellij.codeInsight.intention.PsiElementBaseIntentionAction import com.intellij.openapi.command.CommandProcessor import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.openapi.ui...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/codeInsight/intention/controlflow/ReplaceDoWhileWithWhileIntention.scala
Scala
apache-2.0
5,597
package dregex import dregex.impl.Util import org.scalatest.funsuite.AnyFunSuite import scala.collection.immutable.Seq class PerformanceTest extends AnyFunSuite { test("slow regexs") { val (regexes, elapsed1) = Util.time { Regex.compile( Seq( "qwertyuiopasd", "/aaaaaa/(?!xxc)...
marianobarrios/dregex
src/test/scala/dregex/PerformanceTest.scala
Scala
bsd-2-clause
1,141
class B(x : () => Int) class A(i : Int) extends B(() => i) { i }
yusuke2255/dotty
tests/untried/pos/t803.scala
Scala
bsd-3-clause
65
package com.ing.baker.runtime.recipe_manager import java.util.UUID import java.util.concurrent.TimeUnit import _root_.akka.actor.ActorSystem import _root_.akka.testkit.{TestKit, TestProbe} import _root_.akka.util.Timeout import com.ing.baker.il.CompiledRecipe import com.ing.baker.runtime.akka.AkkaBakerConfig.Timeouts...
ing-bank/baker
core/akka-runtime/src/test/scala/com/ing/baker/runtime/recipe_manager/RecipeManagerActorImplSpec.scala
Scala
mit
2,800
import stainless.equations._ import stainless.annotation._ import stainless.lang._ object Equations1 { @extern def makeEqual(x: BigInt, y: BigInt): Unit = { (??? : Unit) } ensuring(_ => x == y) def f(x: BigInt, y: BigInt) = { x ==:| makeEqual(x,y) |: y ==:| trivial |: x } }
epfl-lara/stainless
frontends/benchmarks/verification/invalid/Equations1.scala
Scala
apache-2.0
303
/* * La Trobe University - Distributed Deep Learning System * Copyright 2016 Matthias Langer (t3l@threelights.de) * * 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.apa...
bashimao/ltudl
blaze/src/main/scala/edu/latrobe/blaze/optimizerexitcodes/ThirdParty.scala
Scala
apache-2.0
2,703
package calculator import math.pow import math.sqrt object Polynomial { def computeDelta(a: Signal[Double], b: Signal[Double], c: Signal[Double]): Signal[Double] = { Signal[Double](pow(b(), 2) - 4*a()*c()) } def computeSolutions(a: Signal[Double], b: Signal[Double], c: Signal[Double], delta: Si...
tanderegg/reactive-class
week2/calculator/src/main/scala/calculator/Polynomial.scala
Scala
mit
531
import Dependencies._ import sbt.Keys._ import sbt._ object Shared { lazy val sparkVersion = SettingKey[String]("x-spark-version") lazy val hadoopVersion = SettingKey[String]("x-hadoop-version") lazy val jets3tVersion = SettingKey[String]("x-jets3t-version") lazy val jlineDef = SettingKey[(String, String)](...
andypetrella/spark-notebook
project/Shared.scala
Scala
apache-2.0
2,997
package com.thoughtworks.datacommons.prepbuddy.analyzers.completeness import com.thoughtworks.datacommons.prepbuddy.exceptions.ApplicationException import org.apache.spark.sql.types._ import org.apache.spark.sql.{DataFrame, Row, SparkSession} import org.scalatest.FunSuite class RowCompletenessRuleTest extends FunSuit...
data-commons/prep-buddy
src/test/scala/com/thoughtworks/datacommons/prepbuddy/analyzers/completeness/RowCompletenessRuleTest.scala
Scala
apache-2.0
3,211
package dpla.ingestion3.enrichments.normalizations.filters import dpla.ingestion3.enrichments.normalizations.FilterList import dpla.ingestion3.enrichments.normalizations.FilterRegex._ /** * List of type terms that are allowed in the type field because they can be mapped to boarder DCMIType terms */ object TypeAl...
dpla/ingestion3
src/main/scala/dpla/ingestion3/enrichments/normalizations/filters/TypeAllowList.scala
Scala
mit
555
package models case class Note(id: String, contents: String)
Technius/noteit
app/models/Models.scala
Scala
mit
62
package org.jetbrains.plugins.scala package lang.refactoring import com.intellij.codeInsight.editorActions.moveUpDown.StatementUpDownMover.MoveInfo import com.intellij.codeInsight.editorActions.moveUpDown.{LineMover, LineRange} import com.intellij.openapi.editor.Editor import com.intellij.psi.util.PsiTreeUtil import c...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/refactoring/ScalaStatementMover.scala
Scala
apache-2.0
4,765
/* * Copyright 2014 http4s.org * * 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 i...
http4s/blaze
http/src/main/scala/org/http4s/blaze/http/http2/FrameEncoder.scala
Scala
apache-2.0
4,256
/* * Copyright 2016 Nikolay Smelik * * 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 ...
kerzok/ScalaBot
BotApi/src/main/scala/scalabot/common/extensions/SocketExtension.scala
Scala
apache-2.0
3,360
/* * 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 ...
manuzhang/incubator-gearpump
streaming/src/main/scala/org/apache/gearpump/streaming/task/Subscriber.scala
Scala
apache-2.0
2,119
package scala.macros.internal package trees import scala.macros.internal.prettyprinters._ import scala.macros.Universe trait TreeStructure { self: Universe => private[macros] implicit def treeStructure[T <: Tree]: Structure[T] = Structure { (p, tree) => // TODO: implement this ??? } }
xeno-by/scalamacros
core/src/main/scala/scala/macros/internal/trees/TreeStructure.scala
Scala
bsd-3-clause
301
package com.xantoria.flippy.serialization import net.liftweb.json._ import org.scalatest._ import com.xantoria.flippy.BaseSpec import com.xantoria.flippy.condition.{Condition, NamespacedCondition} class SerializerSpec extends BaseSpec { val contextSerializer = new ContextValueSerializer() val engine = Serializat...
giftig/flippy
core/src/test/scala/com/xantoria/flippy/serialization/SerializerSpec.scala
Scala
mit
9,933
/*********************************************************************** * Copyright (c) 2013-2017 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
ronq/geomesa
geomesa-z3/src/main/scala/org/locationtech/geomesa/curve/XZ2SFC.scala
Scala
apache-2.0
15,903
/* * Copyright (C) 2012-2014 Typesafe Inc. <http://www.typesafe.com> */ package scala import reflect._ import tools.reflect.{ToolBox, ToolBoxError} package object async { implicit class objectops(obj: Any) { def mustBe(other: Any) = assert(obj == other, obj + " is not " + other) def mustEqual(other: A...
anand-singh/async
src/test/scala/scala/async/package.scala
Scala
bsd-3-clause
2,945
package org.zalando.jsonapi.json.circe import io.circe.generic.auto._ import io.circe.parser._ import io.circe.syntax._ import org.zalando.jsonapi.model.RootObject import spray.http.ContentTypes import spray.http.MediaTypes._ import spray.httpx.marshalling.Marshaller import spray.httpx.unmarshalling.Unmarshaller trai...
wlk/scala-jsonapi
src/main/scala/org/zalando/jsonapi/json/circe/CirceJsonapiSupport.scala
Scala
mit
833
package soal.util import org.scalatest.FlatSpec import org.scalatest.Matchers import java.util.Random /* * Created by plofgren on 4/16/15. */ class DiscreteAliasSamplerSpec extends FlatSpec with Matchers { val random = new Random(1) def testDistribution(unnormalizedProbabilities: Array[Float], ...
plofgren/bidirectional-random-walk
src/test/scala/soal/util/DiscreteAliasSamplerSpec.scala
Scala
mit
1,739
package com.twitter.finagle.loadbalancer.aperture import com.twitter.conversions.DurationOps._ import com.twitter.finagle.Address import com.twitter.finagle.loadbalancer.{EndpointFactory, LazyEndpointFactory} import com.twitter.finagle.ServiceFactoryProxy import com.twitter.finagle.stats.{StatsReceiver, InMemoryStatsR...
luciferous/finagle
finagle-core/src/test/scala/com/twitter/finagle/loadbalancer/aperture/ExpirationTest.scala
Scala
apache-2.0
5,247
package es.bernal.sparkmongoiot import java.io.File import com.mongodb.spark.MongoSpark import es.bernal.sparkmongoiot.types.{DataPoint, DataPointCnt, DataPointDct, DsTime} import es.bernal.sparkmongoiot.utils.Constants import net.liftweb.json.DefaultFormats import net.liftweb.json.Serialization.write import org.apac...
giorbernal/spark-mongo-iot
src/main/scala/es/bernal/sparkmongoiot/DataLoader.scala
Scala
mit
5,049