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
/* * 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/test/scala/com/sdl/odata/parser/ResourcePathParsersTest.scala
Scala
apache-2.0
6,562
/* * Copyright 2021 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/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600ei/v3/DIT002.scala
Scala
apache-2.0
1,178
package org.eso.ias.dasu import java.util.concurrent.atomic.{AtomicBoolean, AtomicLong, AtomicReference} import java.util.concurrent.{ScheduledFuture, TimeUnit} import java.util.{HashMap, Properties} import org.eso.ias.asce.{AsceStates, ComputingElement} import org.eso.ias.cdb.pojos.{AsceDao, DasuDao} import org.eso....
IntegratedAlarmSystem-Group/ias
DistributedUnit/src/main/scala/org/eso/ias/dasu/DasuImpl.scala
Scala
lgpl-3.0
23,794
package com.twitter.finagle.loadbalancer.p2c import com.twitter.finagle.Status import com.twitter.finagle.util.Rng import com.twitter.finagle.loadbalancer.NodeT /** * A helper that uses the ideas behind the "power of 2 choices" * [1] to select two nodes from the underlying vector. * * [1] Michael Mitzenmacher. 20...
twitter/finagle
finagle-core/src/main/scala/com/twitter/finagle/loadbalancer/p2c/P2CPick.scala
Scala
apache-2.0
1,986
/* * 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 ma...
harperjiang/enc-selector
src/test/scala/edu/uchicago/cs/encsel/encoding/BitVectorEncodingTest.scala
Scala
apache-2.0
2,430
package ru.org.codingteam.horta.protocol.jabber import akka.actor.ActorRef import akka.event.LoggingAdapter import org.jivesoftware.smack.PacketListener import org.jivesoftware.smack.packet.{Message, Packet} import ru.org.codingteam.horta.messages.UserMessage class MucMessageListener(val jid: String, val roomActor: A...
codingteam/horta-hell
src/main/scala/ru/org/codingteam/horta/protocol/jabber/MucMessageListener.scala
Scala
mit
698
package org.crudible.lift.binding.control import org.crudible.lift.binding.model.LiftControl import org.crudible.lift.util.SUtils import org.crudible.lift.binding.markup.LiftRadioBooleanMarkup import net.liftweb.common.Box import org.crudible.core.binding.BindingSupport import org.crudible.core.binding.model.RadioBool...
rehei/crudible
crudible-lift/src/main/scala/org/crudible/lift/binding/control/LiftRadioBooleanControl.scala
Scala
apache-2.0
877
/* * 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/db
report/src/main/scala/org/beangle/db/report/model/TableContainer.scala
Scala
gpl-3.0
1,853
/* * 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 ...
practice-vishnoi/dev-spark-1
mllib/src/test/scala/org/apache/spark/mllib/feature/Word2VecSuite.scala
Scala
apache-2.0
3,272
/* * 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
cluster/src/dunit/scala/org/apache/spark/jdbc/ConnectionConfDUnitTest.scala
Scala
apache-2.0
1,854
package ddl import scala.reflect.macros._ import scala.language.experimental.macros import scala.annotation.StaticAnnotation class Schema extends StaticAnnotation { def macroTransform(annottees: Any*): Any = macro TableMacros.schema } object TableMacros extends ReflectionUtils { def check(t: Table): Unit = macro...
davidhoyt/scala-macro-experiments
dsl-macros/src/main/scala/ddl/TableMacros.scala
Scala
mit
4,654
/* * LKTest.scala * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ package at.logic.gapt.proofs.lk import at.logic.gapt.expr._ import at.logic.gapt.expr.hol._ import at.logic.gapt.proofs.lk.base._ import at.logic.gapt.proofs.lk.{ Axiom => LKAxiom } import at....
loewenheim/gapt
src/test/scala/at/logic/gapt/proofs/lk/LKToLKskc.scala
Scala
gpl-3.0
2,353
/* * Copyright 2014–2018 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...
jedesah/Quasar
mimir/src/main/scala/quasar/mimir/TypeLib.scala
Scala
apache-2.0
2,397
import sbt._ object Dependencies { object Version { val akka = "2.4.17" val macWire = "2.3.0" } lazy val frontend = common ++ webjars ++ logging ++ circe ++ tests lazy val backend = common ++ metrics ++ tests val circeVersion = "0.8.0" val circe = Seq( "io.circe" %% "circe-core", "io.ci...
coding-jam/lagioconda
project/dependencies.scala
Scala
apache-2.0
1,585
package org.jetbrains.plugins.scala.lang.psi.types.api import org.jetbrains.plugins.scala.lang.psi.types.ScType /** * @author adkozlov */ trait Bounds extends TypeSystemOwner { def glb(first: ScType, second: ScType, checkWeak: Boolean = false): ScType def glb(types: Seq[ScType], checkWeak: Boolean): ScType ...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/types/api/Bounds.scala
Scala
apache-2.0
458
package lila.importer import com.typesafe.config.Config import lila.common.PimpedConfig._ final class Env( config: Config, scheduler: akka.actor.Scheduler, roundMap: akka.actor.ActorRef) { private val Delay = config duration "delay" lazy val forms = new DataForm lazy val importer = new Importer(...
r0k3/lila
modules/importer/src/main/Env.scala
Scala
mit
571
/* * 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/test/scala/org/apache/spark/sql/FileBasedDataSourceSuite.scala
Scala
apache-2.0
40,404
/* * Copyright 2017-2022 John Snow Labs * * 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...
JohnSnowLabs/spark-nlp
src/test/scala/com/johnsnowlabs/nlp/embeddings/DistilBertEmbeddingsTestSpec.scala
Scala
apache-2.0
5,459
package com.dataintuitive.luciuscore package api import scala.collection.immutable.Map import org.apache.spark.sql.Dataset import org.apache.spark.sql.SparkSession import genes.GenesDB import utilities.SignedString import model.v4._ object Statistics extends ApiFunctionTrait { case class SpecificData() type J...
data-intuitive/LuciusCore
src/main/scala/com/dataintuitive/luciuscore/api/Statistics.scala
Scala
apache-2.0
2,562
/* * 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/iht-frontend
app/iht/controllers/application/exemptions/partner/PartnerDateOfBirthController.scala
Scala
apache-2.0
4,072
package sms.quotes.actor import sms.core.actor.{SMSWorkerActorCompanion, SMSMasterActor, SMSMasterActorCompanion, SMSActorCompanion} import akka.actor.{Actor, Props} object MetricsMasterActor extends SMSMasterActorCompanion with QuotesRole { val definedActorName: String = "metrics-parser-actor" def singletonProp...
kjanosz/stock-market-sherlock
quotes-parser/src/main/scala/sms/quotes/actor/MetricsMasterActor.scala
Scala
apache-2.0
677
package scala package reflect package internal import Flags._ import util._ import scala.collection.mutable.ListBuffer abstract class TreeGen { val global: SymbolTable import global._ import definitions._ def rootId(name: Name) = Select(Ident(nme.ROOTPKG), name) def rootScalaDot(name: Name) ...
felixmulder/scala
src/reflect/scala/reflect/internal/TreeGen.scala
Scala
bsd-3-clause
38,992
package com.wavesplatform.lang.v1 import cats.Id package object task { type TaskM[S, E, R] = TaskMT[Id, S, E, R] }
wavesplatform/Waves
lang/shared/src/main/scala/com/wavesplatform/lang/v1/task/package.scala
Scala
mit
119
/* * 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...
zhangxiaoli73/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/integration/torch/DenseTensorMathSpec.scala
Scala
apache-2.0
14,011
/* * 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/util/SparkUncaughtExceptionHandler.scala
Scala
apache-2.0
2,027
package ca.dubey.music.midi.event abstract class NoteEvent { val tick : Long val key : Int override def toString : String = "" val id : String } case class NoteOn(val tick : Long, val key : Int, val velocity : Int) extends NoteEvent { override def toString : String = if (velocity > 0) { "N(%d,%d)".format(ti...
adubey/music
src/main/scala/midi/event/NoteEvent.scala
Scala
gpl-2.0
557
package com.reactific.jfxtend.scene import javafx.beans.property.ObjectProperty import javafx.collections.{FXCollections, ObservableList} import javafx.event.EventHandler import javafx.geometry.NodeOrientation import javafx.scene.input._ import javafx.scene.paint.Paint import javafx.scene._ import javafx.stage.Window ...
reactific/jfxtensions
src/main/scala/com/reactific/jfxtend/scene/SceneExtensions.scala
Scala
apache-2.0
9,000
/* * This file is part of the "silex" library of helpers for Apache Spark. * * Copyright (c) 2015 Red Hat, 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....
jyt109/silex
src/test/scala/com/redhat/et/silex/scalatest/matchers/matchers.scala
Scala
apache-2.0
1,254
package org.broadinstitute.dsde.workbench.sam.db import cats.effect.{ContextShift, IO, Resource} import com.google.common.base.Throwables import com.typesafe.scalalogging.LazyLogging import io.opencensus.trace.AttributeValue import liquibase.database.jvm.JdbcConnection import liquibase.resource.{ClassLoaderResourceAcc...
broadinstitute/sam
src/main/scala/org/broadinstitute/dsde/workbench/sam/db/DbReference.scala
Scala
bsd-3-clause
5,008
package org.opencompare.api.scala class FeatureGroup extends AbstractFeature { private var _subFeatures : Set[AbstractFeature] = Set.empty[AbstractFeature] def subFeatures : Set[AbstractFeature] = _subFeatures def subFeatures_= (value : Set[AbstractFeature]) = { _subFeatures = value _subFeatures.foreac...
OpenCompare/OpenCompare
org.opencompare/api-scala/src/main/scala/org/opencompare/api/scala/FeatureGroup.scala
Scala
apache-2.0
1,126
/** * Copyright (C) 2017 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 p...
brunobuzzi/orbeon-forms
form-runner/jvm/src/main/scala/org/orbeon/oxf/fr/FormRunnerPublish.scala
Scala
lgpl-2.1
2,618
/* ___ ____ ___ __ ___ ___ ** / _// __// _ | / / / _ | / _ \\ Scala classfile decoder ** __\\ \\/ /__/ __ |/ /__/ __ |/ ___/ (c) 2003-2010, LAMP/EPFL ** /____/\\___/_/ |_/____/_/ |_/_/ http://scala-lang.org/ ** */ package scala.tools.scalap package scalax package rules package scalasig import j...
SergeevPavel/intellij-scala
scalap/src/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala
Scala
apache-2.0
28,776
package object stalepkg { class Foo } package stalepkg { object Test { def main(args: Array[String]) { } } }
loskutov/intellij-scala
testdata/scalacTests/pos/t5760-pkgobj-warn/stalepkg_1.scala
Scala
apache-2.0
125
/* * 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...
zhangxiaoli73/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/integration/torch/SpatialCrossMapLRNSpec.scala
Scala
apache-2.0
5,250
import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers import ru.makkarpov.scalingua.{LanguageId, Messages, Language} import ru.makkarpov.scalingua.I18n._ class Test extends AnyFlatSpec with Matchers { implicit val messages = Messages.compiled("ru.makkarpov") implicit val languageI...
makkarpov/scalingua
sbt-plugin/src/sbt-test/main/implicit-context/src/test/scala/Test.scala
Scala
apache-2.0
1,908
/* * 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 ...
pronix/spark
core/src/main/scala/org/apache/spark/api/java/JavaSparkContext.scala
Scala
apache-2.0
35,292
class ContraCo[-T, +S](val t: S) class CoContra[+T, -S](val t: T) object Test { def unwrap[Outer](inv: CoContra[Outer, Outer]): Outer = inv.t def wrap[Inner](i: Inner): CoContra[Inner, Inner] = new CoContra(i) val a = unwrap({ class Local val local = new Local wrap(local) }) }
lampepfl/dotty
tests/pos/i8900a2.scala
Scala
apache-2.0
299
// Scala-atb // // This software is distributed under The MIT License (MIT): // // Copyright (c) 2013 Craig Eales // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, in...
ceales/scala-atb
src/main/scala/atb/tribool/LukasiewiczTriBoolean.scala
Scala
mit
4,468
import sbt._ import Keys._ import org.scalatra.sbt._ import org.scalatra.sbt.PluginKeys._ import com.mojolly.scalate.ScalatePlugin._ import ScalateKeys._ import com.earldouglas.xsbtwebplugin.PluginKeys._ import com.earldouglas.xsbtwebplugin.WebPlugin._ object MetaHathiBuild extends Build { val Organization = "org.mi...
umd-mith/metaHathi
project/build.scala
Scala
apache-2.0
2,682
/* * OpenVC, an open source VHDL compiler/simulator * Copyright (C) 2010 Christian Reisinger * * This program 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 ...
chrreisinger/OpenVC
src/main/scala/at/jku/ssw/openvc/CompilationUnit.scala
Scala
gpl-3.0
5,453
package org.clulab.struct import java.io.{Reader, Writer} import java.text.DecimalFormat import scala.collection.breakOut import scala.collection.mutable import scala.math.Ordering.{ Double => DoubleSortOrder } import org.clulab.utils.Files /** * Counts elements of type T * User: mihais * Date: 3/18/13 */ class...
sistanlp/processors
main/src/main/scala/org/clulab/struct/Counter.scala
Scala
apache-2.0
8,924
/* * 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 ...
rmetzger/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/nodes/CommonPythonBase.scala
Scala
apache-2.0
5,393
/* * 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
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/CentralMomentAgg.scala
Scala
apache-2.0
10,846
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
brad-kaiser/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetTest.scala
Scala
apache-2.0
7,090
package mr.merc.map.hex.view import mr.merc.conf.Conf import scalafx.scene.canvas.GraphicsContext import mr.merc.image.MImage import mr.merc.map.hex.Direction.{N, NE} import mr.merc.map.hex._ import mr.merc.map.objects.view.MapObjectView import scalafx.scene.paint.Color import scalafx.scene.text.{Font, FontSmoothingTy...
RenualdMarch/merc
src/main/scala/mr/merc/map/hex/view/TerrainHexView.scala
Scala
gpl-3.0
17,730
//package fbSpark // //import org.apache.spark.SparkConf //import org.apache.spark.SparkContext //import org.apache.spark.sql.DataFrame //import org.apache.spark.sql.SQLContext // //object Run { // // def main(args:Array[String]): Unit = { // // val sparkConf: SparkConf = Common.getSparkConf("FB_SPARK") // val spark...
PredictionIO/open-academy
HayleySong/src/main/scala/fbSpark/Run.scala
Scala
apache-2.0
627
package com.crackcell.jiezi.segment import com.crackcell.jiezi.domain.Result /** * N最短路径分词 * * @author Menglong TAN */ class NShortSegment extends Segment { override def parse(query: String): Result = null }
crackcell/jiezi
core/src/main/scala/com/crackcell/jiezi/segment/NShortSegment.scala
Scala
apache-2.0
234
package ch.bsisa.hyperbird.actview.actors import akka.actor.{ Actor, ActorRef, ActorLogging, ActorSelection, Props } import akka.routing.BroadcastRouter import akka.routing.RoundRobinRouter import ch.bsisa.hyperbird.actview.LoadFleet import ch.bsisa.hyperbird.actview.DeleteFleet import ch.bsisa.hyperbird.actview.Broa...
bsisa/hb-api
app/ch/bsisa/hyperbird/actview/actors/FleetActor.scala
Scala
gpl-2.0
3,967
package lila.app package mashup import lila.api.Context import lila.common.LightUser import lila.forum.MiniForumPost import lila.game.{ Game, Pov, GameRepo } import lila.playban.TempBan import lila.rating.PerfType import lila.relay.Relay import lila.simul.Simul import lila.timeline.Entry import lila.tournament.{ Tourn...
pawank/lila
app/mashup/Preload.scala
Scala
mit
2,646
package sbtstudent import sbt._ object StudentKeys { val bookmarkKeyName = "bookmark" val mapPrevKeyName = "map-prev" val mapNextKeyName = "map-next" val bookmark: AttributeKey[File] = AttributeKey[File](bookmarkKeyName) val mapPrev: AttributeKey[Map[String, String]] = AttributeKey[Map[String, String]](mapP...
lightbend-training/course-master-template
project/StudentKeys.scala
Scala
apache-2.0
434
object Test extends App { println(showOptimize(sum(1, 2, 3))) println(optimize(sum(1, 2, 3))) val a: Int = 5 println(showOptimize(sum(1, a, sum(1, 2, 3), 5))) println(optimize(sum(1, a, sum(1, 2, 3), 5))) val seq: Seq[Int] = Seq(1, 3, 5) println(showOptimize(sum(1, sum(seq*), 3))) println(optimize(sum(1...
dotty-staging/dotty
tests/run-macros/quoted-matching-docs-2/Test_2.scala
Scala
apache-2.0
340
package thesis.orderings import thesis.matrixTypes._ import thesis.utils._ /** Ordering that just returns the same matrix */ class Identity extends MatrixOrdering { override def toString = "Identity" /** * @inheritdoc */ override def changeOrdering(m:MatrixMoves) = m }
GLeurquin/Faithful-visualization-of-categorical-datasets
src/main/scala/Orderings/IdentityOrdering.scala
Scala
mit
276
/* * Copyright 2013 David Savage * * 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...
davemssavage/modula
osgi/src/test/scala/org/chronologicalthought/modula/osgi/BundleImplTest.scala
Scala
apache-2.0
15,475
package com.twitter.finagle import com.twitter.finagle.util.InetSocketAddressUtil.unconnected import com.twitter.util.{Closable, Future, Time} import java.net.SocketAddress import scala.util.control.NonFatal object Service { /** * Wrap the given service such that any synchronously thrown `NonFatal` * excepti...
koshelev/finagle
finagle-core/src/main/scala/com/twitter/finagle/Service.scala
Scala
apache-2.0
11,147
package testing.basic import com.lespea.elements.basic._ import org.scalatest.WordSpec final class BasicTests extends WordSpec with LogicTests { "A NAND gate" should { behave like validLogicTable(Nand, Seq( ((false, false), true), ((true, false), true), ((false, true), true), ((true, tru...
lespea/Elements-of-Computing-Systems
src/test/scala/testing/basic/BasicTests.scala
Scala
apache-2.0
1,024
/* * 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 ...
minixalpha/spark
sql/hive/src/test/scala/org/apache/spark/sql/sources/ParquetHadoopFsRelationSuite.scala
Scala
apache-2.0
8,461
/* * Copyright 2015 Paul Horn * * 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...
knutwalker/ff7-simulator
api/src/main/scala/ff7/battle/Hit.scala
Scala
apache-2.0
914
package finatra.quickstart.services import com.twitter.util.Future import finatra.quickstart.domain.StatusId import java.util.UUID import javax.inject.Singleton @Singleton class IdService { def getId(): Future[StatusId] = { Future( StatusId( UUID.randomUUID.toString)) } }
tom-chan/finatra
examples/finatra-twitter-clone/src/main/scala/finatra/quickstart/services/IdService.scala
Scala
apache-2.0
297
// Starter Code for Exercise 5 // From "Class Exercises" atom import com.atomicscala.AtomicTest._ val anotherT1 = new SimpleTimeDefault(10, 30) val anotherT2 = new SimpleTimeDefault(9) val anotherST = anotherT1.subtract(anotherT2) anotherST.hours is 1 anotherST.minutes is 30 val anotherST2 = new SimpleTimeDefault(10...
P7h/ScalaPlayground
Atomic Scala/atomic-scala-solutions/27_ClassExercises/Starter-5.scala
Scala
apache-2.0
408
import scala.compiletime._ object Test { def main(args: Array[String]): Unit = { println(StringContext(Seq.empty[String]:_*).code(Seq.empty[Any]:_*)) // error } }
som-snytt/dotty
tests/neg/i6622e.scala
Scala
apache-2.0
174
/* * Copyright 2016 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...
ahudspith-equalexperts/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v3/B485.scala
Scala
apache-2.0
1,226
package com.delprks.productservicesprototype.datasource import com.delprks.productservicesprototype.api.directives.ResponseDirectives.MultiEntityResponseData import com.delprks.productservicesprototype.client.OfferFilter import com.delprks.productservicesprototype.domain.{Offer, OfferEvent} import scala.concurrent.Fu...
delprks/product-services-prototype
src/main/scala/com/delprks/productservicesprototype/datasource/OfferDataSource.scala
Scala
mit
623
/* Copyright 2009 David Hall, Daniel Ramage 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 writi...
briantopping/epic
src/main/scala/epic/preprocess/RegexSearchTokenizer.scala
Scala
apache-2.0
1,353
/* * 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 ...
wowmsi/safe
safe-lang/src/main/scala/safe/safelang/model/Entity.scala
Scala
apache-2.0
14,392
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
szhem/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/complexTypeExtractors.scala
Scala
apache-2.0
12,891
/* * 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 ...
shaoxuan-wang/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/util/TemporalJoinUtil.scala
Scala
apache-2.0
3,687
/* * This file is part of Apparat. * * Copyright (C) 2010 Joa Ebert * http://www.joa-ebert.com/ * * This library 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 Lice...
joa/apparat
apparat-core/src/main/scala/apparat/graph/mutable/MutableBlockVertex.scala
Scala
lgpl-2.1
1,355
package rwsscala.ichiba import rwsscala._ import org.specs2._, matcher.MatchResult import scalaz._, Scalaz._ import org.scala_tools.time.Imports._ class ItemSearchResultSpec extends Specification { def is = "ItemSearchResult" ^ "ite...
nisshiee/rws-scala
core/src/test/scala/core/ichiba/response/ItemSearchResultSpec.scala
Scala
mit
5,833
package org.ergoplatform.validation /** * Configuration of validation. Each `ValidationRule` instance should be * implemented as an `object` to facilitate type-safe usage. It then should be * registered in `ValidationRules.currentSettings` to be used in the code to * perform validation. Added to `currentSettin...
ScorexFoundation/sigmastate-interpreter
sigmastate/src/main/scala/org/ergoplatform/validation/SigmaValidationSettings.scala
Scala
mit
4,253
/* * Wire * Copyright (C) 2016 Wire Swiss GmbH * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This progr...
wireapp/wire-android-sync-engine
zmessaging/src/main/scala/com/waz/service/PropertiesService.scala
Scala
gpl-3.0
5,155
package specs.box import com.plasmaconduit.conveyance.{ConveyedError, ConveyedInput, Conveyor, Box} import org.specs2.mutable._ class BoxOfSpec extends Specification { "Creating a box w/ Box.of()" should { "produce a box containing the passed in value" in { var boxed = 0 Box.of[String, Int](42).ope...
plasmaconduit/conveyance
src/test/scala/specs/box/BoxOfSpec.scala
Scala
mit
480
package environment.layer import scoututil.Util._ import environment.element._ import scala.math._ import scala.collection.mutable.{ArrayBuffer => AB} import scala.collection.mutable.{Set => MutableSet} class ConstructionCell( var modified: Boolean = false, var elements: MutableSet[String] = MutableSet() // v...
KeithCissell/SCOUt
app/src/main/scala/environment/environment-builder/ConstructionLayer.scala
Scala
mit
7,489
import org.automanlang.adapters.mturk.DSL._ import org.automanlang.core.policy.aggregation.UserDefinableSpawnPolicy import org.automanlang.core.question.QuestionOption object SimpleCheckboxDistributionQuestion extends App { val sample_size = 3 val opts = Utilities.unsafe_optparse(args, "SimpleCheckboxDistributi...
dbarowy/AutoMan
apps/simple/SimpleCheckboxDistributionProgram/src/main/scala/SimpleCheckboxDistributionQuestion.scala
Scala
gpl-2.0
1,667
class B { def ::(a: List[Int]) { a match { case x::xs => case _ => } } } object Test { def testSuccess1( x: Any ) = { val stable = 2 x match { case Some( `stable` ) => case _ => } } val bar = 3 def testSuccess2( x: Any ) = { x match {...
felixmulder/scala
test/files/neg/t3816.scala
Scala
bsd-3-clause
611
package com.arcusys.learn.liferay import java.util.ResourceBundle import com.liferay.calendar.model.CalendarBooking import com.liferay.portal.kernel.bean.BeanLocator import com.liferay.portal.kernel.dao.orm.DynamicQuery import com.liferay.portal.kernel.portlet.{LiferayPortletRequest, LiferayPortletResponse, LiferayPo...
arcusys/Valamis
learn-liferay620-services/src/main/scala/com/arcusys/learn/liferay/LiferayClasses.scala
Scala
gpl-3.0
6,061
package com.github.comco.amsconc import org.scalatest.FlatSpec import org.scalatest.Matchers /** * @author comco */ class PGASpec extends FlatSpec with Matchers { import PGA._ "An Instruction" should "parse" in { import Instruction._ parseInstruction("a") shouldEqual Basic("a") parseInstruction("...
comco/amsconc
src/test/scala/com/github/comco/amsconc/PGASpec.scala
Scala
apache-2.0
5,593
package se.lu.nateko.cp.meta.upload.drought import se.lu.nateko.cp.doi.core.DoiClient import se.lu.nateko.cp.doi._ import se.lu.nateko.cp.doi.meta._ import scala.concurrent.Future import se.lu.nateko.cp.meta.core.etcupload.StationId import java.net.URI import scala.concurrent.ExecutionContext import se.lu.nateko.cp.me...
ICOS-Carbon-Portal/meta
src/test/scala/se/lu/nateko/cp/meta/upload/drought/DroughtDoiMaker.scala
Scala
gpl-3.0
5,607
package com.wavesplatform.transaction.serialization.impl import java.nio.ByteBuffer import com.google.common.primitives.{Bytes, Ints, Longs} import com.wavesplatform.account.AddressScheme import com.wavesplatform.serialization.ByteBufferOps import com.wavesplatform.transaction.assets.exchange.{ExchangeTransaction, Or...
wavesplatform/Waves
node/src/main/scala/com/wavesplatform/transaction/serialization/impl/ExchangeTxSerializer.scala
Scala
mit
4,373
package com.arcusys.valamis.persistence.impl.scorm.storage import com.arcusys.valamis.lesson.scorm.model.manifest.{ChildActivitySetAtLeastPercent, _} import com.arcusys.valamis.lesson.scorm.storage.sequencing.{ConditionRuleItemStorage, RollupRuleStorage} import com.arcusys.valamis.persistence.common.SlickProfile impor...
igor-borisov/valamis
valamis-slick-persistence/src/main/scala/com/arcusys/valamis/persistence/impl/scorm/storage/RollupRuleStorageImpl.scala
Scala
gpl-3.0
2,891
/* * Copyright 2014–2018 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...
jedesah/Quasar
foundation/src/test/scala/quasar/contrib/scalacheck/gen.scala
Scala
apache-2.0
915
package org.life import org.life.MatrixBoardFactory.bounded import org.scalatest._ class BoundedBoardSpec extends FlatSpec with Matchers { "Any board" should "be able to find a specific cell" in { assert( center( 0, 0 ) == false ) assert( center( 0, 1 ) == false ) assert( center( 0, 2 ) ==...
squid314/scala-game-of-life
src/test/scala/org/life/BoundedBoardSpec.scala
Scala
gpl-3.0
3,715
/* * 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/pbik-frontend
test/views/NoNinoExclusionSearchViewSpec.scala
Scala
apache-2.0
3,122
// scalac: -opt:l:inline -opt-inline-from:** // object Test { def idiv(x: Int): Unit = x / 0 def ldiv(x: Long): Unit = x / 0 def irem(x: Int): Unit = x % 0 def lrem(x: Long): Unit = x % 0 def check(x: => Any) = try { x; sys.error("failed to throw divide by zero!") } catch { case _: ArithmeticException => } ...
martijnhoekstra/scala
test/files/run/t8601.scala
Scala
apache-2.0
446
package com.tresata.ganitha.ml.classification import scala.collection.JavaConverters._ import org.apache.hadoop.mapred.JobConf import cascading.flow.hadoop.HadoopFlowConnector import cascading.pipe.Pipe import cascading.tuple.Fields import com.twitter.scalding.Dsl._ import com.tresata.ganitha.util._ import com.tre...
tresata/ganitha
ganitha-ml/src/main/scala/com/tresata/ganitha/ml/classification/NaiveBayes.scala
Scala
apache-2.0
17,240
/* * Copyright 2014 IBM Corp. * * 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...
bpburns/spark-kernel
kernel-api/src/main/scala/com/ibm/spark/magic/dependencies/IncludeDependencyDownloader.scala
Scala
apache-2.0
1,062
package at.logic.gapt.expr.hol import at.logic.gapt.expr._ object HOLPosition { def apply( list: List[Int] ) = new HOLPosition( list ) def apply( is: Int* ) = new HOLPosition( is.toList ) def toList( pos: HOLPosition ) = pos.list /** * Returns a list of positions of subexpressions that satisfy some pred...
loewenheim/gapt
src/main/scala/at/logic/gapt/expr/hol/HOLPosition.scala
Scala
gpl-3.0
10,837
import org.scalacheck.{Arbitrary, Gen} import org.scalatest._ import org.scalatest.prop.PropertyChecks object PersonGen { val personGen: Gen[Person] = Gen.resultOf(Person) } class PersonSpec extends PropSpec with PropertyChecks { import Matchers._ import PersonGen._ property("person age") { forAll(person...
Mharlin/better-testing-workshop
demo/src/test/scala/PersonSpec.scala
Scala
mit
367
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. ...
RobAltena/deeplearning4j
scalnet/src/main/scala/org/deeplearning4j/scalnet/layers/pooling/MaxPooling1D.scala
Scala
apache-2.0
2,457
package net.tyler.sopwith.ingame import net.tyler.math.CartesianVector2f import net.tyler.messaging.MessagingComponent import net.tyler.messaging.StateQuerier import net.tyler.sopwith.Configuration class InGameStateQuerier(val initPlaneState: PlaneState, val initBuildings: Iterable[Building]...
DaveTCode/SopwithLibgdx
SopwithCoreProject/src/net/tyler/sopwith/ingame/InGameStateQuerier.scala
Scala
mit
3,033
package nest.sparkle.time.protocol import spray.json.DefaultJsonProtocol._ import nest.sparkle.time.protocol.TransformParametersJson.RawParametersFormat class TestRawTransform extends PreloadedRamService with StreamRequestor { test("Raw transform two raw events") { val message = streamRequest("Raw", params = R...
mighdoll/sparkle
sparkle-tests/src/test/scala/nest/sparkle/time/protocol/TestRawTransform.scala
Scala
apache-2.0
1,080
package com.socrata.pg.store.events import com.socrata.pg.store.{PGSecondaryUniverseTestBase, PGStoreTestBase, PGSecondaryTestBase} import scala.language.reflectiveCalls import com.socrata.datacoordinator.secondary.{ColumnCreated, ColumnRemoved} import com.socrata.datacoordinator.id.{UserColumnId, ColumnId} class Col...
socrata-platform/soql-postgres-adapter
store-pg/src/test/scala/com/socrata/pg/store/events/ColumnRemovedHandlerTest.scala
Scala
apache-2.0
1,230
package com.recursivity.commons.bean import org.scalatest.FunSuite /** * Created by IntelliJ IDEA. * User: wfaler * Date: Dec 4, 2010 * Time: 12:12:55 AM * To change this template use File | Settings | File Templates. */ class GenericsParserTest extends FunSuite{ test("parse nested generics"){ //val g...
rkpandey/recursivity-commons
src/test/scala/com/recursivity/commons/bean/GenericsParserTest.scala
Scala
bsd-3-clause
2,681
/* * Copyright 2013-2016 Websudos, Limited. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of c...
levinson/phantom
phantom-example/src/test/scala/com/websudos/phantom/example/ExampleSuite.scala
Scala
bsd-2-clause
2,594
package monadasync import java.util.concurrent.atomic.AtomicReference import java.util.concurrent.{ CountDownLatch, TimeUnit } import scala.concurrent.duration.Duration final class WithTimeout(timeout: Long) { def apply[A](test: => A): A = { val latch = new CountDownLatch(1) val result = new AtomicReference...
lukiano/monadasync
scalaz/src/test/scala/monadasync/WithTimeout.scala
Scala
apache-2.0
897
package com.github.j5ik2o.wicket.pages class SignOutPage extends org.apache.wicket.authroles.authentication.pages.SignOutPage { }
j5ik2o/scala-wicket-sample
application/src/main/scala/com/github/j5ik2o/wicket/pages/SignOutPage.scala
Scala
mit
132
/* * Copyright (c) 2013, OpenCloudDB/MyCAT and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software;Designed and Developed mainly by many Chinese * opensource volunteers. you can redistribute it and/or modify it under the * ...
fengshao0907/Mycat-spider
src/main/scala/turbo/crawler/db/DBOfEbean.scala
Scala
apache-2.0
5,377
package org.monkeynuthead.riak import akka.actor.{ActorSystem, Props} import akka.testkit.{TestKit, ImplicitSender, TestActorRef, TestKitBase} import com.scalapenos.riak.{RiakClient, RiakValue} import org.junit.runner.RunWith import org.monkeynuthead.riak.AlbumRepositoryProtocol.{FetchAlbumByTitle, StoreAlbum} ...
georgenicoll/monkey-barrel
old20150804/riak-scala-client-example/src/test/scala/org/monkeynuthead/riak/RiakAlbumRepositorySpec.scala
Scala
gpl-2.0
3,207
package net.resonious.sburb.blocks import cpw.mods.fml.relauncher.SideOnly import net.minecraft.entity.player.EntityPlayer import net.minecraft.world.World import net.resonious.sburb.abstracts.ActiveBlock import cpw.mods.fml.relauncher.Side import net.resonious.sburb.Sburb import net.resonious.sburb.gui.ComputerGui im...
Resonious/mcsburb
src/main/scala/net/resonious/sburb/blocks/Computer.scala
Scala
mit
675
/** * Copyright 2015, deepsense.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
deepsense-io/seahorse-workflow-executor
commons/src/main/scala/io/deepsense/commons/exception/json/FailureDescriptionJsonProtocol.scala
Scala
apache-2.0
1,214
object Test extends App { val u: scala.reflect.macros.Universe = ??? import u._ import scala.reflect.macros.Attachments import scala.reflect.ClassTag import compat._ val tree: Tree = ??? val ttree: TypeTree = ??? val stree: SymTree = ??? val trees: List[Tree] = ??? val mods: Modifiers = ??? val i...
yusuke2255/dotty
tests/pending/pos/reflection-compat-macro-universe.scala
Scala
bsd-3-clause
7,562