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 hello import org.scalatest.FreeSpec class MainTest extends FreeSpec { "hello main" in { assert(Main.hello("scalatest") === "hello scalatest") } }
katzchang/tddbc-tokyo-2016-02
src/test/scala/hello/MainTest.scala
Scala
apache-2.0
164
import scala.io.Source import scala.math._ import cl.asa.yaml._ import cl.asa.init._ import cl.asa.parse._ import cl.asa.result._ import cl.asa.yaml.frame._ import fileIO._ import scala.collection.JavaConversions._ /** * 正解データとASAの解析結果の比較 */ object compare { //パラメータ val infile: String = "" val analyzer: String...
Takeuchi-Lab-LM/scala_asa3
ASA/src/main/scala/compare.scala
Scala
mit
5,736
/** * Copyright (C) 2019 Inera AB (http://www.inera.se) * * This file is part of statistik (https://github.com/sklintyg/statistik). * * statistik 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 v...
sklintyg/statistik
gatling/src/test/scala/se/inera/statistics/gatling/InloggadSjukfall.scala
Scala
lgpl-3.0
1,062
package org.jetbrains.plugins.scala.testingSupport.utest.scala2_10 import org.jetbrains.plugins.scala.testingSupport.utest.{UTestSimpleTest, UTestTestCase} import org.jetbrains.plugins.scala.util.TestUtils.ScalaSdkVersion /** * @author Roman.Shein * @since 02.09.2015. */ abstract class UTestTestBase_2_10 extend...
katejim/intellij-scala
test/org/jetbrains/plugins/scala/testingSupport/utest/scala2_10/UTestTestBase_2_10.scala
Scala
apache-2.0
739
package org.cubefriendly.data import org.cubefriendly.engine.cube.CubeDataBuilder import org.cubefriendly.processors.Language import scala.collection.JavaConversions._ import scala.collection.mutable /** * Cubefriendly * Created by david on 23.02.15. * This code is released under Apache 2 license */ class CubeB...
cubefriendly/cubefriendly-core
src/main/scala/org/cubefriendly/data/CubeBuilder.scala
Scala
apache-2.0
3,347
package smartchess object square { type TSquare = Int type TFile = Int type TRank = Int val BOARD_SIZE_SHIFT = 3 val BOARD_SIZE = 1 << BOARD_SIZE_SHIFT val HALF_BOARD_SIZE = BOARD_SIZE / 2 val HALF_BOARD_SIZE_MINUS_ONE = HALF_BOARD_SIZE - 1 val BOARD_AREA_SHIFT = BOARD_SIZE_SHIFT * 2 val BOARD_...
serversideapps/silhmojs
shared/src/main/scala/shared/smartchess/square.scala
Scala
apache-2.0
2,229
/** * 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-redis/src/main/scala/com/excilys/ebi/gatling/redis/util/RedisHelper.scala
Scala
gpl-2.0
1,138
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
ueshin/apache-spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/HDFSBackedStateStoreMap.scala
Scala
apache-2.0
6,138
package x7c1.linen.repository.loader.crawling import x7c1.linen.database.control.DatabaseHelper import x7c1.wheat.macros.logger.Log import x7c1.wheat.modern.fate.FutureFate import x7c1.wheat.modern.kinds.Fate import scala.collection.mutable import scala.concurrent.Promise class TraceableQueue( helper: DatabaseHelp...
x7c1/Linen
linen-repository/src/main/scala/x7c1/linen/repository/loader/crawling/TraceableQueue.scala
Scala
mit
1,707
package com.typesafe.sbt.packager import sbt.{Artifact, BufferedLogger, FullLogger, Logger} import scala.sys.process.ProcessLogger object Compat { /** * Used in: * * - [[com.typesafe.sbt.packager.windows.WindowsPlugin]] * - [[com.typesafe.sbt.packager.rpm.RpmHelper]] * - [[com.typesafe.sbt.pac...
fsat/sbt-native-packager
src/main/scala-sbt-0.13/com/typesafe/sbt/packager/Compat.scala
Scala
bsd-2-clause
1,463
package debox.benchmark import scala.reflect.ClassTag import scala.{specialized => spec} import scala.collection.mutable import scala.util.Random._ import spire.syntax.cfor._ import com.google.caliper.Param object SetBenchmarks extends MyRunner(classOf[SetBenchmarks]) class SetBenchmarks extends MyBenchmark { @...
beni55/debox
benchmark/src/main/scala/debox/benchmark/SetBenchmark.scala
Scala
mit
5,438
package io.udash.bootstrap.tooltip import io.udash._ import io.udash.testing.AsyncUdashCoreFrontendTest import scala.concurrent.Future import scala.util.Random class TooltipTestUtils extends AsyncUdashCoreFrontendTest { def tooltipTest(companion: TooltipUtils[_ <: Tooltip], expectContent: Boolean): Unit = { "d...
UdashFramework/udash-core
bootstrap4/.js/src/test/scala/io/udash/bootstrap/tooltip/TooltipTestUtils.scala
Scala
apache-2.0
2,374
import scala.quoted.* object Macros { inline def isTypeEqual[T, U]: Boolean = ${isTypeEqualImpl[T, U]} inline def isSubTypeOf[T, U]: Boolean = ${isSubTypeOfImpl[T, U]} def isTypeEqualImpl[T: Type, U: Type](using Quotes) : Expr[Boolean] = { import quotes.reflect.* val isTypeEqual = TypeRepr.of[...
dotty-staging/dotty
tests/run-macros/tasty-subtyping/quoted_1.scala
Scala
apache-2.0
555
package s99 import org.scalatest.{FunSpec, Matchers} class P08Spec extends FunSpec with Matchers { describe("compress(List)") { it("(**) Eliminate consecutive duplicates of list elements.") { // If a list contains repeated elements they should be replaced with a single copy of the element. // The o...
qilab-/algorithm-problems
s-99/src/test/scala/s99/P08Spec.scala
Scala
unlicense
611
package com.getjenny.starchat.services /** * Created by Angelo Leto <angelo@getjenny.com> on 01/07/16. */ import akka.event.{Logging, LoggingAdapter} import com.getjenny.starchat.SCActorSystem import com.getjenny.starchat.analyzer.utils.TokenToVector import com.getjenny.starchat.entities.io._ import com.getjenny.st...
GetJenny/starchat
src/main/scala/com/getjenny/starchat/services/DecisionTableService.scala
Scala
gpl-2.0
34,125
package breeze.optimize import breeze.math.MutableFiniteCoordinateField import breeze.numerics.sqrt import breeze.stats.distributions.{Rand, RandBasis} /** * Created by jda on 3/17/15. */ class AdaDeltaGradientDescent[T](rho: Double, maxIter: Int, to...
claydonkey/breeze
math/src/main/scala/breeze/optimize/AdaDeltaGradientDescent.scala
Scala
apache-2.0
2,053
/* * Copyright 2015 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...
keithhall/ct-calculations
src/test/scala/uk/gov/hmrc/ct/accounts/calculations/PeriodCalculatorSpec.scala
Scala
apache-2.0
3,633
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
Kegeruneku/rudder
rudder-web/src/main/scala/com/normation/rudder/web/components/NodeGroupForm.scala
Scala
agpl-3.0
15,962
package t1000594_neg trait A { def foo(s: List[Option[String]]): Unit } abstract class B extends A
Kwestor/scala-ide
org.scala-ide.sdt.core.tests/test-workspace/jcompiler/src/t1000594_neg/A.scala
Scala
bsd-3-clause
102
package org.photon.common.components import java.util.concurrent.{ExecutorService, Executors} trait ExecutorComponentImpl extends ExecutorComponent { lazy val executor: ExecutorService = Executors.newCachedThreadPool }
Emudofus/Photon
common/main/src/org/photon/common/components/ExecutorComponentImpl.scala
Scala
mit
222
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.junit import scala.concur...
scala-js/scala-js
junit-runtime/src/main/scala/org/scalajs/junit/JUnitTask.scala
Scala
apache-2.0
7,593
/* * Copyright © 2015-2019 the contributors (see Contributors.md). * * This file is part of Knora. * * Knora is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, or *...
musicEnfanthen/Knora
webapi/src/main/scala/org/knora/webapi/store/triplestore/http/GraphProtocolAccessor.scala
Scala
agpl-3.0
6,486
/* * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree */ package a14e.collz.mut import scala.collection.generic.CanBuildFrom import scala.collection.mutable object PrefixSet { implicit def canBuildFrom = new CanBuildFrom[mutable.Set[_], S...
a14e/collz
src/main/scala/a14e/collz/mut/PrefixSet.scala
Scala
mit
1,611
package models.dao import play.api.db.slick.Profile import org.joda.time.DateTime case class ImageRecord(id: Option[Long], url: String, addedAt: DateTime, fileUID: Option[String]) trait ImageComponent { this: Profile => import profile.simple._ import com.github.tototoshi.slick.JodaSupport._ class Images exten...
vokhotnikov/sevstone-play
app/models/dao/Image.scala
Scala
mit
716
package monocle.syntax import monocle.macros.GenLens import monocle.{Lens, MonocleSuite, Prism} class SymbolicSyntaxExample extends MonocleSuite { case class Store(articles: List[Article]) sealed trait Article case class Table(wood: String) extends Article case class Sofa(color: String, price: In...
aoiroaoino/Monocle
example/src/test/scala/monocle/syntax/SymbolicSyntaxExample.scala
Scala
mit
1,194
trait XX class T { type A = XX type B <: A } object T extends T import T._ val b: B = error("") val a: A = b //True
ilinum/intellij-scala
testdata/typeConformance/generic/TypeBounds6.scala
Scala
apache-2.0
119
package mot.monitoring import mot.util.LiveTabler import mot.util.Tabler import mot.Context import mot.Address import mot.util.Util.CeilingDivider import mot.util.Util.atomicLong2Getter import mot.util.Differ class ServerConnection(context: Context) extends MultiCommandHandler { val subcommands = Seq(Live, Totals)...
marianobarrios/mot
src/main/scala/mot/monitoring/ServerConnection.scala
Scala
bsd-2-clause
4,590
/* * 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 ...
gyfora/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/api/stream/sql/DistinctAggregateTest.scala
Scala
apache-2.0
4,941
package shape import org.scalatest._ class ShapeSimpleSpec extends FunSpec with Matchers { import ShapeSimple._ describe("Draw") { it("circle") { draw(Point(3,7), createCircle(10)) shouldBe "Drawing circle at (3, 7) Radius: 10" } it("rectangle") { draw(Point(3,7), createRectangle...
enpassant/miniatures
src/test/scala/shape/ShapeSimpleSpec.scala
Scala
apache-2.0
1,483
/* * 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/core/src/main/scala/org/apache/spark/sql/execution/datasources/noop/NoopDataSource.scala
Scala
apache-2.0
3,637
/* _ _ _ *\\ ** | (_) | | ** ** ___| |_ __| | ___ clide 2 ** ** / __| | |/ _` |/ _ \\ (c) 2012-2014 Martin Ring ...
martinring/clide2
project/Build.scala
Scala
lgpl-3.0
6,648
class Foo(val x: Int) extends AnyVal object Test extends dotty.runtime.LegacyApp { println(scala.reflect.runtime.universe.typeOf[Foo]) }
folone/dotty
tests/pending/run/valueclasses-typetag-basic.scala
Scala
bsd-3-clause
140
package org.apache.spark.ml.bundle.ops.tuning import ml.combust.bundle.BundleContext import ml.combust.bundle.dsl.{Bundle, Model, Node, NodeShape} import ml.combust.bundle.op.{OpModel, OpNode} import org.apache.spark.ml.bundle.SparkBundleContext import org.apache.spark.ml.tuning.TrainValidationSplitModel class TrainV...
combust-ml/mleap
mleap-spark/src/main/scala/org/apache/spark/ml/bundle/ops/tuning/TrainValidationSplitOp.scala
Scala
apache-2.0
2,214
/* * 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 ...
yanboliang/spark
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/BasicExecutorFeatureStep.scala
Scala
apache-2.0
8,487
package mesosphere.marathon.core.flow import org.rogach.scallop.ScallopConf trait LaunchTokenConfig extends ScallopConf { //scalastyle:off magic.number lazy val launchTokenRefreshInterval = opt[Long]( "launch_token_refresh_interval", descr = "The interval (ms) in which to refresh the launch tokens to --l...
yp-engineering/marathon
src/main/scala/mesosphere/marathon/core/flow/LaunchTokenConfig.scala
Scala
apache-2.0
495
/* * 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
core/src/main/scala/org/apache/spark/TestUtils.scala
Scala
apache-2.0
17,756
/* * 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 ...
sgururajshetty/carbondata
integration/hive/src/main/scala/org/apache/carbondata/hive/CarbonHiveMetastoreListener.scala
Scala
apache-2.0
4,595
package com.softwaremill.codebrag.dao.finders.followup import com.softwaremill.codebrag.common.Joda import org.scalatest.matchers.ShouldMatchers import com.softwaremill.codebrag.domain._ import org.joda.time.{DateTimeZone, DateTime} import com.softwaremill.codebrag.domain.builder.{CommentAssembler, UserAssembler, Comm...
frodejohansen/codebrag
codebrag-dao/src/test/scala/com/softwaremill/codebrag/dao/finders/followup/FollowupFinderSpec.scala
Scala
agpl-3.0
9,894
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package play.core.formatters import java.nio.CharBuffer import java.nio.charset.Charset import java.nio.charset.StandardCharsets._ import java.util.concurrent.ThreadLocalRandom import akka.NotUsed import akka.stream.scaladsl.Flow import akka.stream.s...
mkurz/playframework
core/play/src/main/scala/play/core/formatters/Multipart.scala
Scala
apache-2.0
7,588
package dotty.tools package dotc package core import Periods._, Contexts._, Symbols._, Denotations._, Names._, NameOps._, Annotations._ import Types._, Flags._, Decorators._, DenotTransformers._, StdNames._, Scopes._ import NameOps._, NameKinds._, Phases._ import Constants.Constant import TypeApplications.TypeParamInf...
som-snytt/dotty
compiler/src/dotty/tools/dotc/core/SymDenotations.scala
Scala
apache-2.0
109,102
package grammar.adminmode import scala.scalajs.js import japgolly.scalajs.react.vdom.all.{dangerouslySetInnerHtml} import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.prefix_<^._ import japgolly.scalajs.react.{ReactComponentB, Ref, BackendScope} /** * Created by Mikael on 13.08.2015. */ case class E...
epfl-lara/grammar-web
js/src/main/scala/grammar/adminmode/EditableField.scala
Scala
mit
2,259
package com.twitter.inject.thrift import com.twitter.inject.thrift.utils.ThriftMethodUtils._ import com.twitter.inject.utils.ExceptionUtils._ import com.twitter.scrooge.ThriftMethod case class ThriftClientException( clientLabel: String, method: ThriftMethod, cause: Throwable) extends Exception(cause) { ove...
syamantm/finatra
inject/inject-thrift-client/src/main/scala/com/twitter/inject/thrift/ThriftClientException.scala
Scala
apache-2.0
439
/* * Copyright 2017 PayPal * * 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 writin...
Harikiranvuyyuru/squbs
squbs-admin/src/test/scala/org/squbs/admin/AdminSvcTest.scala
Scala
apache-2.0
6,141
/*********************************************************************** * Copyright (c) 2013-2017 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...
ronq/geomesa
geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/geotools/ConversionsTest.scala
Scala
apache-2.0
3,326
package org.jetbrains.plugins.scala package lang package psi package api package expr /** * @author Alexander Podkhalyuzin * Date: 06.03.2008 */ trait ScFinallyBlock extends ScalaPsiElement { def expression: Option[ScExpression] = findChild(classOf[ScExpression]) }
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/api/expr/ScFinallyBlock.scala
Scala
apache-2.0
270
package sangria.validation.rules import sangria.util.{Pos, ValidationSupport} import org.scalatest.wordspec.AnyWordSpec class UniqueFragmentNamesSpec extends AnyWordSpec with ValidationSupport { override val defaultRule = Some(new UniqueFragmentNames) "Validate: Unique fragment names" should { "no fragments...
OlegIlyenko/sangria
modules/core/src/test/scala/sangria/validation/rules/UniqueFragmentNamesSpec.scala
Scala
apache-2.0
1,880
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller, Aravind Kalimurthy * @version 1.3 * @date Mon Aug 29 12:31:10 EDT 2016 * @see LICENSE (MIT style license file). * * @see docs.oracle.com/javase/8/docs/api/java/util/regex * @see www.brics.dk/autom...
NBKlepp/fda
scalation_1.3/scalation_mathstat/src/main/scala/scalation/util/PatMatcher.scala
Scala
mit
11,936
/* * 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 ...
witgo/spark
resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/KubernetesSuite.scala
Scala
apache-2.0
21,301
package com.ajjpj.cassdriver.util import java.nio.ByteBuffer import java.nio.charset.Charset /** * This is a thin abstraction on top of ByteBuffer, providing support for all primitives required by the Cassandra * spec and treating a sequence of ByteBuffers as a single parsable entity. */ trait ParsableByteBuf...
arnohaase/cass-driver
src/main/scala/com/ajjpj/cassdriver/util/ParsableByteBuffers.scala
Scala
apache-2.0
3,907
package maker.utils import org.scalatest.Reporter import java.io._ import java.text.SimpleDateFormat import scala.Console import org.scalatest.events._ import java.util.Date import scala.util.Properties /** * Writes info on the progress of tests to an output file * The output takes the form * * START<28>SUIT...
cage433/maker
test-reporter/src/maker/scalatest/MakerTestReporter.scala
Scala
bsd-2-clause
3,722
/* * sbt * Copyright 2011 - 2018, Lightbend, Inc. * Copyright 2008 - 2010, Mark Harrah * Licensed under Apache License 2.0 (see LICENSE) */ package sbt package internal package server import java.net.URI import sjsonnew.shaded.scalajson.ast.unsafe.JValue import scala.util.{ Left, Right } import sbt.util.{ SomeJs...
sbt/sbt
main/src/main/scala/sbt/internal/server/SettingQuery.scala
Scala
apache-2.0
4,835
class Hi1 { def greet = println("Hi1") } class Hi2 { def greet = println("Hi2") } class Hi3 extends Hi1 { override def greet = println("Hi3") class Hi4 extends Hi2 { override def greet = println("Hi4") def talk = { this.greet Hi3.this.greet super.greet Hi3.super.greet } } }...
grzegorzbalcerek/scala-book-examples
examples/Super1.scala
Scala
mit
321
package scratchpad.foldable import scratchpad.monoid.Monoid import scratchpad.monoid._ object Main { def main(args: Array[String]): Unit = { val strings = List("a", "bc", "d", "efg", "h") println(ListFoldable.foldRight(strings)("")((cur: String, str: String) => cur + str)) } } trait Foldable[F[_]] { d...
waxmittmann/fpinscala
answers/src/main/scala/scratchpad/done/Foldable.scala
Scala
mit
2,005
package uk.gov.gds.ier.validation import play.api.templates.Html import scala.Some import uk.gov.gds.ier.transaction.ordinary.InprogressOrdinary case class Key(key:String) { def asId(value:String = "") = List(key.replace(".", "_"), value.replace(" ", "_")).filter(_.nonEmpty).mkString("_") def item(i:Int) = this.c...
michaeldfallen/ier-frontend
app/uk/gov/gds/ier/validation/FormKeys.scala
Scala
mit
9,397
package com.dominikgruber.fpinscala.chapter06 import org.scalatest._ class Exercise11Spec extends FlatSpec with Matchers { "simulateMachine" should "return the expected output" in { val m = Machine(true, 5, 10) val inputs = List(Coin, Turn, Coin, Turn, Coin, Turn, Coin, Turn) Candy.simulateMachine(inpu...
TheDom/functional-programming-in-scala
src/test/scala/com/dominikgruber/fpinscala/chapter06/Exercise11Spec.scala
Scala
mit
359
/*** * Copyright 2017 Rackspace US, 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 applica...
rackerlabs/api-checker
core/src/test/scala/com/rackspace/com/papi/components/checker/wadl/WADLCheckerAssertStepSpec.scala
Scala
apache-2.0
72,124
/* * 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 ...
mike0sv/spark
core/src/main/scala/org/apache/spark/internal/io/HadoopMapReduceCommitProtocol.scala
Scala
apache-2.0
6,760
package xitrum import io.netty.channel.{ChannelInitializer, EventLoopGroup} import io.netty.channel.socket.SocketChannel import io.netty.util.ResourceLeakDetector import xitrum.handler.{ Bootstrap, DefaultHttpChannelInitializer, FlashSocketPolicyServer, NetOption, SslChannelInitializer } import xitrum.metr...
georgeOsdDev/xitrum
src/main/scala/xitrum/Server.scala
Scala
mit
3,345
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright © 2012 Christian Krause * * ...
wookietreiber/ckit
client/swing/main/scala/Proxy.scala
Scala
gpl-3.0
6,612
package cmwell.analytics.util object StringUtil { /** * Split a string into lines. * Depending on the source, the delimiter can be \r or \n. * If the string contains \r, assume the delimiter is \r, otherwise it is \n */ def splitLines(x: String): Array[String] = { // Does the file use \r or \n...
bryaakov/CM-Well
tools/dataConsistencyTool/cmwell-spark-analysis/src/main/scala/cmwell/analytics/util/StringUtil.scala
Scala
apache-2.0
511
package com.wavesplatform.settings case class FeaturesSettings(autoShutdownOnUnsupportedFeature: Boolean, supported: List[Short] = List.empty)
wavesplatform/Waves
node/src/main/scala/com/wavesplatform/settings/FeaturesSettings.scala
Scala
mit
144
/* * 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 ...
bdrillard/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/SQLWindowFunctionSuite.scala
Scala
apache-2.0
15,016
package com.goticks import akka.actor.ActorSystem import akka.testkit.{ImplicitSender, TestKit} import org.scalatest.{MustMatchers, WordSpecLike} class TickerSellerSpec extends TestKit(ActorSystem("testTickets")) with WordSpecLike with MustMatchers ...
RayRoestenburg/akka-in-action
chapter-up-and-running/src/test/scala/com/goticks/TicketSellerSpec.scala
Scala
mit
2,220
package auth.models.services import java.time.{ Clock, Instant, ZoneId } import java.util.UUID import auth.models.AuthToken import auth.models.daos.AuthTokenDAO import org.specs2.control.NoLanguageFeatures import org.specs2.mock.Mockito import org.specs2.specification.Scope import play.api.test.PlaySpecification impo...
akkie/silhouette-play-react-seed
app-auth/src/test/scala/auth/models/services/AuthTokenServiceImplSpec.scala
Scala
mit
2,557
/* * 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
impl/src/main/scala/quasar/impl/storage/PureIndexedStore.scala
Scala
apache-2.0
1,414
package scala.quoted package runtime.impl.printers import scala.quoted._ object Extractors { def showTree(using Quotes)(tree: quotes.reflect.Tree): String = new ExtractorsPrinter[quotes.type]().visitTree(tree).result() def showType(using Quotes)(tpe: quotes.reflect.TypeRepr): String = new ExtractorsPrin...
dotty-staging/dotty
compiler/src/scala/quoted/runtime/impl/printers/Extractors.scala
Scala
apache-2.0
15,949
package no.digipost.labs.legacy import no.digipost.labs.{Settings, DigipostLabsStack} import no.digipost.labs.items.ItemsService import no.digipost.labs.errorhandling.ResponseHandler import no.digipost.labs.util.Logging import org.scalatra.{NotFound, MovedPermanently} class LegacyRedirectResource(settings: Settings, ...
digipost/labs
backend/src/main/scala/no/digipost/labs/legacy/LegacyRedirectResource.scala
Scala
apache-2.0
1,508
/* * 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 ...
sequenceiq/spark-native-yarn
src/main/scala/org/apache/spark/tez/io/TezRDD.scala
Scala
apache-2.0
2,008
package com.typesafe.config import org.akkajs.shocon trait ConfigValue extends ConfigMergeable { val inner: shocon.Config.Value def render(): String = inner.toString def valueType(): ConfigValueType = inner match { case _: shocon.Config.Object => ConfigValueType.OBJECT case _: shocon.Config.Array => Con...
unicredit/shocon
facade/shared/src/main/scala/com/typesafe/config/ConfigValue.scala
Scala
apache-2.0
616
package org.mlflow.spark.autologging import org.apache.spark.scheduler._ import org.apache.spark.sql.catalyst.plans.logical.{LeafNode, LogicalPlan} import org.apache.spark.sql.execution.ui.{SparkListenerSQLExecutionEnd, SparkListenerSQLExecutionStart} import org.apache.spark.sql.execution.{QueryExecution, SQLExecution...
mlflow/mlflow
mlflow/java/spark/src/main/scala/org/mlflow/spark/autologging/ReplAwareSparkDataSourceListener.scala
Scala
apache-2.0
2,094
package com.github.ldaniels528.trifecta.sjs.services import com.github.ldaniels528.trifecta.sjs.models.Query.QueryResultSet import com.github.ldaniels528.trifecta.sjs.models.{Message, Query} import com.github.ldaniels528.trifecta.sjs.services.QueryService._ import io.scalajs.npm.angularjs.Service import io.scalajs.npm...
ldaniels528/trifecta
app-js/src/main/scala/com/github/ldaniels528/trifecta/sjs/services/QueryService.scala
Scala
apache-2.0
1,540
/* * Copyright (c) 2015 Miles Sabin * * 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 agree...
TomasMikula/shapeless
core/src/main/scala/shapeless/test/typetrace.scala
Scala
apache-2.0
1,148
package 除法 trait Number1 { def method1(number2: Number2): Number3 } case class Number1S(tail: Number1) extends Number1 { override def method1(number2: Number2): Number3 = number2.method2(tail) } case class Number1T(tail: () => Number1) extends Number1 { override def method1(number2: Number2): Number3 = Number3S(...
djx314/ubw
a59-孔/src/main/scala/除法/Counter.scala
Scala
bsd-3-clause
759
package com.skn.measurement import org.scalatest.Tag /** * * Created by Sergey on 01.10.2016. */ object MeasurementTest extends Tag("com.skn.measurementTest") {}
AlexeyIvanov8/json-api-mapper
src/test/scala/com/skn/measurement/MeasurementTest.scala
Scala
gpl-3.0
165
package lensimpl.bench import java.io.{File, FileWriter} import java.time.LocalDateTime import org.jfree.chart.ChartUtilities import org.openjdk.jmh.runner.Runner import org.openjdk.jmh.runner.options.{ChainedOptionsBuilder, Options, OptionsBuilder} import scala.util.Properties.versionNumberString object Main { ...
julien-truffaut/LensImpl
bench/src/main/scala/lensimpl/bench/Main.scala
Scala
mit
2,135
package com.taig.tmpltr.engine.html import com.taig.tmpltr._ import play.api.mvc.Content class details( val attributes: Attributes, val content: Content ) extends markup.details with Tag.Body[details, Content] object details extends Tag.Body.Appliable[details, Content]
Taig/Play-Tmpltr
app/com/taig/tmpltr/engine/html/details.scala
Scala
mit
273
package org.shapelogic.sc.polygon import org.scalatest._ import scala.reflect.ClassTag import scala.specialized import spire.math.Numeric class CPointDoubleSpec extends FunSuite with BeforeAndAfterEach { val PI = scala.math.Pi test("testCreationVector") { val v0 = new CPointDouble() assertResult(v0.getX(...
sami-badawi/shapelogic-scala
src/test/scala/org/shapelogic/sc/polygon/CPointDoubleSpec.scala
Scala
mit
1,884
package org.pico.atomic.syntax.std import java.util.concurrent.atomic.AtomicLong import scala.annotation.tailrec package object atomicLong { implicit class AtomicLongOps_YYKh2cf(val self: AtomicLong) extends AnyVal { /** Repeatedly attempt to update the reference using the update function f * until the c...
pico-works/pico-atomic
pico-atomic/src/main/scala/org/pico/atomic/syntax/std/atomicLong/package.scala
Scala
bsd-3-clause
1,864
/* AkkaSupport.scala * * Copyright (c) 2013-2014 linkedin.com * Copyright (c) 2013-2015 zman.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/license...
zmanio/atmos
src/main/scala/atmos/dsl/AkkaSupport.scala
Scala
apache-2.0
2,240
import leon.annotation._ import leon.lang._ import leon.lang.synthesis._ object Addresses { case class Info( address: Int, zipcode: Int, phoneNumber: Int ) case class Address(info: Info, priv: Boolean) sealed abstract class List case class Cons(a: Address, tail:List) extends List case obj...
regb/leon
testcases/synthesis/oopsla2013/AddressBook/AddressesMergeAddressBooks.scala
Scala
gpl-3.0
2,265
package se.lu.nateko.cp.meta.services.upload import java.net.URI import org.eclipse.rdf4j.model.IRI import org.eclipse.rdf4j.model.vocabulary.RDF import org.eclipse.rdf4j.model.vocabulary.RDFS import se.lu.nateko.cp.meta.core.data._ import se.lu.nateko.cp.meta.icos.TcMetaSource import se.lu.nateko.cp.meta.instanceser...
ICOS-Carbon-Portal/meta
src/main/scala/se/lu/nateko/cp/meta/services/upload/CpmetaFetcher.scala
Scala
gpl-3.0
7,596
package entitytled.test.holywood import org.scalatest.Inspectors._ import org.scalatest.{FunSpec, Matchers} import scala.concurrent.ExecutionContext.Implicits.global class EntityActionBuilderSpec extends FunSpec with HolywoodSpec with Matchers { import driver.api._ rollback { for { spaceyID <- (stars...
RSSchermer/entitytled
test/src/test/scala/entitytled/test/holywood/EntityActionBuilderSpec.scala
Scala
mit
10,177
/* * Copyright 2016 Jason Mar * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
jasonmar/backend-rest-api-demo
src/main/scala/dynamodb/Items.scala
Scala
apache-2.0
7,211
package models.gitbucket import scalikejdbc._ case class WebHook( userName: String, repositoryName: String, url: String) { def save()(implicit session: DBSession = WebHook.autoSession): WebHook = WebHook.save(this)(session) def destroy()(implicit session: DBSession = WebHook.autoSession): Unit = WebHook.d...
thomaschoo/gitolite-to-gitbucket
src/main/scala/models/gitbucket/WebHook.scala
Scala
mit
3,338
package it.polimi.genomics.spark.implementation.MetaOperators import it.polimi.genomics.core.DataStructures.MetaAggregate.MetaAggregateFunction import it.polimi.genomics.core.DataStructures.MetaGroupByCondition.MetaGroupByCondition import it.polimi.genomics.core.DataStructures.{MetaOperator, RegionOperator} import it....
DEIB-GECO/GMQL
GMQL-Spark/src/main/scala/it/polimi/genomics/spark/implementation/MetaOperators/GroupMD.scala
Scala
apache-2.0
4,738
package scala.meta package tokens import scala.meta.internal.tokens._ import scala.meta.inputs._ import scala.meta.classifiers._ import scala.meta.prettyprinters._ import scala.meta.internal.prettyprinters._ // NOTE: `start` and `end` are String.substring-style, // i.e. `start` is inclusive and `end` is not. // There...
DavidDudson/scalameta
scalameta/tokens/shared/src/main/scala/scala/meta/tokens/Token.scala
Scala
bsd-3-clause
6,377
package io.bartholomews.spotify4s.circe import io.bartholomews.spotify4s.core.entities.{ ExternalResourceUrl, Followers, PublicUser, SpotifyImage, SpotifyUri, SpotifyUserId } import io.circe.{Decoder, HCursor} import sttp.model.Uri object CircePublicUser { implicit val decoder: Decoder[PublicUser] = (c:...
bartholomews/spotify-scala-client
modules/circe/src/main/scala/io/bartholomews/spotify4s/circe/CircePublicUser.scala
Scala
mit
914
package com.codingkapoor.pageselectionbykeyword.util import java.io.{ InputStream, FileInputStream } import com.codingkapoor.pageselectionbykeyword.model.{ Page, Query } class UserInputFileReader(fileName: Option[String]) { private val stream: InputStream = fileName match { case None => getClass().getResour...
codingkapoor/solve-for-x
scala/page-selection-by-keyword-matching-I/src/main/scala/com/codingkapoor/pageselectionbykeyword/util/UserInputFileReader.scala
Scala
mit
2,199
package org.jetbrains.plugins.scala package lang package psi package impl package toplevel package templates import com.intellij.lang.ASTNode import org.jetbrains.plugins.scala.lang.psi.api.base.types.ScTypeElement import org.jetbrains.plugins.scala.lang.psi.api.toplevel.templates._ import org.jetbrains.plugins.scala....
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/toplevel/templates/ScClassParentsImpl.scala
Scala
apache-2.0
1,414
package talos import scala.language.implicitConversions sealed trait Result { def &&(other: => Result): Result def ||(other: => Result): Result } object Result { implicit def fromBool(b: Boolean): Result = if (b) Success else Failure } case object Success extends Result { def &&(other: => Result) = other ...
daniel-uzunu/talos
core/src/main/scala/talos/ConstraintsValidator.scala
Scala
mit
2,382
package com.madgag.git.bfg.cli import com.madgag.git.bfg.model.FileName import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers class CLIConfigSpecs extends AnyFlatSpec with Matchers { def parse(args: String) = CLIConfig.parser.parse(args.split(' ') :+ "my-repo.git", CLIConfig()).g...
rtyley/bfg-repo-cleaner
bfg/src/test/scala/com/madgag/git/bfg/cli/CLIConfigSpecs.scala
Scala
gpl-3.0
1,404
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
pncampbell/ct-calculations
src/main/scala/uk/gov/hmrc/ct/computations/CP115.scala
Scala
apache-2.0
817
package sri.test.router import sri.core.ReactComponent import sri.test.components.Text import sri.web.all._ import sri.web.router import sri.web.router.{WebRoute, WebRouterComponent} import scala.scalajs.js import scala.scalajs.js.annotation.ScalaJSDefined import scala.scalajs.js.{JSON, UndefOr => U} import scala.uti...
hamazy/sri
test/src/main/scala/sri/test/router/DynamicStateScreen.scala
Scala
apache-2.0
1,009
package com.eevolution.context.dictionary.infrastructure.service import java.util.UUID import akka.NotUsed import com.eevolution.context.dictionary.domain._ import com.eevolution.context.dictionary.domain.model.ReportViewTrl import com.eevolution.utils.PaginatedSequence import com.lightbend.lagom.scaladsl.api.{Servic...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/service/ReportViewTrlService.scala
Scala
gpl-3.0
2,070
package tu.model.knowledge import java.util.Calendar import util.Random import org.slf4j.LoggerFactory import collection.mutable.ListBuffer /** * @author max talanov * Time: 11:19 PM */ abstract class Resource( _uri: KnowledgeURI, _probability: Probability = new Probability()) { KBMap.register(this...
keskival/2
model.knowledge/src/main/scala/tu/model/knowledge/Resource.scala
Scala
gpl-3.0
1,423
/* * Copyright (c) 2014-2018 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...
Wogan/monix
monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleFirstOperator.scala
Scala
apache-2.0
1,681
package loader.core import exceptions._ import loader.core.events.Event import scala.annotation.tailrec object definition { import scala.language.implicitConversions /** This serves as a base for Status. * In turn, Status is a class that serves as intermediary to build a child item from a parent ...
Y-P-/data-processing-binding
Core/src/loader/core/definition.scala
Scala
gpl-3.0
17,663
package org.hibernate.cache.rediscala.tests.jpa import javax.persistence.{EntityManager, PersistenceContext} import org.hibernate.cache.rediscala.tests.domain.Item import org.hibernate.cache.rediscala.tests.jpa.repository.{ItemRepository, EventRepository} import org.junit.runner.RunWith import org.junit.{Test, Before}...
debop/hibernate-rediscala
src/test/scala/org/hibernate/cache/rediscala/tests/jpa/JpaCacheTest.scala
Scala
apache-2.0
5,441
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
intel-analytics/BigDL
scala/dllib/src/test/scala/com/intel/analytics/bigdl/dllib/nn/ops/OneHotSpec.scala
Scala
apache-2.0
3,316
package shared.dto import java.time.ZonedDateTime case class ImageQA(id: Option[Long] = None, cardId: Long, imagePaths: List[String], created: ZonedDateTime, modified: ZonedDateTime )
Igorocky/readtext
shared/src/main/scala/shared/dto/ImageQA.scala
Scala
mit
286