code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
package com.avsystem.commons package mongo.typed import com.avsystem.commons.mongo.BsonGenCodecs import com.avsystem.commons.serialization.{GenCodec, TransparentWrapperCompanion} import org.bson.types.ObjectId /** * Base class for companion objects of wrappers ("newtypes") over BSON [[ObjectId]] - the default type ...
AVSystem/scala-commons
commons-mongo/jvm/src/main/scala/com/avsystem/commons/mongo/typed/ObjectIdWrapperCompanion.scala
Scala
mit
1,024
package com.xcv58.graphql import com.google.inject.Stage class GraphQLStartupTest extends FeatureTest { override val server = new EmbeddedHttpServer( twitterServer = new GraphQLServer, stage = Stage.PRODUCTION, verbose = false) test("Server#startup") { server.assertHealthy() } }
xcv58/scala-graphql-example
src/test/scala/com/xcv58/graphql/GraphQLStartupTest.scala
Scala
mit
306
/* 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...
nvoron23/algebird
algebird-test/src/test/scala/com/twitter/algebird/VectorSpaceProperties.scala
Scala
apache-2.0
1,242
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
themarkypantz/kafka
core/src/main/scala/kafka/log/LogCleaner.scala
Scala
apache-2.0
42,901
package forimpatient.chapter09 import java.io.PrintWriter /** * Created by Iryna Kharaborkina on 8/7/16. * * Solution to the Chapter 09 Exercise 05 'Scala for the Impatient' by Horstmann C.S. * * Write a Scala program that writes the powers of 2 and their reciprocals to a file, * with the exponent rangin...
Kiryna/Scala-for-the-Impatient
src/forimpatient/chapter09/Exercise05.scala
Scala
apache-2.0
749
/** * Copyright (c) 2013, The National Archives <digitalpreservation@nationalarchives.gov.uk> * http://www.nationalarchives.gov.uk * * 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://mozi...
rhubner/csv-validator
csv-validator-core/src/main/scala/uk/gov/nationalarchives/csv/validator/FailFastMetaDataValidator.scala
Scala
mpl-2.0
4,215
package com.github.johnynek.bazel_deps import cats.syntax.either._ import io.circe.{ Decoder, KeyDecoder, Json, Error, Parser } import io.circe.generic.auto object Decoders { implicit val versionDecoder: Decoder[Version] = stringWrapper(Version(_)) implicit val subprojDecoder: Decoder[Subproject] = stringWrapper(...
GinFungYJF/bazel-deps
src/scala/com/github/johnynek/bazel_deps/Decoders.scala
Scala
mit
5,340
/** * Copyright (c) 2014 Rafael Brandão <rafa.bra@gmail.com> * * This 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. * ...
rafael-brandao/ecurrencies
api/src/main/scala/ecurrencies/EcurrencyServiceException.scala
Scala
lgpl-3.0
2,087
package org.kimbasoft.scala.codingstyle.oo.types /** * Missing documentation. * * @author <a href="steffen.krause@soabridge.com">Steffen Krause</a> * @since 1.0 */ object TypeProjection extends App { trait Logger { def log(message: String): Unit } class ConsoleLogger extends Logger { def log(mess...
kimba74/sandbox-scala
src/main/scala/org/kimbasoft/scala/codingstyle/oo/types/TypeProjection.scala
Scala
gpl-3.0
1,908
package extruder.metrics.data import cats.{Applicative, Monad} import cats.syntax.applicative._ import cats.syntax.flatMap._ import extruder.core._ sealed trait MetricKey { def name: String def path: List[String] def metricType: Option[MetricType] } case class SimpleMetricKey(name: String, path: List[String], ...
janstenpickle/extruder
metrics/core/src/main/scala/extruder/metrics/data/MetricKey.scala
Scala
mit
3,797
package org.odfi.indesign.core.config import org.odfi.indesign.core.config.model.CommonConfigTrait import org.odfi.indesign.core.config.model.CommonConfig import org.odfi.tea.listeners.ListeningSupport import org.odfi.indesign.core.harvest.HarvestedResource trait ConfigSupport extends ConfigHolder with HarvestedResou...
opendesignflow/indesign
indesign-core/src/main/scala/org/odfi/indesign/core/config/ConfigSupport.scala
Scala
gpl-3.0
1,308
import sbt._ import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._ /** * Application settings. Configure the build for your application here. * You normally don't have to touch the actual build definition after this. */ object Settings { /** The name of your application */ val name = "scalajs-spa" /** The ...
Enalmada/scalajs-spa-tutorial
project/Settings.scala
Scala
apache-2.0
3,083
/* * Accio is a platform to launch computer science experiments. * Copyright (C) 2016-2018 Vincent Primault <v.primault@ucl.ac.uk> * * Accio 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...
privamov/accio
accio/java/fr/cnrs/liris/locapriv/ops/CollapseTemporalGapsOp.scala
Scala
gpl-3.0
2,228
package com.datastax.spark.connector import com.datastax.spark.connector.types.TypeConverter.StringConverter trait GettableByIndexData extends Serializable { def columnValues: IndexedSeq[AnyRef] /** Returns a column value by index without applying any conversion. * The underlying type is the same as the typ...
debasish83/cassandra-driver-spark
spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/GettableByIndexData.scala
Scala
apache-2.0
1,376
package com.twitter.querulous import java.util.concurrent.{ThreadFactory, TimeoutException => JTimeoutException, _} import java.util.concurrent.atomic.AtomicInteger import com.twitter.util.Duration class FutureTimeout(poolSize: Int, queueSize: Int) { private val executor = new ThreadPoolExecutor( 1, poolSi...
twitter/querulous
querulous-core/src/main/scala/com/twitter/querulous/FutureTimeout.scala
Scala
apache-2.0
1,413
/* * 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 ...
erictu/spark-intervalrdd
src/main/scala/edu/berkeley/cs/amplab/spark/intervalrdd/IntervalRDD.scala
Scala
apache-2.0
7,627
/* * * * Copyright 2020 Lenses.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 app...
datamountaineer/stream-reactor
kafka-connect-common/src/main/scala/com/datamountaineer/streamreactor/common/converters/MsgKey.scala
Scala
apache-2.0
1,179
package com.tribbloids.spookystuff.python.ref import com.tribbloids.spookystuff.SpookyContext import com.tribbloids.spookystuff.session.PythonDriver import com.tribbloids.spookystuff.utils.SpookyUtils import com.tribbloids.spookystuff.utils.lifespan.LocalCleanable import org.apache.spark.ml.dsl.utils.messaging.Message...
tribbloid/spookystuff
core/src/main/scala/com/tribbloids/spookystuff/python/ref/PyBinding.scala
Scala
apache-2.0
2,957
/* 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...
nabarunnag/Summingbird_dev
summingbird-scalding-test/src/main/scala/com/twitter/summingbird/scalding/TestService.scala
Scala
apache-2.0
3,933
/* ______ ** | ___ \\ ** ___ _ _ _ __ | |_/ /_ _ _ __ _ __ ** / __| | | | '_ \\| ___ \\ | | | '__| '_ \\ ** \\__ \\ |_| | | | | |_/ / |_| | | | | | | ** |___/\\__,_|_| |_\\____/ \\__,_|_| |_| |_| ** ** SunBurn RayTracer ** ...
hsyl20/SunBurn
src/main/scala/samplers/MultiJitteredSampler.scala
Scala
gpl-3.0
1,631
// 1 def signum(num: Int) = { if (num > 0) 1 else if (num == 0) 0 else -1 } println(signum(-10)) println(signum(0)) println(signum(10)) // 2 println({}.getClass) // res1: Class[Unit] = void // 3 var x: Unit = _ var y: Int = _ x = y = 1 // 4 for (i <- (0 to 10).reverse) println(i) // 5 def countdown(n: ...
kristianperkins/scala-for-the-impatient-exercises
ch02.scala
Scala
unlicense
627
package controllers import models.entities.{Mask => mask} import play.api.libs.functional.syntax._ import play.api.libs.json.Reads._ import play.api.libs.json._ /* * Copyright 2014(29.11.14) Arakcheev Artem (artem.arakcheev@phystech.edu) * * Licensed under the Apache License, Version 2.0 (the "License"); * you ma...
arakcheev/wbox
app/controllers/MaskController.scala
Scala
apache-2.0
2,025
package dokutoku.golden_thumb.seed import dokutoku.golden_thumb.seed.traits.GoldenSeed import net.minecraft.util.Icon import net.minecraft.item.ItemStack import net.minecraft.item.Item import net.minecraft.block.Block class NetherrackSeed(id: Int, crop: Int) extends GoldenSeed(id, crop) { val product = new ItemSta...
AtomFusion/GoldenThumb
dokutoku/golden_thumb/seed/NetherrackSeed.scala
Scala
mit
348
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.2 * @date Thu Oct 13 12:03:21 EDT 2011 * @see LICENSE (MIT style license file). */ package scalation.minima import scala.math.max import scalation.linalgebra.VectorI //::::::::::::::...
scalation/fda
scalation_1.2/src/main/scala/scalation/minima/IntegerLocalSearch.scala
Scala
mit
5,887
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
maropu/spark
core/src/test/scala/org/apache/spark/ShuffleNettySuite.scala
Scala
apache-2.0
1,148
package sky.supervisor.example2 import akka.actor.SupervisorStrategy.{Escalate, Stop, Restart, Resume} import akka.actor.{AllForOneStrategy, Props, ActorLogging, Actor} import scala.concurrent.duration._ /** * Created by szekai on 19/08/2014. */ class SupervisorActor extends Actor with ActorLogging{ val workerAct...
szekai/akka-example
AkkaSupervisorExample/src/main/scala/sky/supervisor/example2/SupervisorActor.scala
Scala
apache-2.0
887
package org.openapitools.server.model /** * @param self for example: ''null'' * @param `class` for example: ''null'' */ final case class InputStepImpllinks ( self: Option[Link], `class`: Option[String] )
cliffano/swaggy-jenkins
clients/scala-akka-http-server/generated/src/main/scala/org/openapitools/server/model/InputStepImpllinks.scala
Scala
mit
215
package ml.wolfe.term import ml.wolfe.{SimpleFeatureIndex, WolfeSpec} /** * @author riedel */ class FeatureIndexSpecs extends WolfeSpec { import ml.wolfe.term.TermImplicits._ "A feature index" should { "provide an inverse mapping" in { val dom = Vectors(100000) val index = new SimpleFeatureIn...
wolfe-pack/wolfe
wolfe-core/src/test/scala/ml/wolfe/term/FeatureIndexSpecs.scala
Scala
apache-2.0
672
/** * Copyright 2011-2017 GatlingCorp (http://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...
MykolaB/gatling
gatling-core/src/main/scala/io/gatling/core/structure/Pauses.scala
Scala
apache-2.0
5,305
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
witgo/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/ResolveGroupingAnalyticsSuite.scala
Scala
apache-2.0
15,423
/* * Copyright 2008-present MongoDB, 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 ag...
jyemin/mongo-java-driver
driver-scala/src/test/scala/org/mongodb/scala/model/ValidationLevelSpec.scala
Scala
apache-2.0
2,568
package ch.fram.medlineGeo.crunching.parsers import java.io.{BufferedInputStream, FileInputStream} import java.util.zip.GZIPInputStream import ch.fram.medlineGeo.models._ import scala.xml.factory.XMLLoader import scala.xml.{Node, Elem, SAXParser, XML} /** * Created by alexandre masselot on 07/09/15. */ object Med...
alexmasselot/medlineGeoBackend
app/ch/fram/medlineGeo/crunching/parsers/MedlineParser.scala
Scala
mit
3,062
package org.jetbrains.plugins.scala.project /** * @author Pavel Fatin */ sealed abstract class Platform(val getName: String) extends Named { override def toString: String = getName } object Platform { final case object Scala extends Platform("Scala") final case object Dotty extends Platform("Dotty") }
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/project/Platform.scala
Scala
apache-2.0
316
// code-examples/FP/datastructs/option-script.scala val someNumber = Some(5) val noneNumber = None for (option <- List(noneNumber, someNumber)) { option.map(n => println(n * 5)) }
XClouded/t4f-core
scala/src/tmp/FP/datastructs/option-script.scala
Scala
apache-2.0
183
/* * Copyright 2015 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...
tonytw1/play-authorised-frontend
src/main/scala/uk/gov/hmrc/play/frontend/auth/UserSessionData.scala
Scala
apache-2.0
1,331
/* * 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
frontend/src/main/scala/quasar/sql/parser.scala
Scala
apache-2.0
19,749
package model import skinny.orm._, feature._ import scalikejdbc._ import org.joda.time._ case class LessonAdmin( id: Long, lessonId: Long, accountId: Long, lessonAdminRole: Int ) object LessonAdmin extends SkinnyCRUDMapper[LessonAdmin] { override lazy val tableName = "lesson_admin" override lazy val defa...
yoshitakes/skinny-task-example
src/main/scala/model/LessonAdmin.scala
Scala
mit
473
//Copyright 2014, Alex Khilko. //This file is part of MoonGene which is released under MIT. //See file LICENSE.TXT or go to www.alexkhilko.com for full license details. package com.moongene.services import akka.actor.{Cancellable, ActorLogging, Actor} import akka.cluster.Cluster import com.moongene.models.messages._...
InfiniteCode/MoonGene
src/gene/src/main/scala/com/moongene/services/MetricsLogger.scala
Scala
mit
9,921
package model.ui import org.joda.time.{ DateTime, DateTimeFieldType } import org.joda.time.format.DateTimeFormat /** * A class representing archive items shown in the archive widget of the page * * @author Stefan Bleibinhaus * */ case class ArchiveItem( val timeDisplay: String, val link: String, ...
ExNexu/scablo
app/model/ui/ArchiveItem.scala
Scala
bsd-2-clause
1,136
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ import com.typesafe.sbt.SbtScalariform._ import sbt.ScriptedPlugin._ import sbt._ import Keys._ import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings import com.typesafe.tools.mima.plugin.MimaKeys.mimaPreviousArtifacts import ...
hagl/playframework
framework/project/BuildSettings.scala
Scala
apache-2.0
9,419
/* This file is part of VoltDB. * Copyright (C) 2008-2018 VoltDB Inc. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to...
VoltDB/spark-scratchpad
app-fastdata/hadoop/spark/src/main/scala/KMeansReferral.scala
Scala
agpl-3.0
2,431
package org.knora.webapi.util import org.knora.webapi.IRI /** * Holds an optional, mutable IRI for use in tests. */ class MutableTestIri { private var maybeIri: Option[IRI] = None /** * Checks whether an IRI is valid. If it's valid, stores the IRI, otherwise throws an exception. * @param iri ...
nie-ine/Knora
webapi/src/main/scala/org/knora/webapi/util/MutableTestIri.scala
Scala
agpl-3.0
1,011
package testutils import akka.actor.{Actor, ActorRef, ActorSystem} import akka.testkit.{ ImplicitSender, TestKit } import org.scalatest.{WordSpecLike, Matchers, BeforeAndAfterAll} abstract class TestKitSpec(name: String) extends TestKit(ActorSystem(name)) with WordSpecLike with Matchers with BeforeAndAfterAll...
rkewley/devsdmf
src/test/scala/testutils/TestKitSpec.scala
Scala
apache-2.0
508
package com.datastax.spark.connector.cql import com.datastax.driver.core.policies.RetryPolicy import com.datastax.driver.core.policies.RetryPolicy.RetryDecision import com.datastax.driver.core.{ConsistencyLevel, Statement, WriteType} /** Always retries with the same CL, constant number of times, regardless of circums...
nvoron23/spark-cassandra-connector
spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/cql/MultipleRetryPolicy.scala
Scala
apache-2.0
1,214
/* * 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 ...
goldmedal/spark
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/KubernetesConfSuite.scala
Scala
apache-2.0
6,278
package com.quartethealth.spark.fixedwidth import com.databricks.spark.csv.CsvRelation import com.databricks.spark.csv.readers.{BulkReader, LineReader} import com.quartethealth.spark.fixedwidth.readers.{BulkFixedwidthReader, LineFixedwidthReader} import org.apache.spark.rdd.RDD import org.apache.spark.sql.SQLContext i...
quartethealth/spark-fixedwidth
src/main/scala/com/quartethealth/spark/fixedwidth/FixedwidthRelation.scala
Scala
apache-2.0
2,013
package test; object AllTests extends Test("All") { val tests = new MoveGenerationTest :: Nil def doAllTests = tests.foreach((t : Test) => { t.doAllTests println("Done: " + t.name)}) def main(args : Array[String]) = doAllTests }
mszacun/Scala-Chess
test/AllTests.scala
Scala
gpl-2.0
241
package fastparsers.framework.ruleprocessing import fastparsers.error._ import fastparsers.input.ParseInput import fastparsers.parsers.{Parser, ParserImplBase} import fastparsers.tools.TreeTools import scala.collection.mutable.{ListBuffer, HashMap} /** * Create the "final" code for each rule */ trait ParseRules exten...
begeric/FastParsers
FastParsers/src/main/scala/fastparsers/framework/ruleprocessing/ParseRules.scala
Scala
mit
2,825
package com.twitter.summingbird.storm import com.twitter.algebird.Semigroup import com.twitter.summingbird.batch.Batcher import com.twitter.summingbird.online.executor.KeyValueShards import com.twitter.summingbird.storm.builder.Topology /** * This trait describes how to build topology component which corresponds to ...
twitter/summingbird
summingbird-storm/src/main/scala/com/twitter/summingbird/storm/ComponentProvider.scala
Scala
apache-2.0
1,688
package com.socrata.datacoordinator.secondary import com.rojoma.json.v3.util.AutomaticJsonCodecBuilder import com.socrata.datacoordinator.id.DatasetId case class SecondaryMetric(totalSizeBytes: Long) object SecondaryMetric extends (Long => SecondaryMetric) { implicit val codec = AutomaticJsonCodecBuilder[Secondary...
socrata-platform/data-coordinator
coordinatorlib/src/main/scala/com/socrata/datacoordinator/secondary/SecondaryMetrics.scala
Scala
apache-2.0
641
/* * 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 ...
hequn8128/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/plan/TimeIndicatorConversionTest.scala
Scala
apache-2.0
18,066
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
Kegeruneku/rudder
rudder-core/src/main/scala/com/normation/rudder/services/policies/RudderPromiseWriterServiceImpl.scala
Scala
agpl-3.0
15,305
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js Test Suite ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013-2015, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ ** ** /____/\\___/...
matthughes/scala-js
test-suite/src/test/scala/org/scalajs/testsuite/library/StackTraceTest.scala
Scala
bsd-3-clause
2,622
/* * 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/utils/Util.scala
Scala
apache-2.0
13,675
package filodb.core.reprojector import com.typesafe.config.Config import com.typesafe.scalalogging.slf4j.StrictLogging import java.util.TreeMap import org.velvia.filo.RowReader import scala.math.Ordered import scalaxy.loops._ import filodb.core.KeyRange import filodb.core.Types._ import filodb.core.metadata.{Column, ...
adeandrade/FiloDB
core/src/main/scala/filodb.core/reprojector/FiloMemTable.scala
Scala
apache-2.0
3,571
/* * 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 ...
goldmedal/spark
resource-managers/mesos/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosFineGrainedSchedulerBackendSuite.scala
Scala
apache-2.0
16,480
package mesosphere.marathon package api.v2 import com.wix.accord._ import com.wix.accord.dsl._ import mesosphere.UnitTest import mesosphere.marathon.api.v2.Validation._ import mesosphere.marathon.core.pod.BridgeNetwork import mesosphere.marathon.raml.GroupUpdate import mesosphere.marathon.state.Container._ import meso...
Caerostris/marathon
src/test/scala/mesosphere/marathon/api/v2/ModelValidationTest.scala
Scala
apache-2.0
3,713
package com.dbrsn.datatrain.slick import cats.~> import com.dbrsn.datatrain.dsl.meta.ResourceMetadataDSL import com.dbrsn.datatrain.model.Metadata import com.dbrsn.datatrain.model.MetadataKey import com.dbrsn.datatrain.model.MetadataValue import com.dbrsn.datatrain.model.Resource import com.dbrsn.datatrain.model.Resou...
dborisenko/data-train
data-train-slick/src/main/scala/com/dbrsn/datatrain/slick/ResourceMetadataJdbcComponent.scala
Scala
apache-2.0
1,970
package neuroflow.core import breeze.linalg._ import breeze.linalg.operators._ import jcuda.jcublas._ import neuroflow.cuda._ /** * @author bogdanski * @since 09.09.17 */ /** * Updates weights `ws` using derivatives `dws` and `learningRate` for `layer`. */ trait Update[V] { def apply(ws: DenseMatrix[V]...
zenecture/neuroflow
core/src/main/scala/neuroflow/core/Update.scala
Scala
apache-2.0
7,753
/* * The MIT License * * Copyright (c) 2017 Fulcrum Genomics LLC * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to us...
fulcrumgenomics/fgstr
tools/src/main/scala/com/fulcrumgenomics/str/cmdline/FgStrMain.scala
Scala
mit
3,279
import sbt._ object Version { val scala = "2.10.3" val postgresql = "9.1-901.jdbc4" } object Library { val postgresql = "postgresql" % "postgresql" % Version.postgresql } object Dependencies { import Library._ val app = List( postgresql ) }
zeroviscosity/snapp-stack-blog
2-posts/project/Dependencies.scala
Scala
mit
280
/* * This file is part of Gwaihir * Copyright (C) 2013, 2014 Alvaro Polo * * Gwaihir is free software: you can redistribute it and/or modify it under the terms of the GNU * General Public License as published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version...
apoloval/gwaihir
src/main/scala/org/oac/gwaihir/core/ConditionEvaluator.scala
Scala
gpl-2.0
9,765
package ohnosequences.obesnp import java.io.{FilenameFilter, PrintWriter, File} import com.thinkaurelius.titan.core.TitanVertex import htsjdk.variant.vcf.{VCFEncoder, VCFFileReader} import ohnosequences.obesnp.titan._ import scala.collection.JavaConversions._ import scala.collection.mutable object CLI { def getWo...
ohnosequences/obe.SNP
src/main/scala/ohnosequences/obesnp/CLI.scala
Scala
mit
4,509
package org.dagre.euler /** * Euler Problem 28 - Number spiral diagonals * * Starting with the number 1 and moving to the right in a clockwise direction * a 5 by 5 spiral is formed as follows: * * 21 22 23 24 25 * 20 7 8 9 10 * 19 6 1 2 11 * 18 5 4 3 12 * 17 16 15 14 13 * * It can...
dagre/euler
src/main/scala-2.12/org/dagre/euler/Euler28.scala
Scala
apache-2.0
1,412
import _root_.io.gatling.core.scenario.Simulation import ch.qos.logback.classic.{Level, LoggerContext} import io.gatling.core.Predef._ import io.gatling.http.Predef._ import org.slf4j.LoggerFactory import scala.concurrent.duration._ /** * Performance test for the Member entity. */ class MemberGatlingTest extends Si...
igloooooo/Plagueheart
src/test/gatling/simulations/MemberGatlingTest.scala
Scala
apache-2.0
3,320
/* * 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 ...
alec-heif/MIT-Thesis
spark-bin/examples/src/main/scala/org/apache/spark/examples/ml/MinHashLSHExample.scala
Scala
mit
2,674
def greeting4(name: String)(implicit greetWord: String, n: Int):String = greetWord + " " + name + ("!"*n)
grzegorzbalcerek/scala-book-examples
examples/ImplicitParameters4.scala
Scala
mit
108
package io.vamp.persistence.zookeeper import java.util import java.util.concurrent.{ CountDownLatch, TimeUnit } import org.apache.zookeeper.AsyncCallback._ import org.apache.zookeeper.KeeperException.Code import org.apache.zookeeper.Watcher.Event.{ EventType, KeeperState } import org.apache.zookeeper.ZooDefs.Ids impo...
magneticio/vamp
zookeeper/src/main/scala/io/vamp/persistence/zookeeper/ZooKeeperConnection.scala
Scala
apache-2.0
22,676
/* * 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...
hdinsight/spark-powerbi-connector
src/main/scala/com/microsoft/azure/powerbi/extensions/DataFrameExtensions.scala
Scala
apache-2.0
4,306
package reactivemongo.bson /** * Macros for generating `BSONReader` and `SONWriter` implementations for case * at compile time. Invoking these macros is equivalent to writing anonymous * class implementations by hand. * * Example * {{{ * case class Person(name: String, surname: String) * implicit val personHan...
qubell/ReactiveMongo
macros/src/main/scala/interface.scala
Scala
apache-2.0
8,082
/* * 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/amls-frontend
app/controllers/renewal/TotalThroughputController.scala
Scala
apache-2.0
3,985
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distribute...
wvlet/airframe
airframe-rx-html/src/test/scala/wvlet/airframe/rx/html/RxElementTest.scala
Scala
apache-2.0
1,893
/* * 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 ...
aosagie/spark
core/src/test/scala/org/apache/spark/scheduler/dynalloc/ExecutorMonitorSuite.scala
Scala
apache-2.0
12,611
package de.unihamburg.vsis.sddf.test.blocking import org.apache.spark.rdd.RDD import org.scalatest.FunSuite import de.unihamburg.vsis.sddf.indexing.PipeIndexerDummy import de.unihamburg.vsis.sddf.reading.SymPair import de.unihamburg.vsis.sddf.reading.Tuple import de.unihamburg.vsis.sddf.reading.TupleArray import de.u...
numbnut/sddf
src/test/scala/de/unihamburg/vsis/sddf/test/blocking/BlockingTest.scala
Scala
gpl-3.0
2,287
/* * 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 ...
lincoln-lil/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/runtime/utils/TestData.scala
Scala
apache-2.0
30,261
package me.rexim.issuestant.splittree import me.rexim.issuestant.github.model._ object SplitIssueTree { def fromIssue(issue: Issue) = SplitIssueTree(issue.number, issue.title, issue.html_url, Nil) } case class SplitIssueTree(number: Int, title: String, htmlUrl: String, children: List[SplitIssueTree]) { private d...
tsoding/Issuestant
src/main/scala/me/rexim/issuestant/splittree/SplitIssueTree.scala
Scala
mit
531
package synereo.client.modules import japgolly.scalajs.react.extra.router.RouterCtl import synereo.client.SYNEREOMain import SYNEREOMain.Loc import synereo.client.css.{UserTimelineViewCSS} import org.querki.jquery._ import synereo.client.css.{DashboardCSS, SynereoCommanStylesCSS} import japgolly.scalajs.react.{Callba...
LivelyGig/ProductWebUI
sclient/src/main/scala/synereo/client/modules/TimelineView.scala
Scala
apache-2.0
13,181
package org.jetbrains.plugins.scala package lang package psi package types import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.progress.ProgressManager import com.intellij.psi._ import com.intellij.psi.impl.compiled.ClsParameterImpl import com.intellij.psi.search.GlobalSearchScope im...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/types/Compatibility.scala
Scala
apache-2.0
23,281
package scala.slick.lifted import scala.slick.ast.{LiteralNode, IfThen, Node, ConditionalExpr, BaseTypedType, OptionTypedType, TypedType} import scala.slick.SlickException /** `Case` provides a DSL for conditional statements in the query language. * An arbitrary number of `If`...`Then` expressions can be chained, o...
retronym/slick
src/main/scala/scala/slick/lifted/Case.scala
Scala
bsd-2-clause
1,952
/* * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This program 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 Fou...
tesendic/Relite
src/generated/scala/BooleanLongSupervisedTrainingSet.scala
Scala
agpl-3.0
1,114
/** * Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0 * See accompanying LICENSE file. */ package kafka.manager import java.util.Properties import akka.actor.{ActorRef, ActorSystem, Kill, Props} import akka.pattern._ import akka.util.Timeout import com.typesafe.config.{Config, ConfigFactor...
zeph/kafka-manager
test/kafka/manager/TestLogkafkaViewCacheActor.scala
Scala
apache-2.0
3,175
package com.devlaam.simulate.monitor /* Simulator Server to connect to multiple Lora Gateways Copyright (C) 2015 Ruud Vlaming This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, ...
devlaam/lora_simulator
src/main/scala/monitor.scala
Scala
gpl-3.0
7,622
package com.github.jparkie.spark.elasticsearch.transport import com.github.jparkie.spark.elasticsearch.util.SparkEsException import org.elasticsearch.client.{ FilterClient, Client } /** * Restrict access to TransportClient by disabling close() without use of SparkEsTransportClientManager. */ class SparkEsTransportC...
jparkie/Spark2Elasticsearch
src/main/scala/com/github/jparkie/spark/elasticsearch/transport/SparkEsTransportClientProxy.scala
Scala
apache-2.0
557
package reactivedropbox import com.dropbox.core.DbxWriteMode import scala.concurrent.Future import reactivedropbox.core.{SearchResult, DirectoryListing, LocalFile, Entry} import scala.concurrent.duration._ import akka.actor.Cancellable /** * Client interface used for typed actor */ trait Client { /** * Upload...
Rovak/ReactiveDropbox
src/main/scala/reactivedropbox/Client.scala
Scala
mit
1,430
/* * @author Philip Stutz * @author Mihaela Verman * * Copyright 2015 University of Zurich * * 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...
elaverman/cuilt
src/main/scala/com/signalcollect/dcop/algorithms/Algorithms.scala
Scala
apache-2.0
4,392
/* * 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-test/src/test/scala/org/scalatest/JavaMapLoneElementSpec.scala
Scala
apache-2.0
5,741
/* * 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 ...
hequn8128/flink
flink-scala/src/main/scala/org/apache/flink/api/scala/extensions/impl/acceptPartialFunctions/OnGroupedDataSet.scala
Scala
apache-2.0
3,113
/* 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 agree...
sriramkrishnan/scalding
scalding-repl/src/main/scala/com/twitter/scalding/ReplImplicits.scala
Scala
apache-2.0
10,895
package com.nutomic.ensichat.core.interfaces import com.nutomic.ensichat.core.messages.Message trait CallbackInterface { def onMessageReceived(msg: Message): Unit def onConnectionsChanged(): Unit def onContactsUpdated(): Unit }
Nutomic/ensichat
core/src/main/scala/com/nutomic/ensichat/core/interfaces/CallbackInterface.scala
Scala
mpl-2.0
240
/****************************************************************************** * Copyright (c) 2014, Equal Experts Ltd * 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 ...
EqualExperts/Midas
src/test/scala/com/ee/midas/pipes/SocketConnectorSpecs.scala
Scala
bsd-2-clause
4,165
import leon.annotation._ import leon.lang._ object Coins { case class CoinDist(pHead: Real) { def pTail: Real = { require(pHead >= Real(0) && pHead <= Real(1)) Real(1) - pHead } ensuring(res => res >= Real(0) && res <= Real(1)) } def isDist(dist: CoinDist): Boolean = dist.pHead >= Real...
epfl-lara/leon
testcases/proof/proba/Coins.scala
Scala
gpl-3.0
6,819
/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
atollFP/scaloid-converter
src/tests/resources/test.scala
Scala
mit
2,462
/* Copyright 2009-2016 EPFL, Lausanne */ package leon package solvers import leon.utils.{DebugSectionSolver, Interruptible} import purescala.Expressions._ import purescala.Common.Tree import verification.VC import evaluators._ case class SolverContext(context: LeonContext, bank: EvaluationBank) { lazy val reporter...
regb/leon
src/main/scala/leon/solvers/Solver.scala
Scala
gpl-3.0
1,731
/** * Copyright 2013 Genome Bridge 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 law or agreed ...
fnothaft/adam
adam-core/src/test/scala/edu/berkeley/cs/amplab/adam/models/ReferenceRegionSuite.scala
Scala
apache-2.0
5,230
/****************************************************************************** * Copyright © 2017 Maxim Karpov * * * * Licensed under the Apache License, Version 2.0 (the "License"); * ...
makkarpov/play-utils
src/main/scala/ru/makkarpov/playutils/slickutils/MiscSupport.scala
Scala
apache-2.0
1,861
package geotrellis.test.multiband.load import geotrellis.raster.MultibandTile import geotrellis.spark.SpatialKey import geotrellis.spark.etl.hadoop.MultibandGeoTiffHadoopInput import geotrellis.test.TestEnvironment import geotrellis.vector.ProjectedExtent import org.apache.spark.rdd.RDD trait HadoopLoad { self: Test...
geotrellis/geotrellis-integration-tests-tool
src/main/scala/geotrellis/test/multiband/load/HadoopLoad.scala
Scala
apache-2.0
571
import leon.instrumentation._ import leon.invariant._ import leon.annotation._ object MergeSort { sealed abstract class List case class Cons(head:BigInt,tail:List) extends List case class Nil() extends List def size(list:List): BigInt = {list match { case Nil() => BigInt(0) case Cons(x,xs) => 1 + size...
regb/leon
testcases/orb-testcases/depth/MergeSort.scala
Scala
gpl-3.0
1,658
package io.continuum.bokeh package examples package models import widgets.{ DataTable,TableColumn, NumberFormatter,StringFormatter, IntEditor,NumberEditor,StringEditor,SelectEditor} object DataTables extends Example { val mpg = sampledata.autompg object source extends ColumnDataSource { v...
bokeh/bokeh-scala
examples/src/main/scala/models/DataTables.scala
Scala
mit
4,480
package com.enkidu.lignum.parsers.java.expressions import com.enkidu.lignum.parsers.ParserTest import com.enkidu.lignum.parsers.ast.expression.discardable.Select import com.enkidu.lignum.parsers.ast.expression.discardable.binary.MethodInvocation import com.enkidu.lignum.parsers.ast.expression.discardable.dimension.Abs...
marek1840/java-parser
src/test/scala/com/enkidu/lignum/parsers/java/expressions/ClassDeclarationTest.scala
Scala
mit
26,914
package services.actors /** * Envelope for sending payload to a entity with a UUID. * * @param id The receiver of the envelope. * @param payload The payload in this envelope. * @tparam I type of id * @tparam P type of content * * @author zepeng.li@gmail.com */ case class Envelope[I, P](id: I, payload: P)
lizepeng/app.io
modules/services/app/services/actors/Envelope.scala
Scala
apache-2.0
315