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 2014-2021 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 agr...
copperlight/atlas
atlas-core/src/main/scala/com/netflix/atlas/core/model/FilterVocabulary.scala
Scala
apache-2.0
8,820
package com.outr.arango.api import com.outr.arango.api.model._ import io.youi.client.HttpClient import io.youi.http.HttpMethod import io.youi.net._ import io.circe.Json import scala.concurrent.{ExecutionContext, Future} object APISimpleAny { def put(client: HttpClient, body: PutAPISimpleAny)(implicit ec: Exe...
outr/arangodb-scala
api/src/main/scala/com/outr/arango/api/APISimpleAny.scala
Scala
mit
479
package zzb.datatype import org.scalatest.{MustMatchers, WordSpec} /** * Created by Simon on 2014/6/19 */ class StructXorTest extends WordSpec with MustMatchers { import testuse.path._ import User._ val u1 = User( name := "Simon", age := 39, height := 1.75F, blood := BloodType.AB, male :...
xiefeifeihu/zzb
zzb-datatype/src/test/scala/zzb/datatype/StructXorTest.scala
Scala
mit
1,909
package pl.msitko.xml.printing final case class PrinterConfig(indent: Indent, eolAfterXmlDecl: Boolean // controls whether an end of line should be included after XML Declaration ) object PrinterConfig { val Default = PrinterConfig(Indent.Remain, true) } ...
note/xml-lens
io/shared/src/main/scala/pl/msitko/xml/printing/PrinterConfig.scala
Scala
mit
915
/* * Copyright 2017 Georgi Krastev * * 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 ...
joroKr21/flink-shapeless
src/main/scala/org/apache/flink/api/scala/derived/auto.scala
Scala
apache-2.0
2,016
/** Copyright 2015 TappingStone, 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 ...
alex9311/PredictionIO
e2/src/main/scala/org/apache/predictionio/package.scala
Scala
apache-2.0
762
/* * 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 ...
jiajiechen/mxnet
scala-package/macros/src/main/scala/ml/dmlc/mxnet/NDArrayMacro.scala
Scala
apache-2.0
6,956
/* * Copyright 2014–2017 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...
drostron/quasar
marklogicIt/src/test/scala/quasar/physical/marklogic/xquery/XQuerySpec.scala
Scala
apache-2.0
2,207
package dawn.flow trait CloseListener extends Node { self => def closePriority: Int = 0 def schedulerClose: Scheduler def onScheduleClose(): Unit override def setup() = { super.setup() schedulerClose.addCloseListener(self) } }
rubenfiszel/scala-flow
core/src/main/scala/CloseListener.scala
Scala
mit
247
package mesosphere.marathon package core.deployment.impl import akka.Done import akka.actor.ActorRef import akka.testkit.TestProbe import akka.util.Timeout import mesosphere.AkkaUnitTest import mesosphere.marathon.core.condition.Condition import mesosphere.marathon.core.deployment._ import mesosphere.marathon.core.dep...
janisz/marathon
src/test/scala/mesosphere/marathon/core/deployment/impl/DeploymentActorTest.scala
Scala
apache-2.0
11,836
/* Copyright 2009-2018 EPFL, Lausanne */ package inox package ast import org.scalatest._ class ExtractorsSuite extends FunSuite { import inox.trees._ test("Extractors do not simplify basic arithmetic") { val e1 = Plus(Int32Literal(1), Int32Literal(1)) val e2 = e1 match { case Operator(es, builder)...
romac/inox
src/test/scala/inox/ast/ExtractorsSuite.scala
Scala
apache-2.0
2,253
package pictureshow object Server extends Logging { import java.net.URL import java.net.URI import java.io.{ File => JFile } import unfiltered.jetty.{ Http, Server } object Options { /** flag for path to show */ val Show = """^-s=(.+)$""".r /** flag for port to listen on */ val Port = """^-p...
softprops/picture-show
server/src/main/scala/Server.scala
Scala
mit
2,724
/* * Copyright 2019 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...
hmrc/play-graphite
src/main/scala/uk/gov/hmrc/play/graphite/GraphiteReporterProvider.scala
Scala
apache-2.0
2,747
package location import java.net.URL import monads.FO.FutureOption /** * A trait that can get the URL for a game's google location * Created by alex on 12/04/15. */ trait LocationService { def location(gameId: Long): FutureOption[URL] }
unclealex72/west-ham-calendar
app/location/LocationService.scala
Scala
apache-2.0
246
/* 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...
twitter/bijection
bijection-core/src/main/scala/com/twitter/bijection/NumericBijections.scala
Scala
apache-2.0
4,206
object TestA { import Macro._ foo"""abc${"123"}xyz${"456"}fgh""" // error // error // error }
som-snytt/dotty
tests/neg-macros/i6432b/Test_2.scala
Scala
apache-2.0
98
/* * Copyright 2016 agido GmbH * * 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...
agido/pageobject
core/src/main/scala/org/pageobject/core/driver/vnc/VncServer.scala
Scala
apache-2.0
5,460
package de.leanovate.swaggercheck.fixtures.model import org.scalacheck.{Arbitrary, Gen} import play.api.libs.json.Json case class ThingList( things: Seq[Thing] ) object ThingList { implicit val jsonFormat = Json.format[ThingList] implicit val arbitrary = Arbitrary(for...
leanovate/swagger-check
swagger-check-core/src/test/scala/de/leanovate/swaggercheck/fixtures/model/ThingList.scala
Scala
mit
406
package fr.acinq.eclair.db.migration import fr.acinq.eclair.db.migration.CompareDb._ import scodec.bits.ByteVector import java.sql.{Connection, ResultSet} object CompareNetworkDb { private def compareNodesTable(conn1: Connection, conn2: Connection): Boolean = { val table1 = "nodes" val table2 = "network.n...
ACINQ/eclair
eclair-core/src/main/scala/fr/acinq/eclair/db/migration/CompareNetworkDb.scala
Scala
apache-2.0
2,004
/* * ========================================================================================= * Copyright © 2015 the khronus project <https://github.com/hotels-tech/khronus> * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You m...
despegar/khronus
khronus-influx-api/src/test/scala/com/searchlight/khronus/influx/parser/InfluxQueryParserSpec.scala
Scala
apache-2.0
34,096
package com.twitter.zipkin.storage.redis import com.google.common.base.Charsets._ import com.twitter.finagle.redis.Client import com.twitter.scrooge.BinaryThriftStructSerializer import com.twitter.util.{Duration, Future} import com.twitter.zipkin.common.Span import com.twitter.zipkin.conversions.thrift.{ThriftSpan, Wr...
zhoffice/zipkin
zipkin-redis/src/main/scala/com/twitter/zipkin/storage/redis/RedisStorage.scala
Scala
apache-2.0
2,688
package debop4s.data.slick3.tests import debop4s.data.slick3._ import debop4s.data.slick3.TestDatabase.driver.api._ import debop4s.data.slick3.AbstractSlickFunSuite import scala.concurrent.Future /** * SequenceFunSuite * @author [email protected] */ class SequenceFunSuite extends AbstractSlickFunSuite { ...
debop/debop4s
debop4s-data-slick3/src/test/scala/debop4s/data/slick3/tests/SequenceFunSuite.scala
Scala
apache-2.0
2,720
/* Copyright 2014, 2015 Richard Wiedenhöft <[email protected]> * * 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 requir...
Richard-W/scalacrypt
src/main/scala/blockciphers/SymmetricJavaBlockCipher.scala
Scala
apache-2.0
3,419
package cz.kamenitxan.jakon.core.database.converters import java.util /** * Created by TPa on 2019-03-19. */ abstract class AbstractListConverter[T] extends AbstractConverter[util.List[T]] { }
kamenitxan/Jakon
modules/backend/src/main/scala/cz/kamenitxan/jakon/core/database/converters/AbstractListConverter.scala
Scala
bsd-3-clause
200
package utils.generator import utils.NeoDB import utils.Mode._ object SubNameQueryRunner extends App with CypherQueryExecutor with MemoryStatsReporter { def runFor(level: Int, params: Map[String, Any])(implicit neo4j: NeoDB) = { val visibilityLevel = level - 1 val subNameCql = """ |start n = ...
EqualExperts/Apiary-Neo4j-RDBMS-Comparison
src/main/scala/utils/generator/SubNameQueryRunner.scala
Scala
bsd-2-clause
1,820
/* * 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 ...
andrewor14/iolap
sql/hive/compatibility/src/test/scala/org/apache/spark/sql/hive/execution/HiveCompatibilitySuite.scala
Scala
apache-2.0
24,704
package sbt import sbt.internal.util.{ AttributeKey, Dag, Types } import sbt.librarymanagement.Configuration import Types.{ const, idFun } import Def.Initialize import java.net.URI import ScopeFilter.Data object ScopeFilter { type ScopeFilter = Base[Scope] type AxisFilter[T] = Base[ScopeAxis[T]] type ProjectF...
mdedetrich/sbt
main/src/main/scala/sbt/ScopeFilter.scala
Scala
bsd-3-clause
9,236
/* * Copyright (C) 2016-2017 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.internal.javadsl.api import java.lang.invoke.MethodHandles import java.lang.reflect.{ InvocationHandler, Method, Modifier, ParameterizedType, Type, Proxy => JProxy } import com.google.common.reflect.TypeToken impo...
edouardKaiser/lagom
service/javadsl/api/src/main/scala/com/lightbend/lagom/internal/javadsl/api/ServiceReader.scala
Scala
apache-2.0
15,348
package org.otw.open.util import com.badlogic.gdx.Gdx import com.badlogic.gdx.graphics.g2d.Animation.PlayMode import com.badlogic.gdx.graphics.g2d.{Animation, TextureAtlas} import org.otw.open.controllers.GameState /** * Animator class that will handle all texture transitions for game animations * * Created by ...
danielEftimov/OPEN
core/src/org/otw/open/util/Animator.scala
Scala
apache-2.0
1,314
/* * Copyright 2001-2013 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...
cheeseng/scalatest
scalactic-test/src/test/scala/org/scalactic/ChainSpec.scala
Scala
apache-2.0
62,531
import akka.actor.{ActorSystem, ActorRef, Props} import com.jd.scala.selling.actors.Creater import com.jd.scala.selling.model.Person import com.typesafe.scalalogging.LazyLogging /** * Created by justin on 14/08/2014. */ object ActorMain extends LazyLogging { def main(args: Array[String]): Unit = { val system...
justindav1s/learning-scala
src/main/scala/ActorMain.scala
Scala
apache-2.0
680
package ch.descabato.ui import ch.descabato.core.model.{FileDescription, Size} import ch.descabato.utils.Utils import scala.io.Source import scalafx.beans.binding.Bindings import scalafx.scene.control._ import scalafx.scene.image.{Image, ImageView} import scalafx.scene.layout.{BorderPane, FlowPane} import scalafxml.c...
Stivo/DeScaBaTo
ui/src/main/scala/ch/descabato/ui/PreviewController.scala
Scala
gpl-3.0
4,329
package io.datalayer.common import org.apache.spark.SparkContext import org.apache.spark.SparkConf object SparkContextManager { var hasSC = false var sc:Any = 0 def getSparkContext(workers: Int): SparkContext = { if (!hasSC) { val sparkConf = new SparkConf().setMaster("local[" + workers + "]").setApp...
0asa/algorithm
src/main/scala/io/datalayer/common/SparkManager.scala
Scala
apache-2.0
664
/* * Copyright (c) 2013-2014 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...
TimothyKlim/snowplow
3-enrich/stream-enrich/src/test/scala/com.snowplowanalytics.snowplow.enrich.kinesis/bad/CorruptedThriftLinesSpec.scala
Scala
apache-2.0
1,655
package com.aluxian.tweeather.scripts import org.apache.spark.Logging /** * This script is used to count the number of rows that [[TwitterFireCollector]] has collected. */ object TwitterFireCounter extends Script with Logging { override def main(args: Array[String]) { super.main(args) // Import data ...
Aluxian/Tweeather
src/main/scala/com/aluxian/tweeather/scripts/TwitterFireCounter.scala
Scala
apache-2.0
490
/* * MatrixValueWindow.scala * (LucreMatrix) * * Copyright (c) 2014-2017 Institute of Electronic Music and Acoustics, Graz. * Copyright (c) 2014-2017 by Hanns Holger Rutz. * * This software is published under the GNU Lesser General Public License v2.1+ * * * For further information, please contact Hanns H...
iem-projects/LucreMatrix
core/src/main/scala/de/sciss/fscape/stream/MatrixValueWindow.scala
Scala
lgpl-2.1
2,804
package org.jetbrains.plugins.scala.lang.libraryInjector import java.io.{BufferedOutputStream, File, FileOutputStream} import java.util.zip.{ZipEntry, ZipOutputStream} import com.intellij.compiler.CompilerTestUtil import com.intellij.openapi.module.Module import com.intellij.openapi.projectRoots.Sdk import com.intell...
triplequote/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/libraryInjector/LibraryInjectorTest.scala
Scala
apache-2.0
5,584
package fr.eurecom.dsg.treelib.core import org.apache.spark._ import org.apache.spark.SparkContext._ import org.apache.spark.rdd._ import scala.collection.immutable.HashMap import java.io._ import java.io.DataOutputStream import java.io.FileOutputStream import java.io.DataInputStream import java.io.FileInputStream imp...
bigfootproject/treelib
src/main/scala/fr/eurecom/dsg/treelib/core/TreeBuilder.scala
Scala
apache-2.0
25,326
package sbtdynver import org.scalacheck._, Prop._ object GitDescribeOutputSpec extends Properties("GitDescribeOutputSpec") { test("v1.0.0", "v1.0.0", 0, "", "" ) test("v1.0.0+20140707-1030", "v1.0.0", 0, "", "+20140707-1030") test("v1....
dwijnand/sbt-dynver
dynver/src/test/scala/sbtdynver/GitDescribeOutputSpec.scala
Scala
apache-2.0
1,246
package com.rydgel.scalagram.responses import play.api.libs.json.Json case class Videos(low_bandwith: Option[Video], low_resolution: Video, standard_resolution: Video) { lazy val lowBandwith = low_bandwith lazy val lowResolution = low_resolution lazy val standardResolution = standard_resolution } object Videos ...
Rydgel/scalagram
src/main/scala/com/rydgel/scalagram/responses/Videos.scala
Scala
mit
422
package yang.flexmapping import java.util import org.scalatest.FunSuite import yang.flexmapping.process.FlemxMappingProcesserCreator /** * Created by y28yang on 4/8/2016. */ class FlemxMappingProcesserCreatorTest extends FunSuite { test("testGenerate") { // val xmlString = xml.XML.loadFile(getClass.getRes...
wjingyao2008/firsttry
NextGenAct/src/test/scala/yang/flexmapping/FlemxMappingProcesserCreatorTest.scala
Scala
apache-2.0
13,183
/* * 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...
pncampbell/ct-calculations
src/main/scala/uk/gov/hmrc/ct/accounts/frs10x/formats/package.scala
Scala
apache-2.0
2,740
package com.github.luzhuomi.regex // Interface With Java import com.github.luzhuomi.scalazparsec.NonBacktracking._ import com.github.luzhuomi.regex.pderiv.RE._ import com.github.luzhuomi.regex.pderiv.ExtPattern._ import com.github.luzhuomi.regex.pderiv.IntPattern._ import com.github.luzhuomi.regex.pderiv.Parser._ imp...
luzhuomi/scala-pderiv
src/main/scala/com/github/luzhuomi/regex/CompiledPattern4J.scala
Scala
apache-2.0
878
package org.wololo.java2estree import org.eclipse.jdt.core.dom import java.io.File import org.wololo.estree._ import java.nio.file.Path import java.nio.file.Paths object importdeclaration { def makeRelative(path: Path, root: Path, file: Path): String = { val folder = root.relativize(file.getParent) val relP...
bjornharrtell/java2estree
src/main/scala/org/wololo/java2estree/importdeclaration.scala
Scala
mit
2,789
/* Copyright 2009-2016 EPFL, Lausanne */ import leon.lang._ object Termination { abstract class List case class Cons(head: Int, tail: List) extends List case class Nil() extends List def looping1(list: List) : Int = looping2(list) def looping2(list: List) : Int = looping1(list) def calling1(list: List,...
regb/leon
src/test/resources/regression/termination/looping/Termination_failling1.scala
Scala
gpl-3.0
566
/* Copyright 2017-18, Emmanouil Antonios Platanios. 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 ...
eaplatanios/tensorflow
tensorflow/scala/api/src/main/scala/org/platanios/tensorflow/api/io/events/EventAccumulator.scala
Scala
apache-2.0
24,886
/* * 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 ...
ueshin/apache-spark
examples/src/main/scala/org/apache/spark/examples/mllib/MovieLensALS.scala
Scala
apache-2.0
7,324
package bad.robot.logging import java.io.File import bad.robot.temperature.{FileOps, Files} object LogFile { val file: File = Files.path / "temperature-machine.log" }
tobyweston/temperature-machine
src/main/scala/bad/robot/logging/LogFile.scala
Scala
apache-2.0
176
package debop4s.rediscala.set import org.springframework.stereotype.Component @Component class DefaultRedisZSet extends AbstractRedisZSet { }
debop/debop4s
debop4s-rediscala/src/test/scala/debop4s/rediscala/set/DefaultRedisZSet.scala
Scala
apache-2.0
144
package core import spray.json._ import scala.concurrent.duration.FiniteDuration import spray.can.server.{Stats => SprayStats} /** * */ object RngJsonProtocol extends DefaultJsonProtocol { implicit val finiteDurationFormat: RootJsonFormat[FiniteDuration] = new RootJsonFormat[FiniteDuration]{ def write(f: Fini...
matlockx/rng
src/main/scala/core/RngJsonProtocol.scala
Scala
apache-2.0
653
package chrome.system.memory.bindings import scala.scalajs.js import scala.scalajs.js.annotation.JSName @JSName("chrome.system.memory") object Memory extends js.Object { def getInfo(callback: js.Function1[MemoryInfo, _]): Unit = js.native }
amsayk/scala-js-chrome
bindings/src/main/scala/chrome/system/memory/bindings/Memory.scala
Scala
mit
249
/* * 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 ...
bwsw/sj-platform
core/sj-input-streaming-engine/src/test/scala/com/bwsw/sj/engine/input/DataFactory.scala
Scala
apache-2.0
9,670
package edu.nus.systemtesting.hipsleek import edu.nus.systemtesting.Parser.filterLinesMatchingRegex import edu.nus.systemtesting.ProgramFlags.{ isFlag, flagsOfProgram } import edu.nus.systemtesting.ExecutionOutput import edu.nus.systemtesting.Result import edu.nus.systemtesting.PreparedSystem import edu.nus.systemtest...
rgoulter/system-testing
src/main/scala/edu/nus/systemtesting/hipsleek/HipTestCase.scala
Scala
mit
3,945
/** * Copyright (c) 2014-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:/...
haensel-ams/snowplow
4-storage/kinesis-elasticsearch-sink/src/main/scala/com.snowplowanalytics.snowplow.storage.kinesis/elasticsearch/FailureUtils.scala
Scala
apache-2.0
1,321
/* * 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
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveDataFrameAnalyticsSuite.scala
Scala
apache-2.0
3,252
package org.jetbrains.plugins.scala.codeInspection.methodSignature import com.intellij.codeInspection._ import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.codeInspection.methodSignature.quickfix.AddEmptyParentheses import org.jetbrains.plugins.scala.lang.psi.api.statements.ScFunction /** * Pavel F...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/codeInspection/methodSignature/UnitMethodIsParameterlessInspection.scala
Scala
apache-2.0
784
/* * 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 ...
mdespriee/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/QueryExecutionSuite.scala
Scala
apache-2.0
4,841
package info.devartem.funnycommands.commands import info.devartem.funnycommands.exception.InvalidCommandException import org.scalatest.{FunSpec, Matchers, TryValues} class Command$Test extends FunSpec with Matchers with TryValues { describe("Command object") { it("should return task command by name") { C...
dev-tim/funny-commands
src/test/scala/info/devartem/funnycommands/commands/Command$Test.scala
Scala
mit
809
package com.socrata.datacoordinator.common.soql.csvreps import com.socrata.datacoordinator.truth.csv.CsvColumnRep import com.socrata.soql.types._ object PhoneRep extends CsvColumnRep[SoQLType, SoQLValue] { val size = 2 val representedType = SoQLPhone def decode(row: IndexedSeq[String], indices: IndexedSeq[Int...
socrata-platform/data-coordinator
coordinatorlib/src/main/scala/com/socrata/datacoordinator/common/soql/csvreps/PhoneRep.scala
Scala
apache-2.0
695
object Problem6 { def sumOfTheSquares (n: Int) = (1 to n).map(x => x*x).sum def squareOfTheSum (n: Int) = { val theSum = (1 to n).sum theSum*theSum } def difference(n: Int): Int = { squareOfTheSum(n) - sumOfTheSquares(n) } difference (100) }
FredericJacobs/Project_Euler-Scala
ProjectEuler/src/Problem6.scala
Scala
gpl-2.0
266
/** * Copyright 2015 Thomson Reuters * * 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...
nruppin/CM-Well
server/cmwell-fts/src/main/scala/cmwell/fts/FTSServiceES.scala
Scala
apache-2.0
72,814
package no.ap.streaming.event import spray.json._ case class ProviderNode(providerType: String, id: String, url: String) object ProviderNodeProtocol extends DefaultJsonProtocol { implicit object ProviderFormatter extends RootJsonFormat[ProviderNode] { override def write(provider: ProviderNode): JsValue = { ...
przemek1990/spark-streaming
src/main/scala/no/ap/streaming/event/ProviderNode.scala
Scala
apache-2.0
739
package org.vaadin.addons.rinne.mixins import com.vaadin.server.Resource import com.vaadin.ui.AbstractMedia trait AbstractMediaMixin extends AbstractComponentMixin { this: AbstractMedia => import scala.collection.JavaConverters._ def source: Option[Resource] = getSources.asScala.headOption def source_=(sou...
LukaszByczynski/rinne
src/main/scala/org/vaadin/addons/rinne/mixins/AbstractMediaMixin.scala
Scala
apache-2.0
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 ...
jatin9896/incubator-carbondata
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonCleanFilesCommand.scala
Scala
apache-2.0
6,862
/** * 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...
Mszak/kafka
core/src/main/scala/kafka/server/AbstractFetcherThread.scala
Scala
apache-2.0
12,010
package dit4c.scheduler.domain import akka.persistence.PersistentActor import akka.actor.ActorLogging import scala.concurrent.Future import java.security.interfaces.RSAPublicKey import dit4c.scheduler.ssh.RemoteShell import akka.actor.ActorRef import java.time.Instant import akka.actor.Props import dit4c.scheduler.run...
dit4c/dit4c
dit4c-scheduler/src/main/scala/dit4c/scheduler/domain/RktClusterManager.scala
Scala
mit
10,748
/* * Copyright (C) 2007-2008 Artima, 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 requir...
peachyy/scalastu
scells/src/scells/Arithmetic.scala
Scala
apache-2.0
1,194
package test import Dependency.TopologySorter import org.scalatest.{FlatSpec, Matchers} import scalax.collection.GraphEdge.DiEdge class TopologySorterTests extends FlatSpec with Matchers { it should "Sort numbers" in { val pairs = Seq( (1, 2), (2, 3), (3, 4), (4, 5), (5, 6), ...
DSTech/MPM
src/test/scala-2.12/test/TopologySorterTests.scala
Scala
mit
2,267
trait SomeTrait trait CollBase[A <: SomeTrait, +CC1[A2 <: SomeTrait]] { val companion: CollCompanion[CC1] } trait Coll[A <: SomeTrait] extends CollBase[A, Coll] trait CollCompanion[+CC2[A <: SomeTrait]]
dotty-staging/dotty
tests/pos/i10967.scala
Scala
apache-2.0
207
/* * 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 ...
guoxiaolongzte/spark
resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnClusterSuite.scala
Scala
apache-2.0
19,907
package services.onlinetesting.phase1 import config.{ Phase1TestsConfig, PsiTestIds } import factories.UUIDFactory import model.ApplicationRoute.ApplicationRoute import model.ApplicationStatus.ApplicationStatus import model.EvaluationResults.Result import model.ProgressStatuses.ProgressStatus import model.exchange.pas...
hmrc/fset-faststream
it/services/onlinetesting/phase1/Phase1TestEvaluationSpec.scala
Scala
apache-2.0
11,254
package com.twitter.finatra package object conversions { @deprecated("Use com.twitter.finatra.http.conversions.futureHttp", "") val futureHttp = com.twitter.finatra.http.conversions.futureHttp @deprecated("Use com.twitter.finatra.http.conversions.optionHttp", "") val optionHttp = com.twitter.finatra.http.conv...
tom-chan/finatra
http/src/main/scala/com/twitter/finatra/conversions/package.scala
Scala
apache-2.0
341
/* * 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 ...
jianran/spark
mllib/src/test/scala/org/apache/spark/ml/clustering/BisectingKMeansSuite.scala
Scala
apache-2.0
5,294
/* * Copyright (c) 2014-2020 by The Monix Project Developers. * See the project homepage at: https://monix.io * * 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...
alexandru/monifu
monix-execution/shared/src/main/scala/monix/execution/schedulers/TracingRunnable.scala
Scala
apache-2.0
1,197
package com.nabijaczleweli.fancymagicks.element.caster.aoe import com.nabijaczleweli.fancymagicks.element.ElementalDamageSource import com.nabijaczleweli.fancymagicks.element.caster.OneOffElementCaster import com.nabijaczleweli.fancymagicks.element.elements.Element import com.nabijaczleweli.fancymagicks.util.EntityUti...
nabijaczleweli/Magicks
src/main/scala/com/nabijaczleweli/fancymagicks/element/caster/aoe/ElementSprayAOECaster.scala
Scala
mit
907
package pl.pholda.malpompaaligxilo.util import utest._ class DateTest(companion: DateCompanion) extends TestSuite { val tests = TestSuite{ s"Dates: ${companion.getClass.getSimpleName}"-{ 'fromString{ 'firstDate{ assertDate(1920, 1, 2, companion.fromString("1920-01-02")) } // ...
pholda/MalpompaAligxilo
core/shared/src/test/scala/pl/pholda/malpompaaligxilo/util/DateTest.scala
Scala
gpl-3.0
2,517
package domain.logic import java.time.LocalDate import domain.models.{LunchOffer, LunchProvider} import org.joda.money.Money import org.scalamock.scalatest.MockFactory import org.scalatest._ class LunchResolverSchweinestallSpec extends FlatSpec with Matchers with MockFactory { it should "resolve offers for week o...
rori-dev/lunchbox
backend-play-akka-scala/test/domain/logic/LunchResolverSchweinestallSpec.scala
Scala
mit
1,601
package dnd5_dm_db package model object Language { def fromString(str : String) : Language = str.toLowerCase match { case "common" => Common case "dwarvish" => Dwarvish case "elvish" => Elvish case "giant" => GiantLang case "gnomish" => Gnomish case "goblin" => Goblin case "halfling" => H...
lorilan/dnd5_dm_db
src/main/scala/dnd5_dm_db/model/Language.scala
Scala
gpl-3.0
1,680
/* * 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 ...
dbtsai/spark
resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtils.scala
Scala
apache-2.0
23,789
/* * 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
external/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/DB2IntegrationSuite.scala
Scala
apache-2.0
3,438
package com.twitter.finagle.http2.transport.client import com.twitter.conversions.DurationOps._ import com.twitter.finagle.transport.{Transport, TransportProxy} import com.twitter.util.{Await, Future, Time} import org.mockito.Matchers.{any, anyInt} import org.mockito.Mockito.{verify, when} import org.scalatestplus.moc...
twitter/finagle
finagle-http2/src/test/scala/com/twitter/finagle/http2/transport/client/RefTransportTest.scala
Scala
apache-2.0
4,128
import sbt._ import sbt.Keys._ import org.scalastyle.sbt.ScalastylePlugin object $name;format="Camel"$Build extends Build { lazy val $name;format="camel"$ = Project( id = "$name;format="Camel"$", base = file("."), settings = Project.defaultSettings ++ ScalastylePlugin.Settings ++ Seq( name := "$...
ignaciocases/hn-scala-base.g8
src/main/g8/project/$name__Camel$Build.scala
Scala
mit
716
/** * 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 ...
allenday/avocado
avocado-core/src/test/scala/org/bdgenomics/avocado/algorithms/math/LogUtilsSuite.scala
Scala
apache-2.0
1,756
package tifmo import dcstree.SemRole import dcstree.Executor import dcstree.Selection import dcstree.DCSTreeNode import dcstree.DCSTreeEdge import dcstree.DCSTreeEdgeNormal import dcstree.RefOutput import dcstree.Declarative import dcstree.DeclarativeSubRef import dcstree.DeclarativeSubsume import inference.Dimension ...
tianran/tifmo
src/tifmo/document/SelSup.scala
Scala
bsd-2-clause
3,465
import scala.reflect.macros.blackbox.Context import scala.language.experimental.macros class Test object Test { def foo: Unit = macro fooImpl def fooImpl(c: Context) = { import c.universe._; c.Expr[Unit](q"()") } def main(args: Array[String]) { try { val method = classOf[Test].getMethod("foo") ...
felixmulder/scala
test/files/run/t5894.scala
Scala
bsd-3-clause
454
package com.mesosphere.cosmos.http import com.mesosphere.http.MediaType import com.mesosphere.util.UrlSchemeHeader import com.twitter.finagle.http.Fields import com.twitter.finagle.http.Method import com.twitter.finagle.http.Request import com.twitter.io.Buf import io.circe.Encoder import io.circe.syntax._ import io.f...
dcos/cosmos
cosmos-test-common/src/main/scala/com/mesosphere/cosmos/http/HttpRequest.scala
Scala
apache-2.0
2,539
package com.olegych.scastie.web.routes import com.olegych.scastie.api._ import com.olegych.scastie.web.oauth2._ import com.olegych.scastie.balancer._ import akka.util.Timeout import akka.actor.{ActorRef, ActorSystem} import akka.http.scaladsl.model.StatusCodes.Created import akka.http.scaladsl.server.Route import a...
OlegYch/scastie
server/src/main/scala/com.olegych.scastie.web/routes/ScalaLangRoutes.scala
Scala
apache-2.0
1,539
package com.arcusys.valamis.web.servlet.report.response import com.arcusys.valamis.reports.model.AttemptedLessonsRow /** * Created by amikhailov on 23.11.16. */ object AttemptedLessonsConverter { def toResponse(report: Seq[AttemptedLessonsRow]): Seq[AttemptedLessonsResponse] = { report map { item => A...
arcusys/Valamis
valamis-portlets/src/main/scala/com/arcusys/valamis/web/servlet/report/response/AttemptedLessonsConverter.scala
Scala
gpl-3.0
552
package com.clarifi.reporting package relational import com.clarifi.reporting.{ SortOrder } import com.clarifi.reporting.Reporting._ import com.clarifi.machines._ import scalaz._ import Scalaz._ abstract class Scanner[G[_]](implicit G: Monad[G], Dist : Distributive[G]) { self => /** Scan a relation r, iterating ...
ermine-language/ermine-legacy
src/main/scala/com/clarifi/reporting/relational/Scanner.scala
Scala
bsd-2-clause
1,184
/* * 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 ...
jlopezmalla/spark
resource-managers/mesos/src/main/scala/org/apache/spark/deploy/rest/mesos/MesosRestServer.scala
Scala
apache-2.0
9,143
package org.jetbrains.plugins.scala.lang.resolve import org.jetbrains.plugins.scala.base.ScalaLightCodeInsightFixtureTestAdapter class CustomCopyMethodResolveTest extends ScalaLightCodeInsightFixtureTestAdapter with SimpleResolveTestBase { import SimpleResolveTestBase._ def testSCL15809(): Unit = doResolveTest( ...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/resolve/CustomCopyMethodResolveTest.scala
Scala
apache-2.0
618
/** MACHINE-GENERATED FROM AVRO SCHEMA. DO NOT EDIT DIRECTLY */ package example.idl final case class BinaryIdl(data: Array[Byte])
julianpeeters/avrohugger
avrohugger-core/src/test/expected/standard/example/idl/BinaryIdl.scala
Scala
apache-2.0
130
package ch.megard.akka.http.cors.javadsl.settings import java.util.Optional import akka.actor.ActorSystem import akka.annotation.DoNotInherit import akka.http.javadsl.model.HttpMethod import ch.megard.akka.http.cors.javadsl.model.{HttpHeaderRange, HttpOriginMatcher} import ch.megard.akka.http.cors.scaladsl import ch....
tarfaa/akka-http-cors
akka-http-cors/src/main/scala/ch/megard/akka/http/cors/javadsl/settings/CorsSettings.scala
Scala
apache-2.0
2,334
/** * Copyright 2016, deepsense.io * * 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 ...
deepsense-io/seahorse-workflow-executor
deeplang/src/main/scala/io/deepsense/deeplang/refl/CatalogScanner.scala
Scala
apache-2.0
3,815
package lila.api import akka.actor._ import com.typesafe.config.Config import lila.common.PimpedConfig._ import lila.simul.Simul import scala.collection.JavaConversions._ import scala.concurrent.duration._ final class Env( config: Config, db: lila.db.Env, renderer: ActorSelection, system: ActorSystem,...
clarkerubber/lila
modules/api/src/main/Env.scala
Scala
agpl-3.0
5,708
package screact import scutil.lang.* import scutil.log.* /** A final target for events emitted by an Event. Targets always get notified after all other Nodes. */ private final class Target[T](effect:Effect[T], source:Reactive[?,T]) extends Node with AutoCloseable with Logging { val sinks = NoSinks val rank = Intege...
ritschwumm/screact
src/main/scala/screact/Target.scala
Scala
bsd-2-clause
717
package com.sksamuel.avro4s.github import java.io.ByteArrayOutputStream import com.sksamuel.avro4s.{AvroFixed, AvroInputStream, AvroOutputStream, AvroSchema} import org.scalatest.{FunSuite, Matchers} case class Data(uuid: Option[UUID]) case class UUID(@AvroFixed(8) bytes: Array[Byte]) class GithubIssue193 extends F...
51zero/avro4s
avro4s-core/src/test/scala/com/sksamuel/avro4s/github/GithubIssue193.scala
Scala
mit
1,077
package org.scalatra package servlet import javax.servlet.http.HttpSession /** * Extension methods to the standard HttpSession. */ case class RichSession(session: HttpSession) extends AttributesMap { def id: String = session.getId protected def attributes: HttpSession = session }
lightvector/scalatra
core/src/main/scala/org/scalatra/servlet/RichSession.scala
Scala
bsd-2-clause
292
package com.datastax.spark.connector import java.io.{ByteArrayInputStream, ByteArrayOutputStream, ObjectInputStream, ObjectOutputStream} import java.text.SimpleDateFormat import org.junit.Assert._ import org.scalatest.{FunSuite, Matchers} class CassandraRowTest extends FunSuite with Matchers { test("basicAccessTe...
datastax/spark-cassandra-connector
driver/src/test/scala/com/datastax/spark/connector/CassandraRowTest.scala
Scala
apache-2.0
4,193
/* * 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 ...
dszeto/incubator-predictionio
examples/scala-parallel-recommendation/train-with-view-event/src/main/scala/ALSAlgorithm.scala
Scala
apache-2.0
5,989