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
/* * @author Carol Alexandru * * Copyright 2015 University of Zurich * * 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 * *...
hicolour/signal-collect
src/test/scala/com/signalcollect/features/MultipleGraphs.scala
Scala
apache-2.0
1,724
package example object Example1 extends App { // import scalaxy.loops.optimize val n = 10 // optimize { 10 } { for (i <- 0 to n) { println(i) } } println { for (i <- 0 to n) yield { i + 2 } } println { for (i <- 0 to n; if i % 2 == 1) yield { i + 2 } }...
nativelibs4java/scalaxy-streams
Resources/example1.scala
Scala
bsd-3-clause
412
/** * Copyright 2011-2012 eBusiness Information, Groupe Excilys (www.excilys.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * *...
Tjoene/thesis
Case_Programs/gatling-1.4.0/gatling-http/src/main/scala/com/excilys/ebi/gatling/http/check/header/HttpHeaderRegexCheckBuilder.scala
Scala
gpl-2.0
3,009
package com.twitter.zipkin.config import com.sun.net.httpserver.HttpExchange import com.twitter.ostrich.admin.CustomHttpHandler import org.specs.Specification import org.specs.mock.{JMocker, ClassMocker} import com.twitter.zipkin.config.sampler.AdjustableRateConfig /** * Test endpoints for getting and setting config...
cogitate/twitter-zipkin-uuid
zipkin-collector-core/src/test/scala/com/twitter/zipkin/config/ConfigRequestHandlerSpec.scala
Scala
apache-2.0
1,507
package io.finch import cats.Id import cats.effect.Effect import com.twitter.finagle.http.Method import com.twitter.util._ import scala.concurrent.duration.Duration /** * A result returned from an [[Endpoint]]. This models `Option[(Input, Future[Output])]` and * represents two cases: * * - Endpoint is matched (t...
ImLiar/finch
core/src/main/scala/io/finch/EndpointResult.scala
Scala
apache-2.0
3,034
/* * 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 ...
pferrel/PredictionIO
examples/scala-parallel-similarproduct/multi/src/main/scala/ALSAlgorithm.scala
Scala
apache-2.0
8,947
package jgo.tools.compiler package interm object LabelGroup { private var curId: Long = 1 val User = new LabelGroup("<user>") //we should never actually see that string } final class LabelGroup(val id: String) { def this() = { this(LabelGroup.curId.toString) LabelGroup.curId += 1 } } sealed class ...
thomasmodeneis/jgo
src/src/main/scala/jgo/tools/compiler/interm/Label.scala
Scala
gpl-3.0
582
/* * 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
core/src/main/scala/quasar/fs/mount/MountingsConfig.scala
Scala
apache-2.0
1,717
package poly.collection import poly.collection.specgroup._ /** * @author Tongfei Chen */ trait IntervalMap[@sp(di) R, +V] extends Map[Interval[R], V] { def keySet: IntervalSet[R] def pairsCovering(x: R): Iterable[(Interval[R], V)] def pairsOverlappingWith(r: Interval[R]): Iterable[(Interval[R], V)] def ...
ctongfei/poly-collection
interval/src/main/scala/poly/collection/IntervalMap.scala
Scala
mit
415
package uk.ac.ncl.openlab.intake24.systemsql.admin import javax.inject.{Inject, Named} import javax.sql.DataSource import uk.ac.ncl.openlab.intake24.errors.UnexpectedDatabaseError import uk.ac.ncl.openlab.intake24.services.systemdb.admin.{SigninAttempt, SigninLogService} import uk.ac.ncl.openlab.intake24.sql.{SqlData...
digitalinteraction/intake24
SystemDataSQL/src/main/scala/uk/ac/ncl/openlab/intake24/systemsql/admin/SigninLogImpl.scala
Scala
apache-2.0
1,050
package sri.mobile.examples.movies.android import sri.mobile.ReactNative import sri.mobile.all._ import sri.mobile.components.android.ToolbarAndroid import sri.mobile.examples.images.AndroidBackWhiteImage import sri.universal.router import sri.universal.router.{NavigatorRoute, UniversalRouterComponent, UniversalRouter...
chandu0101/sri
mobile-examples/src/main/scala/sri/mobile/examples/movies/android/DefaultAndroidNavigationBar.scala
Scala
apache-2.0
1,911
package com.heluna.actor import akka.actor.Actor import com.typesafe.scalalogging.slf4j.Logging import java.util.Date import com.heluna.cache.Redis import java.text.SimpleDateFormat import scala.concurrent.duration._ import scala.language.postfixOps import scala.concurrent.ExecutionContext.Implicits.global import com....
ministryofjustice/maildrop
smtp/src/main/scala/com/heluna/actor/MetricsActor.scala
Scala
mit
1,635
package scala.tools.tastytest import scala.jdk.CollectionConverters._ object Diff { def splitIntoLines(string: String): Seq[String] = string.trim.replace("\r\n", "\n").split("\n").toSeq def compareContents(output: String, check: String): String = compareContents(splitIntoLines(output), splitIntoLines(che...
scala/scala
src/tastytest/scala/tools/tastytest/Diff.scala
Scala
apache-2.0
722
/* * 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/joins/HashedRelationSuite.scala
Scala
apache-2.0
21,836
package org.allenai.plugins.archetypes import org.allenai.plugins.CoreSettingsPlugin import org.allenai.plugins.Ai2ReleasePlugin import sbt.{ AutoPlugin, Plugins } object LibraryPlugin extends AutoPlugin { override def requires: Plugins = CoreSettingsPlugin && Ai2ReleasePlugin }
ryanai3/sbt-plugins
src/main/scala/org/allenai/plugins/archetypes/LibraryPlugin.scala
Scala
apache-2.0
285
package org.scalajs.openui5.sap.m import org.scalajs.openui5.util.{Settings, SettingsMap, noSettings} import scala.scalajs.js import scala.scalajs.js.annotation.{JSName, ScalaJSDefined} @ScalaJSDefined trait MultiInputSettings extends InputSettings object MultiInputSettings extends MultiInputSettingsBuilder(noSettin...
lastsys/scalajs-openui5
src/main/scala/org/scalajs/openui5/sap/m/MultiInput.scala
Scala
mit
1,310
/* * Copyright (C) 2016-2017 Lightbend Inc. <http://www.lightbend.com> */ package akka.persistence.cassandra.compaction import com.typesafe.config.Config import LeveledCompactionStrategy._ /* * https://github.com/apache/cassandra/blob/cassandra-2.2/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStr...
ktoso/akka-persistence-cassandra
core/src/main/scala/akka/persistence/cassandra/compaction/LeveledCompactionStrategy.scala
Scala
apache-2.0
1,305
import stainless.lang._ import stainless.annotation._ import stainless.collection._ object NewImpExamples { final case class Box(var value: BigInt) extends AnyHeapRef final case class BoxBox(var inner: Box) extends AnyHeapRef sealed abstract class Op extends AnyHeapRef case class Up(var bla: BigInt) extends O...
epfl-lara/stainless
frontends/benchmarks/full-imperative/valid/NewImperative.scala
Scala
apache-2.0
2,932
package ml.wolfe.util import java.io._ import java.nio.charset.MalformedInputException import java.util.concurrent.TimeUnit import cc.factorie.util.{FastLogging, Logger} import com.typesafe.scalalogging.slf4j.LazyLogging import ml.wolfe.util._ import scala.collection.mutable import scala.collection.mutable.ArrayBuff...
wolfe-pack/wolfe
wolfe-util/src/main/scala/ml/wolfe/util/Util.scala
Scala
apache-2.0
6,256
/* * Copyright 2009-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...
lzpfmh/framework-2
core/json/src/test/scala/net/liftweb/json/XmlBugs.scala
Scala
apache-2.0
2,718
package org.scalafmt.util import java.io.File import java.net.URL import org.apache.commons.io.FileUtils import org.rauschig.jarchivelib.ArchiverFactory case class ScalaFile(filename: String, projectUrl: String, commit: String) { def rawUrl = { val raw = projectUrl.replace("github.com", "raw.githubusercontent...
Daxten/scalafmt
testUtils/src/main/scala/org/scalafmt/util/ScalaFile.scala
Scala
apache-2.0
4,409
object Test { // Devalify shouldn't optimize this def theTrap(cond: Boolean, t: => Unit) = { val a,b = t if (cond) println(a) else println(b) } def main(args: Array[String]): Unit = { theTrap(true, println(1)) } }
som-snytt/dotty
tests/run/byname-param.scala
Scala
apache-2.0
237
/* Copyright (c) 2017, Robby, Kansas State University All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of cond...
sireum/v3-runtime
library/shared/src/test/scala/org/sireum/BuiltInTypesTest.scala
Scala
bsd-2-clause
2,001
package lila package object qa extends PackageObject with WithPlay { type Tag = String type QuestionId = Int type AnswerId = Int type RelId = String type CommentId = String }
Happy0/lila
modules/qa/src/main/package.scala
Scala
mit
187
/* * 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
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/KubernetesClientUtils.scala
Scala
apache-2.0
4,861
package twitch.api.usernotice object UserNoticeMessageId extends Enumeration { type UserNoticeMessageId = Value val UNKNOWN: UserNoticeMessageId = Value("Unknown") val RESUBSCRIPTION: UserNoticeMessageId = Value("resub") val SUBSCRIPTION: UserNoticeMessageId = Value("sub") val GIFTED_SUBSCRIPTION...
Cobbleopolis/MonsterTruckBot
modules/twitch/app/twitch/api/usernotice/UserNoticeMessageId.scala
Scala
mit
576
package com.tattyseal.hgp.block import net.minecraft.block.Block import net.minecraft.init.{Blocks, Items} import net.minecraft.item.{ItemStack, ItemBlock} /** * Created by Toby on 05/02/2015. */ class ItemBlockStainedBlock(block: Block) extends ItemBlock(block) { setHasSubtypes(true); setUnlocalizedName("hgp.c...
tattyseal/HGP
src/main/scala/com/tattyseal/hgp/block/ItemBlockStainedBlock.scala
Scala
bsd-3-clause
711
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
shaneknapp/spark
mllib/src/main/scala/org/apache/spark/ml/classification/NaiveBayes.scala
Scala
apache-2.0
22,798
package org.jetbrains.plugins.scala.failed.resolve import org.jetbrains.plugins.scala.lang.psi.api.base.ScReferenceElement import org.jetbrains.plugins.scala.lang.resolve.ScalaResolveTestCase import org.junit.Assert._ /** * @author Nikolay.Tropin */ abstract class FailedResolveTest(dirName: String) extends ScalaR...
whorbowicz/intellij-scala
test/org/jetbrains/plugins/scala/failed/resolve/FailedResolveTest.scala
Scala
apache-2.0
726
package glint.messages.server.request /** * A push request for matrices containing floats * * @param rows The row indices * @param cols The column indices * @param values The values to add */ private[glint] case class PushMatrixFloat(id: Int, rows: Array[Long], cols: Array[Int], values: Array[Float]) exten...
rjagerman/glint
src/main/scala/glint/messages/server/request/PushMatrixFloat.scala
Scala
mit
331
package com.shellhive.angular.components.nodes import biz.enef.angulate.Directive import biz.enef.angulate.core.{Attributes, JQLite} import com.shellhive.components.Icon import org.scalajs.jquery.{JQuery, JQueryEventObject} import com.shellhive.i18n._ import scala.scalajs.js /** * Created by Omar Castro on 29/05/2...
OmarCastro/ShellHive-scala
client/src/main/scala/com/shellhive/angular/components/nodes/ComponentTitleDirective.scala
Scala
mit
1,452
/******************************************************************************************************************\ * Rapture Core, version 2.0.0. Copyright 2010-2015 Jon Pretty, Propensive Ltd. * * ...
utaal/rapture-core
src/alloc.scala
Scala
apache-2.0
3,801
package ranking import controllers.routes import models.db import ranking.common.{Ranking, RankingElement} import scalikejdbc._ /** * * @author ponkotuy * Date: 14/12/05. */ case object FirstShipRate extends Ranking { import ranking.common.Ranking._ override val title: String = "初期艦" override def rankingQu...
nekoworkshop/MyFleetGirls
server/app/ranking/FirstShipRate.scala
Scala
mit
1,051
package safe.actor import akka.actor.{ ActorContext, ActorRef, Props } import akka.routing.RoundRobinPool import safe.feature.Feature import scala.collection.mutable import scala.reflect.ClassTag import com.codahale.metrics.MetricRegistry trait FeatureActorCreation { protected val count = new java.util.concurren...
devonbryant/safe
safe-core/src/main/scala/safe/actor/FeatureActorCreation.scala
Scala
epl-1.0
836
package com.anishathalye.turing.machine import scala.language.implicitConversions trait Implicits { final implicit def tuple2Action(tuple: ((String, Char), (String, Char, Direction))): ((State, Symb), (State, Symb, Direction)) = { tuple match { case ((s, c), (ns, nc, d)) => ((s: State, c: Symb), (ns: Sta...
anishathalye/turing
src/main/scala/com/anishathalye/turing/machine/Implicits.scala
Scala
mit
524
/* * 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 ...
mkolod/incubator-spark
core/src/main/scala/org/apache/spark/network/BufferMessage.scala
Scala
apache-2.0
3,600
package net.fwbrasil.smirror class TypeParametersSpecTestClass(m1: List[Int]) { def m2(m3: Array[String]) = null val m4 = Map[String, Int]() var m5 = Map[List[Int], String]() } class TypeParametersSpec extends SMirrorSpec { "Constructor parameter" should "return its generic" in test[TypeParametersSpecTestClass...
fwbrasil/smirror
src/test/scala/net/fwbrasil/smirror/TypeParametersSpec.scala
Scala
lgpl-2.1
1,102
package no.skytteren.elasticala import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Await import org.scalatest.FunSpec import org.elasticsearch.client._ import org.elasticsearch.node.NodeBuilder._ import org.elasticsearch.common.settings.Settings import org.scalatest.BeforeAndAfter import...
skytteren/elasticala
src/test/scala/no/skytteren/elasticala/IndexDSLSpec.scala
Scala
apache-2.0
2,408
package ore.permission.scope import scala.language.implicitConversions import ore.db.{DbRef, Model} import ore.models.organization.Organization import ore.models.project.Project import simulacrum.typeclass @typeclass trait HasScope[-A] { def scope(a: A): Scope } object HasScope { def orgScope[A](f: A => DbRef[O...
SpongePowered/Ore
models/src/main/scala/ore/permission/scope/HasScope.scala
Scala
mit
611
/** * Copyright 2012-2013 greencheek.org (www.greencheek.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
tootedom/yankeedo
yankeedo-core/src/main/scala/org/greencheek/jms/yankeedo/scenarioexecution/producer/AkkaProducer.scala
Scala
apache-2.0
1,510
/** * 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...
timve/gatling
gatling-http/src/main/scala/io/gatling/http/check/header/HttpHeaderRegexCheckBuilder.scala
Scala
apache-2.0
2,764
package com.eevolution.context.dictionary.infrastructure.repository import com.eevolution.context.dictionary.domain.model.InformationWindowTrl import com.eevolution.context.dictionary.infrastructure.db.DbContext._ /** * Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com * This prog...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/repository/InformationWindowTrlMapping.scala
Scala
gpl-3.0
1,791
/* * 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...
levinson/phantom
phantom-dsl/src/test/scala/com/websudos/phantom/builder/serializers/InsertQueryBuilderTest.scala
Scala
bsd-2-clause
2,109
package org.scalatra import org.scalatra.test.specs2.ScalatraSpec class CorsSupportSpec extends ScalatraSpec { addServlet(new ScalatraServlet with CorsSupport { get("/") { "OK" } override def initialize(config: ConfigT) { config.context.setInitParameter(CorsSupport.AllowedOriginsKey, "http://www.ex...
seratch/scalatra
core/src/test/scala/org/scalatra/CorsSupportSpec.scala
Scala
bsd-2-clause
3,295
package scalaprops object Variant { def variant[A](n: Long, g: CogenState[A]): CogenState[A] = { val (next, int) = g.rand.nextInt val seed = n + int CogenState(next, Gen.gen((i, r) => g.gen.f(i, r.reseed(seed)))) } def variantInt[A](n: Int, g: CogenState[A]): CogenState[A] = { val (next, int) = g...
scalaprops/scalaprops
gen/js_native/src/main/scala/scalaprops/Variant.scala
Scala
mit
435
package com.twitter.finagle.redis.integration import com.twitter.conversions.time._ import com.twitter.finagle.redis.ServerError import com.twitter.finagle.redis.naggati.RedisClientTest import com.twitter.finagle.redis.tags.{RedisTest, ClientTest} import com.twitter.finagle.redis.util.StringToBuf import com.twitter.ut...
lukiano/finagle
finagle-redis/src/test/scala/com/twitter/finagle/redis/commands/topology/TopologyClientIntegrationSuite.scala
Scala
apache-2.0
2,890
/* * Copyright 2010 LinkedIn * * 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...
quipo/kafka
core/src/main/scala/kafka/consumer/ZookeeperConsumerConnector.scala
Scala
apache-2.0
24,239
class EmptyFinalltDefaultTest { def m(): Unit = { object B { def b(): Unit = { try { println("BT") } catch { case e: Exception => println("BE") } finally { println("BF") } } } trait C { def c(): Unit = { try { println("CT") } finally {} } ...
jean-andre-gauthier/scalasca
src/test/scala/lara/epfl/scalasca/tests/unit/executables/emptyfinally/EmptyFinallyDefaultTest.scala
Scala
bsd-3-clause
529
package com.sksamuel.scapegoat.inspections.empty import com.sksamuel.scapegoat.InspectionTest /** @author Stephen Samuel */ class EmptyTryBlockTest extends InspectionTest { override val inspections = Seq(new EmptyTryBlock) "empty try block" - { "should report warning" in { val code = """object Test {...
sksamuel/scalac-scapegoat-plugin
src/test/scala/com/sksamuel/scapegoat/inspections/empty/EmptyTryBlockTest.scala
Scala
apache-2.0
1,064
package com.lrs.rest import java.util.concurrent.TimeUnit import akka.actor.ActorSystem import akka.http.scaladsl.Http import akka.http.scaladsl.model.StatusCodes._ import akka.http.scaladsl.model._ import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.server._ import akka.stream.{ActorMaterializer,...
edmundgmail/HighwaySystem
highway-rest/src/main/scala/com/lrs/rest/AkkaHttpScalaDockerSeed.scala
Scala
apache-2.0
2,941
/** * Test cases for NBody.scala. * * @author Yujian Zhang <yujian{dot}zhang[at]gmail(dot)com> * * License: * GNU General Public License v2 * http://www.gnu.org/licenses/gpl-2.0.html * Copyright (C) 2013 Yujian Zhang */ import net.whily.scasci.math._ import net.whily.scasci.math.linalg._ import net.whily...
whily/scasci
src/test/scala/phys/NBodyTest.scala
Scala
gpl-2.0
2,898
package test.kofre import kofre.primitives.{LastWriterWins, MultiValueRegister} import kofre.sets.ORSet import kofre.{IdUtil, Lattice} import org.scalacheck.{Arbitrary, Gen} import kofre.causality.VectorClock object DataGenerator { given arbId: Arbitrary[IdUtil.Id] = Arbitrary(Gen.oneOf('a' to 'g').map(_.toString)...
guidosalva/REScala
Code/Extensions/Kofre/src/test/scala/test/kofre/DataGenerator.scala
Scala
apache-2.0
1,438
package controllers import play.api.mvc.{ Action, Controller } import play.api.libs.json.{ Json, JsError, JsValue } import model.BallotBox import helper.Schulze /** * User: Björn Reimer * Date: 11/23/13 * Time: 8:24 PM */ object directSchulze extends Controller { // def direct() = Action(parse.tolerantJson) ...
Reimerei/prefr
app/controllers/directSchulze.scala
Scala
mit
691
package se.stagehand.trpg import se.stagehand.plugins._ import se.stagehand.lib.scripting._ class TRPGPlugin extends ScriptPlugin { val name = "TRPG" val guis = List(SceneGUI, EventGUI) val scriptcomponents: Array[ScriptComponent] = Array(new Scene, new Event) }
evilcandybag/Stagehand-TRPG
src/main/scala/se/stagehand/trpg/TRPGPlugin.scala
Scala
gpl-2.0
284
/* * * * Copyright (c) 2014-2016. National Institute of Advanced Industrial Science and Technology (AIST) * * All rights reserved. * */ package jp.go.aist.cspe import jp.go.aist.cspe.CSPE._ private[cspe] class PartialParallel(p1 : Process, as : Set[Symbol]) { def || (p2 : Process) = parallel(List(p1, p2), as...
yoriyuki/cspe
src/main/scala/jp/go/aist/cspe/PartialParallel.scala
Scala
bsd-3-clause
324
package scala.slick.testutil import java.io.File import java.util.logging.{Level, Logger} import java.sql.SQLException import scala.slick.driver._ import scala.slick.jdbc.{ResultSetInvoker, StaticQuery => Q} import scala.slick.jdbc.GetResult._ import scala.slick.jdbc.meta.MTable import scala.slick.session.{Database, S...
zefonseca/slick-1.0.0-scala.2.11.1
slick-testkit/src/test/scala/scala/slick/testutil/TestDBs.scala
Scala
bsd-2-clause
10,604
package scalpel import org.scalatest.FunSpec import org.scalatest.ShouldMatchers @org.junit.runner.RunWith(classOf[org.scalatest.junit.JUnitRunner]) class RunCaliper extends FunSpec with ShouldMatchers { describe("run caliper") { it("runs") { port.CaliperRunner.run() } } } @org.junit.runner.RunWith(classOf[org.sca...
lossyrob/scalpel
src/test/scala/scalpel/Runner.scala
Scala
bsd-3-clause
667
package com.jejking.rprng.rng.actors import akka.actor.ActorSystem import akka.pattern.ask import akka.testkit.{DefaultTimeout, ImplicitSender, TestActorRef, TestKit} import akka.util.ByteString import com.jejking.rprng.rng._ import org.scalamock.scalatest.MockFactory import org.scalatest.BeforeAndAfterAll import org....
jejking/rprng
src/test/scala/com/jejking/rprng/rng/actors/RngActorSpec.scala
Scala
apache-2.0
5,884
/* * Accio is a platform to launch computer science experiments. * Copyright (C) 2016-2018 Vincent Primault <v.primault@ucl.ac.uk> * * Accio 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...
privamov/accio
accio/java/fr/cnrs/liris/accio/sdk/ScalaOperator.scala
Scala
gpl-3.0
1,989
package ingraph.compiler.sql import java.sql.Connection import org.neo4j.driver.v1.Session object ExportSteps { private val exportVertex = new ExportStep( """// vertex |MATCH (n) |RETURN id(n) AS vertex_id""".stripMargin, "vertex") private val exportEdge = new ExportStep( """// edge |M...
FTSRG/ingraph
cypher-to-sql/src/main/scala/ingraph/compiler/sql/ExportSteps.scala
Scala
epl-1.0
1,352
package xitrum.validator object RangeLength { def apply(min: Int, max: Int) = new RangeLength(min, max) } class RangeLength(min: Int, max: Int) extends Validator[String] { def check(value: String) = { val length = value.length min <= length && length <= max } def message(name: String, value: String) ...
caiiiycuk/xitrum
src/main/scala/xitrum/validator/RangeLength.scala
Scala
mit
506
package progscala2.fp.categories import org.scalatest.FunSpec import org.scalatest.prop.PropertyChecks /** * Created by younggi on 1/24/17. */ class MonadProperties extends FunSpec with PropertyChecks { // Arbitrary function: val f1: Int => Seq[Int] = i => 0 until 10 by ((math.abs(i) % 10) + 1) describe ("...
younggi/books
programming_scala/progscala2/src/test/scala/progscala2/fp/categories/MonadProperties.scala
Scala
mit
1,052
/* * 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/DataFrameTimeWindowingSuite.scala
Scala
apache-2.0
12,965
package com.arcusys.valamis.certificate.service import java.security.MessageDigest import com.arcusys.learn.liferay.LiferayClasses._ import com.arcusys.learn.liferay.services.{PermissionHelper, UserLocalServiceHelper} import com.arcusys.valamis.certificate.model.CertificateSortBy.CertificateSortBy import com.arcusys....
ViLPy/Valamis
valamis-certificate/src/main/scala/com/arcusys/valamis/certificate/service/CertificateUserServiceImpl.scala
Scala
lgpl-3.0
13,661
/** * FILE: HarvestResourceTest.scala * PERCORSO /Codice/sgad/servertier/src/test/scala/sgad/servertier/servertier/businesslogic/operations * DATA CREAZIONE: 25 Febbraio 2014 * AUTORE: ProTech * EMAIL: protech.unipd@gmail.com * * Questo file è proprietà del gruppo ProTech, viene rilasciato sotto licenza Apache v...
protechunipd/SGAD
Codice/sgad/servertier/src/test/scala/sgad/servertier/businesslogic/operations/HarvestResourceTest.scala
Scala
apache-2.0
5,524
/* * 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 ...
hortonworks-spark/spark-llap
src/main/scala/com/hortonworks/spark/sql/hive/llap/streaming/examples/HiveStreamingExample.scala
Scala
apache-2.0
5,538
package converter.client.logger import scala.annotation.elidable import scala.annotation.elidable._ trait Logger { /* * Use @elidable annotation to completely exclude functions from the compiler generated byte-code based on * the specified level. In a production build most logging functions will simply disapp...
aparo/scalajs-converter
client/src/main/scala/converter/client/logger/LoggerFactory.scala
Scala
apache-2.0
2,030
package monocle import monocle.macros.{GenLens, Lenses} import org.specs2.execute.AnyValueAsResult import org.specs2.scalaz.Spec import shapeless.test.illTyped class LensExample extends Spec { "Lens for monomorphic case class fields" should { // @Lenses generate Lens automatically in the companion object ...
CapeSepias/Monocle
example/src/test/scala/monocle/LensExample.scala
Scala
mit
3,439
/** * 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...
themarkypantz/kafka
core/src/test/scala/unit/kafka/admin/AdminTest.scala
Scala
apache-2.0
27,920
/* * Copyright 2014 Frugal Mechanic (http://frugalmechanic.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
frugalmechanic/fm-serializer
src/main/scala/fm/serializer/RawDeserializer.scala
Scala
apache-2.0
732
package threesixty.algorithms import org.scalatest.FunSpec import threesixty.ProcessingMethods.TimeSelection.TimeSelection import threesixty.data.{ProcessedData, TaggedDataPoint} import threesixty.data.Data.Timestamp import threesixty.data.tags._ class TimeSelectionTestSpec extends FunSpec { describe("TimeSe...
elordin/threesixty
src/test/scala/threesixty/algorithms/TimeSelectionTestSpec.scala
Scala
mit
1,371
package io.argos.agent.sentinels import java.lang.management.ManagementFactory import io.argos.agent.SentinelConfiguration import io.argos.agent.bean.CheckMetrics import io.argos.agent.util.{HostnameProvider, OSBeanAccessor, WindowBuffer} class LoadAverageSentinel(override val conf: SentinelConfiguration) extends S...
leleueri/argos
argos-agent/src/main/scala/io/argos/agent/sentinels/LoadAverageSentinel.scala
Scala
apache-2.0
1,476
/* * Copyright 2022 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/http-verbs
http-verbs-common/src/main/scala/uk/gov/hmrc/play/http/ws/default/WSPut.scala
Scala
apache-2.0
1,528
import sbt._ import Keys._ object MyDefaults { lazy val settings = Defaults.defaultSettings ++ Seq ( organization := "jeffmay.me", version := Versions.mine, scalaVersion := Versions.scala, scalacOptions += "-feature", scalacOptions += "-unchecked", scalacOptions += "-depr...
jeffmay/angular-play-multimodule-seed
project/MyDefaults.scala
Scala
apache-2.0
500
/* * Copyright 2008 Sanjiv Sahayam * * 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 ...
ssanj/pondskum
src/test/scala/com/googlecode/pondskum/gui/swing/notifyer/UsageColourChooserTest.scala
Scala
apache-2.0
1,847
package scratchpad.monoid import fpinscala.state.RNG import fpinscala.testing.Prop._ import fpinscala.testing.{Gen, Prop} object Main { def main(args: Array[String]): Unit = { // println("Try it") // val result: Result = Monoid.monoidLaws(Monoid.intAddition, Gen.smallInt).run(100, 100, RNG.Simple(123)) // ...
waxmittmann/fpinscala
answers/src/main/scala/scratchpad/done/Monoid.scala
Scala
mit
5,112
import sbt._ import Keys._ import PlayProject._ object ApplicationBuild extends Build { val appName = "tabledice" val appVersion = "1.0-SNAPSHOT" val appDependencies = Seq( // Add your project dependencies here, "org.mindrot" % "jbcrypt" % "0.3m", "com.typesafe.akka" % "akk...
tommycli/tabledice
project/Build.scala
Scala
agpl-3.0
591
package phoenix.collection.immutable.trees /** * Created by Satya on 21/08/14. */ case class LeafBST[T <% Ordered[T]] (elem: T) extends BinarySearchTree[T] { def value = Some(elem) def left = EmptyBST def right = EmptyBST def inorderTraversal = Seq() } case object EmptyBST extends BinarySearchTree[Nothing] {...
Satyapr/data-structures-and-algorithms
Scala/src/phoenix/collection/immutable/trees/RecursiveBinarySearchTreee.scala
Scala
bsd-2-clause
1,883
package scala.tools.nsc import java.io.IOException import java.nio.file.attribute.BasicFileAttributes import java.nio.file.{FileVisitResult, Files, Path, SimpleFileVisitor} import org.junit.{After, Before, Test} import scala.jdk.CollectionConverters._ import FileUtils._ import scala.tools.nsc.PipelineMain._ import s...
lrytz/scala
test/junit/scala/tools/nsc/PipelineMainTest.scala
Scala
apache-2.0
8,719
package org.jetbrains.plugins.scala package annotator.createFromUsage import com.intellij.codeInsight.template.TemplateBuilder import com.intellij.openapi.editor.Editor import com.intellij.openapi.fileEditor.{FileEditorManager, OpenFileDescriptor} import com.intellij.psi.util.PsiTreeUtil import com.intellij.psi.{PsiCl...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/annotator/createFromUsage/CreateFromUsageUtil.scala
Scala
apache-2.0
6,460
package com.twitter.finagle.filter import com.twitter.finagle.Service import com.twitter.util.{Future, Promise, Return} import org.specs.SpecificationWithJUnit import org.specs.mock.Mockito class MaskCancelFilterSpec extends SpecificationWithJUnit with Mockito { "MaskCancelFilter" should { val service = mock[Se...
firebase/finagle
finagle-core/src/test/scala/com/twitter/finagle/filter/MaskCancelFilterSpec.scala
Scala
apache-2.0
972
/* * 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 ...
mylog00/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/descriptors/StatisticsValidator.scala
Scala
apache-2.0
4,457
package com.softwaremill.macwire package object tagging { @deprecated("Use com.softwaremill.tagging instead") type Tag[+U] = com.softwaremill.tagging.Tag[U] @deprecated("Use com.softwaremill.tagging instead") type @@[T, +U] = com.softwaremill.tagging.@@[T, U] @deprecated("Use com.softwaremill.tagging inste...
adamw/macwire
util/src/main/scala/com/softwaremill/macwire/tagging/package.scala
Scala
apache-2.0
785
package unfiltered.netty import unfiltered.Async import unfiltered.response.{ ResponseFunction, HttpResponse, Pass } import unfiltered.request.{ Charset, HttpRequest, POST, PUT, RequestContentType, & } import io.netty.buffer.{ ByteBufInputStream, ByteBufOutputStream, Unpooled } import io.netty.channel.{ ChannelFuture...
unfiltered/unfiltered
netty/src/main/scala/bindings.scala
Scala
mit
7,047
/* ____ __ ____ ____ ____,,___ ____ __ __ ____ * ( _ \\ /__\\ (_ )(_ _)( ___)/ __) ( _ \\( )( )( _ \\ Read * ) / /(__)\\ / /_ _)(_ )__) \\__ \\ )___/ )(__)( ) _ < README.txt * (_)\\_)(__)(__)(____)(____)(____)(___/ (__) (______)(____/ LICENSE.txt */ package ...
razie/diesel-rx
diesel/src/main/scala/razie/diesel/engine/nodes/ERules.scala
Scala
apache-2.0
16,122
package kafka.rest; import scala.collection.JavaConversions._ import javax.servlet.http.HttpServletRequest import javax.servlet.http.HttpServletResponse import org.apache.log4j.Logger; import org.bson.BSONObject import org.bson.BasicBSONDecoder import org.bson.BasicBSONEncoder import org.bson.BasicBSONObject import...
lakshmi-kannan/kafka-sashafied
contrib/rest/src/main/scala/kafka/rest/ReplyFormatter.scala
Scala
apache-2.0
1,697
package io.soheila.um.entities import play.api.libs.json.Json case class ContactInfo( name: String, street: String, city: String, state: String, country: String, postcode: String, phoneNumbers: Set[String], isPrimary: Boolean = false, isBusiness: Boolean = false ) object ContactInfo { implicit va...
esfand-r/soheila-um
src/main/scala/io/soheila/um/entities/ContactInfo.scala
Scala
apache-2.0
362
/* * 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 ...
JerryLead/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetQuerySuite.scala
Scala
apache-2.0
29,226
package org.jmotor.sbt.parser import scala.util.matching.Regex /** * Component: * Description: * Date: 2018/3/1 * * @author AI */ object VersionParser { lazy val VersionRegex: Regex = """val ?(\\w+) ?= ?"(.*)"""".r lazy val VersionsObjectRegex: Regex = """[\\t ]*object ?Versions ?\\{([^{]*)[\\t ]*\\}""".r ...
aiyanbo/sbt-dependency-updates
src/main/scala/org/jmotor/sbt/parser/VersionParser.scala
Scala
apache-2.0
631
package dpla.ingestion3.entries.ingest import dpla.ingestion3.confs.{CmdArgs, Ingestion3Conf, i3Conf} import dpla.ingestion3.entries.reports.ReporterMain.executeAllReports import dpla.ingestion3.utils.Utils import org.apache.spark.SparkConf /** * Driver for reading DplaMapData records (mapped or enriched) and gener...
dpla/ingestion3
src/main/scala/dpla/ingestion3/entries/ingest/ReportsEntry.scala
Scala
mit
1,734
package controllers import java.util.concurrent.TimeUnit import com.github.athieriot._ import models.Stream import models.message.{ReturnGetStreamIdList, ReturnGetPreferableAnalysis} import org.junit.runner.RunWith import org.specs2.mutable.Specification import org.specs2.runner.JUnitRunner import play.api.libs.json....
calvinsadewa/backend
test/controllers/ThridPartiesIT.scala
Scala
apache-2.0
12,953
package edu.gemini.model.p1.immutable import edu.gemini.model.p1.{ mutable => M } object GmosNBlueprintLongslitNs { def apply(m: M.GmosNBlueprintLongslitNs) = new GmosNBlueprintLongslitNs( Altair(m.getAltair), m.getDisperser, m.getFilter, m.getFpu) } case class GmosNBlueprintLongslitNs(altair: Al...
arturog8m/ocs
bundle/edu.gemini.model.p1/src/main/scala/edu/gemini/model/p1/immutable/GmosNBlueprintLongslitNs.scala
Scala
bsd-3-clause
936
/* * Copyright 2014–2020 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...
slamdata/quasar
qscript/src/main/scala/quasar/qscript/OnUndefined.scala
Scala
apache-2.0
1,806
/* * Copyright 2012-2014 Kieron Wilkinson. * * 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...
vyadh/viper
util/src/main/scala/viper/util/Prefs.scala
Scala
apache-2.0
2,632
/* * Copyright (c) 2012, The Broad Institute * * 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, * copy, modify, me...
iontorrent/Torrent-Variant-Caller-stable
public/scala/src/org/broadinstitute/sting/queue/extensions/picard/MarkDuplicates.scala
Scala
mit
4,059
package com.twitter.finagle.loadbalancer import com.twitter.finagle.Group import com.twitter.finagle.stats.NullStatsReceiver import com.twitter.finagle.{ ClientConnection, NoBrokersAvailableException, Service, ServiceFactory } import com.twitter.util.{Future, Time} import org.specs.SpecificationWithJUnit import org....
joshbedo/finagle
finagle-core/src/test/scala/com/twitter/finagle/loadbalancer/HeapBalancerSpec.scala
Scala
apache-2.0
4,555
/* * Copyright 2014-2014 Commonwealth Computer Research, 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 ap...
mmatz-ccri/geomesa
geomesa-core/src/main/scala/org/locationtech/geomesa/core/index/Strategy.scala
Scala
apache-2.0
9,345
// Generated by the Scala Plugin for the Protocol Buffer Compiler. // Do not edit! // // Protofile syntax: PROTO3 package com.google.protobuf.wrappers import scala.collection.JavaConversions._ @SerialVersionUID(0L) final case class FloatValue( value: Float = 0.0f ) extends com.trueaccord.scalapb.GeneratedMes...
eiennohito/ScalaPB
scalapb-runtime/jvm/src/main/scala/com/google/protobuf/wrappers/FloatValue.scala
Scala
apache-2.0
3,862
package extruder import cats.Eq import cats.data.NonEmptyList import cats.laws.IsEq import org.scalacheck.{Arbitrary, Gen, Prop} import org.scalacheck.util.Pretty package object laws { implicit def catsLawsIsEqToProp[A: Eq](isEq: IsEq[A])(implicit pp: A => Pretty): Prop = cats.kernel.laws.discipline.catsLawsIsE...
janstenpickle/extruder
laws/src/main/scala/extruder/laws/package.scala
Scala
mit
565
package de.adesso.scalaspring.config import org.springframework.context.annotation.Configuration import javax.sql.DataSource import org.springframework.beans.factory.annotation.Autowired import org.springframework.context.annotation.Bean import org.springframework.jdbc.datasource.DataSourceTransactionManager import de....
ewolff/scala-spring
src/test/scala/de/adesso/scalaspring/config/ScalaConfig.scala
Scala
apache-2.0
847