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 example import org.scalajs.dom.html.Div import org.scalajs.dom.raw.Element import scala.scalajs.js import org.scalajs.dom import com.github.marklister.base64.Base64.Encoder object ScalaJSCode extends js.JSApp { def main(): Unit = { val kagan = getElementById[Div]("kagan-test") if (kagan != null) { ...
CapeSepias/psycho-test-framework
psycho-test-client/src/main/scala/example/ScalaJSCode.scala
Scala
mit
1,410
package org.panda.trees import org.scalatest._ // import org.scalacheck.{Gen, Arbitrary} // import org.scalacheck.Gen._ // import org.scalatest.prop.PropertyChecks class TreeTests extends FlatSpec with Matchers { private val tree1 = Leaf(1) private val tree2 = Branch(Leaf(1), Leaf(2)) private val tree3...
ChocPanda/FP-in-Scala
src/test/scala/org/panda/trees/Chapter3.3Test.scala
Scala
apache-2.0
2,373
package com.avsystem.commons.rpc import com.avsystem.commons.meta.{SymbolSource, TypedMetadata, multi, reifySource} import org.scalatest.funsuite.AnyFunSuite class Dummy { def thing(param: Int): String = "fuuu" } case class ClassSourceMetadata[T]( @reifySource source: SymbolSource, @encoded @multi @rpcMethodMe...
AVSystem/scala-commons
commons-core/src/test/scala/com/avsystem/commons/rpc/SymbolSourceTest.scala
Scala
mit
1,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 ...
ConeyLiu/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/types/DecimalSuite.scala
Scala
apache-2.0
11,763
/* * Copyright 2016 Oleg Morozenkov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
reo7sp/Face3dMatch
src/main/scala/ru/reo7sp/f3m/image/Color.scala
Scala
apache-2.0
8,763
package scalacheck.demo.counter import java.util.concurrent.{TimeUnit, CountDownLatch} import org.scalatest.concurrent.ScalaFutures import org.scalatest.tagobjects.Retryable import org.scalatest.{Retries, Assertions, FlatSpec, Matchers} import scala.concurrent.{Await, Future} import scala.concurrent.duration._ impor...
alinposho/test.props
scalacheck.demo/src/test/scala/scalacheck/demo/counter/PositiveCounterRaceConditionSpec.scala
Scala
apache-2.0
1,361
package coursier.params import coursier.core.Repository import coursier.ivy.IvyRepository import coursier.maven.MavenRepository import dataclass.data /** Assumes any tree with a prefix in `from` is mirrored under `to`. * * For example, if `from == Seq("https://a.com/artifacts", "https://artifacts.b.com")`, and `t...
alexarchambault/coursier
modules/coursier/shared/src/main/scala/coursier/params/TreeMirror.scala
Scala
apache-2.0
1,578
package com.socrata.spandex.secondary import com.typesafe.config.{ConfigFactory, Config} import com.socrata.spandex.common.SpandexConfig import com.socrata.spandex.common.client.{Eventually, RefreshPolicy, SpandexElasticSearchClient} class SpandexSecondary( override val client: SpandexElasticSearchClient, ov...
socrata-platform/spandex
spandex-secondary/src/main/scala/com.socrata.spandex.secondary/SpandexSecondary.scala
Scala
apache-2.0
1,316
package TAPLcomp.fulluntyped import scala.text.Document import scala.text.Document._ // outer means that the term is the top-level term object FullUntypedPrinter { import TAPLcomp.Print._ def ptmTerm(outer: Boolean, t: Term): Document = t match { case TmIf(t1, t2, t3) => val ifB = g2("if" :/: ptmTerm...
hy-zhang/parser
Scala/Parser/src/TAPLcomp/fulluntyped/syntax.scala
Scala
bsd-3-clause
2,200
/** Copyright 2015 TappingStone, 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 ...
ydanilenko/PredictionIO
core/src/main/scala/io/prediction/controller/CustomQuerySerializer.scala
Scala
apache-2.0
1,395
package org.moe import org.apache.commons.cli._; import org.moe.ast._ import org.moe.parser._ import org.moe.interpreter._ import org.moe.runtime._ import java.io.File import scala.io.Source object Moe { def main (args: Array[String]): Unit = { val parser: CommandLineParser = new PosixParser() val option...
MoeOrganization/moe
src/main/scala/org/moe/Moe.scala
Scala
mit
8,829
package com.github.mdr.mash.ns.http import com.github.mdr.mash.classes.{ AbstractObjectWrapper, Field, MashClass, NewStaticMethod } import com.github.mdr.mash.ns.core.StringClass import com.github.mdr.mash.runtime.MashValue object HeaderClass extends MashClass("http.Header") { object Fields { lazy val Name = F...
mdr/mash
src/main/scala/com/github/mdr/mash/ns/http/HeaderClass.scala
Scala
mit
899
package gitbucket.core.api /** * https://developer.github.com/v3/issues/comments/#create-a-comment * api form */ case class CreateAComment(body: String)
intermezzo-fr/gitbucket
src/main/scala/gitbucket/core/api/CreateAComment.scala
Scala
apache-2.0
157
package in.suhj.eridown.elements.block import in.suhj.eridown._ import in.suhj.eridown.core._ import in.suhj.eridown.elements.inline.TextGenerator import scala.collection.mutable.ListBuffer case class DefinitionList(children: List[Element]) extends Element { def render = s"<dl>${children.map(_.render).mkString}<...
raon0211/eridown
src/main/scala/in/suhj/eridown/elements/block/DefinitionList.scala
Scala
mit
1,667
/* * Copyright (C) 2014 - 2019 Dennis Vriend <https://github.com/dnvriend> * Copyright (C) 2019 - 2021 Lightbend Inc. <https://www.lightbend.com> */ package akka.persistence.jdbc.state import akka.annotation.InternalApi import akka.persistence.jdbc.config.DurableStateTableConfiguration /** * INTERNAL API */ @In...
dnvriend/akka-persistence-jdbc
core/src/main/scala/akka/persistence/jdbc/state/DurableStateTables.scala
Scala
apache-2.0
2,282
package lila.common case class ApiVersion(value: Int) extends AnyVal with IntValue { def v1 = value == 1 } case class MaxPerPage(value: Int) extends AnyVal with IntValue
clarkerubber/lila
modules/common/src/main/model.scala
Scala
agpl-3.0
174
package de.fosd.typechef.crefactor.evaluation.evalcases.openSSL.setup import de.fosd.typechef.crefactor.evaluation.setup.CModuleInterfaceGenerator import de.fosd.typechef.crefactor.evaluation.evalcases.openSSL.OpenSSLEvaluation object OpenSSLLinkModuleInterfaceGenerator extends OpenSSLEvaluation with CModuleInterface...
joliebig/Morpheus
src/main/scala/de/fosd/typechef/crefactor/evaluation/evalcases/openSSL/setup/OpenSSLLinkModuleInterfaceGenerator.scala
Scala
lgpl-3.0
334
package org.jetbrains.plugins.scala.lang.parser import org.jetbrains.annotations.PropertyKey import org.jetbrains.plugins.scala.ScalaBundle /** * @author ilyas */ object ErrMsg{ def apply(@PropertyKey(resourceBundle = "org.jetbrains.plugins.scala.ScalaBundle") msg: String): String = { ScalaBundle.message(msg) ...
gtache/intellij-lsp
intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/parser/ErrMsg.scala
Scala
apache-2.0
325
// Access from method of a transitive inner class package localhost class inner { val i = new innerClass val m = new i.mostInnerClass m.innerMethod() val v1 = 4 def m1() { println(v1) } class innerClass { class mostInnerClass { def innerMethod() { m1() } } } } // i...
pabzdzdzwiagief/initialization
src/test/resources/examples/positives/inner-method-nested.scala
Scala
bsd-2-clause
664
/**************************************************************** * Licensed to the AOS Community (AOS) under one or more * * contributor license agreements. See the NOTICE file * * distributed with this work for additional information * * regarding copyright ownership. The AOS licenses this...
xuzhikethinker/t4f-data
pubsub/camel/src/main/scala2/SectionE32.scala
Scala
apache-2.0
2,527
package com.github.tanacasino.time4s.wrappers.objects import java.time._ import java.time.temporal.TemporalAccessor import java.time.format.DateTimeFormatter object StaticLocalDateTime extends StaticLocalDateTime trait StaticLocalDateTime { def from(temporal: TemporalAccessor): LocalDateTime = LocalDateTime.fr...
tanacasino/time4s
src/main/scala/com/github/tanacasino/time4s/wrappers/objects/StaticLocalDateTime.scala
Scala
apache-2.0
2,151
/* * Copyright 2019 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/scio
scio-examples/src/test/scala/com/spotify/scio/examples/extra/WordCountOrchestrationTest.scala
Scala
apache-2.0
1,442
package org.scaladebugger.api.profiles.traits.requests.breakpoints import org.scaladebugger.api.lowlevel.JDIArgument import org.scaladebugger.api.lowlevel.breakpoints.BreakpointRequestInfo import org.scaladebugger.api.lowlevel.events.data.JDIEventDataResult import org.scaladebugger.api.pipelines.Pipeline.IdentityPipel...
ensime/scala-debugger
scala-debugger-api/src/main/scala/org/scaladebugger/api/profiles/traits/requests/breakpoints/BreakpointRequest.scala
Scala
apache-2.0
7,792
/** * This file is part of the TA Buddy project. * Copyright (c) 2014 Alexey Aksenov ezh@ezh.msk.ru * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Global License version 3 * as published by the Free Software Foundation with the addition of t...
digimead/digi-TABuddy-desktop
part-core-ui/src/main/scala/org/digimead/tabuddy/desktop/core/ui/operation/OperationWindowOpen.scala
Scala
agpl-3.0
7,086
/* * 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 ...
bravo-zhang/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/types/UserDefinedType.scala
Scala
apache-2.0
4,470
package org.hqjpa import scala.collection.JavaConverters._ import javax.persistence.criteria.CriteriaBuilder import javax.persistence.criteria.Subquery /** * Builder for nested SELECT queries. JPA only allows returning single expression * from nested SELECT query, which can be either a single entity, a single attri...
vejobrolis/hqjpa
hqjpa/src/org/hqjpa/SelectSubqueryBuilder.scala
Scala
lgpl-3.0
3,082
import scala.quoted.{Quotes, Expr, quotes} inline def assertTrue(cond: Boolean) = ${ assertTrueImpl('cond) } def assertTrueImpl(cond: Expr[Boolean])(using Quotes) = '{ if (!$cond) throw new Error(${'{""}}) }
dotty-staging/dotty
tests/run/splice-position/macros.scala
Scala
apache-2.0
214
/* * Copyright (c) 2012-2014 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...
artsy/snowplow
3-enrich/scala-common-enrich/src/test/scala/com.snowplowanalytics.snowplow.enrich.common/adapters/registry/MailchimpAdapterSpec.scala
Scala
apache-2.0
14,734
/* * 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 ...
Xpray/flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/stream/table/UnionITCase.scala
Scala
apache-2.0
4,801
/* * 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 ...
Dax1n/spark-core
core/src/main/scala/org/apache/spark/storage/MemoryStore.scala
Scala
apache-2.0
21,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 ...
bravo-zhang/spark
sql/core/src/test/scala/org/apache/spark/sql/sources/v2/DataSourceV2UtilsSuite.scala
Scala
apache-2.0
2,269
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-index-api/src/main/scala/org/locationtech/geomesa/index/index/z2/XZ2IndexKeySpace.scala
Scala
apache-2.0
6,280
package com.github.golem.command.game import com.github.golem.model.{Move, Put} import com.github.golem.command.{Informative, Command} case class MadeMove(move: Move) extends Command with Informative
pjarosik/golem
src/main/scala/com/github/golem/command/game/MadeMove.scala
Scala
gpl-2.0
202
package springnz.sparkplug.testkit import better.files._ import com.typesafe.scalalogging.LazyLogging import org.apache.spark.rdd.RDD import springnz.sparkplug.util.Logging object RDDPersister extends LazyLogging { def persistRDD[A]( tablePath: String, rdd: RDD[A], rddDestPartitions: Int = 10): RDD[A] = { ...
springnz/sparkplug
sparkplug-core/src/main/scala/springnz/sparkplug/testkit/RDDPersister.scala
Scala
mit
847
package graphics import java.awt.Color import java.awt.Graphics import java.util.List import structures._ /** Holder class for gravitational vectors effect. * @author Sean Lewis */ object GravityVectorsEffect { /** Draws the vectors from the ball. * @param level the current Level in the game * @param g ...
splewis/GravityGolf
src/main/scala/graphics/GravityVectorsEffect.scala
Scala
mit
1,150
/* * 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
sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/ShuffleExchangeExec.scala
Scala
apache-2.0
17,862
package editor import editor.gui.MainEditControl import editor.model.Model object GameEditor { def main(args: Array[String]) { val model = new Model val initializer = new Initializer(model) initializer.initializeModel initializer.extendModelTest new MainEditControl(model) } }
gregwk/clay-pot
Game_Editor/src/editor/GameEditor.scala
Scala
mit
305
/* Code Pulse: a real-time code coverage tool, for more information, see <http://code-pulse.com/> * * Copyright (C) 2014-2017 Code Dx, Inc. <https://codedx.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 ...
secdec/codepulse
hq/src/main/scala/com/secdec/bytefrog/hq/data/DataConnectionController.scala
Scala
apache-2.0
4,326
/* * 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 ...
Panos-Bletsos/spark-cost-model-optimizer
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala
Scala
apache-2.0
11,034
final class Mu[F](val value: Any) extends AnyVal { def cata(f: F): Unit = { // crash ((y: Mu[F]) => y.cata(f)) // crash def foo(x : Mu[F]) = x.cata(f) // // okay def x: Mu[F] = ??? (() => x.cata(f)) assert(true, cata(f)) } }
scala/scala
test/files/pos/t9050.scala
Scala
apache-2.0
262
import pl.project13.scala.sbt.JmhPlugin import sbt._ import sbt.Keys._ import sbtassembly.AssemblyKeys._ import sbtdocker.DockerKeys._ import sbtunidoc.Plugin._ import scoverage.ScoverageKeys._ object LinkerdBuild extends Base { import Base._ import Grpc._ val Bundle = config("bundle") val Dcos = config("dcos...
denverwilliams/linkerd
project/LinkerdBuild.scala
Scala
apache-2.0
24,689
package com.twitter.finagle.exception import java.net.{SocketAddress, InetSocketAddress, InetAddress} import org.apache.thrift.protocol.TBinaryProtocol import com.twitter.finagle.exception.thriftscala.{LogEntry, ResultCode, Scribe, Scribe$FinagleClient} import com.twitter.app.GlobalFlag import com.twitter.util.GZIPS...
kristofa/finagle
finagle-exception/src/main/scala/com/twitter/finagle/exception/Reporter.scala
Scala
apache-2.0
7,336
// File: ProcessGraph.scala // Author: Henry Feild // Date: 13-Aug-2014 // Copyright 2014 Henry Feild // License: Revised BSD -- see LICENSE in the root directory. package edu.umass.ciir.tqgraph import edu.umass.ciir.tqgraph.util.{ScalaFileIO,FileParser,FileIO,CommandLineIO} import scala.collection.mutable.Arr...
hafeild/term-query-graph
src/main/scala/edu/umass/ciir/tqgraph/ProcessGraph.scala
Scala
bsd-3-clause
6,800
package epic.util import java.util.concurrent.atomic.AtomicInteger import breeze.util.LazyLogger import org.slf4j.Logger /** * * * @author dlwh */ class ProgressLog(log: LazyLogger, items: Int, frequency: Int = 100, name: String = "Progress") { val initialTime = System.currentTimeMillis() val item = new Atom...
langkilde/epic
src/main/scala/epic/util/ProgressLog.scala
Scala
apache-2.0
1,038
/* * 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/monifu
monix-eval/shared/src/main/scala/monix/eval/tracing/TaskTrace.scala
Scala
apache-2.0
4,519
package edu.rice.habanero.benchmarks.banking import edu.rice.habanero.actors.{ScalazActor, ScalazActorState, ScalazPool} import edu.rice.habanero.benchmarks.banking.BankingConfig._ import edu.rice.habanero.benchmarks.{Benchmark, BenchmarkRunner, PseudoRandom} import scala.concurrent.Promise /** * * @author <a href...
shamsmahmood/savina
src/main/scala/edu/rice/habanero/benchmarks/banking/BankingScalazActorBenchmark.scala
Scala
gpl-2.0
3,778
// Generated by the Scala Plugin for the Protocol Buffer Compiler. // Do not edit! // // Protofile syntax: PROTO2 package com.google.protobuf.descriptor import _root_.scalapb.internal.compat.JavaConverters._ /** @param allowAlias * Set this option to true to allow mapping different tag names to the same * val...
trueaccord/ScalaPB
scalapb-runtime/src/main/scalajvm/com/google/protobuf/descriptor/EnumOptions.scala
Scala
apache-2.0
11,909
package mesosphere.marathon.event.http import akka.actor.{ Terminated, ActorSystem, Props } import akka.event.EventStream import akka.testkit._ import com.codahale.metrics.MetricRegistry import mesosphere.marathon.MarathonSpec import mesosphere.marathon.api.LeaderInfo import mesosphere.marathon.event.LocalLeadershipEv...
EasonYi/marathon
src/test/scala/mesosphere/marathon/event/http/HttpEventStreamActorTest.scala
Scala
apache-2.0
4,192
/* * Copyright (c) 2016 SnappyData, Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
vjr/snappydata
dtests/src/test/scala/io/snappydata/hydra/northwind/NWSparkTablesAndQueriesApp.scala
Scala
apache-2.0
8,261
/*********************************************************************** * Copyright (c) 2013-2018 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
ddseapy/geomesa
geomesa-lambda/geomesa-lambda-datastore/src/test/scala/org/locationtech/geomesa/lambda/LambdaTestRunnerTest.scala
Scala
apache-2.0
3,186
package com.evst.tvint.frontend import com.evst.tvint.testutil.Spec import com.evst.tvint.ast._ import com.evst.tvint.ast.WhenBlock import com.evst.tvint.ast.WordAstNode import com.evst.tvint.ast.ConditionAstNode import com.evst.tvint.ast.ThenBlock /** * User: EStankevich * Date: 24.05.2014 */ class TvintParserSpe...
stankevichevg/tvint
src/test/scala/com/evst/tvint/frontend/TvintParserSpec.scala
Scala
mit
3,095
package org.brijest.storm import org.github.scopt._ object StormEnroute { def main(args: Array[String]) { val config = new Config val parser = new ConfigParser(config) Initializer.default() if (parser.parse(args)) { val c = Initializer(config) c.awaitTermination() } ...
axel22/scala-2d-game-editor
src/main/scala/org/brijest/storm/StormEnroute.scala
Scala
bsd-3-clause
1,053
package org.rogach.scallop /* to test only this suite: sbt 'testOnly org.rogach.scallop.ComplexTests' */ class ComplexTests extends ScallopTestBase { test ("full example") { object Conf extends ScallopConf(List("-c","3","-E","fruit=apple","7.2")) { // all options that are applicable to builder (lik...
scallop/scallop
jvm/src/test/scala/ComplexTests.scala
Scala
mit
6,199
/** * 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...
eljefe6a/kafka
core/src/test/scala/unit/kafka/admin/AddPartitionsTest.scala
Scala
apache-2.0
8,993
package io.ics.disciple.dep import io.ics.disciple.injector.Injector import io.ics.disciple.util.Util._ import scala.collection.immutable.ListSet case class DepGraph private (map: Map[DepId, Dep[_]]) { override def toString = map.toString() def apply[R: TT]: R = getResult(TTId(typeOf[R])).asInstanceOf[R] def...
KORPSE/disciple
src/main/scala/io/ics/disciple/dep/DepGraph.scala
Scala
apache-2.0
1,523
/* * This is free and unencumbered software released into the public domain. * * Anyone is free to copy, modify, publish, use, compile, sell, or * distribute this software, either in source code form or as a compiled * binary, for any purpose, commercial or non-commercial, and by any * means. * * In jurisdictio...
adamcin/vltpack-maven-plugin
src/main/scala/net/adamcin/vltpack/CreatesPackage.scala
Scala
unlicense
7,434
package longRunning.feature.abelianMaps import org.scalatest.FunSuite import org.scalatest.Matchers import ilc.util.EvalGenerated import ilc.feature._ import ilc.feature.abelianGroups import ilc.feature.abelianMaps.AbelianDerivation import ilc.feature.abelianMaps.Library._ import ilc.feature.abelianMaps.MapChanges imp...
inc-lc/ilc-scala
clients/src/test/scala/longRunning/feature/abelianMaps/DeltaAbelianMapSuite.scala
Scala
mit
2,319
package org.json4s trait AsJsonInputInstances { self: AsJsonInput.type => }
json4s/json4s
ast/js/src/main/scala/org/json4s/AsJsonInputInstances.scala
Scala
apache-2.0
77
/* * Copyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries. * * 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://w...
sdl/odata
odata_parser/src/main/scala/com/sdl/odata/parser/LiteralsParser.scala
Scala
apache-2.0
5,722
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.it.http.parsing import akka.stream.Materializer import akka.stream.scaladsl.Source import akka.util.ByteString import play.api.Application import play.api.libs.json.{ JsError, JsValue, Json } import play.api.mvc.Results.BadReques...
Shruti9520/playframework
framework/src/play-integration-test/src/test/scala/play/it/http/parsing/JsonBodyParserSpec.scala
Scala
apache-2.0
4,208
/* * 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/CP84.scala
Scala
apache-2.0
1,134
package com.github.libsml.math.function /** * Created by huangyu on 15/7/25. */ object FunctionTest { def main (args: Array[String]) { } }
libsml/libsml
core/src/test/scala/com/github/libsml/math/function/FunctionTest.scala
Scala
apache-2.0
150
package ru.maizy.ambient7.core.data /** * Copyright (c) Nikita Kovaliov, maizy.ru, 2017 * See LICENSE.txt for details. */ object DeviceType extends Enumeration { type Type = Value val CO2 = Value }
maizy/ambient7
core/src/main/scala/ru/maizy/ambient7/core/data/DeviceType.scala
Scala
apache-2.0
207
/* * Copyright (c) 2015-6 Alexandre Archambault * * 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...
lambdista/shapeless
core/src/test/scala/shapeless/annotation.scala
Scala
apache-2.0
5,206
package com.sksamuel.elastic4s import org.scalatest.{ Matchers, FlatSpec, OneInstancePerTest } import org.scalatest.mock.MockitoSugar import ElasticDsl._ import org.elasticsearch.common.xcontent.XContentBuilder import java.util.{ Calendar, GregorianCalendar, Date } import java.text.SimpleDateFormat /** @author Stephe...
alexander-svendsen/elastic4s
elastic4s-core/src/test/scala/com/sksamuel/elastic4s/IndexDslTest.scala
Scala
apache-2.0
7,770
package com.basho.riak.stub import java.nio.ByteBuffer import java.util import com.basho.riak.client.core.RiakMessage import com.basho.riak.client.core.netty.RiakMessageCodec import io.netty.buffer.Unpooled import scala.collection.JavaConversions._ object RiakMessageEncoder extends RiakMessageCodec { def encode(...
basho/spark-riak-connector
test-utils/src/main/scala/com/basho/riak/stub/RiakMessageEncoder.scala
Scala
apache-2.0
880
package com.rasterfoundry.database import com.rasterfoundry.common.S3 import com.rasterfoundry.database.Implicits._ import com.rasterfoundry.datamodel._ import com.rasterfoundry.datamodel.{Order, PageRequest} import cats.implicits._ import com.amazonaws.services.s3.model.{CannedAccessControlList, ObjectMetadata} impo...
raster-foundry/raster-foundry
app-backend/db/src/main/scala/OrganizationDao.scala
Scala
apache-2.0
11,364
/* * Copyright (C) 2005, The Beangle Software. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This...
beangle/ids
cas/src/main/scala/org/beangle/ids/cas/web/helper/GmailEngine.scala
Scala
lgpl-3.0
2,958
package com.zobot.client.packet.definitions.serverbound.play import com.zobot.client.packet.Packet case class PlayerBlockPlacement(location: Any, face: Int, hand: Int, cursorPositionX: Any, cursorPositionY: Any, cursorPositionZ: Any) extends Packet { override lazy val packetId = 0x1F override lazy val packetData...
BecauseNoReason/zobot
src/main/scala/com/zobot/client/packet/definitions/serverbound/play/PlayerBlockPlacement.scala
Scala
mit
504
/* * 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 ...
zzcclp/carbondata
integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/partition/TestUpdateForPartitionTable.scala
Scala
apache-2.0
1,679
package ch.megard.akka.http.cors.scaladsl.model import java.util.Locale import ch.megard.akka.http.cors.javadsl import scala.collection.immutable.Seq abstract class HttpHeaderRange extends javadsl.model.HttpHeaderRange object HttpHeaderRange { case object `*` extends HttpHeaderRange { def matches(header: Str...
lomigmegard/akka-http-cors
akka-http-cors/src/main/scala/ch/megard/akka/http/cors/scaladsl/model/HttpHeaderRange.scala
Scala
apache-2.0
670
// Copyright (c) 2016 PSForever.net to present package net.psforever.types import net.psforever.packet.PacketHelpers import scodec.codecs._ /** * ChatMessageTypes were reversed by: * Checking the type in the packet upon receipt by server while using slash commands * Replaying the ChatMsg packet back to the send...
Fate-JH/PSF-Server
common/src/main/scala/net/psforever/types/ChatMessageType.scala
Scala
gpl-3.0
18,934
// // Taranos Cloud Sonification Framework: Service Core // Copyright (C) 2018 David Hinson, Netrogen Blue LLC (dhinson@netrogenblue.com) // // This program 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 F...
taranos/taranoscsf-core
src/main/scala/org/taranos/mc/field/FieldElement.scala
Scala
agpl-3.0
14,019
package com.bot4s.telegram.models import com.bot4s.telegram.models.Currency.Currency /** * This object contains basic information about an invoice. * * @param title String Product name * @param description String Product description * @param startParameter String Unique bot deep-linking parameter tha...
mukel/telegrambot4s
core/src/com/bot4s/telegram/models/Invoice.scala
Scala
apache-2.0
878
class Test { class A[T] class B[T](val a: A[T]) case class CaseClass[T](x: T) def break(existB: B[_]) = CaseClass(existB.a) match { case CaseClass(_) => } } class Foo { trait Init[T] class ScopedKey[T] extends Init[T] trait Setting[T] { val key: ScopedKey[T] } case class ScopedKey1[T](val...
loskutov/intellij-scala
testdata/scalacTests/pos/t5399.scala
Scala
apache-2.0
916
/* * Copyright 2016 David R. Bild * * 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 t...
drbild/tristate
tristate-play/src/main/scala/org/davidbild/tristate/contrib/play/Tristate.scala
Scala
apache-2.0
2,680
package quickcheck import common._ import org.scalacheck._ import Arbitrary._ import Gen._ import Prop._ abstract class QuickCheckHeap extends Properties("Heap") with IntHeap { property("min1") = forAll { a: Int => val h = insert(a, empty) findMin(h) == a } lazy val genHeap: Gen[H] = ??? implicit ...
vasnake/Principles-of-Reactive-Programming
w1/quickcheck/src/main/scala/quickcheck/QuickCheck.scala
Scala
gpl-3.0
375
package actors import akka.actor.Actor import akka.actor.ActorLogging import akka.event.LoggingReceive import play.api.libs.json.JsValue import play.api.libs.json.Json import akka.actor.ActorRef import akka.actor.Props import scala.xml.Utility class UserActor(uid: String, board: ActorRef, out: ActorRef) extends Acto...
rumoku/chat-service
app/actors/UserActor.scala
Scala
apache-2.0
865
package fyrie import net.fyrie.redis._ import akka.actor.{ ActorSystem, Actor, Props, ActorRef } import akka.bita.{ RandomScheduleHelper, Scheduler } import akka.bita.pattern.Patterns._ import akka.util.duration._ import akka.util.Timeout import akka.dispatch.Await import bita.util.{ FileHelper, TestHelper } import...
Tjoene/thesis
benchmark/src/test/scala/fyrie/AsyncZrankSpecSpec.scala
Scala
gpl-2.0
3,285
package net.spals.appbuilder.message.kinesis.consumer import com.amazonaws.services.kinesis.clientlibrary.interfaces.v2.IRecordProcessor import com.amazonaws.services.kinesis.clientlibrary.lib.worker.ShutdownReason import com.amazonaws.services.kinesis.clientlibrary.types.{InitializationInput, ProcessRecordsInput, Shu...
timkral/appbuilder
message-kinesis/src/main/scala/net/spals/appbuilder/message/kinesis/consumer/KinesisConsumerRecordProcessor.scala
Scala
bsd-3-clause
2,403
package com.tirthal.learning.scala.features import java.util.Calendar // map and flatMap function usage and syntax in Scala object MapAndFlapmapFunctions extends App { // function calculates an age for the provided birth year def age(birthYear: Int) = { Calendar.getInstance.get(Calendar.YEAR) - birthYear ...
tirthalpatel/Learning-Scala
ScalaQuickStart/src/main/scala/com/tirthal/learning/scala/features/MapAndFlapmapFunctions.scala
Scala
mit
757
package uk.gov.gds.ier.validation.constraints import uk.gov.gds.ier.validation.{ErrorMessages, Key} import play.api.data.validation.{Invalid, Valid, Constraint} import play.api.data.Mapping import play.api.data.Forms._ import uk.gov.gds.ier.validation.Key trait CommonConstraints extends ErrorMessages { val Invalid...
michaeldfallen/ier-frontend
app/uk/gov/gds/ier/validation/constraints/CommonConstraints.scala
Scala
mit
1,495
package com.hunorkovacs.koauthsampleplay.domain.mapper import com.hunorkovacs.koauth.domain.{ResponseBadRequest, ResponseUnauthorized, ResponseOk, KoauthResponse} import com.hunorkovacs.koauth.domain.mapper.ResponseMapper import play.api.mvc.Result import play.api.mvc.Results._ import scala.concurrent.{ExecutionConte...
zhangyoumeng/koauth-sample-play
app/com/hunorkovacs/koauthsampleplay/domain/mapper/PlayResponseMapper.scala
Scala
apache-2.0
768
package com.eharmony.aloha class AlohaException(message: String, cause: Throwable) extends RuntimeException(message, cause) { def this() = this(null, null) def this(message: String) = this(message, null) def this(cause: Throwable) = this(null, cause) }
eHarmony/aloha
aloha-core/src/main/scala/com/eharmony/aloha/AlohaException.scala
Scala
mit
266
/* * Copyright (C) 2014 - 2019 Dennis Vriend <https://github.com/dnvriend> * Copyright (C) 2019 - 2021 Lightbend Inc. <https://www.lightbend.com> */ package akka.persistence.jdbc.journal.dao.legacy import akka.persistence.jdbc.journal.dao.{ BaseDao, BaseJournalDaoWithReadMessages, H2Compat, JournalDaoWithUpdates }...
dnvriend/akka-persistence-jdbc
core/src/main/scala/akka/persistence/jdbc/journal/dao/legacy/ByteArrayJournalDao.scala
Scala
apache-2.0
6,145
/* * 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 ...
Huyuwei/tvm
vta/hardware/chisel/src/test/scala/unittest/AluTest.scala
Scala
apache-2.0
3,093
/* * 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...
psyyz10/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/nn/BatchNormalizationSpec.scala
Scala
apache-2.0
4,741
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala package util.par...
scala/scala-parser-combinators
shared/src/main/scala/scala/util/parsing/input/Positional.scala
Scala
apache-2.0
744
package dst.solr case class SolrIndex( host: String, name: String, port: Int = 8983 )
Destination/lib-dst-solr
app/SolrIndex.scala
Scala
mit
93
/* Title: Pure/Concurrent/standard_thread.scala Author: Makarius Standard thread operations. */ package isabelle import java.lang.Thread import java.util.concurrent.{ExecutorService, ThreadPoolExecutor, TimeUnit, LinkedBlockingQueue, ThreadFactory} object Standard_Thread { /* fork */ def fork(n...
larsrh/libisabelle
modules/pide/2017/src/main/scala/Concurrent/standard_thread.scala
Scala
apache-2.0
2,287
package me.rjfarmer.rlh.eve import jawn.ast.{JObject, JValue} import scala.annotation.tailrec object PimpedJValue { implicit def apply(jv: JValue): PimpedJValue = new PimpedJValue(jv) } /** * Improved JValue object. * * @param jv jvalue */ class PimpedJValue(jv: JValue) { /** recursive get */ def recge...
random-j-farmer/little-helper
app/jvm/src/main/scala/me/rjfarmer/rlh/eve/PimpedJValue.scala
Scala
mit
963
package controllers import org.specs2.mutable.Specification import play.api.test._ import play.api.test.Helpers._ import play.api.i18n.Messages import play.api.test.FakeRequest$ import org.squeryl.PrimitiveTypeMode.transaction import helpers.CmsMessages import org.specs2.matcher.DataTables import securesocial.core.Sec...
lukaszbudnik/hackaton-portal
test/controllers/HackathonSpec.scala
Scala
apache-2.0
6,356
package verdandi.ui.swing import scala.swing.BorderPanel import verdandi.model.DefaultListener class RichBorderPanel extends BorderPanel with DefaultListener { def getPeer() = peer.asInstanceOf[javax.swing.JPanel] }
osebelin/verdandi
src/main/scala/verdandi/ui/swing/RichBorderPanel.scala
Scala
gpl-3.0
219
/* * Copyright (c) 2014, Brook 'redattack34' Heisler * 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, t...
Redattack34/ModularRayguns
src/main/scala/com/castlebravostudios/rayguns/items/recipes/RecipeLibrary.scala
Scala
bsd-3-clause
6,100
package io.github.hbase4s import io.github.hbase4s.utils.HBaseImplicitUtils._ import shapeless.ops.traversable.FromTraversable import shapeless.{Generic, HList} import scala.reflect.runtime.universe._ /** * Created by Volodymyr.Glushak on 19/05/2017. */ object RecordFactory { def classAccessors[T: TypeTag]: ...
hbase4s/hbase4s
src/main/scala/io/github/hbase4s/RecordFactory.scala
Scala
mit
2,464
package ee.cone.c4assemble import ee.cone.c4assemble.Types.{DMap, Index, emptyIndex} import scala.concurrent.{ExecutionContext, Future} class IndexUpdaterImpl(readModelUtil: ReadModelUtil) extends IndexUpdater { def setPart(worldKey: AssembledKey, update: Future[IndexUpdate], logTask: Boolean): WorldTransition⇒Wor...
wregs/c4proto
c4assemble-runtime/src/main/scala/ee/cone/c4assemble/IndexUpdaterImpl.scala
Scala
apache-2.0
2,141
package gsd.linux import org.scalatest.junit.AssertionsForJUnit import org.junit.Test import stats.ASEStatistics class KConfigTest extends AssertionsForJUnit { @Test def defaultStrings { val in = """ config IFUPDOWN_UDHCPC_CMD_OPTIONS string { prompt "ifup udhcpc command line options" if [IFUPDO...
AlexanderKnueppel/is-there-a-mismatch
Source/KConfigTranslator/src/test/scala/gsd/linux/KConfigTest.scala
Scala
lgpl-3.0
2,149
package edu.umass.ciir.strepsi /** * Tools to generate histogram counts from streams * User: dietz * Date: 12/17/12 * Time: 2:40 PM */ class ScoringTable[Item] extends scala.collection.mutable.HashMap[Item, Double] { def slurp(text: Iterable[(Item,Double)]) { for (t <- text) { add(t._1, t._2) } ...
laura-dietz/strepsi-tools
src/main/scala/edu/umass/ciir/strepsi/ScoringTable.scala
Scala
apache-2.0
734
/* * ____ ____ _____ ____ ___ ____ * | _ \\ | _ \\ | ____| / ___| / _/ / ___| Precog (R) * | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data * | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, In...
precog/platform
util/src/main/scala/com/precog/util/Loop.scala
Scala
agpl-3.0
1,739
/* * Copyright 2015 the original author or authors. * @https://github.com/scouter-project/scouter * * 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/...
scouter-project/scouter
scouter.server/src/main/scala/scouter/server/db/obj/ObjectData.scala
Scala
apache-2.0
2,691