code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
/* * Copyright 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/iht-frontend
it/utils/IntegrationBaseSpec.scala
Scala
apache-2.0
2,867
/* * 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 ...
Panos-Bletsos/spark-cost-model-optimizer
sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala
Scala
apache-2.0
10,549
/* * 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
core/src/main/scala/org/apache/spark/deploy/worker/ExecutorRunner.scala
Scala
apache-2.0
8,213
/* * Copyright 2016 Coral realtime streaming analytics (http://coral-streaming.github.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2...
coral-streaming/coral
src/main/scala/io/coral/actors/Trigger.scala
Scala
apache-2.0
1,385
/** Copyright 2014 TappingStone, 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 ...
TheDataShed/PredictionIO
data/src/main/scala/storage/hbase/StorageClient.scala
Scala
apache-2.0
2,323
/* * ____ ____ _____ ____ ___ ____ * | _ \\ | _ \\ | ____| / ___| / _/ / ___| Precog (R) * | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data * | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, In...
precog/platform
util/src/main/scala/com/precog/util/MapUtils.scala
Scala
agpl-3.0
2,411
package tests import builder.{CarDirector, SedanCarBuilder, SportsCarBuilder} /** * @author lmignot */ class BuilderTest extends BaseTest { describe("Sedan car builder") { it("should build a sedan car") { val carBuilder = SedanCarBuilder val director = CarDirector(carBuilder) val car = di...
BBK-PiJ-2015-67/sdp-portfolio
exercises/week08/src/test/scala/tests/BuilderTest.scala
Scala
unlicense
1,193
package justin.db.actors.protocol import justin.db.consistenthashing.NodeId case class RegisterNode(nodeId: NodeId)
speedcom/JustinDB
justin-core/src/main/scala/justin/db/actors/protocol/ClusterSubscriberActorProtocol.scala
Scala
apache-2.0
118
package controllers import play.api._ import play.api.Play.current import play.api.mvc._ import play.api.libs.concurrent.Execution.Implicits.defaultContext import play.api.libs.functional.syntax._ import play.api.libs.json._ object Application extends Controller { def index = Action { Ok("Running :)") } d...
scalableminds/sbt-play-raml
sample/app/controllers/Application.scala
Scala
apache-2.0
387
/* NSC -- new Scala compiler * Copyright 2005-2013 LAMP/EPFL * @author Martin Odersky */ package scala package tools.nsc package typechecker import scala.collection.{ mutable, immutable } import mutable.ListBuffer import symtab.Flags._ /** This phase performs the following functions, each of which could be split...
felixmulder/scala
src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala
Scala
bsd-3-clause
28,220
package com.github.bespalovdn.asteriskscala.agi.transport import java.util.{List => JList} import com.github.bespalovdn.asteriskscala.agi.request.AgiRequest import io.netty.channel.ChannelHandlerContext import io.netty.handler.codec.MessageToMessageDecoder import scala.collection.mutable.ArrayBuffer class AgiReques...
bespalovdn/asterisk-scala
agi/src/main/scala/com/github/bespalovdn/asteriskscala/agi/transport/AgiRequestDecoder.scala
Scala
mit
787
package pl.arapso.scaffoldings.scala.custom.matches object UnapplayExample { case class SomeStuff(name: String) def main(args: Array[String]) { val test = new SomeStuff("kupon") val result = test match { case SomeStuff("kuponik") => "OK" case _ => "NOT OK" } println(result) } }
arapso-scaffoldings/scala
scala-tutor/custom/src/main/scala/pl/arapso/scaffoldings/scala/custom/matches/UnapplayExample.scala
Scala
apache-2.0
320
/* * Copyright 2015 LG CNS. * * 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 t...
jhshin9/scouter
scouter.server/src/scouter/server/netio/service/net/TcpServiceWorker.scala
Scala
apache-2.0
4,618
package zeroadv.db import akka.actor.ActorSystem trait DbModule { lazy val mongoDb = MongoDb.connect(system) lazy val eventCollection = wire[EventCollection] def newWriteEventToMongoActor = wire[WriteEventToMongoActor] def system: ActorSystem }
adamw/zeroadv
collector/src/main/scala/zeroadv/db/DbModule.scala
Scala
gpl-2.0
256
package com.twitter.finatra.multiserver.Add2HttpServer import com.twitter.finatra.http.HttpServer import com.twitter.finatra.http.filters.CommonFilters import com.twitter.finatra.http.routing.HttpRouter class Add2Server extends HttpServer { override val modules = Seq(Add1HttpClientModule) override def configureH...
syamantm/finatra
inject-thrift-client-http-mapper/src/test/scala/com/twitter/finatra/multiserver/Add2HttpServer/Add2Server.scala
Scala
apache-2.0
419
package com.twitter.util import java.util.concurrent.atomic.AtomicReference import org.junit.runner.RunWith import org.scalacheck.Arbitrary.arbitrary import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import org.scalatest.prop.GeneratorDrivenPropertyChecks import scala.collection.mutable @RunWith(cl...
luciferous/util
util-core/src/test/scala/com/twitter/util/VarTest.scala
Scala
apache-2.0
10,309
package bad.robot.radiate.monitor import java.util.concurrent.ScheduledFuture trait Monitor { def start(tasks: List[MonitoringTask]): List[ScheduledFuture[_]] def cancel(tasks: List[ScheduledFuture[_]]) def stop: List[Runnable] }
tobyweston/radiate
src/main/scala/bad/robot/radiate/monitor/Monitor.scala
Scala
apache-2.0
238
package io.atal.butterfly.action import io.atal.butterfly.{Editor, Clipboard, Cursor} import org.scalatest._ /** Erase action unit test */ class EraseTest extends FlatSpec { "The erase action" should "remove a character or the selection" in { val action = new Erase val editor = new Editor() val clipb...
Matthieu-Riou/Butterfly
src/test/scala/io/atal/butterfly/action/EraseTest.scala
Scala
mit
1,415
package jp.relx.awstools object EIPAllocator { def main(args: Array[String]) { println("HelloWorld") } }
urelx/aws-eip-allocator
src/main/scala/jp/relx/awstools/EIPAllocator.scala
Scala
apache-2.0
113
package com.github.al.roulette.player import com.github.al.roulette.player.impl._ import com.lightbend.lagom.scaladsl.playjson.{JsonSerializer, JsonSerializerRegistry} object PlayerSerializerRegistry extends JsonSerializerRegistry { override def serializers = List( JsonSerializer[PlayerState], JsonSerializ...
andrei-l/reactive-roulette
player-impl/src/main/scala/com/github/al/roulette/player/PlayerSerializerRegistry.scala
Scala
mit
499
package com.trafficland.augmentsbt.releasemanagement import sbt.{Setting, SettingKey} object SnapshotReleaseTasks { lazy val releasePublishLibSnapshotSettingKey: SettingKey[Seq[String]] = SettingKey[Seq[String]] ( "release-publish-lib-snapshot-tasks", "a list of tasks to execute (in order) for publishing a...
ereichert/augment-sbt
src/main/scala/com/trafficland/augmentsbt/releasemanagement/SnapshotReleaseTasks.scala
Scala
apache-2.0
1,174
package tholowka.diz.marshalling.terms private [terms] object BooleanParser {} private [terms] case class BooleanParser { def consume(input: Boolean): String = { if (input) { "true" } else { "false" } } }
tholowka/diz
src/main/scala/tholowka/diz/marshalling/terms/BooleanParser.scala
Scala
mit
263
package scutil.gui.extension import java.awt._ import scutil.geom._ import scutil.gui.geomConversion object IntRectImplicits extends IntRectImplicits trait IntRectImplicits { implicit final class IntRectExt(peer:IntRect) { def toAwtRectangle:Rectangle = geomConversion IntRect_Rectangle peer } }
ritschwumm/scutil
modules/gui/src/main/scala/scutil/gui/extension/IntRectImplicits.scala
Scala
bsd-2-clause
304
/* * 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/support/requisite/Requisite.scala
Scala
apache-2.0
771
package scaredy.http object HttpResponseHeaders { sealed trait ResponseHeader { def asString: String } object RateLimitUsed extends ResponseHeader { val asString = "X-Ratelimit-Used" } object RateLimitRemaining extends ResponseHeader { val asString = "X-Ratelimit-Remaining" } object RateLimitReset ex...
jjpatel/scaredy
src/main/scala/scaredy/http/HttpResponseHeaders.scala
Scala
mit
515
package controllers import com.bryzek.apidoc.api.v0.models.{ Membership, Organization, User } import models.MainTemplate import lib.Role import play.api.mvc._ import play.api.mvc.Results.Redirect import scala.concurrent.{ Await, Future } import scala.concurrent.duration._ import play.api.Play.current import java.util....
Seanstoppable/apidoc
www/app/controllers/AuthenticatedOrgRequest.scala
Scala
mit
3,356
import java.io.File import java.io.BufferedWriter import java.io.FileWriter import scala.io.Source object GenTheyWord { def generateFile(srcFileDir: String, srcClassName: String, targetFileDir: String, targetClassName: String) { val targetDir = new File(targetFileDir) targetDir.mkdirs() val writer = ...
travisbrown/scalatest
project/GenTheyWord.scala
Scala
apache-2.0
2,476
/* * 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 ...
minixalpha/spark
examples/src/main/scala/org/apache/spark/examples/mllib/TallSkinnySVD.scala
Scala
apache-2.0
1,992
package uk.gov.gds.ier.validation import uk.gov.gds.ier.model.DOB import org.joda.time.{DateTime, DateMidnight} import org.joda.time.Months import uk.gov.gds.ier.model.DateLeft object DateValidator { lazy val minimumAge = 16 lazy val maximumAge = 115 lazy val maximumCitizenshipDuration = 115 def isExisting...
michaeldfallen/ier-frontend
app/uk/gov/gds/ier/validation/DateValidator.scala
Scala
mit
2,059
package org.aja.tantra.examples.util.lambdacalculus class PrettyPrinter { def apply(expr: Expr): String = expr match { case Lambda(arg, body) => p"λ$arg.$body" case CNumber(i) => i.toString case CBoolean(b) => b.toString case Apply(fun, arg) => p"$fun $arg" case Var(name, scope) ...
Mageswaran1989/aja
src/examples/scala/org/aja/tantra/examples/util/lambdacalculus/PrettyPrinter.scala
Scala
apache-2.0
586
package services.impl import com.google.inject.{Inject, Singleton} import dao.UserDAO import model.User import org.mindrot.jbcrypt.BCrypt import services.UserService import services.state.ActionState import scala.concurrent.{ExecutionContext, Future} /** * Created by camilosampedro on 16/10/16. */ @Singleton cla...
ProjectAton/AtonLab
app/services/impl/UserServiceImpl.scala
Scala
gpl-3.0
958
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.scaladsl.it import akka.pattern.CircuitBreakerOpenException import akka.stream.Materializer import akka.stream.scaladsl.Flow import akka.stream.scaladsl.Sink import akka.stream.scaladsl.Source import akka.Done imp...
ignasi35/lagom
service/scaladsl/integration-tests/src/test/scala/com/lightbend/lagom/scaladsl/it/ScaladslMockServiceSpec.scala
Scala
apache-2.0
11,317
package com.twitter.finagle.util import com.twitter.conversions.time._ import com.twitter.util.TimerTask import java.util.Collections import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicInteger import org.jboss.netty.{util => nu} import org.mockito.ArgumentCaptor import org.specs.Specificatio...
joshbedo/finagle
finagle-core/src/test/scala/com/twitter/finagle/util/TimerSpec.scala
Scala
apache-2.0
1,209
package org.helgoboss.scala_osgi_metatype /** * Contains Scala traits which accurately model the facilities of the OSGi Metatype API. */ package object interfaces { }
helgoboss/scala-osgi-metatype
src/main/scala/org/helgoboss/scala_osgi_metatype/interfaces/package.scala
Scala
mit
171
package org.scaladebugger.api.lowlevel.events import com.sun.jdi.event.{Event, EventIterator, EventSet} import org.scaladebugger.api.lowlevel.events.data.JDIEventDataResult import EventType.EventType import org.scaladebugger.test.helpers.ParallelMockFunSpec class EventSetProcessorSpec extends ParallelMockFunSpec { ...
rcsenkbeil/scala-debugger
scala-debugger-api/src/test/scala/org/scaladebugger/api/lowlevel/events/EventSetProcessorSpec.scala
Scala
apache-2.0
6,599
package TAPLcomp.tyarith import scala.util.parsing.combinator.ImplicitConversions import scala.util.parsing.combinator.syntactical.StandardTokenParsers sealed trait Ty case object TyBool extends Ty case object TyNat extends Ty sealed trait Term case object TmTrue extends Term case object TmFalse extends Term ca...
hy-zhang/parser
Scala/Parser/src/TAPLcomp/tyarith/parser.scala
Scala
bsd-3-clause
1,492
/* * 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 ...
icexelloss/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
Scala
apache-2.0
54,934
package models.blog import javax.inject.Inject //import models.blog.Article import models.blog.BlogTablesDef.{ articles, insertArticle } import play.api.db.slick.DatabaseConfigProvider import slick.backend.DatabaseConfig import slick.driver.JdbcProfile import slick.jdbc.JdbcBackend import scala.concurrent.Future /*...
stanikol/walnuts
server/app/models/blog/BlogDAO.scala
Scala
apache-2.0
1,175
package com.yetu.play.authenticator.utils.di import com.typesafe.config.ConfigFactory import play.api.Play import play.api.Play.current import com.yetu.typesafeconfigextentension.ConfigExtension object ConfigLoader extends ConfigExtension { val config = ConfigFactory.load().substitutePropertyValues("application.en...
yetu/yetu-play-authenticator
app/com/yetu/play/authenticator/utils/di/ConfigLoader.scala
Scala
apache-2.0
947
/* * Copyright (c) 2012, 2013, 2014, 2015, 2016 SURFnet BV * 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, thi...
BandwidthOnDemand/nsi-safnari
app/nl/surfnet/safnari/package.scala
Scala
bsd-3-clause
1,958
package ch.epfl.scala.index package server /* * Copyright 2015 Heiko Seeberger * * 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 * *...
adamwy/scaladex
server/src/main/scala/ch.epfl.scala.index.server/Json4sSupport.scala
Scala
bsd-3-clause
2,192
/* * This file is part of Evo2DSim. * * Evo2DSim 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 3 of the License, or * (at your option) any later version. * * Evo2DSim is distrib...
vchuravy/Evo2DSim
core/src/main/scala/org/vastness/evo2dsim/core/neuro/SensorNeuron.scala
Scala
mit
1,744
import a._ class C extends B { protected override def m() = super.m() + 1 def emm = m() } object Test extends App { assert(new C().emm == 2) }
scala/scala
test/files/run/t7936/Test_1.scala
Scala
apache-2.0
152
package com.lookout.borderpatrol.session.secret import com.lookout.borderpatrol.session._ import com.twitter.util.Time import scala.concurrent.{Future => ScalaFuture, Promise => ScalaPromise} import scala.util.{Failure, Success, Try} /** * This prototypes out an API for the SecretStore, keeping secrets in memory *...
rtyler/borderpatrol
borderpatrol-core/src/main/scala/com/lookout/borderpatrol/session/secret/SecretStore.scala
Scala
mit
2,437
import com.typesafe.sbt.SbtScalariform._ object Format { lazy val settings = projectSettings ++ Seq( autoImport.scalariformAutoformat := true, ScalariformKeys.preferences := formattingPreferences) lazy val formattingPreferences = { import scalariform.formatter.preferences._ FormattingPreferences()...
ReactiveMongo/ReactiveMongo
project/Format.scala
Scala
apache-2.0
1,153
// // Clause.scala -- Scala class Clause // Project OrcScala // // Created by dkitchin on Jun 3, 2010. // // Copyright (c) 2017 The University of Texas at Austin. All rights reserved. // // Use and redistribution of this file is governed by the license terms in // the LICENSE file found in the project's top-level direc...
orc-lang/orc
OrcScala/src/orc/compile/translate/Clause.scala
Scala
bsd-3-clause
6,346
/* * Copyright 2013 http4s.org * * 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 i...
http4s/http4s
core/shared/src/main/scala/org/http4s/headers/Authorization.scala
Scala
apache-2.0
1,420
import org.apache.spark.mllib.regression.LinearRegressionWithSGD import org.apache.spark.mllib.regression.LabeledPoint import org.apache.spark.mllib.linalg.Vectors // Load and parse the data val data = sc.textFile("../datasets/winequalityred_linearregression.csv") val parsedData = data.map { line => val parts = line...
rahuldhote/spark-pmml-exporter-validator
src/main/resources/spark_shell_exporter/linearregression_winequalityred.scala
Scala
agpl-3.0
1,056
/* * Copyright 2007-2011 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
sortable/framework
persistence/mapper/src/test/scala/bootstrap/liftweb/Boot.scala
Scala
apache-2.0
1,278
/** * Copyright (C) 2007 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 prog...
martinluther/orbeon-forms
src/main/scala/org/orbeon/oxf/xforms/library/XFormsFunnyFunctions.scala
Scala
lgpl-2.1
1,745
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. package com.azure.cosmos.spark import com.azure.cosmos.implementation.TestConfigurations import com.azure.cosmos.{ConsistencyLevel, CosmosClientBuilder} import org.apache.spark.sql.SparkSession object SampleCosmosCatalogE2...
Azure/azure-sdk-for-java
sdk/cosmos/azure-cosmos-spark_3_2-12/src/test/scala/com/azure/cosmos/spark/SampleCosmosCatalogE2EMain.scala
Scala
mit
1,832
package de.sciss.fscape package tests import de.sciss.fscape.Ops._ import de.sciss.fscape.gui.SimpleGUI import scala.swing.Swing object IfThenElseGESimpleTest extends App { // showStreamLog = true val g = Graph { import graph._ // (0: GE).poll(0, "zero") val p1: GE = 0 val dc1 = DC(1) val out ...
Sciss/FScape-next
core/jvm/src/test/scala/de/sciss/fscape/tests/IfThenElseGESimpleTest.scala
Scala
agpl-3.0
684
/* * * o o o o o * | o | |\\ /| | / * | o-o o--o o-o oo | | O | oo o-o OO o-o o o * | | | | | | | | | | | | | | | | \\ | | \\ / * O---oo-o o--O | o-o o-o-o o o o-o-o o o o-o o * | ...
anskarl/LoMRF
src/main/scala/lomrf/package.scala
Scala
apache-2.0
2,761
/* * * ____ __ ____________ ______ * / __/______ _/ /__ /_ __/ _/ //_/_ / * _\\ \\/ __/ _ `/ / _ `// / _/ // ,< / /_ * /___/\\__/\\_,_/_/\\_,_//_/ /___/_/|_| /___/ * * A plot library for Scala. * */ import sbt._ object Dependencies { object v { final val Logback = "1.2.3" fin...
vagmcs/ScalaTIKZ
project/Dependencies.scala
Scala
lgpl-3.0
1,276
/* * Copyright 2013 Akira Ueda * * 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 i...
akr4/shirahae-sql
src/test/scala/log-test.scala
Scala
apache-2.0
2,404
/* * 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...
dotty-staging/scalatest
scalatest/src/main/scala/org/scalatest/OptionValues.scala
Scala
apache-2.0
5,188
package org.mdoc.common.model import cats.data.Xor import io.circe.generic.auto._ import io.circe.parse._ import io.circe.syntax._ import org.mdoc.common.model.Format.{ Html, Pdf } import org.mdoc.common.model.RenderingEngine.LibreOffice import org.mdoc.common.model.circe._ import org.scalacheck.Prop._ import org.scal...
m-doc/common-model
shared/src/test/scala/org/mdoc/common/model/RenderingInputSpec.scala
Scala
apache-2.0
987
/* * 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...
liquidarmour/ct-calculations
src/test/scala/uk/gov/hmrc/ct/accounts/AccountStatementValidationFixture.scala
Scala
apache-2.0
1,614
package com.sksamuel.elastic4s import java.util.UUID import com.sksamuel.elastic4s.admin.{OpenIndexDefinition, TypesExistsDefinition, RefreshIndexDefinition, IndicesStatsDefinition, IndexExistsDefinition, GetSegmentsDefinition, GetTemplateDefinition, FlushIndexDefinition, DeleteIndexTemplateDefinition, FieldStatsDefi...
nicoo/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/ElasticDsl.scala
Scala
apache-2.0
25,784
package mesosphere.marathon import mesosphere.marathon.Protos.MarathonTask import mesosphere.marathon.core.base.{ Clock, ShutdownHooks } import mesosphere.marathon.core.launchqueue.{ LaunchQueueConfig, LaunchQueueModule } import mesosphere.marathon.core.leadership.AlwaysElectedLeadershipModule import mesosphere.marath...
Kosta-Github/marathon
src/test/scala/mesosphere/marathon/LaunchQueueModuleTest.scala
Scala
apache-2.0
7,684
package chat.tox.antox.fragments import android.content.{Intent, SharedPreferences} import android.os.Bundle import android.preference.PreferenceManager import android.support.v4.app.Fragment import android.view.View.OnClickListener import android.view.{LayoutInflater, View, ViewGroup} import android.widget.Button imp...
wiiam/Antox
app/src/main/scala/chat/tox/antox/fragments/WifiWarningFragment.scala
Scala
gpl-3.0
2,466
/* * 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/utils/tf/loaders/Abs.scala
Scala
apache-2.0
1,529
package com.lynbrookrobotics.potassium.tasks /** * A continuous task where two subtasks are run sequentially * @param first the first task to run * @param second the task to run after the first task */ class SequentialContinuousTask private[tasks] (first: FiniteTask, second: ContinuousTask) extends ContinuousT...
Team846/potassium
core/shared/src/main/scala/com/lynbrookrobotics/potassium/tasks/SequentialContinuousTask.scala
Scala
mit
921
package mesosphere import org.scalatest.concurrent.Eventually import org.scalatest.time.{Milliseconds, Span} import scala.concurrent.duration._ /** * Helpers which wait for conditions. */ object WaitTestSupport extends Eventually { def validFor(description: String, until: FiniteDuration)(valid: => Boolean): Bo...
mesosphere/marathon
src/test/scala/mesosphere/WaitTestSupport.scala
Scala
apache-2.0
1,070
/* * Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> */ package java8guide.ws import org.specs2.mutable._ import play.api.test._ import play.api.mvc._ import play.api.libs.json._ import play.test.Helpers._ import play.api.test.FakeApplication import play.api.libs.json.JsObject import javaguide.tes...
jyotikamboj/container
pf-documentation/manual/working/javaGuide/main/ws/java8code/java8guide/ws/JavaWSSpec.scala
Scala
mit
1,646
package justin.db.kryo import java.io.{ByteArrayInputStream, ByteArrayOutputStream} import java.util.UUID import com.esotericsoftware.kryo.Kryo import com.esotericsoftware.kryo.io.{Input, Output} import justin.db.Data import justin.db.consistenthashing.NodeId import justin.db.vectorclocks.{Counter, VectorClock} impor...
speedcom/JustinDB
justin-core/src/test/scala/justin/db/kryo/DataSerializerTest.scala
Scala
apache-2.0
1,269
/* * 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...
svn2github/scalatest
src/main/scala/org/scalatest/words/TheSameIteratedElementsAsContainMatcher.scala
Scala
apache-2.0
1,902
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
felixmulder/scala
src/library/scala/collection/Iterator.scala
Scala
bsd-3-clause
52,307
/* * 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/Row.scala
Scala
apache-2.0
20,235
/* * 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 ...
ashokblend/incubator-carbondata
integration/spark-common/src/main/scala/org/apache/carbondata/spark/tasks/DictionaryWriterTask.scala
Scala
apache-2.0
3,435
package com.chriswk.bnet.wow.model case class Perks(perks: List[Perk]) case class Perk(guildLevel: Long, spell: Spell)
chriswk/sbnetapi
src/main/scala/com/chriswk/bnet/wow/model/Perk.scala
Scala
mit
120
import language.experimental.namedTypeArguments trait Tuple case class TCons[H, T <: Tuple](h: H, t: T) extends Tuple case object TNil extends Tuple // Type level natural numbers ------------------------------------------------- sealed trait Nat sealed trait Succ[P <: Nat] extends Nat sealed trait Zero extends Nat ...
dotty-staging/dotty
tests/run/hmap.scala
Scala
apache-2.0
2,595
/* * 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 ...
BigDaddyAG/MedBioPro
src/main/scala/de/BigDaddyAG/DataPreprocessor.scala
Scala
mit
2,766
/******************************************************************************* * Copyright 2017 Capital One Services, LLC and Bitwise, 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...
capitalone/Hydrograph
hydrograph.engine/hydrograph.engine.spark/src/main/scala/hydrograph/engine/spark/components/adapter/RunSqlAdapter.scala
Scala
apache-2.0
1,857
package monadasync package stream import java.util.concurrent.atomic.AtomicReference import scalaz.std.option.none import scalaz.stream.Process import scalaz.syntax.monad._ import scalaz.syntax.monoid._ import scalaz.syntax.std.option._ import scalaz.{ Catchable, Monad, Monoid } class ProcessStepper[F[_]: Monad: Cat...
lukiano/monadasync
stream/src/main/scala/monadasync/stream/ProcessStepper.scala
Scala
apache-2.0
1,319
/* * La Trobe University - Distributed Deep Learning System * Copyright 2014 Matthias Langer ([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.apa...
bashimao/ltudl
blaze/src/main/scala/edu/latrobe/blaze/objectives/RunGarbageCollector.scala
Scala
apache-2.0
2,439
/* * Copyright 2016 rdbc contributors * * 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...
rdbc-io/rdbc-pgsql
rdbc-pgsql-core/src/main/scala/io/rdbc/pgsql/core/internal/typecodec/sco/ScodecPgFloat4Codec.scala
Scala
apache-2.0
919
trait Reader { type Contents def read(fileName: String): Contents } import scala.io._ class StringReader extends Reader { type Contents = String def read(fileName: String) = Source.fromFile(fileName, "UTF-8").mkString } import java.awt.image._ import java.io._ import javax.imageio._ class ImageReader extend...
yeahnoob/scala-impatient-2e-code
src/ch19/sec12/Reader.scala
Scala
gpl-3.0
429
package slick.test.driver import org.junit.runner.RunWith import com.typesafe.slick.testkit.util.{StandardTestDBs, DriverTest, Testkit} @RunWith(classOf[Testkit]) class H2MemTest extends DriverTest(StandardTestDBs.H2Mem) @RunWith(classOf[Testkit]) class H2RownumTest extends DriverTest(StandardTestDBs.H2Rownum) @Run...
jkutner/slick
slick-testkit/src/test/scala/slick/test/driver/DriverTest.scala
Scala
bsd-2-clause
1,231
/* Copyright 2013 Ilya Lakhin (Илья Александрович Лахин) 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...
Eliah-Lakhin/papa-carlo
src/main/scala/name.lakhin.eliah.projects/papacarlo/lexis/Contextualizer.scala
Scala
apache-2.0
4,664
package codechicken.multipart.scalatraits import codechicken.multipart.TileMultipart import codechicken.multipart.TMultiPart import codechicken.multipart.TSlottedPart /** * Mixin implementation for TSlottedPart. * Puts parts into a slot array for quick access at the cost of memory consumption */ trait TSlottedTile...
Chicken-Bones/ForgeMultipart
src/codechicken/multipart/scalatraits/TSlottedTile.scala
Scala
lgpl-2.1
1,789
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @builder scalation.util.bld.BldMM_Array * @version 1.3 * @date Thu Sep 24 14:03:17 EDT 2015 * @see LICENSE (MIT style license file). * * @see www.programering.com/a/MDO2cjNwATI.html */ packa...
NBKlepp/fda
scalation_1.3/scalation_mathstat/src/main/scala/scalation/util/MM_ArrayI.scala
Scala
mit
7,248
/* Copyright 2009-2021 EPFL, Lausanne */ object Arithmetic { def test(a: BigInt, b: BigInt, c: BigInt): BigInt = { require(a > b && c > BigInt(0)) c + a } ensuring( _ > c + b ) }
epfl-lara/stainless
frontends/benchmarks/coq/Arith.scala
Scala
apache-2.0
195
/* ,i::, :;;;;;;; ;:,,::;. 1ft1;::;1tL t1;::;1, :;::; _____ __ ___ __ fCLff ;:: tfLLC / ___/ / |/ /____ _ _____ / /_ CLft11 :,, i1tffLi \__ \ ____ / /|_/ //...
S-Mach/aeondb
src/main/scala/s_mach/aeondb/impl/CommitBuilder.scala
Scala
apache-2.0
2,554
/** * 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...
sslavic/kafka
core/src/test/scala/unit/kafka/server/ServerGenerateBrokerIdTest.scala
Scala
apache-2.0
7,918
/* * 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/mkldnn/MaxPooling.scala
Scala
apache-2.0
4,922
//package regolic //package dpllt //package qfa // //import regolic.asts.core.Trees._ //import regolic.asts.core.Manip._ //import regolic.asts.fol.Trees._ //import regolic.asts.fol.Manip._ //import regolic.asts.theories.array.Trees._ // //import scala.collection.mutable.HashMap //import scala.collection.mutable.ListBuf...
regb/scabolic
src/main/scala/regolic/dpllt/qfa/Component.scala
Scala
mit
2,619
package io.clouderite.commons.scala.berries.string import io.clouderite.commons.scala.berries.other.Gzipper import io.clouderite.commons.scala.berries.string.StringOperations.toStringOperations import scala.util.matching.Regex import scala.util.{Failure, Success, Try} import scalaz.syntax.std.boolean._ import scala....
clouderite/scala-berries
src/main/scala/io/clouderite/commons/scala/berries/string/StringOperations.scala
Scala
mit
1,890
package drt.server.feeds.stn import java.util.TimeZone import drt.server.feeds.common.XlsExtractorUtil._ import drt.shared.Terminals.Terminal import drt.shared.api.Arrival import drt.shared.{ArrivalStatus, ForecastFeedSource, PortCode, SDateLike} import org.apache.poi.ss.usermodel.{Cell, DateUtil} import org.slf4j.{L...
UKHomeOffice/drt-scalajs-spa-exploration
server/src/main/scala/drt/server/feeds/stn/STNForecastXLSExtractor.scala
Scala
apache-2.0
4,190
package com.twitter.finagle.loadbalancer.aperture import com.twitter.finagle.util.Rng import scala.collection.mutable.ListBuffer private object Ring { /** * Returns the length of the intersection between the two ranges. * * @note this implementations assumes that the min(e0, e1) is greater * than max(b0...
mkhq/finagle
finagle-core/src/main/scala/com/twitter/finagle/loadbalancer/aperture/Ring.scala
Scala
apache-2.0
6,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 ...
prccaraujo/openwhisk
common/scala/src/main/scala/whisk/core/database/CloudantRestClient.scala
Scala
apache-2.0
1,721
/* Title: Pure/Admin/jenkins.scala Author: Makarius Support for Jenkins continuous integration service. */ package isabelle import java.net.URL import java.time.ZoneId import scala.util.matching.Regex object Jenkins { /* server API */ def root(): String = Isabelle_System.getenv_strict("ISA...
larsrh/libisabelle
modules/pide/2017/src/main/scala/Admin/jenkins.scala
Scala
apache-2.0
5,465
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
aokolnychyi/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/StateStoreRDD.scala
Scala
apache-2.0
3,120
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
gf53520/kafka
core/src/main/scala/kafka/tools/DumpLogSegments.scala
Scala
apache-2.0
23,278
/** * Copyright (c) 2012 Petr Kozelek <[email protected]> * * The full copyright and license information is presented * in the file LICENSE that was distributed with this source code. */ package mql.model.semantic import collection.mutable.HashMap trait Metadata { private[this] lazy val _metadata: collect...
footcha/MQL
src/main/scala/mql/model/semantic/Metadata.scala
Scala
bsd-3-clause
432
/* Copyright 2014 Nest Labs 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...
mighdoll/sparkle
sparkle-tests/src/test/scala/nest/sparkle/loader/TestTextTableParser.scala
Scala
apache-2.0
2,210
import sbt._ import Keys._ import scala.util.{Failure, Success} object TypeProviders { /** Slick type provider code gen */ val typeProviders = taskKey[Seq[File]]("Type provider code generation") val TypeProvidersConfig = config("codegen").hide val CompileConfig = config("compile") def codegenSettings = { ...
slick/slick
project/TypeProviders.scala
Scala
bsd-2-clause
2,828
/* * Copyright 2018 Combined Conditional Access Development, LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requir...
ccadllc/cedi-dtrace
xb3/shared/src/main/scala/com/ccadllc/cedi/dtrace/interop/xb3/XB3HeaderCodec.scala
Scala
apache-2.0
9,859
package romanowski.slower object F { def fromF = E.fromE def toF = E.toE }
romanowski/presentations
code/src/main/scala/romanowski/slower/F.scala
Scala
unlicense
81
/* * Created on 2010/05/09 * Copyright (c) 2010-2011, Wei-ju Wu. * 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, ...
logicmoo/zmpp2
zmpp-glk/src/test/scala/GlkWindowsTest.scala
Scala
bsd-3-clause
2,133