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 2012 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 distr...
nevillelyh/algebird
algebird-core/src/main/scala/com/twitter/algebird/mutable/PriorityQueueMonoid.scala
Scala
apache-2.0
2,425
package sexamples.simulation.pingpongglobal import java.net.{InetAddress, UnknownHostException} import java.util.Map import se.sics.kompics.config.{Conversions, Converter} object TAddressConverter extends Converter[TAddress] { override def convert(o: AnyRef): TAddress = { o match { case m: Map[String, An...
kompics/kompics-scala
docs/src/main/scala/sexamples/simulation/pingpongglobal/TAddressConverter.scala
Scala
gpl-2.0
869
package repository.index import scala.concurrent.duration.Duration case class IndexOperationDelay(duration: Duration)
timothygordon32/reactive-todolist
app/repository/index/IndexOperationDelay.scala
Scala
mit
120
// Copyright 2010 Twitter, Inc. package com.twitter.concurrent import java.util.concurrent.ConcurrentSkipListMap class ConcurrentMultiMap[K <% Ordered[K], V <% Ordered[V]] { class Container(k: K, v: Option[V]) extends Tuple2[K, Option[V]](k, v) with Comparable[Container] { def key = _1 def value = ...
mccv/util
src/main/scala/com/twitter/concurrent/ConcurrentMultiMap.scala
Scala
apache-2.0
1,258
// Copyright (C) 2011 Dmitri Nikulin // // This file is part of Vijil. // // Vijil is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later ve...
dnikulin/vijil
src/test/scala/com/dnikulin/vijil/text/TestTextSpan.scala
Scala
agpl-3.0
2,918
import scala.reflect.classTag object Test extends App { println(classTag[Int]) println(classTag[Array[Int]]) println(classTag[Array[Array[Int]]]) println(classTag[Array[Array[Array[Int]]]]) println(classTag[Array[Array[Array[Array[Int]]]]]) }
scala/scala
test/files/run/classtags_multi.scala
Scala
apache-2.0
254
package com.optrak.testakka.simple.impl import com.lightbend.lagom.internal.client.CircuitBreakerMetricsProviderImpl import com.lightbend.lagom.scaladsl.api.ServiceLocator import com.lightbend.lagom.scaladsl.api.ServiceLocator.NoServiceLocator import com.lightbend.lagom.scaladsl.persistence.cassandra.CassandraPersiste...
Optrak/lagom-testbed
test-akka-integration/akka-model/simple/impl/src/main/scala/com/optrak/testakka/simple/impl/SimpleServiceLoader.scala
Scala
apache-2.0
2,043
package bank5 import akka.actor.{ ActorSystem, Actor, Props, ActorRef } import akka.bita.RandomScheduleHelper import akka.bita.pattern.Patterns._ import akka.util.duration._ import org.scalatest._ import akka.testkit.TestProbe import util.BitaTests class BankSpec extends BitaTests { // feel free to change these...
Tjoene/thesis
benchmark/src/test/scala/bank5/BankSpec.scala
Scala
gpl-2.0
1,991
/* * 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 ...
abhishek-ch/incubator-ignite
modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/events/VisorEventsCommandSpec.scala
Scala
apache-2.0
1,919
/* * -╥⌐⌐⌐⌐ -⌐⌐⌐⌐- * ≡╢░░░░⌐\\░░░φ ╓╝░░░░⌐░░░░╪╕ * ╣╬░░` `░░░╢┘ φ▒╣╬╝╜ ░░╢╣Q * ║╣╬░⌐ ` ╤▒▒▒Å` ║╢╬╣ * ╚╣╬░⌐ ╔▒▒▒▒`«╕ ╢╢╣▒ * ╫╬░░╖ .░ ╙╨╨ ╣╣╬░φ ╓φ░╢╢Å * ╙╢░░░░⌐"░░░╜ ╙Å░░░░⌐░░░░╝` * ``˚¬ ⌐ ˚˚⌐´ * * ...
Flipkart/connekt
receptors/src/main/scala/com/flipkart/connekt/receptors/service/AuthenticationService.scala
Scala
mit
4,507
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package play.api.libs.concurrent import akka.Done import akka.actor.setup.ActorSystemSetup import akka.actor.setup.Setup import akka.actor.typed.Scheduler import akka.actor.Actor import akka.actor.ActorContext import akka.actor.ActorRef import akka.ac...
wegtam/playframework
core/play/src/main/scala/play/api/libs/concurrent/Akka.scala
Scala
apache-2.0
11,922
package com.github.mdr.graphospasm.grapheditor.model.commands import org.eclipse.draw2d.geometry.Dimension import org.eclipse.draw2d.geometry.Point import org.eclipse.draw2d.geometry.Rectangle import org.eclipse.gef.commands.Command import com.github.mdr.graphospasm.grapheditor.model._ import com.github.mdr.graphospas...
mdr/graphospasm
com.github.mdr.graphospasm.grapheditor/src/main/scala/com/github/mdr/graphospasm/grapheditor/model/commands/CloneAttributesCommand.scala
Scala
mit
1,048
package com.thenetcircle.event_bus.story.tasks.kafka import java.util.Properties import akka.stream.scaladsl.Flow import com.thenetcircle.event_bus.IntegrationTestBase import com.thenetcircle.event_bus.event.EventStatus.NORMAL import com.thenetcircle.event_bus.event.{Event, EventStatus} import com.thenetcircle.event_...
thenetcircle/event-bus
integration-test/src/test/scala/com/thenetcircle/event_bus/story/tasks/kafka/KafkaSourceTest.scala
Scala
apache-2.0
3,135
/* * 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 ...
Dax1n/spark-core
core/src/test/scala/org/apache/spark/util/collection/PrimitiveKeyOpenHashMapSuite.scala
Scala
apache-2.0
3,892
package uk.gov.gds.ier.model case class ContactAddress( country: Option[String], postcode: Option[String], addressLine1: Option[String], addressLine2: Option[String], addressLine3: Option[String], addressLine4: Option[String], addressLine5: Option[String]) { def toApiMap = Map("corra...
alphagov/ier-frontend
app/uk/gov/gds/ier/model/ContactAddress.scala
Scala
mit
1,912
package robotichoover.service import robotichoover.domain.Instruction.Instruction import robotichoover.domain._ import scala.annotation.tailrec object RoomCleaningAlgorithm { def clean(configuration: Configuration): RoomStatus = clean( configuration.instructions, RoomStatus(configuration.roomDimensions...
xlbilbao/robotic-hoover-tray-io
src/main/scala/robotichoover/service/RoomCleaningAlgorithm.scala
Scala
apache-2.0
747
package com.tackmobile.tests import com.tackmobile._ import junit.framework.Assert._ import _root_.android.test.AndroidTestCase import _root_.android.test.ActivityInstrumentationTestCase2 class AndroidTests extends AndroidTestCase { def testPackageIsCorrect() { assertEquals("com.tackmobile", getContext.getPacka...
thillerson/scala-android-slider-puzzle
slider-puzzle-in-scala/tests/src/main/scala/Tests.scala
Scala
mit
609
package breeze.features import breeze.linalg._ import org.scalatest.funsuite.AnyFunSuite import breeze.linalg.DenseVector class FeatureVectorTest extends AnyFunSuite { test("axpy fv dv") { val f = FeatureVector(3, 4, 5, 6, 10) val dv = DenseVector.zeros[Double](12) axpy(3.0, f, dv) assert(dv === Den...
scalanlp/breeze
math/src/test/scala/breeze/features/FeatureVectorTest.scala
Scala
apache-2.0
1,225
package com.getjenny.starchat.resources /** * Created by Angelo Leto <angelo@getjenny.com> on 20/12/16. */ import akka.http.scaladsl.model.StatusCodes import akka.http.scaladsl.server.Route import akka.pattern.CircuitBreaker import com.getjenny.starchat.entities.io.{Permissions, User, UserId, UserUpdate} import com...
GetJenny/starchat
src/main/scala/com/getjenny/starchat/resources/UserResource.scala
Scala
gpl-2.0
5,254
package aims.core import akka.http.model.Uri.Query import akka.http.model.headers.LinkParams import akka.http.model.headers.LinkParams.rel /** * Component: * Description: * Date: 2014/12/30 * @author Andy Ai */ case class Pagination[E](items: List[E], page: Int, totalPage: Int, totalCount: Int, links: Seq[rel] =...
aiyanbo/aims
aims-core/src/main/scala/aims/core/Pagination.scala
Scala
mit
901
package nozzle.monadicctrl import nozzle.webresult._ import spray.http._ import spray.routing._ import spray.httpx.marshalling._ import scala.concurrent.Future trait MarshallingSupport extends MonadicCtrl with nozzle.webresult.MarshallingSupport { protected case class WebSuccess[T](value: T) extends nozzle.webresu...
utaal/nozzle
src/main/scala/monadicCtrl/MarshallingSupport.scala
Scala
mit
1,585
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs/contributors // License: http://www.gnu.org/licenses/lgpl-3.0.en.html package spray.json import shapeless.{ :: => :*:, _ } import shapeless.labelled._ trait DerivedJsReader[Base, A] { def readObject(t: Map[String, JsValue]): Either[Deserializ...
ensime/ensime-server
json/src/main/scala/spray/json/DerivedJsReader.scala
Scala
gpl-3.0
2,015
// Generated by the Scala Plugin for the Protocol Buffer Compiler. // Do not edit! // // Protofile syntax: PROTO2 package com.google.protobuf.descriptor import _root_.scalapb.internal.compat.JavaConverters._ /** @param uninterpretedOption * The parser stores options it doesn't recognize here. See above. */ @Ser...
dotty-staging/ScalaPB
scalapb-runtime/jvm/src/main/scala/com/google/protobuf/descriptor/OneofOptions.scala
Scala
apache-2.0
8,446
/* * 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...
intel-analytics/BigDL
scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/tensor/QuantizedTensor.scala
Scala
apache-2.0
8,679
/* * Copyright (C) 2017-present, Chenai Nakam(chenai.nakam@gmail.com) * * 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 r...
chenakam/scala-lang
src/main/scala/hobby/chenai/nakam/basis/Ruled.scala
Scala
apache-2.0
3,857
package ohnosequences.jellyfish.api.jellyfish import ohnosequences.jellyfish.api._, opt._ import ohnosequences.cosas._, types._, records._, fns._, klists._ import better.files._ case object histo extends AnyJellyfishCommand { type Arguments = arguments.type case object arguments extends RecordType( input :×...
ohnosequences/jellyfish-api
src/main/scala/api/commands/histo.scala
Scala
agpl-3.0
1,135
/** * Copyright 2013 Gianluca Amato * * This file is part of JANDOM: JVM-based Analyzer for Numerical DOMains * JANDOM 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 ...
rubino22/JDBeta
core/src/test/scala/it/unich/jandom/parsers/LPInvParserSuite.scala
Scala
lgpl-3.0
2,070
package im.actor.server.dialog import java.time.Instant import akka.actor.Status import akka.pattern.pipe import akka.persistence.SnapshotMetadata import im.actor.server.cqrs.{ Event, Processor } import im.actor.server.db.DbExtension import im.actor.server.model.DialogObsolete import im.actor.server.persist.dialog.Di...
ljshj/actor-platform
actor-server/actor-core/src/main/scala/im/actor/server/dialog/DialogRootMigration.scala
Scala
mit
2,430
/* * Copyright 2014–2017 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
drostron/quasar
mongodb/src/main/scala/quasar/physical/mongodb/MongoDb.scala
Scala
apache-2.0
11,678
/** * Copyright 2015 Thomson Reuters * * 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...
nruppin/CM-Well
server/cmwell-ws/app/ld/service/WriteService.scala
Scala
apache-2.0
5,267
package com.sksamuel.elastic4s.requests.searches.aggs.builders import com.sksamuel.elastic4s.json.{XContentBuilder, XContentFactory} import com.sksamuel.elastic4s.requests.searches.aggs.TopMetricsAggregation import com.sksamuel.elastic4s.requests.searches.queries.SortBuilderFn object TopMetricsAggregationBuilder { ...
stringbean/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/builders/TopMetricsAggregationBuilder.scala
Scala
apache-2.0
1,004
package spark import org.apache.mesos._ import org.apache.mesos.Protos._ /** * Class representing a parallel job in MesosScheduler. Schedules the job by implementing various * callbacks. */ abstract class Job(val runId: Int, val jobId: Int) { def slaveOffer(s: Offer, availableCpus: Double): Option[TaskDescripti...
javelinjs/spark
core/src/main/scala/spark/Job.scala
Scala
bsd-3-clause
414
package stream.http import akka.stream.io.InputStreamSource import akka.stream.scaladsl._ import akka.util.ByteString trait FlowGraphs { // Ensure a minimum chunk size to avoid over-chunking (small chunks) def chunkSize(minimumSize: Int = InputStreamSource.DefaultChunkSize) = Flow[ByteString] .transform(() =...
lancearlaus/akka-streams-http-intro
src/main/scala/stream/http/FlowGraphs.scala
Scala
apache-2.0
350
trait CollectiveResponsiveHandler extends ResponsiveHandler with CollectiveResponsive
demellj/iricala
src/CollectiveResponsiveHandler.scala
Scala
apache-2.0
85
// If5.scala val result = { if(99 > 100) { 4 } else { 42 } } println(result) /* Output: 42 */
P7h/ScalaPlayground
Atomic Scala/atomic-scala-examples/examples/05_ConditionalExpressions/If5.scala
Scala
apache-2.0
100
/* * Copyright 2011-2021 GatlingCorp (https://gatling.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.0 * * Unless required by appli...
gatling/gatling
src/docs/content/guides/passing_parameters/code/PassingParametersSampleScala.scala
Scala
apache-2.0
932
package antonkulaga.projects.pages import akka.http.extensions.pjax.PJax import akka.http.scaladsl.model._ import akka.http.scaladsl.server.{Directives, Route} import org.denigma.controls.Twirl import play.twirl.api.Html class Pages extends Directives with PJax{ def defaultPage: Option[Html] = { Some(growth.ht...
antonkulaga/personal
app/jvm/src/main/scala/antonkulaga/projects/pages/Pages.scala
Scala
mpl-2.0
1,572
package bio.populator import bio.populator.Nucleobases.Nucleobase import scala.io.Source object HiddenMessages { val filename = "data/vibrio_cholerae.txt" lazy val genome = new LoadGenome(filename).genome def main(args: Array[String]): Unit = { //println(s"VibrioCholerae length: ${genome.length}") /*...
leoromanovsky/bioinformatics-coursera
populator/src/main/scala/bio/populator/HiddenMessages.scala
Scala
apache-2.0
2,195
package foo object Test
sbt/sbt
sbt-app/src/sbt-test/project/semanticdb/src/test/scala/foo/Test.scala
Scala
apache-2.0
25
package im.tox.antox.utils import android.util.Log import im.tox.antox.utils.CallManager._ object CallManager { private val TAG = "im.tox.antox.utils.CallManager" } class CallManager () { private var _calls: Map[Integer, Call] = Map[Integer, Call]() def add(c: Call) = { Log.d(TAG, "Adding call") _call...
0xPoly/Antox
app/src/main/scala/im/tox/antox/utils/CallManager.scala
Scala
gpl-3.0
786
package streams import common._ /** * This trait represents the layout and building blocks of the game * * @TODO: SHOULD RENAME `x` and `y` in class Pos to `row` and `col`. It's * confusing to have `x` being the vertical axis. */ trait GameDef { /** * The case class `Pos` encodes positions in the terrain. ...
pdbartlett/misc-stuff
progfun/streams/src/main/scala/streams/GameDef.scala
Scala
apache-2.0
4,361
/* * 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 ...
gioenn/xSpark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/CallMethodViaReflection.scala
Scala
apache-2.0
6,868
package com._3tierlogic.KinesisManager /** * Hello world! * */ object App extends App with Configuration with Environment { println( "Hello World!" ) val configuration = config }
3tierlogic/kinesis-manager
kinesis-common/src/main/scala/com/_3tierlogic/KinesisManager/App.scala
Scala
apache-2.0
190
package hubcat import dispatch._ trait Searching { self: Requests => object Search { def issues(user: String, repo: String, open: Boolean, term: String) = complete(apiHost / "legacy" / "issues" / user / repo / (if(open) "open" else "closed") / term) def repos(term: String) = complete(apiHost /...
softprops/hubcat
src/main/scala/searching.scala
Scala
mit
480
package tests package noLinkWarnings /** * [[doesnt.exist]] * */ class NoLinkWarnings /** * [[NoLinkWarnings]] */ class Exists
dotty-staging/dotty
scaladoc-testcases/src/tests/noLinkWarnings.scala
Scala
apache-2.0
135
package com.datastax.driver.spark.writer import java.util.concurrent.atomic.AtomicInteger import java.util.concurrent.{Callable, Executors} import com.google.common.util.concurrent.MoreExecutors import org.junit.Assert._ import org.junit.Test class AsyncExecutorTest { @Test def test() { val taskCount = 20 ...
bovigny/cassandra-driver-spark
src/test/scala/com/datastax/driver/spark/writer/AsyncExecutorTest.scala
Scala
apache-2.0
1,500
package scalan.examples package impl import scalan._ import scalan.common.Default import scalan.common.OverloadHack.Overloaded1 import scala.reflect.runtime.universe._ import scalan.common.Default // Abs ----------------------------------- trait MyArraysAbs extends Scalan with MyArrays { self: ExampleDsl => // si...
PCMNN/scalan-starter
src/main/scala/scalan/examples/impl/MyArraysImpl.scala
Scala
apache-2.0
20,737
package scalaz.contrib package spire import org.specs2.scalaz.Spec import _root_.spire.algebra import _root_.spire.laws._ import org.typelevel.discipline.scalatest.Discipline import org.scalacheck.Prop import org.scalatest.FunSuite import org.scalatest.prop.Checkers class SpireTest extends FunSuite with Disciplin...
typelevel/scalaz-contrib
spire/test/scala/SpireTest.scala
Scala
mit
2,552
package com.metebalci import org.scalatest._ import org.scalatest.Assertions._ class StoreSpec extends FunSuite { test("store") { case class Foo(name:String, age:Int) val foo = Foo("foo", 30) val fooLens = Lens[Foo, String] ( f => f.name, (n, f) => f.copy(name = n) ) val (get, pu...
metebalci/experiment-lenses-scala
src/test/scala/03-StoreSpec.scala
Scala
gpl-2.0
430
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
ueshin/apache-flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/rules/FlinkRuleSets.scala
Scala
apache-2.0
8,279
package com.sksamuel.elastic4s import com.sksamuel.elastic4s.ext.StringOption object ElasticProperties { private val Regex = "(http|https)://(.*?)/?(/.*?)?(\\\\?.*?)?".r private val EndpointRegex = "(.*?)(:\\\\d+)?".r /** * Creates [[ElasticProperties]] from an URI. The general format of the URI is: ...
sksamuel/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/ElasticProperties.scala
Scala
apache-2.0
2,106
/** * SparklineData, Inc. -- http://www.sparklinedata.com/ * * Scala based Audience Behavior APIs * * Copyright 2014-2015 SparklineData, 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 Lice...
cubefyre/audience-behavior-semantic-etl
etl/src/test/scala/org/sparkline/etl/SessionMetricsTest.scala
Scala
apache-2.0
1,509
/* * 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/main/scala/uk/gov/hmrc/ct/accounts/frsse2008/boxes/micro/AC406.scala
Scala
apache-2.0
1,127
/* * Copyright 2012 Alexander Bertram * * 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...
abertram/AntScout
src/main/scala/de.fhwedel.antscout/map/Way.scala
Scala
apache-2.0
1,655
/** * 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/main/scala/kafka/server/epoch/LeaderEpochFileCache.scala
Scala
apache-2.0
10,762
package monocle.function import monocle.MonocleSuite import monocle.law.discipline.function.{FilterIndexTests, AtTests} class FilterIndexSpec extends MonocleSuite { implicit def mmapFilterIndex[K, V]: FilterIndex[MMap[K, V], K, V] = FilterIndex.fromIso(MMap.toMap) checkAll("fromIso", FilterIndexTests.evenIn...
NightRa/Monocle
test/src/test/scala/monocle/function/FilterIndexSpec.scala
Scala
mit
355
package filodb.prometheus.ast sealed trait ScalarExpression extends Expression { def toScalar: Double } case class Scalar(toScalar: Double) extends ScalarExpression case class Limit(limit: Double)
filodb/FiloDB
prometheus/src/main/scala/filodb/prometheus/ast/Scalars.scala
Scala
apache-2.0
202
package io.hydrosphere.mist.python import mist.api._ object PythonUtils { import scala.collection.JavaConverters._ def toSeq[A](list: java.util.List[A]): Seq[A] = { list.asScala } def toSeq[A](coll: java.util.Collection[A]): Seq[A] = { coll.asScala.toSeq } val doubleType: ArgType = MDouble ...
Hydrospheredata/mist
mist/worker/src/main/scala/io/hydrosphere/mist/python/PythonUtils.scala
Scala
apache-2.0
771
package net.fwbrasil.scala import scala.runtime.ScalaRunTime class Tuple33[+T1, +T2, +T3, +T4, +T5, +T6, +T7, +T8, +T9, +T10, +T11, +T12, +T13, +T14, +T15, +T16, +T17, +T18, +T19, +T20, +T21, +T22, +T23, +T24, +T25, +T26, +T27, +T28, +T29, +T30, +T31, +T32, +T33]( val _1: T1, val _2: T2, val _3: T3, val _4: T4, v...
xdevelsistemas/activate
activate-core/src/main/scala/net/fwbrasil/scala/Tuple33.scala
Scala
lgpl-2.1
1,102
/* * 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 ...
grayaaa/learning-spark
src/main/scala/org/apache/spark/examples/SparkLR.scala
Scala
apache-2.0
2,829
package com.gx.state /** * Copyright 2017 josephguan * * 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 a...
josephguan/scala-design-patterns
behavioral/state/src/main/scala/com/gx/state/Keyboard.scala
Scala
apache-2.0
935
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this f...
transcendent-ai-labs/DynaML
dynaml-core/src/main/scala/io/github/mandar2812/dynaml/dataformat/MAT.scala
Scala
apache-2.0
1,235
/** * 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 * distributed ...
geeag/kafka
core/src/test/scala/integration/kafka/api/ClientIdQuotaTest.scala
Scala
apache-2.0
2,139
package uk.co.morleydev.zander.client.test.unit.service.impl import scala.concurrent.future import scala.concurrent.ExecutionContext.Implicits.global import org.mockito.{Matchers, Mockito} import uk.co.morleydev.zander.client.service.{AcquireProjectArtefacts, CompileProjectSource, AcquireProjectSource, PurgeProjectArt...
MorleyDev/zander.client
src/test/scala/uk/co/morleydev/zander/client/test/unit/service/impl/DownloadAcquireUpdateProjectArtefactsFromCacheToLocalTests.scala
Scala
mit
6,024
import scala.quoted.* inline def printPos[T](inline expr: T): (Int, Int) = ${ printPos('expr) } private def printPos[T](expr: Expr[T])(using Quotes): Expr[(Int, Int)] = import quotes.reflect.* val pos = expr.asTerm.pos Expr((pos.start, pos.end))
dotty-staging/dotty
tests/run-macros/i10011/Macro_1.scala
Scala
apache-2.0
256
package com.test import org.apache.predictionio.controller.PPreparator import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ import org.apache.spark.rdd.RDD class Preparator extends PPreparator[TrainingData, PreparedData] { def prepare(sc: SparkContext, trainingData: TrainingData): Prepare...
alex9311/PredictionIO
examples/scala-parallel-similarproduct/filterbyyear/src/main/scala/Preparator.scala
Scala
apache-2.0
614
package com.eevolution.context.dictionary.infrastructure.service import java.util.UUID import akka.NotUsed import com.eevolution.context.dictionary.domain._ import com.eevolution.context.dictionary.domain.model.WorkflowActivityResult import com.eevolution.utils.PaginatedSequence import com.lightbend.lagom.scaladsl.ap...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/service/WorkflowActivityResultService.scala
Scala
gpl-3.0
2,187
package com.cds.learn.chapter6 /** * Created by chendongsheng5 on 2017/5/31. */ trait RNG { def nextInt: (Int, RNG) // Should generate a random `Int`. We'll later define other functions in terms of `nextInt`. } object test { def rollDie: Int = { val rng = new scala.util.Random rng.nextInt(6) } ...
anancds/scala-project
fpis/src/main/scala/com/cds/learn/chapter6/State.scala
Scala
mit
8,866
package SimpleCqrsScala.CommandSide.Services import SimpleCqrsScala.CommandSide.Domain.InventoryItem import SimpleCqrsScala.CommandSide.Domain.Events._ import SimpleCqrsScala.CommandSide.Domain.DomainState._ import SimpleCqrsScala.CommandSide.Domain.DomainState.EitherTransition._ import SimpleCqrsScala.CommandSide.Dom...
barambani/SimpleCQRS-Scala
CommandSide/src/main/scala/Services/InventoryItemService.scala
Scala
mit
1,669
package scala.quoted import scala.reflect.ClassTag /** A typeclass for types that can be turned to `quoted.Expr[T]` * without going through an explicit `'{...}` operation. */ trait Liftable[T] { /** Lift a value into an expression containing the construction of that value */ def toExpr(x: T): QuoteContext ?=>...
som-snytt/dotty
library/src/scala/quoted/Liftable.scala
Scala
apache-2.0
21,273
/** * Copyright 2015 Otto (GmbH & Co KG) * * 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...
hpzorn/schedoscope
schedoscope-tutorial/src/test/scala/schedoscope/example/osm/datahub/TrainstationsTest.scala
Scala
apache-2.0
2,057
package org.scalatest.examples.funsuite.oneargtest import org.scalatest.fixture import java.io._ class ExampleSuite extends fixture.FunSuite { case class F(file: File, writer: FileWriter) type FixtureParam = F def withFixture(test: OneArgTest) { // create the fixture val file = File.createTempFile("h...
vivosys/scalatest
examples/src/main/scala/org/scalatest/examples/funsuite/oneargtest/ExampleSuite.scala
Scala
apache-2.0
877
import sbt._ import Keys._ import play.Project._ object ApplicationBuild extends Build { val appName = "DontFeedTheMeter" val appVersion = "1.0-SNAPSHOT" val appDependencies = Seq( // Add your project dependencies here, javaCore, javaJdbc, javaEbean ) val main = play.Project(a...
matt-sprypoint/DontFeedTheMeter
project/Build.scala
Scala
unlicense
422
package com.karasiq.nanoboard.frontend.utils import scala.concurrent.{ExecutionContext, Future, Promise} import scala.scalajs.js import scala.scalajs.js.typedarray.Uint8Array import org.scalajs.dom import org.scalajs.dom.{Blob, Event} import org.scalajs.dom.raw._ import scalatags.JsDom.all._ /** * Blob/file utilit...
Karasiq/nanoboard
frontend/src/main/scala/com/karasiq/nanoboard/frontend/utils/Blobs.scala
Scala
apache-2.0
1,914
package org.jetbrains.plugins.hocon.misc import com.intellij.psi.PsiElement import com.intellij.xml.breadcrumbs.BreadcrumbsInfoProvider import org.jetbrains.plugins.hocon.lang.HoconLanguage import org.jetbrains.plugins.hocon.psi.HKeyedField class HoconBreadcrumbsInfoProvider extends BreadcrumbsInfoProvider { def ge...
ilinum/intellij-scala
src/org/jetbrains/plugins/hocon/misc/HoconBreadcrumbsInfoProvider.scala
Scala
apache-2.0
662
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala /** A type for ...
scala/scala
src/library/scala/DummyImplicit.scala
Scala
apache-2.0
546
package com.eevolution.context.dictionary.infrastructure.repository import java.util.UUID import com.eevolution.context.dictionary.domain._ import com.eevolution.context.dictionary.domain.model.WorkflowNode import com.eevolution.context.dictionary.infrastructure.db.DbContext._ import com.eevolution.utils.PaginatedSeq...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/repository/WorkflowNodeRepository.scala
Scala
gpl-3.0
2,774
/* * 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
streaming/src/test/scala/org/apache/spark/streaming/rdd/WriteAheadLogBackedBlockRDDSuite.scala
Scala
apache-2.0
15,181
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
dbtsai/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/decimalExpressions.scala
Scala
apache-2.0
6,718
package a import scala.quoted._ object A: inline def transform[A](inline expr: A): A = ${ transformImplExpr('expr) } def pure[A](a:A):A = ??? def transformImplExpr[A:Type](using qctx: QuoteContext)(expr: Expr[A]): Expr[A] = { import qctx.tasty._ expr.unseal match { case Inlined(x,y,...
som-snytt/dotty
tests/pos-macros/i8325/Macro_1.scala
Scala
apache-2.0
507
/* * 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 ...
hvanhovell/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/LogicalQueryStage.scala
Scala
apache-2.0
2,763
/* * Copyright (c) 2013-2015 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 available at * http://www.opensource.org/licenses/apache2.0.php. ...
giserh/geomesa
geomesa-kafka/geomesa-kafka-datastore/src/test/scala/org/locationtech/geomesa/kafka/consumer/offsets/OffsetManagerIntegrationTest.scala
Scala
apache-2.0
2,848
/* *\\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2014, G...
non/squants
src/test/scala/squants/energy/SpecificEnergySpec.scala
Scala
apache-2.0
2,239
/** * Created by faganp on 3/19/15. */ import java.io.{BufferedInputStream, FileInputStream} import java.util.zip.GZIPInputStream import Utils.{GzFileIterator, PopulateRandomString} import com.typesafe.config.ConfigFactory //import org.apache.spark.sql.catalyst.types.{StringType, StructField, StructType} // spark ...
faganpe/KafkaStreamingPOC
src/main/scala/ObsfucateLogs.scala
Scala
apache-2.0
7,750
package com.novocode.squery.simple import java.sql.{PreparedStatement, ResultSet, SQLException, Date, Time, Timestamp} /** * Implicit conversions for simple query parameters and query results */ object Implicit { // Implicit methods to convert results implicit def rsToBooleanOption(rs: ResultSet) = if(rs.is...
gnufied/squery
src/com/novocode/squery/simple/Implicit.scala
Scala
bsd-2-clause
3,785
/* * Copyright 2010 Michael Fortin <mike@brzy.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 la...
m410/brzy
src/main/scala/org/brzy/webapp/persistence/SessionFactoryProvider.scala
Scala
apache-2.0
878
/** * 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...
guozhangwang/kafka
core/src/test/scala/unit/kafka/server/CreateTopicsRequestTest.scala
Scala
apache-2.0
9,057
package cilib package pso import scalaz._ import monocle._, Monocle._ import monocle.syntax._ import Position._ import spire.algebra._ object PSO { import Lenses._ // Constrain this better - Not numeric. Operation for vector addition def stdPosition[S,A]( c: Particle[S,A], v: Position[A] )(implicit ...
robgarden/cilib
pso/src/main/scala/cilib/pso/PSO.scala
Scala
gpl-3.0
5,607
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
jedesah/Quasar
web/src/test/scala/quasar/api/services/MountServiceSpec.scala
Scala
apache-2.0
44,173
package controllers import play.api.libs.concurrent.Promise import play.api.mvc.{Action, Controller} import java.util.concurrent.TimeUnit._ import play.api.libs.concurrent.Execution.Implicits.defaultContext import scala.concurrent.Future object Application extends Controller { def things(count: Int, waitTime: Lo...
inoio/play2-multi-module
modules/backend/app/controllers/Application.scala
Scala
apache-2.0
515
/* * A real-time collaborative tool to develop files over the network. * Copyright (C) 2010 Mauro Ciancio and Leandro Gilioli * {maurociancio,legilioli} at gmail dot com * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Publi...
maurociancio/parallel-editor
src/parallel-editor-common/src/main/scala/ar/noxit/paralleleditor/common/BaseActor.scala
Scala
gpl-3.0
1,199
package info.glennengstrand.news.dao import scala.concurrent.Future import scala.concurrent._ import ExecutionContext.Implicits.global import scala.collection.JavaConverters._ import com.datastax.oss.driver.api.core.cql.{BoundStatement, PreparedStatement} import info.glennengstrand.news.model.Inbound class InboundDa...
gengstrand/clojure-news-feed
server/feed11/src/main/scala/info/glennengstrand/news/dao/InboundDao.scala
Scala
epl-1.0
1,715
package com.yetu.oauth2provider package controllers import com.yetu.oauth2provider.models.HouseholdModel.householdFormat import com.yetu.oauth2provider.models.{ DataListWrapper, DataUpdateRequest } import com.yetu.oauth2provider.oauth2.handlers.AuthorizationHandler import com.yetu.oauth2provider.oauth2.services.ScopeS...
yetu/oauth2-provider
app/com/yetu/oauth2provider/controllers/OAuth2ResourceServer.scala
Scala
mit
3,875
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * *...
RobAltena/deeplearning4j
deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/scala/org/apache/spark/TaskContextHelper.scala
Scala
apache-2.0
1,132
/* *\\ ** \\ \\ / _) \\ \\ / \\ | ** ** \\ \\ / | __ \\ _ \\ __| \\ \\ / |\\/ | ** ** \\ \\ / | | | __/ | \\ \\ / | | ** ** \\_/ _| .__/ \\___| _| \\_/ _| _| ** ** _| ...
hsyl20/Scala_ViperVM
src/test/scala/org/vipervm/_old/compilers/opencl/Map.scala
Scala
gpl-3.0
1,142
/** * Copyright (C) 2012 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 ...
travisbrown/finatra
src/test/scala/com/twitter/finatra/FileSpec.scala
Scala
apache-2.0
1,002
/* * 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/computations/CP265Spec.scala
Scala
apache-2.0
1,278
/* * 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/src/main/scala/org/apache/flink/table/catalog/ExternalCatalogSchema.scala
Scala
apache-2.0
5,105
import org.qirx.browserTests.server.ResourceRouteFactory import org.qirx.browserTests.runner.EventProxy class EnhancedResourceRouteFactory extends ResourceRouteFactory { def apply(classLoader: ClassLoader, eventProxy: EventProxy) = new EnhancedResourceRoute(classLoader, eventProxy) }
EECOLOR/browser-tests
examples/plugin-example/src/test/scala/EnhancedResourceRouteFactory.scala
Scala
mit
291
/* * 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 ...
tzulitai/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/rules/logical/RewriteIntersectAllRuleTest.scala
Scala
apache-2.0
2,567