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
package equalitydemo import org.scalatest._ trait SpireAssertions extends Assertions with SpireEquality object SpireAssertions extends SpireAssertions
bvenners/equality-integration-demo
src/test/scala/equalitydemo/SpireAssertions.scala
Scala
apache-2.0
154
// Scala import annotation.targetName class A_1 { @targetName("bar") def foo(): Int = 1 }
dotty-staging/dotty
tests/pos/alpha-override/A_1.scala
Scala
apache-2.0
92
/* * Copyright (c) 2012-2013 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...
richo/snowplow
3-etl/hive-etl/snowplow-log-deserializers/src/test/scala/com/snowplowanalytics/snowplow/hadoop/hive/BadQsFieldTest.scala
Scala
apache-2.0
3,882
package pl.combosolutions.backup.psm.elevation import java.rmi.RemoteException import java.rmi.registry.Registry import org.specs2.matcher.Scope import org.specs2.mock.Mockito import org.specs2.mutable.Specification import pl.combosolutions.backup.test.Tags.UnitTest class ElevatedExecutorSpec extends Specification w...
MateuszKubuszok/BackupDSL
modules/psm/src/test/scala/pl/combosolutions/backup/psm/elevation/ElevatedExecutorSpec.scala
Scala
mit
1,846
package org.hibernate.cache.rediscala.strategy import org.hibernate.cache.rediscala.regions._ import org.hibernate.cache.spi.access._ import org.hibernate.cfg.Settings class NonStrictReadWriteRedisCollectionRegionAccessStrategy(private[this] val _region: RedisCollectionRegion, ...
debop/debop4s
hibernate-rediscala/src/main/scala/org/hibernate/cache/rediscala/strategy/NonStrictReadWriteStrategy.scala
Scala
apache-2.0
3,832
package com.twitter.common.args import com.google.common.base.Optional import scala.collection.JavaConversions._ import scala.collection.mutable.ArrayBuffer import com.twitter.common.args._ import tools.scalap.scalax.rules.scalasig._ import java.lang.{Class, String} import scala.annotation.target.field object Flags {...
foursquare/commons-old
src/scala/com/twitter/common/args/Flags.scala
Scala
apache-2.0
3,876
/* * 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 ...
pronix/spark
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDataFrameAnalyticsSuite.scala
Scala
apache-2.0
2,346
package sc.ala.http.mock import java.util.concurrent.ConcurrentLinkedQueue import play.api.mvc._ final case class AccessLogQueue(queue: ConcurrentLinkedQueue[AccessLog] = new ConcurrentLinkedQueue[AccessLog]()) { def add(request: RequestHeader): Unit = queue.add(AccessLog(request)) def add(request: RequestHea...
xuwei-k/http-mock
src/main/scala/sc/ala/http/mock/AccessLogQueue.scala
Scala
mit
723
package com.sksamuel.elastic4s.requests.searches.queries import com.sksamuel.elastic4s.requests.script.Script import com.sksamuel.exts.OptionImplicits._ case class IntervalsQuery(field: String, rule: IntervalsRule) extends Query sealed trait IntervalsRule case class Match(query: String, maxGaps: Opt...
stringbean/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/queries/IntervalsQuery.scala
Scala
apache-2.0
4,555
package scodec package codecs import java.util.UUID import org.scalacheck.Arbitrary class UuidTest extends CodecSuite { implicit val arbitraryUuid: Arbitrary[UUID] = Arbitrary(UUID.randomUUID) test("roundtrip") { forAll { (u: UUID) => roundtrip(uuid, u) } } }
ceedubs/scodec
src/test/scala/scodec/codecs/UuidTest.scala
Scala
bsd-3-clause
274
package com.softwaremill.scalaval.util class InclusiveIterator[A](ia: Iterator[A]) { def takeWhileInclusive(p: A => Boolean) = { var done = false val p2 = (a: A) => !done && { if (!p(a)) done=true; true } ia.takeWhile(p2) } } object InclusiveIterator { implicit def iterator_can_include[A](ia: Iterat...
mostr/scalaval
src/main/scala/com/softwaremill/scalaval/util/InclusiveIterator.scala
Scala
apache-2.0
357
package com.github.javifdev.survey import twitter4j._ import scala.concurrent.duration._ import scala.collection.JavaConversions._ import scala.language.postfixOps import scalaz.stream._ import scalaz.concurrent.Task import scalaz.concurrent.Strategy.DefaultTimeoutScheduler /** * @author Javier Fuentes Sánchez */ o...
javierfs89/twitter-survey
src/main/scala/com/github/javifdev/twitter-survey/Phase1.scala
Scala
mit
3,104
package com.datlinq.datafiniti.response import com.datlinq.datafiniti.response.DatafinitiError._ import org.scalatest.FunSuite /** * Created by Tom Lous on 05/09/2017. * Copyright © 2017 Datlinq B.V.. */ class NoRedirectFromDownloadTest extends FunSuite { val e = NoRedirectFromDownload("http://datlinq.com") ...
datlinq/scalafiniti
src/test/scala/com/datlinq/datafiniti/response/NoRedirectFromDownloadTest.scala
Scala
mit
536
/* * 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 ...
tophua/spark1.52
core/src/main/scala/org/apache/spark/ui/jobs/UIData.scala
Scala
apache-2.0
4,973
class a { def foo() = a match { <caret> } } /* case */
JetBrains/intellij-scala
scala/scala-impl/testdata/keywordCompletion/modifiers/defCase.scala
Scala
apache-2.0
62
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.2 * @date Mon May 19 15:52:24 EDT 2014 * @see LICENSE (MIT style license file). * * @see www.netlib.org/lapack/lawnspdf/lawn03.pdf * @see www.netlib.org/lapack/lawns/lawn11.ps * @s...
NBKlepp/fda
scalation_1.2/src/main/scala/scalation/linalgebra/SVD_2by2.scala
Scala
mit
8,347
/** * @author Yuuto */ package yuuto.inventorytools.client import cpw.mods.fml.common.eventhandler.SubscribeEvent import cpw.mods.fml.common.gameevent.InputEvent import net.minecraft.entity.player.EntityPlayer import net.minecraft.client.Minecraft import yuuto.inventorytools.network.MessageKeyPress import yuuto.inve...
AnimeniacYuuto/InventoryTools
src/main/scala/yuuto/inventorytools/client/InputHandler.scala
Scala
gpl-3.0
2,046
package models import java.util.Date import play.api.libs.functional.syntax._ import play.api.libs.json.{Reads, JsPath, Writes} import scala.collection.immutable.HashMap case class Score( timestamp: Date, designScore: Int, docScore: Int, suppor...
gitlinks/gitrank-web
app/models/Score.scala
Scala
apache-2.0
1,631
/* * Copyright 2011-2019 Asakusa Framework Team. * * 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 ...
ueshin/asakusafw-spark
compiler/src/test/scala/com/asakusafw/spark/compiler/graph/AggregateClassBuilderSpec.scala
Scala
apache-2.0
11,957
package handlers.server import java.nio.ByteOrder import database.{Characters, Classes, Races} import handlers.GameClient import handlers.packets.{PacketWriter, ServerCodes} import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration._ import scala.concurrent.{Await, Future} /** * C...
franblas/NAOC
src/main/scala/handlers/server/CharacterOverview.scala
Scala
mit
5,994
package io.taig.android.unit trait implicits extends syntax.all object implicits extends implicits
Taig/Toolbelt
unit/src/main/scala/io/taig/android/unit/implicits.scala
Scala
mit
101
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
laserson/adam
adam-core/src/main/scala/org/bdgenomics/adam/serialization/ADAMKryoRegistrator.scala
Scala
apache-2.0
23,064
package japgolly.scalajs.react.extra.router import java.util.UUID import java.util.regex.{Pattern, Matcher} import scala.reflect.ClassTag import scala.util.matching.Regex import japgolly.scalajs.react.CallbackTo import japgolly.scalajs.react.extra.internal.RouterMacros import japgolly.scalajs.react.internal.identityFn...
matthughes/scalajs-react
extra/src/main/scala/japgolly/scalajs/react/extra/router/Dsl.scala
Scala
apache-2.0
28,697
/* * 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 ...
shuangshuangwang/spark
sql/core/src/test/scala/org/apache/spark/sql/StatisticsCollectionSuite.scala
Scala
apache-2.0
27,421
/** * Copyright (C) 2009-2011 the original author or authors. * See the notice.md 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 compliance with the License. * Yo...
maslovalex/scalate
scalate-jaxrs/src/main/scala/org/fusesource/scalate/rest/Container.scala
Scala
apache-2.0
1,012
/* * Copyright 2015 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...
kristapsmelderis/accessibility-driver
src/main/scala/uk/gov/hmrc/accessibility/Filesystem.scala
Scala
apache-2.0
1,153
package example.test import org.scalatest.FunSpec import example.ClassA class ClassATest extends FunSpec { describe("ClassA") { it("echoes integers!") { val classA = new ClassA assert(1 == classA.echo(1)) } } }
MartinSnyder/scalatest-multiproject-example
subproject_a/src/test/scala/example/test/ClassATest.scala
Scala
mit
237
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package java.util import scala.annotation.tai...
nicolasstucki/scala-js
javalib/src/main/scala/java/util/LinkedList.scala
Scala
apache-2.0
8,029
package net.manub.embeddedkafka.schemaregistry.streams import net.manub.embeddedkafka.UUIDs import net.manub.embeddedkafka.schemaregistry.EmbeddedKafkaWithSchemaRegistry.consumerConfigForSchemaRegistry import net.manub.embeddedkafka.schemaregistry.{ EmbeddedKafkaConfigWithSchemaRegistry, EmbeddedKafkaWithSchemaReg...
manub/scalatest-embedded-kafka
schema-registry/src/main/scala/net.manub.embeddedkafka/schemaregistry/streams/EmbeddedKafkaStreamsWithSchemaRegistry.scala
Scala
mit
2,325
package dpla.ingestion3.mappers.providers import dpla.ingestion3.mappers.utils._ class SdMapping extends MdlMapping with JsonMapping with JsonExtractor { // ID minting functions override def useProviderName: Boolean = true override def getProviderName: Option[String] = Some("sd") }
dpla/ingestion3
src/main/scala/dpla/ingestion3/mappers/providers/SdMapping.scala
Scala
mit
293
/* * Copyright 2017 Sumo Logic * * 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...
SumoLogic/epigraph
java/codegen/src/main/scala/ws/epigraph/java/ListGen.scala
Scala
apache-2.0
14,612
package com.kashoo.ws import play.api.{Configuration, Logger} import scala.concurrent.ExecutionContext /** * Associates a rate limit with a request matcher for applying to outgoing client requests. */ case class RequestRateLimit(rate: Rate, requestMatcher: RequestMatcher)(implicit val ec: ExecutionContext) { v...
Kashoo/ws-limited
app/com/kashoo/ws/RequestRateLimit.scala
Scala
mit
995
package com.jsuereth.pgp import org.specs2.mutable._ import sbt.IO import java.io.File class KeyGenSpec extends Specification { PGP.init val user = "Test User <[email protected]>" val pw = "test-pw".toCharArray val (pub,sec) = PGP.makeNewKeyRings(user,pw) "Secret Key Ring" should { "serialize and deseria...
voetha/sbt-pgp
gpg-library/src/test/scala/com/jsuereth/pgp/SecretKeyRingSpec.scala
Scala
bsd-3-clause
1,650
package com.wavesplatform.state.reader import com.wavesplatform.db.WithState import com.wavesplatform.features.BlockchainFeatures._ import com.wavesplatform.lagonaki.mocks.TestBlock.{create => block} import com.wavesplatform.settings.TestFunctionalitySettings.Enabled import com.wavesplatform.state.LeaseBalance import ...
wavesplatform/Waves
node/src/test/scala/com/wavesplatform/state/reader/StateReaderEffectiveBalancePropertyTest.scala
Scala
mit
2,372
/* * 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 ...
duynguyen/incubator-openwhisk
tests/src/test/scala/whisk/core/cli/test/ApiGwRestTests.scala
Scala
apache-2.0
10,287
package com.edinhodzic.service.repository import com.edinhodzic.service.Paginated import scala.util.Try trait Queryable[T] { def query(queryString: String): Try[Paginated[T]] }
edinhodzic/jersey-rest-service
src/main/scala/com/edinhodzic/service/repository/Queryable.scala
Scala
apache-2.0
184
package test { class Test { def foo(): Unit = { val r: Seq[Int] = Seq.empty case class TestClass(polka: Int, kolka: String) val q: TestClass = null q.polk/*caret*/ } } } /* polka */
ilinum/intellij-scala
testdata/completion/Basic/LocalClassInPackage.scala
Scala
apache-2.0
222
/* * 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 ...
zhreshold/mxnet
scala-package/examples/src/test/scala/org/apache/mxnetexamples/profiler/ProfilerSuite.scala
Scala
apache-2.0
2,189
/* * 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 ...
pgandhi999/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/EventTimeWatermark.scala
Scala
apache-2.0
2,465
package x import a._ class f class g( ) extends k { def <caret>foo( ) = return true } /* */
JetBrains/intellij-scala
scala/scala-impl/testdata/keywordCompletion/generatedTests/autoTest_66.scala
Scala
apache-2.0
104
package gapt.formats.tip package object util { object find { def apply[T]( elements: Seq[T], p: ( T ) => Boolean ): Option[( Seq[T], T, Seq[T] )] = { val index = elements.indexWhere( p ) if ( index == -1 ) { None } else { Some( ( elements.take( index ), ...
gapt/gapt
core/src/main/scala/gapt/formats/tip/util/package.scala
Scala
gpl-3.0
403
package com.mostlyharmlesscode.unpredicablefuture.library import scala.concurrent.Future import scala.concurrent.ExecutionContext.Implicits.global class StringOpsFuture { slow: SlowExecutionComponent => def upperCase(data: String): Future[String] = Future { val delay = doSomethingPotentiallySlow() Perfor...
llaakes/UnpredictableFuture
src/main/scala/com/mostlyharmlesscode/unpredicablefuture/library/StringOpsFuture.scala
Scala
mit
745
package dotty.tools.dotc.typer import collection.mutable case class Mode(val bits: Int) extends AnyVal { import Mode._ def | (that: Mode) = Mode(bits | that.bits) def & (that: Mode) = Mode(bits & that.bits) def &~ (that: Mode) = Mode(bits & ~that.bits) def is (that: Mode) = (bits & that.bits) == that.bits ...
vsalvis/dotty
src/dotty/tools/dotc/typer/Mode.scala
Scala
bsd-3-clause
3,213
package com.wixpress.petri.petri import java.util.Arrays._ import com.fasterxml.jackson.databind.JsonMappingException import com.wixpress.common.specs2.JMock import com.wixpress.petri.experiments.domain.ExperimentSpec import com.wixpress.petri.petri.SpecDefinition.ExperimentSpecBuilder._ import org.joda.time.{DateTim...
wix/petri
petri-server-core/src/test/java/com/wixpress/petri/petri/JdbcSpecsDaoTest.scala
Scala
bsd-3-clause
994
package debop4s.core.utils import debop4s.core.{AbstractCoreFunSuite, YearWeek} /** * HashsFunSuite * @author Sunghyouk Bae */ class HashsFunSuite extends AbstractCoreFunSuite { test("Hash 계산") { val a = Hashs.compute(1, 2) val b = Hashs.compute(2, 1) a should not be b a shouldEqual Hashs.compu...
debop/debop4s
debop4s-core/src/test/scala/debop4s/core/utils/HashsFunSuite.scala
Scala
apache-2.0
696
/** * 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"); yo...
eribeiro/kafka
core/src/test/scala/unit/kafka/server/ReplicationQuotasTest.scala
Scala
apache-2.0
10,518
/* sbt -- Simple Build Tool * Copyright 2008, 2009, 2010 Mark Harrah */ package sbt import sbt.serialization._ object Configurations { def config(name: String) = new Configuration(name) def default: Seq[Configuration] = defaultMavenConfigurations def defaultMavenConfigurations: Seq[Configuration] = Seq(Compi...
som-snytt/xsbt
ivy/src/main/scala/sbt/Configuration.scala
Scala
bsd-3-clause
3,933
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\\ * @ @ * * # # # # (c) 2017 CAB * * # # # # # # ...
AlexCAB/MathAct
mathact_core/src/main/scala/mathact/core/bricks/blocks/BlockContext.scala
Scala
mit
1,815
package ohnosequences.stuff abstract class MonoidalCategory { type On <: Category val on: Category.is[On] type I <: On#Objects @infix type ⊗[X <: On#Objects, Y <: On#Objects] <: On#Objects def ⊗[A <: On#Objects, B <: On#Objects, C <: On#Objects, D <: On#Objects] : (On#C[A, B] × On#C[C, D]) -> On#C[...
ohnosequences/stuff
src/main/scala/monoidalCategories.scala
Scala
agpl-3.0
5,504
package org.scalatra import org.scalatra.test.scalatest._ import skinny.engine.SkinnyEngineServlet class UrlSupportTest extends ScalatraFunSuite { override def contextPath = "/context" addServlet(new SkinnyEngineServlet { get("/") { if (params.contains("session")) session // trigger a jsessionid ...
holycattle/skinny-framework
engine/src/test/scala/org/scalatra/UrlSupportTest.scala
Scala
mit
2,273
package org.bfn.ninetynineprobs import org.scalatest._ class P91Spec extends UnitSpec { // TODO }
bfontaine/99Scala
src/test/scala/P91Spec.scala
Scala
mit
105
package concrete package it import com.typesafe.scalalogging.LazyLogging import concrete.filter.ACC import concrete.generator.ProblemGenerator import concrete.generator.cspompatterns.ConcretePatterns import concrete.runner.XCSP3Concrete import cspom.compiler.CSPOMCompiler import org.scalatest.{FlatSpec, TryValues} fi...
concrete-cp/concrete
src/test/scala/concrete/it/ProblemGeneratorTest.scala
Scala
lgpl-2.1
1,932
package com.salcedo.rapbot.websocket import java.net.InetSocketAddress import akka.actor.Status.Success import akka.actor.{Actor, ActorLogging, Props, Terminated} import akka.io.Tcp._ import akka.io.{IO, Tcp} import akka.routing.{BroadcastRoutingLogic, Router} import com.salcedo.rapbot.hub.Hub.SystemState import com....
misalcedo/RapBot
Hub/src/main/scala/com/salcedo/rapbot/websocket/WebSocketActor.scala
Scala
mit
1,701
/* * Copyright 1998-2015 Linux.org.ru * 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...
ymn/lorsource
src/main/java/ru/org/linux/tag/TagPageController.scala
Scala
apache-2.0
7,183
package algorithms import scala.io.StdIn class BinarySearch { def rank(key: Int, a: Seq[Int]): Int = { var lo = 0 var hi = a.size - 1 while (lo <= hi) { val mid = lo + (hi - lo) / 2 if (key < a(mid)) { hi = mid - 1 } else if (key > a(mid)) { lo = mid + 1 }...
cricanr/AlgorithmsHackerRank
src/main/scala/algorithms/BinarySearch.scala
Scala
mit
368
/* * Copyright 2014 - 2015 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 a...
wemrysi/quasar
core/src/main/scala/slamdata/engine/analysis/fixplate.scala
Scala
apache-2.0
18,160
/* * The MIT License * * Copyright (c) 2022 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/fasta/SortSequenceDictionary.scala
Scala
mit
5,050
/* * 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 ...
practice-vishnoi/dev-spark-1
mllib/src/test/scala/org/apache/spark/ml/feature/RFormulaSuite.scala
Scala
apache-2.0
5,209
// Wei Chen - Density Peak Cluster Test // 2016-06-03 import com.scalaml.TestData._ import com.scalaml.general.MatrixFunc._ import com.scalaml.algorithm.DensityPeakCluster import org.scalatest.funsuite.AnyFunSuite class DensityPeakClusterSuite extends AnyFunSuite { val dpc = new DensityPeakCluster() test("De...
Wei-1/Scala-Machine-Learning
src/test/scala/algorithm/clustering/DensityPeakClusterTest.scala
Scala
mit
1,509
/* * Copyright (C) 2015 Romain Reuillon * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This progra...
openmole/openmole
openmole/plugins/org.openmole.plugin.domain.modifier/src/main/scala/org/openmole/plugin/domain/modifier/Activator.scala
Scala
agpl-3.0
1,516
package definiti.core.parser.project import definiti.common.ast._ import definiti.common.utils.StringUtils import definiti.core.Configuration class NamespaceBuilder(fileContent: FileContent, configuration: Configuration) { private val imports: Map[String, String] = { val internalImports = fileContent.elements.c...
definiti/definiti-core
src/main/scala/definiti/core/parser/project/NamespaceBuilder.scala
Scala
mit
9,852
package org.jetbrains.sbt.project import com.intellij.application.options.RegistryManager import com.intellij.notification.NotificationType import com.intellij.openapi.diagnostic.Logger import com.intellij.openapi.externalSystem.model.project.{ProjectData => ESProjectData, _} import com.intellij.openapi.externalSystem...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/sbt/project/SbtProjectResolver.scala
Scala
apache-2.0
39,698
package jp.co.cyberagent.aeromock.core.bootstrap import jp.co.cyberagent.aeromock.test.SpecSupport import org.specs2.mutable.{Tables, Specification} /** * * @author stormcat24 */ class BootstrapManagerJade4jSpec extends Specification with Tables with SpecSupport { "BootstrapManager" should { "delegete" in {...
CyberAgent/aeromock
aeromock-jade4j/src/test/scala/jp/co/cyberagent/aeromock/core/bootstrap/BootstrapManagerJade4jSpec.scala
Scala
mit
464
package org.scalameter.utils final class SlidingWindow(_cap: Int) { require(_cap >= 1) val capacity = _cap + 1 private val store = new Array[Double](capacity) private var first = 0 private var next = 0 def add(t: Double) { store(next) = t val inc = (next + 1) % capacity next = inc i...
lossyrob/scalpel
src/main/scala/org/scalameter/utils/SlidingWindow.scala
Scala
bsd-3-clause
1,367
package devnull.rest import java.util.UUID import javax.servlet.http.HttpServletRequest import com.typesafe.scalalogging.LazyLogging import devnull.UuidFromString import devnull.rest.helpers.ContentTypeResolver._ import devnull.rest.helpers.DirectiveHelper.trueOrElse import devnull.rest.helpers.EitherDirective.{Eithe...
javaBin/devnull
src/main/scala/devnull/rest/SessionFeedbackResource.scala
Scala
apache-2.0
5,681
/* * 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 ...
ArvinDevel/onlineAggregationOnSparkV2
core/src/main/scala/org/apache/spark/executor/Executor.scala
Scala
apache-2.0
19,463
/* * 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 ...
zzcclp/carbondata
integration/spark/src/test/scala/org/apache/carbondata/index/lucene/LuceneFineGrainIndexSuite.scala
Scala
apache-2.0
37,637
/* Example based on discussion with Pierre Quinton */ import stainless.lang._ import stainless.annotation._ object LawsExample { abstract class A[T] { def a: T def f(x: T, y: T): T @law def uniqueRight(x: T, y: T, z: T): Boolean = { f(x,y) != f(x,z) || y == z } } object Aux { def...
epfl-lara/stainless
frontends/benchmarks/verification/valid/LawsExample.scala
Scala
apache-2.0
668
/** * 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...
zzwlstarby/mykafka
core/src/test/scala/unit/kafka/utils/UtilsTest.scala
Scala
apache-2.0
6,249
/* * Copyright (c) 2017 Magomed Abdurakhmanov, Hypertino * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * */ package com.hypertino.hyperbus.model.annotations im...
hypertino/hyperbus
hyperbus/src/main/scala/com/hypertino/hyperbus/model/annotations/location.scala
Scala
mpl-2.0
411
package com.rabbitonweb.nnspc /** * P07 (**) Flatten a nested list structure. Example: scala> flatten(List(List(1, 1), 2, List(3, List(5, 8)))) res0: List[Any] = List(1, 1, 2, 3, 5, 8) */ object P07 { def flatten(list: List[Any]): List[Any] = list match { case head :: tail if head.isInstanceOf[List[_]] => flat...
rabbitonweb/99-scala-problems
src/main/scala/com/rabbitonweb/nnspc/P07.scala
Scala
gpl-2.0
442
/* import ie.nuig.entitylinking.core.AnnotatedMention import ie.nuig.entitylinking.core.ELDocument import ie.nuig.entitylinking.main.nel.EntityLinkingMain import java.util.List import scala.collection.JavaConversions._ object NUIGEntityLinkingTest { def main(args: Array[String]) { //config file path that ...
canademar/me_extractors
BRMDemo_MarchMeeting/src/main/scala/NUIGEntityLinkingTest.scala
Scala
gpl-2.0
1,543
package k2b6s9j.singingKIA.Songs object HarderBetterFasterStronger { }
k2b6s9j/singingKIA
src/main/scala/k2b6s9j/singingKIA/Songs/HarderBetterFasterStronger.scala
Scala
mit
73
/* * Copyright 2015 - 2016 Red Bull Media House GmbH <http://www.redbullmediahouse.com> - 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...
ianclegg/eventuate
eventuate-core/src/multi-jvm/scala/com/rbmhtechnology/eventuate/FilteredReplicationSpec.scala
Scala
apache-2.0
2,908
/* Copyright 2014 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...
sriramkrishnan/scalding
scalding-serialization/src/test/scala/com/twitter/scalding/serialization/macros/TraversableHelperLaws.scala
Scala
apache-2.0
2,008
package com.phasmid.hedge_fund.rules import scala.util.Try import scala.util._ import scala.util.Failure /** * @author robinhillyard */ case class NumberPredicate(variable: String, operator: Operator[Double], value: Double) extends Predicate { def apply(candidate: Candidate): Either[Throwable, Boolean] = candid...
rchillyard/Scalaprof
hedge-fund/src/main/scala/com/phasmid/hedge_fund/rules/NumberPredicate.scala
Scala
gpl-2.0
1,709
package org.jetbrains.sbt.project.modifier.ui import com.intellij.openapi.fileEditor.FileDocumentManager import com.intellij.openapi.project.Project import com.intellij.openapi.vcs.changes.Change import com.intellij.openapi.vcs.changes.actions.{ShowDiffAction, ShowDiffUIContext} import com.intellij.openapi.vcs.changes...
triggerNZ/intellij-scala
src/org/jetbrains/sbt/project/modifier/ui/BuildFileChangeBrowser.scala
Scala
apache-2.0
2,365
package scala.meta.internal.scalacp import scala.meta.internal.classpath._ import scala.meta.internal.metacp._ import scala.meta.internal.{semanticdb => s} import scala.meta.cli._ import scala.meta.metacp._ import scala.tools.scalap.scalax.rules.scalasig._ final class Scalacp private ( val symbolIndex: SymbolInde...
olafurpg/scalameta
semanticdb/metacp/src/main/scala/scala/meta/internal/scalacp/Scalacp.scala
Scala
bsd-3-clause
1,566
package parser import cats.instances.either._ import cats.instances.list._ import cats.syntax.either._ import cats.syntax.functor._ import cats.syntax.traverse._ import cats.{Monad, SemigroupK} import org.apache.poi.ss.usermodel.Workbook import org.apache.poi.ss.util.{AreaReference, CellReference} import parser.Parser...
julien-truffaut/fp-api
core/src/main/scala/parser/Parser.scala
Scala
apache-2.0
4,116
package org.denigma.kappa.notebook.graph.layouts import org.denigma.threejs.PerspectiveCamera /** * Created by antonkulaga on 21/06/16. */ trait GraphLayout { /* type Node type Edge def nodes: Vector[Node] def edges: Vector[Edge] */ def active: Boolean def tick(width: Double, height: Double, ca...
antonkulaga/kappa-notebook
app/js/src/main/scala/org/denigma/kappa/notebook/graph/layouts/GraphLayout.scala
Scala
mpl-2.0
476
/* * 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 ...
SnappyDataInc/spark
core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala
Scala
apache-2.0
11,382
package controllers import java.util.concurrent.TimeUnit import org.specs2.mutable.Specification import play.api.libs.json.Json import play.api.test.{FakeApplication, FakeRequest} //import play.api.test.Helpers.{BAD_REQUEST, CREATED, POST, contentAsString, route, running} import play.api.test.Helpers._ import scal...
amsterdam-scala/play-reactive-mongo-coffee-angular
test/controllers/UsersIT.scala
Scala
apache-2.0
1,622
package spire.macros import language.experimental.macros import scala.reflect.macros.Context import spire.algebra._ object Auto { object scala { def semiring[A]: Semiring[A] = macro ScalaAutoMacros.semiringImpl[A] def rig[A](z: A, o: A): Rig[A] = macro ScalaAutoMacros.rigImpl[A] def rng[A](z: A): Rng[A...
lrytz/spire
core/src/main/scala/spire/macros/Auto.scala
Scala
mit
11,999
package se.hardchee.docker_scala.converters import spray.httpx.unmarshalling.FromStringDeserializer import spray.httpx.unmarshalling.MalformedContent trait GoStringConverters { implicit val goString2BooleanConverter = new FromStringDeserializer[Boolean] { def apply(value: String) = value match { case "1" ...
blast-hardcheese/docker-proxy
src/main/scala/GoStringConverters.scala
Scala
isc
1,092
/* * 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 ...
tophua/spark1.52
core/src/test/scala/org/apache/spark/FileServerSuite.scala
Scala
apache-2.0
10,119
package com.ruimo.crop import javafx.scene.paint.Color import javafx.application.Application import javafx.scene.Scene import javafx.scene.layout.StackPane import javafx.stage.Stage import javafx.scene.image.Image import javafx.scene.image.ImageView import javafx.scene.control.ScrollPane class Crop extends Applicatio...
ruimo/crop
src/main/scala/com/ruimo/crop/Crop.scala
Scala
apache-2.0
3,199
package org.drooms.gui.swing import java.io.File import java.io.FileOutputStream import java.io.Writer import java.util.Properties import org.drooms.gui.swing.event.EventBusFactory import org.drooms.gui.swing.event.GameStateChanged import org.drooms.gui.swing.event.NewTurnAvailable import org.drooms.gui.swing.util.IO...
tomason/drooms
drooms-swing-gui/src/main/scala/org/drooms/gui/swing/RealTimeGameController.scala
Scala
apache-2.0
8,472
package org.webjars.play import play.api.http.MimeTypes import play.api.test.{FakeRequest, PlaySpecification, WithApplication} class RequireJSSpec extends PlaySpecification { "RequireJS" should { // todo: validate this is valid JS "produce a setup" in new WithApplication { val requireJs = app.injecto...
webjars/webjars-play
src/test/scala/org/webjars/play/RequireJSSpec.scala
Scala
mit
1,118
package com.bne.testutil class MysqlTestServer extends ExternalServer { override val serverName = "Mysql Server" override def cmd = Seq("mysql.server","start","--port="+address.get.getPort) override val serverPresentCmd = ("mysql.server","--help") override def cmd_shutdown = Seq("mysql.server","stop","--port="+add...
zhanggl/testutil
src/main/scala/com/bne/testutil/MysqlTestServer.scala
Scala
apache-2.0
339
package org.cristal.repository import akka.actor.{Actor, ActorRef, Props} import org.cristal.api.ApiMessage import org.cristal.model.{NewUser, User} import org.cristal.repository.UserRepository.{CreateUser, RetrieveUser, UserCreated} import org.cristal.repository.dao.UserDAO import scala.util.{Failure, Success} import...
frecano/cristal
src/main/scala/org/cristal/repository/UserRepository.scala
Scala
gpl-3.0
1,079
package org.vitrivr.adampro.query import org.vitrivr.adampro.config.AttributeNames import org.vitrivr.adampro.data.datatypes.TupleID import org.vitrivr.adampro.data.entity.AttributeDefinition import org.vitrivr.adampro.query.distance.Distance import org.vitrivr.adampro.query.distance.Distance.Distance import org.apach...
dbisUnibas/ADAMpro
src/main/scala/org/vitrivr/adampro/query/Result.scala
Scala
mit
742
import sbt._ import Keys._ object Dependencies { val dispatchVersion = "0.11.3" val slf4jVersion = "1.7.12" val log4j2Version = "2.3" val specs2Version = "3.6.4" val typesafeLogging = "com.typesafe.scala-logging" %% "scala-logging" % "3.1.0" val betaMax = "co.freeside" % "betamax" % "1.1.2" val bMaxTestS...
chriswk/stmdb
project/Dependencies.scala
Scala
mit
1,423
package com.mesosphere.cosmos.model case class SearchResponse(packages: Seq[SearchResult])
movicha/cosmos
cosmos-model/src/main/scala/com/mesosphere/cosmos/model/SearchResponse.scala
Scala
apache-2.0
92
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs // Licence: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.server import akka.event.slf4j.SLF4JLogging import akka.util.ByteString import org.ensime.core.Protocol /** * FramedStringProtocol is used to support stream based messag...
d1egoaz/ensime-sbt
src/sbt-test/sbt-ensime/ensime-server/server/src/main/scala/org/ensime/server/FramedStringProtocol.scala
Scala
apache-2.0
1,692
package org.jetbrains.bsp.project import java.io.{File, FileReader} import java.util.{Collections, List => JList, Map => JMap} import com.google.gson.Gson import com.intellij.execution.configurations.SimpleJavaParameters import com.intellij.openapi import com.intellij.openapi.externalSystem.model.ProjectSystemId impo...
JetBrains/intellij-scala
bsp/src/org/jetbrains/bsp/project/BspExternalSystemManager.scala
Scala
apache-2.0
4,647
/* * Copyright (C) 2017 Vincibean <Andrea Bessi> * * 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 version. * * Thi...
Vincibean/ScalaForTheImpatient-Solutions
src/main/scala/org/vincibean/scala/impatient/chapter12/exercise6/package.scala
Scala
gpl-3.0
1,189
package com.argcv.valhalla.string.json import com.argcv.valhalla.exception.ExceptionHelper.SafeExecWithTrace import com.argcv.valhalla.reflect.ReflectHelper import com.google.common.base.CaseFormat /** * @author yu */ trait JsonHelper { def toJson(a: Any, compact: Boolean = true) = { implicit val formats = J...
yuikns/valhalla
src/main/scala/com/argcv/valhalla/string/json/JsonHelper.scala
Scala
mit
4,007
package sampleclean.clean.extraction import sampleclean.api.SampleCleanContext import org.apache.spark.SparkContext._ import org.apache.spark.sql.SQLContext import sampleclean.clean.algorithm.SampleCleanAlgorithm import sampleclean.clean.algorithm.AlgorithmParameters import org.apache.spark.rdd.RDD import org.apache...
sjyk/sampleclean-async
src/main/scala/sampleclean/clean/extract/LearningSplitExtraction.scala
Scala
apache-2.0
1,786
/* * Copyright 2014 DataGenerator Contributors * * 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...
Brijeshrpatel9/SingleThreaderProcessingDG
dg-spark/src/main/code/org/finra/datagenerator/RandomNumberEngine.scala
Scala
apache-2.0
2,995
package s_mach.aeondb.internal import scala.concurrent.Future trait FutureMoment[A,B,PB] { def find(key: A) : Future[Option[B]] def deactivate(key: A) : FutureMoment[A,B,PB] def reactivate(key: A, value: B) : FutureMoment[A,B,PB] def put(key: A, value: B) : FutureMoment[A,B,PB] def replace(key: A, value: ...
S-Mach/aeondb
src/main/scala/s_mach/aeondb/internal/FutureMoment.scala
Scala
apache-2.0
349