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 (c) 2019. Lorem ipsum dolor sit amet, consectetur adipiscing elit. * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan. * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna. * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagi...
BiyuHuang/CodePrototypesDemo
demo/ScalaDemo/src/test/scala/com/wallace/demo/app/UnitSpec.scala
Scala
apache-2.0
1,085
package com.github.mrmechko.strips.model import monocle.macros.{GenLens, Lenses} import com.github.mrmechko.swordnet.structures.SKey /** * Created by mechko on 6/22/15. */ @Lenses("_") case class STripsOntItem(id : String, name : STripsOntName, lexicalItems : List...
mrmechko/STrips
src/main/scala/com/github/mrmechko/strips/model/STripsOntItem.scala
Scala
gpl-2.0
1,168
/* * Licensed to Intel Corporation under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * Intel Corporation licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use t...
SeaOfOcean/BigDL
dl/src/main/scala/com/intel/analytics/bigdl/tensor/ArrayStorage.scala
Scala
apache-2.0
2,354
/* * 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 ...
tejasapatil/spark
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/features/DriverKubernetesCredentialsFeatureStepSuite.scala
Scala
apache-2.0
7,809
/** * Load some tweets stored as JSON data and explore them. */ package com.oreilly.learningsparkexamples.scala import org.apache.spark._ import org.apache.spark.SparkContext._ import org.apache.spark.sql.hive.HiveContext case class HappyPerson(handle: String, favouriteBeverage: String) object SparkSQLTwitter { ...
holdenk/learning-spark-examples
src/main/scala/com/oreilly/learningsparkexamples/scala/SparkSQLTwitter.scala
Scala
mit
2,048
/* * Copyright 2011-2022 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
gatling-core/src/main/scala/io/gatling/core/protocol/package.scala
Scala
apache-2.0
728
package com.twitter.finatra.http.tests.integration.multiserver.add1server import com.twitter.finagle.http.Request import com.twitter.finatra.http.Controller class Add1Controller extends Controller { get("/add1") { request: Request => request.getIntParam("num") + 1 } }
twitter/finatra
http-server/src/test/scala/com/twitter/finatra/http/tests/integration/multiserver/add1server/Add1Controller.scala
Scala
apache-2.0
279
package scala.c.engine package ast import org.eclipse.cdt.core.dom.ast.IASTBinaryExpression.op_assign import org.eclipse.cdt.core.dom.ast._ import org.eclipse.cdt.internal.core.dom.parser.c._ import scala.c.engine.ast.BinaryExpr.evaluate object Declarator { def execute(decl: IASTDeclarator)(implicit state: State)...
bdwashbu/cEngine
src/scala/c/engine/ast/Declarator.scala
Scala
apache-2.0
11,161
// Solution-3.scala // Solution to Exercise 3 in "Classes & Objects" val s1 = "Sally" val s2 = "Sally" if(s1.equals(s2)) { println("s1 and s2 are equal") } else { println("s1 and s2 are not equal") } println("s1: " + s1) println("s2: " + s2) /* OUTPUT_SHOULD_BE s1 and s2 are equal s1: Sally s2: Sally */
P7h/ScalaPlayground
Atomic Scala/atomic-scala-solutions/10_ClassesAndObjects/Solution-3.scala
Scala
apache-2.0
312
/* * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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 b...
hpe-cct/cct-core
src/test/scala/cogx/cogmath/algebra/real/Tensor3Spec.scala
Scala
apache-2.0
4,297
package gitbucket.core.controller.api import gitbucket.core.api.{ApiUser, CreateAUser, JsonFormat, UpdateAUser} import gitbucket.core.controller.ControllerBase import gitbucket.core.service.{AccountService, RepositoryService} import gitbucket.core.util.{AdminAuthenticator, UsersAuthenticator} import gitbucket.core.util...
McFoggy/gitbucket
src/main/scala/gitbucket/core/controller/api/ApiUserControllerBase.scala
Scala
apache-2.0
3,358
package org.scaladebugger.api.profiles.traits.info import org.scaladebugger.test.helpers.ParallelMockFunSpec import org.scalamock.scalatest.MockFactory import org.scalatest.{FunSpec, Matchers, ParallelTestExecution} import test.InfoTestClasses.TestValueInfo import scala.util.Failure class ValueInfoSpec extends Paral...
chipsenkbeil/scala-debugger
scala-debugger-api/src/test/scala/org/scaladebugger/api/profiles/traits/info/ValueInfoSpec.scala
Scala
apache-2.0
15,703
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.libs /** * Provides a cache for reflections, so that classloader scanning over the same classloader for the same package * multiple times doesn't need to be done. * * This is most useful in tests, when each test starts a new ...
wsargent/playframework
framework/src/play-java/src/main/scala/play/libs/ReflectionsCache.scala
Scala
apache-2.0
1,742
package breeze.linalg import breeze.linalg.operators._ import breeze.macros.expand import breeze.linalg.support.{CanSlice, CanTranspose} import breeze.generic.UFunc /** * TODO * * @author dlwh **/ final case class Transpose[+T](val inner: T) extends NumericOps[Transpose[T]] { def repr = this } object Transp...
crealytics/breeze
math/src/main/scala/breeze/linalg/Transpose.scala
Scala
apache-2.0
3,484
package com.twitter.finagle.netty4.transport import com.twitter.concurrent.AsyncQueue import com.twitter.finagle._ import com.twitter.finagle.transport.Transport import com.twitter.util._ import io.netty.{channel => nettyChan} import io.netty.handler.ssl.SslHandler import java.net.SocketAddress import java.security.ce...
koshelev/finagle
finagle-netty4/src/main/scala/com/twitter/finagle/netty4/transport/ChannelTransport.scala
Scala
apache-2.0
7,102
/* * Copyright 2015-2016 IBM Corporation * * 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...
nwspeete-ibm/openwhisk
common/scala/src/main/scala/whisk/core/entity/Exec.scala
Scala
apache-2.0
13,397
/* * Copyright 2009 Ilja Booij * * This file is part of GarminTrainer. * * GarminTrainer 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 lat...
chmandrade/garmintrainer
src/main/scala/nl/iljabooij/garmintrainer/model/ApplicationState.scala
Scala
gpl-3.0
1,283
package com.cloudray.scalapress.plugin.listings.controller.renderer import org.scalatest.{OneInstancePerTest, FunSuite} import org.scalatest.mock.MockitoSugar import com.cloudray.scalapress.plugin.listings.domain.ListingsPlugin /** @author Stephen Samuel */ class ListingPackageRendererTest extends FunSuite with OneIn...
vidyacraghav/scalapress
src/test/scala/com/cloudray/scalapress/plugin/listings/controller/renderer/ListingPackageRendererTest.scala
Scala
apache-2.0
889
package sparkstr import org.apache.spark.rdd.RDD import org.apache.spark.streaming.StreamingContext._ import org.apache.spark.streaming._ import org.apache.spark.streaming.dstream.DStream import scala.collection.mutable /** * Sum values in a stream, by key. */ object StreamSummer { def main(args: Array[String])...
glennmurray/sparkstr
src/main/scala/sparkstr/StreamSummer.scala
Scala
apache-2.0
2,764
class ParamNames { def foo (s: => Seq[Int], s2: => Seq[Any]) {} }
felixmulder/scala
test/files/scalap/paramNames.scala
Scala
bsd-3-clause
68
package org.biosys.pubmed import com.sksamuel.elastic4s.http.index.IndexResponse import com.sksamuel.elastic4s.http.search.SearchResponse import com.sksamuel.elastic4s.http.{HttpClient, RequestFailure, RequestSuccess} import com.sksamuel.elastic4s.searches.queries.SimpleStringQueryDefinition import com.sksamuel.elasti...
sdor/biosys
pubmed/src/main/scala/org/biosys/pubmed/PubmedSearchApi.scala
Scala
gpl-2.0
1,826
package br.unb.cic.poo.gol /* * Em Java, o método Strategy comumente utiliza interfaces para implementar * o código. Em Scala, há várias soluções para a não existência de interfaces; * Uma delas é utilizar Traits como substituição das interfaces, o que foi * escolhido neste código. */ trait Strategy { def sh...
Dans1997/GoL
src/br/unb/cic/poo/gol/Strategy.scala
Scala
gpl-3.0
1,429
package skinny.engine.data import scala.language.reflectiveCalls import skinny.engine.SkinnyEngineException import skinny.engine.implicits.TypeConverter import scala.collection.JavaConverters._ import scala.collection.mutable.Map /** * Adapts attributes from servlet objects (e.g., ServletRequest, HttpSession, * S...
holycattle/skinny-framework
engine/src/main/scala/skinny/engine/data/AttributesMap.scala
Scala
mit
3,260
package org.jetbrains.plugins.scala package codeInsight package intentions package companionObject /** * mattfowler * 5/21/2016 */ class CreateCompanionObjectIntentionTest extends ScalaIntentionTestBase { override val familyName = ScalaBundle.message("family.name.create.companion.object") def testShouldCrea...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/codeInsight/intentions/companionObject/CreateCompanionObjectIntentionTest.scala
Scala
apache-2.0
1,465
object Versions { val Akka = "2.3.9" val AkkaStreams = "0.11" val JDK = "1.7" val Kryo = "3.0.0" val Logback = "1.0.13" val Scala = "2.11.2" val ScalaBinary = "2.11" val ScalaTest = "2.2.1" val Slf4j = "1.6.1" val Specs2 = "...
zentiment/zentiment-miner
project/Versions.scala
Scala
apache-2.0
564
/* * Copyright ActionML, LLC under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * ActionML licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except...
actionml/harness
rest-server/server/src/main/scala/com/actionml/authserver/router/AuthServerProxyRouter.scala
Scala
apache-2.0
1,317
package org.jetbrains.plugins.scala.lang.parser.parsing.types import com.intellij.psi.tree.IElementType import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes._ import org.jetbrains.plugins.scala.lang.parser.ParserNode import org.jetbrains.plugins.sc...
gtache/intellij-lsp
intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/parser/parsing/types/Path.scala
Scala
apache-2.0
1,564
/* * 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/core/src/main/scala/org/apache/spark/sql/execution/streaming/FlatMapGroupsWithStateExec.scala
Scala
apache-2.0
10,982
/* * Copyright 2014 Michael Krolikowski * * 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...
mkroli/dns4s
core/src/test/scala/com/github/mkroli/dns4s/section/resource/AAAAResourceSpec.scala
Scala
apache-2.0
2,691
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
andrewor14/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/statefulOperators.scala
Scala
apache-2.0
12,093
/* * MUSIT is a museum database to archive natural and cultural history data. * Copyright (C) 2016 MUSIT Norway, part of www.uio.no (University of Oslo) * * 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 Softw...
kpmeen/musit
musit-models/src/test/scala/no/uio/musit/models/MuseumIdentifierSpec.scala
Scala
gpl-2.0
2,107
package org.revenj.patterns import java.util.EventListener import scala.reflect.runtime.universe.TypeTag object NotifyOperation extends Enumeration { type NotifyOperation = Value val Insert, Update, Change, Delete = Value def apply(from: String) = { if (from == "Insert") { Insert } else if (from ...
tferega/revenj
scala/Interfaces/src/main/scala/org/revenj/patterns/IDataChangeNotification.scala
Scala
bsd-3-clause
819
/* * Copyright (C) 2016-2017 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.javadsl.persistence.jdbc import com.google.inject.{ AbstractModule, Key } import com.lightbend.lagom.internal.javadsl.persistence.jdbc.{ JavadslJdbcOffsetStore, JdbcPersistentEntityRegistry, JdbcReadSideImpl, JdbcS...
edouardKaiser/lagom
persistence-jdbc/javadsl/src/main/scala/com/lightbend/lagom/javadsl/persistence/jdbc/JdbcPersistenceModule.scala
Scala
apache-2.0
977
package legacy import java.net.URLEncoder import org.apache.spark.rdd.RDD import org.json4s.NoTypeHints import org.json4s.jackson.Serialization import org.json4s.jackson.Serialization._ import utilities.RequestExecutor import scala.util.parsing.json.JSON object UPMEmotionAnalysisService { // The elements of the...
canademar/me_extractors
DockerSparkPipeline/src/main/scala/legacy/UPMEmotionAnalysisService.scala
Scala
gpl-2.0
4,552
package org.danielnixon.extrawarts import org.scalatest.FunSuite import org.wartremover.test.WartTestTraverser class UnsafeContainsTest extends FunSuite { test("can't use SeqLike#contains") { val result = WartTestTraverser(UnsafeContains) { val foo = Seq().contains(1) } assertResult(List("[wartre...
danielnixon/extrawarts
core/src/test/scala/org/danielnixon/extrawarts/UnsafeContainsTest.scala
Scala
apache-2.0
832
import utils.SetInt object BearAndWorkbook { def readSeqInt() = io.StdIn.readLine().split(" ").toList.map(_.toInt) def main(args: Array[String]) { val chapterNum :: chapterMaxProblemNum :: Nil = readSeqInt() val problems = readSeqInt() val pages = problems.flatMap(problemNum => { type Contain =...
1178615156/hackerrank
src/main/scala/HourRank_6/BearAndWorkbook.scala
Scala
apache-2.0
916
package ryu import org.specs._ /** note: expects a running riak server running * on localhost@8098 */ object RyuSpec extends Specification { "Ryu" should { val db = Ryu("localhost",8098) "store a document given a key" in { val key = ^('fighters, "ryu") val value = "test" val (...
softprops/ryu
src/test/scala/ryu/RyuSpec.scala
Scala
mit
3,436
/* * 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 ...
sryza/spark
core/src/test/scala/org/apache/spark/scheduler/FakeTask.scala
Scala
apache-2.0
1,092
package io.github.finagle.serial.tests import com.twitter.finagle.{Client, ListeningServer, Server, Service} import com.twitter.util.{Await, Future, Try} import io.github.finagle.serial.Serial import java.net.{InetAddress, InetSocketAddress} import org.scalatest.Matchers import org.scalatest.prop.Checkers import org.s...
finagle/finagle-serial
tests/src/main/scala/io/github/finagle/serial/tests/SerialIntegrationTest.scala
Scala
apache-2.0
2,140
package com.bigchange.train import java.awt.image.BufferedImage import java.io.File import javax.imageio.ImageIO import com.bigchange.util.{FileUtil} import org.apache.spark.mllib.classification._ import org.apache.spark.mllib.evaluation.MulticlassMetrics import org.apache.spark.mllib.feature.StandardScaler import or...
bigchange/AI
src/main/scala/com/bigchange/train/ObjectRecognitionInImages.scala
Scala
apache-2.0
6,192
package com.softwaremill.vesplar.config import com.typesafe.config.Config import twitter4j.conf.ConfigurationBuilder trait TwitterConfig { def rootConfig: Config private lazy val oauthTwitterConfig = rootConfig.getConfig("twitter.oauth") lazy val twitterOAuthConsumerKey = oauthTwitterConfig.getString("consume...
adamw/vesplar
analyzer/src/main/scala/com/softwaremill/vesplar/config/TwitterConfig.scala
Scala
apache-2.0
898
package controllers import play.api._ import play.api.mvc._ import play.api.libs._ import play.api.libs.iteratee._ import Play.current import java.io._ /** * Controller that serves static resources from an external folder. * It useful in development mode if you want to serve static assets that shouldn't be part o...
michaelahlers/team-awesome-wedding
vendor/play-2.2.1/framework/src/play/src/main/scala/play/api/controllers/ExternalAssets.scala
Scala
mit
1,970
package org.bitcoins.commons.jsonmodels.wallet import org.bitcoins.crypto.{DoubleSha256DigestBE, StringFactory} sealed abstract class WalletStateDescriptorType object WalletStateDescriptorType extends StringFactory[WalletStateDescriptorType] { final case object SyncHeight extends WalletStateDescriptorType ...
bitcoin-s/bitcoin-s
app-commons/src/main/scala/org/bitcoins/commons/jsonmodels/wallet/WalletStateDescriptor.scala
Scala
mit
2,202
/* * 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 ...
ddna1021/spark
core/src/main/scala/org/apache/spark/scheduler/LiveListenerBus.scala
Scala
apache-2.0
9,971
package bad.robot.temperature.server import java.time.format.DateTimeFormatter import bad.robot.temperature.{Error, JsonToCsv} import cats.effect.IO import org.http4s.HttpService import org.http4s.MediaType.`text/csv` import org.http4s.dsl.io._ import org.http4s.headers.{`Content-Disposition`, `Content-Type`} import...
tobyweston/temperature-machine
src/main/scala/bad/robot/temperature/server/ExportEndpoint.scala
Scala
apache-2.0
735
/* * Copyright (c) 2021, Daniel Spiewak * 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 cond...
djspiewak/gll-combinators
examples/src/miniml/MiniMLParser.scala
Scala
apache-2.0
3,193
package com.virdis.ddlconc import org.scalatest.FunSpec class HelloWorldSpec extends FunSpec { describe("Adding 1 to 1") { it("should equals 2"){ assert(1+1 == 2) } } }
virdis/ddl-concordance
src/test/scala/HelloWorldSpec.scala
Scala
mit
190
/* * 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
mllib/src/test/scala/org/apache/spark/ml/classification/LogisticRegressionSuite.scala
Scala
apache-2.0
117,826
package at.logic.gapt.proofs.ceres import at.logic.gapt.cutintro.CutIntroduction import at.logic.gapt.formats.llk._ import at.logic.gapt.examples._ import at.logic.gapt.expr._ import at.logic.gapt.expr.fol.Numeral import at.logic.gapt.expr.hol.isAtom import at.logic.gapt.formats.ClasspathInputFile import at.logic.gapt...
gebner/gapt
tests/src/test/scala/at/logic/gapt/proofs/ceres/CeresTest.scala
Scala
gpl-3.0
3,770
/* * Copyright 2016 okumin * * 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 wr...
okumin/influent
influent-java/src/test/scala/influent/forward/NioUdpHeartbeatServerSpec.scala
Scala
apache-2.0
5,028
package rwsscala.ichiba import rwsscala._ import scalaz._, Scalaz._ sealed trait ShipOverseaStatus case object DisableShipOversea extends ShipOverseaStatus case class AcceptShipOversea(areas: List[OverseaArea]) extends ShipOverseaStatus object ShipOverseaStatus { def parseAreasVld(str: String): Validation[ApiErr...
nisshiee/rws-scala
core/src/main/scala/core/ichiba/response/ShipOverseaStatus.scala
Scala
mit
900
package io.tripod.pipeline.osm.pbf import java.nio.file.Paths import java.time.Instant import akka.actor.ActorSystem import akka.stream.ActorMaterializer import akka.stream.scaladsl.{FileIO, Sink} import io.tripod.pipeline.osm.pbf.model._ import org.scalatest.{Matchers, WordSpec} import org.scalatest.concurrent.{Inte...
tripod-oss/osm-pbf-pipeline
src/test/scala/io/tripod/pipeline/osm/pbf/PbfStreamFlowSpec.scala
Scala
mit
5,927
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
minixalpha/spark
core/src/main/scala/org/apache/spark/api/python/PythonRunner.scala
Scala
apache-2.0
15,078
/* * Copyright 2007-2012 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
lzpfmh/framework-2
web/webkit/src/main/scala/net/liftweb/http/NamedCometActorTrait.scala
Scala
apache-2.0
1,440
package org.scaladebugger.docs.layouts.partials.common import org.scaladebugger.docs.styles.SidebarNavStyle import org.senkbeil.grus.structures.MenuItem import scalatags.Text.all._ /** * Generates the side menu. */ object SideMenu { private val menuItemBefore = Nil //Seq(":: ", "** ", "... ") private val menuI...
ensime/scala-debugger
scala-debugger-docs/src/main/scala/org/scaladebugger/docs/layouts/partials/common/SideMenu.scala
Scala
apache-2.0
1,805
/* * Copyright 2022 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/self-service-time-to-pay-frontend
test/testsupport/RichMatchers.scala
Scala
apache-2.0
1,090
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
shuangshuangwang/spark
core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala
Scala
apache-2.0
53,755
package org.phenoscape.kb.ingest.zfin import scala.collection.JavaConversions._ import scala.collection.mutable import scala.io.Source import org.apache.commons.lang3.StringUtils import org.phenoscape.kb.ingest.util.Vocab._ import org.phenoscape.scowl.Functional._ import org.phenoscape.scowl._ import org.semanticweb....
calliem/phenoscape-kb-ingest
src/main/scala/org/phenoscape/kb/ingest/zfin/ZFINGeneticMarkersToOWL.scala
Scala
mit
1,524
package concrete package constraint package linear import Linear.maxTimes import Linear.minTimes import bitvectors.BitVector import concrete.util.Interval import scala.collection.immutable.IntMap object IncrementalBoundPropagation { sealed trait POutcome case object PContradiction extends POutcome case class P...
concrete-cp/concrete
src/main/scala/concrete/constraint/linear/IncrementalBoundPropagation.scala
Scala
lgpl-2.1
3,592
/* * Copyright 2016 Dennis Vriend * * 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...
prettynatty/akka-persistence-jdbc
src/test/scala/akka/persistence/jdbc/generator/AkkaPersistenceGen.scala
Scala
apache-2.0
1,767
import connector.CloudPubsubUtils import com.google.api.services.pubsub.Pubsub import com.google.api.services.pubsub.model.PublishRequest import com.google.api.services.pubsub.model.PublishResponse import com.google.api.services.pubsub.model.PubsubMessage import com.google.common.collect.ImmutableList // Implicit conve...
nlpraveennl/cloud-bigtable-examples
scala/spark-pubsub/cloud-pubsub-producer/src/main/scala/CloudPubsubProducer.scala
Scala
apache-2.0
1,816
package org.dy.lint import org.dy.lint.warning.Warning import org.dy.lint.format.Format import io.Source import collection.mutable.ArrayBuffer import collection.mutable.HashMap class File(val fileName: String, val encoding: String) extends FileBase { val warnings = HashMap[Int, Warning]() val warningLines = Arra...
at15/scalac-log-formatter
src/main/scala/org/dy/lint/File.scala
Scala
mit
1,112
package blended.file import java.io.File import akka.actor.{ActorRef, ActorSystem, Props} import akka.stream.scaladsl.{Flow, Keep, Sink, Source} import akka.stream._ import akka.util.ByteString import blended.streams.message.{FlowEnvelope, FlowMessage} import blended.streams.transaction.FlowHeaderConfig import blende...
lefou/blended
blended.file/src/test/scala/blended/file/FileDropStageSpec.scala
Scala
apache-2.0
3,283
trait Generic[T] { type Repr def to(t: T): Repr def from(r: Repr): T } object Generic { type Aux[T, Repr0] = Generic[T] { type Repr = Repr0 } } object ListInstances { type LRepr[T] = Either[::[T], Either[Nil.type, Unit]] type CRepr[T] = (T, (List[T], Unit)) type NRepr = Unit implicit def genList[T]: ...
dotty-staging/dotty
tests/run/byname-implicits-17.scala
Scala
apache-2.0
2,121
/* * 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 ...
yanboliang/spark
core/src/test/scala/org/apache/spark/scheduler/TaskSetManagerSuite.scala
Scala
apache-2.0
67,943
package com.todesking.sharrrd import org.specs2.mutable._ import org.specs2.specification.Scope class SharrrdSpec extends Specification { case class TestKey(id:Int) case class TestNode(id:Int) def testHash(key:TestKey):Int = key.id % 3 class TestHashRing(mapping:Map[Int, TestNode]) extends HashRing[Int, Tes...
todesking/sharrrd
src/test/scala/sharrrd.scala
Scala
mit
4,222
package com.sksamuel.elastic4s.mappings import com.sksamuel.elastic4s.mappings.dynamictemplate.{DynamicMapping, DynamicTemplateBodyFn} import org.elasticsearch.common.xcontent.{XContentBuilder, XContentFactory} import scala.collection.JavaConverters._ object MappingContentBuilder { def build(d: MappingDefinitionL...
FabienPennequin/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/mappings/MappingContentBuilder.scala
Scala
apache-2.0
2,936
package net.sansa_stack.rdf.spark.stats import com.holdenkarau.spark.testing.DataFrameSuiteBase import net.sansa_stack.rdf.spark.io._ import org.apache.jena.datatypes.xsd.XSDDatatype import org.apache.jena.graph.NodeFactory import org.apache.jena.riot.Lang import org.scalatest.FunSuite class RDFStatsTests extends Fun...
SANSA-Stack/Spark-RDF
sansa-rdf-spark/src/test/scala/net/sansa_stack/rdf/spark/stats/RDFStatsTests.scala
Scala
gpl-3.0
10,055
import sbt._ class RingBufferProject(info: ProjectInfo) extends DefaultProject(info) { val specs = "org.scala-tools.testing" % "specs_2.8.0" % "1.6.5" % "test" }
jmhodges/ring_buffer
project/build/RingBufferProject.scala
Scala
mit
168
/* * 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 ...
wgpshashank/spark
core/src/test/scala/spark/SizeEstimatorSuite.scala
Scala
apache-2.0
6,634
/* * 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 ...
chenc10/Spark-PAF
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/PruningSuite.scala
Scala
apache-2.0
6,038
package me.jamesphiliprobinson.utilities.implicits /** * Created by James Robinson on 22/04/2016. */ object ThreadingConversions { implicit def funcToRunnable(func: => Any) = new Runnable { def run = func } }
etothepii/utilities
src/main/scala/me/jamesphiliprobinson/utilities/implicits/ThreadingConversions.scala
Scala
apache-2.0
222
package net.fluxo.plugins.kas import net.xeoh.plugins.base.Plugin import org.apache.log4j.Level /** * @author Ronald Kurniawan (viper) * @version 0.1, 25/01/15 */ trait TrKas extends Plugin { def primaryCommand(): String def setMailLoggerName(name: String) def process(fullCommand: Array[String]): String def w...
fluxodesign/DownloadDaemon
src/main/scala/net/fluxo/plugins/kas/TrKas.scala
Scala
gpl-2.0
365
package iwct.graphx.heap /** * Created by yuhc on 3/25/15. */ class Heap { }
sjtu-iiot/graphx-algorithm
src/main/scala/org/apache/spark/graphx/iiot/heap/Heap.scala
Scala
gpl-2.0
81
/** * Copyright 2011-2016 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...
GabrielPlassard/gatling
gatling-recorder/src/main/scala/io/gatling/recorder/ui/swing/component/TextAreaPanel.scala
Scala
apache-2.0
1,056
/* * 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
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/ReplaceTableExec.scala
Scala
apache-2.0
3,592
package org.ensime.server import akka.util.ByteString import org.ensime.api._ import org.ensime.jerk._ import spray.json._ class JerkProtocol extends FramedStringProtocol { import JerkEnvelopeFormats._ override def encode(resp: RpcResponseEnvelope): ByteString = writeString(resp.toJson.compactPrint) override ...
eddsteel/ensime
server/src/main/scala/org/ensime/server/JerkProtocol.scala
Scala
gpl-3.0
657
/* * 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 ...
michalsenkyr/spark
sql/core/src/test/scala/org/apache/spark/sql/test/SharedSparkSession.scala
Scala
apache-2.0
4,571
package com.cloudwick.generator.osge /** * Class for wrapping default command line options * @author ashrith */ case class OptionsConfig( eventsPerSec: Int = 1, fileFormat: String = "tsv", filePath: String = "/tmp", fileRollSize: Int = Int.MaxValue, // in bytes totalEvents: Long = 1000, flushBatch: Int ...
davinashreddy/generator
src/main/scala/com/cloudwick/generator/osge/OptionsConfig.scala
Scala
apache-2.0
413
package scala.slick.jdbc.meta import java.sql._ import scala.slick.jdbc.{ResultSetInvoker, UnitInvoker} import scala.slick.ql.TypeMapperDelegate /** * A wrapper for a row in the ResultSet returned by DatabaseMetaData.getFunctionColumns(). */ case class MFunctionColumn( function: MQName, column: String, columnType...
szeiger/scala-query
src/main/scala/scala/slick/jdbc/meta/MFunctionColumn.scala
Scala
bsd-2-clause
2,132
package com.gilt.gfc.aws.cloudwatch.periodic.metric import com.gilt.gfc.aws.cloudwatch.periodic.metric.aggregator.CloudWatchMetricDataAggregatorBuilder import scala.concurrent.duration.FiniteDuration import scala.language.postfixOps /** * Maintains state necessary to aggregate metrics on the client side. * Interfa...
gilt/gfc-aws-cloudwatch
src/main/scala/com/gilt/gfc/aws/cloudwatch/periodic/metric/CloudWatchMetricDataAggregator.scala
Scala
apache-2.0
3,738
package com.twitter.finagle.memcached.unit import com.twitter.finagle.memcached._ import com.twitter.finagle.memcached.protocol.Value import scala.collection.immutable import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import org.scalatest.mock.MockitoSugar @RunWith(c...
suls/finagle
finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/GetResultTest.scala
Scala
apache-2.0
2,150
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j 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 Foundatio...
HuangLS/neo4j
community/cypher/frontend-2.3/src/test/scala/org/neo4j/cypher/internal/frontend/v2_3/helpers/StringHelperTest.scala
Scala
apache-2.0
1,555
import scala.util.parsing.combinator.RegexParsers class Timed case class Entry(name:String,startTime:Double,runTime:Double,extra:String) extends Timed case class ThreadEntry(name:String) extends Timed object BIParser extends RegexParsers { def number: Parser[Double] = """\\d+\\.\\d*""".r ^^ { _.toDouble...
PaulKeeble/BIProfileSummary
src/main/scala/BIParser.scala
Scala
gpl-2.0
1,303
package xitrum /** * Actions extending FutureAction will be run asynchronously in a future. The * execution context is xitrum.Config.actorSystem.dispatcher. * * See also Action and ActorAction. */ trait FutureAction extends Action
xitrum-framework/xitrum
src/main/scala/xitrum/FutureAction.scala
Scala
mit
237
package com.twitter.finagle.loadbalancer.p2c import com.twitter.finagle.loadbalancer.EndpointFactory import com.twitter.finagle.stats.{NullStatsReceiver, StatsReceiver} import com.twitter.finagle.util.Rng import com.twitter.finagle.{Address, NoBrokersAvailableException, ServiceFactory} import com.twitter.util.{Activit...
koshelev/finagle
finagle-core/src/test/scala/com/twitter/finagle/loadbalancer/p2c/P2CSuite.scala
Scala
apache-2.0
1,393
/** * Copyright 2011-2012 eBusiness Information, Groupe Excilys (www.excilys.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 * *...
Tjoene/thesis
Case_Programs/gatling-1.4.0/gatling-http/src/main/scala/com/excilys/ebi/gatling/http/ahc/GatlingHttpClient.scala
Scala
gpl-2.0
3,067
/* * La Trobe University - Distributed Deep Learning System * Copyright 2016 Matthias Langer (t3l@threelights.de) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apa...
bashimao/ltudl
blaze/src/main/scala/edu/latrobe/blaze/batchpools/Augmenter.scala
Scala
apache-2.0
3,447
package com.twitter.finagle.exp.mysql.transport import org.jboss.netty.buffer.ChannelBuffers import org.jboss.netty.channel.{Channel, ChannelHandlerContext} import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import org.scalatest.mock.MockitoSugar import org.specs.mock....
JustinTulloss/finagle
finagle-mysql/src/test/scala/com/twitter/finagle/mysql/unit/transport/PacketFrameDecoderTest.scala
Scala
apache-2.0
1,111
/* ASIB - A Scala IRC Bot Copyright (C) 2012 Iain Cambridge This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later versio...
icambridge-old/asib
src/main/scala/asib/util/logger/ConsoleRaw.scala
Scala
gpl-3.0
842
package org.embulk.output.fluentd import org.embulk.spi.time.TimestampFormatter import org.embulk.spi.{Column, PageReader, ColumnVisitor => EmbulkColumnVisitor} case class ColumnVisitor(reader: PageReader, timestampFormatter: TimestampFormatter) extends EmbulkColumnVisitor { import scala.collection.mutable priva...
smdmts/embulk-output-fluentd
src/main/scala/org/embulk/output/fluentd/ColumnVisitor.scala
Scala
mit
1,469
/** * Copyright (c) 2014 Marco Sarti <marco.sarti at gmail.com> * * 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 use, ...
elogiclab/guardbee
modules/core/app/com/elogiclab/guardbee/core/Authentication.scala
Scala
mit
1,787
package com.twitter.inject.thrift.integration.http_server import javax.inject.Inject import com.twitter.finagle.http.Request import com.twitter.finatra.http.Controller import com.twitter.test.thriftscala.EchoService import com.twitter.util.Future class EchoHttpController @Inject()( echoThriftService: EchoService[F...
tom-chan/finatra
inject/inject-thrift-client/src/test/scala/com/twitter/inject/thrift/integration/http_server/EchoHttpController.scala
Scala
apache-2.0
616
/* * 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 ...
sh-cho/cshSpark
shuffle/BlockStoreShuffleReader.scala
Scala
apache-2.0
5,238
package com.sksamuel.scapegoat.inspections.collections import com.sksamuel.scapegoat._ /** @author Stephen Samuel */ class FilterDotHead extends Inspection { def inspector(context: InspectionContext): Inspector = new Inspector(context) { override def postTyperTraverser = Some apply new context.Traverser { ...
pwwpche/scalac-scapegoat-plugin
src/main/scala/com/sksamuel/scapegoat/inspections/collections/FilterDotHead.scala
Scala
apache-2.0
913
package storage /** * Created by pnagarjuna on 02/06/15. */ object Storage { trait StorageMessage case class Get(key: String) extends StorageMessage case class Entry(key: String, value: String) extends StorageMessage case class Evict(key: String) extends StorageMessage trait ReplicaMessage case ...
pamu/discuss
app/storage/Storage.scala
Scala
apache-2.0
456
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
SRGOM/scalatest
scalatest/src/main/scala/org/scalatest/words/ResultOfNotWordForAny.scala
Scala
apache-2.0
40,700
package relational.orm import relational._ import scala.reflect.ClassTag import java.lang.reflect.Field import relational.results.Attributes import relational.orm.mapper.LazyResultSet import relational.clauses.Select class Mapper[A](implicit val tag: ClassTag[A]) extends QueryBase[LazyResultSet[A]] with mappe...
mauricioszabo/relational-scala
src/main/scala/relational/orm/Mapper.scala
Scala
artistic-2.0
2,395
package papercode.Sec4OA import papercode.Common trait Code3 extends Common { //BEGIN_BASE_OA_PARSER_BAD trait Attempt[E] { lexical.delimiters += "+" val pLit: Alg[E] => Parser[E] = alg => numericLit ^^ { x => alg.lit(x.toInt) } val pAdd: Alg[E] => Parser[E] = alg => pExpr(alg) ~ ("+" ~> pExpr(alg)) ^^...
hy-zhang/parser
SLE_17/code/src/papercode/Sec4OA/Code3.scala
Scala
bsd-3-clause
1,303
/* * Copyright 2013-2015 Websudos, Limited. * * 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 of c...
analytically/phantom
phantom-dsl/src/main/scala/com/websudos/phantom/builder/serializers/CreateQueryBuilder.scala
Scala
bsd-2-clause
7,042