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
/* 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 not use this f...
mandar2812/DynaML
dynaml-examples/src/main/scala/io/github/tailhq/dynaml/examples/PreprocessAdult.scala
Scala
apache-2.0
2,005
package im.actor.server.api.rpc.service.messaging import im.actor.api.rpc.DBIOResult._ import im.actor.api.rpc.PeerHelpers._ import im.actor.api.rpc._ import im.actor.api.rpc.messaging._ import im.actor.api.rpc.misc.{ ResponseSeq, ResponseVoid } import im.actor.api.rpc.peers.{ ApiOutPeer, ApiPeerType } import im.actor...
lzpfmh/actor-platform
actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/messaging/HistoryHandlers.scala
Scala
mit
11,480
package gitbucket.core.api import gitbucket.core.model.{Issue, PullRequest} import java.util.Date /** * https://developer.github.com/v3/pulls/ */ case class ApiPullRequest( number: Int, updated_at: Date, created_at: Date, head: ApiPullRequest.Commit, base: ApiPullRequest.Commit, mergeable: Option[Bool...
mrkm4ntr/gitbucket
src/main/scala/gitbucket/core/api/ApiPullRequest.scala
Scala
apache-2.0
2,289
package eu.timepit.crjdt.core import eu.timepit.crjdt.core.syntax._ import org.scalacheck.Prop._ import org.scalacheck.Properties object EvalExprSpecJvm extends Properties("Replica.evalExpr") { val p0 = Replica.empty("p") property("stack safety") = secure { val count = 100000 val expr = Iterator.iterate(...
fthomas/crjdt
modules/core/.jvm/src/test/scala/eu/timepit/crjdt/core/EvalExprSpecJvm.scala
Scala
apache-2.0
427
package ee.cone.c4ui.dep.request import ee.cone.c4actor.Types.SrcId import ee.cone.c4actor._ import ee.cone.c4actor.dep.ContextTypes.MockRoleOpt import ee.cone.c4actor.dep.DepTypes.GroupId import ee.cone.c4actor.dep._ import ee.cone.c4actor.dep_impl._ import ee.cone.c4assemble.Types.{Each, Values} import ee.cone.c4ass...
conecenter/c4proto
extra_lib/src/main/scala/ee/cone/c4ui/dep/request/FilteredListRequest.scala
Scala
apache-2.0
4,972
package com.sparcedge.turbine.event case class Event ( val its: Long, val ts: Long, val strValues: Map[String,String], val dblValues: Map[String,Double] ) { def apply(segment: String): Option[Any] = { dblValues.get(segment) orElse strValues.get(segment) } def getDouble(segment: String): Option[Double] = {...
bobwilliams/turbinedb
src/main/scala/com/sparcedge/turbine/event/Event.scala
Scala
gpl-3.0
749
package org.apache.spark.examples.mllib import org.apache.spark.SparkConf import org.apache.spark.SparkContext import org.apache.spark.mllib.clustering.KMeans import org.apache.spark.mllib.clustering.KMeansModel import org.apache.spark.mllib.linalg.Vectors /** * 聚类算法:是把数据划分成多个组,其中一个组的数据与其他组的数据相似 * 监督学习用标记好的数据去训练算法,无...
tophua/spark1.52
examples/src/main/scala/org/apache/spark/examples/mllib/KMeansExample.scala
Scala
apache-2.0
1,898
/* * Copyright 2014 Cisco Systems, 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...
foundation-runtime/orchestration
src/main/java/com/cisco/oss/foundation/orchestration/scope/utils/MapDiskStatements.scala
Scala
apache-2.0
3,817
package org.oc.ld32.gui import org.lengine.render.{Sprite, Texture, TextureRegion} import org.oc.ld32.render.Animation class GuiAnimation(var x: Float, var y: Float, anim: Animation) extends BaguetteGui { override def render(delta: Float): Unit = { anim.transform.pos.set(x,y) anim.transform.angle = -(Math....
OurCraft/LD32
src/main/scala/org/oc/ld32/gui/GuiAnimation.scala
Scala
apache-2.0
386
/* * Licensed to Intel Corporation under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * Intel Corporation licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use t...
zhichao-li/BigDL
dl/src/test/scala/com/intel/analytics/bigdl/torch/CMulSpec.scala
Scala
apache-2.0
8,002
import annotation.varargs object VarArgs { @varargs def foo[A](x: A, xs: String*): A = ??? @varargs def bar[A](x: List[A], xs: String*): A = ??? @varargs def baz[A](x: List[A], xs: String*): A = ??? @varargs def boz[A](x: A, xs: String*): Nothing = ??? }
loskutov/intellij-scala
testdata/scalacTests/pos/t8743.scala
Scala
apache-2.0
283
package pl.pholda.malpompaaligxilo.form.field import java.text.Collator import java.util.Locale import pl.pholda.malpompaaligxilo.i18n.Lang abstract class EnumOptionOrdering { def ordering(selectField: SelectField)(implicit lang: Lang): (EnumOption, EnumOption) => Boolean } object EnumOptionOrdering { case obje...
pholda/MalpompaAligxilo
core/shared/src/main/scala/pl/pholda/malpompaaligxilo/form/field/EnumOptionOrdering.scala
Scala
gpl-3.0
841
package com.twitter.util /** * The Try type represents a computation that may either result in an exception * or return a success value. It is analogous to the Either type but encodes * common idioms for handling exceptional cases (such as rescue/ensure which * is analogous to try/finally). */ object Try { case...
edombowsky/util
util-core/src/main/scala/com/twitter/util/Try.scala
Scala
apache-2.0
8,848
object O { private def f1 {} private[O] def f2 {} /* */f1 /* */f2 /* */O./* */f1 /* */O./* */f2 }
LPTK/intellij-scala
testdata/resolve2/qualifier/access/PrivateRef.scala
Scala
apache-2.0
111
/* * Copyright 2016-2017 gutefrage.net 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 o...
gutefrage/scala-mandrill
play-json/src/main/scala/net/gutefrage/mandrill/playjson/core/package.scala
Scala
apache-2.0
2,045
/* * 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...
yiheng/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/keras/LocallyConnected1DSpec.scala
Scala
apache-2.0
3,376
/* * Copyright 2011-2012 Christos KK Loverdos * * 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 la...
loverdos/maybe
src/main/scala/com/ckkloverdos/maybe/Maybe.scala
Scala
apache-2.0
7,989
package utils import scala.math._ class Classifier(val testData: Array[String]) { private val kig = Array("、", "。", ",", "-", "「", "」", ".", "[", "]", "%", "%", "&", "&", "【", "】", "『", "』", "(", ")", "!", "!") private val k2 = Array("て", "に", "を", "は", "の", "です", "ます", "が", "ね", "で", "の", "だ") private val pro ...
sakabar/naiveBayesClassifierCL
src/main/scala/Utils.scala
Scala
gpl-3.0
3,178
package fabricator import fabricator.j.tests.JavaBaseTest import org.scalatest.testng.TestNGSuiteLike class JavaTests extends JavaBaseTest with TestNGSuiteLike
edombowsky/fabricator
src/test/scala/fabricator/JavaTests.scala
Scala
apache-2.0
162
/* * 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/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetEncodingSuite.scala
Scala
apache-2.0
4,723
/* * 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/utils/tf/loaders/Substr.scala
Scala
apache-2.0
1,210
/* * Copyright 2018 Combined Conditional Access Development, LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requir...
ccadllc/cedi-dtrace
xb3/shared/src/main/scala/com/ccadllc/cedi/dtrace/interop/xb3/xb3.scala
Scala
apache-2.0
856
/* `take` first checks if n==0. In that case we need not look at the stream at all. When n==1 we only need to look at the head of the stream, so that is a special case. */ def take(n: Int): Stream[A] = if (n > 0) uncons match { case Some(c) if (n == 1) => cons(c.head, Stream()) case Some(c) => cons(c.head, ...
willcodejavaforfood/fpinscala
answerkey/laziness/2.answer.scala
Scala
mit
380
package teststate.util trait Functor[F[_]] { def map[A, B](fa: F[A])(f: A => B): F[B] } object Functor { implicit lazy val option: Functor[Option] = new Functor[Option] { override def map[A, B](fa: Option[A])(f: A => B) = fa map f } implicit lazy val list: Functor[List] = new Functor[List] {...
japgolly/test-state
util/shared/src/main/scala/teststate/util/Functor.scala
Scala
apache-2.0
537
import scala.pickling._, scala.pickling.Defaults._, binary._ import org.scalatest.FunSuite case class MyClass[A](myString: String, a: A) class MyClassPickler[A](implicit val format: PickleFormat, aTypeTag: FastTypeTag[A], aPickler: Pickler[A], aUnpickler: Unpickler[A]) extends...
beni55/pickling
core/src/test/scala/pickling/run/custom-generic-pickler.scala
Scala
bsd-3-clause
1,638
package mau.mauredis import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import mau._ import mau.mausprayjson._ import mau.test._ import spray.json._ import spray.json.DefaultJsonProtocol._ class MauDatabaseRedisTest extends MauRedisSpec("MauDatabaseRedisTest") { import PersonP...
ExNexu/mau
mau-redis/src/test/scala/mau/mauredis/MauDatabaseRedisTest.scala
Scala
apache-2.0
5,506
// 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.actor._ import akka.http.scaladsl.model.ws._ import akka.stream._ import akka.stream.scaladsl._ import akka.testkit._ import akka.util.ByteString import...
j-mckitrick/ensime-sbt
src/sbt-test/ensime-sbt/ensime-server/server/src/test/scala/org/ensime/server/WebSocketBoilerplateSpec.scala
Scala
apache-2.0
2,856
package dao.auth import java.sql.Date import java.time.LocalDate import java.util.UUID import play.api.libs.json._ import com.mohiva.play.silhouette.api.LoginInfo import dao.admin.TenantRepo import slick.driver.JdbcProfile import slick.lifted.ProvenShape.proveShapeOf trait DBTableDefinitions { protected val drive...
SBP07/backend
app/dao/auth/DBTableDefinitions.scala
Scala
gpl-2.0
6,353
/* Title: Tools/Graphview/src/shapes.scala Author: Markus Kaiser, TU Muenchen Drawable shapes. */ package isabelle.graphview import java.awt.{BasicStroke, Graphics2D, Shape} import java.awt.geom.{AffineTransform, GeneralPath, Path2D, Rectangle2D, PathIterator} object Shapes { trait Node { de...
MerelyAPseudonym/isabelle
src/Tools/Graphview/src/shapes.scala
Scala
bsd-3-clause
7,766
package com.wavesplatform.lang import cats.Id import cats.kernel.Monoid import com.wavesplatform.lang.directives.values.V3 import com.wavesplatform.lang.directives.{Directive, DirectiveParser} import com.wavesplatform.lang.script.ScriptPreprocessor import com.wavesplatform.lang.v1.CTX import com.wavesplatform.lang.v1....
wavesplatform/Waves
lang/tests/src/test/scala/com/wavesplatform/lang/ScriptPreprocessorTest.scala
Scala
mit
5,241
/* * 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 ...
paulcastro/openwhisk
common/scala/src/main/scala/whisk/core/connector/MessageProducer.scala
Scala
apache-2.0
1,198
package org.jetbrains.plugins.scala.failed.annotator import org.jetbrains.plugins.scala.base.ScalaLightCodeInsightFixtureTestAdapter /** * Created by kate on 3/29/16. */ class ApplicationNotTakeParam_Failing extends ScalaLightCodeInsightFixtureTestAdapter { override protected def shouldPass: Boolean = false ...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/failed/annotator/ApplicationNotTakeParam.scala
Scala
apache-2.0
996
package org.hammerlab.guacamole.distributed import org.apache.spark.storage.BroadcastBlockId import org.hammerlab.genomics.loci.set.test.TestLociSet import org.hammerlab.guacamole.distributed.PileupFlatMapUtils.{pileupFlatMapMultipleSamples, pileupFlatMapOneSample, pileupFlatMapTwoSamples} import org.hammerlab.guacamo...
hammerlab/guacamole
src/test/scala/org/hammerlab/guacamole/distributed/PileupFlatMapUtilsSuite.scala
Scala
apache-2.0
10,688
package white { import scala.reflect._ object JavaAPI { def load(): Unit = { val code =""" import System; var a = new String("zhang"); System.out.println(a); def add(a,b){ return a.a + b.b; }; """ val a = new java.lang.String val SystemClass = Class.forName("java.lang.String") va...
zhangpc123/white
src/JavaAPI.scala
Scala
gpl-3.0
406
package io.coral.lib import org.json4s._ import org.json4s.native.JsonMethods._ import org.scalatest.{Matchers, WordSpecLike} class JsonExpressionParserSpec extends WordSpecLike with Matchers { implicit val formats = org.json4s.DefaultFormats "A JsonExpressionParser" should { "Properly extract array values" ...
daishichao/coral
runtime-api/src/test/scala/io/coral/lib/JsonExpressionParserSpec.scala
Scala
apache-2.0
8,997
/* Copyright 2017-19, 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_scala
modules/data/src/main/scala/org/platanios/tensorflow/data/image/CIFARLoader.scala
Scala
apache-2.0
6,486
/** * This file is part of the Uniscala Couch project. * Copyright (C) 2012 Sustainable Software Pty Ltd. * This is open source software, licensed under the Apache License * version 2.0 license - please see the LICENSE file included in * the distribution. * * Authors: * Sam Stainsby (sam@sustainablesoftware.com...
stainsby/uniscala-couch
src/main/scala/net/uniscala/couch/util/Http.scala
Scala
apache-2.0
1,047
/** * Copyright 2014 Dropbox, 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...
happybits/djinni
src/source/ObjcppGenerator.scala
Scala
apache-2.0
16,796
package org.jetbrains.plugins.scala.lang.psi.impl.base.patterns import com.intellij.lang.ASTNode import org.jetbrains.plugins.scala.lang.psi.ScalaPsiElementImpl import org.jetbrains.plugins.scala.lang.psi.api.base.patterns._ /** * @author Alexander Podkhalyuzin * Date: 28.02.2008 */ class ScCaseClausesImpl(node: AS...
gtache/intellij-lsp
intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/psi/impl/base/patterns/ScCaseClausesImpl.scala
Scala
apache-2.0
431
// Project: angulate2 (https://github.com/jokade/angulate2) // Description: Angulate2 annotations for explicit selection of the class mode (Scala/JS native) for annotated classes // Copyright (c) 2016 Johannes.Kastner <jokade@karchedon.de> // Distributed under the MIT License (see included LICENSE fi...
jokade/angulate2
bindings/src/main/scala/angulate2/ext/classMode.scala
Scala
mit
889
/* * Copyright 2011-2018 GatlingCorp (http://gatling.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 applic...
wiacekm/gatling
gatling-http/src/test/scala/io/gatling/http/fetch/CssParserSpec.scala
Scala
apache-2.0
3,008
/* * 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 ...
lenovor/zen
ml/src/main/scala/com/github/cloudml/zen/ml/neuralNetwork/MomentumUpdater.scala
Scala
apache-2.0
1,961
object Example { implicit class PimpedLong(x: Long) { def show() = println(s"Long value is $x") } 1.<ref>show() }
ilinum/intellij-scala
testdata/resolve/implicitConversion/SCL8660.scala
Scala
apache-2.0
123
package quizleague.domain.notification import quizleague.domain._ import java.time.LocalDateTime object NotificationTypeNames{ val result = "result" val maintain = "maintain" } case class Notification( id:String, typeName:String, timestamp:LocalDateTime, payload:Payload, retired:Boolean = false...
gumdrop/quizleague
shared/src/main/scala/quizleague/domain/notification/Notification.scala
Scala
mit
489
/** * 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 law or ag...
nruppin/CM-Well
server/cmwell-formats/src/test/scala/Helpers.scala
Scala
apache-2.0
1,613
package nl.dekkr.hoppr.actors import akka.actor.ActorSystem import akka.testkit.{ImplicitSender, TestKit} import nl.dekkr.hoppr.actors.SyndicationActor.{FeedContent, FeedException, GetFeed, FeedNoContentFound} import org.specs2.mutable.SpecificationLike class SyndicationActorSpec extends TestKit(ActorSystem()) with S...
plamola/hoppR
src/test/scala/nl.dekkr.hoppr.actors/SyndicationActorSpec.scala
Scala
mit
1,533
package org.psliwa.idea.composerJson import javax.swing.Icon import com.intellij.openapi.util.IconLoader object Icons { val Composer: Icon = IconLoader.getIcon("icons/composer.png") val Packagist: Icon = IconLoader.getIcon("icons/packagist.png") }
psliwa/idea-composer-plugin
src/main/scala/org/psliwa/idea/composerJson/Icons.scala
Scala
mit
255
package com.thoughtworks.deeplearning package plugins import com.thoughtworks.feature.Factory import com.thoughtworks.each.Monadic._ import org.scalactic.ErrorMessage import org.scalatest._ import com.thoughtworks.future._ import com.thoughtworks.deeplearning.scalatest.ThoughtworksFutureToScalaFuture import scalaz.s...
izhangzhihao/DeepLearning.scala
plugins-CumulativeFloatLayers/src/test/scala/com/thoughtworks/deeplearning/plugins/CumulativeFloatLayersSpec.scala
Scala
apache-2.0
10,450
for ((a: String, b: String) <- Map[String, String](); c: String <- List[String](); val d: String = a.toString) yield (/* offset: 6 */ a + /* offset: 17 */ b + /* offset: 59 */ c + /* offset: 97 */ d)
LPTK/intellij-scala
testdata/resolve2/element/StatementForYield.scala
Scala
apache-2.0
211
package spotlight import com.typesafe.config.{ Config, ConfigFactory } import omnibus.commons.identifier.ShortUUID /** Created by rolfsd on 7/5/16. */ package object testkit { def config( systemName: String, rootDir: String = ".", portOffset: Int = 0 ): Config = { val testConfig = { val algoJournal = "$...
dmrolfs/lineup
core/src/test/scala/spotlight/testkit/package.scala
Scala
mit
13,409
package akka.s3 import akka.http.scaladsl.model.StatusCodes import scala.collection.immutable import akka.http.scaladsl.server.Directives._ trait GetBucketLocation { self: AuthorizedContext => def doGetBucketLocation(bucketName: String) = { val headers = RawHeaderList( (X_AMZ_REQUEST_ID, requestId) ...
akiradeveloper/akka-s3
src/main/scala/akka/s3/location/GetBucketLocation.scala
Scala
apache-2.0
474
/* SimpleApp.scala */ import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ import org.apache.spark.SparkConf object SimpleApp { def main(args: Array[String]) { val logFile = "file:///usr/local/spark/README.md" val conf = new SparkConf().setAppName("Simple Application") val sc = new...
reetawwsum/Spark-Dockerfile
notebooks/Simple-Project/src/main/scala/SimpleApp.scala
Scala
mit
603
/*********************************************************************** * Copyright (c) 2013-2015 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 is ...
giserh/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/iterators/TestData.scala
Scala
apache-2.0
9,890
package mix.kafka.monitor import com.quantifind.kafka.OffsetGetter.OffsetInfo import com.twitter.util.Time import org.scalatest.{FlatSpec, Matchers} class LibratoOffsetReporterSpec extends FlatSpec with Matchers { behavior of "offsetsToMetrics" it should "convert offsets to metrics with multiple groups, multipl...
mix/kafka-librato-monitor
src/test/scala/mix/kafka/monitor/LibratoOffsetReporterSpec.scala
Scala
mit
7,953
package org.jetbrains.plugins.dotty.lang.parser.parsing.statements import org.jetbrains.plugins.dotty.lang.parser.parsing.expressions.{Block, Expr} import org.jetbrains.plugins.dotty.lang.parser.parsing.params.ParamClauses import org.jetbrains.plugins.dotty.lang.parser.parsing.types.Type /** * @author adkozlov */...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/dotty/lang/parser/parsing/statements/FunDef.scala
Scala
apache-2.0
722
package com.thetestpeople.trt.model import org.joda.time.DateTime import org.joda.time.Duration /** * Record of the execution of a single test case. */ case class Execution( id: Id[Execution] = Id.dummy, batchId: Id[Batch], testId: Id[Test], /** * Time associated with the test execution, ideally the star...
thetestpeople/trt
app/com/thetestpeople/trt/model/Execution.scala
Scala
mit
529
import scala.util.parsing.combinator._ import scala.util.parsing.input.Reader import scala.util.parsing.input.CharArrayReader.EofCh import scala.collection.mutable.{Map, HashMap} import scala.pickling.testing.PicklingBenchmark import scala.io.Source import scala.util.Random // for Java Serialization: import java.io.{...
scala/pickling
benchmark/WikiGraph.scala
Scala
bsd-3-clause
8,244
package org.jetbrains.plugins.scala package lang package psi package impl package search import com.intellij.openapi.progress.ProgressManager import com.intellij.openapi.util.Comparing import com.intellij.openapi.util.text.StringUtil import com.intellij.psi.PsiClass import com.intellij.psi.search.searches.DirectClass...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/search/ScalaDirectClassInheritorsSearcher.scala
Scala
apache-2.0
4,306
import scala.quoted._ import scala.quoted.autolift object Macros { inline def foo(i: => Int): Int = ${ fooImpl('i) } def fooImpl(i: Expr[Int])(using QuoteContext): Expr[Int] = { given Toolbox = Toolbox.make(getClass.getClassLoader) val y: Int = run(i) y } }
som-snytt/dotty
tests/disabled/neg-with-compiler/quote-run-in-macro-2/quoted_1.scala
Scala
apache-2.0
278
import sbt._ import sbt.Keys._ import com.typesafe.sbt.SbtAspectj.{ Aspectj, aspectjSettings, useInstrumentedClasses } import com.typesafe.sbt.SbtAspectj.AspectjKeys.inputs object InterpositionBuild extends Build { lazy val interposition = Project( id = "interposition", base = file("."), settings = Defau...
NetSys/demi
project/Build.scala
Scala
bsd-2-clause
1,460
package net.liftmodules import net.liftweb._ import util.{Props} import http._ import common._ import org.specs2.mutable.Specification object FoBoFAResSpec extends Specification { "FoBoFAResSpec Specification".title sequential //FontAwesome550 "With fobofares.Resource.init set to fobofares.Resource.FontAwe...
karma4u101/FoBo
Font-Awesome/Font-Awesome-Res/src/test/scala/net/liftmodules/fobofa/FoBoFAResSpec.scala
Scala
apache-2.0
10,738
package models import play.api.libs.functional.syntax._ import play.api.libs.json.{JsPath, Writes} case class SupportedLanguage(id: Long, ietfCode: String, name: String) object SupportedLanguage { implicit val writes: Writes[SupportedLanguage] = ( (JsPa...
PanzerKunst/redesigned-cruited.com-frontend
website/app/models/SupportedLanguage.scala
Scala
gpl-3.0
474
package nl.malienkolders.htm.lib.model import net.liftweb._ import mapper._ class Day extends LongKeyedMapper[Day] with IdPK with OneToMany[Long, Day] { def getSingleton = Day object date extends MappedLong(this) object timeslots extends MappedOneToMany(ArenaTimeSlot, ArenaTimeSlot.day, OrderBy(ArenaTimeSlot.f...
hema-tournament-manager/htm
htm-lib/src/main/scala/nl/malienkolders/htm/lib/model/TimeSlot.scala
Scala
apache-2.0
1,646
package com.mesosphere.cosmos.error import io.circe.Encoder import io.circe.JsonObject import io.netty.handler.codec.http.HttpResponseStatus trait CosmosError{ def message: String def data: Option[JsonObject] def status: HttpResponseStatus = HttpResponseStatus.BAD_REQUEST def exception: CosmosException = { ...
dcos/cosmos
cosmos-common/src/main/scala/com/mesosphere/cosmos/error/CosmosError.scala
Scala
apache-2.0
522
/* * Copyright (C) 2016 Nikos Katzouris * * 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. * * This program is d...
nkatzz/OLED
src/main/scala/utils/parsers/ASPResultsParser.scala
Scala
gpl-3.0
1,379
package io.udash.web.guide.views.bootstrapping import io.udash._ import io.udash.css.CssView import io.udash.web.commons.components.CodeBlock import io.udash.web.guide.styles.partials.GuideStyles import io.udash.web.guide.{Context, _} import scalatags.JsDom case object BootstrappingRpcViewFactory extends StaticViewFa...
UdashFramework/udash-core
guide/guide/.js/src/main/scala/io/udash/web/guide/views/bootstrapping/BootstrappingRpcView.scala
Scala
apache-2.0
4,382
package eu.shiftforward.icfpc2015.model final case class Score(currentScore: Long = 0, prevLinesCleared: Int = 0, powerPhrasesUsed: Set[PowerPhrase] = Set.empty) { def updatePower(powerPhrasesScored: Seq[PowerPhrase]) = { val (points, newPhrases) = powerPhrasesScore...
ShiftForward/icfpc2015
src/main/scala/eu/shiftforward/icfpc2015/model/Score.scala
Scala
mit
954
package epic.util import org.scalacheck.Prop import org.scalatest.FunSuite import org.scalatest.prop.Checkers class LRUCacheTest extends FunSuite with Checkers { test("the key/value pair is always right") { this.check(Prop.forAll { (s: Map[Int, Long]) => val lruCache = new LRUCache[Int, Long](10) (...
langkilde/epic
src/test/scala/epic/util/LRUCacheTest.scala
Scala
apache-2.0
740
package org.openmole.plugin.environment.egi import gridscale.dirac.JobDescription import org.openmole.core.exception.InternalProcessingError import org.openmole.plugin.environment.batch.environment.{ AccessControl, BatchEnvironment, SerializedJob } import org.openmole.plugin.environment.batch.storage.EnvironmentStorag...
openmole/openmole
openmole/plugins/org.openmole.plugin.environment.egi/src/main/scala/org/openmole/plugin/environment/egi/EGIJobService.scala
Scala
agpl-3.0
3,111
package spark.scheduler import org.scalatest.FunSuite import org.scalatest.BeforeAndAfter import spark._ import spark.scheduler._ import spark.scheduler.cluster._ import scala.collection.mutable.ArrayBuffer import java.util.Properties class DummyTaskSetManager( initPriority: Int, initStageId: Int, initN...
baeeq/incubator-spark
core/src/test/scala/spark/scheduler/ClusterSchedulerSuite.scala
Scala
bsd-3-clause
8,920
package com.stulsoft.exercises.arithmetic /** Determine whether a given integer number is prime. * <p> * Example: * {{{7.isPrime}}} * {{{true}}} * * @author Yuriy Stul. */ object P31DetermineWhetherPrime extends App { test(1) test(2) test(3) test(4) test(5) test(6) implicit def isPrime(i:...
ysden123/scala-exercises
src/main/scala/com/stulsoft/exercises/arithmetic/P31DetermineWhetherPrime.scala
Scala
mit
853
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.internal.scaladsl.server import akka.stream.Materializer import akka.util.ByteString import com.lightbend.lagom.internal.api.Path import com.lightbend.lagom.internal.scaladsl.api.ScaladslPath import com.lightbend....
ignasi35/lagom
service/scaladsl/server/src/main/scala/com/lightbend/lagom/internal/scaladsl/server/ScaladslServiceRouter.scala
Scala
apache-2.0
4,537
package ch.epfl.directembedding import ch.epfl.yinyang.TransformationUtils import scala.reflect.macros.TypecheckException import scala.reflect.macros.blackbox.Context // Inspired by https://github.com/scala-yinyang/scala-yinyang/blob/16732662470992e10a7ae479d8be5419f13d3654/components/core/src/Utils.scala trait Mac...
directembedding/directembedding
directembedding/src/main/scala/ch/epfl/directembedding/Utils.scala
Scala
bsd-3-clause
2,490
/* * 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...
AndreasPetter/storehaus
storehaus-algebra/src/main/scala/com/twitter/storehaus/algebra/ReadableStoreAlgebra.scala
Scala
apache-2.0
2,571
/* * 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 ...
ahnqirage/spark
mllib/src/test/scala/org/apache/spark/ml/PipelineSuite.scala
Scala
apache-2.0
10,185
package scala.tools.nsc package backend.jvm package opt import org.junit.Assert._ import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.JUnit4 import scala.tools.asm.Opcodes._ import scala.tools.partest.ASMConverters._ import scala.tools.testing.BytecodeTesting import scala.tools.testing.Byte...
felixmulder/scala
test/junit/scala/tools/nsc/backend/jvm/opt/EmptyExceptionHandlersTest.scala
Scala
bsd-3-clause
2,654
/* * Copyright (c) 2015 Robert Conrad - All Rights Reserved. * Unauthorized copying of this file, via any medium is strictly prohibited. * This file is proprietary and confidential. * Last modified by rconrad, 1/4/15 1:20 PM */ package base.socket.message.user import base.socket.message.UserClientMessage import ...
robconrad/base-api
project-socket/src/main/scala/base/socket/message/user/UserClientMessage.scala
Scala
mit
603
/* * 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 ...
aosagie/spark
external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaContinuousStream.scala
Scala
apache-2.0
9,600
package org.openstack.api.restful.ceilometer.v2.elements /** * ceilometer AlarmState representation * @author Antonio Murgia * @version 22/10/14 */ case class AlarmState(s : String) extends Serializable object AlarmState{ val values = Map(OKSTATE.s -> OKSTATE, ALARMSTATE.s -> ALARMSTATE, ...
tmnd1991/ceilometerAPI4s
src/main/scala/org/openstack/api/restful/ceilometer/v2/elements/AlarmState.scala
Scala
apache-2.0
518
package org.monarchinitiative.dosdp import io.circe._ import io.circe.generic.auto._ import io.circe.syntax._ import org.apache.commons.codec.digest.DigestUtils import org.phenoscape.scowl._ import org.semanticweb.owlapi.model.{IRI, OWLAnnotationProperty} /** * Basic data model for DOSDP schema, for serializing to/f...
balhoff/dosdp-scala
src/main/scala/org/monarchinitiative/dosdp/DOSDP.scala
Scala
mit
10,433
/** * 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...
bluebreezecf/kafka
core/src/test/scala/unit/kafka/admin/TopicCommandTest.scala
Scala
apache-2.0
4,550
/* * 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/feature/image/ImageRandomCrop.scala
Scala
apache-2.0
1,677
package com.sksamuel.scapegoat.inspections.empty import com.sksamuel.scapegoat.{Inspection, InspectionContext, Inspector, Levels} /** * @author * Stephen Samuel */ class EmptyFor extends Inspection( text = "Empty for loop", defaultLevel = Levels.Warning, description = "Checks for empty for ...
sksamuel/scapegoat
src/main/scala/com/sksamuel/scapegoat/inspections/empty/EmptyFor.scala
Scala
apache-2.0
1,140
package jumpmicro.jmresourceregistry.impl.actor import org.log4s._ import org.apache.camel.{CamelContext} import org.apache.camel.scala.dsl.builder.ScalaRouteBuilder import scaldi.Injectable //: ------------------------------------------------------------------------------------- //: Copyright © 2017 Philip Andrew ht...
PhilAndrew/JumpMicro
JMResourceRegistry/src/main/scala/jumpmicro/jmresourceregistry/impl/actor/StartCamel.scala
Scala
mit
798
package spire package benchmark.jmh import java.util.concurrent.TimeUnit import org.openjdk.jmh.annotations._ import spire.algebra._ import spire.implicits._ import spire.math._ @BenchmarkMode(Array(Mode.AverageTime)) @OutputTimeUnit(TimeUnit.MICROSECONDS) class AddBenchmarks { def addGeneric[@sp(Int, Long, Flo...
tixxit/spire
benchmark-jmh/src/main/scala/spire/benchmark/jmh/AddBenchmarks.scala
Scala
mit
2,558
package net.scalax.cpoi.test import java.util.{Calendar, Date} import net.scalax.cpoi.api._ import net.scalax.cpoi.exception.{ExpectBooleanCellException, ExpectStringCellException} import org.apache.poi.hssf.usermodel.HSSFWorkbook import org.apache.poi.ss.usermodel.CellType import org.scalatest._ class HSSFWorkbookN...
scalax/poi-collection
src/test/scala/net/scalax/cpoi/read/HSSFWorkbookNumbricFormulaCellTest.scala
Scala
mit
4,378
package scala package reflect package internal package transform import Flags._ trait UnCurry { val global: SymbolTable import global._ import definitions._ /** Note: changing tp.normalize to tp.dealias in this method leads to a single * test failure: run/t5688.scala, where instead of the expected outpu...
slothspot/scala
src/reflect/scala/reflect/internal/transform/UnCurry.scala
Scala
bsd-3-clause
3,353
package geotrellis.transit.loader.gtfs import geotrellis.transit.loader.{GraphFileSet,ParseResult} import geotrellis.network.{NamedLocations,NamedLocation,NamedWays} case class GtfsFiles(name:String,dataPath:String) extends GraphFileSet { def stopsPath = new java.io.File(dataPath,"stops.txt").toString def stopTi...
WorldBank-Transport/open-transit-indicators
scala/geotrellis-transit/src/main/scala/geotrellis/transit/loader/gtfs/GtfsFiles.scala
Scala
gpl-3.0
1,335
/* ************************************************************************************* * Copyright 2013 Normation SAS ************************************************************************************* * * This file is part of Rudder. * * Rudder is free software: you can redistribute it and/or modify * it under the...
armeniaca/rudder
rudder-core/src/main/scala/com/normation/rudder/batch/AsyncWorkflowInfo.scala
Scala
gpl-3.0
2,111
package org.marxc import org.parboiled.scala._ import org.parboiled.errors.{ErrorUtils, ParsingException} import org.marxc.ast._ class ArnoldParser extends Parser { val ParseError = "THE RICH WILL DO ANYTHING FOR THE POOR BUT GET OFF THEIR BACKS" val DeclareInt = "PRIVATE PROPERTY" val SetInitialValue = "NOT...
iogr/MarxC
src/main/scala/org/marxc/MarxParser.scala
Scala
apache-2.0
6,990
package com.github.gdefacci.raz import shapeless._ import shapeless.ops.hlist.Tupler trait ToPathEncoder[H, T, S <: PathPosition, E <: PathPosition] { def apply(h: H): PathEncoder[T, S, E] } object ToPathEncoder { implicit def htuple[H <: HList, HR <: HList, TUP, S <: PathPosition, E <: PathPosition]( imp...
gdefacci/raz
raz/src/main/scala/com/github/gdefacci/raz/ToPathEncoder.scala
Scala
mit
1,327
package io.flow.lint import io.apibuilder.spec.v0.models._ import org.scalatest.funspec.AnyFunSpec import org.scalatest.matchers.should.Matchers class CommonParameterTypesSpec extends AnyFunSpec with Matchers { private[this] val linter = linters.CommonParameterTypes def buildService( paramName: String, ...
flowcommerce/api-lint
src/test/scala/io/flow/lint/CommonParameterTypesSpec.scala
Scala
mit
3,780
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This file is part of Rudder. * * Rudder is free software: you can redistribute it and/or modify * it under the...
armeniaca/rudder
rudder-core/src/main/scala/com/normation/rudder/repository/ldap/LDAPRuleRepository.scala
Scala
gpl-3.0
16,254
/* * 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. */ // scalastyle:off line.size.limit /* * Ported...
scala-js/scala-js
test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/math/MathContextTest.scala
Scala
apache-2.0
4,214
// Copyright: 2010 - 2018 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.util import akka.actor.{ ActorContext, ActorRef, Scheduler } import java.time.Clock import java.util.concurrent.atomic.{ AtomicBoolean, AtomicInteger } import org.slf4j.Lo...
yyadavalli/ensime-server
util/src/main/scala/org/ensime/util/Debouncer.scala
Scala
gpl-3.0
6,160
/* * Copyright (c) 2002-2018 "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 Foundatio...
HuangLS/neo4j
community/cypher/cypher-compiler-2.3/src/main/scala/org/neo4j/cypher/internal/compiler/v2_3/planner/logical/greedy/findShortestPaths.scala
Scala
apache-2.0
1,997
// Copyright (c) 2011-2015 ScalaMock Contributors (https://github.com/paulbutcher/ScalaMock/graphs/contributors) // // 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, in...
paulbutcher/ScalaMock
shared/src/test/scala/com/paulbutcher/test/TestClass.scala
Scala
mit
1,306
package org.jetbrains.plugins.scala package lang package parser package parsing import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder trait ParsingRule { def parse(implicit builder: ScalaPsiBuilder): Boolean @inline final def apply()(implicit builder: ScalaPsiBuilder): Boolean = parse(...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/parser/parsing/ParsingRule.scala
Scala
apache-2.0
475
/** * 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 law or ag...
nruppin/CM-Well
server/cmwell-controller/src/main/scala/cmwell/ctrl/checkers/ComponentEvent.scala
Scala
apache-2.0
3,134
package scavenger.backend.worker import scavenger.CachingPolicy import scavenger.backend.Cache /** Worker-specific cache * * @since 2.1 * @author Andrey Tyukin */ trait WorkerCache extends Cache { protected def shouldBeCachedHere(cachingPolicy: CachingPolicy): Boolean = { cachingPolicy.cacheLocally } ...
jorro/scavenger
src/main/scala/scavenger/backend/worker/WorkerCache.scala
Scala
gpl-3.0
322