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
/** * FILE: Registration.scala * PERCORSO /Codice/sgad/servertier/src/main/scala/sgad/servertier/businesslogic/operations * DATA CREAZIONE: 23 Febbraio 2014 * AUTORE: ProTech * EMAIL: [email protected] * * Questo file è proprietà del gruppo ProTech, viene rilasciato sotto licenza Apache v2. * * DIARIO DE...
protechunipd/SGAD
Codice/sgad/servertier/src/main/scala/sgad/servertier/businesslogic/operations/Registration.scala
Scala
apache-2.0
6,179
/* * Copyright (C) 2016 University of Basel, Graphics and Vision Research Group * * 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) an...
unibas-gravis/scalismo-ui
src/main/scala/scalismo/ui/event/package.scala
Scala
gpl-3.0
844
/* * Licensed to Intel Corporation under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * Intel Corporation licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use t...
dding3/BigDL
spark-version/2.0/src/main/scala/org/apache/spark/storage/BlockManagerWrapper.scala
Scala
apache-2.0
2,052
/* * Copyright 2012-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
planet42/Laika
core/shared/src/test/scala/laika/parse/code/common/CommonSyntaxParserSpec.scala
Scala
apache-2.0
13,102
package bulu.actor.build import akka.actor.Actor import bulu.util._ import akka.actor.ActorLogging import org.apache.hadoop.hbase.util.Bytes import java.sql.DriverManager import java.sql.ResultSet import akka.actor.actorRef2Scala import akka.actor.ActorRef import bulu.core.Field import bulu.core.BitKey ...
hwzhao/bulu
src/main/scala/bulu/actor/build/DimensionSinker.scala
Scala
apache-2.0
3,565
/* Copyright 2009-2016 EPFL, Lausanne */ package leon package synthesis import solvers._ import purescala.Definitions.{Program, FunDef} import evaluators._ /** * This is global information per entire search, contains necessary information */ class SynthesisContext( context: LeonContext, val settings: Synthesis...
regb/leon
src/main/scala/leon/synthesis/SynthesisContext.scala
Scala
gpl-3.0
698
import scala.reflect.runtime.universe._ import scala.reflect.ClassTag class Foo{ case class R( sales : Int, name : String ) def foo = { val expectedType = implicitly[TypeTag[R]] val classTag = implicitly[ClassTag[R]] val cl = classTag.runtimeClass.getClassLoader val cm = runtimeMirror(cl) val c...
felixmulder/scala
test/files/run/reflection-constructormirror-inner-good.scala
Scala
bsd-3-clause
664
package models import org.specs2.mutable._ import org.specs2.mutable.Specification import org.specs2.runner._ import scala.io.Source import play.api.libs.json.Json class JiraModelsSpec extends Specification { "JSON Result" should { "parse jira issue correctly" in { val s = Source.fromFile("test/resources...
toggm/play-scala-jira-api
test/models/JiraModelsSpec.scala
Scala
gpl-2.0
2,789
package com.skn.test.view import java.time.LocalDateTime import java.util.concurrent._ import com.skn.api.view.exception.ParsingException import com.skn.api.view.model.ViewLink import com.skn.common.view._ import play.api.libs.json.Json import com.skn.api.view.jsonapi.JsonApiPlayFormat.dataFormat import com.skn.api.v...
AlexeyIvanov8/json-api-mapper
src/test/scala/com/skn/test/view/ViewModelTest.scala
Scala
gpl-3.0
4,729
package org.knora.webapi.util import akka.actor.ActorSystem import akka.event.LoggingAdapter import akka.http.scaladsl.model.{HttpResponse, StatusCodes} import akka.http.scaladsl.unmarshalling.Unmarshal import akka.stream.ActorMaterializer import akka.util.Timeout import spray.json._ import scala.concurrent.duration....
nie-ine/Knora
webapi/src/test/scala/org/knora/webapi/util/AkkaHttpUtils.scala
Scala
agpl-3.0
1,377
package io.buoyant.linkerd import com.fasterxml.jackson.annotation.{JsonIgnore, JsonProperty} import com.twitter.conversions.DurationOps._ import com.twitter.finagle.{param, Stack} import com.twitter.finagle.buoyant.TotalTimeout import com.twitter.finagle.service._ import com.twitter.finagle.buoyant.ParamsMaybeWith im...
linkerd/linkerd
linkerd/core/src/main/scala/io/buoyant/linkerd/SvcConfig.scala
Scala
apache-2.0
2,812
package org.joda.time.base import org.joda.time.DateTime import org.joda.time.DateTimeUtils import org.joda.time.Duration import org.joda.time.Interval import org.joda.time.MutableInterval import org.joda.time.Period import org.joda.time.PeriodType import org.joda.time.ReadableInstant import org.joda.time.ReadableInte...
mdedetrich/soda-time
shared/src/main/scala/org/joda/time/base/AbstractInterval.scala
Scala
bsd-2-clause
4,859
object Sample302 extends App { def repeatLoop(com: => Unit)(con: => Boolean) { com if (con) repeatLoop(com)(con) } var x = 0 repeatLoop { x += 1 println(x) }(x < 10) }
laco/presentations
20170421-StartupSafary-Scala/src/main/scala/Sample302.scala
Scala
mit
197
package se.gigurra.leavu3.datamodel import com.github.gigurra.heisenberg.MapData._ import com.github.gigurra.heisenberg.{Parsed, Schema} import scala.language.implicitConversions case class NavRequirements(source: SourceData = Map.empty) extends SafeParsed[NavRequirements.type] { val altitude = parse(schema.a...
GiGurra/leavu3
src/main/scala/se/gigurra/leavu3/datamodel/NavRequirements.scala
Scala
mit
898
package helpers import javax.inject.Inject import org.joda.time.{LocalDate, LocalDateTime} import play.api.Environment import services.TimeService import uk.gov.hmrc.play.bootstrap.config.ServicesConfig class FakeTimeService @Inject()(env: Environment, servicesConfig: ServicesConfig) extends TimeService(env, service...
hmrc/vat-registration-frontend
it/helpers/FakeTimeService.scala
Scala
apache-2.0
499
package org.jetbrains.plugins.scala.lang.psi.impl.base.types import com.intellij.lang.ASTNode import com.intellij.psi.scope.PsiScopeProcessor import com.intellij.psi.{PsiElement, ResolveState} import org.jetbrains.plugins.scala.lang.psi.ScalaPsiElementImpl import org.jetbrains.plugins.scala.lang.psi.api.base.types._ ...
gtache/intellij-lsp
intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/psi/impl/base/types/ScRefinementImpl.scala
Scala
apache-2.0
1,035
package es.uvigo.ei.sing.sds package controller import scala.concurrent.Future import play.api.Play import play.api.i18n.Messages.Implicits._ import play.api.libs.json.{ Json, JsValue } import play.api.libs.concurrent.Execution.Implicits.defaultContext import play.api.mvc._ import entity._ import database._ import u...
agjacome/smart-drug-search
src/main/scala/controller/ArticlesController.scala
Scala
mit
2,344
package mypipe.kafka.consumer import scala.concurrent.duration._ import scala.concurrent.{Await, Future} class GenericConsoleConsumer(topic: String, zkConnect: String, groupId: String) { val timeout = 10.seconds var future: Option[Future[Unit]] = None val kafkaConsumer = new KafkaGenericMutationAvroConsumer( ...
mardambey/mypipe
mypipe-kafka/src/main/scala/mypipe/kafka/consumer/GenericConsoleConsumer.scala
Scala
apache-2.0
826
// Copyright 2014 Commonwealth Bank of Australia // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ap...
toddmowen/maestro
maestro-core/src/main/scala/au/com/cba/omnia/maestro/core/scalding/Errors.scala
Scala
apache-2.0
2,783
package com.lynbrookrobotics.potassium.commons.drivetrain.offloaded import com.lynbrookrobotics.potassium.Signal import com.lynbrookrobotics.potassium.commons.drivetrain.twoSided.{TwoSided, TwoSidedDrive} import com.lynbrookrobotics.potassium.control.offload.EscConfig._ import com.lynbrookrobotics.potassium.control.of...
Team846/potassium
commons/src/main/scala/com/lynbrookrobotics/potassium/commons/drivetrain/offloaded/OffloadedDrive.scala
Scala
mit
2,077
/* * 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 ...
dbtsai/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala
Scala
apache-2.0
29,392
// Copyright (C) 2019 MapRoulette contributors (see CONTRIBUTORS.md). // Licensed under the Apache License, Version 2.0 (see LICENSE). package org.maproulette.provider.websockets import org.joda.time.DateTime import play.api.libs.json._ import play.api.libs.json.JodaWrites._ import play.api.libs.json.JodaReads._ impor...
Crashfreak/maproulette2
app/org/maproulette/provider/websockets/WebSocketMessages.scala
Scala
apache-2.0
5,969
package dpla.ingestion3.harvesters.pss import java.net.URL import dpla.ingestion3.utils.HttpUtils import org.apache.commons.io.IOUtils import org.apache.spark.rdd.RDD import org.apache.spark.sql.SQLContext import scala.util.{Failure, Success} /* * This class handles requests to the PSS feed. * It partitions data ...
dpla/ingestion3
src/main/scala/dpla/ingestion3/harvesters/pss/PssResponseBuilder.scala
Scala
mit
2,065
package com.github.vladminzatu.surfer import org.scalatest.{BeforeAndAfter, Matchers, FunSuite} /** * Base class for all test */ abstract class TestBase extends FunSuite with Matchers with BeforeAndAfter
VladMinzatu/surfer
src/test/scala/com/github/vladminzatu/surfer/TestBase.scala
Scala
mit
208
/* * Copyright 2017 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...
VlachJosef/bforms-frontend
app/uk/gov/hmrc/bforms/GuiceModule.scala
Scala
apache-2.0
1,098
/* * 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 ...
nehabhardwaj01/incubator-carbondata
integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonHiveMetadataUtil.scala
Scala
apache-2.0
2,003
package models.daos import org.scalatest._ import play.api.libs.concurrent.Execution.Implicits.defaultContext import org.scalatest.concurrent._ import models.daos._ import models._ import slick.driver.PostgresDriver.api._ import scala.concurrent._ import scala.concurrent.duration._ import java.util.UUID import java.u...
leannenorthrop/play-mantra-accumulations
test/models/daos/AccumulationDAOSpec.scala
Scala
apache-2.0
5,575
/** * 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...
lakshmi-kannan/kafka-sashafied
core/src/main/scala/kafka/producer/Producer.scala
Scala
apache-2.0
5,043
/** * Original work: SecureSocial (https://github.com/jaliss/securesocial) * Copyright 2013 Jorge Aliss (jaliss at gmail dot com) - twitter: @jaliss * * Derivative work: Silhouette (https://github.com/mohiva/play-silhouette) * Modifications Copyright 2015 Mohiva Organisation (license at mohiva dot com) * * Licen...
rfranco/play-silhouette
silhouette/app/com/mohiva/play/silhouette/impl/providers/oauth2/VKProvider.scala
Scala
apache-2.0
6,032
package org.jetbrains.plugins.scala.lang.psi.api.expr import com.intellij.openapi.application.ApplicationManager import org.jetbrains.plugins.scala.lang.psi.api.base.types.ScTypeElement import org.jetbrains.plugins.scala.lang.psi.api.expr.ExpectedTypes.ParameterType import org.jetbrains.plugins.scala.lang.psi.types.Sc...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/api/expr/ExpectedTypes.scala
Scala
apache-2.0
953
/* sbt -- Simple Build Tool * Copyright 2008, 2009, 2010 Mark Harrah */ package sbt package classpath import java.lang.ref.{ Reference, SoftReference, WeakReference } import java.io.File import java.net.{ URI, URL, URLClassLoader } import java.util.Collections import scala.collection.{ mutable, JavaConversions, Set ...
jaceklaskowski/sbt
util/classpath/src/main/scala/sbt/classpath/ClasspathUtilities.scala
Scala
bsd-3-clause
5,021
package org.jetbrains.plugins.scala.lang.refactoring.introduceVariable import java.util import com.intellij.internal.statistic.UsageTrigger import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.command.CommandProcessor import com.intellij.openapi.editor.Editor import com.intellij.open...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/lang/refactoring/introduceVariable/IntroduceExpressions.scala
Scala
apache-2.0
19,761
package a17 trait 嫁衣神功 { type Tail <: 嫁衣神功 type Head } class 第八重 extends 嫁衣神功 { override type Tail = 开始 override type Head = 我 class 开始 extends 嫁衣神功 { override type Tail = 继续 override type Head = 叼 class 继续 extends 嫁衣神功 { override type Tail = 余根 override type Head = 你 class 余根 ...
djx314/ubw
a17-432/src/main/scala/第八重.scala
Scala
bsd-3-clause
1,180
/* * 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 ...
hortonworks-spark/skc
external/kafka-0-10/src/main/scala/org/apache/spark/streaming/kafka010/KafkaRDD.scala
Scala
apache-2.0
9,161
/* * 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 ...
rednaxelafx/apache-spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
Scala
apache-2.0
80,217
package beam.integration import akka.actor._ import akka.testkit.TestKitBase import beam.agentsim.agents.PersonTestUtil import beam.agentsim.agents.ridehail.{RideHailIterationHistory, RideHailSurgePricingManager} import beam.agentsim.events.PathTraversalEvent import beam.router.Modes.BeamMode import beam.router.{BeamS...
colinsheppard/beam
src/test/scala/beam/integration/SingleModeSpec.scala
Scala
gpl-3.0
11,142
/* * Copyright 2014–2020 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...
slamdata/quasar
foundation/src/main/scala/quasar/contrib/scalaz/bind.scala
Scala
apache-2.0
903
package foil import java.util.ArrayList import java.io._ @SerialVersionUID(100L) class Term(var name:String) extends Serializable{ override def toString() : String = { name } def canEqual(that: Any) = that.isInstanceOf[Term] def apply_bindings(bindings: Map[String, List[List[String]]]) : Term = { ...
shurkhovetskyy/foil
src/main/scala/foil/Terms.scala
Scala
gpl-3.0
2,992
package java.util.regex import scala.annotation.switch import scala.scalajs.js final class Pattern private (jsRegExp: js.RegExp, _pattern: String, _flags: Int) extends Serializable { import Pattern._ def pattern(): String = _pattern def flags(): Int = _flags override def toString(): String = pattern ...
jmnarloch/scala-js
javalib/src/main/scala/java/util/regex/Pattern.scala
Scala
bsd-3-clause
4,914
/* * This file is part of Apparat. * * Copyright (C) 2010 Joa Ebert * http://www.joa-ebert.com/ * * This library 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 Lice...
joa/apparat
apparat-core/src/main/scala/apparat/tools/asmifier/ASMifierConfigurationFactory.scala
Scala
lgpl-2.1
1,696
package com.seanshubin.todo.sample.server object ConsoleApplication extends App with LauncherWiring { lazy val commandLineArguments = args.toSeq launcher.launch() }
SeanShubin/javascript-todo-samples
server/src/main/scala/com/seanshubin/todo/sample/server/ConsoleApplication.scala
Scala
unlicense
170
package net.warpgame.engine.core.context.loader import java.lang.invoke.MethodHandle import org.scalamock.scalatest.MockFactory import org.scalatest.matchers.{MatchResult, Matcher} import org.scalatest.{Matchers, WordSpecLike} import net.warpgame.engine.core.context.loader.ServiceGraphBuilderSpec.{GraphMatchers, Serv...
WarpOrganization/warp
core/src/test/scala/net/warpgame/engine/core/context/loader/ServiceGraphBuilderSpec.scala
Scala
lgpl-3.0
5,008
package io.argos.agent.sentinels import java.util import javax.management.Notification import io.argos.agent.{Constants, SentinelConfiguration} import io.argos.agent.bean.{CheckMetrics, JmxNotification} import io.argos.agent.util.{CassandraVersion, CommonLoggerFactory, HostnameProvider} import CommonLoggerFactory._ i...
leleueri/argos
argos-agent/src/main/scala/io/argos/agent/sentinels/InternalNotificationsSentinel.scala
Scala
apache-2.0
7,474
package org.typedsolutions.aws.kinesis.model case class CreateStreamRequest(streamName: String, shardCount: Int) extends Command
mattroberts297/akka-kinesis
src/main/scala/org/typedsolutions/aws/kinesis/model/CreateStreamRequest.scala
Scala
mit
130
package net.itadinanta.rnkr.core.arbiter import akka.actor.{ ActorRef, Actor, FSM } import scala.concurrent.Future import akka.actor.ActorSystem import akka.actor.Props import akka.util.Timeout import scala.annotation.tailrec import scala.concurrent.duration._ import scala.concurrent.duration.FiniteDuration._ import a...
itadinanta/rnkr
rnkr-support/src/main/scala/net/itadinanta/rnkr/core/arbiter/Arbiter.scala
Scala
gpl-2.0
3,083
package io.getquill import io.getquill.Spec import io.getquill.ast._ import io.getquill.EntityQuery import io.getquill.testContext.InfixInterpolator import io.getquill.Query import io.getquill.quat._ import io.getquill.testContext._ import io.getquill.testContext.qr1 import io.getquill.testContext.query import io.getq...
getquill/quill
quill-core/src/test/scala/io/getquill/OpsSpec.scala
Scala
apache-2.0
2,827
package io.apibuilder.validation import io.apibuilder.spec.v0.models.Method import io.apibuilder.validation.helpers.Helpers import org.scalatest.matchers.should.Matchers import org.scalatest.funspec.AnyFunSpec class ApiBuilderServiceSpec extends AnyFunSpec with Matchers with Helpers { private[this] lazy val servic...
flowcommerce/lib-apidoc-json-validation
src/test/scala/io/apibuilder/validation/ApiBuilderServiceSpec.scala
Scala
mit
1,363
/* * 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/main/scala/com/intel/analytics/bigdl/nn/MM.scala
Scala
apache-2.0
5,469
import language.`3.0` import language.`3.0` // error class C: import language.`3.0-migration` // error
som-snytt/dotty
tests/neg/source-import.scala
Scala
apache-2.0
107
import org.scalatest.{Matchers, FlatSpec} import com.ntk.euler.utils._ /** * Created by kypreos on 7/5/15. */ class stampySpec extends FlatSpec with Matchers { "stampy" should "just freakin be" in { val st = new stampy st.gwar() should equal(s"stampy") } }
doomsuckle/ntk
src/test/scala/com/ntk/euler/stampySpec.scala
Scala
mit
273
package com.example import org.apache.spark._ import org.apache.spark.SparkContext._ object Hello { def main(args: Array[String]): Unit = { val conf = new SparkConf().setMaster("local").setAppName("cc-nsm") val sc = new SparkContext(conf) val file = sc.textFile("/usr/local/bro/logs/current/conn.log") ...
classcat/cc-nsm2-core
src/main/scala/com/example/Hello.scala
Scala
gpl-3.0
397
package org.jetbrains.plugins.scala package lang package structureView package itemsPresentations package impl import psi.api.ScalaFile /** * @author Alexander Podkhalyuzin * Date: 04.05.2008 */ class ScalaFileItemPresentation(private val element: ScalaFile) extends ScalaItemPresentation(element) { def getPresenta...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/structureView/itemsPresentations/impl/ScalaFileItemPresentation.scala
Scala
apache-2.0
432
import org.sbuild._ import org.sbuild.ant._ import org.sbuild.ant.tasks._ @version("0.7.9010") @include("FeatureBuilder.scala") @classpath("mvn:org.apache.ant:ant:1.8.4", "http://sbuild.org/uploads/sbuild/0.7.9010.0-8-0-M1/org.sbuild.ant-0.7.9010.0-8-0-M1.jar") class SBuild(implicit _project: Project) { val names...
SBuild-org/sbuild-eclipse-plugin
update-site/SBuild.scala
Scala
apache-2.0
10,310
package org.atnos.site package lib import java.util.concurrent.Executors import org.atnos.eff.syntax.all._ import scala.concurrent.ExecutionContext import scala.concurrent.duration._ object TaskEffectPage extends UserGuidePage { def is = "Task".title ^ s2""" The `Task` effect is a thin shim on top of Monix's `Task...
atnos-org/eff-cats
src/test/scala/org/atnos/site/lib/TaskEffectPage.scala
Scala
mit
1,426
/* * 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/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
Scala
apache-2.0
150,203
package com.example.qa.vastservice.orm import slick.collection.heterogeneous._ import slick.collection.heterogeneous.syntax._ import slick.lifted.Tag import slick.jdbc.MySQLProfile.api._ trait UsersRecord { this: ConfigurationTables.type => object Users { type UHList = Int::Int::Int::String::String::Strin...
vanclist/xml-webservice-scalatest
src/main/scala/com/example/qa/vastservice/orm/UsersRecord.scala
Scala
mit
771
/* * Copyright 2011-2017 Chris de Vreeze * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
dvreeze/yaidom
jvm/src/test/scala/eu/cdevreeze/yaidom/xpath/saxon/XPathTest.scala
Scala
apache-2.0
16,861
package sorm.mappings import embrace._ import sorm.driver.DriverConnection import sorm.reflection._ class TupleMapping ( val reflection : Reflection, val membership : Option[Membership], val settings : Map[Reflection, EntitySettings] ) extends CompositeMapping { @inline def mappings = items.toStrea...
cllu/sorm2
src/main/scala/sorm/mappings/TupleMapping.scala
Scala
mit
1,217
/* * Copyright (c) <2015-2016>, see CONTRIBUTORS * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list...
amanjpro/languages-a-la-carte
dcct/src/main/scala/phases/TyperFamily.scala
Scala
bsd-3-clause
2,438
package org.mms.patterns import PatternDescriptions._; object BOXAapi extends API("Box")( simpleCollection("/folders","{folderId}")( item("{id}")( readOnlyCollection("/items", GET), readOnlyCollection("/collaborations", GET), action("/copy", POST), action("/trash", GET), ...
petrochenko-pavel-a/mms.core
org.mms.core/src/main/scala/org/mms/patterns/BOX.scala
Scala
epl-1.0
510
import runtime.ScalaRunTime._ trait SuperS[@specialized(AnyRef) T] { def arr: Array[T] def foo() = arr(0) def bar(b: Array[T]) = b(0) = arr(0) } class BaseS[@specialized(AnyRef) T](val arr: Array[T]) extends SuperS[T] { } trait SuperG[T] { def arr: Array[T] def foo() = arr(0) def bar(b: Array[T]) = b(0) ...
martijnhoekstra/scala
test/files/specialized/arrays-traits.scala
Scala
apache-2.0
904
/* * Copyright 2017 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...
chrisjameswright/accessibility-testing-library
src/test/scala/uk/gov/hmrc/accessibility/AccessibilityReportSpec.scala
Scala
apache-2.0
3,562
package org.gtri.util.scala.xsdbuilder import org.gtri.util.scala.statemachine._ import org.gtri.util.xsddatatypes.XsdCodes.AllOrNoneCode import scala.collection.immutable.Seq case class XsdAllOrNone[A](value : Either[AllOrNoneCode, Set[A]]) { override def toString = { value fold( fa = { allOrNoneCode => ...
gtri-iead/org.gtri.util.scala
xsdbuilder/src/main/scala/org/gtri/util/scala/xsdbuilder/XsdAllOrNone.scala
Scala
gpl-3.0
1,027
package x7c1.wheat.modern.kinds import x7c1.wheat.modern.callback.either.EitherTask import scala.language.reflectiveCalls trait Fate[X, +L, +R] { def map[R2](f: R => R2): Fate[X, L, R2] def flatMap[L2 >: L, R2](f: R => Fate[X, L2, R2]): Fate[X, L2, R2] def run[L2 >: L, R2 >: R](x: X): FateRunner[L2, R2] d...
x7c1/Linen
wheat-modern/src/main/scala/x7c1/wheat/modern/kinds/Fate.scala
Scala
mit
2,812
/* * Copyright 2014 IBM Corp. * * 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...
yeghishe/spark-kernel
client/src/main/scala/com/ibm/spark/kernel/protocol/v5/client/boot/ClientBootstrap.scala
Scala
apache-2.0
2,518
package com.anchortab.model import scala.collection.immutable.HashMap import net.liftweb._ import mongodb._ import json.ext._ import org.joda.time.DateTime import org.bson.types.ObjectId case class PlanTerm(description:String, abbreveation:String, stripeCode:String) /** * Model for a Plan that users can subs...
farmdawgnation/anchortab
src/main/scala/com/anchortab/model/Plan.scala
Scala
apache-2.0
2,799
package is.solidninja package openshift package client import fs2.Task import fs2.async.immutable.Signal import io.circe._ import gnieh.diffson.circe._ import org.http4s.{Credentials, Uri} import org.http4s.client.Client import is.solidninja.openshift.api.v1._ import is.solidninja.openshift.client.impl.HttpOpenshi...
vladimir-lu/openshift-scala-api
src/main/scala/is/solidninja/openshift/client/OpenshiftClient.scala
Scala
mit
1,781
/* * 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 ...
jeremiaswerner/openwhisk
common/scala/src/main/scala/org/apache/openwhisk/common/ConfigMapValue.scala
Scala
apache-2.0
1,686
package com.lukedeighton.play import com.lukedeighton.play.validation.Forms._ import org.scalatest.FlatSpec class BaseSpec extends FlatSpec { lazy val test1Form = form[Test1] lazy val test2Form = form[Test2] lazy val test3Form = form[Test3] lazy val test4Form = form[Test4] lazy val test5Form = form[Test5] ...
LukeDeighton/play-validation
src/test/scala/com/lukedeighton/play/BaseSpec.scala
Scala
apache-2.0
1,242
package collins.permissions case class Users(val assets: Map[String, Set[String]]) { def this() = this(Map.empty) lazy val aliases: Map[String, Set[String]] = invertedMap // Turn values into keys, new values are sets of old keys // Turns a map of Group -> Users into User -> Groups def invertedMap: Map[String...
byxorna/collins
app/collins/permissions/Users.scala
Scala
apache-2.0
550
package de.uni_potsdam.hpi.coheel.ml import java.util import de.uni_potsdam.hpi.coheel.programs.DataClasses.{ClassificationInfo, FeatureLine} import weka.classifiers.Classifier import weka.core.Attribute import weka.core.Instances import weka.core.Instance import weka.core.DenseInstance object CoheelClassifier { v...
stratosphere/coheel
src/main/scala/de/uni_potsdam/hpi/coheel/ml/CoheelClassifier.scala
Scala
apache-2.0
3,744
/** * © 2019 Refinitiv. 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 applicable l...
e-orz/CM-Well
server/cmwell-ws/app/trafficshaping/CongestionAnalyzer.scala
Scala
apache-2.0
2,617
/* * Copyright 2016-2018 Michal Harish, [email protected] * * 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 u...
amient/affinity
avro/src/test/scala/io/amient/affinity/avro/AvroJsonConverterSpec.scala
Scala
apache-2.0
5,441
// negatives package foo1 { object Foo { // companion is trait def main(args: Array[String]): Unit = () } trait Foo } package foo2 { object Foo { // companion has its own main def main(args: Array[String]): Unit = () } class Foo { def main(args: Array[String]): Unit = () } } // these shoul...
yusuke2255/dotty
tests/untried/neg/main1.scala
Scala
bsd-3-clause
945
package org.openurp.edu.eams.teach.lesson.task.service.genstrategy.impl import java.sql.Date import java.text.MessageFormat import org.beangle.commons.collection.Collections import org.beangle.commons.lang.Strings import org.openurp.base.Semester import org.openurp.edu.base.Adminclass import org.openurp.edu.base.Cours...
openurp/edu-eams-webapp
schedule/src/main/scala/org/openurp/edu/eams/teach/lesson/task/service/genstrategy/impl/ClassicLessonGenStrategy.scala
Scala
gpl-3.0
12,177
package io.getquill.context.jasync.postgres import scala.concurrent.ExecutionContext.Implicits.{ global => ec } import io.getquill.context.sql.DepartmentsSpec class DepartmentsPostgresAsyncSpec extends DepartmentsSpec { val context = testContext import testContext._ override def beforeAll = await { ...
getquill/quill
quill-jasync-postgres/src/test/scala/io/getquill/context/jasync/postgres/DepartmentsPostgresAsyncSpec.scala
Scala
apache-2.0
1,230
package com.sksamuel.avro4s.record.decoder import com.sksamuel.avro4s.{AvroSchema, AvroTransient, Decoder, DefaultNamingStrategy} import org.apache.avro.generic.GenericData import org.apache.avro.util.Utf8 import org.scalatest.{FunSuite, Matchers} class TransientDecoderTest extends FunSuite with Matchers { case cl...
51zero/avro4s
avro4s-core/src/test/scala/com/sksamuel/avro4s/record/decoder/TransientDecoderTest.scala
Scala
mit
690
package com.databricks.spark.sql.perf.mllib.clustering import org.apache.spark.ml import org.apache.spark.ml.Estimator import org.apache.spark.sql._ import com.databricks.spark.sql.perf.mllib.OptionImplicits._ import com.databricks.spark.sql.perf.mllib.data.DataGenerator import com.databricks.spark.sql.perf.mllib.{Be...
josiahsams/spark-sql-perf-spark2.0.0
src/main/scala/com/databricks/spark/sql/perf/mllib/clustering/KMeans.scala
Scala
apache-2.0
905
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller, Robert Davis * @version 1.3 * @date Sun Sep 16 14:09:25 EDT 2012 * @see LICENSE (MIT style license file). * * This file contains classes for Hessenburg reductions, finding Eigenvalues * and comp...
NBKlepp/fda
scalation_1.3/scalation_mathstat/src/main/scala/scalation/linalgebra/Eigen.scala
Scala
mit
15,006
/* * 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 ...
maropu/spark
sql/core/src/test/scala/org/apache/spark/sql/ExtraStrategiesSuite.scala
Scala
apache-2.0
2,320
import sbt._ import Keys._ object JniKeys { val javahName = settingKey[String]( "The name of the javah command for generating JNI headers") val javahPath = settingKey[String]( "The path to the javah executable") val jniClasses = settingKey[Seq[String]]( "Fully qualified names of classes with native m...
edinburgh-rbm/expokit
project/Jni.scala
Scala
gpl-3.0
1,917
package org.retistruen.jmx import java.util.Hashtable import javax.management.ObjectName.{ getInstance ⇒ ObjectName } import javax.management.{ Attribute, AttributeList, DynamicMBean, MBeanAttributeInfo, MBeanInfo, StandardMBean } import org.retistruen.building.BuildingInfrastructure import org.retistruen.{ Named, Pol...
plalloni/retistruen
src/main/scala/org/retistruen/jmx/JMX.scala
Scala
mit
2,649
package chandu0101.scalajs.react.components.materialui import chandu0101.macros.tojs.JSMacro import japgolly.scalajs.react._ import materialui.Mui import scala.scalajs.js case class MuiAvatar(backgroundColor: js.UndefOr[String] = js.undefined, style: js.UndefOr[js.Any] = js.undefined, icon: ...
mproch/scalajs-react-components
core/src/main/scala/chandu0101/scalajs/react/components/materialui/MuiAvatar.scala
Scala
apache-2.0
752
package org.dsa.core.prepare import java.io.{File, PrintWriter} import org.apache.spark.{SparkConf, SparkContext} import scala.io.Source /** * Created by xubo on 2016/11/29. * find sequnce from ref database */ object FindLocal { var intervalVale = 0 def main(args: Array[String]) { var time = 0 i...
xubo245/CloudSW
src/main/scala/org/dsa/core/prepare/FindLocal.scala
Scala
gpl-2.0
2,941
/* * Copyright 2011-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
vert-x/mod-lang-scala
src/main/scala/org/vertx/scala/core/http/package.scala
Scala
apache-2.0
3,286
package com.softwaremill.codebrag.usecases.user import org.scalatest.matchers.ShouldMatchers import org.scalatest.mock.MockitoSugar import org.scalatest.{BeforeAndAfter, FlatSpec} import com.softwaremill.codebrag.service.user.RegisterService import com.softwaremill.codebrag.dao.user.UserDAO import org.mockito.Mockito....
softwaremill/codebrag
codebrag-service/src/test/scala/com/softwaremill/codebrag/usecases/user/RegisterNewUserUseCaseSpec.scala
Scala
agpl-3.0
2,327
package com.wavesplatform.state.diffs.ci.sync import com.wavesplatform.account.Address import com.wavesplatform.db.WithDomain import com.wavesplatform.db.WithState.AddrWithBalance import com.wavesplatform.features.BlockchainFeatures._ import com.wavesplatform.lang.directives.values.V5 import com.wavesplatform.lang.scr...
wavesplatform/Waves
node/src/test/scala/com/wavesplatform/state/diffs/ci/sync/SyncDAppNegativeTransferTest.scala
Scala
mit
3,090
package scruffy.examples import com.sksamuel.scruffy.{ScruffyConfiguration, Scruffy} /** @author Stephen Samuel */ object Main extends App { val port = 8080 val scruffy = new Scruffy(ScruffyConfiguration.port(port).compression(false).requestLogging(false)) scruffy.mount(new Test1Endpoint) scruffy.mount(new T...
kellabyte/FrameworkBenchmarks
frameworks/Scala/scruffy/src/main/scala/scruffy/examples/Main.scala
Scala
bsd-3-clause
516
/* * 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
mllib/src/test/scala/org/apache/spark/ml/classification/DecisionTreeClassifierSuite.scala
Scala
apache-2.0
16,964
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distribute...
wvlet/airframe
airframe-surface/.jvm/src/main/scala-2/wvlet/airframe/surface/package.scala
Scala
apache-2.0
873
package deaktator.pops.msgs import java.io.{IOException, InputStream} import com.google.protobuf.Descriptors.Descriptor import com.google.protobuf.{ByteString, CodedInputStream, ExtensionRegistryLite, GeneratedMessage, InvalidProtocolBufferException} /** * A Runtime-based version of [[ProtoOps]]. This really shou...
deaktator/pops
pops-2.4.1/src/main/scala/deaktator/pops/msgs/RuntimeProtoOps.scala
Scala
mit
3,347
object Test { def foo(): Unit = { try { for (i <- 1 until 5) return } catch { case _: NullPointerException | _: RuntimeException => // was: "catch block may intercept non-local return from method check" } } }
yusuke2255/dotty
tests/untried/pos/t7433.scala
Scala
bsd-3-clause
245
import akka.actor.ActorRef /** * Created by ashu on 3/26/2017. */ object Events { trait ChatEvent case class User(name: String) extends ChatEvent case class UserWithActor(name: String, actor: ActorRef) extends ChatEvent case class UserJoined(user: UserWithActor) extends ChatEvent case class UserLeft...
ashsingh21/ChatServer
src/main/scala/Events.scala
Scala
mit
485
// This file contains an interpreter for SCFWAE with recursive first-class functions, conditionals, mutable boxes, variables and sequencing. /* * Based on the lecture notes for the "Programming Languages and Types" * course by Klaus Ostermann at the University of Marburg. */ package V5 /* To be able to experiment ...
Tooa/interpreters
src/V5/SRCFWAEInterp.scala
Scala
apache-2.0
9,411
/* * Copyright (c) 2014 Contributor. All rights reserved. */ package annotations.varCaseConstructor @scala.annotation.meta.field case class foo() extends scala.annotation.StaticAnnotation case class Entity(@foo var bar: Int) object Annotations { val entity = new Entity(1) println(entity.bar) }
Kwestor/scala-ide
org.scala-ide.sdt.core.tests/test-workspace/custom-highlighting/src/custom/AnnotationsVarCaseConstructor.scala
Scala
bsd-3-clause
304
import reactivemongo.api.commands.{ CommandError, DefaultWriteResult } class WriteResultSpec extends org.specs2.mutable.Specification { "Write result" title section("unit") "WriteResult" should { val error = DefaultWriteResult( ok = false, n = 1, writeErrors = Nil, writeConcernError ...
ornicar/ReactiveMongo
driver/src/test/scala/WriteResultSpec.scala
Scala
apache-2.0
864
package map import collection._ import scala.collection.mutable.{Builder, MapBuilder} import scala.collection.generic.CanBuildFrom class PrefixMap[T] extends mutable.Map[String, T] with mutable.MapLike[String, T, PrefixMap[T]] { var suffixes: immutable.Map[Char, PrefixMap[T]] = Map.empty var value: Option[T] = ...
mhotchen/programming-in-scala
src/map/PrefixMap.scala
Scala
apache-2.0
1,900
/* * 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 ...
abhishekshivanna/samza
samza-core/src/main/scala/org/apache/samza/util/CoordinatorStreamUtil.scala
Scala
apache-2.0
9,093
/* * * * Copyright (c) 2014-2016. National Institute of Advanced Industrial Science and Technology (AIST) * * All rights reserved. * */ package jp.go.aist.cspe import jp.go.aist.cspe.CSPE._ object STOP extends Process{ // used for verification override def acceptPrim(e : AbsEvent): ProcessSet = processSet...
yoriyuki/cspe
src/main/scala/jp/go/aist/cspe/STOP.scala
Scala
bsd-3-clause
565
package elevators import org.scalatest._ class ElevatorSpec extends WordSpec with Matchers { implicit val config = ElevatorConfig.defaultConfig "An Elevator" when { "standing at floor 1" should { val elevator = Elevator(Set(), Floor(1).toPosition) "have score 11 to floor 1" in { elevator...
petterarvidsson/elevators
src/test/scala/elevators/ElevatorSpec.scala
Scala
mit
1,939