code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
package usbinstall.os import java.nio.file.Paths import scala.util.matching.Regex import suiryc.scala.io.PathFinder import suiryc.scala.io.NameFilter._ import suiryc.scala.io.PathFinder._ import suiryc.scala.io.RichFile._ import suiryc.scala.sys.Command import suiryc.scala.util.matching.RegexReplacer import suiryc.sca...
suiryc/usbinstall
src/main/scala/usbinstall/os/UbuntuInstall.scala
Scala
gpl-3.0
6,318
package artisanal.pickle.maker import models._ import parser._ import org.specs2._ import mutable._ import specification._ import scala.reflect.internal.pickling.ByteCodecs import scala.tools.scalap.scalax.rules.scalasig._ import com.novus.salat.annotations.util._ import scala.reflect.ScalaSignature class ListBy...
julianpeeters/artisanal-pickle-maker
src/test/scala/singleValueMember/ListSpecs/List[Byte]Spec.scala
Scala
apache-2.0
930
package errors import eveapi.errors.EveApiError sealed trait Err extends Throwable case class ApiError(error: EveApiError) extends Err { override def getMessage = error.getMessage }
reactormonk/fleet-buddy
server/src/main/scala/utils/Errors.scala
Scala
agpl-3.0
187
package system.cell.sensormanagement.sensors import org.scalatest.{FlatSpec, Matchers} import system.ontologies.messages.{DoubleThresholdInfo, SensorInfoFromConfig, SingleThresholdInfo} import system.ontologies.sensor.SensorCategories /** * Created by Matteo Gabellini on 01/08/2017. */ class SensorsFactoryTest ex...
albertogiunta/arianna
src/test/scala/system/cell/sensormanagement/sensors/SensorsFactoryTest.scala
Scala
gpl-3.0
9,681
package com.arcusys.valamis.questionbank.model import org.scalatest.{ FlatSpec, Matchers } class QuestionCategoryTest extends FlatSpec with Matchers { "Question bank question category entity" can "be constructed" in { val category = new QuestionCategory(1, "t", "d", Some(12), Some(0)) category.id should equ...
ViLPy/Valamis
valamis-questionbank/src/test/scala/com/arcusys/valamis/questionbank/model/QuestionCategoryTest.scala
Scala
lgpl-3.0
732
/* * 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 ...
shaneknapp/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/types/StringType.scala
Scala
apache-2.0
1,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"); yo...
eribeiro/kafka
core/src/test/scala/unit/kafka/server/CreateTopicsRequestTest.scala
Scala
apache-2.0
12,561
/** * 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...
julianpeeters/avro
lang/scala/src/test/java/org/apache/avro/scala/TestText.scala
Scala
apache-2.0
1,535
/* * Copyright 2016 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
ahudspith-equalexperts/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600a/v2/A1.scala
Scala
apache-2.0
992
package views.acquire import composition.TestHarness import org.scalatest.selenium.WebBrowser.go import org.scalatest.selenium.WebBrowser.pageSource import pages.acquire.VersionPage import scala.io.Source.fromInputStream import uk.gov.dvla.vehicles.presentation.common.testhelpers.UiSpec class VersionIntegrationSpec e...
dvla/vehicles-acquire-online
test/views/acquire/VersionIntegrationSpec.scala
Scala
mit
731
/* * 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 ...
publicRoman/spark
project/SparkBuild.scala
Scala
apache-2.0
33,420
package cortex.app import java.io.File import scala.language.dynamics /** * Created by jasonflax on 2/14/16. */ class Config(file: Option[File]) extends Dynamic { if (file.isEmpty) { throw new Exception("Config file has not been set.") } /** * Declare partial function type to be added * to our...
jsflax/cortex
src/main/scala/cortex/app/Config.scala
Scala
mit
1,125
package at.forsyte.apalache.tla.bmcmt import at.forsyte.apalache.tla.bmcmt.types.{AnnotationParser, FinSetT, IntT, SeqT} import at.forsyte.apalache.tla.lir.{TlaEx, ValEx} import at.forsyte.apalache.tla.lir.convenience.tla import at.forsyte.apalache.tla.lir.values.{TlaIntSet, TlaNatSet} import org.junit.runner.RunWith ...
konnov/apalache
tla-bmcmt/src/test/scala/at/forsyte/apalache/tla/bmcmt/TestSymbStateDecoder.scala
Scala
apache-2.0
9,105
/* * product-collections is distributed under the 2-Clause BSD license. See the * LICENSE file in the root of the repository. * * Copyright (c) 2013 - 2014 Mark Lister */ import utest._ import com.github.marklister.collections.immutable._ object CollSeqSuite extends TestSuite{ val testData = CollSeq(("Jan", ...
marklister/product-collections
shared/src/test/scala/CollSeqSpec.scala
Scala
bsd-2-clause
3,333
/* * Copyright 2017 Guy Van den Broeck <[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 ...
UCLA-StarAI/ScalaDD
src/main/scala/edu/ucla/cs/starai/util/Conversions.scala
Scala
apache-2.0
945
package controllers import play.api.mvc.Controller import play.api.libs.json.Json import play.api.mvc.Action class Access extends Controller { def index = Action { implicit request => Ok(Json.obj( "links" -> Json.obj( "organisations" -> Json.obj( "description" -> "for returning a list o...
DFID/aid-platform-beta
src/platform/app/controllers/Access.scala
Scala
mit
770
// Copyright 2017 The Bazel Authors. 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 appl...
bazelbuild/BUILD_file_generator
lang/scala/src/main/scala/com/google/devtools/build/bfg/scala/ScalaSourceFileParser.scala
Scala
apache-2.0
722
/* * 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...
kevinwright/scalatest
src/test/scala/org/scalatest/AssertionsSpec.scala
Scala
apache-2.0
854
/* Copyright 2012 Anton Kraievoy [email protected] This file is part of Holonet. Holonet is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later vers...
akraievoy/holonet
src/main/scala/org/akraievoy/holonet/exp/RegistryData.scala
Scala
gpl-3.0
1,376
/* * Copyright (c) 2011-2017 Interfaculty Department of Geoinformatics, University of * Salzburg (Z_GIS) & Institute of Geological and Nuclear Sciences Limited (GNS Science) * in the SMART Aquifer Characterisation (SAC) programme funded by the New Zealand * Ministry of Business, Innovation and Employment (MBIE) * ...
ZGIS/smart-portal-backend
app/models/users/UserDAO.scala
Scala
apache-2.0
8,045
package sprawler.actors import akka.testkit.{ TestProbe, ImplicitSender, TestKit } import akka.actor.{ ActorRef, PoisonPill, ActorSystem, Props } import akka.routing.{ SmallestMailboxRouter, DefaultResizer, Broadcast } import sprawler.DummyTestServer import sprawler.crawler.actor.{ LinkScraper, LinkQueueMaster, LinkS...
daniel-trinh/sprawler
src/test/scala/sprawler/actors/LinkActorsSpec.scala
Scala
mit
7,284
import akka.actor.{Props, ActorSystem} import akka.testkit.{TestKit, ImplicitSender} import com.example.actors.{WorkStatusMessages, WorkCommandMessages, WorkDriver} import org.scalatest.{WordSpecLike, Matchers, BeforeAndAfterAll, FlatSpec} import org.scalatest.matchers.ShouldMatchers import scala.concurrent.duration._ ...
johanprinsloo/akka-message-pattern-explore
src/test/scala/WorkDriverTest.scala
Scala
mit
2,717
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
yiheng/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/SpatialZeroPadding.scala
Scala
apache-2.0
7,153
package debop4s.data.orm.jpa.stateless import java.sql.Connection import javax.persistence.EntityManagerFactory import debop4s.core.Logging import org.aopalliance.intercept.MethodInvocation import org.hibernate.engine.transaction.spi.TransactionContext import org.hibernate.internal.SessionImpl import org.hibernate.jp...
debop/debop4s
debop4s-data-orm/src/main/scala/debop4s/data/orm/jpa/stateless/StatelessSessionFactoryBean.scala
Scala
apache-2.0
4,615
package org.jetbrains.plugins.scala.codeInspection.functionExpressions import com.intellij.codeInspection.LocalInspectionTool import org.jetbrains.plugins.scala.codeInspection.ScalaLightInspectionFixtureTestAdapter class UnnecessaryPartialFunctionInspectionTest extends ScalaLightInspectionFixtureTestAdapter { overr...
whorbowicz/intellij-scala
test/org/jetbrains/plugins/scala/codeInspection/functionExpressions/UnnecessaryPartialFunctionInspectionTest.scala
Scala
apache-2.0
7,308
package com.weez.mercury.common import com.typesafe.config.Config /** * 管理客户端(peer)和会话(session)。 * == Overview == * peer: 客户端,通过peerId(String)识别一个客户端。 * HttpServer使用cookie做peerId,所以一个浏览器窗口是一个客户端。 * AkkaServer使用host:port做peerId,所以一个socket地址是一个客户端。 * session: 会话,用于跟踪一系列连续的业务操作。 * Web浏览器端采用单页面技术,通常一个页面只使用一个会话。 *...
weeztech/weez-mercury
main/src/main/scala/com/weez/mercury/common/SessionManager.scala
Scala
apache-2.0
4,376
package com.twitter.finatra.http.response import com.twitter.finagle.httpx.{Response, Status, Version} object SimpleResponse { def apply(status: Status, body: String = ""): Response = { val response = Response(Version.Http11, status) response.setContentString(body) response } }
deanh/finatra
http/src/main/scala/com/twitter/finatra/http/response/SimpleResponse.scala
Scala
apache-2.0
297
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package play.filters.csp import com.typesafe.config.ConfigFactory import javax.inject.Inject import play.api.inject.guice.GuiceApplicationBuilder import play.api.libs.json.Json import play.api.mvc.AbstractController import play.api.mvc.ControllerCompo...
benmccann/playframework
web/play-filters-helpers/src/test/scala/play/filters/csp/ScalaCSPReportSpec.scala
Scala
apache-2.0
6,327
import edu.uta.diql._ import org.apache.spark._ import org.apache.spark.rdd._ import org.apache.spark.sql._ case class Cclass ( K: Long, A:Double) object Test { def main ( args: Array[String] ) { val conf = new SparkConf() .setAppName("Test") .setMaster("local[2]") val sc = new SparkContext(co...
fegaras/DIQL
tests/sqlgen/spark/GroupBy.scala
Scala
apache-2.0
818
/* * 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 ...
pronix/spark
streaming/src/main/scala/org/apache/spark/streaming/scheduler/rate/RateEstimator.scala
Scala
apache-2.0
2,883
package ru.org.codingteam.horta.plugins.pet.commands import akka.actor.ActorRef import ru.org.codingteam.horta.localization.Localization import ru.org.codingteam.horta.plugins.pet.{PtcUtils, PetData} import ru.org.codingteam.horta.security.Credential class CoinsCommand extends AbstractCommand { override def apply(...
codingteam/horta-hell
src/main/scala/ru/org/codingteam/horta/plugins/pet/commands/CoinsCommand.scala
Scala
mit
586
/* * 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 ...
srowen/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
Scala
apache-2.0
120,834
/* * Copyright (C) 2012 Romain Reuillon * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is di...
openmole/openmole
openmole/plugins/org.openmole.plugin.task.external/src/main/scala/org/openmole/plugin/task/external/package.scala
Scala
agpl-3.0
4,034
package com.github.traviscrawford.spark.dynamodb import java.net.URI import org.apache.hadoop.fs.FileSystem import org.apache.hadoop.fs.Path /** Backup a DynamoDB table as JSON. * * The full table is scanned and the results are stored in the given output path. */ object DynamoBackupJob extends Job { private ...
traviscrawford/spark-dynamodb
src/main/scala/com/github/traviscrawford/spark/dynamodb/DynamoBackupJob.scala
Scala
apache-2.0
1,833
package com.gu.adapters.http import org.scalatra.ScalatraServlet import org.scalatra.swagger.{ ApiInfo, NativeSwaggerBase, Swagger } class ResourcesApp(implicit val swagger: Swagger) extends ScalatraServlet with NativeSwaggerBase object AvatarApiInfo extends ApiInfo( title = "Guardian Avatar API", description = ...
guardian/discussion-avatar
api/src/main/scala/com/gu/adapters/http/AvatarSwagger.scala
Scala
apache-2.0
595
package fr.laas.fape.constraints.stnu.parser import fr.laas.fape.anml.model.abs.time.TimepointTypeEnum._ import fr.laas.fape.anml.model.concrete.{ContingentConstraint, MinDelayConstraint, TPRef, TemporalConstraint} import fr.laas.fape.anml.pending.IntExpression import scala.util.parsing.combinator.JavaTokenParsers im...
athy/fape
constraints/src/main/scala/fr/laas/fape/constraints/stnu/parser/STNUParser.scala
Scala
bsd-2-clause
2,242
/* * 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 ...
wangmiao1981/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/types/numerics.scala
Scala
apache-2.0
6,074
/* * Copyright 2022 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/vat-registration-frontend
test/connectors/ICLConnectorSpec.scala
Scala
apache-2.0
2,130
/* * 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 ...
milliman/spark
mllib/src/main/scala/org/apache/spark/ml/util/ReadWrite.scala
Scala
apache-2.0
16,035
package fpinscala.laziness import Stream._ import scala.annotation.tailrec trait Stream[+A] { def foldRight[B](z: => B)(f: (A, => B) => B): B = // The arrow `=>` in front of the argument type `B` means that the function `f` takes its second argument by name and may choose not to evaluate it. this match { ...
js1972/fpinscala
exercises/src/main/scala/fpinscala/laziness/Stream.scala
Scala
mit
6,976
/* * Copyright 2012-2013 Eligotech BV. * * 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 ...
CoderPaulK/eventsourced
es-journal/es-journal-common/src/main/scala/org/eligosource/eventsourced/journal/common/serialization/MessageSerialization.scala
Scala
apache-2.0
11,298
/* * Copyright 2015 Depop * * 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...
depop/json-macros
src/test/scala/com/depop/json/SprayJsonADTFieldRenamingMacrosSpec.scala
Scala
apache-2.0
1,343
/* * Copyright 2014 JHC Systems Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
andrewjskatz/sqlest
src/main/scala/sqlest/ast/syntax/QuerySyntax.scala
Scala
apache-2.0
800
/** * © 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/project/sbt-cassandra-plugin/src/main/scala/com/github/hochgi/sbt/cassandra/CassandraPlugin.scala
Scala
apache-2.0
11,209
package com.sksamuel.elastic4s.http.search.queries.span import com.sksamuel.elastic4s.searches.queries.span.{SpanNearQuery, SpanOrQuery, SpanTermQuery} import org.scalatest.FunSuite import scala.util.parsing.json.JSON class SpanOrQueryBodyFnTest extends FunSuite { test("SpanOrQueryBodyFn apply should return appro...
Tecsisa/elastic4s
elastic4s-http/src/test/scala/com/sksamuel/elastic4s/http/search/queries/span/SpanOrQueryBodyFnTest.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 ...
andrewor14/iolap
mllib/src/main/scala/org/apache/spark/ml/regression/GBTRegressor.scala
Scala
apache-2.0
8,294
package forex import scalaz._ import Scalaz._ import scalaz.Validation.FlatMap._ import forex.{OrderTotal => OT} // a import forex.{ExchangeRateLookup => ERL} object OrderTotalConverter1 { def convert(rawCurrency: String, rawAmount: String): ValidationNel[String, OrderTotal]...
alexanderdean/Unified-Log-Processing
ch07/7.4/forex/src/main/scala/forex/OrderTotalConverter1.scala
Scala
apache-2.0
575
/* * Copyright 2013 - 2017 Outworkers Ltd. * * 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...
websudos/morpheus
morpheus-dsl/src/test/scala/com/outworkers/morpheus/CustomSamplers.scala
Scala
bsd-2-clause
1,664
package lila.security import lila.common.String._ import lila.hub.actorApi.message.LichessThread import lila.user.User import akka.actor.ActorSelection final class Greeter( sender: String, messenger: ActorSelection) { def apply(user: User) { messenger ! LichessThread( from = sender, to = u...
danilovsergey/i-bur
modules/security/src/main/Greeter.scala
Scala
mit
1,002
package shark.api import scala.reflect.classTag object ClassTags { // List of primitive ClassTags. val jBoolean = classTag[java.lang.Boolean] val jByte = classTag[java.lang.Byte] val jShort = classTag[java.lang.Short] val jInt = classTag[java.lang.Integer] val jLong = classTag[java.lang.Long] val jFloat...
uclaabs/abs
src/main/scala/shark/api/ClassTags.scala
Scala
apache-2.0
394
package com.stulsoft.ysps.pmaybe /** * Created by Yuriy Stul on 9/18/2016. * * @see http://groz.github.io/scala/intro/monads/ */ object MaybeWithMapAndFlatMap { abstract class Maybe[+T] { def map[U](f: T => U): Maybe[U] def flatMap[U](f: T => Maybe[U]): Maybe[U] } case class Just[T](get: T) ex...
ysden123/ysps
src/main/scala/com/stulsoft/ysps/pmaybe/MaybeWithMapAndFlatMap.scala
Scala
mit
2,318
/* * Copyright 2011-2014 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...
EBPI/yaidom
src/test/scala/nl/ebpi/yaidom/integrationtest/StreamingLargeXmlTest.scala
Scala
apache-2.0
5,050
package springnz.sparkplug.client import akka.actor.TypedActor.PreStart import akka.actor._ import springnz.sparkplug.core.SparkPlugException import springnz.sparkplug.executor.MessageTypes._ import springnz.sparkplug.util.Logging import scala.concurrent._ object SingleJobProcessor { def props(jobRequest: JobReque...
springnz/sparkplug
sparkplug-launcher/src/main/scala/springnz/sparkplug/client/SingleJobProcessor.scala
Scala
mit
1,929
import scala.scalajs.js import scala.scalajs.js.annotation.* class A { @JSExport("toString") // error def a(): Int = 5 } class B { @JSExport("toString") // ok def a(x: Int): Int = x + 1 }
dotty-staging/dotty
tests/neg-scalajs/jsexport-bad-tostring.scala
Scala
apache-2.0
198
/* * 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 ...
tophua/spark1.52
sql/core/src/main/scala/org/apache/spark/sql/execution/ExistingRDD.scala
Scala
apache-2.0
5,086
package blended.streams.jms import java.util.concurrent.atomic.AtomicBoolean import akka.Done import akka.stream._ import akka.stream.stage.{AsyncCallback, TimerGraphStageLogic} import blended.jms.utils.JmsSession import blended.util.logging.Logger import scala.concurrent.Future import scala.util.control.NonFatal /...
lefou/blended
blended.streams/src/main/scala/blended/streams/jms/JmsStageLogic.scala
Scala
apache-2.0
4,317
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
bravo-zhang/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/GenerateExec.scala
Scala
apache-2.0
12,294
trait Assoc[T] { type U def foo(t: T): U } trait Link[T, A] case class Foo(i: Int) object Foo { println(s"Foo companion") erased implicit val barLink: Link[Foo, FooAssoc.type] = null } implicit object FooAssoc extends Assoc[Foo] { println(s"FooAssoc") type U = Int def foo(t: Foo): Int = t.i } import...
dotty-staging/dotty
tests/run-custom-args/companion-loading.scala
Scala
apache-2.0
708
package com.jsuereth.pgp package cli import sbt._ import sbt.complete._ import sbt.complete.DefaultParsers._ import CommonParsers._ case class ExportPublicKey(id: String) extends PgpCommand { def run(ctx: PgpCommandContext): Unit = { val key = (ctx.publicKeyRing.findPubKeyRing(id) getOrElse sys.error("C...
voetha/sbt-pgp
pgp-plugin/src/main/scala/com/jsuereth/pgp/cli/ExportKey.scala
Scala
bsd-3-clause
616
package com.socrata.querycoordinator.caching import scala.language.implicitConversions import scala.collection.immutable.{SortedMap, SortedSet} import java.nio.charset.StandardCharsets import java.io.{ByteArrayOutputStream, DataOutputStream} import java.security.MessageDigest import com.rojoma.json.v3.ast.{JObject, JS...
socrata-platform/query-coordinator
query-coordinator/src/main/scala/com/socrata/querycoordinator/caching/Hasher.scala
Scala
apache-2.0
4,027
/* * 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/main/scala/org/apache/flink/table/planner/plan/rules/physical/stream/StreamPhysicalDeduplicateRule.scala
Scala
apache-2.0
5,650
package org.jetbrains.plugins.scala.highlighter import junit.framework.TestCase class ScalaSyntaxHighlighterTest extends TestCase { def testScalaSyntaxHighlighterObjectFieldsAreSuccessfullyInitialized(): Unit = ScalaSyntaxHighlighter.toString }
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/highlighter/ScalaSyntaxHighlighterTest.scala
Scala
apache-2.0
253
package auth import org.scalatest.{FlatSpec, Matchers} import twitter4j.{Query, QueryResult, RateLimitStatus, TwitterFactory} /** * The last test is volatile, depends on the API but the * authentication should be able to create application-like * twitter instances and not user-like authentications (the limits are ...
davidelnunes/TwitterTools
src/test/scala/auth/TestTwitterAuth.scala
Scala
gpl-3.0
2,229
package com.arcusys.learn.scorm.manifest.sequencing.storage.impl import com.arcusys.learn.storage.impl.{ EntityStorageExt, KeyedEntityStorageExt } import com.arcusys.valamis.lesson.scorm.model.manifest.ChildrenSelection import com.arcusys.valamis.lesson.scorm.storage.sequencing.ChildrenSelectionStorage /** * User: Y...
ViLPy/Valamis
learn-persistence-api/src/main/scala/com/arcusys/learn/scorm/manifest/sequencing/storage/impl/ChildrenSelectionEntityStorage.scala
Scala
lgpl-3.0
762
/* * 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 ...
ArvinDevel/onlineAggregationOnSparkV2
core/src/main/scala/org/apache/spark/deploy/master/MasterSource.scala
Scala
apache-2.0
1,872
import gh2013.events._ import gh2013.models.EventBody import net.liftweb.json.JsonAST.JValue package object gh2013 { def parse(event: JValue): Option[GH2013Event] = { val parsers = Seq( parser(PushEventParser)(_), parser(WatchEventParser)(_), parser(CreateEventParser)(_), ...
mgoeminne/github_etl
src/main/scala/gh2013/package.scala
Scala
mit
1,384
package ch.epfl.lamp.grading import org.scalatest.{Tag, FunSuiteLike} import java.security._ import java.util.concurrent._ trait GradingSuite extends FunSuiteLike { /** * For the real grading, ScalaTest is executed in a separate JVM by the ScalaTestRunner * with a security manager enabled. You can run the s...
sbt-coursera/scala-grading
runtime/src/main/scala/ch/epfl/lamp/grading/GradingSuite.scala
Scala
bsd-3-clause
5,062
trait Symbols { trait Symbol } object Types { self: Symbols => // As of 11.10.2009, this would multi-resolve to scala.Symbol and Symbols.Symbol. trait B extends <ref>Symbol }
LPTK/intellij-scala
testdata/resolve/nonlocal/selfTypeShadow.scala
Scala
apache-2.0
199
package com.prezi.haskell.gradle.tasks import java.io.File import com.prezi.haskell.gradle.ApiHelper._ import com.prezi.haskell.gradle.external.SnapshotVersions import com.prezi.haskell.gradle.model.{Sandbox, StackYamlWriter} import com.prezi.haskell.gradle.util.FileLock import org.gradle.api.tasks.TaskAction import ...
prezi/gradle-haskell-plugin
src/main/scala/com/prezi/haskell/gradle/tasks/GenerateStackYaml.scala
Scala
apache-2.0
3,005
package com.eclipsesource.schema import com.eclipsesource.schema.drafts.Version7 import com.eclipsesource.schema.test.JsonSpec import org.specs2.mutable.Specification class IfThenElseSpec extends Specification with JsonSpec { import Version7._ implicit val validator = SchemaValidator(Some(Version7)) validate("i...
eclipsesource/play-json-schema-validator
src/test/scala/com/eclipsesource/schema/IfThenElseSpec.scala
Scala
apache-2.0
346
/** * 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...
usakey/kafka
core/src/main/scala/kafka/server/KafkaServerStartable.scala
Scala
apache-2.0
1,941
package co.spendabit.webapp.forms.ui.bootstrap import co.spendabit.XMLHelpers import co.spendabit.webapp.forms.controls._ import co.spendabit.webapp.forms.v2.{BaseWebForm, WebForm1} import org.scalatest.FunSuite class HorizontalFormTests extends FunSuite with XMLHelpers { test("column widths are properly calculate...
spendabit/webapp-tools
test/co/spendabit/webapp/forms/ui/bootstrap/HorizontalFormTests.scala
Scala
unlicense
992
package debop4s.timeperiod.base import debop4s.timeperiod._ import debop4s.timeperiod.tests.AbstractTimeFunSuite import debop4s.timeperiod.utils.Times._ /** * debop4s.timeperiod.tests.debop4s.redis.base.TimePeriodContainerTest * * @author 배성혁 [email protected] * @since 2014. 2. 19. 오후 4:11 */ class TimePer...
debop/debop4s
debop4s-timeperiod/src/test/scala/debop4s/timeperiod/base/TimePeriodContainerFunSuite.scala
Scala
apache-2.0
843
/*********************************************************************** * Copyright (c) 2013-2019 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
elahrvivaz/geomesa
geomesa-accumulo/geomesa-accumulo-tools/src/main/scala/org/locationtech/geomesa/accumulo/tools/stats/AccumuloStatsAnalyzeCommand.scala
Scala
apache-2.0
1,448
package demo package components import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.prefix_<^._ import scala.scalajs.js object CodeExample { object Style { val pageBodyContent = Seq(^.borderRadius := "2px", ^.boxShadow := "0 1px 4px rgba(223, 228, 228, 0.79)", ^.maxWidth := "1024px"...
tpdi/scalajs-react-components
demo/src/main/scala/demo/components/CodeExample.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 ...
GJL/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/stream/sql/AggregateITCase.scala
Scala
apache-2.0
41,064
/* ,i::, :;;;;;;; ;:,,::;. 1ft1;::;1tL t1;::;1, :;::; _____ __ ___ __ fCLff ;:: tfLLC / ___/ / |/ /____ _ _____ / /_ CLft11 :,, i1tffLi \\__ \\ ____ / /|_/ ...
S-Mach/s_mach.explain
explain_json/src/test/scala/s_mach/explain_json/JsonExplanationOpsTest.scala
Scala
mit
3,222
package au.com.dius.pact.provider import au.com.dius.pact.model.{OptionalBody, Request} object EnterStateRequest { def apply(url: String, state: String): Request = { new Request("POST", url, null, null, OptionalBody.body("{\\"state\\": \\"" + state + "\\"}"), null) } }
Fitzoh/pact-jvm
pact-jvm-provider/src/main/scala/au/com/dius/pact/provider/EnterStateRequest.scala
Scala
apache-2.0
276
package org.jetbrains.plugins.scala package lang package parser package parsing package top import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder import org.jetbrains.plugins.scala.lang.parser.parsing.statements.PatVarDef import sc...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/parser/parsing/top/EarlyDef.scala
Scala
apache-2.0
2,316
/* * Copyright 2016 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/reactivemongo-json
src/main/scala/reactivemongo/ReactiveMongoHelper.scala
Scala
apache-2.0
2,066
/* * The Bluejelly project, Copyright 2012. * * This source code is distributed under the terms of * the BSD license, see the LICENSE file for details. */ import sbt._ import Keys._ import sbtassembly.Plugin._ import AssemblyKeys._ object BluejellyBuild extends Build { import Dist._ override lazy val sett...
ppedemon/Bluejelly
project/Build.scala
Scala
bsd-3-clause
6,934
package learningconcurrency.ch2 import scala.collection._ import parallelprogramming._ object SynchronizedBadPool extends App { private val tasks = mutable.Queue[() => Unit]() val worker = new Thread { def poll() = tasks.synchronized { if(tasks.nonEmpty) Some(tasks.dequeue()) else None } overr...
tomduhourq/learning-concurrent-programming
src/main/scala/learningconcurrency/ch2/SynchronizedBadPool.scala
Scala
apache-2.0
681
package im.mange.jetpac trait Fillable extends Identifiable { def fill(content: Renderable) = element.fill(content) def empty = element.empty }
alltonp/jetboot
src/main/scala/im/mange/jetpac/Fillable.scala
Scala
apache-2.0
149
package unfiltered.filter import org.specs2.mutable._ object AsyncSpec extends Specification with unfiltered.specs2.jetty.Served { import unfiltered.response._ import unfiltered.request._ import unfiltered.request.{Path => UFPath} object APlan extends async.Plan { def intent = { case GET(UFPath("/p...
omarkilani/unfiltered
filter-async/src/test/scala/AsyncSpec.scala
Scala
mit
783
/* * 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 ...
shuangshuangwang/spark
mllib/src/test/scala/org/apache/spark/ml/regression/GeneralizedLinearRegressionSuite.scala
Scala
apache-2.0
70,068
package org.gDanix.podapp_ng_server.controllers.v0 import org.gDanix.podapp_ng_server.controllers.v0.common.{ CommonResponses, ExecutionContext, Sessions, Masters, Subjects, Teachings } import play.api.mvc.Action import play.api.mvc.Results.Ok import play.api.libs.json.{ JsArray, Json } import scala.concurrent.Futu...
gDanix/PODApp-ng-server
app/org/gDanix/podapp_ng_server/controllers/v0/GetTeaching.scala
Scala
apache-2.0
1,821
package views.changekeeper /** * The following are used to deduplicate code across views and tests; they are not used in view-model mappings. */ object VrmLocked { final val BuyAnotherVehicleId = "buyAnotherVehicle" final val ExitId = "exit" }
dvla/vehicles-change-keeper-online
app/views/changekeeper/VrmLocked.scala
Scala
mit
250
package com.github.gigurra.math /** * Created by johan on 2016-12-04. */ object perp { ///////////////////////////////////// // Scalar def apply(minInput: Float, maxInput: Float, exponent: Float, input: Float, minOutput: Float, maxOutput: Float, ...
GiGurra/scala-libgurra
src/main/scala/com/github/gigurra/math/perp.scala
Scala
mit
3,464
package pl.touk.nussknacker.engine.build import cats.data.NonEmptyList import pl.touk.nussknacker.engine.api._ import pl.touk.nussknacker.engine.api.process.ProcessName import pl.touk.nussknacker.engine.build.GraphBuilder.Creator import pl.touk.nussknacker.engine.graph.EspProcess import pl.touk.nussknacker.engine.grap...
TouK/nussknacker
scenario-api/src/main/scala/pl/touk/nussknacker/engine/build/ScenarioBuilder.scala
Scala
apache-2.0
3,256
package com.github.rbobin.playjsonmatch.utils case class JsMatchException(message: String) extends RuntimeException
rbobin/play-json-match
src/main/scala/com/github/rbobin/playjsonmatch/utils/JsMatchException.scala
Scala
mit
117
package com.twitter.finagle.util import scala.collection.mutable trait Drv extends (Rng => Int) /** * Create discrete random variables representing arbitrary distributions. */ object Drv { private val ε = 0.01 /** * A Drv using the Aliasing method [1]: a distribution is described * by a set of probabili...
luciferous/finagle
finagle-core/src/main/scala/com/twitter/finagle/util/Drv.scala
Scala
apache-2.0
3,639
package idv.brianhsu.maidroid.plurk.adapter import idv.brianhsu.maidroid.plurk.R import org.bone.soplurk.model.Icon import idv.brianhsu.maidroid.plurk.fragment.EmoticonFragment import idv.brianhsu.maidroid.plurk.view.IconGrid import idv.brianhsu.maidroid.plurk.util.EmoticonTabs import android.app.Activity import an...
brianhsu/MaidroidPlurk
src/main/scala/adapter/IconPagerAdapter.scala
Scala
gpl-3.0
1,621
package org.bitcoins.core.protocol.transaction import org.bitcoins.core.currency.CurrencyUnit import org.bitcoins.core.number.{Int32, UInt32} import org.bitcoins.core.protocol.script.{EmptyScriptWitness, ScriptWitness} import org.bitcoins.core.util.BytesUtil import org.bitcoins.core.wallet.builder.RawTxBuilder import ...
bitcoin-s/bitcoin-s
core/src/main/scala/org/bitcoins/core/protocol/transaction/Transaction.scala
Scala
mit
12,356
package org.http4s package headers import java.time.{Instant, ZoneId, ZonedDateTime} class DateSpec extends HeaderLaws { checkAll("Date", headerLaws(Date)) val gmtDate = ZonedDateTime.of(1994, 11, 6, 8, 49, 37, 0, ZoneId.of("GMT")) "render" should { "format GMT date according to RFC 1123" in { Date(...
m4dc4p/http4s
tests/src/test/scala/org/http4s/headers/DateSpec.scala
Scala
apache-2.0
1,184
/* * 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...
SRGOM/scalatest
scalatest-test/src/test/scala/org/scalatest/prop/PropertyCheckConfigurationHelperSuite.scala
Scala
apache-2.0
6,364
/* * Library of Proximal Algorithms adapted from https://github.com/cvxgrp/proximal * In-place modifications which later should be BLAS-ed when applicable for more efficiency * @author debasish83 */ package breeze.optimize.proximal import breeze.numerics.signum import scala.math.max import scala.math.min import s...
chen0031/breeze
math/src/main/scala/breeze/optimize/proximal/Proximal.scala
Scala
apache-2.0
6,768
/** * 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 ...
VinACE/adam
adam-core/src/main/scala/org/bdgenomics/adam/models/SequenceDictionary.scala
Scala
apache-2.0
10,841
package org.eigengo.scalalp.streams import java.util.zip.{ZipEntry, ZipFile} import java.io.{InputStream, File} class ZipArchive(file: File) { val zipFile = new ZipFile(file, ZipFile.OPEN_READ) /** * Apply ``operation`` to every entry in the zip file, collecting the result if the * operation is defined, sk...
eigengo/scala-launchpad
src/main/scala/org/eigengo/scalalp/streams/ZipArchive.scala
Scala
apache-2.0
869
/* * Copyright 2015 leon chen * * 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...
leonchen83/jsonpath
src/main/scala/com/moilioncircle/jsonpath/JSONParser.scala
Scala
apache-2.0
10,017
package molecule import sbt._ object Dependencies { object Test { type MM = String => ModuleID // Sort by artifact ID. lazy val junit = "junit" % "junit" % "4.11" lazy val specs: MM = sv => "org.scala-tools.testing" % "specs" % specsVersion(sv) cross specsCross //lazy val specs2: MM = sv =>...
molecule-labs/molecule
project/Dependencies.scala
Scala
apache-2.0
1,880