code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
filosganga/play-predictionio
src/main/scala/com/github/filosganga/play/predictionio/PredictionIoPlugin.scala
Scala
apache-2.0
2,183
package TAPLcomp2.simplebool import scala.util.parsing.combinator.{ImplicitConversions, PackratParsers} import scala.util.parsing.combinator.syntactical.StandardTokenParsers sealed trait Term case class TmVar(i: String) extends Term case class TmAbs(v: String, ty: Ty, t: Term) extends Term case class TmApp(t1: Ter...
hy-zhang/parser
Scala/Parser/src/TAPLcomp2/simplebool/parser.scala
Scala
bsd-3-clause
2,029
/* * 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/sql/LegacyLimitTest.scala
Scala
apache-2.0
3,930
package io.getquill.idiom import io.getquill.ast._ import io.getquill.util.Interleave import io.getquill.util.Messages._ import scala.collection.mutable.ListBuffer object StatementInterpolator { trait Tokenizer[T] { def token(v: T): Token } object Tokenizer { def apply[T](f: T => Token) = new Tokeniz...
getquill/quill
quill-core-portable/src/main/scala/io/getquill/idiom/StatementInterpolator.scala
Scala
apache-2.0
6,718
class A(a: Int) object A { val x = 3 }
dotty-staging/dotty
sbt-test/source-dependencies/constructors-unrelated/A.scala
Scala
apache-2.0
39
/* * Copyright (c) 2021, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ package com.krux.hyperion.activity import com.krux.hyperion.adt._ import com.krux.hyperion...
realstraw/hyperion
contrib/activity/definition/src/main/scala/com/krux/hyperion/activity/SftpActivity.scala
Scala
bsd-3-clause
3,640
package sigmastate.serialization import sigmastate._ import sigmastate.utxo._ class TransformersSerializationSpec extends SerializationSpecification { property("MapCollection: Serializer round trip") { forAll { mc: MapCollection[SInt.type, SInt.type] => roundTripTest(mc) } } property("Exists: Se...
ScorexFoundation/sigmastate-interpreter
sigmastate/src/test/scala/sigmastate/serialization/TransformersSerializationSpec.scala
Scala
mit
4,188
/* * 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...
nilbody/sparkling-water
core/src/main/scala/org/apache/spark/repl/H2OIMain.scala
Scala
apache-2.0
67,550
/* * Copyright © 2014 TU Berlin ([email protected]) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
aalexandrov/emma
emma-language/src/test/scala/org/emmalanguage/compiler/lang/core/DCESpec.scala
Scala
apache-2.0
2,058
package lila.simul import play.api.libs.json._ import lila.common.LightUser import lila.game.{ Game, GameRepo } import lila.user.User final class JsonView( gameRepo: GameRepo, getLightUser: LightUser.Getter, proxyRepo: lila.round.GameProxyRepo )(implicit ec: scala.concurrent.ExecutionContext) { implic...
luanlv/lila
modules/simul/src/main/JsonView.scala
Scala
mit
4,865
/* * Copyright 2016 by Simba Project * * 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...
InitialDLab/Simba
src/main/scala/org/apache/spark/sql/simba/IndexManager.scala
Scala
apache-2.0
12,660
/* * Copyright 2015 Daniel W. H. James * * 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 ...
dwhjames/play-cors
src/main/scala/play/filters/cors/CORSActionBuilder.scala
Scala
apache-2.0
3,604
package com.github.log0ymxm.mapper class UnionFind(val n: Int) { private[this] val comp = (0 until n).toArray[Int] private[this] val compSize = Array.fill[Int](n)(1) private[this] var nComp: Int = n def add(u: Int, v: Int): Int = { val uRoot = find(u) val vRoot = find(v) if (uRoot != vRoot) { ...
log0ymxm/spark-mapper
src/main/scala/com/github/log0ymxm/mapper/UnionFind.scala
Scala
apache-2.0
927
package me.invkrh.raft.core import scala.collection.mutable.ArrayBuffer import scala.concurrent.ExecutionContextExecutor import scala.concurrent.duration._ import scala.language.postfixOps import akka.actor.{Actor, ActorRef, ActorSystem, Props, Scheduler} import akka.pattern.pipe import me.invkrh.raft.deploy.raftSer...
invkrh/akka-raft
src/main/scala/me/invkrh/raft/core/Server.scala
Scala
mit
14,776
package com.karasiq.shadowcloud.javafx import akka.actor.ActorSystem import com.karasiq.shadowcloud.providers.LifecycleHook import scala.concurrent.Await private[javafx] final class SCJavaFXLifecycleHook(actorSystem: ActorSystem) extends LifecycleHook { override def initialize(): Unit = { import scala.concurre...
Karasiq/shadowcloud
javafx/src/main/scala/com/karasiq/shadowcloud/javafx/SCJavaFXLifecycleHook.scala
Scala
apache-2.0
445
package model /** * Created by lukasz on 11.11.16. */ case class UserData(id: Option[Long], email: String, firstName: Option[String], lastName: Option[String]) object UserData { def tupled = (UserData.apply _).tupled }
lszku/ProductDatabase
app/model/UserData.scala
Scala
bsd-3-clause
229
package methods /** * Created by rapolu on 17/02/2017. */ object singleton extends App{ println("Welcome to First Object.") }
java8dev/scala4impatient
src/main/scala/methods/singleton.scala
Scala
gpl-3.0
134
package nl.gideondk.sentinel.protocol import akka.stream.Materializer import akka.stream.scaladsl.{ BidiFlow, Framing, Sink, Source } import akka.util.{ ByteString, ByteStringBuilder } import nl.gideondk.sentinel.pipeline.Resolver import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Futur...
gideondk/sentinel
src/test/scala/nl/gideondk/sentinel/protocol/SimpleMessage.scala
Scala
apache-2.0
3,918
import play.api.libs.json._ import scala.collection.immutable.ListMap import scala.reflect.runtime.{ universe => ru } sealed trait Schema { def name: String lazy val descendents: Set[Schema] = this match { case dt: Atom => Set(this) case dt: Sum => dt.fields.foldLeft(Set(this))(_ union _._2.desce...
davegurnell/shapeless-metadata
src/main/scala/Schema.scala
Scala
apache-2.0
2,705
package ella import org.specs2.mutable.Specification import spray.testkit.Specs2RouteTest import spray.http._ import StatusCodes._ class EllaServiceSpec extends Specification with Specs2RouteTest with EllaService { def actorRefFactory = system "Ella" should { "return a greeting for GET requests to the roo...
amezhenin/ella
src/test/scala/ella/EllaServiceSpec.scala
Scala
mit
1,263
/* * 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 ...
yelshater/hadoop-2.3.0
spark-core_2.10-1.0.0-cdh5.1.0/src/main/scala/org/apache/spark/deploy/ExecutorState.scala
Scala
apache-2.0
1,099
class C { type T; type U } trait Test { val x: (C { type U = T } { type T = String }) # U val y: String = x }
yusuke2255/dotty
tests/pos/lookuprefined.scala
Scala
bsd-3-clause
117
package reactivemongo.api import reactivemongo.api.{ BSONSerializationPack => SerPack } import reactivemongo.api.commands.{ CommandCodecs, WriteResult } @deprecated("Upgrade to 2.11+", "0.19.0") private[reactivemongo] object Serialization { type Pack = SerPack.type type DefaultCollection = collections.GenericCo...
ornicar/ReactiveMongo
driver/src/main/scala-2.10/api/Serialization.scala
Scala
apache-2.0
851
/* * 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 ...
shenbaise/mltoy
src/main/scala/org/apache/spark/examples/SparkLR.scala
Scala
apache-2.0
2,859
object Test { def foo(x: String, z: String, y: String = ""): Int = 1 def foo(x: String, y: String): Int = 2 /* line: 3 */foo("", "") }
ilinum/intellij-scala
testdata/resolve2/overloading/DefaultIgnored.scala
Scala
apache-2.0
141
/** * Copyright (C) 2014 Orbeon, Inc. * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. * * This program i...
ajw625/orbeon-forms
src/main/scala/org/orbeon/oxf/http/PropertiesApacheHttpClient.scala
Scala
lgpl-2.1
2,434
package com.github.dnvriend.aws.lambda.handler import java.io.{ InputStream, OutputStream } import com.amazonaws.services.lambda.runtime.{ Context, RequestStreamHandler } import com.github.dnvriend.ops.{ AllOps, JsonOps } import com.github.dnvriend.ops.Functional.DisjunctionNel import play.api.libs.json._ import sca...
dnvriend/serverless-test
aws-lambda-handler/src/main/scala/com/github/dnvriend/aws/lambda/handler/LambdaRequestHandler.scala
Scala
apache-2.0
3,012
package mesosphere.marathon package core.storage.repository.impl import java.time.OffsetDateTime import akka.http.scaladsl.marshalling.Marshaller import akka.http.scaladsl.unmarshalling.Unmarshaller import akka.stream.scaladsl.Source import akka.{ Done, NotUsed } import mesosphere.marathon.core.storage.repository.{ R...
guenter/marathon
src/main/scala/mesosphere/marathon/core/storage/repository/impl/PersistenceStoreRepository.scala
Scala
apache-2.0
2,723
import models.{AppDB, Bar} import org.scalatest.FlatSpec import org.scalatest.matchers.ShouldMatchers import org.squeryl.PrimitiveTypeMode.inTransaction import play.api.test._ import play.api.test.Helpers._ class BarSpec extends FlatSpec with ShouldMatchers { "A Bar" should "be creatable" in { running(FakeAp...
jschappet/play-example
test/BarSpec.scala
Scala
mit
513
package com.nulabinc.backlog.r2b.exporter.core import javax.inject.Inject import com.nulabinc.backlog.migration.common.conf.BacklogPaths import com.nulabinc.backlog.migration.common.domain.BacklogProjectKey import com.nulabinc.backlog.r2b.exporter.conf.ExportConfig import com.nulabinc.backlog.r2b.exporter.convert._ i...
nulab/BacklogMigration-Redmine
src/main/scala/com/nulabinc/backlog/r2b/exporter/core/ExportContextProvider.scala
Scala
mit
1,695
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
felixmulder/scala
src/library/scala/collection/generic/BitOperations.scala
Scala
bsd-3-clause
2,384
/* * Powell.scala * (Poirot) * * Copyright (c) 2013-2018 Hanns Holger Rutz. All rights reserved. * Code is often based on or identical to the original JaCoP Scala wrappers by * Krzysztof Kuchcinski and Radoslaw Szymanek. * * This software is published under the GNU Affero General Public License v3+ * * ...
Sciss/Poirot
src/test/scala/de/sciss/poirot/examples/Powell.scala
Scala
agpl-3.0
1,095
package enigma /** * Here the signal is connected to the 'T' input on the plugboard. Some of * the letters on the plugboard will be wired up to other letters (the plugs), * causing the signal to be diverted. If the 'T' input is not plugged to another * letter then our signal will pass straight to the 'T output. In...
timperrett/enigma
src/main/scala/enigma/Plugboard.scala
Scala
apache-2.0
986
/** MACHINE-GENERATED FROM AVRO SCHEMA. DO NOT EDIT DIRECTLY */ package example.idl import scala.annotation.switch import other.ns.{ExternalDependency, Suit} sealed trait ImportProtocol extends org.apache.avro.specific.SpecificRecordBase with Product with Serializable final case class DependentRecord(var dependency...
julianpeeters/avrohugger
avrohugger-core/src/test/expected/specific/example/idl/ImportProtocol.scala
Scala
apache-2.0
3,989
package at.forsyte.apalache.tla.bmcmt.rewriter /** * An object implementing Recoverable implements two methods: snapshot and recover. The method 'snapshot' takes * a snapshot of the object state. This snapshot can be restored with the method 'recover'. */ trait Recoverable[T] { /** * Take a snapshot and re...
konnov/apalache
tla-bmcmt/src/main/scala/at/forsyte/apalache/tla/bmcmt/rewriter/Recoverable.scala
Scala
apache-2.0
538
package lara.epfl.scalasca.core abstract class LatticeElement[T](val index: Int, val set: Set[T]) case class Bottom[T](override val index: Int) extends LatticeElement[T](index, Set[T]()) case class Regular[T](override val index: Int, override val set: Set[T]) extends LatticeElement[T](index, set) case class Top[T](...
jean-andre-gauthier/scalasca
src/main/scala/lara/epfl/scalasca/core/LatticeElement.scala
Scala
bsd-3-clause
387
package lila.tournament import chess.format.FEN import org.joda.time.DateTime import org.joda.time.format.ISODateTimeFormat import play.api.i18n.Lang import play.api.libs.json._ import scala.concurrent.duration._ import scala.concurrent.ExecutionContext import lila.common.Json._ import lila.common.{ GreatPlayer, Ligh...
luanlv/lila
modules/tournament/src/main/JsonView.scala
Scala
mit
20,550
package controllers import play.api._ import play.api.mvc._ import play.api.Play.current import play.api.cache.Cache import java.util._ object CacheController extends Controller { def setCache =Action{ implicit request => val now = new Date() val data = now.toString() val until = now.getTime() + 10000...
khonda/playframeworkPractice
app/controllers/CacheController.scala
Scala
mit
860
package mesosphere.marathon package api.v2.validation import com.wix.accord.Validator import com.wix.accord.dsl._ import mesosphere.marathon.api.v2.Validation import mesosphere.marathon.raml.{ EnvVarSecretRef, EnvVarValueOrSecret, SecretDef } trait SecretValidation { import Validation._ def stringify(ref: EnvVar...
natemurthy/marathon
src/main/scala/mesosphere/marathon/api/v2/validation/SecretValidation.scala
Scala
apache-2.0
1,205
package org.jetbrains.plugins.scala package lang.psi.light.scala import com.intellij.psi.impl.light.LightElement import org.jetbrains.plugins.scala.lang.psi.api.statements.params.{ScParameter, ScParameterClause} import org.jetbrains.plugins.scala.lang.psi.types.ScType import org.jetbrains.plugins.scala.lang.psi.ScalaP...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/psi/light/scala/ScLightParameterClause.scala
Scala
apache-2.0
1,323
package outwatch import cats.{Applicative, Monoid} import cats.implicits._ import org.scalajs.dom import scala.scalajs.js import colibri._ import colibri.effect.RunSyncEffect trait ManagedSubscriptions { @inline def managed[F[_] : RunSyncEffect, T : CanCancel](subscription: F[T]): VDomModifier = managedFunction(()...
OutWatch/outwatch
outwatch/src/main/scala/outwatch/ManagedSubscriptions.scala
Scala
apache-2.0
1,499
/** * Copyright (C) 2009-2011 the original author or authors. * See the notice.md 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. * Yo...
arashi01/scalate-samples
scalate-sample-spring-mvc/src/main/scala/org/fusesource/scalate/sample/springmvc/config/AppConfig.scala
Scala
apache-2.0
1,075
package com.sageserpent.americium import cats.free.Free.pure import com.sageserpent.americium.TrialsImplementation.{ Factory, GenerationOperation } import com.sageserpent.americium.java.CaseFactory trait CommonApi { def only[Case](onlyCase: Case): TrialsImplementation[Case] = TrialsImplementation(pure[Gener...
sageserpent-open/americium
src/main/scala/com/sageserpent/americium/CommonApi.scala
Scala
mit
934
package com.marmoush import akka.actor.ActorSystem import scala.concurrent.ExecutionContext /** * Created by spark on 11/17/15. */ package object scalasamples { object Contexts { private val akka: ActorSystem = ActorSystem("helloakka") implicit val simpleDbLookups: ExecutionContext = akka.dispatchers....
IsmailMarmoush/scala-samples
akka/src/main/scala/com/marmoush/scalasamples/package.scala
Scala
agpl-3.0
728
/* * 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
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsLifecycleManagerSuite.scala
Scala
apache-2.0
6,882
package prisoners_dilemma import org.scalacheck._ object StrategyGen { import Gen._ def streamOfN[T](n: Int, g: Gen[T]): Gen[Stream[T]] = Gen.containerOfN[Stream, T](n, g) def infiniteStream[T](g: Gen[T]) = const("poo") map { (_) => { def streaminate(gen: Gen[T]): Stream[Option[T]] = gen.sam...
Mharlin/better-testing-workshop
exercise2-prisoners-dilemma-completed/src/test/scala/prisoners-dilemma/StrategyTest.scala
Scala
mit
2,467
package reswing import rescala.default.{Event, Evt, implicitScheduler} import rescala.operator.cutOutOfUserComputation /** Represents `Swing` events that are fired by the library or passed to the * library. */ sealed abstract class ReSwingEvent[T] { private[reswing] def toEvent: Event[T] } final class ReSwingE...
guidosalva/REScala
Code/Extensions/RESwing/src/main/scala/reswing/ReSwingEvent.scala
Scala
apache-2.0
1,413
package com.twitter.penguin.korean.phrase_extractor import java.util.logging.Logger import com.twitter.penguin.korean.TestBase._ import com.twitter.penguin.korean.TwitterKoreanProcessor.tokenize import com.twitter.penguin.korean.normalizer.KoreanNormalizer import com.twitter.penguin.korean.tokenizer.KoreanTokenizer.K...
NamHosung/SE
src/test/scala/com/twitter/penguin/korean/phrase_extractor/KoreanPhraseExtractorTest.scala
Scala
apache-2.0
10,368
package stealthnet.scala.cryptography import java.security.{Key, KeyFactory, PrivateKey, PublicKey} import java.security.interfaces.RSAPublicKey import java.security.spec.RSAPublicKeySpec import javax.crypto.Cipher import org.bouncycastle.crypto.{BlockCipher, BufferedBlockCipher} import org.bouncycastle.crypto.engines...
suiryc/StealthNet
core/src/main/scala/stealthnet/scala/cryptography/Ciphers.scala
Scala
gpl-3.0
7,809
/*** * 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...
wdschei/api-checker
core/src/test/scala/com/rackspace/com/papi/components/checker/wadl/WADLCheckerRaxRolesSpec.scala
Scala
apache-2.0
59,723
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
erictu/adam
adam-core/src/test/scala/org/bdgenomics/adam/rdd/read/MarkDuplicatesSuite.scala
Scala
apache-2.0
8,646
package chapter.four import java.io.File import java.util.{ Scanner, TreeMap } import scala.collection.mutable.Map import scala.collection.JavaConversions.mapAsScalaMap import scala.collection.immutable.{ HashMap, SortedMap } object ExerciseTwoThroughFive { val Word = """([-A-Za-z]+)""".r // todo: autocloseable...
deekim/impatient-scala
src/main/scala/chapter/four/ExerciseTwoThroughFive.scala
Scala
apache-2.0
2,110
/* * 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/test/scala/com/intel/analytics/bigdl/nn/NarrowTableSpec.scala
Scala
apache-2.0
1,249
package plda.week7 /** * * @author Lorand Szakacs, [email protected], [email protected] * @since 08 Nov 2016 * */ import TestingLanguage._ object Main extends App { 1.test { val x1 = 42 val x2 = 1 (x1, x2) } 2.test { val x1 = 42 val x2 = 42 (x1, x2) } ...
2016-Fall-UPT-PLDA/labs
week-07/scala-test-dsl/src/main/scala/plda/week7/Main.scala
Scala
gpl-3.0
322
package org.perftester import java.io.File import java.nio.file.{Files, Paths} import ammonite.ops.{Command, Path, Shellout, read} import org.perftester.git.GitUtils import org.perftester.process.{IO, Parent, ProcessConfiguration} import org.perftester.renderer.{HtmlRenderer, TextRenderer} import org.perftester.resul...
rorygraves/perf_tester
src/main/scala/org/perftester/ProfileMain.scala
Scala
apache-2.0
17,769
package strata.data import java.io.File import strata.util.IO /** An abstract program; a list of instructions. */ case class Program(instructions: Seq[Instruction], src: String) { override def toString = { src } } object Program { def fromFile(f: File): Program = { val Pattern = " (.*)#.*OPC=([^ ]*) *...
StanfordPL/strata
src/main/scala/strata/data/Program.scala
Scala
apache-2.0
1,073
package mimir.exec; import mimir.algebra._; abstract class ResultIterator { def apply(v: Int): PrimitiveValue; def deterministicRow(): Boolean; def deterministicCol(v: Int): Boolean; def missingRows(): Boolean; def open() def getNext(): Boolean; def close(); def numCols: Int; def schema: List[(Strin...
Legacy25/mimir
mimircore/src/main/scala/mimir/exec/ResultIterator.scala
Scala
apache-2.0
829
package org.scalajs.jsenv.test import org.scalajs.jsenv._ import org.scalajs.core.tools.io._ import org.junit.Test import org.junit.Assert._ import scala.concurrent.Await /** A couple of tests that test communication for mix-in into a test suite */ trait ComTests extends AsyncTests { protected def newJSEnv: Com...
lrytz/scala-js
js-envs-test-kit/src/main/scala/org/scalajs/jsenv/test/ComTests.scala
Scala
bsd-3-clause
5,042
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.api.data.format import org.specs2.mutable.Specification import java.util.{ UUID, Date, TimeZone } import play.api.data._ import play.api.data.Forms._ class FormatSpec extends Specification { "dateFormat" should { "support...
ktoso/playframework
framework/src/play/src/test/scala/play/api/data/format/FormatSpec.scala
Scala
apache-2.0
5,653
/* __ *\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2010, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\___/_/ |_/...
cran/rkafkajars
java/scala/util/control/Breaks.scala
Scala
apache-2.0
1,739
/* Copyright 2009-2021 EPFL, Lausanne */ package stainless package extraction package object oo { object trees extends oo.Trees with ClassSymbols { case class Symbols( functions: Map[Identifier, FunDef], sorts: Map[Identifier, ADTSort], classes: Map[Identifier, ClassDef], typeDefs: Map[...
epfl-lara/stainless
core/src/main/scala/stainless/extraction/oo/package.scala
Scala
apache-2.0
2,005
/* * 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...
adarro/ddo-calc
subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/misc/package.scala
Scala
apache-2.0
943
package org.ai4fm.proofprocess.isabelle.core.patch import scala.util.{Failure, Success, Try} import org.eclipse.core.runtime.{CoreException, Platform} import org.ai4fm.proofprocess.isabelle.core.IPatchActionHandler import org.ai4fm.proofprocess.isabelle.core.IsabellePProcessCorePlugin.{error, log, plugin} import org...
andriusvelykis/proofprocess
org.ai4fm.proofprocess.isabelle.core/src/org/ai4fm/proofprocess/isabelle/core/patch/IsabellePatcher.scala
Scala
epl-1.0
3,169
package org.scalatra import collection.generic.CanBuildFrom import annotation.implicitNotFound /* * All credit for the code in this file is a minimized version of scalaz' Zero * in scalaz 7 the Zero type class has been removed and zero's only exist on a monoid. * Because we were abusing the Zero typeclass as a way...
etorreborre/scalatra
core/src/main/scala/org/scalatra/DefaultValue.scala
Scala
bsd-2-clause
7,002
package controllers import javax.inject.Inject import dao.TeamDAO import models.Team._ import play.api.libs.json._ import play.api.mvc._ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future class TeamController @Inject()(teamDao: TeamDAO) extends Controller { def getTeams(club...
magura42/KickAppServer
app/controllers/TeamController.scala
Scala
mit
1,780
package utils import org.slf4j.LoggerFactory /** * Created by anand on 17/8/15. */ trait LoggerHelper { private val logger = LoggerFactory.getLogger(this.getClass) protected def debug(message: String): Unit = logger.debug(message) protected def debug(message: String, exception: Throwable): Unit = logger.de...
anand-singh/csr-ticketing-system
app/utils/LoggerHelper.scala
Scala
apache-2.0
858
import scala.language.experimental.macros object Macros { def impl(c: scala.reflect.macros.blackbox.Context) = { import c.universe._ q""" trait Foo { def x = 2 } new Foo {} """ } def foo: Any = macro impl }
yusuke2255/dotty
tests/untried/neg/macro-blackbox-structural/Impls_Macros_1.scala
Scala
bsd-3-clause
253
package Tutorial import Chisel._ import Node._ import Literal._ import scala.collection.mutable.HashMap import scala.collection.mutable.ArrayBuffer class dram (extCompName:String) extends gComponentLeaf (() => new mem_req_t)(() => new mem_rep_t) (ArrayBuffer(("dramBank0", () => UFix(width = 32) , () => UFix(width =...
seyedmaysamlavasani/GorillaPP
apps/pageRank/build/dram.scala
Scala
bsd-3-clause
32,018
package string_formats.yaml import de.zalando.play.controllers._ import org.scalacheck._ import org.scalacheck.Arbitrary._ import org.scalacheck.Prop._ import org.scalacheck.Test._ import org.specs2.mutable._ import play.api.test.Helpers._ import play.api.test._ import play.api.mvc.MultipartFormData.FilePart import pl...
zalando/play-swagger
play-scala-generator/src/test/resources/expected_results/tests/string_formats_yaml.scala
Scala
mit
9,666
package org.sisioh.aws4s.dynamodb.extension import com.amazonaws.services.{ dynamodbv2 => aws } import org.sisioh.aws4s.dynamodb.Implicits._ case class LocalSecondaryIndex(underlying: aws.model.LocalSecondaryIndexDescription) { val indexNameOpt: Option[String] = underlying.indexNameOpt val keySchemaOpt: Option[...
sisioh/aws4s
aws4s-dynamodb-ext/src/main/scala/org/sisioh/aws4s/dynamodb/extension/LocalSecondaryIndex.scala
Scala
mit
868
package com.chaos.pingplusplus.model import com.google.gson.Gson /** * Created by zcfrank1st on 11/17/14. */ object Notify { class InnerObj { var obj: String = _ } def parseNotify(notifyJson: String): Any = { var innerObj: InnerObj = new InnerObj innerObj = new Gson().fromJson(notifyJson, innerOb...
zcfrank1st/chaos-pingapp-scala
src/main/scala/com/chaos/pingplusplus/model/Notify.scala
Scala
mit
648
package scaladex.infra.sql import doobie._ import scaladex.core.model.Project import scaladex.infra.sql.DoobieUtils.Mappings._ import scaladex.infra.sql.DoobieUtils._ object ProjectSettingsTable { val table: String = "project_settings" val referenceFields: Seq[String] = Seq("organization", "repository") val se...
scalacenter/scaladex
modules/infra/src/main/scala/scaladex/infra/sql/ProjectSettingsTable.scala
Scala
bsd-3-clause
886
package ch.ninecode.model import com.esotericsoftware.kryo.Kryo import com.esotericsoftware.kryo.Serializer import com.esotericsoftware.kryo.io.Input import com.esotericsoftware.kryo.io.Output import org.apache.spark.sql.Row import ch.ninecode.cim.CIMClassInfo import ch.ninecode.cim.CIMContext import ch.ninecode.cim....
derrickoswald/CIMScala
CIMReader/src/main/scala/ch/ninecode/model/unused.scala
Scala
mit
4,091
/*********************************************************************** * 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 ...
MutahirKazmi/geomesa
geomesa-accumulo/geomesa-accumulo-tools/src/main/scala/org/locationtech/geomesa/accumulo/tools/data/AddAttributeIndexCommand.scala
Scala
apache-2.0
3,110
/* * 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 ...
Aegeaner/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StreamExecution.scala
Scala
apache-2.0
26,805
package exercises.ch04 object Ex03 { def map2[A,B,C](a: Option[A], b: Option[B])(f: (A,B) => C): Option[C] = (a,b) match { case (None, _) => None case (_, None) => None case (Some(a),Some(b)) => Some(f(a,b)) } def main(args: Array[String]): Unit = { println(map2[Int,Int,Int](None, Some(5))((a,b...
VladMinzatu/fpinscala-exercises
src/main/scala/exercises/ch04/Ex03.scala
Scala
mit
460
/* * 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 ...
ueshin/apache-spark
core/src/main/scala/org/apache/spark/deploy/master/Master.scala
Scala
apache-2.0
52,051
package co.theasi.plotly.writer import org.json4s._ import org.json4s.native.JsonMethods._ import org.json4s.JsonDSL._ import scala.util.{Try, Success, Failure} import co.theasi.plotly._ object FigureWriter { def draw( figure: Figure, fileName: String, fileOptions: FileOptions = FileOptions() ...
ASIDataScience/scala-plotly-client
src/main/scala/co/theasi/plotly/writer/FigureWriter.scala
Scala
mit
10,045
/* * ____ ____ _____ ____ ___ ____ * | _ \\ | _ \\ | ____| / ___| / _/ / ___| Precog (R) * | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data * | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, In...
precog/platform
yggdrasil/src/test/scala/com/precog/yggdrasil/SValueSpec.scala
Scala
agpl-3.0
2,025
package piecewise abstract class SplineConvert[-S <: PieceFunction, +R <: PieceFunction] extends Function1[S, R]{ }
daniil-timofeev/gridsplines
piecewise/src/main/scala/piecewise/SplineConvert.scala
Scala
apache-2.0
119
package io.getquill.context.orientdb import com.orientechnologies.orient.core.db.ODatabasePool import com.orientechnologies.orient.core.db.ODatabaseType import com.orientechnologies.orient.core.db.OrientDB import com.orientechnologies.orient.core.db.OrientDBConfig import com.orientechnologies.orient.core.metadata.sche...
mentegy/quill
quill-orientdb/src/test/scala/io/getquill/context/orientdb/orientdb.scala
Scala
apache-2.0
2,168
package shared.forms import shared.messages.Language case class FormData[T](language: Language, data: T, errors: Map[String, List[String]] = Map(), generalErrors: List[String] = Nil) { def hasErrors = errors.exists(_._2.nonEmpty) || generalErrors....
Igorocky/lesn
shared/src/main/scala/shared/forms/FormData.scala
Scala
mit
330
package io.github.yzernik.bitcoinscodec.messages import io.github.yzernik.bitcoinscodec.CodecSuite import io.github.yzernik.bitcoinscodec.structures._ import scodec.bits._ class GetHeadersSpec extends CodecSuite { val getheaders = GetHeaders( 70001L, List(Hash(hex"000000000019d6689c085ae165831e934ff763ae46...
yzernik/bitcoin-scodec
src/test/scala/io/github/yzernik/bitcoinscodec/messages/GetHeadersSpec.scala
Scala
mit
918
/* * Happy Melly Teller * Copyright (C) 2013 - 2016, Happy Melly http://www.happymelly.com * * This file is part of the Happy Melly Teller. * * Happy Melly Teller 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 Fo...
HappyMelly/teller
app/models/repository/ExchangeRateRepository.scala
Scala
gpl-3.0
3,684
package com.sksamuel.elastic4s.requests.searches.aggs.responses.bucket import com.sksamuel.elastic4s.requests.searches.aggs.responses.{AggBucket, BucketAggregation} case class IpRangeAggResult(name: String, buckets: Seq[IpRangeBucket]) extends BucketAggregation case class IpRangeBucket(key: Option[String], ...
sksamuel/elastic4s
elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/responses/bucket/iprange.scala
Scala
apache-2.0
1,387
/* * Part of GDL book_api. * Copyright (C) 2017 Global Digital Library * * See LICENSE */ package io.digitallibrary.bookapi.repository import io.digitallibrary.bookapi.model.domain.{Book, Publisher} import io.digitallibrary.bookapi.{IntegrationSuite, TestEnvironment} import io.digitallibrary.license.model.Licens...
GlobalDigitalLibraryio/book-api
src/test/scala/io/digitallibrary/bookapi/repository/BookRepositoryTest.scala
Scala
apache-2.0
1,203
package mojave import shapeless.Lens object LensExamples extends App { import mojave._ trait Tag case class Html(content: Tag) case class Body(content: String) extends Tag case class Head(content: String) extends Tag private val wrapper = Html(Body("hello world")) private val compositeLens: Lens[Html...
raimohanska/mojave
src/test/scala/mojave/LensExamples.scala
Scala
mit
499
package sms.core.actor import akka.actor.{ActorLogging, PoisonPill, Props} import akka.contrib.pattern.{DistributedPubSubExtension, DistributedPubSubMediator, ClusterSingletonManager} import sms.core.Logging abstract class SMSSingletonActorCompanion extends SMSActorCompanion { def singletonProps: Props def defin...
kjanosz/stock-market-sherlock
core/src/main/scala/sms/core/actor/singleton.scala
Scala
apache-2.0
966
package org.kimbasoft.akka.fsm import akka.actor.FSM.{Transition, CurrentState} import akka.actor.{ActorLogging, Actor} import org.kimbasoft.akka.fsm.StateActorFSM.Batch /** * Missing documentation. * * @author <a href="[email protected]">Steffen Krause</a> * @since 1.0 */ class StateActorListener ex...
kimba74/sandbox-scala
src/main/scala/org/kimbasoft/akka/fsm/StateActorListener.scala
Scala
gpl-3.0
760
package calculator import org.scalatest.FunSuite import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest._ import TweetLength.MaxTweetLength @RunWith(classOf[JUnitRunner]) class CalculatorSuite extends FunSuite with ShouldMatchers { /****************** ** TWEET LENGTH ** ...
rranelli/rrreacprog
calculator/src/test/scala/calculator/CalculatorSuite.scala
Scala
unlicense
1,760
package com.twitter.finagle.zookeeper import com.twitter.conversions.DurationOps._ import com.twitter.io.TempDirectory.create import com.twitter.finagle.common.zookeeper.ZooKeeperClient import com.twitter.zk.ServerCnxnFactory import java.net.{InetAddress, InetSocketAddress} import org.apache.zookeeper.server.ZooKeeper...
luciferous/finagle
finagle-serversets/src/test/scala/com/twitter/finagle/zookeeper/ZkInstance.scala
Scala
apache-2.0
1,440
package com.madsen.xcs.core.actuator import com.madsen.xsc.interop.actuator.{Actuator => InteropActuator, ActuatorStore} /** * Created by erikmadsen2 on 15/05/15. */ trait CompositeActuatorStore extends ActuatorStore { override final def lookup(s: String): InteropActuator = doLookup(s) protected def doLookup(...
beatmadsen/xcs-main
src/main/scala/com/madsen/xcs/core/actuator/CompositeActuatorStore.scala
Scala
mit
352
package endpoints package documented package algebra import scala.language.higherKinds /** * Algebra interface for describing responses. * * This interface is modeled after [[endpoints.algebra.Responses]] but some * methods take additional parameters carrying documentation. */ trait Responses { /** Infor...
Krever/endpoints
openapi/openapi/src/main/scala/endpoints/documented/algebra/Responses.scala
Scala
mit
564
/* * 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 ...
ueshin/apache-spark
mllib-local/src/test/scala/org/apache/spark/ml/linalg/BLASSuite.scala
Scala
apache-2.0
15,394
/* * 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/main/scala/org/apache/flink/table/descriptors/FunctionDescriptorValidator.scala
Scala
apache-2.0
1,827
// Partest does proper mixed compilation: // 1. scalac *.scala *.java // 2. javac *.java // 3. scalc *.scala // // In the second scalc round, the classfile for A_1 is on the classpath. // Therefore the inliner has access to the bytecode of `bar`, which means // it can verify that the invocation to `bar` can be sa...
felixmulder/scala
test/files/run/bcodeInlinerMixed/B_1.scala
Scala
bsd-3-clause
601
package scala.meta.tests package parsers import scala.meta._, Term.{Name => TermName, _}, Type.{Name => TypeName}, Name.{Anonymous, Indeterminate} import scala.meta.dialects.Scala211 class TermSuite extends ParseSuite { test("x") { val TermName("x") = term("x") } test("`x`") { val name @ TermName("x") ...
Dveim/scalameta
scalameta/scalameta/src/test/scala/scala/meta/tests/parsers/TermSuite.scala
Scala
bsd-3-clause
17,515
import com.typesafe.sbt.pgp.PgpKeys import sbt.Keys._ import sbtrelease.ReleasePlugin.ReleaseKeys._ import xerial.sbt.Sonatype.SonatypeKeys._ object Release { val settings = xerial.sbt.Sonatype.sonatypeSettings ++ com.typesafe.sbt.SbtPgp.settings ++ sbtrelease.ReleasePlugin.releaseSettings ++ Seq( ...
matterche/play-mockws
project/Release.scala
Scala
mit
1,228
package org.bitcoins.script.reserved import org.scalatest.{FlatSpec, MustMatchers} /** * Created by chris on 1/22/16. */ class ReservedOperationsFactoryTest extends FlatSpec with MustMatchers { "ReservedOperationsFactory" must "instantiate reserved operations" in { ReservedOperation("50") must be (Some(OP_RE...
Christewart/scalacoin
src/test/scala/org/bitcoins/script/reserved/ReservedOperationsFactoryTest.scala
Scala
mit
614
package com.lightning.walletapp.lnutils import android.graphics.drawable.BitmapDrawable import com.lightning.walletapp.Utils.app import language.implicitConversions import scodec.bits.ByteVector import android.view.Gravity import android.text.Html object ImplicitConversions { implicit class StringOps(source: Strin...
btcontract/lnwallet
app/src/main/java/com/lightning/walletapp/lnutils/ImplicitConversions.scala
Scala
apache-2.0
3,437