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 2014-2021 Netflix, 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...
brharrington/atlas
atlas-eval/src/test/scala/com/netflix/atlas/eval/stream/HostSourceSuite.scala
Scala
apache-2.0
5,843
package org.jetbrains.plugins.scala.lang.psi.types.api import com.intellij.psi.PsiTypeParameter import org.jetbrains.plugins.scala.extensions.PsiNamedElementExt import org.jetbrains.plugins.scala.lang.psi.api.statements.params.{PsiTypeParameterExt, ScTypeParam} import org.jetbrains.plugins.scala.lang.psi.types.{NamedT...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/types/api/TypeParameterType.scala
Scala
apache-2.0
3,837
/* * Copyright (C) 2010 Lalit Pant <pant.lalit@gmail.com> * * The contents of this file are subject to the GNU General Public License * Version 3 (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.gnu.org/copyleft/gpl.html * *...
richardfontana/fontana2007-t
KojoEnv/src/net/kogics/kojo/geogebra/MwShape.scala
Scala
gpl-3.0
2,138
import _root_.io.gatling.core.scenario.Simulation import ch.qos.logback.classic.{Level, LoggerContext} import io.gatling.core.Predef._ import io.gatling.http.Predef._ import org.slf4j.LoggerFactory import scala.concurrent.duration._ /** * Performance test for the HipchatBot entity. */ class HipchatBotGatlingTest ex...
iMartinezMateu/gamecraft
gamecraft-hipchat-notification-manager/src/test/gatling/user-files/simulations/HipchatBotGatlingTest.scala
Scala
mit
3,631
package edu.rice.habanero.benchmarks.bndbuffer import edu.rice.habanero.actors.{FuncJavaActor, FuncJavaActorState, FuncJavaPool} import edu.rice.habanero.benchmarks.bndbuffer.ProdConsBoundedBufferConfig._ import edu.rice.habanero.benchmarks.{Benchmark, BenchmarkRunner} import scala.collection.mutable.ListBuffer /** ...
shamsmahmood/savina
src/main/scala/edu/rice/habanero/benchmarks/bndbuffer/ProdConsFuncJavaActorBenchmark.scala
Scala
gpl-2.0
5,846
trait FlowExamples { import flowlib._ import ProcessUtil._ import Producers._ import Gate._ import Flow._ type A type A1 <: A type B type C type C1 <: C def s1: Source[A] def s2: Sink[B] def sa: Sink[Any] def c1: Channel[A] def c2: Channel[C1] def g1: Gate[B, A1] def p1: Source[A] =>...
arnolddevos/FlowLib
src/test/scala/example/FlowExamples.scala
Scala
lgpl-2.1
841
package pl.touk.nussknacker.engine.management import com.typesafe.scalalogging.LazyLogging import org.apache.flink.api.common.JobStatus import pl.touk.nussknacker.engine.{BaseModelData, ModelData} import pl.touk.nussknacker.engine.api.ProcessVersion import pl.touk.nussknacker.engine.api.deployment._ import pl.touk.nus...
TouK/nussknacker
engine/flink/management/src/main/scala/pl/touk/nussknacker/engine/management/FlinkRestManager.scala
Scala
apache-2.0
8,932
/* * Licensed to Tuplejump Software Pvt. Ltd. under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Tuplejump Software Pvt. Ltd. licenses this file * to you under the Apache License, Version 2.0 (the * "Li...
tuplejump/calliope
sql/core/src/main/scala/org/apache/spark/sql/CassandraCatalog.scala
Scala
apache-2.0
3,926
/* * 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 ...
kimoonkim/spark
resource-managers/kubernetes/integration-tests-spark-jobs/src/main/scala/org/apache/spark/deploy/kubernetes/integrationtest/jobs/SparkPiWithInfiniteWait.scala
Scala
apache-2.0
1,848
/* * Copyright 2019 CJWW Development * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
cjww-development/auth-service
app/forms/test/TearDownUserForm.scala
Scala
apache-2.0
1,020
/* * 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/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetIOSuite.scala
Scala
apache-2.0
28,051
/* * Copyright 2011-2017 Chris de Vreeze * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
dvreeze/yaidom
jvm/src/test/scala/eu/cdevreeze/yaidom/integrationtest/CreationTest.scala
Scala
apache-2.0
13,886
package gnieh.pp.tests import gnieh.pp._ class IndentTest extends PpTest { "the indent operator" should "indent text as block" in { val docs: List[Doc] = List("line1", "line2", "line3") val finalDoc = indent(2)(vcat(docs)) render80(finalDoc) should be(" line1\\n line2\\n line3") } it should "beh...
gnieh/tekstlib
src/test/scala/gnieh/pp/tests/IndentTest.scala
Scala
apache-2.0
638
// Copyright 2015,2016,2017,2018,2019,2020 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 req...
CommBank/grimlock
grimlock-core/src/test/scala/commbank/grimlock/TestWindows.scala
Scala
apache-2.0
38,073
package com.sksamuel.elastic4s.requests.searches.queries.term import com.sksamuel.elastic4s.json.{XContentBuilder, XContentFactory} import com.sksamuel.elastic4s.requests.searches.queries.FuzzyQuery object FuzzyQueryBodyFn { def apply(q: FuzzyQuery): XContentBuilder = { val builder = XContentFactory.jsonBuilde...
stringbean/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/queries/term/FuzzyQueryBodyFn.scala
Scala
apache-2.0
803
package org.allenai.common.webapp import org.allenai.common.testkit.UnitSpec import spray.http.{ HttpHeader, HttpHeaders, HttpOrigin, SomeOrigins } import spray.routing.HttpService import spray.testkit.ScalatestRouteTest /** Tests for our custom directives. */ class DirectivesSpec extends UnitSpec with ScalatestRout...
ryanai3/common
webapp/src/test/scala/org/allenai/common/webapp/DirectivesSpec.scala
Scala
apache-2.0
4,342
package net.combinatory.rtm /* (c) rtm-scala contributors, 2012. All rights reserved. */ trait Logger { protected[this] def logw(ref: AnyRef) = () protected[this] def logd(ref: AnyRef) = () protected[this] def loge(ref: AnyRef) = () protected[this] def loge(err: Throwable) = () }
comb/rtm-scala
src/main/scala/net/combinatory/rtm/Logger.scala
Scala
apache-2.0
293
package org.apache.mesos.chronos.scheduler.config import org.rogach.scallop.ScallopConf trait CassandraConfiguration extends ScallopConf { lazy val cassandraContactPoints = opt[String]("cassandra_contact_points", descr = "Comma separated list of contact points for Cassandra", default = None) lazy val ca...
tony-kerz/chronos
src/main/scala/org/apache/mesos/chronos/scheduler/config/CassandraConfiguration.scala
Scala
apache-2.0
1,316
/* * 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 ...
rezasafi/spark
core/src/main/scala/org/apache/spark/ui/ConsoleProgressBar.scala
Scala
apache-2.0
4,484
package moe.pizza.eveapi.endpoints import moe.pizza.eveapi.generated.account import moe.pizza.eveapi._ import org.http4s.client.Client class Account(baseurl: String, apikey: Option[XmlApiKey])(implicit c: Client) { def AccountStatus() = new ApiRequest[account.AccountStatus.Eveapi](baseurl, "Account/AccountStatu...
xxpizzaxx/pizza-eveapi
src/main/scala/moe/pizza/eveapi/endpoints/Account.scala
Scala
mit
912
package com.jensraaby.restbucks.controllers import javax.inject.Inject import com.jensraaby.restbucks.orders.{Order, OrderService} import com.twitter.finagle.http.Request import com.twitter.finatra.http.Controller import com.twitter.inject.domain.WrappedValue case class WrappedOrder(data: OrderReq) extends WrappedV...
jensraaby/restbucks-finatra
src/main/scala/com/jensraaby/restbucks/controllers/OrderController.scala
Scala
mit
796
/* Copyright 2013 Twitter, 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 agreed to in writing, software distr...
surabhiiyer/summingbird
summingbird-online/src/main/scala/com/twitter/summingbird/online/executor/FinalFlatMap.scala
Scala
apache-2.0
3,763
package concrete.generator.cspompatterns import cspom.CSPOM._ import cspom.CSPOMConstraint import cspom.compiler.ACCSE import cspom.variable._ sealed trait MinMaxType { def function: String } case object MinType extends MinMaxType { def function = "min" } case object MaxType extends MinMaxType { def function ...
concrete-cp/concrete
src/main/scala/concrete/generator/cspompatterns/ACCSE_MinMax.scala
Scala
lgpl-2.1
2,123
// scalac: -Ymacro-annotations -Wunused:params -Werror @mymacro class X object Test { println(X.f(123)) }
lrytz/scala
test/files/pos/macro-annot-unused-param/Test_2.scala
Scala
apache-2.0
109
package lore.compiler.semantics.core import lore.compiler.semantics.NamePath import lore.compiler.types.{BasicType, TraitSchema, Type, TypeSchema} /** * A core trait is a trait that the compiler might directly depend on. For example, type introspection works with a * `Type` trait that represents run-time types. ...
marcopennekamp/lore
compiler/src/lore/compiler/semantics/core/CoreTrait.scala
Scala
mit
771
package com.wavesplatform.it.async import com.typesafe.config.{Config, ConfigFactory} import com.wavesplatform.it.BaseFreeSpec import com.wavesplatform.it.NodeConfigs.Default import com.wavesplatform.it.api.AsyncHttpApi._ import com.wavesplatform.test._ import scala.concurrent.Future.traverse import scala.concurrent....
wavesplatform/Waves
node-it/src/test/scala/com/wavesplatform/it/async/MicroblocksFeeTestSuite.scala
Scala
mit
3,752
// This test case used to fail when mixin forwarders were generated before erasure, // it doesn't anymore since the forwarders generated after erasure do not clash, // the comments are preserved for posterity. class Foo trait One[X] { def concat(suffix: Int): X = ??? } trait Two[Y <: Foo] { def concat[Dummy](suf...
som-snytt/dotty
tests/pos/mixin-forwarder-clash1.scala
Scala
apache-2.0
1,290
/** * Copyright (c) 2016 Intel Corporation  * * 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 applicabl...
ashaarunkumar/spark-tk
sparktk-core/src/main/scala/org/trustedanalytics/sparktk/graph/internal/ops/orientdb/VertexWriter.scala
Scala
apache-2.0
3,025
package lostvaults.tests import org.scalatest.FunSuite import lostvaults.server.Room class RoomTest extends FunSuite { // implicit lazy val system = ActorSystem("RoomSystem") var room = new Room() val TestMan = "testman" val playerList: List[String] = List("Philip", "Jimmy", "Anna", "Felix", "Fredrik") te...
senilica/LostVaults
src/lostvaults/tests/RoomTest.scala
Scala
mit
2,064
package scife.enumeration trait Empty extends Finite[Nothing] { override def size = 0 override def apply(ind: Int) = throw new NoSuchElementException("no elements in Empty") } object Empty extends Empty
kaptoxic/SciFe
src/main/scala/scife/enumeration/Empty.scala
Scala
gpl-2.0
212
/*** * Copyright 2014 Rackspace US, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
rackerlabs/api-checker
core/src/test/scala/com/rackspace/com/papi/components/checker/ValidatorWADLDestroySuite.scala
Scala
apache-2.0
2,842
package org.scalaide.ui.internal.preferences import scala.collection.mutable.ListBuffer import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer import org.eclipse.jface.preference.ColorFieldEditor import org.eclipse.jface.preference.PreferencePage import org.eclipse.swt.SWT import org.eclipse.swt.la...
stephenh/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/ui/internal/preferences/EditorPreferencePage.scala
Scala
bsd-3-clause
6,327
import sbt._ class TestProject(info: ProjectInfo) extends ParentProject(info) { val addRepo = "Extra Test Repository" at "http://dev.camptocamp.com/files/m2_repo/" val sub = project("sub", "Sub Project", new SubProject(_)) def ivyCacheDirectory = outputPath / "ivy-cache" override def updateOptions = CacheDirector...
sbt/sbt-zero-seven
src/sbt-test/dependency-management/inherit-repo/changes/CorrectProject.scala
Scala
bsd-3-clause
743
package spark import org.slf4j.Logger import org.slf4j.LoggerFactory /** * Utility trait for classes that want to log data. Creates a SLF4J logger for the class and allows * logging messages at different levels using methods that only evaluate parameters lazily if the * log level is enabled. */ trait Logging { ...
joeywen/spark_cpp_api
core/src/main/scala/spark/Logging.scala
Scala
bsd-3-clause
2,259
/* * Copyright (c) 2014-16 Miles Sabin * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
liff/shapeless
core/src/main/scala/shapeless/labelled.scala
Scala
apache-2.0
5,756
package coursier.cache sealed abstract class CachePolicy extends Product with Serializable { def acceptChanging: CachePolicy.Mixed def rejectChanging: CachePolicy.NoChanging def acceptsChangingArtifacts: Boolean } object CachePolicy { sealed abstract class Mixed extends CachePolicy { def acceptChanging: ...
alexarchambault/coursier
modules/cache/jvm/src/main/scala/coursier/cache/CachePolicy.scala
Scala
apache-2.0
3,632
/* * Copyright 2015 Textocat * * 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 la...
Denis220795/Textokit
Textokit.PhraseRecognizer/src/main/scala/com/textocat/textokit/phrrecog/NPRecognizer.scala
Scala
apache-2.0
3,169
package chapter16 import scala.xml.Elem object Exercise8 extends App { def toMap(dl: Elem): Map[String, String] = { val terms = (dl \\ "dt").map(_.text) val descs = (dl \\ "dd").map(_.text) (terms zip descs).toMap } val dl = <dl> <dt>A</dt> <dd>1</dd> <dt>B</dt> <dd>2</dd...
vsuharnikov/books-exercises
scala/scala-for-the-impatient/src/main/scala/chapter16/Exercise8.scala
Scala
mit
354
/* * 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. */ // DO NOT EDIT, CHANGES WILL B...
scala/scala
src/library/scala/Long.scala
Scala
apache-2.0
16,552
/** * Copyright 2016, 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
deeplang/src/main/scala/io/deepsense/deeplang/doperations/readwritedataframe/FilePathFromLibraryPath.scala
Scala
apache-2.0
986
package dotty.tools.dotc package transform import dotty.tools.dotc.transform.TreeTransforms.{TransformerInfo, TreeTransform, TreeTransformer} import dotty.tools.dotc.ast.{Trees, tpd} import scala.collection.{ mutable, immutable } import ValueClasses._ import scala.annotation.tailrec import core._ import Types._, Conte...
yusuke2255/dotty
src/dotty/tools/dotc/transform/SuperAccessors.scala
Scala
bsd-3-clause
18,889
package cromwell.util import java.sql.SQLTransientException import akka.actor.ActorSystem import cromwell.core.retry.{Retry, SimpleExponentialBackoff} import scala.concurrent.Future import scala.concurrent.duration._ import scala.language.postfixOps object DatabaseUtil { private def isTransient(throwable: Throwab...
ohsu-comp-bio/cromwell
core/src/main/scala/cromwell/util/DatabaseUtil.scala
Scala
bsd-3-clause
688
// Copyright (c) 2013-2020 Rob Norris and Contributors // This software is licensed under the MIT License (MIT). // For more information see LICENSE or https://opensource.org/licenses/MIT package doobie.postgres import doobie.Meta import doobie.enumerated.{JdbcType => JT} import doobie.util.meta.MetaConstructors imp...
tpolecat/doobie
modules/postgres/src/main/scala/doobie/postgres/JavaTimeInstances.scala
Scala
mit
3,188
package com.monsanto.arch.cloudformation.model.resource import com.monsanto.arch.cloudformation.model.{ ResourceRef, Template, Token } import org.scalatest.{ FunSpec, Matchers } import spray.json._ class CodeCommit_UT extends FunSpec with Matchers { val repo = `AWS::CodeCommit::Repository`( name = "RepoFoo", ...
MonsantoCo/cloudformation-template-generator
src/test/scala/com/monsanto/arch/cloudformation/model/resource/CodeCommit_UT.scala
Scala
bsd-3-clause
1,745
/* * 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/data
hibernate/src/test/scala/org/beangle/data/hibernate/naming/RailsNamingPolicyTest.scala
Scala
lgpl-3.0
1,756
package wow import akka.actor.{Actor, ActorLogging, ActorSystem, Props, SupervisorStrategy} import akka.http.scaladsl.settings.ServerSettings import pureconfig._ import scalikejdbc.ConnectionPool import wow.api.WebServer import wow.auth.{AccountsState, AuthServer} import wow.common.config.deriveIntMap import wow.commo...
SKNZ/SpinaciCore
wow/core/src/main/scala/wow/Application.scala
Scala
mit
1,922
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.javadsl.testkit import java.time.LocalDateTime import java.time.format.DateTimeFormatter import java.util.Optional import java.util.function.{ Function => JFunction } import akka.actor.ActorSystem import akka.annotation.Ap...
lagom/lagom
testkit/javadsl/src/main/scala/com/lightbend/lagom/javadsl/testkit/ServiceTest.scala
Scala
apache-2.0
16,935
package structures import simulacrum.{ noop, op, typeclass } @typeclass trait FlatMap[F[_]] extends Any with Apply[F] { @op(">>=", alias = true) def flatMap[A, B](fa: F[A])(f: A => F[B]): F[B] def flatten[A, B](ffa: F[F[A]]): F[A] = flatMap(ffa)(identity) @noop override def apply[A, B](fa: F[A])(f: F[A...
mpilquist/Structures
core/shared/src/main/scala/structures/FlatMap.scala
Scala
bsd-3-clause
362
package microtools.anyops import org.scalatest.{MustMatchers, WordSpec} import microtools.anyops.AutoAnyValNumeric._ import scala.math.Numeric.Implicits._ import scala.math.Fractional.Implicits._ case class Bauer(value: Int) extends AnyVal case class Ralph(value: Double) extends AnyVal class AnuValNumericOperatio...
21re/play-micro-tools
src/test/scala/microtools/anyops/AnyValNumericOperationsSpec.scala
Scala
mit
979
package mesosphere.mesos.simulation import java.util import java.util.Collections import akka.actor.{ActorRef, ActorSystem, Props} import com.typesafe.config.{Config, ConfigFactory} import com.typesafe.scalalogging.StrictLogging import scala.jdk.CollectionConverters._ import org.apache.mesos.Protos._ import org.apach...
mesosphere/marathon
mesos-simulation/src/main/scala/mesosphere/mesos/simulation/SimulatedDriver.scala
Scala
apache-2.0
4,814
import leon.lang._ import leon.lang.synthesis._ // Examples taken from http://lara.epfl.ch/~psuter/spt/ object SynthesisProceduresToolkit { def e1(a: Nat, b: Nat, c: Nat): Nat = if ((b == c)) { if ((a == c)) { (choose { (x: Nat) => (x != a) }) } else { (choose { (x: Nat) => ((x != a) && ...
ericpony/scala-examples
testcases/synthesis/Spt.scala
Scala
mit
1,701
package nounou ///** // * @author ktakagaki // * // //@date 3/17/14. // */ ///**Base class for all options*/ //abstract class Opt ///Individual Options /**Option values: window function for filter design.*/ abstract class OptSpikeDetectorFlush extends Opt object OptSpikeDetectorFlush { case object All extends Opt...
ktakagaki/nounou.rebooted150527
src/main/scala/nounou/Options.scala
Scala
apache-2.0
877
package org.jetbrains.plugins.scala.highlighter import com.intellij.openapi.project.Project import org.jetbrains.plugins.scala.settings.{ScalaProjectSettings, ScalaProjectSettingsUtil} /** * @author Roman.Shein * Date: 11.01.2016 */ object ScalaTestHighlighterUtil { private val scalaTestKeywords = ...
gtache/intellij-lsp
intellij-lsp-dotty/src/org/jetbrains/plugins/scala/highlighter/ScalaTestHighlighterUtil.scala
Scala
apache-2.0
848
package controllers import scala.concurrent.duration._ import views._ import lila.app._ import lila.common.IpAddress final class Search(env: Env) extends LilaController(env) { def searchForm = env.gameSearch.forms.search private val SearchRateLimitPerIP = new lila.memo.RateLimit[IpAddress]( credits = 50, ...
luanlv/lila
app/controllers/Search.scala
Scala
mit
3,599
/* * 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 ...
ueshin/apache-flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/expressions/validation/MapTypeValidationTest.scala
Scala
apache-2.0
2,076
/** * ***************************************************************************** * Copyright 2014 Katja Hahn * * 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...
katjahahn/PortEx
src/main/java/com/github/katjahahn/parser/sections/reloc/RelocationSection.scala
Scala
apache-2.0
3,837
import _root_.io.gatling.core.scenario.Simulation import ch.qos.logback.classic.{Level, LoggerContext} import io.gatling.core.Predef._ import io.gatling.http.Predef._ import org.slf4j.LoggerFactory import scala.concurrent.duration._ /** * Performance test for the File entity. */ class FileGatlingTest extends Simula...
eballerini/dictionary
src/test/gatling/simulations/FileGatlingTest.scala
Scala
mit
3,335
package models class DuplicatedUserNameException(val userName: String) extends Exception("User name '" + userName + "' is duplicated.")
ruimo/store2
app/models/DuplicatedUserNameException.scala
Scala
apache-2.0
137
package feh.phtpe import feh.phtpe.Prefixes._ import org.specs2.Specification class PhysTypedPrefixSpec extends Specification { def is = "SI Prefixes\n".title ^ new PhysTypedIncrementalPrefixSpec ^ new PhysTypedDecrementalPrefixSpec ^ new NumericOverflow ^ new PhysTypedBundledPrefixSpec } class Phy...
fehu/phtpe
phtpe/src/test/scala/feh/phtpe/PhysTypedPrefixSpec.scala
Scala
mit
5,016
/* Copyright 2013 Twitter, 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 agreed to in writing, software...
rangadi/summingbird
summingbird-core/src/main/scala/com/twitter/summingbird/viz/ProducerViz.scala
Scala
apache-2.0
2,414
package io.scalac.seed.route import akka.actor._ import io.scalac.seed.domain.VehicleAggregate import io.scalac.seed.service._ import spray.httpx.Json4sSupport import spray.routing._ import spray.routing.authentication.BasicAuth object VehicleRoute { case class UpdateVehicleData(value: String) } trait VehicleRoute...
ScalaConsultants/akka-persistence-eventsourcing
src/main/scala/io/scalac/seed/route/VehicleRoute.scala
Scala
apache-2.0
2,237
package monocle.function import monocle.{Iso, Optional} import scala.annotation.{implicitNotFound, tailrec} import scala.collection.immutable.{ListMap, SortedMap} import scala.util.Try /** * Typeclass that defines an [[Optional]] from an `S` to an `A` at an index `I` * [[Index]] is less powerful than [[At]] as i...
aoiroaoino/Monocle
core/shared/src/main/scala/monocle/function/Index.scala
Scala
mit
5,167
object Test { def f[F](f: [t] => t => F): Unit = () f([t] => (x: t) => x) }
dotty-staging/dotty
tests/pos/i8900-polyfunction.scala
Scala
apache-2.0
81
/** * Copyright 2011 Cape Henry Technologies 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 la...
dlwhitehurst/accounting-model
src/main/java/com/citechnical/model/acct/AccountBalance.scala
Scala
apache-2.0
879
/*********************************************************************** * 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-convert/geomesa-convert-common/src/test/scala/org/locationtech/geomesa/convert2/transforms/MiscFunctionFactoryTest.scala
Scala
apache-2.0
2,244
/* * sbt * Copyright 2011 - 2018, Lightbend, Inc. * Copyright 2008 - 2010, Mark Harrah * Licensed under Apache License 2.0 (see LICENSE) */ package sbt.internal.bsp import sbt.internal.bsp.codec.JsonProtocol.BspConnectionDetailsFormat import sbt.io.IO import sjsonnew.support.scalajson.unsafe.{ CompactPrinter, Co...
sbt/sbt
protocol/src/main/scala/sbt/internal/bsp/BuildServerConnection.scala
Scala
apache-2.0
2,579
import sbt._ import Keys._ import PlayProject._ object ApplicationBuild extends Build { val appName = "sample" val appVersion = "1.0" val appDependencies = Seq( // Add your project dependencies here, ) val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAV...
beni55/giter8
sample/project/Build.scala
Scala
lgpl-3.0
390
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
intel-analytics/BigDL
scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/utils/tf/loaders/AvgPool.scala
Scala
apache-2.0
2,278
/* * 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 ...
zuotingbing/spark
core/src/main/scala/org/apache/spark/status/LiveEntity.scala
Scala
apache-2.0
29,386
package models import com.mongodb.casbah.Imports._ import core.utils.TypeUtils.nullToNone /** * Message container. */ case class Grunt( id: Option[ObjectId], userId: ObjectId, originalMessage: Option[ObjectId], regrunts: List[ObjectId], favorites: List[ObjectId], message: String, timesta...
maximx1/openwalrus
app/models/Grunt.scala
Scala
mit
1,375
package incognito.utils import scala.util.Random import java.io.File import java.io.PrintWriter import org.apache.spark.rdd.RDD import scala.collection.Map import incognito.rdd.Data import breeze.linalg.Vector import org.apache.spark.broadcast.Broadcast import scala.collection.mutable.ArrayBuffer import org.apache.sp...
achak1987/SparkAnonymizationToolkit
src/main/scala/incognito/utils/Utils.scala
Scala
apache-2.0
2,653
import stainless.annotation._ import stainless.lang._ import stainless.io._ object Nested { @cCode.`export` def main(): Int = { f(100) } def f(x: Int): Int = { require(0 <= x && x <= 100) def gg(y: Int): Int = { require(0 <= y && y <= 100) x + y } val res = gg(15) StdOut...
epfl-lara/stainless
frontends/benchmarks/genc/valid/Nested.scala
Scala
apache-2.0
359
/* * Licensed to SequoiaDB (C) under one or more contributor license agreements. * See the NOTICE file distributed with this work for additional information * regarding copyright ownership. The SequoiaDB (C) licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use t...
SequoiaDB/spark-sequoiadb
src/main/scala/com/sequoiadb/spark/SequoiadbConfig.scala
Scala
apache-2.0
6,238
/* * 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 ...
xieguobin/Spark_2.0.0_cn1
ml/feature/IDF.scala
Scala
apache-2.0
5,583
#! /bin/sh exec scala "$0" "$@" !# // This is how you create an array in Scala. Note several differences // between Scala and Java. First, the left-hand side does not have any // type specification. Second, the construction of the array on the // right-hand side is very different. In particular, we use the // designat...
umass-cs-220/week-02-principles-of-good-programming
code/scala-script/01-array.scala
Scala
apache-2.0
1,990
/* * 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 ...
xieguobin/Spark_2.0.0_cn1
ml/classification/MultilayerPerceptronClassifier.scala
Scala
apache-2.0
11,363
package chromex.notifications object onClicked { def addListener(callback: String => _): Unit = { chrome.notifications.onClicked.addListener(callback) } }
erdavila/auto-steamgifts
src/main/scala/chromex/notifications/onClicked.scala
Scala
mit
164
/* * 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 ...
aray/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/AggregateBenchmark.scala
Scala
apache-2.0
25,122
package org.abhijitsarkar.moviedb /** * @author Abhijit Sarkar */ object TestHelper { val movie = { Movie( "test", -1, Nil, "", "", Nil, Nil, Nil, Nil, "", "", -1, -1.0, "1" ) } val movies = { Seq(movie) } }
asarkar/akka
movie-db/src/test/scala/org/abhijitsarkar/moviedb/TestHelper.scala
Scala
gpl-3.0
318
/* * This file is part of AckCord, licensed under the MIT License (MIT). * * Copyright (c) 2019 Katrix * * 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, including ...
Katrix-/AckCord
commands/src/main/scala/ackcord/commands/cmdObjs.scala
Scala
mit
3,970
object Castles { trait Monoid[M] { def op(x: M, y: M): M def id: M } implicit object SumInt extends Monoid[Int] { def op(x: Int, y: Int) = x+y def id = 0 } class UnionFind[Node, M: Monoid] { private var map = Map[Node, Node]() private var m = Map[Node, M]() def find(x: Node): Node = map.get(x) matc...
tailcalled/GCCodeCompetition
GCCC/Samples/Castles.scala
Scala
agpl-3.0
1,648
package velocity import java.io.{BufferedReader,IOException,UnsupportedEncodingException} import java.security.Principal import java.util.{Enumeration,Locale,Map} import javax.servlet.{RequestDispatcher,ServletInputStream} import javax.servlet.http.{Cookie,HttpServletRequest,HttpSession} /** * @author bryanjswift ...
bryanjswift/quotidian
src/test/scala/velocity/DummyRequest.scala
Scala
mit
4,488
/*********************************************************************** * 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/Z2IndexKeySpace.scala
Scala
apache-2.0
6,937
/* * Copyright 2009-2017. DigitalGlobe, 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 ...
ngageoint/mrgeo
mrgeo-mapalgebra/mrgeo-mapalgebra-rastermath/src/main/scala/org/mrgeo/mapalgebra/LogMapOp.scala
Scala
apache-2.0
4,464
/* * 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 not u...
aokolnychyi/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/python/BatchEvalPythonExec.scala
Scala
apache-2.0
6,947
package controllers.cms.organization import play.api.mvc._ import play.api.i18n._ import play.api.data.Form import play.api.data.Forms._ import play.api.data.format.Formats._ import play.api.data.validation.Constraints._ import extensions.Formatters._ import controllers.OrganizationController import extensions.{ Missi...
delving/culture-hub
modules/cms/app/controllers/cms/organization/CMS.scala
Scala
apache-2.0
7,806
package lila.i18n import scalatags.Text.all._ import play.api.i18n.Lang import lila.common.String.html.escapeHtml object Translator { object frag { def literal(key: MessageKey, args: Seq[Any], lang: Lang): RawFrag = translate(key, lang, I18nQuantity.Other /* grmbl */, args) def plural(key: MessageK...
luanlv/lila
modules/i18n/src/main/Translator.scala
Scala
mit
2,586
/** * Original work: SecureSocial (https://github.com/jaliss/securesocial) * Copyright 2013 Jorge Aliss (jaliss at gmail dot com) - twitter: @jaliss * * Derivative work: Silhouette (https://github.com/mohiva/play-silhouette) * Modifications Copyright 2015 Mohiva Organisation (license at mohiva dot com) * * Licen...
mohiva/play-silhouette
silhouette/app/com/mohiva/play/silhouette/api/Identity.scala
Scala
apache-2.0
982
/* This file implements a trinarized convolution summation */ package binconcifar import chisel3._ import chisel3.util._ import scala.collection.mutable.ArrayBuffer object TriConvSum { def mapToWires[ T <: Bits ]( conv : Seq[Seq[Seq[Int]]], currData : Seq[Seq[Seq[T]]] ) : (Seq[T], Seq[T]) = { val po...
da-steve101/binary_connect_cifar
src/main/scala/binconcifar/TriConvSum.scala
Scala
gpl-3.0
12,311
package org.jetbrains.plugins.scala package annotator package modifiers import com.intellij.psi.PsiElement import com.intellij.psi.util.PsiTreeUtil import org.jetbrains.annotations.Nls import org.jetbrains.plugins.scala.annotator.quickfix.ModifierQuickFix import org.jetbrains.plugins.scala.extensions._ import org.jetb...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/annotator/modifiers/ModifierChecker.scala
Scala
apache-2.0
13,225
package inloopio.util.io import java.io._ class DataOutputStream(out: OutputStream) extends FilterOutputStream(out) with DataOutput { /** * The number of bytes written to the data output stream so far. * If this counter overflows, it will be wrapped to Integer.MAX_VALUE. */ var written = 0 /** * by...
dcaoyuan/inloopio-libs
inloopio-util/src/main/scala/inloopio/util/io/DataOutputStream.scala
Scala
bsd-3-clause
13,053
package com.azavea.gtfs case class RouteRecord( id: String, shortName: String, longName: String, routeType: RouteType, agencyId: Option[String] = None, description: Option[String] = None, url: Option[String] = None, color: Option[String] = None, textColor: Option[String] = None )
WorldBank-Transport/open-transit-indicators
scala/gtfs/src/main/scala/com/azavea/gtfs/RouteRecord.scala
Scala
gpl-3.0
300
package com.avsystem.scex package compiler.presentation.ast sealed trait Name { val name: String def isTerm = false def isType = false } case class TermName(name: String) extends Name { override def isTerm = true } object TermName { final val WILDCARD = TermName("_") final val ERROR = TermName("<error>...
pnf/scex
scex-core/src/main/scala/com/avsystem/scex/compiler/presentation/ast/Name.scala
Scala
apache-2.0
801
/* Copyright (C) 2008-2016 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
Craigacp/factorie
src/main/scala/cc/factorie/app/nlp/package.scala
Scala
apache-2.0
3,480
/* * ****************************************************************************** * * Copyright (C) 2013 Christopher Harris (Itszuvalex) * * Itszuvalex@gmail.com * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * * as p...
Itszuvalex/Femtocraft-alpha-1
src/main/java/com/itszuvalex/femtocraft/utils/WorldLocation.scala
Scala
gpl-2.0
3,331
package models.submission import java.{ io, nio, util }, io.{ ByteArrayInputStream, ByteArrayOutputStream, FileInputStream, InputStream }, nio.charset.Charset, util.zip.{ ZipEntry, ZipOutputStream } import org.joda.time.{ DateTime, format }, format.DateTimeFormat object WorkZipper { private v...
NetLogo/SimServer
app/models/submission/WorkZipper.scala
Scala
gpl-2.0
4,434
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
hequn8128/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/runtime/aggregate/DataSetWindowAggMapFunction.scala
Scala
apache-2.0
4,036
import sbt._ object Dependencies { lazy val testKit = Seq( "com.typesafe.akka" %% "akka-testkit" % "2.+", "org.scalatest" %% "scalatest" % "2.+" % "test", "org.scalactic" %% "scalactic" % "2.+" % "test", "org.scalacheck" %% "scalacheck" % "1.12.+" % "test", "net.databinder.dispatch" %% "dispatch...
ScorexProject/Scorex-Lagonaki
project/Dependencies.scala
Scala
cc0-1.0
1,281
/* * 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
datamap/mv/plan/src/main/scala/org/apache/carbondata/mv/plans/modular/Harmonizer.scala
Scala
apache-2.0
10,286
package com.tam.cobol_interpreter.test.tools import com.tam.cobol_interpreter.tools.{ByteArrayTool, Comp3Tool} import org.junit.runner.RunWith import org.scalatest.FlatSpec import org.scalatest.Matchers._ import org.scalatest.junit.JUnitRunner /** * Created by tamu on 1/2/15. */ @RunWith(classOf[JUnitRunner]) class...
tamsanh/scala-cobol-interpreter
src/test/scala/com/tam/cobol_interpreter/tools/TestComp3Tool.scala
Scala
apache-2.0
2,080