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
/* * 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...
Myllyenko/incubator-toree
kernel/src/main/scala/org/apache/toree/magic/builtin/ShowTypes.scala
Scala
apache-2.0
1,769
/* * 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...
monix/monix
monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadConsumer.scala
Scala
apache-2.0
1,758
/* * Copyright 2014–2017 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
drostron/quasar
mimir/src/main/scala/quasar/mimir/UnaryLib.scala
Scala
apache-2.0
7,050
/*********************************************************************** * 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-index-api/src/main/scala/org/locationtech/geomesa/index/planning/Transforms.scala
Scala
apache-2.0
1,708
/* * 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/fset-faststream
app/scheduler/onlinetesting/SendInvitationJob.scala
Scala
apache-2.0
4,084
package spire package benchmark import spire.math.Complex import spire.algebra.Order import scala.util.Random._ trait FixtureSupport { /** * Sugar for building arrays using a per-cell init function. */ def init[A:ClassTag](size:Int)(f: => A) = { val data = Array.ofDim[A](size) for (i <- 0 until ...
rklaehn/spire
benchmark/src/main/scala/spire/benchmark/FixtureSupport.scala
Scala
mit
907
package mesosphere.marathon.api.v2.json import mesosphere.marathon.{ MarathonTestHelper, MarathonSpec } import org.scalatest.GivenWhenThen /** * Tests that test that the given JSON is rejected by the JSON schema. * * Since the JSON is not representable by an AppDefinition, * JSON is used directly. */ class ...
ss75710541/marathon
src/test/scala/mesosphere/marathon/api/v2/json/AppDefinitionSchemaJSONTest.scala
Scala
apache-2.0
4,618
/* * 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 ...
ahnqirage/spark
sql/core/src/main/scala/org/apache/spark/sql/internal/BaseSessionStateBuilder.scala
Scala
apache-2.0
11,725
package idv.brianhsu.maidroid.plurk.adapter import idv.brianhsu.maidroid.plurk.R import idv.brianhsu.maidroid.plurk.util.QualifierDisplay import android.widget.Spinner import android.content.Context import android.view.View import android.view.ViewGroup import android.widget.BaseAdapter import android.widget.TextView...
brianhsu/MaidroidPlurk
src/main/scala/adapter/FilterSpinner.scala
Scala
gpl-3.0
2,536
package ui import play.twirl.api.Html import scala.concurrent.{ExecutionContext, Future} import play.api.http.HeaderNames import play.api.mvc.{Cookie, Cookies, Result} /** * Helpers for working with pieces of pages. */ object Pagelet { /** * Read the body of a Result as Html. * */ def readBody(result:...
haghard/scenter-frontend
app/ui/Pagelet.scala
Scala
apache-2.0
1,678
/* * 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
mllib/src/main/scala/org/apache/spark/ml/optim/WeightedLeastSquares.scala
Scala
apache-2.0
16,647
package samples import org.junit._ import Assert._ @Test class AppTest { @Test def testOK() = assertTrue(true) // @Test // def testKO() = assertTrue(false) }
miguel0afd/stagram
stagram/src/test/scala/samples/junit.scala
Scala
apache-2.0
179
package com.coldcore.akkaftp.ftp package executor import org.scalatest._ import org.scalatest.mock.MockitoSugar import akka.actor.ActorSystem import akka.testkit.{ImplicitSender, TestKit} import com.coldcore.akkaftp.ftp.command.UserCommand import com.coldcore.akkaftp.ftp.session.Session class TaskExecutorSpec(_system...
2nolife/akka-ftp
src/test/scala/com/coldcore/akkaftp/ftp/task_executor_test.scala
Scala
lgpl-3.0
972
package spoiwo.model object Column { def apply( index: java.lang.Integer = null, autoSized: java.lang.Boolean = null, break: java.lang.Boolean = null, groupCollapsed: java.lang.Boolean = null, hidden: java.lang.Boolean = null, style: CellStyle = null, width: Width = null ...
norbert-radyk/spoiwo
core/src/main/scala/spoiwo/model/Column.scala
Scala
mit
2,132
/* * Copyright 2008-present MongoDB, 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 ag...
rozza/mongo-scala-driver
driver/src/test/scala/org/mongodb/scala/model/CollationAlternateSpec.scala
Scala
apache-2.0
2,355
package de.tu_berlin.dima.experiments.flink.broadcast import org.apache.flink.api.common.functions.RichMapFunction import org.apache.flink.api.scala._ import org.apache.flink.configuration.Configuration import org.apache.flink.core.fs.FileSystem.WriteMode import scala.collection.convert.wrapAsScala._ /** * Flink j...
FelixNeutatz/DstatCheck
flink-broadcast-flink-jobs/src/main/scala/de/tu_berlin/dima/experiments/flink/broadcast/BroadcastJob.scala
Scala
apache-2.0
1,542
package com.github.jamii.sws import java.net.URLConnection import com.twitter.finagle.{Http, Service} import com.twitter.util.{Await, Future} import org.jboss.netty.handler.codec.http._ object Main extends App { val documentRoot = sys.props.get("DocumentRoot") .getOrElse(throw new IllegalArgumentException("in...
jami-i/simple-web-server
src/main/scala/com/github/jamii/sws/Main.scala
Scala
apache-2.0
1,619
package arx.core.vec; @SerialVersionUID(9223372036854770000L) class Vec2i extends ReadVec2i{ def this(xa : Int,ya : Int){ this() xi = xa yi = ya } override def x_= ( s : Int ) { xi = s } override def y_= ( s : Int ) { yi = s } def +=(v : ReadVec2i) { xi += v.xi;yi += v.yi} def +=(s : Int) {xi += s;yi += s}...
nonvirtualthunk/arx-core
src/main/scala/arx/core/vec/Vec2i.scala
Scala
bsd-2-clause
2,634
package im.actor.server.api.http.webhooks import akka.http.scaladsl.model.StatusCodes.{ OK, Gone } import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.server.PathMatchers.Segment import akka.http.scaladsl.server.Route import de.heikoseeberger.akkahttpplayjson.PlayJsonSupport import im.actor.server....
winiceo/actor-platform
actor-server/actor-http-api/src/main/scala/im/actor/server/api/http/webhooks/TokenStatus.scala
Scala
mit
761
/* * 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 ...
tzulitai/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/batch/table/AggregateTest.scala
Scala
apache-2.0
2,350
package sample.kamon import akka.actor._ import scala.concurrent.duration._ import scala.math.random import MessageGenerator._ /** * Defines different ways to create artifical traffic */ class MessageGeneratorActor extends Actor { val maxPeak = 10000 val constantLoad = 500 var peak: ActorRef = _ var load:...
arunma/AkkaMessagingRequestResponse
src/main/scala/sample/kamon/MessageGenerator.scala
Scala
cc0-1.0
2,045
package com.twitter.finagle.http import com.twitter.finagle.Service import com.twitter.finagle.benchmark.StdBenchAnnotations import com.twitter.util.Future import org.openjdk.jmh.annotations.{Benchmark, Scope, State} @State(Scope.Benchmark) class HttpMuxerBenchmark extends StdBenchAnnotations { private[this] val s...
twitter/finagle
finagle-benchmark/src/main/scala/com/twitter/finagle/http/HttpMuxerBenchmark.scala
Scala
apache-2.0
2,447
/* * Copyright 2015 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 ...
keshin/squbs
squbs-actorregistry/src/main/scala/org/squbs/actorregistry/ActorLookup.scala
Scala
apache-2.0
5,340
object Main { class A() case class RichA() { def apply(s: String): Int = 1 } implicit def toRichA(a: A): RichA = null val a = new A() implicit def i2s(x: Int): String = "" a(/*start*/23/*end*/) } /* Seq(any2ArrowAssoc, any2Ensuring, any2stringadd, any2stringfmt, double2Double, doub...
triggerNZ/intellij-scala
testdata/implicits/simple/ImplicitApply.scala
Scala
apache-2.0
598
/* * Copyright 2015 Dennis Vriend * * 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...
dnvriend/slick3-test
src/main/scala/com/github/dnvriend/CoffeeRepository.scala
Scala
apache-2.0
5,286
/* Copyright (c) 2016, Rice University Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2....
agrippa/spark-swat
swat/src/main/scala/org/apache/spark/rdd/cl/PrimitiveInputBufferWrapper.scala
Scala
bsd-3-clause
4,702
/* * Copyright (c) 2014-2020 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...
alexandru/monifu
monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/ObservableOpsReturningTaskSuite.scala
Scala
apache-2.0
8,725
package gapt.formats.tptp import gapt.formats.ClasspathInputFile import gapt.proofs.Clause import gapt.proofs.resolution.{ ResolutionToExpansionProof, ResolutionToLKProof, fixDerivation } import gapt.proofs.sketch.RefutationSketchToResolution import gapt.provers.escargot.Escargot import org.specs2.mutable._ import org...
gapt/gapt
tests/src/test/scala/gapt/formats/tptp/TptpProofParserTest.scala
Scala
gpl-3.0
1,283
/* * Copyright 2013-2016 the original author or 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 ap...
amuramatsu/Laika
core/src/test/scala/laika/parse/markdown/html/HTMLParsersSpec.scala
Scala
apache-2.0
6,131
package net.cucumbersome.rpgRoller.warhammer import java.util.UUID import io.swagger.client.model.{CombatActorPresenter, Statistics} import scala.util.Random object ActorGenerator { def generate: CombatActorPresenter = { CombatActorPresenter( id = UuidGenerator.generate, name = NameGenerator.gener...
CucumisSativus/rpgRollerBackend
functionalTest/src/main/scala/net/cucumbersome/rpgRoller/warhammer/ActorGenerator.scala
Scala
mit
1,147
/* * Copyright (C) 2005, The OpenURP 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...
openurp/api
edu/src/main/scala/org/openurp/edu/clazz/model/Lesson.scala
Scala
lgpl-3.0
1,796
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
dotty-staging/scalatest
scalatest/src/main/scala/org/scalatest/matchers/dsl/ResultOfTheSameInstanceAsApplication.scala
Scala
apache-2.0
1,046
package com.github.mrpowers.spark.spec.sql import org.apache.spark.sql.SparkSession trait SparkSessionWrapper { lazy val spark: SparkSession = { SparkSession.builder().master("local").appName("spark session").getOrCreate() } }
MrPowers/spark-spec
src/main/scala/com/github/mrpowers/spark/spec/sql/SparkSessionWrapper.scala
Scala
mit
239
package uk.me.arseni.tokenizers import uk.me.arseni.filters.StopWordsFilter import org.scalatest.FlatSpec /** * @author aanisimovich * @since 24/03/16 */ class TestTokenizerWithFilters extends FlatSpec { val t = new TokenizerWithFilters(tokenizer = new RegexBITokenizer(), f...
yarrseni/scala_search_engine
src/test/scala/uk/me/arseni/tokenizers/TestTokenizerWithFilters.scala
Scala
apache-2.0
709
package troy package schema.validation import troy.cql.ast._ import troy.cql.ast.ddl.Alter.AlterType import troy.schema.{ V, Messages, Schema } class AlterColumnIncompatibleTypes(schema: Schema) extends Validation[DataDefinition] { import DataType._ override def rules = { case AlterTable(tableName, AlterType(...
schemasafe/troy
troy-schema/src/main/scala/troy/schema/validation/AlterColumnIncompatibleTypes.scala
Scala
apache-2.0
788
package reactivemongo.api.collections.bson import reactivemongo.api.BSONSerializationPack import reactivemongo.api.collections.BatchCommands @deprecated("Unused", "0.18.0") object BSONBatchCommands extends BatchCommands[BSONSerializationPack.type] { import reactivemongo.api.commands.bson._ val pack = BSONSeriali...
ornicar/ReactiveMongo
driver/src/main/scala-2.13+/api/collections/bson/BSONBatchCommands.scala
Scala
apache-2.0
482
/* * SymbolsTest.scala * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ package at.logic.gapt.expr import org.specs2.mutable._ class SymbolsTest extends Specification { "Equality between symbols" should { "return true if it is the same class and mixed ...
gisellemnr/gapt
src/test/scala/at/logic/gapt/language/lambda/SymbolsTest.scala
Scala
gpl-3.0
897
package slick.jdbc.meta import java.sql._ import slick.jdbc.ResultSetAction /** A wrapper for a row in the ResultSet returned by DatabaseMetaData.getProcedures(). */ case class MProcedure(name: MQName, remarks: String, returnsResult: Option[Boolean], specificName: Option[String]) { def getProcedureColumns(columnNam...
slick/slick
slick/src/main/scala/slick/jdbc/meta/MProcedure.scala
Scala
bsd-2-clause
869
package cwe.scala.library.runtime.test.audit import cwe.scala.library.runtime.test.ScalaTest import cwe.scala.library.math.bignumbers.Real import cwe.scala.library.audit._ class TestProfiler extends ScalaTest { def run { //AuditServiceProvider.registerTraceServiceWithDebug /* dummy computing just to initialize al...
wwwigii-system/research
cwe-scala-library/src/cwe/scala/library/runtime/test/audit/TestProfiler.scala
Scala
gpl-3.0
2,542
package com.dzegel.DynamockServer.controller import com.dzegel.DynamockServer.controller.MockController._ import com.dzegel.DynamockServer.service.ExpectationService import com.dzegel.DynamockServer.types.{Content, Request => DynamockRequest} import com.google.inject.Inject import com.twitter.finagle.http.{Request => ...
dzegel/DynamockServer
src/main/scala/com/dzegel/DynamockServer/controller/MockController.scala
Scala
apache-2.0
1,955
package scalaSci // Defines and implements most common static operations that are // mandatory for all the scalaSci Matrix types. // This trait is analogous to the scalaSciMatrix trait by for static operations. // It defines a common functionality that is assured by all the library-specific scalaSci wrapper ...
scalalab/scalalab
source/src/main/scala/scalaSci/StaticScalaSciCommonOps.scala
Scala
mit
16,107
package pl.newicom.dddd.aggregate.error class CommandRejected(msg: String) extends RuntimeException(msg)
pawelkaczor/akka-ddd
akka-ddd-protocol/src/main/scala/pl/newicom/dddd/aggregate/error/CommandRejected.scala
Scala
mit
105
package opencl.generator.pipelines import ir._ import ir.ast._ import ir.ast.debug.PrintType import lift.arithmetic.SizeVar import opencl.executor._ import opencl.ir._ import opencl.ir.pattern.{MapGlb, _} import org.junit.Assert._ import org.junit._ object TestHalideSchedules extends TestWithExecutor class TestHalid...
lift-project/lift
src/test/opencl/generator/pipelines/TestHalideSchedules.scala
Scala
mit
8,624
import java.io.File import scala.io.Source class Document(val file: File) { val text = Source.fromFile(file).mkString.toLowerCase.replaceAll( """[\\"\\,\\.\\—\\!\\?\\:\\;\\(\\)\\d+]|( *- )""", " ").replaceAll( """([^\\pL\\pN\\pP\\pS\\pZ])|([\\xC2\\xA0])""", " ").split("\\\\s+") val totalLength = text.foldLeft(0)...
VerkhovtsovPavel/BSUIR_Labs
Labs/IOFS/IOFS-7/src/Document.scala
Scala
mit
1,727
package com.geishatokyo.diffsql.ast import com.geishatokyo.diffsql.util.StringUtil /** * Created by takeshita on 14/02/14. */ trait ColumnOption { } object ColumnOption{ abstract class SimpleCO(val name : String) extends ColumnOption{ override def hashCode(): Int = name.toLowerCase().hashCode overr...
geishatokyo/diff-sql-table
parser/src/main/scala/com/geishatokyo/diffsql/ast/ColumnOptions.scala
Scala
mit
2,020
/* * Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com> */ package play.it.action import akka.stream.scaladsl.Source import play.shaded.ahc.io.netty.handler.codec.http.HttpHeaders import org.specs2.mutable.Specification import play.api.http.HeaderNames._ import play.api.http.Status._ import play.api...
Shenker93/playframework
framework/src/play-integration-test/src/test/scala/play/it/action/HeadActionSpec.scala
Scala
apache-2.0
5,506
package reactivemongo.api.gridfs import reactivemongo.bson.{ BSONDocument, BSONValue } import reactivemongo.api.{ BSONSerializationPack, SerializationPack } /** * A file read from a GridFS store. * @tparam Id Type of the id of this file (BSON ObjectID). */ trait ReadFile[P <: SerializationPack, +Id] extends Bas...
ornicar/ReactiveMongo
driver/src/main/scala/api/gridfs/ReadFile.scala
Scala
apache-2.0
2,779
package org.scalajs.core.compiler.test import org.scalajs.core.compiler.test.util._ import org.junit.Test class JSExportTest extends DirectTest with TestHelpers { override def preamble = """import scala.scalajs.js.annotation._ """ @Test def noDoubleUnderscoreExport = { // Normal exports """ ...
colinrgodsey/scala-js
compiler/src/test/scala/org/scalajs/core/compiler/test/JSExportTest.scala
Scala
bsd-3-clause
15,569
package com.geeksville.andropilot.gui import android.os.Bundle import com.ridemission.scandroid.AndroidLogger import scala.collection.JavaConverters._ import android.os.Handler import com.geeksville.util.ThreadTools._ import android.support.v4.app.Fragment import com.geeksville.andropilot.service.AndroServiceClient im...
geeksville/arduleader
andropilot/src/main/scala/com/geeksville/andropilot/gui/AndroServiceFragment.scala
Scala
gpl-3.0
2,699
package com.twitter.finagle.builder import com.twitter.conversions.time._ import com.twitter.finagle._ import com.twitter.finagle.client.{DefaultPool, StackBasedClient, StackClient, StdStackClient} import com.twitter.finagle.client.{StackBasedClient, Transporter} import com.twitter.finagle.factory.{BindingFactory, Tim...
cogitate/twitter-finagle-uuid
finagle-core/src/main/scala/com/twitter/finagle/builder/ClientBuilder.scala
Scala
apache-2.0
40,872
package viscel.narration import java.net.MalformedURLException import java.nio.charset.StandardCharsets import java.nio.file.Path import better.files._ import viscel.crawl.Decider import viscel.selektiv.FlowWrapper._ import viscel.selektiv.{FlowWrapper, Report} import viscel.shared.{DataRow, Log, Vid, Vurl} import s...
rmgk/viscel
code/jvm/src/main/scala/viscel/narration/ViscelDefinition.scala
Scala
agpl-3.0
7,070
/* * 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 ...
WangTaoTheTonic/flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/batch/table/validation/SetOperatorsValidationTest.scala
Scala
apache-2.0
4,958
package mqtt.listener import java.time.{Clock, Instant} import akka.actor.{ActorSystem, Props} import akka.testkit.TestActorRef import model.location.impl.{LocationRepositorySql, LocationSql} import model.sensor.impl.{DoubleValuesMeasuredPhenomenonInflux, MeasuredPhenomenonInflux, SensorRepositorySql, SensorSql} impo...
vavravl1/home_center
test/mqtt/listener/SensorMeasurementsDispatcherTest.scala
Scala
mit
5,702
/* * This file is part of the Kompics component model runtime. * * Copyright (C) 2009 Swedish Institute of Computer Science (SICS) * Copyright (C) 2009 Royal Institute of Technology (KTH) * * Kompics is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License *...
kompics/kompics-scala
core/src/test/scala/se/sics/kompics/sl/ConfigTestSuite.scala
Scala
gpl-2.0
4,398
import scala.scalajs.js import scala.scalajs.js.annotation.* @js.native @JSGlobal case class A1(x: Int) extends js.Object // error @js.native @JSGlobal case object A2 extends js.Object // error case class B1(x: Int) extends js.Object // error case object B2 extends js.Object // error
dotty-staging/dotty
tests/neg-scalajs/js-case-class-object.scala
Scala
apache-2.0
289
package com.chariotsolutions import akka.stream.scaladsl.{ Sink, Source } import org.scalatest._ import org.scalatest.concurrent._ import akka.http.Http import akka.http.model._ import akka.stream.ActorFlowMaterializer import akka.http.unmarshalling._ class AppSpec extends FlatSpec with Matchers with ScalaFutures wit...
chariotsolutions/scala-samples
akka-http/src/test/scala/com/chariotsolutions/AppSpec.scala
Scala
mit
1,147
package at.forsyte.apalache.tla.bmcmt import at.forsyte.apalache.tla.bmcmt.SymbStateRewriter.Continue import at.forsyte.apalache.tla.bmcmt.types.IntT import at.forsyte.apalache.tla.lir.NameEx import at.forsyte.apalache.tla.lir.convenience._ import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner @RunWi...
konnov/apalache
tla-bmcmt/src/test/scala/at/forsyte/apalache/tla/bmcmt/TestSymbStateRewriterAction.scala
Scala
apache-2.0
864
/* * 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 ...
darionyaphet/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
Scala
apache-2.0
32,561
package monocle.state object all extends StateLensSyntax
NightRa/Monocle
state/src/main/scala/monocle/state/All.scala
Scala
mit
58
import scala.language.experimental.macros import scala.reflect.macros.blackbox.Context object Macros { def defaultZeroCase(pf: PartialFunction[Int, Int]): PartialFunction[Int, Int] = macro impl def impl(c: Context)(pf: c.Tree) = { import c.universe._ val q"{ case ..$cases }" = pf q"{ case ..$cases case _ =...
loskutov/intellij-scala
testdata/scalacTests/macros/t8411/Macros_1.scala
Scala
apache-2.0
333
/* Copyright (c) 2016 Lucas Satabin * * 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...
satabin/lingua
fst/src/main/scala/lingua/fst/WNFst.scala
Scala
apache-2.0
13,887
package com.github.tminglei.slickpg package agg import slick.ast._ import slick.lifted._ import slick.util.ConstArray import slick.ast.Util.nodeToNodeOps import slick.lifted.Rep.TypedRep /** An aggregate function call expression */ final case class AggFuncExpr( aggFunc: FunctionSymbol, params: ConstArray[Node], ...
TimothyKlim/slick-pg
core/src/main/scala/com/github/tminglei/slickpg/agg/PgAggFuncCore.scala
Scala
bsd-2-clause
4,158
/** * 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...
darrendao/kafka.play.time
core/src/test/scala/other/kafka/TestLogCleaning.scala
Scala
apache-2.0
13,295
/* * 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 ...
lhfei/spark-in-action
spark-3.x/src/main/scala/org/apache/spark/examples/ml/BisectingKMeansExample.scala
Scala
apache-2.0
2,161
/* * Copyright 2011-2021 Asakusa Framework Team. * * 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 ...
asakusafw/asakusafw-spark
tools/asm4s/src/main/scala/com/asakusafw/spark/tools/asm4s/Mixing.scala
Scala
apache-2.0
5,897
var occupations = scala.collection.mutable.Map( "Malcolm" -> "Captain", "Kaylee" -> "Mechanic" ) occupations("Jayne") = "Public Relations"
leverich/swiftislikescala
comparisons/collections/maps/scala.scala
Scala
mit
147
package com.chobostudy.loustler.datastructure import org.scalatest.FunSuite import com.chobostudy.loustler.datastructure.{SolutionP55 => List} /** * @author loustler * @since 09/06/2017 23:46 */ class SolutionP55Test extends FunSuite { test("The list should be startsWith some..") { val l = List(3, 4, 5, ...
codechobostudy/FPIS
src/test/scala/com/chobostudy/loustler/datastructure/SolutionP55Test.scala
Scala
apache-2.0
853
package com.crunchdevelopment.twitterstreaming.core import akka.actor.{ActorLogging, Props} import akka.io._ import akka.pattern.ask import com.crunchdevelopment.twitterstreaming.core.TwitterStreamBackendActor.Protocol.TrackStatusRequest import com.crunchdevelopment.twitterstreaming.core.TwitterStreamSupervisor.Protoc...
alexanderscott/akka-twitter-streaming-cluster
src/main/scala/com/crunchdevelopment/twitterstreaming/core/TwitterStreamFrontendActor.scala
Scala
apache-2.0
2,116
/* * Copyright 2011-2021 Asakusa Framework Team. * * 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 ...
asakusafw/asakusafw-spark
runtime/src/test/scala/com/asakusafw/spark/runtime/graph/DirectOutputPrepareSpec.scala
Scala
apache-2.0
13,301
package com.lyrx.text.bib /* @article{einstein, author = "Albert Einstein", title = "{Zur Elektrodynamik bewegter K{\\"o}rper}. ({German}) [{On} the electrodynamics of moving bodies]", journal = "Annalen der Physik", volume = "322", number = "10", pages = "891--921", year = ...
lyrx/lyrxgenerator
src/main/scala/com/lyrx/text/bib/Article.scala
Scala
gpl-3.0
838
package org.scalafmt.dynamic import munit.FunSuite class ScalafmtVersionSuite extends FunSuite { test("parse valid versions") { assertEquals( ScalafmtVersion.parse("2.0.0"), Some(ScalafmtVersion(2, 0, 0)) ) assertEquals( ScalafmtVersion.parse("0.1.3"), Some(ScalafmtVersion(0, 1, ...
scalameta/scalafmt
scalafmt-dynamic/src/test/scala/org/scalafmt/dynamic/ScalafmtVersionSuite.scala
Scala
apache-2.0
3,238
package com.sk.app.proxmock.application.domain.providers.headers import java.util.Objects._ import com.fasterxml.jackson.annotation.{JsonCreator, JsonIgnoreProperties} import com.sk.app.proxmock.application.configuration.ConfigurationContext import org.springframework.messaging.Message /** * Created by Szymon on 04...
szymonkudzia/proxmock
sources/src/main/scala/com/sk/app/proxmock/application/domain/providers/headers/StaticHeadersProvider.scala
Scala
mit
806
object This extends App { trait A { def foo(): Unit } abstract class C { self: A => def bar() = this.foo() } class D extends C with A { def foo() = () } val c: C = new D }
yusuke2255/dotty
tests/pos/scoping1.scala
Scala
bsd-3-clause
197
/* * 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/amls-frontend
test/models/businessactivities/NCARegisteredSpec.scala
Scala
apache-2.0
2,697
package dnd5_dm_db.lang package object eng { def plural(i : Int) = if(i>1) "s" else "" }
lorilan/dnd5_dm_db
src/main/scala/dnd5_dm_db/lang/eng/package.scala
Scala
gpl-3.0
101
/* * 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...
scottcutts/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v2/RDQ1.scala
Scala
apache-2.0
783
/* * Copyright 2016 Heiko Seeberger * * 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...
hseeberger/gabbler
gabbler-chat/src/main/scala/de/heikoseeberger/gabbler/chat/ChatApp.scala
Scala
apache-2.0
2,343
package mimir.algebra; class NullTypeException(found: Type, expected: Type, detail:String, context:Option[Expression] = None) extends TypeException( found, expected, detail, context );
UBOdin/mimir
src/main/scala/mimir/algebra/NullTypeException.scala
Scala
apache-2.0
214
package app import service._ import util._ import util.StringUtil._ import util.Directory._ import util.ControlUtil._ import util.Implicits._ import ssh.SshUtil import jp.sf.amateras.scalatra.forms._ import org.apache.commons.io.FileUtils import org.scalatra.i18n.Messages import org.eclipse.jgit.api.Git import org.ecl...
tb280320889/TESTTB
src/main/scala/app/AccountController.scala
Scala
apache-2.0
17,516
/* * Copyright 2001-2008 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
svn2github/scalatest
src/main/scala/org/scalatest/PropSpecLike.scala
Scala
apache-2.0
10,208
package mesosphere.marathon package core.leadership.impl import akka.actor.{PoisonPill, Status} import akka.testkit.{TestActorRef, TestProbe} import mesosphere.AkkaUnitTest import mesosphere.marathon.core.leadership.PreparationMessages import scala.concurrent.duration._ class LeadershipCoordinatorActorTest extends A...
gsantovena/marathon
src/test/scala/mesosphere/marathon/core/leadership/impl/LeadershipCoordinatorActorTest.scala
Scala
apache-2.0
4,810
/* * 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 ...
lxsmnv/spark
core/src/main/scala/org/apache/spark/deploy/history/ApplicationCache.scala
Scala
apache-2.0
14,361
/*********************************************************************** * 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-lambda/geomesa-lambda-tools/src/main/scala/org/locationtech/geomesa/lambda/tools/stats/LambdaStatsBoundsCommand.scala
Scala
apache-2.0
1,426
package com.krrrr38.mackerel4s package model object Types { type ApiKey = String type Path = String type HostID = String type HostName = String type MetricName = String type MetricLabel = String type ServiceName = String type RoleName = String type RoleFullname = String type MonitorID = String ty...
krrrr38/mackerel-client-scala
src/main/scala/com/krrrr38/mackerel4s/model/Types.scala
Scala
mit
395
package es.weso.regex import org.scalameter.api._ object GenRegex extends PerformanceTest.Quickbenchmark { def genAnds(n:Int): Regex = { def mkSeq(re: Regex, n:Int): Regex = Seq(re,Symbol(Set('a'))) (0 to n).toList.foldLeft(Empty: Regex)(mkSeq) } val sizes: Gen[Int] = Gen.range("size")(0, 1000, 100) ...
labra/regexcala
src/test/scala/performance/GenRegex.scala
Scala
mit
596
/* * Copyright 2015 LG CNS. * * 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 ...
jhshin9/scouter
scouter.server/src/scouter/server/ShutdownManager.scala
Scala
apache-2.0
1,340
/** * Copyright 2015 Ram Sriharsha * * 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 i...
YanjieGao/magellan
src/main/scala/magellan/mapreduce/DBInputFormat.scala
Scala
apache-2.0
1,432
package strd.net.http.matching import strd.net.http._ import scala.util.Try /** * @author Kirill chEbba Chebunin */ trait ParamMatcher[A] { def unapply(params: MultiStringMap): Option[A] } class ScalarParam[A](name: String)(implicit parser: ScalarParser[A]) extends ParamMatcher[A] { def unapply(params: MultiS...
onerinvestments/strd
strd-commons/src/main/scala/strd/net/http/matching/ParamMatcher.scala
Scala
apache-2.0
706
package com.example import akka.actor.ActorSystem import akka.http.scaladsl.Http import akka.stream.ActorMaterializer import com.example.dao.PostTableImpl import com.example.service.{HealthCheckServiceImpl, PostService} import com.typesafe.config.ConfigFactory import scalikejdbc.config.DBs object Main { def main(ar...
ocadaruma/introduction-to-kubernetes
app/src/main/scala/com/example/Main.scala
Scala
mit
957
package chapter.six import ExerciseFive.Reverse import org.scalatest._ import org.scalatest.junit.JUnitRunner import org.junit.runner.RunWith @RunWith(classOf[JUnitRunner]) class ExerciseFiveSpec extends FlatSpec with Matchers { // todo: http://stackoverflow.com/questions/7218400/scalatest-how-to-test-println "...
deekim/impatient-scala
src/test/scala/chapter/six/ExerciseFiveSpec.scala
Scala
apache-2.0
441
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
pgandhi999/spark
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala
Scala
apache-2.0
12,212
/* * 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 writing, software * distribute...
wvlet/airframe
airframe-parquet/src/test/scala/wvlet/airframe/parquet/ParquetQueryPlannerTest.scala
Scala
apache-2.0
1,565
package java.time.chrono import java.time.temporal.{Temporal, TemporalAmount} import java.time.temporal.TemporalUnit trait ChronoPeriod extends TemporalAmount { def getChronology(): Chronology def isZero(): Boolean = forallUnits(get(_) == 0) def isNegative(): Boolean = !forallUnits(get(_) >= 0) def plus(am...
sjrd/scala-js-java-time
src/main/scala/java/time/chrono/ChronoPeriod.scala
Scala
bsd-3-clause
1,013
package org.mitlware import scalaz._ import scalaz.MonadState._ // TODO: should be replaced by implicit Lens arguments, but we need to evaluate usability first trait TemperatureView { def getTemperature : Double def setTemperature( temperature : Double ) : this.type } object Temperature { def get[Env <: Te...
MitLware/MitLware-scala
src/org/mitlware/Temperature.scala
Scala
bsd-3-clause
503
/* * 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 ...
jatin9896/incubator-carbondata
store/search/src/main/scala/org/apache/spark/rpc/Worker.scala
Scala
apache-2.0
4,721
/* * Copyright (C) 2015 Stratio (http://stratio.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
fjsc/sparta
serving-core/src/main/scala/com/stratio/sparta/serving/core/models/policy/files/JarFilesResponse.scala
Scala
apache-2.0
760
/** * Copyright (C) 2016 Orbeon, Inc. * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. * * This program i...
orbeon/orbeon-forms
src/main/scala/org/orbeon/oxf/processor/converter/JsonToTextConverter.scala
Scala
lgpl-2.1
1,737
package circumflex package cluster import java.io.File class ModuleBuildJob(val cluster: Cluster) extends ProcessMonitor { def key = "module-mci" def builder = cluster.project.mvn("clean", "install") } class ProjectBuildJob(val cluster: Cluster) extends ProcessMonitor { def key = "project-mci" d...
inca/circumflex
cluster/src/main/scala/job.scala
Scala
bsd-2-clause
3,315
// // Copyright 2016 Commonwealth Bank of Australia // // 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 ...
CommBank/coppersmith
core/src/main/scala/commbank/coppersmith/FeatureContext.scala
Scala
apache-2.0
836
/* * 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.tools.testkit i...
martijnhoekstra/scala
test/junit/scala/tools/testkit/AssertThrowsTest.scala
Scala
apache-2.0
2,180