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 com.sksamuel.elastic4s.bulk import com.sksamuel.elastic4s.testkit.ElasticSugar import org.scalatest.{FlatSpec, Matchers} import scala.concurrent.Await import scala.concurrent.duration._ class BulkProcessorTest extends FlatSpec with Matchers with ElasticSugar { client.execute { createIndex("books").map...
ulric260/elastic4s
elastic4s-core-tests/src/test/scala/com/sksamuel/elastic4s/bulk/BulkProcessorTest.scala
Scala
apache-2.0
1,507
package org.apache.spark.sql.jython import org.apache.spark.internal.Logging import org.apache.spark.sql.UDFRegistration import org.apache.spark.sql.catalyst.analysis.FunctionRegistry /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE ...
mariusvniekerk/spark-jython-udf
src/main/scala/org/apache/spark/sql/jython/JythonUDF.scala
Scala
apache-2.0
15,540
package org.cddb.lsmt trait Serializer[T] { def serialize(obj: T): Array[Byte] def deserialize(data: Array[Byte]): Option[T] }
tierex/cddb
core/src/main/scala/org/cddb/lsmt/Serializer.scala
Scala
apache-2.0
136
package org.danielnixon.extrawarts import org.scalatest.FunSuite import org.wartremover.test.WartTestTraverser import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future class FutureObjectTest extends FunSuite { val futs: List[Future[String]] = Nil test("can't use scala.concurrent...
danielnixon/extrawarts
core/src/test/scala/org/danielnixon/extrawarts/FutureObjectTest.scala
Scala
apache-2.0
1,017
package org.workcraft.gui.modeleditor.tools import java.awt.Color import java.awt.Graphics2D import java.awt.geom.Point2D import org.workcraft.gui.modeleditor.MouseButton import org.workcraft.gui.modeleditor.LeftButton import org.workcraft.gui.modeleditor.Modifier import org.workcraft.gui.modeleditor.ToolMouseListener...
tuura/workcraft-2.2
ScalaGraphEditorUtil/src/main/scala/org/workcraft/gui/modeleditor/tools/NodeGeneratorTool.scala
Scala
gpl-3.0
1,554
package com.twitter.scalding.examples import com.twitter.scalding._ import com.twitter.scalding.typed.ComputedValue object KMeans { /** * This is the euclidean norm between two vectors */ private def distance(v1: Vector[Double], v2: Vector[Double]): Double = math.sqrt(v1.iterator .zip(v2.iterator...
tdyas/scalding
scalding-commons/src/main/scala/com/twitter/scalding/examples/KMeans.scala
Scala
apache-2.0
4,797
/* * 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 ...
hequn8128/flink
flink-runtime/src/main/scala/akka/actor/RobustActorSystem.scala
Scala
apache-2.0
3,329
package scala.c.engine package ast import org.eclipse.cdt.core.dom.ast._ import org.eclipse.cdt.internal.core.dom.parser.c._ import scala.annotation.switch object Expressions { def evaluate(expr: IASTInitializerClause)(implicit state: State): Option[ValueType] = expr match { case exprList: IASTExpressionList ...
bdwashbu/cEngine
src/scala/c/engine/ast/Expressions.scala
Scala
apache-2.0
4,659
package keehive case class Secret ( data: Map[String, String] = Map(), timestamp: Long = System.currentTimeMillis): def get(key: String): String = data.getOrElse(key, "") def updated(kv: (String, String)): Secret = new Secret(data.updated(kv._1, kv._2)) lazy val maxKeyLength: Int = data.keys.map(_.len...
bjornregnell/keehive
src/main/scala/keehive/Secret.scala
Scala
gpl-3.0
1,473
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
pgandhi999/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/types/StructField.scala
Scala
apache-2.0
3,135
package net.scalytica.symbiotic.postgres import net.scalytica.symbiotic.api.repository.RepositoryProvider import net.scalytica.symbiotic.config.ConfigReader import net.scalytica.symbiotic.fs.FileSystemIO import net.scalytica.symbiotic.postgres.docmanagement.{ PostgresFSTreeRepository, PostgresFileRepository, Pos...
kpmeen/symbiotic
symbiotic-postgres/src/main/scala/net/scalytica/symbiotic/postgres/PostgresRepositories.scala
Scala
apache-2.0
874
package au.com.onegeek.respite.models import au.com.onegeek.respite.config.TestConfigurationModule import org.scalatest.concurrent.ScalaFutures import au.com.onegeek.respite.models.User import reactivemongo.bson.BSONObjectID import play.api.libs.json._ import au.com.onegeek.respite.UnitSpec class ModelTests extends ...
mefellows/respite
respite-core/src/test/scala/au/com/onegeek/respite/models/ModelTests.scala
Scala
mit
3,476
package demo package components import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.html_<^._ import org.scalajs.dom import org.scalajs.dom.ext.PimpedNodeList object CodeHighlight { val component = ScalaComponent .builder[String]("CodeHighLighter") .render_P(P => <.code(^.`class` := "scala",...
rleibman/scalajs-react-components
demo/src/main/scala/demo/components/CodeHighlight.scala
Scala
apache-2.0
856
/** * Copyright (C) 2013 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...
wesley1001/orbeon-forms
src/test/scala/org/orbeon/oxf/fr/persistence/rest/HttpRequest.scala
Scala
lgpl-2.1
4,404
package dotty.tools.languageserver import org.junit.Test import dotty.tools.dotc.reporting.ErrorMessageID._ import dotty.tools.languageserver.util.Code._ import org.eclipse.lsp4j.DiagnosticSeverity._ class DiagnosticsTest { @Test def diagnosticWrongType: Unit = code"""object Test { | val x: Int = $m...
dotty-staging/dotty
language-server/test/dotty/tools/languageserver/DiagnosticsTest.scala
Scala
apache-2.0
1,297
/* * 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 ...
tejasapatil/spark
core/src/main/scala/org/apache/spark/deploy/DependencyUtils.scala
Scala
apache-2.0
6,974
package app.circumstances import utils.WithJsBrowser import app.FunctionalTestCommon import utils.pageobjects.circumstances.start_of_process.GReportChangesPage import utils.pageobjects.xml_validation.{XMLBusinessValidation, XMLCircumstancesBusinessValidation} import utils.pageobjects.{Page, PageObjects, TestData, XmlP...
Department-for-Work-and-Pensions/ClaimCapture
c3/test/app/circumstances/FunctionalTestCase2Spec.scala
Scala
mit
1,088
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
SRGOM/scalatest
scalatest/src/main/scala/org/scalatest/PropSpec.scala
Scala
apache-2.0
37,327
package com.wavesplatform.state.diffs.ci import com.wavesplatform.db.WithDomain import com.wavesplatform.db.WithState.AddrWithBalance import com.wavesplatform.features.BlockchainFeatures._ import com.wavesplatform.lang.directives.values.V5 import com.wavesplatform.lang.script.Script import com.wavesplatform.lang.v1.co...
wavesplatform/Waves
node/src/test/scala/com/wavesplatform/state/diffs/ci/OverheadCallableCallTest.scala
Scala
mit
1,957
import scala.tools.partest.DirectTest import scala.reflect.internal.util.BatchSourceFile object Test extends DirectTest { // Java code override def code = """ |public @interface MyAnnotation { String value(); } """.stripMargin override def extraSettings: String = "-usejavacp -Ystop-after:typer -Xprint:par...
densh/dotty
tests/pending/run/t5699.scala
Scala
bsd-3-clause
657
package org.littlewings.infinispan.task import org.infinispan.Cache import org.infinispan.tasks.{ServerTask, TaskContext} class CompatibilityCacheSimpleTask extends ServerTask[String] { private[task] var taskContext: TaskContext = _ override def getName: String = "cacheSimpleTask" override def setTaskContext(...
kazuhira-r/infinispan-getting-started
remote-task/src/main/scala/org/littlewings/infinispan/task/CompatibilityCacheSimpleTask.scala
Scala
mit
752
def contramap[A, B](f: B => A): Op[Boolean, A] => Op[Boolean, B] = { case Op(g) => Op(g compose f) }
hmemcpy/milewski-ctfp-pdf
src/content/1.10/code/scala/snippet25.scala
Scala
gpl-3.0
102
/* * Copyright (c) 2014-2022 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apach...
snowplow/schema-ddl
modules/core/src/main/scala/com.snowplowanalytics/iglu.schemaddl/jsonschema/SanityLinter.scala
Scala
apache-2.0
3,211
package dibl.proto import scala.scalajs.js.annotation.{ JSExport, JSExportTopLevel } @JSExportTopLevel("PrototypeDiagram") object PrototypeDiagram { /** Completes a document supposed to have groups of SVG elements as in * GroundForge-help/docs/images/matrix-template.png * * The groups are positioned outsi...
jo-pol/GroundForge
src/main/scala/dibl/proto/PrototypeDiagram.scala
Scala
gpl-3.0
7,492
/* * scala-swing (https://www.scala-lang.org) * * Copyright EPFL, Lightbend, Inc., contributors * * 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...
scala/scala-swing
src/main/scala/scala/swing/event/ColorChanged.scala
Scala
apache-2.0
438
package tests class Baz { def baz/*caret*/() = 0 } object Baz2 extends Baz { override val baz/*caret*/ = 3 } object Baz3 extends {override var /*caret*/baz = 1} with Baz {} class Baz4 extends Baz { override def baz/*caret*/() = 1 } object Test { Baz2.baz/*caret*/ Baz3.baz/*caret*/ Baz3.baz/*caret*/_=(3...
LPTK/intellij-scala
testdata/rename3/overrideDef/before/tests/Baz.scala
Scala
apache-2.0
323
package com.sothr.imagetools.engine import java.io.File import akka.actor.{ActorRef, Props} import com.sothr.imagetools.engine.image.{Image, ImageService, SimilarImages} import grizzled.slf4j.Logging import scala.collection.mutable /** * Engine that works sequentially * Very Slow, but consistent. Excellent for te...
warricksothr/ImageTools
engine/src/main/scala/com/sothr/imagetools/engine/SequentialEngine.scala
Scala
mit
3,455
/* * Copyright (c) 2015, * Ilya Sergey, Christopher Earl, Matthew Might and David Van Horn * 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 t...
ilyasergey/reachability
src/org/ucombinator/scheme/transform/Monomorphizer.scala
Scala
bsd-3-clause
1,945
/* NSC -- new Scala compiler * Copyright 2005-2013 LAMP/EPFL * @author Paul Phillips */ package scala.tools package cmd import nsc.io._ import java.util.Properties import java.io.FileInputStream import scala.sys.SystemProperties /** Contains logic for translating a property key/value pair into * equivalent com...
felixmulder/scala
src/compiler/scala/tools/cmd/Property.scala
Scala
bsd-3-clause
2,406
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
SRGOM/scalatest
scalatest-test/src/test/scala/org/scalatest/fixture/AsyncPropSpecLikeSpec.scala
Scala
apache-2.0
4,266
/** * 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...
junrao/kafka
core/src/main/scala/kafka/producer/async/DefaultEventHandler.scala
Scala
apache-2.0
18,044
package org.reactivecouchbase.experimental object CouchbaseFS { }
en-japan/ReactiveCouchbase-core
driver/src/main/scala/org/reactivecouchbase/experimental/couchfs.scala
Scala
apache-2.0
67
package v1.wikiq import javax.inject.Inject import epam.idobrovolskiy.wikipedia.trending.cli.WikiDateRangeParser import play.api.routing.Router.Routes import play.api.routing.SimpleRouter import play.api.routing.sird._ /** * Routes and URLs to the PostResource controller. */ class WikiqRouter @Inject()(controlle...
igor-dobrovolskiy-epam/wikipedia-analysis-scala-core
web/app/v1/wikiq/WikiqRouter.scala
Scala
apache-2.0
822
package net.mentalarray.doozie.PigSupport /** * Created by kdivincenzo on 2/18/15. */ sealed trait PigClientState { } object PigClientState { case object Connected extends PigClientState case object WorkRequested extends PigClientState case object Finished extends PigClientState case object Disconnected ex...
antagonist112358/tomahawk
workflow-engine/src/net/mentalarray/doozie/PigSupport/PigClientState.scala
Scala
apache-2.0
386
/* * 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/core/src/test/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsSnapshotsStoreSuite.scala
Scala
apache-2.0
5,628
package pl.project13.scala.akka.raft.cluster import protocol._ import akka.cluster.{Member, Cluster} import akka.cluster.ClusterEvent._ import concurrent.duration._ import pl.project13.scala.akka.raft.config.{RaftConfig, RaftConfiguration} import pl.project13.scala.akka.raft.protocol._ import akka.actor._ /** * Akka...
ktoso/akka-raft
src/main/scala/pl/project13/scala/akka/raft/cluster/ClusterRaftActor.scala
Scala
apache-2.0
6,164
package edu.neu.coe.scala.parse import org.scalatest.{ FlatSpec, Matchers } import edu.neu.coe.scala.numerics.Rational import scala.util._ import edu.neu.coe.scala.numerics.Rational._ /** * @author scalaprof */ class ExpressionParserSpec extends FlatSpec with Matchers { "DoubleExpressionParser(1)" should "be 1.0...
rchillyard/Scalaprof
Numerics/src/test/scala/edu/neu/coe/scala/parse/ExpressionParserSpec.scala
Scala
gpl-2.0
4,236
package filodb.spark import akka.actor.ActorSystem import com.typesafe.config.{Config, ConfigFactory} import org.apache.spark.SparkContext import filodb.cassandra.columnstore.CassandraColumnStore import filodb.cassandra.metastore.CassandraMetaStore import filodb.coordinator.DefaultCoordinatorSetup object FiloSetup e...
YanjieGao/FiloDB
spark/src/main/scala/filodb.spark/FiloSetup.scala
Scala
apache-2.0
1,287
package extracells.integration.opencomputers import scala.collection.JavaConversions._ import appeng.api.AEApi import appeng.api.config.Actionable import appeng.api.implementations.tiles.IWirelessAccessPoint import appeng.api.networking.security.MachineSource import appeng.api.networking.storage.IStorageGrid import ap...
AmethystAir/ExtraCells2
src/main/scala/extracells/integration/opencomputers/UpgradeAE.scala
Scala
mit
13,219
package com.shocktrade.common.models.contest import scala.scalajs.js /** * Represents a Portfolio-like model * @author Lawrence Daniels <[email protected]> */ trait PortfolioLike extends js.Object { def playerID: js.UndefOr[String] def active: js.UndefOr[Boolean] def perks: js.UndefOr[js.Array...
ldaniels528/shocktrade.js
app/shared/common/src/main/scala/com/shocktrade/common/models/contest/PortfolioLike.scala
Scala
apache-2.0
656
package com.github.mrpowers.spark.daria.utils import org.apache.spark.sql.SparkSession object DirHelpers { lazy val spark: SparkSession = { SparkSession .builder() .master("local") .appName("spark session") .getOrCreate() } def numBytes(dirname: String): Long = { val filePath ...
MrPowers/spark-daria
src/main/scala/com/github/mrpowers/spark/daria/utils/DirHelpers.scala
Scala
mit
676
package com.krrrr38.mackerel4s import org.scalatest.{ FunSpec, Matchers } class MackerelClientSettingSpec extends FunSpec with Matchers { val setting = MackerelClientSetting describe("client setting") { it("contain valid version") { setting.API_VERSION shouldBe "v0" } it("contain valid url") { ...
krrrr38/mackerel-client-scala
src/test/scala/com/krrrr38/mackerel4s/MackerelClientSettingSpec.scala
Scala
mit
612
/** * 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...
guozhangwang/kafka
core/src/main/scala/kafka/utils/FileLock.scala
Scala
apache-2.0
2,419
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); yo...
TiVo/kafka
core/src/test/scala/integration/kafka/api/SaslEndToEndAuthorizationTest.scala
Scala
apache-2.0
3,780
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
dotty-staging/scalatest
scalatest-test/src/test/scala/org/scalatest/ShouldBeMatcherSpec.scala
Scala
apache-2.0
14,132
import collection.immutable.HashMap object Test { def main(args: Array[String]): Unit = { resolveDefault() resolveFirst() resolveSecond() resolveMany() } def resolveDefault(): Unit = { val a = HashMap(1 -> "1") val b = HashMap(1 -> "2") val r = a.merged(b)(null) println(r) ...
yusuke2255/dotty
tests/run/t5879.scala
Scala
bsd-3-clause
1,186
// // Copyright (c) 2015 IronCore Labs // package com.ironcorelabs.davenport import scalaz._, Scalaz._, scalaz.concurrent.Task, scalaz.stream.Process import db._ import tags.RequiresCouch import syntax.dbprog._ import scala.concurrent.duration._ @RequiresCouch class CouchConnectionSpec extends TestBase with KnobsConf...
BobWall23/davenport
src/test/scala/com/ironcorelabs/davenport/CouchConnectionSpec.scala
Scala
mit
1,784
package org.kuleuven.mai.vision.image import org.apache.spark.rdd.RDD /** * @author mandar */ class SparkHistogram(vals: RDD[Double]) { private val _values = vals private val hist: (Int) => (Array[Double], Array[Long]) = _values.histogram def values = _values def +(other: SparkHistogram): SparkHistogram = ...
mandar2812/ScalaImageToolbox
ImageDenoising/src/main/scala-2.11/org/kuleuven/mai/vision/image/SparkHistogram.scala
Scala
apache-2.0
460
package com.gilt.pickling.avro import org.scalatest.{Assertions, FunSuite} import org.apache.avro.Schema import com.gilt.pickling.TestUtils import TestUtils._ import org.apache.avro.generic.GenericData import scala.pickling._ import scala.collection.JavaConversions._ import java.util.{Set => JSet} import org.scalatest...
gilt/gfc-avro
src/test/scala/com/gilt/pickling/avro/SetOfPrimitivesTest.scala
Scala
apache-2.0
9,740
/* * 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 ...
MLnick/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveTableValuedFunctions.scala
Scala
apache-2.0
4,718
package rescala import rescala.levelbased.LevelBasedPropagationEngines object Engines extends LevelBasedPropagationEngines { implicit val default: SimpleEngine = synchron val all: List[SimpleEngine] = List(synchron, unmanaged) val locksweep: TEngine = null val parallellocksweep: TEngine = null }
volkc/REScala
Main/native/src/main/scala/rescala/Engines.scala
Scala
apache-2.0
310
package scapi.ot import akka.actor.{ActorSystem, Props} import scapi.ot.ObliviousTransferProtocolMessages.Start object ObliviousTransferExample extends App { val sigma = 0: Byte val system = ActorSystem("OT") val otSender = system.actorOf(Props[ObliviousTransferGroupElementSender]) val otReceiver = system....
kushti/scala-scapi
src/main/scala/scapi/ot/ObliviousTransferExample.scala
Scala
cc0-1.0
412
package synahive.restapi.http import akka.http.scaladsl.server.Directives._ import synahive.restapi.http.routes._ import synahive.restapi.utils.CorsSupport trait HttpService extends UsersServiceRoute with AuthServiceRoute with CorsSupport { val routes = pathPrefix("v1") { corsHandler { usersRoute...
synahive/synahive-server
src/main/scala/synahive/restapi/http/HttpService.scala
Scala
mit
360
class C1 { type T def this(x: T) = { this() } } class C1a[T] { def this(x: T) = { this() } // works, no error here } class C2(x: Int) { def this(a: Int, b: Int = x) = { this(b) } } class C3 { val x = 0 def this(a: Int = x) = { this() } }
folone/dotty
tests/untried/neg/t5543.scala
Scala
bsd-3-clause
261
package bot.line.client import akka.actor.ActorSystem import akka.http.scaladsl.Http import akka.stream.Materializer import scala.concurrent.{ExecutionContext, Future} class ReplyMessageClient(accessToken: String) (implicit val system: ActorSystem, implicit val materi...
xoyo24/akka-http-line-bot
src/main/scala/bot/line/client/ReplyMessageClient.scala
Scala
mit
828
/* * Copyright (C) 2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.actor.testkit.typed.internal import akka.actor.testkit.typed.LoggingEvent import akka.annotation.InternalApi // import ch.qos.logback.classic.spi.ILoggingEvent // import ch.qos.logback.classic.spi.ThrowableProxy // import ch.qos.logb...
unicredit/akka.js
akka-js-typed-testkit/js/src/main/scala/akka/actor/testkit/typed/internal/TestAppender.scala
Scala
bsd-3-clause
4,027
package org.jetbrains.plugins.scala package codeInspection.collections import org.jetbrains.plugins.scala.codeInspection.InspectionBundle /** * Nikolay.Tropin * 5/30/13 */ class FindNotEqualsNoneTest extends OperationsOnCollectionInspectionTest { val hint = InspectionBundle.message("find.notEquals.none.hint") ...
consulo/consulo-scala
test/org/jetbrains/plugins/scala/codeInspection/collections/FindNotEqualsNoneTest.scala
Scala
apache-2.0
841
package au.com.intelix.config import com.typesafe.config.ConfigFactory trait WithBlankConfig extends WithConfig { lazy implicit override val config = ConfigFactory.empty() }
intelix/reactiveservices
tools/config/src/main/scala/au/com/intelix/config/WithBlankConfig.scala
Scala
apache-2.0
180
package org.http4s package play.test // Get out of play package so we can import custom instances import _root_.play.api.libs.json._ import cats.effect.IO import cats.effect.laws.util.TestContext import org.http4s.headers.`Content-Type` import org.http4s.jawn.JawnDecodeSupportSpec import org.http4s.play._ // Original...
aeons/http4s
play-json/src/test/scala/org/http4s/play/PlaySpec.scala
Scala
apache-2.0
2,576
// Solution-2.scala // Solution to Exercise 2 in "Creating Classes" class Lion class Giraffe val lion2 = new Lion val giraffe2 = new Giraffe val giraffe3 = new Giraffe println(lion2) println(giraffe2) println(giraffe3) /* OUTPUT_SHOULD_CONTAIN Main$$anon$1$Lion@ Main$$anon$1$Giraffe@ Main$$anon$1$Giraffe@ */
P7h/ScalaPlayground
Atomic Scala/atomic-scala-solutions/11_CreatingClasses/Solution-2.scala
Scala
apache-2.0
314
package im.actor.server.push.apple import akka.actor.ActorSystem import com.google.protobuf.wrappers.{ Int32Value, StringValue } import com.relayrides.pushy.apns.PushNotificationResponse import com.relayrides.pushy.apns.util.{ SimpleApnsPushNotification, TokenUtil } import im.actor.server.model.push.ApplePushCredentia...
EaglesoftZJ/actor-platform
actor-server/actor-core/src/main/scala/im/actor/server/push/apple/APNSSend.scala
Scala
agpl-3.0
2,114
/* * 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/cloud-integration
cloud-examples/src/test/scala/org/apache/spark/sql/hive/orc/cloud/S3AParquetPartitionSuite.scala
Scala
apache-2.0
1,195
package org.jetbrains.plugins.hocon.highlight import java.util import com.intellij.icons.AllIcons import com.intellij.openapi.editor.colors.TextAttributesKey import com.intellij.openapi.fileTypes.{SyntaxHighlighter, SyntaxHighlighterFactory} import com.intellij.openapi.options.colors.{AttributesDescriptor, ColorDescr...
ilinum/intellij-scala
src/org/jetbrains/plugins/hocon/highlight/HoconColorSettingsPage.scala
Scala
apache-2.0
4,482
package jp.co.bizreach.play2stub import play.api.http.HeaderNames import play.api.mvc.{ResponseHeader, AnyContent, Request, Result} import play.mvc.Http.Status /** * Do something before the request is processed. */ trait BeforeFilter { def process(request:Request[AnyContent]):Request[AnyContent] } /** * Do s...
bizreach/play2-stub
src/main/scala/jp/co/bizreach/play2stub/Filters.scala
Scala
apache-2.0
1,224
// Copyright (C) 2019 MapRoulette contributors (see CONTRIBUTORS.md). // Licensed under the Apache License, Version 2.0 (see LICENSE). package org.maproulette.models.utils import java.sql.{PreparedStatement, SQLException} import anorm._ import org.apache.commons.lang3.StringUtils import org.joda.time.DateTime import ...
Crashfreak/maproulette2
app/org/maproulette/models/utils/DALHelper.scala
Scala
apache-2.0
14,660
/* * 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/vat-registration-frontend
app/controllers/registration/returns/SendGoodsOverseasController.scala
Scala
apache-2.0
3,512
package commands.makemkv import commands.FilenameSanitiser import org.specs2.mutable.Specification /** * Created by alex on 07/05/15. */ class FilenameSanitiserSpec extends Specification with FilenameSanitiser { "Upper case characters" should { "be replaced by lower case characters" in { sanitise("AB")...
unclealex72/ripper
src/test/scala/commands/makemkv/FilenameSanitiserSpec.scala
Scala
mit
804
package io.flow.dependency.api.lib import io.flow.util.Version case class ArtifactVersion( tag: Version, crossBuildVersion: Option[Version] )
flowcommerce/dependency
api/app/lib/ArtifactVersion.scala
Scala
mit
149
package dbtarzan.db import dbtarzan.db.foreignkeys.ForeignKeyTextBuilder object SqlBuilder { val selectClause = "SELECT * FROM " /* builds the SQL to query the table from the (potential) original foreign key (to know which rows it has to show), the potential where filter and the table name */ def buildSql(stru...
aferrandi/dbtarzan
src/main/scala/dbtarzan/db/SqlBuilder.scala
Scala
apache-2.0
1,344
package nasa.nccs.caching import java.io._ import java.nio.file.{Files, Paths} import nasa.nccs.utilities.Logger import org.apache.commons.io.FileUtils import collection.mutable import com.googlecode.concurrentlinkedhashmap.{ConcurrentLinkedHashMap, EntryWeigher, EvictionListener} import nasa.nccs.utilities.Loggable...
nasa-nccs-cds/EDAS
src/main/scala/nasa/nccs/caching/memoryCache.scala
Scala
gpl-2.0
9,828
package mimir.parser import fastparse._, NoWhitespace._ import fastparse.Parsed import sparsity.parser.StreamParser import java.io.Reader sealed abstract class MimirCommand case class SlashCommand( body: String ) extends MimirCommand case class SQLCommand( body: MimirStatement ) extends MimirCommand object Mim...
UBOdin/mimir
src/main/scala/mimir/parser/MimirCommand.scala
Scala
apache-2.0
922
package authentication.controllers import articles.services.ArticleService import authentication.models.SecurityUser import authentication.{ExceptionCode, HttpExceptionResponse, MissingOrInvalidCredentials} import commons.repositories.ActionRunner import julienrf.json.derived import org.pac4j.core.credentials.Username...
Dasiu/play-framework-test-project
app/authentication/controllers/AuthenticationController.scala
Scala
mit
2,498
package mesosphere.marathon package api import akka.Done import akka.actor.ActorSystem import akka.stream.scaladsl.Source import akka.stream.{ActorMaterializer, ActorMaterializerSettings} import mesosphere.marathon.core.deployment.DeploymentPlan import mesosphere.marathon.core.group.GroupManager import mesosphere.mara...
mesosphere/marathon
src/test/scala/mesosphere/marathon/api/TaskKillerTest.scala
Scala
apache-2.0
10,031
/* * 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 ...
reminisce/mxnet
scala-package/core/src/main/scala/org/apache/mxnet/module/DataParallelExecutorGroup.scala
Scala
apache-2.0
30,372
/* * Copyright 2019 Qameta Software OÜ * * 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 ...
allure-framework/allure-java
allure-scalatest/src/test/scala/io/qameta/allure/scalatest/testdata/SimpleSpec.scala
Scala
apache-2.0
825
/* * 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. */ // GENERATED CODE: DO NOT EDIT...
lrytz/scala
src/library/scala/Product1.scala
Scala
apache-2.0
1,395
package com.ing.bakery.baker import akka.actor.ActorSystem import cats.effect.{ContextShift, IO, Resource, Timer} import com.ing.baker.runtime.akka.internal.CachingInteractionManager import com.ing.baker.runtime.akka.{AkkaBaker, AkkaBakerConfig} import com.ing.bakery.mocks.EventListener import com.ing.bakery.testing.B...
ing-bank/baker
bakery/state/src/test/scala/com/ing/bakery/baker/WatcherSpec.scala
Scala
mit
1,956
package almond.api.helpers import java.io.{BufferedInputStream, IOException} import java.net.{URL, URLConnection} import java.nio.file.{Files, Paths} import java.util.Base64 import almond.display.UpdatableDisplay import almond.interpreter.api.DisplayData.ContentType import almond.interpreter.api.{DisplayData, OutputH...
alexarchambault/jupyter-scala
modules/scala/jupyter-api/src/main/scala/almond/api/helpers/Display.scala
Scala
apache-2.0
6,133
/** * Copyright (C) 2013 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...
wesley1001/orbeon-forms
src/main/scala/org/orbeon/oxf/fr/FormRunnerSummary.scala
Scala
lgpl-2.1
1,906
package vexriscv.plugin import vexriscv._ import vexriscv.VexRiscv import spinal.core._ import spinal.lib.KeepAttribute //Input buffer generaly avoid the FPGA synthesis to duplicate reg inside the DSP cell, which could stress timings quite much. class MulPlugin(var inputBuffer : Boolean = false, var ou...
SpinalHDL/VexRiscv
src/main/scala/vexriscv/plugin/MulPlugin.scala
Scala
mit
4,862
package org.cddcore.engine class DecisionTreeTracerSpec extends CddEngineSpec { "The DecisionTreeTracer" should "return a list of decision trees, each with one more scenario added" in { val e = new Engine[Int, String] { 1 produces "one" when (_ == 1) 2 produces "two" when (_ == 2) 3 pr...
phil-rice/CddCore2
module/engine/src/test/scala/org/cddcore/engine/DecisionTreeTracerSpec.scala
Scala
bsd-2-clause
543
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package docs.scaladsl.gettingstarted package helloservice { //#helloservice import akka.Done import akka.NotUsed import com.lightbend.lagom.scaladsl.api._ import play.api.libs.json._ trait HelloService extends Service { de...
rcavalcanti/lagom
docs/manual/scala/gettingstarted/code/GettingStarted.scala
Scala
apache-2.0
2,194
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.2 * @date Mon May 25 17:57:02 EDT 2015 * @see LICENSE (MIT style license file). */ package scalation.linalgebra.bld import java.io.{File, PrintWriter} //::::::::::::::::::::::::::::::...
NBKlepp/fda
scalation_1.2/src/main/scala/scalation/linalgebra/bld/BldBidMatrix.scala
Scala
mit
45,403
package org.jetbrains.plugins.scala package annotator import org.intellij.lang.annotations.Language import org.jetbrains.plugins.scala.base.SimpleTestCase import org.jetbrains.plugins.scala.lang.psi.api.ScalaFile import org.jetbrains.plugins.scala.lang.psi.api.base.ScLiteral import scala.util.Random /** * @author ...
double-y/translation-idea-plugin
test/org/jetbrains/plugins/scala/annotator/IntegerLiteralCheckTest.scala
Scala
apache-2.0
3,515
package org.stanoq.crawler import java.util.concurrent.TimeUnit import com.typesafe.config.ConfigFactory import org.mongodb.scala.{MongoClient, MongoCollection} import org.stanoq.crawler.model._ import org.mongodb.scala.bson.codecs.Macros._ import org.mongodb.scala.bson.codecs.DEFAULT_CODEC_REGISTRY import org.bson.c...
olka/stanoq
src/main/scala/org/stanoq/crawler/MongoHelper.scala
Scala
mit
2,191
/** * Copyright 2015, 2016, 2017 Gianluca Amato <[email protected]> * * This file is part of ScalaFix. * ScalaFix 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 Licen...
jandom-devel/ScalaFix
core/src/main/scala/it/unich/scalafix/package.scala
Scala
gpl-3.0
1,823
/* * 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/3/15 7:09 PM */ package base.socket.message.user import base.socket.message.{ CommandObject, UserServ...
robconrad/base-api
project-socket/src/main/scala/base/socket/message/user/UserServerCommands.scala
Scala
mit
791
/** * Created by Variant on 16/3/18. */ object PatternMatchFunction { def main(args: Array[String]) { def match_type(t : Any) = t match { case p :Int => println("It is Integre") case p :String => println("It is String") case m :Map[_, _] => m.foreach(println) case _ => println("Unknown t...
sparkLiwei/ProgrammingNote
scalaLearning/scalaFunction/scalaFunction/PatternMatchFunction.scala
Scala
cc0-1.0
1,378
package jp.co.bizreach.robot import java.io.InputStream import java.util.Locale import org.apache.commons.io.input.BOMInputStream import scala.annotation.tailrec import scala.io.Source import scala.util.Try import scala.util.matching.Regex import com.softwaremill.quicklens._ /** * The object of parsing the robots...
bizreach/robotparser-scala
src/main/scala/jp/co/bizreach/robot/RobotsTxtParser.scala
Scala
apache-2.0
3,807
package scroll.internal.support.impl import scroll.internal.support.RelationshipsApi import scroll.internal.support.RoleQueriesApi import scala.reflect.ClassTag class Relationships(private[this] val roleQueries: RoleQueriesApi) extends RelationshipsApi { import scroll.internal.support.impl.Multiplicities._ cla...
max-leuthaeuser/SCROLL
core/src/main/scala/scroll/internal/support/impl/Relationships.scala
Scala
lgpl-3.0
3,240
/* * Copyright 2017 Spotify AB. * * 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 ...
spotify/featran
jmh/src/test/scala/com/spotify/featran/jmh/TransformerBenchmark.scala
Scala
apache-2.0
4,484
package sangria.validation.rules import sangria.ast import sangria.ast.AstVisitorCommand import sangria.validation._ import scala.collection.mutable.{Set => MutableSet} /** Unique argument names * * A GraphQL field or directive is only valid if all supplied arguments are uniquely named. */ class UniqueArgument...
sangria-graphql/sangria
modules/core/src/main/scala/sangria/validation/rules/UniqueArgumentNames.scala
Scala
apache-2.0
999
package nodes.stats import breeze.linalg._ import breeze.stats.distributions._ import workflow.Transformer /** * A node that takes in DenseVector[Double] and randomly flips * the sign of some of the elements */ case class RandomSignNode(signs: DenseVector[Double]) extends Transformer[DenseVector[Double], Den...
tomerk/keystone
src/main/scala/nodes/stats/RandomSignNode.scala
Scala
apache-2.0
668
package ch.ethz.dalab.dissolve.classification import ch.ethz.dalab.dissolve.optimization.SolverOptions import org.apache.spark.rdd.RDD import java.io.FileWriter import ch.ethz.dalab.dissolve.regression.LabeledObject import org.apache.spark.mllib.regression.LabeledPoint import breeze.linalg._ import ch.ethz.dalab.disso...
dalab/dissolve-struct
dissolve-struct-lib/src/main/scala/ch/ethz/dalab/dissolve/classification/MultiClassSVMWithDBCFW.scala
Scala
apache-2.0
8,464
package hud import javafx.scene.layout.Pane import javafx.scene.paint.Color import javafx.scene.canvas.GraphicsContext import javafx.scene.image.Image import graphics.GraphicsObject import graphics.Sprite /** * * * * * * * * * * * * * * * * * * * * * * * * * * * * MiniMap class * * Renders a hud element in th...
MyForteIsTimeTravel/PanamaEngine
src/hud/MiniMap.scala
Scala
mit
2,019
/** * Swaggy Jenkins * Jenkins API clients generated from Swagger / Open API specification * * The version of the OpenAPI document: 1.1.2-pre.0 * Contact: [email protected] * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not ed...
cliffano/swaggy-jenkins
clients/scala-sttp/generated/src/main/scala/org/openapitools/client/model/Pipeline.scala
Scala
mit
719
package com.twitter.finagle package object service { /** * A response classifier allows developers to give Finagle the additional * application specific knowledge necessary in order to properly classify them. * Without this, Finagle can only safely make judgements about transport * level failures. * ...
koshelev/finagle
finagle-core/src/main/scala/com/twitter/finagle/service/package.scala
Scala
apache-2.0
2,984
/* * Copyright (c) 2014-2021 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
monifu/monix
monix-catnap/shared/src/test/scala/monix/catnap/ConcurrentChannelSuite.scala
Scala
apache-2.0
21,886
/* * 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/nn/BatchNormalizationSpec.scala
Scala
apache-2.0
4,931
package katas.scala.bsearchtree import org.junit.Test import org.scalatest.Matchers /** * User: dima * Date: 04/11/2011 */ class BST3 extends Matchers { @Test def shouldFindIfBinarySearchTreeContainsElement() { var bst = BST() bst.contains(1) should equal(false) bst = bst.add(1) bst.contains(0) ...
dkandalov/katas
scala/src/katas/scala/bsearchtree/BST3.scala
Scala
unlicense
2,212