code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
/* * Copyright 2013 Krisztian Lachata * * 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...
lachatak/market-data-feed
market-data-processor-rest/src/main/scala/org/kaloz/datafeed/processorrest/infrastructure/acl/ProcessorRestConverter.scala
Scala
apache-2.0
1,213
package scaudio import scala.math.* import scutil.math.functions.* /** math utilities */ object math { // NOTE unboxed newtypes could be useful here val zeroGain = 0.0 val unitGain = 1.0 val unitDb = 0.0 val zeroFrequency = 0.0 val unitFrequency = 1.0 val secondsPerMinute = 60 //--------------------...
ritschwumm/scaudio
src/main/scala/math.scala
Scala
bsd-2-clause
1,763
package me.liamdawson.firefighter.http.resources import me.liamdawson.firefighter.http.routing.Route import scala.language.implicitConversions object dsl { implicit def routeToEnhancedRoute(route: Route): EnhancedRoute = EnhancedRoute(route) implicit def resourceRoutingToResourceRoutings(routing: ResourceRoutin...
liamdawson/firefighter
src/main/scala/me/liamdawson/firefighter/http/resources/dsl.scala
Scala
mit
596
package defw.webapp import org.scalatra._ import scalate.ScalateSupport class WebAppServlet extends ScalatraWebAppStack { get("/") { <html> <body> <h1>Hello, world!</h1> Say <a href="hello-scalate">hello to Scalate</a>. </body> </html> } /** * Accessing scalatra web serv...
takahish0306/scala-defw
webapp/src/main/scala/defw/webapp/WebAppServlet.scala
Scala
apache-2.0
650
/* * Copyright 2013 TeamNexus * * TeamNexus Licenses this file to you under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: * * http://opensource.org/licenses/mit-license.php * * Unless required by applicable law ...
crvidya/nexus-scala
src/main/scala/com/nexus/webserver/handlers/WebServerHandlerHtml.scala
Scala
mit
4,078
package reactivemongo.api.commands.bson import reactivemongo.api.BSONSerializationPack import reactivemongo.api.commands._ import reactivemongo.bson._ object BSONIsMasterCommand extends IsMasterCommand[BSONSerializationPack.type] object BSONIsMasterCommandImplicits { import BSONIsMasterCommand._ implicit object...
maxime-gautre/ReactiveMongo
driver/src/main/scala/api/commands/bson/ismaster.scala
Scala
apache-2.0
2,808
package com.github.diegopacheco.scalaplayground.caliban import ExampleData._ import ExampleService.ExampleService import caliban.{GraphQL, RootResolver} import caliban.GraphQL.graphQL import caliban.schema.Annotations.{GQLDeprecated, GQLDescription} import caliban.schema.GenericSchema import caliban.wrappers.ApolloTr...
diegopacheco/scala-playground
caliban-graphql-fun/src/main/scala/com/github/diegopacheco/scalaplayground/caliban/ExampleApi.scala
Scala
unlicense
2,194
/////////////////////////////////////////////////////////////////////////////// // CellDist.scala // // Copyright (C) 2010-2014 Ben Wing, The University of Texas at Austin // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // Yo...
utcompling/textgrounder
src/main/scala/opennlp/textgrounder/gridlocate/CellDist.scala
Scala
apache-2.0
5,454
/* * 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
examples/src/test/scala/org/scalatest/examples/refspec/composingbeforeandaftereach/ExampleSpec.scala
Scala
apache-2.0
1,798
/* * 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 ...
metamx/spark
core/src/test/scala/org/apache/spark/ExecutorAllocationManagerSuite.scala
Scala
apache-2.0
48,173
package io.gustavoamigo.quill.pgsql.encoding.jodatime import java.sql.{Types, PreparedStatement} import io.getquill.source.jdbc.JdbcSource import org.joda.time._ trait Encoders { this: JdbcSource[_, _] => import Formatters._ private def genericEncoder[T](valueToString: (T => String) = (r: T) => r.toString): ...
gustavoamigo/quill-pgsql
src/main/scala/io/gustavoamigo/quill/pgsql/encoding/jodatime/Encoders.scala
Scala
apache-2.0
886
package sri.relay import sri.universal.router.UniversalRouterComponentJS import scala.scalajs.js.annotation.ScalaJSDefined @ScalaJSDefined abstract class UniversalRouterRelayComponent[P <: RelayComponentProps, S] extends UniversalRouterComponentJS[P, S] {}
chandu0101/sri-relay
relay/src/main/scala/sri/relay/UniversalRouterRelayComponent.scala
Scala
apache-2.0
260
package com.gigaspaces.csvwriter import scala.util.Random /** * A mixin for generating random strings. */ trait RandomStrings { private val rand = new Random(System.currentTimeMillis()) /** * @return an alphabetic character */ def randChar(): Character = { (rand.nextInt(26) + 65).toChar } ...
jasonnerothin/gs-csvwriter
src/main/scala/com/gigaspaces/csvwriter/RandomStrings.scala
Scala
apache-2.0
609
package org.elasticmq.performance import com.amazonaws.services.sqs.AmazonSQSClient import com.amazonaws.auth.BasicAWSCredentials import com.amazonaws.services.sqs.model.{CreateQueueRequest, DeleteMessageRequest, ReceiveMessageRequest, SendMessageRequest} import org.elasticmq.rest.sqs.{SQSRestServer, SQSRestServerBuil...
everyonce/elasticmq
performance-tests/src/test/scala/org/elasticmq/performance/LocalPerformanceTest.scala
Scala
apache-2.0
5,598
/* * Copyright (c) 2014-2021 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
monix/monix
benchmarks/shared/src/main/scala/monix/benchmarks/TaskAttemptBenchmark.scala
Scala
apache-2.0
2,209
/*********************************************************************** * Copyright (c) 2013-2016 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is ...
MutahirKazmi/geomesa
geomesa-process/src/main/scala/org/locationtech/geomesa/process/ProcessFactory.scala
Scala
apache-2.0
1,685
package com.fustigatedcat.heystk.agent.common.normalization import akka.actor.{ActorRef, Actor} import com.fustigatedcat.heystk.common.normalization.Log import com.typesafe.config.Config import org.slf4j.LoggerFactory class NormalizerActor(config : Config, system : NormalizerSystem, engine : ActorRef) extends Actor {...
fustigatedcat/heystk
agent-common/src/main/scala/com/fustigatedcat/heystk/agent/common/normalization/NormalizerActor.scala
Scala
gpl-3.0
602
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package java.lang import scala.annotation.{sw...
gzm0/scala-js
javalanglib/src/main/scala/java/lang/_String.scala
Scala
apache-2.0
26,063
/* * 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 ...
guoxiaolongzte/spark
sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala
Scala
apache-2.0
39,062
/* * (C) Copyright IBM Corp. 2015 * * 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 ...
ElfoLiNk/spark-bench
MatrixFactorization/src/main/scala/MFDataGenerator.scala
Scala
apache-2.0
5,643
package core import org.scalatest.{FunSpec, Matchers} class UtilSpec extends FunSpec with Matchers { it("namedParametersInPath") { Util.namedParametersInPath("/users") should be(Seq.empty) Util.namedParametersInPath("/users/:guid") should be(Seq("guid")) Util.namedParametersInPath("/users/:guid.json") ...
apicollective/apibuilder
core/src/test/scala/core/UtilSpec.scala
Scala
mit
1,448
package clock /* +1>> This source code is licensed as GPLv3 if not stated otherwise. >> NO responsibility taken for ANY harm, damage done >> to you, your data, animals, etc. >> +2>> >> Last modified: 2013-10-29 :: 20:37 >> Origin: patterns >> +3>> >> Copyright (c) 2013: >> ...
lodsb/patterns
src/main/scala/pattern/Clock.scala
Scala
gpl-3.0
4,928
/* Copyright 2014, 2015 Richard Wiedenhöft <richard@wiedenhoeft.xyz> * * 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...
Richard-W/scalacrypt
src/main/scala/Exceptions.scala
Scala
apache-2.0
2,108
/////////////////////////////////////////////////////////////////////////////// // FeatureVector.scala // // Copyright (C) 2012-2014 Ben Wing, The University of Texas at Austin // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. /...
utcompling/textgrounder
src/main/scala/opennlp/textgrounder/learning/FeatureVector.scala
Scala
apache-2.0
35,858
package skinny.orm.feature import scalikejdbc._ import skinny.orm.exception.OptimisticLockException import org.joda.time.DateTime import org.slf4j.LoggerFactory /** * Optimistic lock with timestamp. * * @tparam Entity entity */ trait OptimisticLockWithTimestampFeature[Entity] extends OptimisticLockWithTimesta...
seratch/skinny-framework
orm/src/main/scala/skinny/orm/feature/OptimisticLockWithTimestampFeature.scala
Scala
mit
4,744
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/ct-calculations
src/main/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/AC161.scala
Scala
apache-2.0
1,139
package org.pico.disposal object Noop extends (() => Unit) { override def apply(): Unit = () }
pico-works/pico-disposal
pico-disposal/src/main/scala/org/pico/disposal/Noop.scala
Scala
bsd-3-clause
98
/** * Copyright (C) 2016-2017 Lightbend Inc. <http://www.lightbend.com> */ package akka /** * Typically used together with `Future` to signal completion * but there is no actual value completed. More clearly signals intent * than `Unit` and is available both from Scala and Java (which `Unit` is not). */ sealed a...
rorygraves/perf_tester
corpus/akka/akka-actor/src/main/scala/akka/Done.scala
Scala
apache-2.0
457
package ozmi.lambda_core.sql import org.kiama.util.ParserUtilities /** * Created by attila on 4/20/2015. */ object SqlParser extends ParserUtilities { def keyword = keywords ("""[^a-zA-Z0-9_]""".r, List ("SELECT")) def literal : PackratParser[Literal] = decimalLit | integerLit | stringLit de...
ozmi/lambda_core
src/main/scala/ozmi/lambda_core/sql/SqlParser.scala
Scala
mit
3,180
package org.romeo.loveletter.cli.Main import org.romeo.loveletter.game.GameManager import org.romeo.loveletter.persistence.MemoryDataStore import scala.io.StdIn import scala.util.Random /** * Created by tylerromeo on 1/13/17. */ object Main extends App { val gameId = "cli" val gameManager = new GameManager(n...
tylerjromeo/love-letter-slack-commands
src/main/scala-2.11/org/romeo/loveletter/cli/Main/Main.scala
Scala
mit
2,628
package com.sunway.screen.gamescreen import com.github.dunnololda.scage.support.Vec /** * Created by Mr_RexZ on 12/6/2016. */ trait MoveableObject { protected var speed = 5.0f protected var rotation = 0.0f def step = Vec(-0.4f * speed * math.sin(math.toRadians(rotation)).toFloat, 0.4f * speed * math.co...
MrRexZ/DistributedSystemAssignment2
src/main/scala/com/sunway/screen/gamescreen/MoveableObject.scala
Scala
mit
358
package com.sksamuel.elastic4s import org.slf4j.{Logger, LoggerFactory} import scala.concurrent.duration.{Duration, _} import scala.language.higherKinds /** * An [[ElasticClient]] is used to execute HTTP requests against an ElasticSearch cluster. * This class delegates the actual HTTP calls to an instance of [[H...
sksamuel/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/ElasticClient.scala
Scala
apache-2.0
2,560
/* * Copyright (c) 2017 Magomed Abdurakhmanov, Hypertino * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * */ package com.hypertino.facade.filters.annotated impo...
hypertino/hyperfacade
src/main/scala/com/hypertino/facade/filters/annotated/SetFieldRequestFilter.scala
Scala
mpl-2.0
1,714
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/play-auditing
src-common/main/scala/uk/gov/hmrc/play/audit/model/Audit.scala
Scala
apache-2.0
6,176
/* * Copyright 2017 Datamountaineer. * * 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...
datamountaineer/stream-reactor
kafka-connect-coap/src/main/scala/com/datamountaineer/streamreactor/connect/coap/source/CoapReaderFactory.scala
Scala
apache-2.0
2,894
package akka.persistence.jdbc.query import akka.persistence.query.{ EventEnvelope, NoOffset, Sequence } import akka.pattern._ import scala.concurrent.duration._ abstract class LogicalDeleteQueryTest(config: String) extends QueryTestSpec(config) { implicit val askTimeout = 500.millis it should "return logically ...
gavares/akka-persistence-jdbc
src/test/scala/akka/persistence/jdbc/query/LogicalDeleteQueryTest.scala
Scala
apache-2.0
4,387
/* * Copyright 2018 Vladimir Konstantinov * * 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 ...
oxy-development/korro
src/main/scala/com/github/illfaku/korro/internal/common/HttpActor.scala
Scala
apache-2.0
874
package controllers import entities.{AuthToken, UserId} import scala.util.{Success, Failure} import play.api.mvc.{Controller, RequestHeader} import scala.concurrent.Future import utils.Utils._ import scala.util.Success import scala.util.Failure import scala.Some import service.RedisService import play.api.libs.concurr...
alanktwong/typesafe_activators
redis-twitter-clone/app/controllers/Api.scala
Scala
mit
1,433
package com.siftlogic.apps import org.apache.spark.sql.SparkSession object CachingExampleSparkApp { def main(args: Array[String]): Unit = { implicit val sparkSession = SparkSession.builder().appName("Caching Example").master("local").getOrCreate() import sparkSession.implicits._ val words = sparkSessi...
przemek1990/introduction-to-spark
src/main/scala/com/siftlogic/apps/CachingExampleSparkApp.scala
Scala
gpl-3.0
786
package io.iohk.ethereum.testing import akka.actor.ActorRef import akka.testkit.TestActor.AutoPilot object ActorsTesting { def simpleAutoPilot(makeResponse: PartialFunction[Any, Any]): AutoPilot = { new AutoPilot { def run(sender: ActorRef, msg: Any) = { val response = makeResponse.lift(msg) ...
input-output-hk/etc-client
src/test/scala/io/iohk/ethereum/testing/ActorsTesting.scala
Scala
mit
450
package controllers import play.api.mvc._, Results._ import lila.app._ import views._ object Page extends LilaController { private def page(bookmark: String) = Open { implicit ctx => OptionOk(Prismic oneShotBookmark bookmark) { case (doc, resolver) => views.html.site.page(doc, resolver) } } def...
r0k3/lila
app/controllers/Page.scala
Scala
mit
562
/* * Copyright (c) 2014. Webtrends (http://www.webtrends.com) * @author cuthbertm on 11/20/14 12:23 PM */ package com.webtrends.harness.component.spotifyapi import akka.actor.ActorRef import com.webtrends.harness.component.Component trait SpotifyAPI { this: Component => var SpotifyAPIRef:Option[ActorRef] = None...
Crashfreak/SpotifyAPI
src/main/scala/com/webtrends/harness/component/spotifyapi/SpotifyAPI.scala
Scala
apache-2.0
537
package breeze.linalg import breeze.generic.UFunc import scala.reflect.ClassTag import breeze.storage.DefaultArrayValue /** * returns a vector along the diagonal of v. * Requires a square matrix? * @param m the matrix * @tparam V */ object diag extends UFunc with diagLowPrio2 { implicit def diagDVDMImpl[V:Cla...
wavelets/breeze
src/main/scala/breeze/linalg/diag.scala
Scala
apache-2.0
1,016
package mesosphere.marathon.state import org.apache.mesos.{ Protos => mesos } case class Parameter( key: String, value: String) { def toProto: mesos.Parameter = mesos.Parameter.newBuilder .setKey(key) .setValue(value) .build } object Parameter { def apply(proto: mesos.Parameter): P...
timcharper/marathon
src/main/scala/mesosphere/marathon/state/Parameter.scala
Scala
apache-2.0
396
package unfiltered.request import org.scalatest.{Matchers, WordSpec} import unfiltered.response._ import test.AgentStrings class AgentSpecJetty extends AgentSpec with unfiltered.scalatest.jetty.Planned class AgentSpecNetty extends AgentSpec with unfiltered.scalatest.netty.Planned trait AgentSpec extends WordSpec wi...
peel/unfiltered
agents/src/test/scala/AgentSpec.scala
Scala
mit
1,709
package chat.tox.antox.wrapper import chat.tox.antox.utils.Hex object ToxAddress { val MAX_ADDRESS_LENGTH = 76 def isAddressValid(address: String): Boolean = { if (address.length != MAX_ADDRESS_LENGTH || !address.matches("^[0-9A-F]+$")) { return false } var x = 0 try { var i = 0 ...
wiiam/Antox
app/src/main/scala/chat/tox/antox/wrapper/ToxAddress.scala
Scala
gpl-3.0
1,201
package x7c1.linen.modern.display.unread import android.support.v7.widget.RecyclerView.Adapter import android.view.ViewGroup import x7c1.linen.glue.res.layout.{MenuRow, MenuRowLabel, MenuRowSeparator, MenuRowTitle} import x7c1.wheat.macros.logger.Log import x7c1.wheat.modern.menu.{MenuItems, MenuText} class DrawerMen...
x7c1/Linen
linen-modern/src/main/scala/x7c1/linen/modern/display/unread/DrawerMenuRowAdapter.scala
Scala
mit
1,140
package helper.services import scala.concurrent.Future import org.elasticsearch.indices.IndexAlreadyExistsException import org.elasticsearch.common.xcontent.XContentFactory._ import esclient.queries.{GetFillableIndexQuery, CreateFillableLogIndexQuery, DeleteFillableIndexQuery, IndexDocumentQuery} import esclient.Elast...
MeiSign/Fillable
app/helper/services/LogIndexService.scala
Scala
apache-2.0
1,806
/*initLocally*/ class Test { def foo() { /*start*/1/*end*/ } } /* /*initLocally*/ class Test { var i: Int = _ def foo() { /*start*/ i = 1 i/*end*/ } } */
triggerNZ/intellij-scala
testdata/introduceField/SimpleFromMethodInitLocally.scala
Scala
apache-2.0
176
package org.jetbrains.plugins.scala package lang package surroundWith package surrounders package expression /** * author: Dmitry Krasilschikov */ import com.intellij.lang.ASTNode import com.intellij.openapi.util.TextRange import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.lang.psi.api.expr.ScP...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/surroundWith/surrounders/expression/ScalaWithWhileSurrounder.scala
Scala
apache-2.0
1,362
package core.api import com.lvxingpai.model.geo.GeoEntity import com.lvxingpai.model.marketplace.product.Commodity import com.lvxingpai.model.marketplace.seller.Seller import core.model.misc.ApplySeller import org.bson.types.ObjectId import org.mongodb.morphia.Datastore import scala.collection.JavaConversions._ impor...
Lvxingpai/Hanse
app/core/api/SellerAPI.scala
Scala
apache-2.0
3,093
package com.yoohaemin.hufsclassroom.http import cats.effect.IO import org.http4s.EntityBody object ResponseBodyUtils { implicit class ByteVector2String(body: EntityBody[IO]) { def asString: String = { val array = body.compile.toVector.unsafeRunSync().toArray new String(array.map(_.toChar)) } ...
yoo-haemin/hufs-classroom
service/test/src/com/yoohaemin/hufsclassroom/http/ResponseBodyUtils.scala
Scala
agpl-3.0
325
/** * 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...
piavlo/operations-debs-kafka
perf/src/main/scala/kafka/perf/ProducerPerformance.scala
Scala
apache-2.0
10,020
import akka.actor._ case class SpecialOrder(number : Integer, customer : ActorRef) class SpecialCustomer(loadBalancer : ActorRef) extends Actor { var currentOrder = 1 def receive = { case Food => println(self.path.name + ": Thanks for that.") currentOrder += 1 lo...
adijo/parallelized-workflow-simulation
src/main/scala/MultipleWaiters.scala
Scala
apache-2.0
1,977
package com.github.jmcs.domain.unaryexpression import com.github.jmcs.domain.Expression import com.github.jmcs.domain.UnaryExpression /** * Created with IntelliJ IDEA. * User: Marcelo * Date: 30/07/13 * Time: 22:54 * To change this template use File | Settings | File Templates. */ class BinaryLogari...
MarceloPortilho/jmc-scala
src/main/java/com/github/jmcs/domain/unaryexpression/BinaryLogarithmExpression.scala
Scala
apache-2.0
581
/* * Copyright 2013 Maurício Linhares * * Maurício Linhares licenses this file to you 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 ...
outbrain/postgresql-async
db-async-common/src/main/scala/com/github/mauricio/async/db/ResultSet.scala
Scala
apache-2.0
1,089
/* * 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 ...
rikima/spark
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/bindings/RDriverFeatureStep.scala
Scala
apache-2.0
2,479
/* * 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 ...
techaddict/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala
Scala
apache-2.0
71,591
/** * Original work: Swagger Codegen (https://github.com/swagger-api/swagger-codegen) * Copyright 2016 Swagger (http://swagger.io) * * Derivative work: Swagger Codegen - Play Scala (https://github.com/mohiva/swagger-codegen-play-scala) * Modifications Copyright 2016 Mohiva Organisation (license at mohiva dot com) ...
akkie/swagger-codegen-play-scala
clientstub/src/main/scala/com/mohiva/swagger/codegen/core/ApiImplicits.scala
Scala
apache-2.0
11,120
package play.api import play.api.mvc._ /** * A Play plugin. * * You can define a Play plugin this way: * {{{ * class MyPlugin(app: Application) extends Plugin * }}} * * The plugin class must be declared in a play.plugins file available in the classpath root: * {{{ * 1000:myapp.MyPlugin * }}} * The associa...
noel-yap/setter-for-catan
play-2.1.1/framework/src/play/src/main/scala/play/api/Plugins.scala
Scala
apache-2.0
595
package org.scalamu.report import org.scalamu.core.coverage.Statement import org.scalamu.core.api.{SourceInfo, TestedMutant} import org.scalamu.core.testapi.AbstractTestSuite import scala.io.Source import scala.collection.{Map, Set, SortedSet} final case class SourceFileSummary( name: String, lines: Seq[Line], ...
sugakandrey/scalamu
report/src/main/scala/org/scalamu/report/SourceFileSummary.scala
Scala
gpl-3.0
1,464
/* * Distributed as part of Scalala, a linear algebra library. * * Copyright (C) 2008- Daniel Ramage * * 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 ...
scalala/Scalala
src/main/scala/scalala/tensor/Tensor2.scala
Scala
lgpl-2.1
11,090
package sample.cluster.transformation //#messages final case class TransformationJob(text: String) final case class TransformationResult(text: String) final case class JobFailed(reason: String, job: TransformationJob) case object BackendRegistration //#messages
jastice/intellij-scala
scala/scala-impl/testdata/localProjects/akka-samples/src/main/scala/sample/cluster/transformation/TransformationMessages.scala
Scala
apache-2.0
263
package beam.agentsim.infrastructure case class ParkingInquiryResponse(stall: ParkingStall, requestId: Int)
colinsheppard/beam
src/main/scala/beam/agentsim/infrastructure/ParkingInquiryResponse.scala
Scala
gpl-3.0
109
package svstm.vbox class VBoxBody[+A](val value: A, val version: Int, val next: VBoxBody[A]) { def this(v0: A) = this(v0, 0, null) def getBody(maxVersion: Int) : VBoxBody[A] = if (version > maxVersion) next.getBody(maxVersion) else this }
fcristovao/SVSTM
src/main/scala/svstm/vbox/VBoxBody.scala
Scala
apache-2.0
259
package pl.umk.bugclassification.scmparser.git.parsers import org.slf4j.LoggerFactory import pl.umk.bugclassification.scmparser.git.parsers.results.Commit import scala.util.parsing.combinator.RegexParsers object CommitParser extends RegexParsers with CommonParser { val log = LoggerFactory.getLogger(CommitParser.ge...
mfejzer/CommitClassification
src/main/scala/pl/umk/bugclassification/scmparser/git/parsers/CommitParser.scala
Scala
bsd-3-clause
1,754
package inverse_macros package object lazys { @inline final def defer[A](body: => A): A@lzy = throw LazyContext(() => body) }
hiroshi-cl/InverseMacros
inverse_macros_libraries/src/main/scala/inverse_macros/lazys/package.scala
Scala
bsd-2-clause
129
package com.scalaAsm.x86 package Instructions package General // Description: Convert Word to Doubleword // Category: general/conver trait CWD extends InstructionDefinition { val mnemonic = "CWD" } object CWD extends ZeroOperands[CWD] with CWDImpl trait CWDImpl extends CWD { implicit object _0 extends NoOp{ ...
bdwashbu/scala-x86-inst
src/main/scala/com/scalaAsm/x86/Instructions/General/CWD.scala
Scala
apache-2.0
403
/* * Copyright (c) 2015, Nightfall Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of conditions a...
Nightfall/Instrumentality
mc194/src/main/scala/moe/nightfall/instrumentality/mc194/InstanceCache.scala
Scala
bsd-2-clause
6,699
/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.14.85 * apibuilder 0.14.93 app.apibuilder.io/apicollective/apibuilder-generator/latest/anorm_2_8_parsers */ package io.apibuilder.generator.v0.anorm.conversions { import anorm.{Column, MetaDataItem, TypeDoesNotMatch} import play.ap...
mbryzek/apidoc
api/app/generated/ApicollectiveApibuilderGeneratorV0Conversions.scala
Scala
mit
7,877
package test.roundeights.hasher import org.specs2.mutable._ import com.roundeights.hasher.{Algo, Hasher} class AlgoTest extends Specification { def hashTest ( algo: Algo, data: TestData, hash: String ) = { "Using " + algo + ", the apply methods on the Algo object" in { "Hash a String" in { ...
Nycto/Hasher
src/test/scala/hasher/AlgoTest.scala
Scala
mit
4,977
package chat.tox.antox.av import chat.tox.antox.utils.AntoxLog import chat.tox.antox.wrapper.{CallNumber, ContactKey} import rx.lang.scala.JavaConversions._ import rx.lang.scala.subjects.BehaviorSubject import rx.lang.scala.{Observable, Subject} class CallManager { private val callsSubject = BehaviorSubject[Map[Cal...
subliun/Antox
app/src/main/scala/chat/tox/antox/av/CallManager.scala
Scala
gpl-3.0
2,218
package org.jetbrains.plugins.scala.debugger.evaluation.evaluator import com.intellij.debugger.engine.evaluation.expression.{Evaluator, Modifier} import com.intellij.debugger.engine.evaluation.{EvaluateExceptionUtil, EvaluationContextImpl} import com.sun.jdi.BooleanValue /** * User: Alefas * Date: 19.10.11 */ cla...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/debugger/evaluation/evaluator/ScalaIfEvaluator.scala
Scala
apache-2.0
1,273
package org.openurp.edu.eams.teach.lesson.task.web.action import org.openurp.base.Semester import org.openurp.edu.base.Project import org.openurp.edu.base.Student class TeachTaskStdSearchAction extends TeachTaskSearchAction { def index(): String = { val std = getLoginStudent if (null == std) { retu...
openurp/edu-eams-webapp
schedule/src/main/scala/org/openurp/edu/eams/teach/lesson/task/web/action/TeachTaskStdSearchAction.scala
Scala
gpl-3.0
1,034
/* * 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 ...
shaoxuan-wang/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/nodes/physical/batch/BatchExecValues.scala
Scala
apache-2.0
3,167
/* * Copyright 2017-2020 Aleksey Fomkin * * 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...
fomkin/korolev
modules/korolev/src/main/scala/korolev/internal/Frontend.scala
Scala
apache-2.0
14,816
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author Arash Fard, Usman Nisar, Ayushi Jain, Aravind Kalimurthy, John Miller * @version 1.3 * @date Thu Nov 25 11:28:31 EDT 2013 * @see LICENSE (MIT style license file). * * `MGraph` Strict Simulation Using Mutable Set...
scalation/fda
scalation_1.3/scalation_modeling/src/main/scala/scalation/graphalytics/mutable/MStrictSim.scala
Scala
mit
15,158
package com.lorandszakacs.util.mongodb import com.lorandszakacs.util.effects._ import com.lorandszakacs.util.math.Identifier import org.scalatest._ import org.scalatest.flatspec.FixtureAnyFlatSpec /** * * N.B. * Known to fail in ``sbt``. But in Intellij, they run. And normal application start does find the conf...
lorandszakacs/sg-downloader
util/src/test/scala/com/lorandszakacs/util/mongodb/MongoCollectionTest.scala
Scala
apache-2.0
6,958
package com.sksamuel.elastic4s.examples import com.sksamuel.elastic4s.ElasticDsl import com.sksamuel.elastic4s.source.Indexable // examples of the count API in dot notation class UpdateDotDsl extends ElasticDsl { // update a doc by id in a given index / type.specifying a replacement doc update("id").in("index" /...
l15k4/elastic4s
elastic4s-examples/src/main/scala/com/sksamuel/elastic4s/examples/UpdateDotDsl.scala
Scala
apache-2.0
1,417
/* Copyright (C) 2008-2014 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
hlin117/factorie
src/main/scala/cc/factorie/optimize/LBFGS.scala
Scala
apache-2.0
9,206
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
felixmulder/scala
src/library/scala/sys/process/ProcessBuilder.scala
Scala
bsd-3-clause
16,674
/* * 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 ...
dubeejw/openwhisk-package-kafka
tests/src/test/scala/system/stress/StressTest.scala
Scala
apache-2.0
4,703
package adt.bson.mongo.bulk import adt.bson.mongo.WriteError import adt.bson.{BsonObject, BsonValue} import scala.language.implicitConversions /** * Avoids name collision with the [[WriteRequest]] Scala version if both are imported. */ object JavaBulkModels extends JavaBulkModels trait JavaBulkModels { type Java...
jeffmay/bson-adt
bson-adt-mongo3-async/src/main/scala/adt/bson/mongo/bulk/JavaBulkModels.scala
Scala
apache-2.0
2,551
package structures package laws trait MonadFilterLaws[F[_]] extends MonadLaws[F] { implicit val typeClass: MonadFilter[F] import MonadFilter.ops._, typeClass.empty def monadFilterLeftDistributivity[A, B](f: A => F[B]): IsEqual[F[B]] = empty[A].flatMap(f) =?= empty[B] def monadFilterRightDistributivity[...
mpilquist/Structures
laws/src/main/scala/structures/laws/MonadFilterLaws.scala
Scala
bsd-3-clause
543
/* * 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
robustj/src/main/scala/typechecker/exceptioncheckers.scala
Scala
bsd-3-clause
20,118
package com.twitter.finagle.kestrel.protocol import org.jboss.netty.buffer.ChannelBuffer import com.twitter.util.{Time, Duration} sealed abstract class Command sealed abstract class GetCommand extends Command { val queueName: ChannelBuffer val timeout: Option[Duration] } case class Get(val queueName: ChannelBuf...
enachb/finagle_2.9_durgh
finagle-kestrel/src/main/scala/com/twitter/finagle/kestrel/protocol/Command.scala
Scala
apache-2.0
2,077
package ozmi.lambda_core package lib import org.scalacheck.Prop.forAll import org.scalacheck.{Gen, Properties} object CollSpec extends Properties("Coll") { import ozmi.lambda_core.lib.Coll._ import ozmi.lambda_core.lib.Num._ import ozmi.lambda_core.lib.Ord._ lazy val saneBigDecimal = ...
ozmi/lambda_core
src/test/scala/ozmi/lambda_core/lib/CollSpec.scala
Scala
mit
1,682
package org.jetbrains.plugins.scala package codeInspection package unusedInspections import com.intellij.codeHighlighting._ import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.psi.PsiFile import org.jetbrains.plugins.scala.lang.psi.api.ScalaFile class ScalaUnusedL...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/codeInspection/unusedInspections/ScalaUnusedLocalSymbolPassFactory.scala
Scala
apache-2.0
908
/* Copyright 2013 Twitter, 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 agreed to in writing, software...
sengt/summingbird-batch
summingbird-storm/src/test/scala/com/twitter/summingbird/storm/StormLaws.scala
Scala
apache-2.0
15,176
package com.github.agourlay.cornichon.util import io.circe.{ Encoder, Json, JsonObject } import scala.concurrent.duration.FiniteDuration object CirceUtil { // taken from https://github.com/circe/circe/pull/978 implicit final val finiteDurationEncoder: Encoder[FiniteDuration] = new Encoder[FiniteDuration] { f...
agourlay/cornichon
cornichon-core/src/main/scala/com/github/agourlay/cornichon/util/CirceUtil.scala
Scala
apache-2.0
513
package im.actor.api import treehugger.forest._, definitions._ import treehuggerDSL._ trait DebugHelpersTrees { protected val debugTree: Tree = OBJECTDEF("Debug") withFlags PRIVATEWITHIN("api") := BLOCK( IMPORT("com.typesafe.config.ConfigFactory"), DEF("isDebug", BooleanClass) := REF("ConfigFactory")...
actorapp/sbt-actor-api
src/main/scala/im/actor/api/DebugHelpersTrees.scala
Scala
mit
379
/* utils-pbts.scala Some property-based test code for utils */ package scalaglm import breeze.linalg._ import breeze.numerics._ import math.abs import org.scalatest._ import flatspec._ import matchers._ import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks class UtilsPbts extends AnyFlatSpec with shou...
darrenjw/scala-glm
src/test/scala/utils-pbts.scala
Scala
apache-2.0
720
package org.sisioh.aws4s.cfn.model import com.amazonaws.services.cloudformation.model.CancelUpdateStackRequest import org.sisioh.aws4s.PimpedType object CancelUpdateStackRequestFactory { def create(): CancelUpdateStackRequest = new CancelUpdateStackRequest() } class RichCancelUpdateStackRequest(val underlying: C...
everpeace/aws4s
aws4s-cfn/src/main/scala/org/sisioh/aws4s/cfn/model/RichCancelUpdateStackRequest.scala
Scala
mit
694
package com.twitter.finagle.liveness import com.twitter.app.GlobalFlag import com.twitter.conversions.time._ import com.twitter.finagle.{Status, Stack} import com.twitter.finagle.stats.{NullStatsReceiver, StatsReceiver} import com.twitter.finagle.util.parsers.{double, duration, int, list} import com.twitter.util.{Dura...
koshelev/finagle
finagle-core/src/main/scala/com/twitter/finagle/liveness/FailureDetector.scala
Scala
apache-2.0
5,968
/*********************************************************************** * Copyright (c) 2013-2018 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...
jahhulbert-ccri/geomesa
geomesa-lambda/geomesa-lambda-tools/src/main/scala/org/locationtech/geomesa/lambda/tools/data/LambdaCreateSchemaCommand.scala
Scala
apache-2.0
1,111
package exceptions class BadBindingException(val msg: String) extends RuntimeException(msg)
j-c-w/mlc
src/main/scala/exceptions/BadBindingException.scala
Scala
gpl-3.0
93
package com.goyeau.kubernetes.client.operation import cats.Applicative import cats.implicits._ import com.goyeau.kubernetes.client.KubernetesClient import com.goyeau.kubernetes.client.Utils.retry import io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta import munit.FunSuite import org.http4s.Status trait CreatableTests...
joan38/kubernetes-client
kubernetes-client/test/src/com/goyeau/kubernetes/client/operation/CreatableTests.scala
Scala
apache-2.0
5,040
package fr.renoux.gaston.util object TupleImplicits { @inline final implicit class CoupleOps[A, B](val wrapped: (A, B)) extends AnyVal { @inline def map1[C](f: A => C): (C, B) = (f(wrapped._1), wrapped._2) @inline def map2[C](f: B => C): (A, C) = (wrapped._1, f(wrapped._2)) } }
gaelrenoux/gaston
src/main/scala/fr/renoux/gaston/util/TupleImplicits.scala
Scala
apache-2.0
296
/* Scala.js compiler * Copyright 2013 LAMP/EPFL * @author Sébastien Doeraene */ package org.scalajs.core.compiler import scala.tools.nsc._ /** Core definitions for Scala.js * * @author Sébastien Doeraene */ trait JSDefinitions { self: JSGlobalAddons => import global._ // scalastyle:off line.size.limit ...
xuwei-k/scala-js
compiler/src/main/scala/org/scalajs/core/compiler/JSDefinitions.scala
Scala
bsd-3-clause
9,416
/* * Copyright 2010 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
lift/lift
framework/lift-base/lift-util/src/main/scala/net/liftweb/util/Wiring.scala
Scala
apache-2.0
7,063