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 org.scalajs.testsuite.utils import java.{lang => jl, util => ju} import org.scalajs.testsuite.utils.AssertThrows._ import scala.collection.JavaConversions._ trait CollectionsTestBase { val range: Range = 0 to 30 class A extends jl.Comparable[A] { def compareTo(o: A): Int = this.##.compareTo(o.##) ...
mdedetrich/scala-js
test-suite/shared/src/test/scala/org/scalajs/testsuite/utils/CollectionsTestBase.scala
Scala
bsd-3-clause
4,536
package com.twitter.finagle.service import com.twitter.finagle.Filter.TypeAgnostic import com.twitter.finagle._ import com.twitter.finagle.stats.{ ExceptionStatsHandler, MultiCategorizingExceptionStatsHandler, StatsReceiver } import com.twitter.util._ import java.util.concurrent.atomic.LongAdder import java.util...
luciferous/finagle
finagle-core/src/main/scala/com/twitter/finagle/service/StatsFilter.scala
Scala
apache-2.0
10,140
/* * 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 ...
oscarceballos/flink-1.3.2
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/runtime/datastream/DataStreamAggregateITCase.scala
Scala
apache-2.0
11,018
package com.criteo.cuttle import java.io._ import java.nio.file.Files import java.time.Instant import doobie.imports._ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration._ import scala.concurrent.stm._ trait ExecutionStreams { def info(str: CharSequence) = this.writeln("INFO...
jbkt/cuttle
core/src/main/scala/com/criteo/cuttle/ExecutionStreams.scala
Scala
apache-2.0
4,506
/* * 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 ...
brad-kaiser/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala
Scala
apache-2.0
1,492
/* * Copyright (C) 2005, The Beangle Software. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This...
beangle/data
transfer/src/main/scala/org/beangle/data/transfer/Format.scala
Scala
lgpl-3.0
853
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.lsp.ensime import akka.actor._ import akka.event.slf4j.SLF4JLogging import org.ensime.api.{ EnsimeConfig, EnsimeServerConfig } import org.ensime.lsp.api.commands.MessageTy...
ensime/ensime-server
lsp/src/main/scala/org/ensime/lsp/ensime/EnsimeActor.scala
Scala
gpl-3.0
1,806
package com.programmaticallyspeaking.ncd.e2e import akka.actor.{ActorRef, Inbox, PoisonPill} import com.programmaticallyspeaking.ncd.chrome.domains.Debugger.{CallFrame, EvaluateOnCallFrameResult, Location} import com.programmaticallyspeaking.ncd.chrome.domains.Runtime.{CallArgument, RemoteObject} import com.programmat...
provegard/ncdbg
src/test/scala/com/programmaticallyspeaking/ncd/e2e/RealDebuggerTest.scala
Scala
bsd-3-clause
22,809
package net.sansa_stack.rdf.spark.qualityassessment.metrics import com.holdenkarau.spark.testing.DataFrameSuiteBase import net.sansa_stack.rdf.spark.io._ import net.sansa_stack.rdf.spark.qualityassessment._ import org.apache.jena.riot.Lang import org.scalatest.FunSuite class RelevancyTests extends FunSuite with DataF...
SANSA-Stack/SANSA-RDF
sansa-rdf/sansa-rdf-spark/src/test/scala/net/sansa_stack/rdf/spark/qualityassessment/metrics/RelevancyTests.scala
Scala
apache-2.0
1,201
/** * Copyright (C) 2012 Orbeon, Inc. * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. * * This program i...
evlist/orbeon-forms
src/main/scala/org/orbeon/oxf/xforms/control/controls/XXFormsComponentRootControl.scala
Scala
lgpl-2.1
1,244
package com.datlinq.datafiniti.config import com.datlinq.datafiniti.config.DatafinitiAPITypes._ import com.datlinq.datafiniti.config.DatafinitiAPIViewsV4._ import org.scalatest.FunSuite /** * Created by Tom Lous on 26/03/2018. * Copyright © 2018 Datlinq B.V.. */ class DatafinitiAPIViewsV4Test extends FunSuite {...
datlinq/scalafiniti
src/test/scala/com/datlinq/datafiniti/config/DatafinitiAPIViewsV4Test.scala
Scala
mit
1,656
/* * 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 ...
maropu/spark
resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/ClientModeTestsSuite.scala
Scala
apache-2.0
5,573
package uk.gov.dvla.vehicles.dispose.gatling import com.typesafe.config.ConfigFactory import io.gatling.core.Predef._ import io.gatling.http.Predef.http object Helper { private val config = ConfigFactory.load() def baseUrl: String = if (config.hasPath("test.url")) config.getString("test.url").reverse.dropWh...
dvla/vehicles-online
gatling-tests/src/test/scala/uk/gov/dvla/vehicles/dispose/gatling/Helper.scala
Scala
mit
788
package geometry object Polygon { /* * isLeft(): Tests if a point is left, on or right of an * infinite line. * * Input: * p0: The point of origin of a polygon line. * p1: The point of termination of a polygon line. * p2: The point whose location is to be determined. ...
PDXostc/rvi_big-data_api
app/geometry/Polygon.scala
Scala
mpl-2.0
3,578
package scala.slick.benchmark import scala.slick.driver.JdbcDriver.simple._ object Benchmark { val COUNT = 2000 def main(args: Array[String]) { for(i <- 0 to COUNT) test1(i == 0) val t0 = System.nanoTime() for(i <- 0 to COUNT) test1(false) val t1 = System.nanoTime() val total = (t1-t0)/10000...
retronym/slick
slick-testkit/src/test/scala/scala/slick/benchmark/Benchmark.scala
Scala
bsd-2-clause
1,796
/* * Copyright 2015 Webtrends (http://www.webtrends.com) * * See the LICENCE.txt 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...
pcross616/wookiee
wookiee-core/src/test/scala/com/webtrends/harness/logging/TestingAppender.scala
Scala
apache-2.0
1,090
package scaladci package examples import org.specs2.mutable.Specification import org.specs2.specification._ import scala.collection.mutable /* Shopping cart example, version 1 Implementing a simple Place Order use case of an online shopping cart to explore how we could handle various execution paths (scenarios) with...
DCI/scaladci
examples/src/test/scala/scaladci/examples/ShoppingCart1.scala
Scala
apache-2.0
9,819
package net.particlez.gui import java.awt.Color import java.awt.Dimension import scala.swing.Table.LabelRenderer import scala.swing.event.WindowClosing import scala.swing.Alignment import scala.swing.Component import scala.swing.Frame import scala.swing.ScrollPane import scala.swing.SimpleSwingApplication import scala....
bbiletskyy/particlez
src/main/scala/net/particlez/gui/ParticleManagerPanel.scala
Scala
apache-2.0
4,081
/* * The MIT License (MIT) * <p> * Copyright (c) 2017-2020 * <p> * 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 use,...
amannocci/streamy
core/src/test/scala/io/techcode/streamy/StreamySpec.scala
Scala
mit
3,043
/* * 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/config/HttpProtocolBuilderSpec.scala
Scala
apache-2.0
1,833
package com.mohiva.play.silhouette.impl.providers.openid.service import com.mohiva.play.silhouette.impl.providers.OpenIDSettings import com.mohiva.play.silhouette.impl.providers.openid.services.PlayOpenIDService import org.specs2.mock.Mockito import org.specs2.specification.Scope import play.api.libs.openid.OpenIdClie...
mohiva/play-silhouette
silhouette/test/com/mohiva/play/silhouette/impl/providers/openid/service/PlayOpenIDServiceSpec.scala
Scala
apache-2.0
1,346
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.sbt import java.util.Optional import play.api._ import sbt._ import scala.language.implicitConversions /** * Fix compatibility issues for PlayExceptions. This is the version compatible with sbt 1.0. */ object PlayExceptions ...
zaneli/playframework
framework/src/sbt-plugin/src/main/scala-sbt-1.0/play/sbt/PlayExceptions.scala
Scala
apache-2.0
1,527
package com.grandata.commons.geo import org.specs2.mutable.Specification import com.grandata.commons.files.FileUtils import scala.util.Try class GeoLocatorSpec extends Specification { val statesContent = FileUtils.resourceContent("/states.geojson") val citiesContent = FileUtils.resourceContent("/cities.geojson...
GranData/grandata-commons
src/test/scala/com/grandata/commons/geo/GeoLocatorSpec.scala
Scala
mit
1,433
/* sbt -- Simple Build Tool * Copyright 2008, 2009 Steven Blundy, Mark Harrah */ package sbt.impl import scala.xml.{Elem, Group} /* The following classes run tests for their associated test framework. * NOTE #1: DO NOT actively use these classes. Only specify their names to LazyTestFramework * for reflective lo...
matheshar/simple-build-tool
src/main/scala/sbt/impl/TestFrameworkImpl.scala
Scala
bsd-3-clause
10,552
/* * Copyright 2016 Tamer AbdulRadi * * 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...
schemasafe/troy
troy-driver/src/main/scala/troy/driver/schema/table.scala
Scala
apache-2.0
1,247
// Copyright 2016 Carl Pulley package cakesolutions.docker.testkit import java.io.{File, PrintWriter} import java.nio.file.{Files, Path, Paths, StandardCopyOption} import java.time.ZonedDateTime import java.util.{TimeZone, UUID} import cakesolutions.docker.testkit.logging.Logger import net.jcazevedo.moultingyaml._ i...
carlpulley/docker-compose-testkit
src/main/scala/cakesolutions/docker/testkit/DockerComposeTestKit.scala
Scala
apache-2.0
17,405
package app.models /** * User: asalvadore */ trait Identifiable { val id: Long }
mericano1/spray-akka-slick-postgres
src/main/scala/app/models/Identifiable.scala
Scala
mit
86
/** * 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 * dist...
DigitalAssetCom/hlp-candidate
server/pbft/src/main/scala/org/hyperledger/pbft/ConnectionManagement.scala
Scala
apache-2.0
2,845
package opencl.generator.stencil import ir._ import ir.ast.Pad.BoundaryFun import ir.ast._ import lift.arithmetic.{SizeVar, StartFromRange, Var} import opencl.executor._ import opencl.ir._ import opencl.ir.pattern.{MapGlb, _} import org.junit.Assert._ import org.junit.Assume.assumeFalse import org.junit._ import scal...
lift-project/lift
src/test/opencl/generator/stencil/TestStencil2D.scala
Scala
mit
38,999
import org.scalatest.{FunSuite, Matchers} /** @version created manually **/ class ZipperTest extends FunSuite with Matchers { def empty[A]: Option[BinTree[A]] = None def bt[A](v: A, l: Option[BinTree[A]], r: Option[BinTree[A]]): Option[BinTree[A]] = Some(BinTree(v, l, r)) def leaf[A](v: A): Option[BinTree[...
ricemery/xscala
exercises/zipper/src/test/scala/ZipperTest.scala
Scala
mit
1,713
package ml.util object TypeConversions { /** * Convert from iterable of generic type T to vectorDouble */ def TtoDouble[T](v: Iterable[T])(implicit num: Numeric[T]): Vector[Double] = { v.map(x => num.toDouble(x)).toVector } }
jccarrasco/maleta
src/ml/util/TypeConversions.scala
Scala
gpl-2.0
242
package clasp.core; /** * Provides an interface to the * [[http://developer.android.com/tools/sdk/tools-notes.html Android SDK Tools]]. */ package object sdktools { // http://stackoverflow.com/questions/6227759 def runWithTimeout[T](timeoutMs: Long)(f: => T) : Option[T] = { import scala.actors.Futures.awai...
hamiltont/clasp
src/clasp/core/sdktools/package.scala
Scala
mit
599
import edu.uta.diql._ import org.apache.spark._ import org.apache.spark.rdd._ object Test { def main ( args: Array[String] ) { val conf = new SparkConf().setAppName("Test") val sc = new SparkContext(conf) explain(true) val A = sc.textFile(args(0)).zipWithIndex.map{ case (line,i) => (i,line.toDoub...
fegaras/DIQL
tests/diablo/spark/Average.scala
Scala
apache-2.0
522
/* * Copyright 2011-2022 GatlingCorp (https://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 appli...
gatling/gatling
gatling-http/src/main/scala/io/gatling/http/cache/Http2PriorKnowledgeSupport.scala
Scala
apache-2.0
2,347
/* * Copyright (C) 2005, The OpenURP Software. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This...
openurp/api
edu/src/main/scala/org/openurp/edu/clazz/model/RestrictionMeta.scala
Scala
lgpl-3.0
1,702
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
liquidarmour/ct-calculations
src/test/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/AC7210BSpec.scala
Scala
apache-2.0
6,047
package com.sksamuel.elastic4s.indexes import com.sksamuel.elastic4s.bulk.BulkCompatibleDefinition import com.sksamuel.elastic4s.{FieldValue, FieldsMapper, IndexAndType, Indexable} import com.sksamuel.exts.OptionImplicits._ import org.elasticsearch.action.support.WriteRequest.RefreshPolicy import org.elasticsearch.ind...
FabienPennequin/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/indexes/IndexDefinition.scala
Scala
apache-2.0
2,902
package fr.ymanvieu.trading.gatling.scenario import io.gatling.core.Predef._ import io.gatling.core.structure._ import io.gatling.http.Predef._ object RateHistoryScenario { val feeder = Array( Map("fromcur" -> "USD", "tocur" -> "EUR"), Map("fromcur" -> "BTC", "tocur" -> "USD"), Map("fromcur" -> "ETH", ...
ymanvieu/trading
trading-gatling/src/test/scala/fr/ymanvieu/trading/gatling/scenario/RateHistoryScenario.scala
Scala
lgpl-3.0
660
package x7c1.linen.modern.init.unread import android.support.v7.widget.LinearLayoutManager import x7c1.linen.database.control.DatabaseHelper import x7c1.linen.modern.action.observer.{OutlineFocusedObserver, OutlineSelectedObserver, OutlineSkipStoppedObserver, OutlineSkippedObserver} import x7c1.linen.modern.action.{En...
x7c1/Linen
linen-modern/src/main/scala/x7c1/linen/modern/init/unread/OutlineAreaInitializer.scala
Scala
mit
3,225
/* sbt -- Simple Build Tool * Copyright 2008, 2009 Mark Harrah, Vesa Vilhonen */ package sbt import java.io.File import java.net.{ URL, URLClassLoader } import java.lang.reflect.{ Method, Modifier } import Modifier.{ isPublic, isStatic } import classpath.ClasspathUtilities trait ScalaRun { def run(mainClass: Str...
jasonchaffee/sbt
run/src/main/scala/sbt/Run.scala
Scala
bsd-3-clause
4,472
/* * 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 ...
sh-cho/cshSpark
deploy/history/ApplicationHistoryProvider.scala
Scala
apache-2.0
5,009
sealed trait Top sealed trait Sub extends Top trait C { private object P extends Sub def bob() = P.getClass def bob2() = O.d(P) }
folone/dotty
tests/pos/t1107b/T.scala
Scala
bsd-3-clause
136
/* * Copyright 2015 Martijn van de Rijdt * * This file is part of BOSI. * * BOSI 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. ...
TinusTinus/bosi
src/main/scala/nl/mvdr/breakout/state/Ball.scala
Scala
gpl-3.0
1,295
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala.tools.nsc.fsc i...
lrytz/scala
src/compiler/scala/tools/nsc/fsc/Socket.scala
Scala
apache-2.0
2,226
package skinny.engine.async import skinny.engine.{ Context, RouteTransformer } import skinny.engine.base.{ SkinnyEngineContextInitializer, RouteRegistryAccessor } import skinny.engine.routing.Route /** * Before/After DSL for Async web apps. */ trait AsyncBeforeAfterDsl { self: RouteRegistryAccessor with SkinnyEngin...
holycattle/skinny-framework
engine/src/main/scala/skinny/engine/async/AsyncBeforeAfterDsl.scala
Scala
mit
1,037
package ch.epfl.gsn.xpr.parser import org.scalatest.Matchers import ch.epfl.gsn.xpr.parser.XprParser; import org.scalatest.FunSpec import ch.epfl.gsn.xpr._ import util._ class XprParserTest extends FunSpec with Matchers { describe("parse expression"){ it("should get parsed function"){ val parsed=Xp...
LSIR/gsn
gsn-tools/src/test/scala/ch/epfl/gsn/xpr/parser/XprParserTest.scala
Scala
gpl-3.0
1,061
package amailp.intellij.robot.psi.reference import amailp.intellij.robot.psi.utils.ExtRobotPsiUtils import amailp.intellij.robot.psi.{ResourceValue, RobotPsiFile} import com.intellij.openapi.module.ModuleUtilCore import com.intellij.openapi.roots.ModuleRootManager import com.intellij.openapi.vfs.VirtualFile import com...
AmailP/robot-plugin
src/main/scala/amailp/intellij/robot/psi/reference/ResourceValueReference.scala
Scala
gpl-3.0
1,811
/* date: Jan 5, 2012 */ package com.server case class ImageNodeCmd(parameters:List[String]) extends Node with Link with Common { override def toString="ImageNodeCmd" def postNextSibling { if(getNext !=None) { idNextSibling=getNext.get.getId } } // 'CommandStructure' iterates 'cmdVector' to ...
hangle/Script
src/ImageNodeCmd.scala
Scala
apache-2.0
607
// 1EC Graph Parser // Copyright (c) University of California // Copyright (c) Jonathan Kummerfeld // // This software is covered by a license. See the LICENSE.txt file in the // top-level directory of this distribution or at // https://github.com/jkkummerfeld/1ec-graph-parser for the full text of the // license. pac...
jkkummerfeld/1ec-graph-parser
parser/src/main/scala/labelGenerator.scala
Scala
isc
5,626
package lert.elasticsearch.matcher import java.io.ByteArrayInputStream import java.util import java.util.{Collections, Date} import scala.concurrent.duration.Duration import lert.core.BaseSpec import lert.core.processor.AlertMessage import lert.elasticsearch.restclient.{Response, RestClient} import org.apache.http.{H...
l3rt/l3rt
elasticsearch-input/src/test/scala/lert/elasticsearch/matcher/CountMatcherSpec.scala
Scala
apache-2.0
2,980
package ch.ethz.dalab.dissolve.classification import org.apache.spark.rdd.RDD import org.apache.spark.rdd.PairRDDFunctions import ch.ethz.dalab.dissolve.regression.LabeledObject import scala.collection.mutable.HashMap import ch.ethz.dalab.dissolve.regression.LabeledObject import scala.reflect.ClassTag import ch.ethz.d...
dalab/dissolve-struct
dissolve-struct-lib/src/main/scala/ch/ethz/dalab/dissolve/classification/ClassificationUtils.scala
Scala
apache-2.0
3,617
package silky.persistence.file import java.nio.file.Paths import silky.persistence.{Entry, Persistence} import scala.concurrent.{ExecutionContext, Future} import scala.reflect.io.File class FilePersistence(baseDir: String, fileExtension: String = "json")(implicit ctx: ExecutionContext) extends Persistence { impor...
PILTT/silky-persistence
src/main/scala/silky/persistence/file/FilePersistence.scala
Scala
apache-2.0
1,982
/* * Copyright 2007-2011 WorldWide Conferencing, 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 required by applica...
sortable/framework
core/json-ext/src/test/scala/net/liftweb/json/ext/JsonBoxSerializerSpec.scala
Scala
apache-2.0
2,381
package drawinghouses import scala.collection.immutable._ /** * A simple representation of a graph with the specified edges. * @param edges The edges of this graph. * @tparam A Type of the vertices. */ case class SimpleGraph[A](edges: Set[(A, A)]) { /** * The vertices of this simple graph. */ val vertic...
peterneyens/drawing-houses
src/main/scala/drawinghouses/SimpleGraph.scala
Scala
mit
611
//====================================================================================================================== // Facsimile: A Discrete-Event Simulation Library // Copyright © 2004-2020, Michael J Allen. // // This file is part of Facsimile. // // Facsimile is free software: you can redistribute it and/or mod...
MichaelJAllen/facsimile
facsimile-util/src/main/scala/org/facsim/util/log/LogStream.scala
Scala
lgpl-3.0
5,376
/* * 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 ...
pteichman/zipkin
zipkin-common/src/test/scala/com/twitter/zipkin/common/AnnotationSpec.scala
Scala
apache-2.0
1,498
package de.hska.wifl1011.seminararbeit object Helper { }
fwilhe/hska-seminararbeit
code/Helper.scala
Scala
mit
59
object ImplicitsTest extends App { import Implicits._ assert(1.some == Some(1), "1.some == Some(1)") assert("abc".some == Some("abc"), "'abc'.some == Some(abc)") import language.postfixOps assert((4!) == 24, "4! == 24") 4 times { println("Hello!") } }
grzegorzbalcerek/scala-exercises
Implicits/ImplicitsTest.scala
Scala
bsd-2-clause
266
package com.rock.scalad import org.scalatra.test.specs2._ // For more on Specs2, see http://etorreborre.github.com/specs2/guide/org.specs2.guide.QuickStart.html class RockScaladServletSpec extends ScalatraSpec { def is = "GET / on RockScaladServlet" ^ "should return status 200" ...
Skiggz/rock-scalad
src/test/scala/com/rock/scalad/RockScaladServletSpec.scala
Scala
mit
492
/** * Created on February 19, 2011 * Copyright (c) 2011, Wei-ju Wu * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * ...
weiju/adf-tools
app/src/main/scala/org/dmpp/adf/gui/DirectoryTreeModel.scala
Scala
bsd-3-clause
3,402
package models case class GetPlaylist() case class AddToPlaylist(ytHash: String) case class Playlist(playlist: List[PlaylistPosition]) case class PlaylistPosition(ytHash: String, title: String, duration: String) case class ClearPlaylist() case class PlayNext()
oen9/bard-api
app/models/PlaylistOpeations.scala
Scala
apache-2.0
262
package net.slozzer.babel import munit.FunSuite final class QuantitiesTest extends FunSuite { test("apply prefers matching Quantity.Exact") { val text = Quantities.of("foo", Quantities.Element(Quantity.One, "bar")) assertEquals(obtained = text(quantity = 1), expected = "bar") } test("apply uses fallbac...
Taig/lokal
modules/tests/shared/src/test/scala/net/slozzer/babel/QuantitiesTest.scala
Scala
mit
965
package org.requests /** * Data is an algebraic data type that wraps more basic types for message bodies. */ sealed trait Data case object EmptyData extends Data case class ByteArrayData(value: Array[Byte]) extends Data case class StringData(value: String) extends Data case class FormData(values: M...
longcao/requests
src/main/scala/org/requests/Data.scala
Scala
mit
417
/* * Copyright 2011-2022 GatlingCorp (https://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 appli...
gatling/gatling
gatling-graphite/src/test/scala/io/gatling/graphite/sender/TcpSenderSpec.scala
Scala
apache-2.0
2,904
/** * Copyright (C) 2010-2012 LShift Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...
lshift/diffa
kernel/src/test/scala/net/lshift/diffa/kernel/differencing/AbstractDataDrivenPolicyTest.scala
Scala
apache-2.0
44,254
package hu.frankdavid.ranking.strategy import hu.frankdavid.ranking._ case object FootballWorldCupStrategy extends TournamentStrategy("Football World Cup Strategy") { val GroupStageMatch = 1 val KnockoutStageMatch = 2 private val GroupSize: Int = 4 private val RoundRobinStrategy = new RoundRobinStrategy(1...
frankdavid/ranking
src/main/scala/hu/frankdavid/ranking/strategy/FootballWorldCupStrategy.scala
Scala
apache-2.0
2,858
package controllers import play.api.libs.json._ trait ServiceError { /** * JSON returned to the front end when an error is caught. */ val SERVICE_ERROR = Json.obj( "errors" -> Json.obj( "authentication" -> Json.arr(JsString("You're not authenticated. Please authenticate")) ) ) }
marinatedpork/google-oauth-ember-play-scala
app/controllers/ApplicationError.scala
Scala
mit
311
/* * bytefrog: a tracing framework for the JVM. For more information * see http://code-pulse.com/bytefrog * * Copyright (C) 2014 Applied Visions - http://securedecisions.avi.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. ...
secdec/bytefrog-clients
common/src/main/scala/com/secdec/bytefrog/clients/common/config/TraceOutputSettings.scala
Scala
apache-2.0
1,016
/* * 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 ...
citlab/vs.msc.ws14
flink-0-7-custom/flink-tests/src/test/scala/org/apache/flink/api/scala/runtime/TupleComparatorISD1Test.scala
Scala
apache-2.0
1,943
package com.tritondigital.counters case class Tag(key: String, value: String) extends Ordered[Tag] { require(key != null, "key cannot be null") require(value != null, "value cannot be null") Metric.validate(key) Metric.validate(value) // See http://stackoverflow.com/questions/8087958/in-scala-is-there-an-ea...
tritondigital/tritondigital-counters
src/main/scala/com/tritondigital/counters/Tag.scala
Scala
apache-2.0
560
package edu.berkeley.cs.amplab.mlmatrix import java.util.concurrent.ThreadLocalRandom import scala.reflect.ClassTag import breeze.linalg._ import com.github.fommil.netlib.LAPACK.{getInstance=>lapack} import org.netlib.util.intW import org.netlib.util.doubleW import org.apache.spark.{SparkContext, SparkException} im...
amplab/ml-matrix
src/main/scala/edu/berkeley/cs/amplab/mlmatrix/RowPartitionedMatrix.scala
Scala
apache-2.0
12,711
package es.weso.computex.entities import es.weso.utils.JenaUtils import es.weso.computex.profile.Profile case class Options( val profile: Profile = Profile.Computex, val contentFormat: String = JenaUtils.TTL, val verbose: Boolean = false, val showSource: Boolean = false, val expand: Boolean...
weso/computex
app/es/weso/computex/entities/Options.scala
Scala
apache-2.0
403
package rovak.steamkit.steam.gc import rovak.steamkit.steam.language.internal.MsgHdr import rovak.steamkit.util.stream.BinaryReader import rovak.steamkit.steam.language.EMsg trait IPacketGCMsg { /** * Gets a value indicating whether this packet message is protobuf backed. * @return true if this instance is p...
Rovak/scala-steamkit
steam/src/main/scala/rovak/steamkit/steam/gc/IPacketGCMsg.scala
Scala
mit
878
/* * Copyright 2014 Rik van der Kleij * 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 ...
ericssmith/intellij-haskell
src/com/powertuple/intellij/haskell/external/ExternalProcess.scala
Scala
apache-2.0
1,740
/** * Examples from: Chapter 5: KMeans */ package com.heatonresearch.aifh.examples.kmeans
HairyFotr/aifh
vol1/scala-examples/src/main/scala/com/heatonresearch/aifh/examples/kmeans/package.scala
Scala
apache-2.0
93
package be.cmpg.cancer import org.junit.runner.RunWith import org.specs2.runner.JUnitRunner import org.specs2.mutable.Specification import be.cmpg.graph.Network import be.cmpg.graph.Interaction import be.cmpg.graph.Gene @RunWith(classOf[JUnitRunner]) class MutualExclusivityNetworkManagerSpecification extends Specific...
spulido99/SSA
src/test/scala/be/cmpg/cancer/MutualExclusivityNetworkManagerSpecification.scala
Scala
gpl-2.0
10,791
package com.github.britter.restfulpersons.scalafinatra import reactivemongo.api.collections.default.BSONCollection trait CollectionProvider { protected def collection(colName: String): BSONCollection }
britter/restful-persons
scala-finatra/src/main/scala/com/github/britter/restfulpersons/scalafinatra/CollectionProvider.scala
Scala
mit
208
package doodle package svg package algebra import cats._ import doodle.language.Basic trait JvmAlgebraModule extends AlgebraModule with PathModule with ShapeModule with SvgModule with JvmBase { type Algebra[F[_]] = doodle.algebra.Algebra[F] with Basic[F] final class JvmAlgebra( val appl...
underscoreio/doodle
svg/jvm/src/main/scala/doodle/svg/algebra/Algebra.scala
Scala
apache-2.0
486
package io.vertx.ext.asyncsql.impl import io.vertx.core.Vertx import io.vertx.core.json.JsonObject import io.vertx.ext.asyncsql.impl.pool.PostgresqlAsyncConnectionPool /** * @author <a href="http://www.campudus.com">Joern Bernhardt</a>. */ class PostgreSQLClient(val vertx: Vertx, val config: JsonObject) extends Bas...
InfoSec812/vertx-mysql-postgresql-service
src/main/scala/io/vertx/ext/asyncsql/impl/PostgreSQLClient.scala
Scala
apache-2.0
732
/* * 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 ...
tysonnorris/openwhisk
core/controller/src/main/scala/whisk/core/controller/Packages.scala
Scala
apache-2.0
13,469
package rotationsymmetry.sxgboost import org.scalatest.FunSuite import rotationsymmetry.sxgboost.loss.SquareLoss class LossAggregatorSuite extends FunSuite with TestData{ val loss = new SquareLoss() val featureIndicesBundle = Array(Array(0, 1), Array(1, 2)) val metaData = new MetaData(3, Array(3, 4, 5)) val ...
rotationsymmetry/sparkxgboost
src/test/scala/rotationsymmetry/sxgboost/LossAggregatorSuite.scala
Scala
apache-2.0
3,178
package controllers import play.api.mvc.Results._ import play.api.mvc._ import scala.concurrent.Future object Authorized extends ActionFilter[AuthenticatedRequest] { def filter[A](req: AuthenticatedRequest[A]) = Future.successful { if (!req.user.admin) Some(Unauthorized(views.html.defaultpages.unauthoriz...
gewoonrik/MAP
good/app/controllers/Authorized.scala
Scala
mit
353
package controllers.web object Assets extends controllers.common.MyAssetsTrait
vtapadia/crickit
modules/web/app/controllers/web/Assets.scala
Scala
apache-2.0
79
/*********************************************************************** * Copyright (c) 2013-2018 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...
ddseapy/geomesa
geomesa-tools/src/main/scala/org/locationtech/geomesa/tools/status/HelpCommand.scala
Scala
apache-2.0
1,942
package com.pygmalios.rawKafkaCassandra import akka.actor.{Actor, ActorSystem} import com.typesafe.config.Config import scala.collection.JavaConversions._ /** * Configuration. */ trait GenericRawKafkaCassandraConfig { def config: Config // Kafka configuration def kafkaConfig = config.getConfig("kafka") ...
pygmalios/raw-kafka-cassandra
src/main/scala/com/pygmalios/rawKafkaCassandra/RawKafkaCassandraConfig.scala
Scala
apache-2.0
1,406
package mypipe.kafka import mypipe._ import mypipe.api.event.Mutation import mypipe.avro.{ AvroVersionedRecordDeserializer, InMemorySchemaRepo } import mypipe.avro.schema.{ AvroSchemaUtils, ShortSchemaId, AvroSchema, GenericSchemaRepository } import mypipe.mysql.MySQLBinaryLogConsumer import mypipe.pipe.Pipe import m...
Asana/mypipe
mypipe-kafka/src/test/scala/mypipe/kafka/KafkaSpecificSpec.scala
Scala
apache-2.0
5,570
/* * 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 ...
WindCanDie/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/types/TimestampType.scala
Scala
apache-2.0
1,877
// a.scala package object pkg { class AnyOps(val x: Any) extends AnyVal def AnyOps(x: Any) = new AnyOps(x) }
folone/dotty
tests/run/t8133/A_1.scala
Scala
bsd-3-clause
114
class SimpleResolve { private def foo = 44 val x = /*ref*/foo } //true
LPTK/intellij-scala
testdata/checkers/checkPrivateAccess/simple/SimpleResolve.scala
Scala
apache-2.0
74
/* * Copyright 2013-2015 Websudos, Limited. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of c...
analytically/phantom
phantom-dsl/src/test/scala/com/websudos/phantom/tables/Recipes.scala
Scala
bsd-2-clause
3,659
/* * Copyright 2016 Nicolas Rinaudo * * 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...
nrinaudo/kantan.xpath
core/src/test/scala/kantan/xpath/FileDecoderTests.scala
Scala
apache-2.0
999
package gr.cslab.ece.ntua.musqle.benchmarks.tpcds class AllQueries object AllQueries{ val rc = Array(1000000, 1000000, 1000000, 1000000, 1000000) val tpcds1_4Queries = Seq( ("q1", """ | WITH customer_total_return AS | (SELECT sr_customer_sk AS ctr_customer_sk, sr_store_sk AS ctr_...
gsvic/MuSQLE
src/main/scala/gr/cslab/ece/ntua/musqle/benchmarks/tpcds/AllQueries.scala
Scala
apache-2.0
211,380
/* * 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 ...
szhem/spark
external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaMicroBatchReader.scala
Scala
apache-2.0
15,420
package com.ronyhe package object sweeper { type Coord = (Int, Int) // row, col }
ronyhe/sweeper
src/main/scala/com/ronyhe/sweeper/package.scala
Scala
mit
86
/** * Copyright 2011-2017 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 appli...
MykolaB/gatling
gatling-core/src/test/scala/io/gatling/core/controller/inject/InjectionStepSpec.scala
Scala
apache-2.0
9,131
package ignition.jobs import ignition.core.testsupport.spark.SharedSparkContext import org.scalatest.{ShouldMatchers, FlatSpec} class WordCountSpec extends FlatSpec with ShouldMatchers with SharedSparkContext { "WordCount" should "count words correctly" in { val text = """ |She sells sea-shells ...
chaordic/ignition-template
src/test/scala/ignition/jobs/WordCountSpec.scala
Scala
mit
876
package org.apache.spark.examples.mllib import org.apache.spark.SparkConf import org.apache.spark.SparkConf import org.apache.spark.SparkContext import org.apache.spark.SparkContext import org.apache.spark.mllib.clustering.KMeans import org.apache.spark.rdd.RDD import org.apache.spark.sql.functions._ import org.apache...
tophua/spark1.52
examples/src/main/scala/org/apache/spark/examples/mllib/KMeansModel.scala
Scala
apache-2.0
3,066
/* * Copyright 2015-2020 Noel Welsh * * 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...
underscoreio/doodle
core/shared/src/main/scala/doodle/algebra/generic/GenericPath.scala
Scala
apache-2.0
3,248
package com.sksamuel.elastic4s.requests.searches.queries.funcscorer sealed trait CombineFunction object CombineFunction { def valueOf(str: String): CombineFunction = str.toLowerCase match { case "avg" => Avg case "max" => Max case "min" => Min case "replace" => Replace case "sum"...
sksamuel/elastic4s
elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/queries/funcscorer/CombineFunction.scala
Scala
apache-2.0
654
package org.jetbrains.plugins.scala package annotator import com.intellij.codeInsight.intention.IntentionAction import com.intellij.codeInspection.ProblemHighlightType import com.intellij.lang.annotation.{Annotation, AnnotationHolder} import com.intellij.openapi.util.TextRange import com.intellij.psi.PsiElement import...
katejim/intellij-scala
src/org/jetbrains/plugins/scala/annotator/AnnotatorUtils.scala
Scala
apache-2.0
2,573