code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
package org.eigengo.akkapatterns.api import spray.routing.{HttpService, RequestContext, AuthenticationFailedRejection, AuthenticationRequiredRejection} import concurrent.Future import spray.routing.authentication.Authentication import java.util.UUID import akka.actor.ActorRef import org.eigengo.akkapatterns.domain._ i...
eigengo/akka-patterns
server/api/src/main/scala/org/eigengo/akkapatterns/api/authentication.scala
Scala
apache-2.0
3,866
package nl.htm.importer package heffac import org.apache.poi.ss.usermodel.WorkbookFactory import java.io.InputStream object HeffacImporter extends Importer[InputStreamSettings] { val tournamentNames = List( "feder" -> ("Feder", "FED"), "nylon" -> ("Langzwaard Nylon", "LN"), "melee" -> ("Melee Games", "...
hema-tournament-manager/htm
htm-importer/src/main/scala/nl/htm/importer/heffac/HeffacImporter.scala
Scala
apache-2.0
2,600
package fringe import util._ import chisel3._ import chisel3.util._ import templates.SRFF import templates.Utils.log2Up /** * DRAM Memory Access Generator * MAG config register format */ case class MAGOpcode() extends Bundle { val scatterGather = Bool() override def cloneType(): this.type = { new MAGOpcod...
stanford-ppl/spatial-lang
spatial/core/resources/chiselgen/template-level/fringeHW/FringeBundles.scala
Scala
mit
6,461
/* * 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/views/renewal/percentageSpec.scala
Scala
apache-2.0
2,500
package akka.guice.annotation import akka.actor.Actor import scala.reflect.macros.whitebox private[annotation] class InjectableActorHelper[C <: whitebox.Context](val c: C) { import c.universe._ /** * Macro implementation entry point. * * The main role of this function is to do basic high-level *...
Equiem/akka-guice
macros/src/main/scala/akka/guice/annotation/InjectableActorHelper.scala
Scala
mit
6,060
class Generic[T, S] { def foo<caret>(t: S): S = t } class ChildString extends Generic[String, String] { override def foo(t: String): String = super.foo(t) } class ChildSeq[T] extends Generic[Seq[T], List[T]] { override def foo(t: List[T]): List[T] = super.foo(t) }
katejim/intellij-scala
testdata/changeSignature/fromScala/Generics.scala
Scala
apache-2.0
272
package com.karumi.shot.templates object RecordIndexTemplate { def recordIndexTemplate( title: String, summaryResult: String, summaryTableBody: String ): String = { // language=HTML s""" <!doctype html> <html> <head> <title>Shot record results</title> <link href="https://cdnjs.clo...
Karumi/Shot
core/src/main/scala/com/karumi/shot/templates/RecordIndexTemplate.scala
Scala
apache-2.0
3,220
/* * 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/computations/LEC13.scala
Scala
apache-2.0
1,358
package slinky.web import slinky.core.SyntheticEvent import scala.scalajs.js import org.scalajs.dom.CompositionEvent // https://reactjs.org/docs/events.html?#composition-events @js.native trait SyntheticCompositionEvent[+TargetType] extends SyntheticEvent[TargetType, CompositionEvent] { val data: String = js.nativ...
shadaj/slinky
web/src/main/scala/slinky/web/SyntheticCompositionEvent.scala
Scala
mit
324
object Allergen { sealed trait AllergenBase { val value: Int } case object Eggs extends AllergenBase { override val value = 1 } case object Peanuts extends AllergenBase { override val value = 2 } case object Shellfish extends AllergenBase { override val value = 4 } case object Strawberries extends AllergenB...
daewon/til
exercism/scala/allergies/src/main/scala/allergies.scala
Scala
mpl-2.0
1,250
package org.apache.flink.contrib.tensorflow.io import com.twitter.bijection.Conversion._ import org.apache.flink.contrib.tensorflow.types.TensorInjections._ import org.apache.flink.contrib.tensorflow.types.TensorName import org.tensorflow.util.SaverDef import org.tensorflow.{Session, Tensor} import scala.collection.J...
cookieai/flink-tensorflow
flink-tensorflow/src/main/scala/org/apache/flink/contrib/tensorflow/io/Saver.scala
Scala
apache-2.0
2,950
/* * 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 ...
spark0001/spark2.1.1
sql/hive/src/test/scala/org/apache/spark/sql/hive/StatisticsSuite.scala
Scala
apache-2.0
25,938
package org.jetbrains.plugins.scala.lang.formatting import com.intellij.formatting.{Wrap, WrapType} import com.intellij.lang.ASTNode import com.intellij.psi.PsiElement import com.intellij.psi.util.PsiTreeUtil import org.jetbrains.plugins.scala.lang.formatting.settings.ScalaCodeStyleSettings import org.jetbrains.plugin...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/lang/formatting/ScalaWrapManager.scala
Scala
apache-2.0
9,208
/* * Copyright 2016-2017 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 applicab...
uts-cic/tap
src/main/scala/tap/analysis/affectlexicon/AffectLexiconActor.scala
Scala
apache-2.0
3,572
/* * 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 ...
esi-mineset/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/ExpressionTypeCheckingSuite.scala
Scala
apache-2.0
10,043
package com.avsystem.commons package rpc import com.avsystem.commons.meta.{MacroInstances, TypedMetadata, annotated, checked, composite, infer, multi, reifyAnnot, reifyName} import com.avsystem.commons.misc.TypeString import com.avsystem.commons.serialization.GenCodec import com.avsystem.commons.serialization.json.{Js...
AVSystem/scala-commons
commons-core/src/test/scala/com/avsystem/commons/rpc/DummyRPC.scala
Scala
mit
4,766
/* * Copyright (c) 2013 Habla Computing * * 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...
hablapps/app-dofollow
src/test/scala/org/hablapps/dofollow/test/portal/project/meeting/DestroyMinutesTest.scala
Scala
apache-2.0
10,676
import scala.reflect.Selectable.reflectiveSelectable object Test { def main(args: Array[String]): Unit = { def fCompareToBoolean(x: { def compareTo(y: java.lang.Boolean): Int }, y: Boolean): Int = x.compareTo(y) assert(fCompareToBoolean(false, true) < 0) } }
dotty-staging/dotty
tests/pos/i9403.scala
Scala
apache-2.0
277
/* * 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/core/src/test/scala/org/apache/spark/sql/execution/command/CharVarcharDDLTestBase.scala
Scala
apache-2.0
7,664
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
mike0sv/spark
mllib/src/test/scala/org/apache/spark/ml/optim/WeightedLeastSquaresSuite.scala
Scala
apache-2.0
21,511
package gapt.formats.llk import gapt.formats.llk.ast.LambdaAST import gapt.expr._ import gapt.expr.formula.Eq import gapt.expr.formula.Formula import gapt.expr.formula.hol.HOLFunction import gapt.expr.subst.Substitution import gapt.expr.ty.Ti import gapt.expr.ty.To import gapt.expr.ty.Ty import gapt.formats.ClasspathI...
gapt/gapt
tests/src/test/scala/gapt/formats/llk/HybridLatexParserTest.scala
Scala
gpl-3.0
6,591
package com.phmm.viterbi.process import java.net.URL import scala.io.Source import scala.util.parsing.json._ /** * Machine of Profile Hidden Markov Model * @param transition Transition probability object * @param emission Emission probability object * @param matchStateNum Number of match state */ class Mac...
burakkose/viterbi-algorithm
src/main/scala/com/phmm/viterbi/process/Machine.scala
Scala
mit
1,464
package cromwell.engine.backend.local import java.io.Writer import java.nio.file.{FileSystem, Files, Path, Paths} import akka.actor.ActorSystem import better.files._ import com.google.api.client.util.ExponentialBackOff.Builder import com.typesafe.config.ConfigFactory import cromwell.core.{WorkflowId, WorkflowOptions}...
cowmoo/cromwell
engine/src/main/scala/cromwell/engine/backend/local/LocalBackend.scala
Scala
bsd-3-clause
12,513
/* sbt -- Simple Build Tool * Copyright 2010 Mark Harrah */ package sbt package std import java.io.{InputStream, IOException, OutputStream, Reader, Writer} import java.io.{BufferedInputStream, BufferedOutputStream, BufferedReader, BufferedWriter, PrintWriter} import java.io.{Closeable, File, FileInputStream, FileOut...
kuochaoyi/xsbt
tasks/standard/Streams.scala
Scala
bsd-3-clause
3,527
package sparkmonitor.listener /** This package provides a custom implementation of a SparkListener interface that forwards data to Jupyter Kernels. */ import org.apache.spark.scheduler._ import org.json4s._ import org.json4s.JsonDSL._ import org.json4s.jackson.JsonMethods._ import org.apache.spark._ import org.apache....
krishnan-r/sparkmonitor
extension/scalalistener/CustomListener.scala
Scala
lgpl-2.1
27,114
package lambdacart import demo.MyDsl import org.scalatest.FunSuite class ForComprehensionTest extends FunSuite { val dsl = MyDsl.instance import dsl._ test("for-comprehension syntax") { val plus3 = dsl[Nat, Nat](x => for { x1 <- inc(x) x2 <- inc(x1) } yield inc(x2)) assert(decodeInt(e...
TomasMikula/LambdaCart
src/test/scala/lambdacart/ForComprehensionTest.scala
Scala
apache-2.0
359
package org.apache.spark.ml.bundle.ops.regression import ml.combust.bundle.BundleContext import ml.combust.bundle.op.{OpModel, OpNode} import ml.combust.bundle.dsl._ import org.apache.spark.ml.bundle.{ParamSpec, SimpleParamSpec, SimpleSparkOp, SparkBundleContext} import org.apache.spark.ml.linalg.Vectors import org.ap...
combust/mleap
mleap-spark/src/main/scala/org/apache/spark/ml/bundle/ops/regression/LinearRegressionOp.scala
Scala
apache-2.0
1,953
/* * Copyright 2014 Frugal Mechanic (http://frugalmechanic.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...
frugalmechanic/fm-lazyseq
src/main/scala/fm/lazyseq/DropRightLazySeq.scala
Scala
apache-2.0
1,003
package strawman.collections import Predef.{augmentString as _, wrapString as _, *} import scala.reflect.ClassTag /** A strawman architecture for new collections. It contains some * example collection classes and methods with the intent to expose * some key issues. It would be good to compare this to other * im...
dotty-staging/dotty
tests/pos-special/strawman-collections/CollectionStrawMan1.scala
Scala
apache-2.0
15,038
/* * 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 ...
GJL/flink
flink-tests/src/test/scala/org/apache/flink/api/scala/operators/FilterITCase.scala
Scala
apache-2.0
6,049
package api import org.json4s._ import org.json4s.ext._ import org.json4s.prefs.EmptyValueStrategy import org.json4s.native.Serialization import org.joda.time.DateTime import domain._ trait JsonFormats { implicit val json4sFormats = new DefaultFormats { override val emptyValueStrategy = EmptyValueStrate...
sbondor/sunwatch
server/src/main/scala/api/JsonFormats.scala
Scala
mit
381
/* * 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...
yiheng/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/LocallyConnected2D.scala
Scala
apache-2.0
35,074
package no.netcompany.testdatagen.generators.misc // Copyright (C) 2014 Lars Reed -- GNU GPL 2.0 -- see LICENSE.txt import org.junit.runner.RunWith import org.scalatest.FlatSpec import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class UrlsSpec extends FlatSpec { trait Setup { val xgen= Urls...
lre-mesan/testdata
src/test/scala/no/netcompany/testdatagen/generators/misc/UrlsSpec.scala
Scala
gpl-2.0
519
package redis_client import com.redis.RedisClient import io.circe.parser.parse object Main extends App { val redisClient = new RedisClient("localhost", 6379) val x = Store.encoder(Store(Session("manabu", "212121"))) val b = redisClient.set("key", x) val id = redisClient .get[String]("key") .flatMap...
t-mochizuki/scala-study
akka-http-session-example/redis-client/src/main/scala/redis_client/Main.scala
Scala
mit
469
package mimir.exec; import java.sql._; import mimir.sql._; import mimir.algebra._; import mimir.ctables._; import mimir.Database; class Compiler(db: Database) { val standardOptimizations = List[Operator => Operator]( CTPercolator.percolate _, // Partition Det & Nondet query fragments optimize ...
sophieyoung717/mimir
src/main/scala/mimir/exec/Compiler.scala
Scala
apache-2.0
4,638
package com.box.castle.committer.api import kafka.message.Message import scala.concurrent.duration.FiniteDuration sealed trait CommitResult /** * User committer successfully committed entire batch */ case class BatchCommittedSuccessfully(metadata: Option[String] = None) extends CommitResult /** * User committer ...
Box-Castle/committer-api
src/main/scala/com/box/castle/committer/api/CommitResult.scala
Scala
apache-2.0
877
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
bravo-zhang/spark
sql/core/src/main/scala/org/apache/spark/sql/sources/filters.scala
Scala
apache-2.0
6,593
object Main { def f[a]: List[List[a]] = for (l1 <- Nil; l2 <- Nil) yield l1 }
yusuke2255/dotty
tests/pos/t0029.scala
Scala
bsd-3-clause
80
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
Kegeruneku/rudder
rudder-core/src/main/scala/com/normation/rudder/services/marshalling/XmlUnserialisationImpl.scala
Scala
agpl-3.0
36,164
/* * NoMenuBarActions.scala * (Mellite) * * Copyright (c) 2012-2022 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU Affero General Public License v3+ * * * For further information, please contact Hanns Holger Rutz at * contact@sciss.de */ package de.sciss.mellite.i...
Sciss/Mellite
app/src/main/scala/de/sciss/mellite/impl/component/NoMenuBarActions.scala
Scala
agpl-3.0
1,498
package scala.collection.scalameter.mutable.HashBag import org.scalameter.api._ object HashBag_exists extends HashBagBenchmark { def sizes = Gen.range("size")(20000, 200000, 20000) def funName: String = "exists{result:=false}" def fun(bag: Bag[BigInt]): Unit = bag.exists(_ => false) def listFun(list: List...
nicolasstucki/multisets
src/test/scala/scala/collection/scalameter/mutable/HashBag/HashBag_exists.scala
Scala
bsd-3-clause
382
package kippercalendar import org.joda.time.Interval case class Event(interval: Interval, label: String) { val start = interval.getStart val end = interval.getEnd }
kipperjim/kipper-calendar
src/main/scala/kippercalendar/Event.scala
Scala
mit
171
package skuber.rbac import skuber.{ObjectMeta, ObjectResource} /** * Created by jordan on 1/12/17. */ case class ClusterRole( kind: String = "ClusterRole", override val apiVersion: String = rbacAPIVersion, metadata: ObjectMeta = ObjectMeta(), rules: List[PolicyRule] ) extends ObjectResource { }
coryfklein/skuber
client/src/main/scala/skuber/rbac/ClusterRole.scala
Scala
apache-2.0
319
/* * Copyright 2014 YMC. See LICENSE for details. */ package controllers import play.api.mvc._ object Application extends Controller { def index = Action { implicit request => Redirect(routes.Servers.index()) } }
Connexity/hannibal
app/controllers/Application.scala
Scala
apache-2.0
228
package nodescala import scala.language.postfixOps import scala.concurrent._ import scala.concurrent.duration._ import ExecutionContext.Implicits.global import scala.async.Async.{async, await} object Main { def main(args: Array[String]) { // 1. instantiate the server at 8191, relative path "/test", // a...
DrunkyBard/CourseraReactiveAssignments
3/nodescala/src/main/scala/nodescala/Main.scala
Scala
mit
1,537
/* * 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 ...
fhueske/flink
flink-streaming-scala/src/test/scala/org/apache/flink/streaming/api/scala/AsyncDataStreamITCase.scala
Scala
apache-2.0
5,364
package org.psesd.srx.shared.core.logging import org.psesd.srx.shared.core._ import org.psesd.srx.shared.core.sif.SifHttpStatusCode import org.scalatest.FunSuite class RollbarClientTests extends FunSuite { ignore("test message") { val description = "srx-shared-core test message" val srxMessage = SrxMessage...
PSESD/srx-shared-core
src/test/scala/org/psesd/srx/shared/core/logging/RollbarClientTests.scala
Scala
mit
584
/* * 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 ...
aokolnychyi/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/ForeachSinkSuite.scala
Scala
apache-2.0
10,371
/** * Copyright 2015 Thomson Reuters * * 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...
hochgi/CM-Well
server/cmwell-data-tools/src/main/scala/cmwell/tools/data/utils/akka/HeaderOps.scala
Scala
apache-2.0
1,724
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
ConeyLiu/spark
sql/core/v2.3/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcFilterSuite.scala
Scala
apache-2.0
21,224
package reopp.common.guardedcommands.z3 import _root_.z3.scala._ import _root_.z3.scala.dsl.Distinct import _root_.z3.scala.dsl.IntVar import _root_.z3.scala.dsl.{Distinct, IntVar} import reopp.common.guardedcommands._ import reopp.common.guardedcommands.Var import reopp.common._ import Utils._ import collection.mutab...
joseproenca/ip-constraints
code/src/main/scala/reopp/common/guardedcommands/z3/Z3.scala
Scala
mit
22,347
/* * 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 ...
himanshudhami/PredictionIO
project/PIOBuild.scala
Scala
apache-2.0
1,925
package se.gigurra.renderer.glimpl.vbos import java.nio.FloatBuffer import javax.media.opengl.GL import javax.media.opengl.GL3ES3 import se.gigurra.renderer.glimpl.GlShaderProgram class FloatAttribVbo( _gl_init: GL3ES3, val program: GlShaderProgram, val vertexCapacity: Int, val shaderAttribName: St...
GiGurra/gigurra-scala-2drenderer
src/main/scala/se/gigurra/renderer/glimpl/vbos/FloatAttribVbo.scala
Scala
mit
839
package com.netscout.aion2 import com.google.inject.Inject import com.netscout.aion2.model.AionObjectConfig import com.typesafe.config.Config import java.io.InputStream import org.yaml.snakeyaml.Yaml import scala.beans.BeanProperty /** * Convenience class that models the structure of Aion's * schema.yml file */...
FlukeNetworks/aion
src/main/scala/com/netscout/aion2/AionConfig.scala
Scala
apache-2.0
1,002
package com.querydsl.scala import com.querydsl.core.types.PathMetadataFactory._ import com.querydsl.core.types._ object QPerson extends QPerson("person"){ override def as(variable: String) = new QPerson(variable) } class QPerson(cl: Class[_ <: Person], md: PathMetadata) extends EntityPathImpl[Person](cl, md) { ...
kevinleturc/querydsl
querydsl-scala/src/test/scala/com/querydsl/scala/QPerson.scala
Scala
apache-2.0
1,399
/* * 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 ...
gioenn/xSpark
mllib/src/main/scala/org/apache/spark/ml/linalg/MatrixUDT.scala
Scala
apache-2.0
4,304
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package docs.home.scaladsl.persistence import akka.NotUsed //#imports import com.lightbend.lagom.scaladsl.api.Service import com.lightbend.lagom.scaladsl.api.ServiceCall import slick.jdbc.JdbcBackend.Database //#imports import docs.home.scaladsl.persi...
lagom/lagom
docs/manual/scala/guide/cluster/code/docs/home/scaladsl/persistence/SlickReadSideQuery.scala
Scala
apache-2.0
809
/* * Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> */ package play.it.http.parsing import play.api.test._ import play.api.mvc.{ BodyParser, BodyParsers } import play.api.libs.iteratee.Enumerator object EmptyBodyParserSpec extends PlaySpecification { "The empty body parser" should { def par...
jyotikamboj/container
pf-framework/src/play-integration-test/src/test/scala/play/it/http/parsing/EmptyBodyParserSpec.scala
Scala
mit
896
/* sbt -- Simple Build Tool * Copyright 2008, 2009, 2010, 2011 Mark Harrah, Indrajit Raychaudhuri */ package sbt import java.io.File import compiler.{AnalyzingCompiler, JavaCompiler} import Predef.{conforms => _, _} import Types.:+: import Path._ import sbinary.DefaultProtocol.FileFormat import Cache.{defa...
kuochaoyi/xsbt
main/actions/Doc.scala
Scala
bsd-3-clause
3,290
/* * Copyright (c) 2012-2016 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apach...
TimothyKlim/snowplow
3-enrich/scala-common-enrich/src/main/scala/com.snowplowanalytics.snowplow.enrich/common/enrichments/EnrichmentManager.scala
Scala
apache-2.0
22,508
package ru.izebit.service import org.mockito.Mockito import org.mockito.Mockito._ import org.scalatest.FunSuite import org.scalatest.mockito.MockitoSugar import org.springframework.beans.factory.annotation.Autowired import org.springframework.test.context.support.AnnotationConfigContextLoader import org.springframewor...
android-group/night-meet
src/test/scala/ru/izebit/service/AccountServiceTest.scala
Scala
apache-2.0
12,864
package afterparty import org.json4s.{DefaultFormats, JValue} sealed trait Event[T] { def name: String def json: JValue def payload: T } object Event { implicit val formats = DefaultFormats abstract class Named[T](val name: String)(implicit ev: Manifest[T]) extends Event[T] { lazy val payload = json.e...
softprops/after-party
src/main/scala/Event.scala
Scala
mit
1,450
import scala.compiletime.ops.string._ object Test { val t0: "Hello " + "world" = "Hello world" val t1: "" + "" = "" val t2: "3" + "" = "33" // error val t3: "Hello " + "world" = "error" // error }
som-snytt/dotty
tests/neg/singleton-ops-string.scala
Scala
apache-2.0
206
/* * 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 ...
sachintyagi22/spark
sql/core/src/test/scala/org/apache/spark/sql/JsonFunctionsSuite.scala
Scala
apache-2.0
7,658
package com.twitter.finagle.memcachedx.integration import java.net.{InetAddress, InetSocketAddress} import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.{BeforeAndAfter, FunSuite, Outcome} import com.twitter.conversions.time._ import com.twitter.finagle.builder.{ClientBuilder, ...
kingtang/finagle
finagle-memcachedx/src/test/scala/com/twitter/finagle/memcachedx/integration/ProxyTest.scala
Scala
apache-2.0
4,415
package doodle.core import doodle.syntax.uByte._ trait CommonColors { val aliceBlue = Color.rgb(0xf0.uByte, 0xf8.uByte, 0xff.uByte) val antiqueWhite = Color.rgb(0xfa.uByte, 0xeb.uByte, 0xd7.uByte) val aqua = Color.rgb(0x00.uByte, 0xff.uByte, 0xff.uByte) val aquamarine ...
Angeldude/doodle
shared/src/main/scala/doodle/core/CommonColors.scala
Scala
apache-2.0
11,099
package com.metl.utils import java.text.SimpleDateFormat import java.util.{Date, GregorianCalendar, Locale, SimpleTimeZone, TimeZone} import org.scalatest.{BeforeAndAfter, FunSuite} import net.liftweb.mockweb.MockWeb._ import net.liftweb.mocks.MockHttpServletRequest import net.liftweb.http._ import net.liftweb.util.H...
StackableRegiments/analyticalmetlx
src/test/scala/com/metl/utils/HttpCacherSuite.scala
Scala
apache-2.0
2,554
package com.twitter.finatra.kafkastreams.integration.globaltable import com.twitter.finatra.kafka.serde.ScalaSerdes import com.twitter.finatra.kafkastreams.config.KafkaStreamsConfig import com.twitter.finatra.kafkastreams.test.KafkaStreamsMultiServerFeatureTest import com.twitter.inject.server.EmbeddedTwitterServer c...
twitter/finatra
kafka-streams/kafka-streams/src/test/scala/com/twitter/finatra/kafkastreams/integration/globaltable/GlobalTableServerFeatureTest.scala
Scala
apache-2.0
1,853
/*********************************************************************** * Copyright (c) 2013-2019 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...
elahrvivaz/geomesa
geomesa-features/geomesa-feature-common/src/main/scala/org/locationtech/geomesa/features/serialization/DimensionalBounds.scala
Scala
apache-2.0
6,223
package example.ai2 import turksem._ import qamr._ import turksem.util._ import spacro._ import spacro.tasks._ import nlpdata.structure._ import nlpdata.datasets.ptb._ import nlpdata.datasets.wiki1k._ import nlpdata.datasets.wiktionary.Inflections import nlpdata.util.LowerCaseStrings._ import nlpdata.util.Text impor...
julianmichael/mturk-semantics
example/ai2/jvm/src/main/scala/example/ai2/Ai2AnnotationSetup.scala
Scala
mit
2,695
/** * 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...
ijuma/kafka
core/src/main/scala/kafka/consumer/PartitionAssignor.scala
Scala
apache-2.0
7,818
package scala package collection.immutable import scala.collection.mutable.{ArrayBuffer, Builder, ArrayBuilder} import scala.collection.{IterableOnce, Iterator, SeqFactory, ClassTagSeqFactory, StrictOptimizedClassTagSeqFactory, View, ArrayOps} import scala.annotation.unchecked.uncheckedVariance import scala.util.hash...
rorygraves/perf_tester
corpus/scala-library/src/main/scala/collection/immutable/ImmutableArray.scala
Scala
apache-2.0
13,212
package notebook.share import tachyon.client.TachyonFS import scala.collection.JavaConverters._ class Client(tachyonUrl: Option[String]) { lazy val tachyonClient = tachyonUrl.map( url => TachyonFS.get(url)).getOrElse(notebook.share.Tachyon.fs) def list(path: String) = tachyonClient.ls(path, false).asScala ...
minyk/spark-notebook
modules/tachyon/src/main/tachyon_0.5.0/share/Client.scala
Scala
apache-2.0
321
package models import anorm._ import anorm.SqlParser import scala.language.postfixOps import collection.immutable.{HashMap, IntMap, LongMap, TreeMap} import java.sql.Connection import java.time.Instant import javax.inject.{Inject, Singleton} import collection.mutable import collection.mutable.ListBuffer case class ...
ruimo/store2
app/models/Shipping.scala
Scala
apache-2.0
17,910
package fpgatidbits.math import Chisel._ class PipelinedMultStageData(w: Int, wMul: Int) extends Bundle { val signA = Bool() val a = UInt(width = w) val signB = Bool() val b = UInt(width = w) val mulRes = UInt(width = 2*wMul) val addRes = UInt(width = w) override def cloneType: this.type = new Pipeline...
maltanar/fpga-tidbits
src/main/scala/fpgatidbits/math/PipelinedMul.scala
Scala
bsd-2-clause
2,852
package com.ecfront.odoows import java.util.Date import org.scalatest._ import scala.beans.BeanProperty class OpenacademyWSSpec extends FunSuite { //Common val ws = OdooWS("http://127.0.0.1:8069", "odoo") //assert(ws.common.version.get("server_version").get == "8.0") val uid = ws.common.login("admin", "123...
gudaoxuri/ez-odoo-ws
src/test/scala/com/ecfront/odoows/OpenacademyWSSpec.scala
Scala
apache-2.0
2,320
/* * (c) Copyright 2014 LinkedIn Corp. 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 ...
linkedin/RookBoom
services/src/main/scala/com/linkedin/rookboom/schedule/Repetition.scala
Scala
apache-2.0
9,252
import leon.lang._ object Overflow3 { def foo3(x: Int): Int = { x - 1 } }
regb/leon
src/test/resources/regression/verification/overflow/invalid/Overflow3.scala
Scala
gpl-3.0
85
package ilc package util package process import org.scalatest.FunSuite // Testing process abstracted as (partial) functions String => String // should work on Mac and Windows // (please report platform-dependent errors) class FunProcessSuite extends FunSuite{ test("hello world") { val helloWorld = "hello world...
inc-lc/ilc-scala
src/test/scala/ilc/util/process/FunProcessSuite.scala
Scala
mit
628
package net.revenj.database.postgres.converters import java.net.InetAddress import net.revenj.Utils import net.revenj.database.postgres.PostgresReader object InetConverter extends Converter[InetAddress] { override val dbName = "inet" override def default(): InetAddress = Utils.Loopback override def parseRaw...
ngs-doo/revenj
scala/revenj-core/src/main/scala/net/revenj/database/postgres/converters/InetConverter.scala
Scala
bsd-3-clause
947
package mageknight.skills sealed trait Skill // Norowas case object ForwardMarch extends Skill case object DaySharpshooting extends Skill case object Inspiration extends Skill case object BrightNegotiation extends Skill case object LeavesInTheWind extends Skill case object WhispersInTheTreetops extends Skill case obj...
fadeddata/mk
src/main/scala/Skills.scala
Scala
mit
1,727
package sangria.validation.rules import org.scalatest.WordSpec import sangria.util.{Pos, ValidationSupport} class VariablesInAllowedPositionSpec extends WordSpec with ValidationSupport { override val defaultRule = Some(new VariablesInAllowedPosition) "Validate: Variables are in allowed positions" should { "...
narahari92/sangria
src/test/scala/sangria/validation/rules/VariablesInAllowedPositionSpec.scala
Scala
apache-2.0
6,468
/* * 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/UiLifeCycle.scala
Scala
gpl-3.0
1,370
package reactivemongo.api import scala.collection.Factory import scala.concurrent.{ ExecutionContext, Future } private[api] trait WrappedCursorCompat[T] { _self: WrappedCursor[T] => def collect[M[_]](maxDocs: Int, err: Cursor.ErrorHandler[M[T]])(implicit cbf: Factory[T, M[T]], ec: ExecutionContext): Future[M[T]] = ...
ReactiveMongo/ReactiveMongo
driver/src/main/scala-2.13+/api/WrappedCursorCompat.scala
Scala
apache-2.0
494
package org.jetbrains.plugins.scala package util package internal import java.io._ import java.nio.file.{Path, Paths} import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.extensions._ import org.jetbrains.plugins.scala.util.internal.I18nBundleContent._ import scala.io.Source case class I18nBundleCo...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/util/internal/I18nBundleContent.scala
Scala
apache-2.0
7,120
/* * 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 ...
wangyixiaohuihui/spark2-annotation
core/src/main/scala/org/apache/spark/storage/BlockManagerMasterEndpoint.scala
Scala
apache-2.0
23,698
package unfiltered.filter.request import org.specs2.mutable._ object UploadsSpec extends Specification with unfiltered.specs2.jetty.Served { import java.io.{FileInputStream => FIS} import org.apache.commons.io.{IOUtils => IOU} import unfiltered.response._ import unfiltered.request.{Path => UFPath, _} impor...
jarin/unfiltered
filter-uploads/src/test/scala/UploadsSpec.scala
Scala
mit
6,061
// Databricks notebook source exported at Tue, 28 Jun 2016 11:12:33 UTC // MAGIC %md // MAGIC // MAGIC # [Scalable Data Science](http://www.math.canterbury.ac.nz/~r.sainudiin/courses/ScalableDataScience/) // MAGIC // MAGIC ## Change Detection in Degree Corrected Stochastic BlockModel Graphs // MAGIC ### Scalable data...
raazesh-sainudiin/scalable-data-science
db/studentProjects/06_ShakiraSuwan/052_ChangeDetectionInRandomGraphSeries.scala
Scala
unlicense
20,403
package sbox import scala.annotation.tailrec /* * Knight's Tour problem * "How can a knight jump on an N x N chessboard in such a way that it visits every square exactly once?" * * Hints: * - Represent the squares by pairs of their coordinates of the form (X, Y), where both X and Y are integers between 1 and N. ...
mitochon/hexercise
src/scalaspark/Knight2.scala
Scala
mit
4,257
package brocchini.cs.sort /** * Created by mozart on 3/9/16. */ object MergeSort extends Sorter{ val sentinel = -1 /** This interface mutates the input just so I can reuse #brocchini.cs.SorterBehaviors tests */ override def sort(input: Array[Int]): Unit = { val sorted = sortInt( input ) mutateInput...
brocchini/cs
src/main/scala/brocchini/cs/sort/MergeSort.scala
Scala
mit
1,615
package picasso.model.dbp import picasso.utils.{LogCritical, LogError, LogWarning, LogNotice, LogInfo, LogDebug, Logger, Misc} import picasso.math._ import picasso.math.WellPartialOrdering._ import picasso.graph._ /* Keeping track of the morphisms to generate counter programs later. */ class TransitionWitness[P <: D...
dzufferey/picasso
core/src/main/scala/picasso/model/dbp/Witnesses.scala
Scala
bsd-2-clause
6,577
package com.kanterov.scalajs.react.examples.say import com.kanterov.scalajs.react._ import org.scalajs.dom._ import com.kanterov.scalajs.react.util.TypedEventListeners object Say extends TypedReactSpec with TypedEventListeners { case class Props() case class State(text: String) implicit class Closure(self: Th...
kanterov/scala-js-react
scalajs-react-examples/src/main/scala/com/kanterov/scalajs/react/examples/say/Say.scala
Scala
apache-2.0
785
/* * 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 ...
ron8hu/spark
sql/core/src/test/scala/org/apache/spark/sql/sources/v2/DataSourceV2Suite.scala
Scala
apache-2.0
10,383
/* * Copyright 2010-2011 Vilius Normantas <code@norma.lt> * * This file is part of Crossbow library. * * Crossbow 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 ...
ViliusN/Crossbow
crossbow-core/src/lt/norma/crossbow/core/TradingSchedule.scala
Scala
gpl-3.0
1,101
/* * Copyright 2014 JHC Systems Limited * * 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...
DavidGregory084/sqlest
sqlest/src/main/scala/sqlest/sql/AccessStatementBuilder.scala
Scala
apache-2.0
766
package uk.gov.gds.ier.service class ApiException(message:String) extends Exception(message)
michaeldfallen/ier-frontend
app/uk/gov/gds/ier/service/ApiException.scala
Scala
mit
93
package models.binding import org.specs2.mock.Mockito import play.api.test.Helpers._ import play.api.test._ import scalaxb._ import java.net.URI import models.provider.TimeProvider import models.binding._ import play.api.Play.current import play.api.libs.ws._ import scala.concurrent.Await import scala.concurrent.durat...
FlorianTopf/impex-portal
test/models/binding/SINPMethodsSpecs.scala
Scala
gpl-2.0
24,091
package sio.core object IO { /** Creates an IO action that produces a unit value without performing * any side-effects. */ val unit: ST[RW, Unit] = ST.unit /** Creates an IO action that produces a specific value without performing * any side-effects. */ def pure[A](x: A): ST[RW, A] = ST.pure(x...
alexknvl/sio
core/src/main/scala/sio/core/IO.scala
Scala
mit
2,490
package adt.bson import adt.bson.scalacheck.BsonValueGenerators import org.bson.types.ObjectId import org.joda.time.{DateTime, DateTimeZone} import org.scalactic.Tolerance import org.scalatest.FlatSpec import org.scalatest.prop.PropertyChecks import scala.util.matching.Regex class DefaultReadsSpec extends FlatSpec w...
jeffmay/bson-adt
bson-adt-core/src/test/scala/adt/bson/DefaultReadsSpec.scala
Scala
apache-2.0
2,798
/** * Copyright 2012 Jeffrey Cameron * * 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...
picklesdoc/pickles-jvm
core/src/test/scala/org/pickles/crawler/TreeItemSpec.scala
Scala
apache-2.0
3,123