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 2013 Robert Welin * * 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 ...
nilewapp/BokBytarAppenServer
src/main/scala/com/mooo/nilewapps/bokbytarappen/server/validation/Validators.scala
Scala
apache-2.0
1,238
package com.treode.cps /** The scalatest package contains tools to support testing with Scalatest 2.0. The scalatest * Scala package lives in the scalatest Ivy package. To make the utilities available to your * tests, add the CPS dependency in SBT as follows: * * ''' * libraryDependencies += "com.treode" %...
Treode/cps
src/scalatest/scala/com/treode/cps/scalatest/package.scala
Scala
apache-2.0
555
package frameless import frameless.functions.CatalystExplodableCollection import org.scalacheck.{Arbitrary, Prop} import org.scalacheck.Prop.forAll import org.scalacheck.Prop._ import scala.reflect.ClassTag class ExplodeTests extends TypedDatasetSuite { test("simple explode test") { val ds = TypedDataset.crea...
adelbertc/frameless
dataset/src/test/scala/frameless/ExplodeTests.scala
Scala
apache-2.0
1,574
package ml.combust.mleap.runtime.transformer.feature import ml.combust.mleap.core.feature.MathBinaryModel import ml.combust.mleap.core.types.NodeShape import ml.combust.mleap.runtime.function.UserDefinedFunction import ml.combust.mleap.runtime.frame.{SimpleTransformer, Transformer} /** * Created by hollinwilkins on...
combust/mleap
mleap-runtime/src/main/scala/ml/combust/mleap/runtime/transformer/feature/MathBinary.scala
Scala
apache-2.0
1,127
package fastgc import java.net.Socket import java.io.{ObjectInputStream, DataOutputStream} import java.math.BigInteger /** * Refer to README for details. * Author: Wei Xie * Version: */ object TestServer { def main(args: Array[String]) = { // val aliceClient = new CircuitQuery() // aliceClient.run(...
XieConnect/SecureMA
src/test/scala/fastgc/TestServer.scala
Scala
mit
853
package org.jetbrains.plugins.scala.lang.completion package generated class CompletionSmartInfixTest extends CompletionTestBase { //This class was generated by build script, please don't change this override def folderPath: String = super.folderPath + "smart/infix/" def testSmartLeftExprInfixLeftAssoc = doTest ...
LPTK/intellij-scala
test/org/jetbrains/plugins/scala/lang/completion/generated/CompletionSmartInfixTest.scala
Scala
apache-2.0
411
/* * 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...
gioenn/xSpark
sql/core/src/test/scala/org/apache/spark/sql/sources/TableScanSuite.scala
Scala
apache-2.0
12,588
package dispatch.as import dispatch._ import org.asynchttpclient import org.asynchttpclient.handler.resumable._ import java.io._ import java.nio.charset.Charset object Response { def apply[T](f: asynchttpclient.Response => T) = f } object String extends (asynchttpclient.Response => String) { /** @return respons...
dispatch/reboot
core/src/main/scala/as/core.scala
Scala
lgpl-3.0
1,483
package korolev.http import korolev.data.BytesLike import korolev.effect.AsyncResourcePool.Borrow import korolev.effect.io.{DataSocket, RawDataSocket, SecureDataSocket} import korolev.effect.syntax._ import korolev.effect.{AsyncResourcePool, Decoder, Effect, Reporter, Scheduler, Stream} import korolev.http.protocol.We...
fomkin/korolev
modules/http/src/main/scala/korolev/http/HttpClient.scala
Scala
apache-2.0
11,140
/* * 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...
hubertp/scalatest
src/main/scala/org/scalatest/tools/RunnerGUI.scala
Scala
apache-2.0
1,295
/* * Copyright 2009-2010 WorldWide Conferencing, LLC * * 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...
wsaccaco/lift
framework/lift-base/lift-json/src/main/scala/net/liftweb/json/Xml.scala
Scala
apache-2.0
7,513
/* * 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...
liquidarmour/http-verbs
src/test/scala/uk/gov/hmrc/play/audit/http/HttpAuditingSpec.scala
Scala
apache-2.0
12,445
package com.alopatindev.videoacid.ui import android.support.v4.app.Fragment import android.content.Context import com.alopatindev.videoacid.R class GalleryFragment extends Fragment with FragmentUtils { import android.os.Bundle import android.view.{LayoutInflater, View, ViewGroup} import com.alopatindev.video...
alopatindev/videoacid
src/main/scala/com/alopatindev/videoacid/ui/GalleryFragment.scala
Scala
bsd-2-clause
824
package models.daos import com.mohiva.play.silhouette.api.LoginInfo import models.User import scala.concurrent.Future /** * Give access to the user object. */ trait UserDAO { /** * Finds a user by its login info. * * @param loginInfo The login info of the user to find. * @return The found user or ...
workingDog/trackersys
app/models/daos/UserDAO.scala
Scala
apache-2.0
813
package cromwell package object webservice { case class QueryParameter(key: String, value: String) type QueryParameters = Seq[QueryParameter] object Patterns { val WorkflowName = """ (?x) # Turn on comments and whitespace insensitivity. ( ...
dgtester/cromwell
src/main/scala/cromwell/webservice/package.scala
Scala
bsd-3-clause
2,169
/* * 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...
cheeseng/scalatest
scalactic/src/main/scala/org/scalactic/enablers/Sortable.scala
Scala
apache-2.0
5,533
package org.broadinstitute.clio.client.metadata import java.net.URI import org.broadinstitute.clio.client.dispatch.MoveExecutor.{CopyOp, MoveOp} import org.broadinstitute.clio.transfer.model.arrays.{ArraysExtensions, ArraysMetadata} import org.scalatest.{FlatSpec, Matchers} class ArrayDelivererSpec extends FlatSpec ...
broadinstitute/clio
clio-client/src/test/scala/org/broadinstitute/clio/client/metadata/ArrayDelivererSpec.scala
Scala
bsd-3-clause
4,290
import com.oysterbooks.scavro.plugin.AvroCodegenPlugin import sbt._ import sbt.Keys._ import AvroCodegenPlugin.autoImport._ object DemoBuild extends Build { lazy val demoSettings = Defaults.defaultSettings ++ baseAvroCodegenSettings ++ Seq( // General settings organization := "oyster", scalaVersion := "...
deathbymochi/scavro
demo/project/Build.scala
Scala
apache-2.0
1,280
package so.paws.db.slick import so.paws.db.DbPlugin import play.api.Application class SlickDbPlugin(application: Application) extends DbPlugin[Any] { override def db: Any = {} // def getEntities(application: Application, ref: String): Set[Entity] = { // val runtimeMirror = universe.runtimeMirror(application.c...
dessens/paws
modules/db/src/main/scala/so/paws/db/slick/SlickDbPlugin.scala
Scala
mit
593
package org.biancama.algorithms.trampoline import org.scalatest.{FlatSpec, Matchers} class TrampolineTest extends FlatSpec with Matchers { "Fibonacci of n " should "return correct calculation" in { Trampoline.fib(6) shouldBe 8 Trampoline.fib(7) shouldBe 13 Trampoline.fib(40) shouldBe 102334155 } "F...
biancama/data-structures-scala
src/test/scala/org/biancama/algorithms/trampoline/TrampolineTest.scala
Scala
gpl-3.0
430
package davidkellis.seven.domain; import java.time.{LocalTime, ZonedDateTime} import davidkellis.seven.domain.CoreTypes.FillPriceFn case class Trial( startTime: ZonedDateTime, endTime: ZonedDateTime, dailyTradingTimes: Seq[LocalTime], fillPrice...
davidkellis/seven
src/main/scala/davidkellis/seven/domain/Trial.scala
Scala
mit
354
package com.twitter.finagle.thrift import com.twitter.finagle._ import com.twitter.finagle.netty3.Conversions._ import com.twitter.finagle.netty3.{Ok, Error, Cancelled} import com.twitter.finagle.tracing.{Trace, Annotation} import com.twitter.finagle.util.ByteArrays import com.twitter.io.Buf import java.util.ArrayList...
JustinTulloss/finagle
finagle-thrift/src/main/scala/com/twitter/finagle/thrift/ThriftClientFramedCodec.scala
Scala
apache-2.0
9,049
/* * 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-table/flink-table-planner/src/test/scala/org/apache/flink/table/api/batch/table/stringexpr/CorrelateStringExpressionTest.scala
Scala
apache-2.0
4,096
package skinny.engine.implicits import scala.language.implicitConversions import skinny.engine.context.SkinnyEngineContext import skinny.engine.cookie.{ Cookie, CookieOptions, SweetCookies } /** * Implicit conversion for Cookie values. */ trait CookiesImplicits extends ServletApiImplicits { implicit def cookieO...
holycattle/skinny-framework
engine/src/main/scala/skinny/engine/implicits/CookiesImplicits.scala
Scala
mit
625
package org.jetbrains.plugins.scala.codeInsight.template.impl import com.intellij.codeInsight.template.TemplateContextType import com.intellij.psi.util.PsiTreeUtil import com.intellij.psi.{PsiComment, PsiFile, PsiWhiteSpace} import org.jetbrains.plugins.scala.lang.psi.api.ScalaFile /** * @author Alefas * @since 18/...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/codeInsight/template/impl/ScalaCommentContextType.scala
Scala
apache-2.0
995
package domala.internal.macros.meta.generator import domala.Insert import domala.internal.macros.meta.QueryDefDecl import domala.internal.macros.meta.args.DaoMethodCommonArgs import scala.collection.immutable.Seq import scala.meta._ object InsertGenerator extends DaoMethodGenerator { override def annotationClass: ...
bakenezumi/domala
meta/src/main/scala/domala/internal/macros/meta/generator/InsertGenerator.scala
Scala
apache-2.0
2,658
package com.evojam.mongodb.evolutions.command import play.api.libs.json.Json import com.evojam.mongodb.evolutions.config.ConfigurationComponent import com.evojam.mongodb.evolutions.model.command._ import com.evojam.mongodb.evolutions.model.evolution.{Script, Evolution} import com.evojam.mongodb.evolutions.model.journ...
evojam/mongodb-evolutions-scala
src/main/scala/com/evojam/mongodb/evolutions/command/CommandsComponent.scala
Scala
apache-2.0
2,131
/*********************************************************************** * Copyright (c) 2013-2016 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 is ...
spandanagrawal/geomesa
geomesa-features/geomesa-feature-kryo/src/main/scala/org/locationtech/geomesa/features/kryo/KryoBufferSimpleFeature.scala
Scala
apache-2.0
10,467
package com.typesafe.slick.examples.test class PlainSQLTest extends RecordedDoctest { def run = com.typesafe.slick.examples.jdbc.PlainSQL.main(null) }
dvinokurov/slick
slick-testkit/src/doctest/scala/PlainSQLTest.scala
Scala
bsd-2-clause
154
package pulsar.client import akka.util.ByteString import rx.lang.scala.Observable /** * @author Alexander De Leon <[email protected]> */ trait PulsarClient { def register(taskType: String): Observable[ByteString] }
devialab/pulsar
pulsar-client/src/main/scala/pulsar/client/PulsarClient.scala
Scala
mit
224
package org.jetbrains.plugins.scala.lang.completion.handlers import com.intellij.codeInsight.CodeInsightUtilCore import com.intellij.codeInsight.completion.{InsertHandler, InsertionContext} import com.intellij.codeInsight.lookup.LookupElement import com.intellij.codeInsight.template._ import com.intellij.codeInsight.t...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/lang/completion/handlers/ScalaGenerateAnonymousFunctionInsertHandler.scala
Scala
apache-2.0
5,894
// ticked #3444 object Test { def main(args: Array[String]): Unit = { val it = (1 to 12).toSeq.iterator assert(it.next() == 1) assert(it.take(2).toList == List(2, 3)) val jt = (4 to 12).toSeq.iterator assert(jt.next() == 4) assert(jt.drop(5).toList == List(10, 11, 12)) val kt = (1 un...
som-snytt/dotty
tests/run/iterator3444.scala
Scala
apache-2.0
480
/* * 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 ...
tillrohrmann/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/batch/table/CalcTest.scala
Scala
apache-2.0
6,526
package com.github.ilyamurzinov.scala.rest.example.domain import java.util.Date /** * Customers search parameters. * * @param firstName first name * @param lastName last name * @param birthday date of birth */ case class CustomerSearchParameters(firstName: Option[String] = None, ...
ilya-murzinov/scala-rest-example
src/main/scala/com/github/ilyamurzinov/scala/rest/example/domain/CustomerSearchParameters.scala
Scala
unlicense
425
package de.zalando.model import de.zalando.apifirst.Application._ import de.zalando.apifirst.Domain._ import de.zalando.apifirst.ParameterPlace import de.zalando.apifirst.naming._ import de.zalando.apifirst.Hypermedia._ import de.zalando.apifirst.Http._ import de.zalando.apifirst.Security import java.net.URL import Sec...
zalando/play-swagger
api-first-core/src/test/scala/model/resources.nested_objects_yaml.scala
Scala
mit
2,416
package mesosphere.marathon package core.task.termination /** * Enumeration for reasons why a task has been killed. * * This is not sealed on purpose as there might be different reasons for * components build on top of the core. */ trait KillReason object KillReason { /** The task is killed because of an...
mesosphere/marathon
src/main/scala/mesosphere/marathon/core/task/termination/KillReason.scala
Scala
apache-2.0
924
package io.buoyant.linkerd.protocol.h2 import com.twitter.finagle.{Service, ServiceFactory, SimpleFilter, Stack, Stackable} import com.twitter.finagle.buoyant.h2.{Request, Response} object DupRequest { val role = Stack.Role("DupRequest") object filter extends SimpleFilter[Request, Response] { def apply(req: ...
hhtpcd/linkerd
router/h2/src/main/scala/io/buoyant/router/h2/DupRequest.scala
Scala
apache-2.0
725
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
jedesah/Quasar
effect/src/test/scala/quasar/effect/KeyValueStoreSpec.scala
Scala
apache-2.0
2,312
package paperdoll.scalaz import shapeless.{ :+:, CNil, Coproduct } import scalaz.{ Monoid, Writer } import paperdoll.core.effect.{ Effects, Arr, GenericBind, GenericHandler } import paperdoll.core.effect.Effects.sendU import paperdoll.core.layer.Layers import scalaz.syntax.monad._ import scalaz.syntax.monoid._...
m50d/paperdoll
scalaz/src/main/scala/paperdoll/scalaz/WriterLayer.scala
Scala
apache-2.0
2,438
package services import org.slf4j.{Logger, LoggerFactory} import scala.collection.mutable import scala.util.{Failure, Success, Try} case class ProcessedWork(util: List[Double], waits: List[Int], residual: IndexedSeq[Double], totalWait: Double...
UKHomeOffice/drt-scalajs-spa-exploration
server/src/main/scala/services/OptimiserWithFlexibleProcessors.scala
Scala
apache-2.0
16,259
class Bar { def foo(baz: Boolean) { } def foo(o: Object) { } def other { foo(/* line: 2 */baz = true) // baz is red, code compiles } }
LPTK/intellij-scala
testdata/resolve2/bug3/SCL4697.scala
Scala
apache-2.0
147
/* * 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/TimeoutOnSlowUpstreamSuite.scala
Scala
apache-2.0
2,777
package gui import pentaminoes._ import Game.grid import scala.swing._ import scala.swing.event._ import java.awt.Color import scala.swing.GridBagPanel._ import javax.swing.{ UIManager, ImageIcon } import java.io.File import javax.sound.sampled.AudioSystem private object GameWindow extends SimpleSwingApplication { ...
Gugguru/Pentaminoes
src/gui/GameWindow.scala
Scala
artistic-2.0
13,431
package io.getquill.context.async.postgres import scala.concurrent.Await import scala.concurrent.ExecutionContext.Implicits.{ global => ec } import scala.concurrent.Future import scala.concurrent.duration.Duration import io.getquill.context.sql.DepartmentsSpec class DepartmentsPostgresAsyncSpec extends DepartmentsSp...
jcranky/quill
quill-async-postgres/src/test/scala/io/getquill/context/async/postgres/DepartmentsPostgresAsyncSpec.scala
Scala
apache-2.0
1,325
package com.teamisotope.techexpansion import com.teamisotope.techexpansion.block.TEBlocks import com.teamisotope.techexpansion.item.TEItems import net.minecraftforge.fml.common.{Mod, SidedProxy} import net.minecraftforge.fml.common.Mod._ import net.minecraftforge.fml.common.event._ import com.teamisotope.techexpansion....
collaborationmods/TechExpansion
src/main/scala/com/teamisotope/techexpansion/TechExpansion.scala
Scala
gpl-3.0
1,329
import scala.annotation.tailrec import scala.quoted._ import scala.quoted.autolift object Macro { inline def unrolledForeach(inline unrollSize: Int, seq: Array[Int])(f: => Int => Unit): Unit = // or f: Int => Unit ${unrolledForeachImpl('unrollSize, 'seq, 'f)} private def unrolledForeachImpl(unrollSizeExpr: E...
som-snytt/dotty
tests/run-macros/quote-unrolled-foreach/quoted_1.scala
Scala
apache-2.0
1,039
/* * The Bluejelly project, Copyright 2012. * * This source code is distributed under the terms of * the BSD license, see the LICENSE file for details. */ package bluejelly.l4.test import bluejelly.l4.Var import bluejelly.l4.Expr import bluejelly.l4.ELit import bluejelly.l4.ECon import bluejelly.l4.App import bl...
ppedemon/Bluejelly
bluejelly-l4/src/test/scala/bluejelly/l4/test/AstUtils.scala
Scala
bsd-3-clause
5,457
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j 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 Foundatio...
HuangLS/neo4j
community/cypher/cypher-compiler-2.3/src/test/scala/org/neo4j/cypher/internal/compiler/v2_3/planner/logical/cardinality/ExpressionSelectivityCalculatorTest.scala
Scala
apache-2.0
7,099
/* # Copyright 2016 Georges Lipka # # 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 wri...
glipka/Easy-React-With-ScalaJS
src/main/scala/com/glipka/easyReactJS/react/Factory.scala
Scala
apache-2.0
1,167
/* * 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 ...
manuzhang/incubator-gearpump
streaming/src/main/scala/org/apache/gearpump/streaming/dsl/plan/Planner.scala
Scala
apache-2.0
3,781
def flatMap[A,B](f: Rand[A])(g: A => Rand[B]): Rand[B] = rng => { val (a, r1) = f(rng) g(a)(r1) // We pass the new state along } def positiveLessThan(n: Int): Rand[Int] = { flatMap(positiveInt) { i => val mod = i % n if (i + (n-1) - mod > 0) unit(mod) else positiveLessThan(n) } }
willcodejavaforfood/fpinscala
answerkey/state/10.answer.scala
Scala
mit
305
/* * Copyright (c) 2015-2017 EpiData, Inc. */ package com.epidata.spark import com.datastax.spark.connector._ import java.sql.Timestamp import com.epidata.lib.models.{ Measurement => BaseMeasurement, MeasurementCleansed => BaseMeasurementCleansed, MeasurementSummary, SensorMeasurement => BaseSensorMeasurement, Autom...
epidataio/epidata-community
spark/src/main/scala/com/epidata/spark/EpidataContext.scala
Scala
apache-2.0
12,094
package com.github.alixba.vast import scala.xml.Node case class IconClickThrough(value: String) extends VASTElement { /** * Serializes this to a Node. */ def toXML: Node = <IconClickThrough>{ value.asCData }</IconClickThrough> } object IconClickThrough extends VASTElementCompanion[IconClickThrough] { ...
AlixBa/vast
src/main/scala/com/github/alixba/vast/IconClickThrough.scala
Scala
mit
599
package com.twitter.scalding.parquet import org.slf4j.LoggerFactory object HasColumnProjection { val LOG = LoggerFactory.getLogger(this.getClass) def requireNoSemiColon(glob: String) = { require(!glob.contains(";"), "A column projection glob cannot contain a ; character") } } trait HasColumnProjection { ...
tdyas/scalding
scalding-parquet/src/main/scala/com/twitter/scalding/parquet/HasColumnProjection.scala
Scala
apache-2.0
2,643
package juju.infrastructure.local import akka.actor.ActorRef import akka.testkit.TestProbe import juju.domain.{SagaFactory, Saga} import juju.domain.Saga.{SagaCorrelationIdResolution, SagaHandlersResolution} import juju.infrastructure.SagaRouter.SagaIsUp import juju.messages.DomainEvent import juju.testkit.LocalDomain...
brokersquare/juju
core/src/test/scala/juju/infrastructure/local/LocalSagaRouterSpec.scala
Scala
apache-2.0
1,283
package net.ruippeixotog.scalascraper.model /** The result of a query to an [[Element]]. It works as a collection of `Element` instances and provides a way to * further query the elements. */ trait ElementQuery[+E <: Element] extends Iterable[E] { /** Executes an additional query over the elements of this query...
ruippeixotog/scala-scraper
core/src/main/scala/net/ruippeixotog/scalascraper/model/ElementQuery.scala
Scala
mit
2,549
package com.eltimn.scamongo /* * Copyright 2010 Tim Nelson * * 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 a...
eltimn/scamongo
src/test/scala/com/eltimn/scamongo/DirectExamples.scala
Scala
apache-2.0
8,536
package io.udash.bootstrap.utils object BootstrapTags { import scalatags.JsDom.all._ final val dataBackdrop = data("backdrop") final val dataBind = data("bind") final val dataContent = data("content") final val dataDismiss = data("dismiss") final val dataKeyboard = data("keyboard") final val dataLabel =...
UdashFramework/udash-core
bootstrap4/.js/src/main/scala/io/udash/bootstrap/utils/BootstrapTags.scala
Scala
apache-2.0
665
/* * 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/most_transactionsSpec.scala
Scala
apache-2.0
2,763
package io.github.mandar2812.dynaml.utils.sumac import org.scalatest.FunSuite import org.scalatest.Matchers /** * Test the Map parser combinator * User: andrews * Date: 3/24/14 */ class MapCombinatorParserTest extends FunSuite with Matchers { test("should not parse something wrong") { an[IllegalArgumentEx...
transcendent-ai-labs/DynaML
dynaml-core/src/test/scala/io/github/mandar2812/dynaml/utils/sumac/MapCombinatorParserTest.scala
Scala
apache-2.0
2,682
/* * 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 ...
lyogavin/spark
core/src/main/scala/spark/scheduler/SparkListener.scala
Scala
apache-2.0
7,302
package chat.tox.antox.wrapper import im.tox.tox4j.core.data.ToxNickname class GroupPeer(var key: PeerKey, var name: ToxNickname, var ignored: Boolean) { }
wiiam/Antox
app/src/main/scala/chat/tox/antox/wrapper/GroupPeer.scala
Scala
gpl-3.0
190
(0, (_./*resolved: true*/toInt)): Tuple2[Int, Int => Int] // red (0, (_./*resolved: true*/toInt)): (Int, Int => Int) // okay
ilinum/intellij-scala
testdata/resolve2/bug3/SCL3592A.scala
Scala
apache-2.0
131
package com.atomist.tree.pathexpression import java.util.Objects import com.atomist.source.StringFileArtifact import com.atomist.tree.utils.NodeUtils._ import com.atomist.tree.pathexpression.PathExpressionParsingConstants._ import com.atomist.util.scalaparsing.CommonTypesParser /** * Scala parser combinator for pa...
atomist/rug
src/main/scala/com/atomist/tree/pathexpression/PathExpressionParser.scala
Scala
gpl-3.0
7,551
// Copyright (C) 2011-2012 the original author or authors. // See the LICENCE.txt file distributed with this work for additional // information regarding copyright ownership. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You ...
chrisjwwalker/cjww-diagnostics
app/models/ReturnedProblem.scala
Scala
apache-2.0
944
/* * 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...
jenniew/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/torch/EuclideanSpec.scala
Scala
apache-2.0
4,495
package scorex.crypto.authds.avltree import org.scalatest.propspec.AnyPropSpec import org.scalatestplus.scalacheck.ScalaCheckDrivenPropertyChecks import scorex.crypto.authds.avltree.batch._ import scorex.crypto.authds.{ADKey, ADValue, TwoPartyTests} import scorex.crypto.hash.{Blake2b256, Digest32, Sha256} class AVLD...
ScorexProject/scrypto
src/test/scala/scorex/crypto/authds/avltree/AVLDeleteSpecification.scala
Scala
cc0-1.0
1,043
/** * Generated by Scrooge * version: 3.13.0 * rev: 0921444211eb6b3d2ac9fd31a1bf189f94c6ae85 * built at: 20140325-114520 */ package com.twitter.zipkin.gen import com.twitter.scrooge.ThriftEnum @javax.annotation.Generated(value = Array("com.twitter.scrooge.Compiler")) case object ResultCode { case obj...
pkoryzna/zipkin
zipkin-scrooge/target/src_managed/main/com/twitter/zipkin/gen/ResultCode.scala
Scala
apache-2.0
1,964
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * ...
adarro/ddo-calc
incubating/ddo-provider/src/main/scala/io/truthencode/ddo/subscription/PClient.scala
Scala
apache-2.0
896
/** * 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...
engagepoint/camel
components/camel-scala/src/main/scala/org/apache/camel/scala/ScalaExpression.scala
Scala
apache-2.0
1,428
package objektwerks.types trait Semigroup[A] { def append(x: A, y: => A): A } trait Monoid[A] extends Semigroup[A] { def zero: A } trait Functor[F[_]] { def map[A, B](fa: F[A])(f: A => B): F[B] } trait Monad[F[_]] extends Functor[F] { def point[A](a: => A): F[A] def flatMap[A, B](fa: F[A])(f: A => F[B]): ...
objektwerks/scala
src/test/scala/objektwerks/types/CategoryTheoryTest.scala
Scala
apache-2.0
3,353
/* * Scala classfile decoder (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 scal...
scala/scala
src/scalap/scala/tools/scalap/Arguments.scala
Scala
apache-2.0
5,611
package com.nthportal.euler package h0.t1 import com.nthportal.euler.util.calendar.Date import com.nthportal.euler.util.calendar.DayOfWeek.{Monday, Sunday} import com.nthportal.euler.util.calendar.Month.January object Problem19 extends ProjectEulerProblem { private val startingDate = Date(new January(1900), 1, Mond...
NthPortal/euler-n-scala
src/main/scala/com/nthportal/euler/h0/t1/Problem19.scala
Scala
mit
600
/** * Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com> */ package akka.pattern import akka.actor._ import akka.util.{ Timeout } import akka.dispatch.sysmsg.{ Unwatch, Watch } import scala.concurrent.Future import scala.concurrent.duration.Duration import scala.util.Success import scala.concurrent.dur...
jmnarloch/akka.js
akka-js-actor/jvm/src/main/scala/akka/pattern/GracefulStopSupport.scala
Scala
bsd-3-clause
2,548
/* * 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...
scalatest/scalatest
jvm/scalatest-test/src/test/scala/org/scalatest/ListShouldContainInOrderElementsOfSpec.scala
Scala
apache-2.0
28,654
package pl.touk.nussknacker.openapi.functional import org.apache.http.entity.{InputStreamEntity, StringEntity} import org.apache.http.impl.bootstrap.ServerBootstrap import org.apache.http.protocol.{HttpContext, HttpRequestHandler} import org.apache.http.{HttpRequest, HttpResponse} import pl.touk.nussknacker.test.Avail...
TouK/nussknacker
components/openapi/src/it/scala/pl/touk/nussknacker/openapi/functional/StubService.scala
Scala
apache-2.0
1,489
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
jedesah/Quasar
web/src/main/scala/quasar/config/WebConfig.scala
Scala
apache-2.0
1,242
package rocks.molarialessandro.coordinates.converters import rocks.molarialessandro.coordinates.{HSBACoordinates, RGBACoordinates} class RGBAToHSBAConverter extends Converter[RGBACoordinates, HSBACoordinates] { override def convert(coordinates: RGBACoordinates): HSBACoordinates = { null // TODO } }
alem0lars/claps
src/main/scala/rocks/molarialessandro/coordinates/converters/RGBAToHSBAConverter.scala
Scala
apache-2.0
310
package es.own3dh2so4.model /** * Created by david on 27/05/17. */ case class Order (time: java.sql.Timestamp, orderId: Long, clientId: Long, symbol: String, amount: Int, price: Double, buy: Boolean){ }
own3dh2so4/spark-in-action-book
src/main/scala/es/own3dh2so4/model/Order.scala
Scala
apache-2.0
209
/* * 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-blink/src/test/scala/org/apache/flink/table/planner/plan/rules/logical/FlinkCalcMergeRuleTest.scala
Scala
apache-2.0
3,273
package uk.vitalcode.dateparser import java.time.{DayOfWeek, LocalDate, LocalDateTime, LocalTime} import uk.vitalcode.dateparser.DateTimeInterval.defaultTime import uk.vitalcode.dateparser.token._ case object Analyser { def analyse(tokens: List[DateToken]): List[DateTimeInterval] = { val dateTokens = dates(to...
vitalcode/date-time-range-parser
src/main/scala/uk/vitalcode/dateparser/Analyser.scala
Scala
mit
5,362
package models case class CurrencyData(symbol: String, name: Option[String], rate: Float)
matiwinnetou/play-currency-rates
app/models/CurrencyData.scala
Scala
apache-2.0
91
package org.jetbrains.plugins.scala package refactoring.move import org.jetbrains.plugins.scala.util.TestUtils import com.intellij.testFramework.{PlatformTestUtil, PsiTestUtil} import com.intellij.openapi.vfs.{LocalFileSystem, VirtualFile} import java.util import java.io.File import com.intellij.psi.impl.source.Postpr...
consulo/consulo-scala
test/org/jetbrains/plugins/scala/refactoring/move/ScalaMoveClassTest.scala
Scala
apache-2.0
5,453
import sbt._ object MdocLibrary { val fshell = "org.m-doc" %% "fshell" % "0.0.0-52-gb7ce9e2" val renderingEngines = "org.m-doc" %% "rendering-engines" % "0.0.0-28-ge31be67" val commonModel = "org.m-doc" %% "common-model" % "0.0.0-27-g451b84e" }
m-doc/adelmo
project/MdocLibrary.scala
Scala
apache-2.0
252
package org.scalaide.ui.internal.editor import org.eclipse.jdt.core.IJavaElement import org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor import org.eclipse.jdt.ui.actions.IJavaEditorActionDefinitionIds import org.eclipse.jface.action.Action import org.eclipse.jface.text.ITextSelection import org.scalaide.core.in...
scala-ide/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/ui/internal/editor/ScalaClassFileEditor.scala
Scala
bsd-3-clause
2,701
package chess package format import cats.data.Validated import chess.variant.Variant object UciDump { // a2a4, b8c6 def apply(force960Notation: Boolean)(replay: Replay): List[String] = replay.chronoMoves map move(replay.setup.board.variant, force960Notation) def apply( moves: Seq[String], ini...
ornicar/scalachess
src/main/scala/format/UciDump.scala
Scala
mit
1,003
/** * 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 * distributed ...
ksmpartners/ernie
ernie-server/src/test/scala/com/ksmpartners/ernie/server/filter/FilterWrapperTest.scala
Scala
apache-2.0
3,463
/* * Copyright (c) 2019. Lorem ipsum dolor sit amet, consectetur adipiscing elit. * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan. * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna. * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagi...
BiyuHuang/CodePrototypesDemo
demo/ScalaDemo/src/test/scala/com/wallace/demo/app/utils/StringFuncUtilsUnitSpec.scala
Scala
apache-2.0
7,537
/* * Copyright 2007-2008 WorldWide Conferencing, LLC * * 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...
beni55/liftweb
lift/src/main/scala/net/liftweb/builtin/snippet/Msgs.scala
Scala
apache-2.0
3,844
package org.aguo.civsim.controller import org.aguo.civsim.model.World import org.aguo.civsim.view._ object ViewController { def handleInput(input: String, world: World): World = input match { case "b" | "buildings" => ViewBuildingScreen.render(world) case "j" | "jobs" => ViewJobScreen.render(world) cas...
aguo777/civ-sim
src/main/scala/org/aguo/civsim/controller/ViewController.scala
Scala
mit
361
package org.jetbrains.plugins.scala package lang.psi.light.scala import com.intellij.psi.PsiElement import com.intellij.psi.impl.light.LightElement import org.jetbrains.plugins.scala.lang.psi.api.base.ScPrimaryConstructor import org.jetbrains.plugins.scala.lang.psi.api.expr.ScFunctionExpr import org.jetbrains.plugins....
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/light/scala/ScLightParameterClause.scala
Scala
apache-2.0
1,817
package ru.wordmetrix.treeapproximator import java.io.{File, InputStream} import java.net.URI import ru.wordmetrix.smartfile.SmartFile.fromFile import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.{Await, Future} import scala.concurrent.duration._ /** * An utility that prepares a sampl...
electricmind/treeapproximator
src/main/scala/ru/wordmetrix/treeapproximator/SamplingOfSections.scala
Scala
apache-2.0
2,535
package org.pico.statsd.impl import java.net.{InetAddress, InetSocketAddress} object StaticAddressResolution { /** * Lookup the address for the given host name and cache the result. * * @param hostname the host name of the targeted StatsD server * @param port the port of the targeted StatsD serv...
pico-works/pico-statsd
pico-statsd/src/main/scala/org/pico/statsd/impl/StaticAddressResolution.scala
Scala
mit
645
package chapter14 object Exercise4 extends App { sealed abstract class Item case class Product(name: String, price: Double) extends Item case class Multiple(count: Int, item: Item) extends Item def price(item: Item): Double = item match { case Product(_, result) => result case Multiple(count, subIt...
vsuharnikov/books-exercises
scala/scala-for-the-impatient/src/main/scala/chapter14/Exercise4.scala
Scala
mit
456
/* * 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 ...
lxn2/mxnet
scala-package/core/src/main/scala/ml/dmlc/mxnet/module/DataParallelExecutorGroup.scala
Scala
apache-2.0
26,991
/* * 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/MiscIsEmptySuite.scala
Scala
apache-2.0
1,873
/** * 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...
stealthly/kafka
core/src/test/scala/unit/kafka/server/KafkaConfigTest.scala
Scala
apache-2.0
3,960
package spire package object syntax { object cfor extends CforSyntax object literals extends LiteralsSyntax object eq extends EqSyntax object partialOrder extends PartialOrderSyntax object order extends OrderSyntax object signed extends SignedSyntax object truncatedDivision extends TruncatedDivisionSynt...
adampingel/spire
core/src/main/scala/spire/syntax/package.scala
Scala
mit
2,285
package api import com.google.inject.AbstractModule import com.google.inject.multibindings.Multibinder import org.reflections.Reflections import play.twirl.api.TemplateMagic.javaCollectionToScala import play.api.Logger class IntegrationsBindingModule extends AbstractModule { override def configure(): Unit = { v...
JetChat/JetChat
app/api/IntegrationsBindingModule.scala
Scala
apache-2.0
696
package com.twitter.finagle.http.filter import com.twitter.finagle.{Service, SimpleFilter} import com.twitter.finagle.http.{Request, Response, Status} import com.twitter.util.Future /** * Validate request filter: * 400 Bad Request if the parameters are invalid. */ @deprecated("Being removed due to its limited u...
spockz/finagle
finagle-http/src/main/scala/com/twitter/finagle/http/filter/ValidateRequestFilter.scala
Scala
apache-2.0
787