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 blended.activemq.client import java.util.UUID import akka.actor.ActorSystem import akka.pattern.after import blended.container.context.api.ContainerContext import blended.jms.utils.{IdAwareConnectionFactory, JmsDestination} import blended.streams.FlowHeaderConfig import blended.streams.jms.{JmsEnvelopeHeader,...
woq-blended/blended
blended.activemq.client/src/main/scala/blended/activemq/client/RoundtripConnectionVerifier.scala
Scala
apache-2.0
4,487
/* Copyright 2017-19, Emmanouil Antonios Platanios. All Rights Reserved. * * 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 ...
eaplatanios/tensorflow_scala
modules/api/src/main/scala/org/platanios/tensorflow/api/implicits/ops/ControlFlowImplicits.scala
Scala
apache-2.0
1,559
package com.github.simy4.xpath.scala.xpath trait ToXPathLiteral { implicit def toXPathLiteral(sc: StringContext): XPathLiteral = new XPathLiteral(sc) }
SimY4/xpath-to-xml
xpath-to-xml-scala/src/main/scala-2-/com/github/simy4/xpath/scala/xpath/ToXPathLiteral.scala
Scala
apache-2.0
155
package org.vitrivr.adampro.data.index import org.apache.spark.sql.{DataFrame, SaveMode} import org.vitrivr.adampro.config.AttributeNames import org.vitrivr.adampro.data.entity.Entity.AttributeName import org.vitrivr.adampro.distribution.partitioning.{PartitionMode, PartitionerChoice} import org.vitrivr.adampro.distri...
dbisUnibas/ADAMpro
src/main/scala/org/vitrivr/adampro/data/index/IndexPartitioner.scala
Scala
mit
3,849
package com.wmb.spark.experiments; /** * a simple app to test the scala develop environment configuration */ import scala.math.random object SimpleScalaApp { def main(args: Array[String]) { var results = 0.0 for (i <- 1 to 1000000) { val x = random * 3 results += x } println("resul...
robmurray/experimentsonspark
src/main/scala/com/wmb/spark/experments/SimpleScalaApp.scala
Scala
apache-2.0
340
package com.tribbloids.spookystuff.parsing import com.tribbloids.spookystuff.parsing.Pattern.{CharToken, EndOfStream, Token} object ParsingRun { case class ResultSeq( self: Seq[(Seq[Token], RuleOutcome[Any], Rule)] ) { lazy val outputs: Seq[Any] = self.flatMap(v => v._2.export) lazy val outputToS...
tribbloid/spookystuff
mldsl/src/main/scala/com/tribbloids/spookystuff/parsing/ParsingRun.scala
Scala
apache-2.0
1,606
package org.fayalite.util.img import java.io.File import javax.imageio.ImageIO import com.github.sarxos.webcam.Webcam object WebCamTestHelp { def main(args: Array[String]) { val webcam = Webcam.getDefault() webcam.open() val img = webcam.getImage val byt = webcam.getImageBytes /* we...
ryleg/fayalite
experimental/src/main/scala/org/fayalite/util/img/WebCamTestHelp.scala
Scala
mit
529
/* * 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...
travisbrown/scalatest
src/test/scala/org/scalatest/ListShouldContainOnlySpec.scala
Scala
apache-2.0
38,760
package chess private[chess] case class Magic(mask: Long, factor: Long, offset: Int) private[chess] object Magic { // Fixed shift white magics found by Volker Annuss. // From: http://www.talkchess.com/forum/viewtopic.php?p=727500&t=64790 val tableSize = 88772 val rook = Array( Magic(0x000101010101017eL,...
niklasf/scalachess
src/main/scala/Magic.scala
Scala
mit
7,950
/* ,i::, :;;;;;;; ;:,,::;. 1ft1;::;1tL t1;::;1, :;::; _____ __ ___ __ fCLff ;:: tfLLC / ___/ / |/ /____ _ _____ / /_ CLft11 :,, i1tffLi \\__ \\ ____ / /|_/ ...
S-Mach/s_mach.i18n
src/main/scala/s_mach/i18n/impl/DefaultUTF8Messages.scala
Scala
mit
4,074
/* * 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 ...
szhem/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/UnsupportedOperationChecker.scala
Scala
apache-2.0
16,995
package com.monsanto.arch.kamon.prometheus.converter import java.util.concurrent.{ArrayBlockingQueue, ThreadPoolExecutor, TimeUnit} import akka.kamon.instrumentation.AkkaDispatcherMetrics import com.monsanto.arch.kamon.prometheus.KamonTestKit._ import com.monsanto.arch.kamon.prometheus.converter.SnapshotConverter.{Ka...
MonsantoCo/kamon-prometheus
library/src/test/scala/com/monsanto/arch/kamon/prometheus/converter/SnapshotConverterSpec.scala
Scala
bsd-3-clause
58,786
/* * 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
deploy/SparkCuratorUtil.scala
Scala
apache-2.0
2,384
implicit object MonoidProduct extends Monoid[Product] { override def mempty = Product(1) override def mappend(a: Product, b: Product) = Product(a.value * b.value) }
grzegorzbalcerek/scala-exercises
Monoid/stepMonoidProduct.scala
Scala
bsd-2-clause
169
/* * 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/logical/Resolvable.scala
Scala
apache-2.0
1,819
package com.landoop.streamreactor.hive.it import org.apache.kafka.clients.producer.ProducerRecord import scala.concurrent.Future import scala.io.Source import scala.util.Try object HiveOrcBenchmark extends App with PersonTestData with HiveTests { import scala.concurrent.ExecutionContext.Implicits.global val st...
datamountaineer/stream-reactor
kafka-connect-hive/it/src/test/scala/com/landoop/streamreactor/hive/it/HiveOrcBenchmark.scala
Scala
apache-2.0
1,489
/* * 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 ...
mylog00/flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/expressions/KeywordParseTest.scala
Scala
apache-2.0
2,198
/* * 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 ...
darionyaphet/spark
sql/core/src/test/scala/org/apache/spark/sql/sources/BucketedReadSuite.scala
Scala
apache-2.0
34,300
package com.twitter.finatra.http.integration.doeverything.main.domain import javax.inject.Inject import com.twitter.finagle.http.Request import com.twitter.finatra.request.{JsonIgnoreBody, RouteParam} case class IdAndNameRequest( @RouteParam id: Long, name: String) case class IdRequest( @RouteParam id: Long, ...
joecwu/finatra
http/src/test/scala/com/twitter/finatra/http/integration/doeverything/main/domain/IdAndNameRequest.scala
Scala
apache-2.0
485
package org.jetbrains.plugins.scala package base import java.io.File import com.intellij.openapi.module.Module import com.intellij.openapi.project.Project import com.intellij.openapi.projectRoots.{JavaSdk, Sdk} import com.intellij.openapi.roots._ import com.intellij.openapi.roots.libraries.Library import com.intellij...
whorbowicz/intellij-scala
test/org/jetbrains/plugins/scala/base/ScalaLibraryLoader.scala
Scala
apache-2.0
6,281
/* * 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 ...
brad-kaiser/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/nullExpressions.scala
Scala
apache-2.0
13,756
package ru.avhaliullin.whatever.frontend import java.io.File import ru.avhaliullin.whatever.common.CompilationException import ru.avhaliullin.whatever.frontend.sources.{SourceTree, SourceTreeNode} import ru.avhaliullin.whatever.frontend.syntax.{Parser, SyntaxTree, Expression} import scala.io.Source /** * @author ...
avhaliullin/whatever-compiler
compiler/src/main/scala/ru/avhaliullin/whatever/frontend/Frontend.scala
Scala
mit
1,038
package com.twitter.finatra.http.tests.routing import com.twitter.finatra.http.internal.routing.PathPattern import com.twitter.inject.Test import java.net.URI class PathPatternTest extends Test { test("routes") { PathPattern("/cars").extract("/cars") should equal(Some(Map())) PathPattern("/cars").extract("...
twitter/finatra
http-server/src/test/scala/com/twitter/finatra/http/tests/routing/PathPatternTest.scala
Scala
apache-2.0
3,335
package org.akkamon.core import akka.actor.Actor import akka.contrib.pattern.ReceivePipeline import scala.reflect.runtime.universe trait ActorStack extends Actor with ReceivePipeline { var actorName = self.path.name; // use the reflect module to get a reference to our object instance private val runtimeMirror...
josdirksen/akka-mon
src/main/scala/org/akkamon/core/ActorStack.scala
Scala
mit
548
package lila.ai import scala.collection.JavaConversions._ import akka.actor._ import akka.pattern.pipe import com.typesafe.config.{ Config => TypesafeConfig } import lila.common.PimpedConfig._ final class Env( c: TypesafeConfig, uciMemo: lila.game.UciMemo, db: lila.db.Env, system: ActorSystem) { ...
pavelo65/lila
modules/ai/src/main/Env.scala
Scala
mit
1,859
package com.arcusys.learn.exceptions case class NotAuthorizedException(message: String = null) extends Exception(message)
ViLPy/Valamis
learn-portlet/src/main/scala/com/arcusys/learn/exceptions/NotAuthorizedException.scala
Scala
lgpl-3.0
123
/* * Copyright 2016 Nicolas Rinaudo * * 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...
nrinaudo/kantan.regex
core/shared/src/main/scala/kantan/regex/ops/package.scala
Scala
apache-2.0
656
package scorex.lagonaki.integration.api import org.scalatest.{FunSuite, Matchers} import play.api.libs.json.JsValue import scorex.block.Block import scorex.crypto.encode.Base58 import scorex.lagonaki.TransactionTestingCommons class TransactionsAPISpecification extends FunSuite with Matchers with TransactionTestingCom...
ScorexProject/Scorex-Lagonaki
src/test/scala/scorex/lagonaki/integration/api/TransactionsAPISpecification.scala
Scala
cc0-1.0
2,301
package me.apidoc.swagger import com.wordnik.swagger.{models => swagger} import com.wordnik.swagger.models.properties.{ArrayProperty, Property, RefProperty} private[swagger] case class MyDefinition(name: String, definition: swagger.Model) { /** * the list of types that this definition depends on */ val d...
Seanstoppable/apidoc
swagger/src/main/scala/me/apidoc/swagger/ModelSelector.scala
Scala
mit
2,289
package com.sksamuel.elastic4s import com.sksamuel.elastic4s.ElasticDsl._ import com.sksamuel.elastic4s.mappings.FieldType.NestedType import org.scalatest.{ Matchers, FreeSpec } class NestedQueryTest extends FreeSpec with Matchers with ElasticSugar { client.execute { create index "nested" mappings { "sho...
l15k4/elastic4s
elastic4s-core/src/test/scala/com/sksamuel/elastic4s/NestedQueryTest.scala
Scala
apache-2.0
1,191
class Test { def this(un: Int) = { this() def test(xs: List[Int]) = xs map (x => x) () } }
felixmulder/scala
test/pending/run/t3832.scala
Scala
bsd-3-clause
184
/* * 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.tools.nsc.transf...
martijnhoekstra/scala
src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala
Scala
apache-2.0
34,030
package aima.core.environment.map2d /** * @author Shawn Garner */ final class LabeledGraph[Vertex, Edge] { import scala.collection.mutable val globalEdgeLookup = new mutable.LinkedHashMap[Vertex, mutable.LinkedHashMap[Vertex, Edge]]() // TODO: get rid of mutability; ListMap should work val vertexLabelsList =...
aimacode/aima-scala
core/src/main/scala/aima/core/environment/map2d/LabeledGraph.scala
Scala
mit
1,727
package de.twentyone.sbt import java.nio.file.{CopyOption, Files, Path} object BetterFiles { def move(logger: sbt.Logger)(source: Path, target: Path, copyOptions: CopyOption*): Unit = { if (Files.readAllBytes(source).sameElements(Files.readAllBytes(target))) logger.info("\\t> Nothing to do") else ...
21re/sbt-play-routes-formatter
src/main/scala/de/twentyone/sbt/BetterFiles.scala
Scala
mit
372
/* * 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 ...
yu-iskw/spark-parallelized-sgd
src/test/scala/org/apache/spark/mllib/optimization/ParallelizedSGDSuite.scala
Scala
apache-2.0
6,065
package im.actor.server.cli import scala.concurrent.Future private[cli] trait BotHandlers { this: CliHandlers ⇒ def createBot(rq: CreateBot): Future[Unit] = { for (resp ← request(BotService, rq)) yield println(s"Bot user created, token: ${resp.token}") } def getBotToken(rq: GetBotToken): Future[Un...
dfsilva/actor-platform
actor-server/actor-cli/src/main/scala/im/actor/server/cli/BotHandlers.scala
Scala
agpl-3.0
430
package io.youi.util import io.youi.dom import org.scalajs.dom.{document, html} import reactify.Var object Measurer { private lazy val container = { val span = dom.create[html.Span]("span") span.style.position = "absolute" span.style.visibility = "hidden" span.style.width = "auto" span.style.hei...
outr/youi
gui/src/main/scala/io/youi/util/Measurer.scala
Scala
mit
865
package ml.wolfe.nlp /** * A typed key of an attribute * @tparam T the type of the attribute value. */ trait Key[+T] { override def toString = getClass.getSimpleName } /** * Key for lemma attribute. */ case object Lemma extends Key[String] /** * Typed map of attributes. */ trait Attributes { def get[T](ke...
wolfe-pack/wolfe
wolfe-nlp/src/main/scala/ml/wolfe/nlp/Attributes.scala
Scala
apache-2.0
1,313
package com.twitter.finagle.http2 import com.twitter.finagle.FailureFlags import com.twitter.logging.{HasLogLevel, Level} import java.net.SocketAddress private[http2] class DeadConnectionException(addr: SocketAddress, val flags: Long) extends Exception(s"assigned an already dead connection to address $addr") ...
twitter/finagle
finagle-http2/src/main/scala/com/twitter/finagle/http2/Exceptions.scala
Scala
apache-2.0
547
/* * 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 n...
sslavic/kafka
core/src/test/scala/unit/kafka/server/LogDirFailureTest.scala
Scala
apache-2.0
10,564
/** * 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-charts/src/main/scala/io/gatling/charts/report/ReportsGenerator.scala
Scala
apache-2.0
2,826
/* * Copyright 2016 agido GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
agido/pageobject
core/src/main/scala/org/pageobject/core/driver/TracedRemoteWebDriver.scala
Scala
apache-2.0
7,052
package com.auginte.scarango.errors import akka.http.scaladsl.model.HttpResponse import com.auginte.scarango.Context /** * Exception, when resource is not found: 404 response */ case class NotFound(httpResponse: HttpResponse)(implicit context: Context) extends ScarangoException("Not found")(context)
aurelijusb/scarango
src/main/scala/com/auginte/scarango/errors/NotFound.scala
Scala
apache-2.0
307
package im.actor.server.presences import scala.concurrent.ExecutionContext import scala.concurrent.duration._ import akka.testkit.TestProbe import akka.util.Timeout import org.scalatest.time.{ Seconds, Span } import im.actor.server.ActorSuite class GroupPresenceManagerSpec extends ActorSuite { behavior of "GroupP...
Just-D/actor-platform
actor-server/actor-tests/src/test/scala/im/actor/server/presences/GroupPresenceManagerSpec.scala
Scala
mit
1,242
package chat.tox.antox.wrapper class GroupPeer(var name: String, var ignored: Boolean) { override def toString: String = name }
gale320/Antox
app/src/main/scala/chat/tox/antox/wrapper/GroupPeer.scala
Scala
gpl-3.0
148
/* * bytefrog: a tracing framework for the JVM. For more information * see http://code-pulse.com/bytefrog * * Copyright (C) 2014 Applied Visions - http://securedecisions.avi.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. ...
secdec/bytefrog-clients
javafx-ui/src/main/scala/com/secdec/bytefrog/clients/javafxui/views/TraceCompleteView.scala
Scala
apache-2.0
1,195
package temportalist.compression.main.common.block.tile import net.minecraft.item.ItemStack import net.minecraft.nbt.NBTTagCompound import net.minecraft.tileentity.TileEntity import temportalist.origin.api.common.helper.Names import temportalist.origin.api.common.tile.ITileSaver /** * * Created by TheTemportalist...
TheTemportalist/Compression
src/main/scala/temportalist/compression/main/common/block/tile/TileCompressed.scala
Scala
apache-2.0
1,301
// Copyright (C) 2011-2012 the original author or authors. // See the LICENCE.txt file distributed with this work for additional // information regarding copyright ownership. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You ...
scalastyle/scalastyle
src/main/scala/org/scalastyle/scalariform/NoWhitespaceBracketChecker.scala
Scala
apache-2.0
2,248
package com.philipborg.mummu.math.noise import scala.util.Random import com.kurtspencer.math.noise.OpenSimplexNoise class OSN4D(seed: Option[Long] = None) extends Noise4D { private val osn = if (seed.isDefined) new OpenSimplexNoise(seed.get) else new OpenSimplexNoise(Random.nextLong); def eval(x: Double, y: Doub...
philipborg/Mummu
src/main/scala/com/philipborg/mummu/math/noise/OSN4D.scala
Scala
agpl-3.0
379
import models._ import nozzle.modules.LoggingSupport._ import scalaz._ import Scalaz._ import scalaz.EitherT._ import nozzle.monadicctrl.DefaultErrorMonadicCtrl._ import scala.concurrent.ExecutionContext case class CampingControllerConfig(aCampingName: String) trait CampingController { def getAll: FutureCtrlFlo...
utaal/nozzle
example/src/main/scala/CampingController.scala
Scala
mit
1,473
package mesosphere.marathon.health import akka.event.EventStream import mesosphere.marathon.MarathonSpec import mesosphere.marathon.Protos.HealthCheckDefinition.Protocol import mesosphere.marathon.state.PathId.StringPathId import mesosphere.marathon.tasks.TaskIdUtil import org.apache.mesos.Protos import scala.concurr...
tnachen/marathon
src/test/scala/mesosphere/marathon/health/DelegatingHealthCheckManagerTest.scala
Scala
apache-2.0
1,972
/** * This file is part of mycollab-esb. * * mycollab-esb 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. * * mycollab-esb is d...
maduhu/mycollab
mycollab-esb/src/main/scala/com/esofthead/mycollab/module/user/esb/impl/DeleteUserCommand.scala
Scala
agpl-3.0
2,600
package org.clapper.peoplegen import scala.util.{Failure, Success, Try} object Main { object Constants { val Name = "peoplegen" } def main(args: Array[String]): Unit = { def getMessageHandler(params: Params) = if (params.verbose) VerboseMessageHandler else EmptyMessageHandler val...
bmc/namegen
src/main/scala/org/clapper/peoplegen/Main.scala
Scala
bsd-3-clause
953
package com.larroy.slf4j.akka import akka.actor.{Actor, ActorSystem, Props} import akka.testkit.{ImplicitSender, TestKit} import com.larroy.slf4j.{HasLogger, Logging} import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpecLike} trait Base extends HasLogger { def f(): Unit = { log.debug("Base.f called") } ...
larroy/SLF4J_Akka_logging_adapter
src/test/scala/com/larroy/slf4j/akka/ActorLoggingSlf4jSpec.scala
Scala
mit
962
/* * 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 ...
kimoonkim/spark
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/rest/kubernetes/StagedResourcesOwner.scala
Scala
apache-2.0
1,466
object Prob21 { def divisors(x: Int): List[Int] = { require(x > 0) val upper = math.sqrt(x.toDouble).toInt (1 to upper).filter { i => x % i == 0 }.flatMap{ i => List(i, x / i) }.toList } def d(x: Int): Int = { divisors(x).sum - x } def main(args: Array[String]) { ass...
ponkotuy/ProjectEular
src/main/scala/Prob21.scala
Scala
mit
502
/* # Copyright 2016 Georges Lipka # # 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 wri...
glipka/Easy-React-With-ScalaJS
src/main/scala/com/glipka/easyReactJS/reactRouter/HistoryMixin.scala
Scala
apache-2.0
808
/** * 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...
zzwlstarby/mykafka
core/src/test/scala/integration/kafka/api/EndToEndClusterIdTest.scala
Scala
apache-2.0
10,310
/*********************************************************************** * Copyright (c) 2013-2018 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
ddseapy/geomesa
geomesa-metrics/src/main/scala/org/locationtech/geomesa/metrics/servlet/AggregatedMetricsFilter.scala
Scala
apache-2.0
10,140
package com.arcusys.learn.liferay.helpers import java.util.Locale import com.arcusys.learn.liferay.LiferayClasses.LJournalArticle trait JournalArticleHelpers { def getMap(article: LJournalArticle) = Map("articleID" -> article.getArticleId, "groupID" -> article.getGroupId.toString, "version" -> article.getV...
arcusys/Valamis
learn-liferay700-services/src/main/scala/com/arcusys/learn/liferay/helpers/JournalArticleHelpers.scala
Scala
gpl-3.0
805
package dao import javax.inject.{Inject, Singleton} import models.RelationshipOperationOutputEntity import play.api.db.slick.{DatabaseConfigProvider, HasDatabaseConfigProvider} import slick.driver.JdbcProfile import scala.concurrent.Future trait RelationshipOutputsComponent extends RelationshipOperationsComponent {...
vuminhkh/tosca-runtime
deployer/app/dao/RelationshipOutputDAO.scala
Scala
mit
4,202
package org.scalamu.common.filtering import scala.util.matching.Regex object RegexFilter { def apply(acceptSymbols: Regex*): NameFilter = if (acceptSymbols.nonEmpty) new RegexFilter(acceptSymbols) else AcceptAllFilter } class RegexFilter(acceptSymbols: Seq[Regex]) extends NameFilter { override def accepts: (...
sugakandrey/scalamu
common/src/main/scala/org/scalamu/common/filtering/RegexFilter.scala
Scala
gpl-3.0
411
package com.seanshubin.web.sync.domain import scala.collection.mutable.ArrayBuffer sealed abstract case class DownloadStatus(isError: Boolean, shouldLog: Boolean, name: String, description: String) { DownloadStatus.valuesBuffer += this override def toString = name } object DownloadStatus { private val valuesB...
SeanShubin/web-sync
domain/src/main/scala/com/seanshubin/web/sync/domain/DownloadStatus.scala
Scala
unlicense
1,301
/* * 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 ...
abhishekshivanna/samza
samza-core/src/main/scala/org/apache/samza/coordinator/JobModelManager.scala
Scala
apache-2.0
25,259
/* * Copyright 2012-2020 the original author or 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 ap...
planet42/Laika
core/shared/src/test/scala/laika/ast/sample/ParagraphCompanionShortcuts.scala
Scala
apache-2.0
829
/** * 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/test/scala/unit/kafka/utils/ReplicationUtilsTest.scala
Scala
apache-2.0
4,675
package com.twitter.finagle.netty4.ssl.client import com.twitter.finagle.Address import com.twitter.finagle.ssl._ import com.twitter.finagle.ssl.client.SslClientConfiguration import com.twitter.io.TempFile import java.io.File import java.net.InetSocketAddress import org.junit.runner.RunWith import org.scalatest.FunSui...
mkhq/finagle
finagle-netty4/src/test/scala/com/twitter/finagle/netty4/ssl/client/Netty4ClientEngineFactoryTest.scala
Scala
apache-2.0
7,009
/* * 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 ...
chuckchen/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala
Scala
apache-2.0
88,372
package org.camunda.feel.impl.builtin import org.camunda.feel.impl.builtin.BuiltinFunction.builtinFunction import org.camunda.feel.syntaxtree.{Val, ValBoolean, ValError, ValNull} object BooleanBuiltinFunctions { def functions = Map( "not" -> List(notFunction), "is defined" -> List(isDefinedFunction) ) ...
camunda/feel-scala
src/main/scala/org/camunda/feel/impl/builtin/BooleanBuiltinFunctions.scala
Scala
apache-2.0
783
/* * 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
core/src/main/scala/org/apache/spark/memory/ExecutionMemoryPool.scala
Scala
apache-2.0
8,269
package pt.cnbc.wikimodels.client.snippet import scala.xml.NodeSeq import net.liftweb._ import http._ import SHtml._ import js._ import JsCmds._ import JE._ import util._ import Helpers._ class HelloWorld { def button(in: NodeSeq) = SHtml.ajaxButton(in, () => JsRaw("$.popup.show('The title', 'A nice ...
alexmsmartins/WikiModels
wm_web_client/src/main/scala/pt/cnbc/wikimodels/client/snippet/HelloWorld.scala
Scala
mit
716
package org.sparkpipe.util.io import java.io.File import org.sparkpipe.test.util.UnitTestSpec class PathsSpec extends UnitTestSpec { /** tests local FS operations with Paths */ test("Paths should create local path") { val paths = Seq( ("/home/temp/*.txt", true), ("home/temp/*.t...
sadikovi/sparkpipe
src/test/scala/org/sparkpipe/util/io/PathsSpec.scala
Scala
mit
5,209
/** * 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...
WillCh/cs286A
dataMover/kafka/core/src/test/scala/unit/kafka/server/KafkaConfigTest.scala
Scala
bsd-2-clause
6,226
package cpup.mc.computers.content import cpup.mc.computers.CPupComputers import cpup.mc.lib.content.CPupContent import cpw.mods.fml.common.event.FMLPreInitializationEvent object Content extends CPupContent[CPupComputers.type] { override def mod = CPupComputers }
CoderPuppy/cpup-computers-mc
src/main/scala/cpup/mc/computers/content/Content.scala
Scala
mit
266
package scalaoauth2.provider import org.scalatest.OptionValues import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers._ import org.scalatest.concurrent.ScalaFutures import scala.concurrent.Future import scala.concurrent.ExecutionContext.Implicits.global class PasswordSpec extends Any...
nulab/scala-oauth2-provider
src/test/scala/scalaoauth2/provider/PasswordSpec.scala
Scala
mit
2,257
package dialectic.micro import org.scalacheck._ import org.scalacheck.Arbitrary._ import org.specs2._ import scalaz.{ @@, Equal, IList, Order, Tag } import scalaz.scalacheck.ScalazProperties.semigroup import scalaz.std.anyVal.intInstance import scalaz.Tags.{ Conjunction, Disjunction } class GoalTest extends Specifi...
adelbertc/dialectic
micro/src/test/scala/dialectic/micro/GoalTest.scala
Scala
bsd-3-clause
2,276
package mesosphere.marathon.api.v2 import javax.servlet.http.{ HttpServletResponse, HttpServletRequest } import javax.ws.rs._ import javax.ws.rs.core.{ Context, MediaType, Response } import com.codahale.metrics.annotation.Timed import mesosphere.marathon.api.v2.json.Formats._ import mesosphere.marathon.api.v2.json.V2...
Kosta-Github/marathon
src/main/scala/mesosphere/marathon/api/v2/AppVersionsResource.scala
Scala
apache-2.0
2,068
package com.seanshubin.detangler.maven.plugin import com.seanshubin.detangler.console.ConsoleApplication import org.apache.maven.plugin.AbstractMojo import org.apache.maven.plugins.annotations.{Mojo, Parameter} @Mojo(name = "report") class ReportMojo extends AbstractMojo { @Parameter(defaultValue = "${detanglerConf...
SeanShubin/detangler
maven-plugin/src/main/scala/com/seanshubin/detangler/maven/plugin/ReportMojo.scala
Scala
unlicense
457
/* * 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 ...
practice-vishnoi/dev-spark-1
streaming/src/test/scala/org/apache/spark/streaming/scheduler/ReceiverTrackerSuite.scala
Scala
apache-2.0
7,213
/* * 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
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/AttributeMap.scala
Scala
apache-2.0
1,886
package models import io.circe._ import io.circe.syntax._ import utils.CirceCommonCodecs object ModelCodecs extends CirceCommonCodecs { object movie { implicit val decodeMovie: Decoder[Movie] = Decoder.forProduct6( "id", "imdbId", "movieTitle", "availableSeats", "s...
ziyasal/Reserveon
src/main/scala/models/ModelCodecs.scala
Scala
mit
1,054
package metaconfig.sconfig import metaconfig.Conf import metaconfig.ConfShow import metaconfig.Generators.argConfShow import org.scalacheck.Prop.forAll class HoconPrinterRoundtripSuite extends munit.ScalaCheckSuite { def assertRoundtrip(conf: String): Unit = { val a = Conf.parseString(conf).get val hocon = ...
olafurpg/metaconfig
metaconfig-tests/jvm/src/test/scala/metaconfig/sconfig/HoconPrinterRoundtripSuite.scala
Scala
apache-2.0
878
/* * Copyright (C) 2005, The Beangle Software. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This...
beangle/data
model/src/main/scala/org/beangle/data/model/util/Populator.scala
Scala
lgpl-3.0
1,538
// Copyright © 2009, Esko Luontola. All Rights Reserved. // This software is released under the MIT License. See LICENSE.txt package net.orfjackal.bcd import org.objectweb.asm._ import org.objectweb.asm.tree._ import org.specs._ object interpretObjectFieldMethodSpec extends Specification { "Operating objects" >> { ...
orfjackal/bytecode-detective
src/test/scala/net/orfjackal/bcd/interpretObjectFieldMethodSpec.scala
Scala
mit
7,529
package org.arnoldc case class MethodInformation(returnsValue: Boolean, numberOfArguments: Integer)
khodges42/DovahkiinC
src/main/scala/org/dovahkiinc/MethodInformation.scala
Scala
apache-2.0
101
package is.hail import is.hail.stats._ import breeze.linalg.{Vector, DenseVector, max, sum} import breeze.numerics._ import is.hail.utils._ package object experimental { def findMaxAC(af: Double, an: Int, ci: Double = .95): Int = { if (af == 0) 0 else { val quantile_limit = ci // ci for one-side...
hail-is/hail
hail/src/main/scala/is/hail/experimental/package.scala
Scala
mit
2,912
/* ************************************************************************************* * Copyright 2013 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/api/Account.scala
Scala
agpl-3.0
2,920
/* * 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 ...
daewon/incubator-s2graph
s2core/src/main/scala/org/apache/s2graph/core/storage/hbase/AsynchbaseStorage.scala
Scala
apache-2.0
28,300
package rewriting.rules import ir._ import ir.ast._ import lift.arithmetic.SizeVar import opencl.executor.{Execute, TestWithExecutor} import opencl.ir._ import opencl.ir.pattern.ReduceSeq import org.junit.Assert._ import org.junit.Test import rewriting.{Lower, Rewrite} object TestInterchange extends TestWithExecutor ...
lift-project/lift
src/test/rewriting/rules/TestInterchange.scala
Scala
mit
8,548
import scala.util.Random class Coin { var coinOption : String = "" def getCoinOption : String = { val r = new Random coinOption = if (r.nextInt(2) == 0) "Heads" else "Tails" print(s"Coin got: $coinOption\n") coinOption } }
cirquit/Personal-Repository
Scala/coinflip-0.1/src/main/scala/Coin.scala
Scala
mit
262
package vanadis.modules.examples.scalacalc.calcservices trait Adder { def add(args: Array[Int]) : Int }
kjetilv/vanadis
modules/examples/scalacalc/calcservices/src/main/scala/vanadis/modules/examples/scalacalc/calcservices/Adder.scala
Scala
apache-2.0
107
object Dict { def nouns(word: String): Option[String] = word match { case "dog" => Some("pies") case "house" => Some("dom") case _ => None } def colors(word: String): Option[String] = word match { case "red" => Some("czerwony") case "green" => Some("zielony") case _ => None } val trans...
grzegorzbalcerek/scala-exercises
Chain/Chain.scala
Scala
bsd-2-clause
435
package org.odfi.wsb.fwapp.module.semantic trait SemanticMenuView extends SemanticView { /* * */ def semanticVerticalRightPointingMenu(content: Map[String, Any]) = { def makeItem(value: (String, Any)): Unit = { value._2 match { case link: String => ...
opendesignflow/fwapp
src/main/scala/org/odfi/wsb/fwapp/module/semantic/SemanticMenuView.scala
Scala
agpl-3.0
1,996
package toplev import scala.collection.mutable.{Map,HashMap,HashSet} import exceptions._ /* This is a generic type environment. It provides * * Note that the map is inherently mutable. * * The parent stores the parent type environment, * to allow for variable name overloading. Note * that since typechecking ha...
j-c-w/mlc
src/main/scala/GenericTypeEnv.scala
Scala
gpl-3.0
11,825
package io.udash.i18n import com.avsystem.commons.serialization.GenCodec import com.avsystem.commons.serialization.json.{JsonStringInput, JsonStringOutput} import io.udash.rpc.JsonStr import io.udash.testing.UdashSharedTest import scala.concurrent.Future class TranslationKeyTest extends UdashSharedTest { import U...
UdashFramework/udash-core
i18n/src/test/scala/io/udash/i18n/TranslationKeyTest.scala
Scala
apache-2.0
7,121
package nibbler import org.apache.spark.{SparkConf, SparkContext} import org.scalatest.{BeforeAndAfterEach, Suite} trait SparkContextAware extends BeforeAndAfterEach { this: Suite => private val configuration = new SparkConf().setAppName("test").setMaster("local") protected var sparkContext: SparkContext = nu...
pkoperek/nibbler
src/test/scala/nibbler/SparkContextAware.scala
Scala
gpl-3.0
603
package com.olvind.crud package server import slick.dbio.DBIO trait dbOps extends executionContexts { case class CrudDbOp[+T](res: DBIO[XRes[T]]){ def map[U](f: T => U): CrudDbOp[U] = CrudDbOp(res map (_ map f)) def mapIO[U](f: DBIO[XRes[T]] => DBIO[XRes[U]]): CrudDbOp[U] = CrudDbOp[U](f(res))...
elacin/slick-crud
crud/jvm/src/main/scala/com/olvind/crud/server/dbOps.scala
Scala
apache-2.0
1,376
/** * Licensed to the Minutemen Group under one or more contributor license * agreements. See the COPYRIGHT file distributed with this work for * additional information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in complian...
mohiva/silhouette
modules/authenticator/src/main/scala/silhouette/authenticator/format/JwtReads.scala
Scala
apache-2.0
3,583
package com.landoop.streamreactor.connect.hive.parquet import org.apache.parquet.hadoop.metadata.CompressionCodecName case class ParquetSourceConfig(projection: Seq[String] = Nil, dictionaryFiltering: Boolean = true) case class ParquetSinkConfig(overwrite: Boolean = false, ...
datamountaineer/stream-reactor
kafka-connect-hive/src/main/scala/com/landoop/streamreactor/connect/hive/parquet/config.scala
Scala
apache-2.0
527
/* * 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 ...
Intel-bigdata/OAP
oap-cache/oap/src/test/scala/org/apache/spark/sql/execution/datasources/oap/adapter/PropertiesAdapter.scala
Scala
apache-2.0
1,148