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
/* * 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 ...
ArvinDevel/onlineAggregationOnSparkV2
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/HashSemiJoin.scala
Scala
apache-2.0
3,952
/* * Copyright 2010 LinkedIn * * 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...
tcrayford/hafka
kafka/core/src/main/scala/kafka/tools/ConsumerShell.scala
Scala
bsd-3-clause
3,718
package lila.oauth import com.softwaremill.macwire._ import lila.common.config.CollName @Module final class Env( cacheApi: lila.memo.CacheApi, userRepo: lila.user.UserRepo, db: lila.db.Db )(implicit ec: scala.concurrent.ExecutionContext) { lazy val legacyClientApi = new LegacyClientApi(db(CollName("oa...
luanlv/lila
modules/oauth/src/main/Env.scala
Scala
mit
588
/* * 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 ...
ptkool/spark
sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
Scala
apache-2.0
24,755
/* * MIT License * * Copyright (c) 2016 Gonçalo Marques * * 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, copy, ...
gonmarques/slick-repo
src/test/scala/com/byteslounge/slickrepo/test/oracle/OracleLongVersionedRepositoryTest.scala
Scala
mit
1,367
package im.mange.acceptance.driveby.scalatest.browser import im.mange.acceptance.driveby.scalatest.WebSpecification import im.mange.common.ConditionNotMetException import im.mange.driveby.Id import im.mange.driveby.conditions._ import org.scalatest.Matchers class SelectSpec extends WebSpecification with Matchers { ...
alltonp/driveby
src/test/scala/im/mange/acceptance/driveby/scalatest/browser/SelectSpec.scala
Scala
apache-2.0
1,676
package org.jetbrains.plugins.scala.codeInsight.intention.types import com.intellij.codeInsight.intention.PsiElementBaseIntentionAction import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.ScalaBundle import org.jetb...
katejim/intellij-scala
src/org/jetbrains/plugins/scala/codeInsight/intention/types/MakeTypeMoreSpecificIntention.scala
Scala
apache-2.0
5,798
package objsets import common._ import TweetReader._ /** * A class to represent tweets. */ class Tweet(val user: String, val text: String, val retweets: Int) { override def toString: String = "User: " + user + "\n" + "Text: " + text + " [" + retweets + "]" } /** * This represents a set of objects of typ...
JoaoGFarias/MOOCs-Assigments
Coursera - Functional Programming Principles in Scala/Week 3/src/main/scala/objsets/TweetSet.scala
Scala
mit
7,975
package rest case class TsConnectionDetail(connectionType: String, connectionId: String, //properties, companyName: String, country: String, identifiers: List[String], ...
anderssonfilip/tradeshift-external-api-scala
container/src/main/scala/rest/TsConnectionDetail.scala
Scala
mit
470
package sorm.test.types import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import org.scalatest.matchers.ShouldMatchers import sorm._ import sorm.test.MultiInstanceSuite @RunWith(classOf[JUnitRunner]) class SeqOfSeqsSupportSuite extends FunSuite with ShouldMatchers wi...
cllu/sorm2
src/test/scala/sorm/test/types/SeqOfSeqsSupportSuite.scala
Scala
mit
1,474
import numbers.finite.Complex import numbers.finite.PolarComplex import numbers.finite.RectComplex import sounder.Sounder._ import sounder.Util._ import scala.math.sin import scala.math.sqrt import scala.math.min import scala.math.max import scala.math.floor import scala.math.round import scala.math.ceil import scala.m...
robbymckilliam/testablelinearsystems
tests/activebandpass/spectrumtest.scala
Scala
agpl-3.0
3,000
/* * 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/nn/onnx/Reshape.scala
Scala
apache-2.0
2,577
See full implementation in JSON.scala
ud3sh/coursework
functional-programming-in-scala-textbook/answerkey/parsing/09.answer.scala
Scala
unlicense
38
/* * Copyright 2011 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 t...
benhoyt/scrooge
scrooge-generator/src/main/scala/com/twitter/scrooge/frontend/TypeResolver.scala
Scala
apache-2.0
13,955
package archery import org.scalacheck.Arbitrary._ import org.scalatest._ import prop._ import Check._ class GeomCheck extends PropSpec with Matchers with GeneratorDrivenPropertyChecks { property("point invariants") { forAll { (p: Point, g: Geom) => p.x2 shouldBe p.x p.y2 shouldBe p.y p.heigh...
non/archery
core/src/test/scala/archery/GeomCheck.scala
Scala
mit
1,267
package chana import chana.avpath.Evaluator.Ctx import org.apache.avro.generic.IndexedRecord import scala.util.Failure import scala.util.Success import scala.util.Try package object avpath { def select(data: IndexedRecord, path: String): Try[List[Ctx]] = select(new Parser())(data, path) def select(parser: Parser...
matthewtt/chana
avpath/src/main/scala/chana/avpath/package.scala
Scala
apache-2.0
4,043
/* * 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
mllib/src/main/scala/org/apache/spark/mllib/regression/RegressionModel.scala
Scala
apache-2.0
2,394
package hash.tree /** * @author Simon Dirmeier { @literal simon.dirmeier@gmx.de} */ class Leaf[T](obj: T) extends INode[T] { def getObject: T = { obj } }
dirmeier/algorithms-and-datastructures
hash-tree/src/hash/tree/Leaf.scala
Scala
gpl-3.0
168
package utils import utils.MyStream._ object worksheet {;import org.scalaide.worksheet.runtime.library.WorksheetSupport._; def main(args: Array[String])=$execute{;$skip(82); val res$0 = range(1, 100, 10);System.out.println("""res0: utils.MyStream.AbstractLazyList = """ + $show(res$0))} }
julian-lanfranco/funcional-fcyt
lazyEvaluation/.worksheet/src/utils.worksheet.scala
Scala
gpl-2.0
310
package services import javax.inject.{Inject, Singleton} import play.api.Play import play.api.Play.current import play.api.libs.json.JsValue import play.api.libs.ws.WSClient import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration.Duration import scala.concurrent.{Await, Future} imp...
PanzerKunst/redesigned-cruited.com-frontend
website/app/services/LinkedinService.scala
Scala
gpl-3.0
3,291
package com.idyria.osi.vui.implementation.javafx.factories import javafx.scene.Group import javafx.scene.Node import javafx.scene.Parent import javafx.scene.Scene import javafx.scene.layout.Pane import javafx.scene.layout.StackPane import javafx.stage.Stage import com.idyria.osi.vui.core.definitions.VUIFr...
richnou/vui2
vui2-javafx/src/main/scala/com/idyria/osi/vui/implementation/javafx/factories/JFXFrameFactory.scala
Scala
agpl-3.0
4,683
// package formless // trait FormRenderer { // def render(form: Form): Component // }
underscoreio/formless
core/src/main/scala/formless/FormRenderer.scala
Scala
apache-2.0
89
/* * 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 ...
clarkyzl/flink
flink-examples/flink-examples-table/src/main/scala/org/apache/flink/table/examples/scala/basics/StreamSQLExample.scala
Scala
apache-2.0
3,809
import scala.swing._ import scala.swing.Swing._ import java.awt.Color import javax.swing.table._ class UsersView extends ScrollPane{ preferredSize = (1100,20 + 20 * GameAdmin.player ) background = Color.blue val Cols:List[String] = List[String]("名前","資金") ::: Aquire.Hotels.toList val tableModel = new DefaultTab...
ksk9687/Aquire
src/main/scala/UsersView.scala
Scala
mit
963
/* * 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 package reflect ...
lrytz/scala
src/reflect/scala/reflect/api/TypeTags.scala
Scala
apache-2.0
17,033
package com.scaledaction.weatherservice.client.service import akka.actor.{ ActorSystem, Props } import com.scaledaction.core.akka.HttpServerApp import com.scaledaction.core.cassandra.HasCassandraConfig import com.scaledaction.core.spark.HasSparkConfig import com.scaledaction.core.spark.SparkUtils object ClientService...
Qyoom/WeatherStation
client-service/src/main/scala/com/scaledaction/weatherservice/client/service/ClientServiceApp.scala
Scala
apache-2.0
910
package com.socrata.datacoordinator.resources.collocation import java.util.UUID import com.socrata.datacoordinator.id.{DatasetId, DatasetInternalName} import com.socrata.datacoordinator.service.collocation._ import com.socrata.http.server.{HttpRequest, HttpResponse} case class SecondaryManifestsMoveJobResource(store...
socrata-platform/data-coordinator
coordinator/src/main/scala/com/socrata/datacoordinator/resources/collocation/SecondaryManifestsMoveJobResource.scala
Scala
apache-2.0
2,506
/* * Copyright (c) 2014-2020 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
alexandru/monifu
monix-catnap/shared/src/test/scala/monix/catnap/cancelables/SingleAssignCancelableFSuite.scala
Scala
apache-2.0
4,164
package com.nutomic.ensichat.core.messages.body import java.nio.ByteBuffer import com.nutomic.ensichat.core.messages.Message import com.nutomic.ensichat.core.util.BufferUtils object UserInfo { val Type = 7 /** * Constructs [[UserInfo]] instance from byte array. */ def read(array: Array[Byte]): UserInfo...
Nutomic/ensichat
core/src/main/scala/com/nutomic/ensichat/core/messages/body/UserInfo.scala
Scala
mpl-2.0
1,267
package io.buoyant.linkerd import com.fasterxml.jackson.annotation.{JsonIgnore, JsonSubTypes, JsonTypeInfo} import com.twitter.finagle.Stack import com.twitter.finagle.buoyant.PathMatcher import io.buoyant.config.PolymorphicConfig import io.buoyant.router.StackRouter.Client.{PathParams, PerPathParams} /** * Svc is t...
denverwilliams/linkerd
linkerd/core/src/main/scala/io/buoyant/linkerd/Svc.scala
Scala
apache-2.0
1,972
/* * 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 ...
sgururajshetty/carbondata
integration/spark2/src/main/scala/org/apache/spark/util/DeleteSegmentById.scala
Scala
apache-2.0
2,214
package drt.client.logger import scala.annotation.elidable import scala.annotation.elidable._ trait Logger { /* * Use @elidable annotation to completely exclude functions from the compiler generated byte-code based on * the specified level. In a production build most logging functions will simply disappear wi...
somanythings/drt-scalajs-spa-exploration
client/src/main/scala/spatutorial/client/logger/LoggerFactory.scala
Scala
apache-2.0
1,904
package scavlink.link import akka.util.Timeout import com.typesafe.config.Config import scavlink.settings.SettingsCompanion import scala.concurrent.duration.FiniteDuration case class VehicleSettings(apiTimeout: Timeout, channelOverrideInterval: FiniteDuration, au...
nickolasrossi/scavlink
src/main/scala/scavlink/link/VehicleSettings.scala
Scala
mit
858
package controllers import java.util.{Date, UUID} import javax.inject.Inject import model.{KillProcessRequest, ProcessStatusType, TaskBackoff} import org.joda.time.DateTime import com.hbc.svc.sundial.v2 import com.hbc.svc.sundial.v2.models.json._ import dao.SundialDaoFactory import play.api.libs.json.Json import play...
gilt/sundial
app/controllers/Processes.scala
Scala
mit
3,567
package models.daos import com.mohiva.play.silhouette.api.LoginInfo import com.mohiva.play.silhouette.impl.daos.DelegableAuthInfoDAO import com.mohiva.play.silhouette.impl.providers.OAuth1Info import com.mongodb.casbah.Imports import com.mongodb.casbah.Imports._ import models.Database /** * The DAO to store the OAut...
OpenCompare/OpenCompare
org.opencompare/play-app/app/models/daos/OAuth1InfoDAO.scala
Scala
apache-2.0
973
// Copyright 2015-2016 Ricardo Gladwell. // Licensed under the GNU Affero General Public License. // See the LICENSE file for more information. package com.is_hosted_by.api import java.net.InetAddress import scala.concurrent.Future import scala.concurrent.ExecutionContext.Implicits.global import net._ trait Network ...
rgladwell/is-aws-api
src/main/scala/com/is_hosted_by/api/Network.scala
Scala
agpl-3.0
550
package com.twitter.finatra.json.tests.internal.streaming import com.fasterxml.jackson.databind.JsonNode import com.twitter.finatra.conversions.buf._ import com.twitter.finatra.json.internal.streaming.{ParsingState, JsonArrayChunker} import com.twitter.finatra.json.{JsonDiff, FinatraObjectMapper} import com.twitter.fi...
syamantm/finatra
jackson/src/test/scala/com/twitter/finatra/json/tests/internal/streaming/JsonObjectDecoderTest.scala
Scala
apache-2.0
2,704
/* * Copyright (C) 2015 Noorq, 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...
mailrest/mailrest
app/Global.scala
Scala
apache-2.0
1,093
package com.bisphone.launcher import scala.concurrent.Future import com.bisphone.util.{ArgumentExtractor, ValueExtractor} object Task { sealed trait Result object Result { case class Successful(message: String) extends Result case class Unsuccessful(code: Int, message: String ,cause: Optio...
reza-samei/bisphone-std
src/main/scala/com/bisphone/launcher/Task.scala
Scala
mit
5,011
package com.sksamuel.elastic4s import org.elasticsearch.action.get.GetResponse import org.elasticsearch.client.{ Client, Requests } import org.elasticsearch.index.VersionType import org.elasticsearch.search.fetch.source.FetchSourceContext import scala.concurrent.Future import scala.language.implicitConversions /** @...
l15k4/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/GetDsl.scala
Scala
apache-2.0
2,895
package com.bryanjswift.model import org.joda.time.DateTime sealed case class User( id:Option[String], name:Option[String], username:String , password:String, created:DateTime, modified:DateTime ) object User { def apply(username:String, password:String):User = { val now = new DateTime User(None, Non...
bryanjswift/bryanjswift.com
src/main/scala/model/User.scala
Scala
mit
359
package aecor.example.transaction import java.util.UUID import aecor.example.common.Timestamp import aecor.example.transaction.transaction.Transactions import aecor.runtime.Eventsourced import aecor.runtime.akkapersistence.AkkaPersistenceRuntime import aecor.util.Clock import cats.implicits._ import cats.effect.{ Cont...
notxcain/aecor
modules/example/src/main/scala/aecor/example/transaction/deployment.scala
Scala
mit
778
package sangria.validation.rules import sangria.ast import sangria.ast.AstVisitorCommand import sangria.validation._ import scala.collection.mutable.{Set => MutableSet} /** Unique operation names * * A GraphQL document is only valid if all defined operations have unique names. */ class UniqueOperationNames ext...
sangria-graphql/sangria
modules/core/src/main/scala/sangria/validation/rules/UniqueOperationNames.scala
Scala
apache-2.0
824
package com.daodecode.scalax object NonEmptyString extends (String => Option[String]) { /** * @param s a String to check for non emptiness * @return `None` if `s` is `null` or `""`, `Some(s)` otherwise * @since 0.2.1 * * Example * {{{ * scala> NonEmptyString(null)...
jozic/scalax-collection
src/main/scala/com/daodecode/scalax/NonEmptyString.scala
Scala
bsd-3-clause
1,591
import scala.collection.immutable.TreeSet import scala.io.Source object ManasaAndStones extends App { val console = Source.stdin.bufferedReader() val t = console.readLine().toInt (1 to t).foreach { i => val n = console.readLine().toInt val a = console.readLine().toInt val b = console.readLi...
PaulNoth/hackerrank
practice/algorithms/implementation/manasa_and_stones/ManasaAndStones.scala
Scala
mit
598
// Copyright 2014 Commonwealth Bank of Australia // // 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...
toddmowen/maestro
maestro-example/src/main/scala/au/com/cba/omnia/maestro/example/CustomerSqoopImportExecution.scala
Scala
apache-2.0
2,234
package reactivemongo.api import scala.language.higherKinds import scala.collection.generic.CanBuildFrom import scala.concurrent.{ ExecutionContext, Future } /** * '''EXPERIMENTAL:''' Base class to implement test-only/mocked [[Cursor]]. * * All functions failed future by default, * make sure to override the req...
ReactiveMongo/ReactiveMongo
test/src/main/scala-2.13-/api/TestCursor.scala
Scala
apache-2.0
2,436
package edu.gemini.model.p1.visibility import edu.gemini.model.p1.immutable.TargetVisibility import edu.gemini.spModel.core.Angle.{DMS, HMS} import edu.gemini.spModel.core.{Declination, RightAscension} private case class Degrees(raw: Double) extends Ordered[Degrees] { val deg: Double = ((raw % 360.0) + 360.0) % 360...
fnussber/ocs
bundle/edu.gemini.model.p1/src/main/scala/edu/gemini/model/p1/visibility/VisibilityRange.scala
Scala
bsd-3-clause
2,575
object ch12_6 { import ch12.Applicative sealed trait Validation[+E, +A] case class Failure[E](head: E, tail: Vector[E] = Vector()) extends Validation[E, Nothing] { def merge[E](failure: Failure[E]): Failure[E] = ???/*{ Failure(head, tail ++ Vector(failure.head) ++ failure.tail) }*/ }...
rucka/fpinscala
src/main/scala/fpinscala/ch12/Exercise6.scala
Scala
gpl-2.0
1,021
/* Copyright 2016-17, Hasso-Plattner-Institut fuer Softwaresystemtechnik 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 applicab...
bpn1/ingestion
src/test/scala/de/hpi/ingestion/framework/TestData.scala
Scala
apache-2.0
4,552
/* * Copyright (c) 2014 Dufresne Management Consulting LLC. */ package com.nickelsoftware.bettercare4me.hedis.hedis2014 import scala.util.Random import org.joda.time.DateTime import org.joda.time.Interval import com.nickelsoftware.bettercare4me.hedis.HEDISRule import com.nickelsoftware.bettercare4me.hedis.HEDISRul...
reactivecore01/bettercare4.me
play/app/com/nickelsoftware/bettercare4me/hedis/hedis2014/W34_Rule.scala
Scala
apache-2.0
3,876
// scalac: -Xfatal-warnings // class Test { object severity extends Enumeration class Severity(val id: Int) extends severity.Value val INFO = new Severity(0) val WARNING = new Severity(1) (0: Int) match { case WARNING.id => case INFO.id => // reachable case WARNING.id => // unreachable } }
scala/scala
test/files/neg/virtpatmat_unreach_select.scala
Scala
apache-2.0
319
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.scaladsl.broker.kafka import akka.actor.ActorSystem import akka.stream.Materializer import com.lightbend.lagom.internal.scaladsl.api.broker.TopicFactory import com.lightbend.lagom.internal.scaladsl.api.broker.TopicFactoryPr...
lagom/lagom
service/scaladsl/kafka/client/src/main/scala/com/lightbend/lagom/scaladsl/broker/kafka/LagomKafkaClientComponents.scala
Scala
apache-2.0
1,075
package sublimeSpam abstract class Entity(val time: Long) { override def toString: String val typeChar: Char }
Berthur/SublimeSpam
src/sublimeSpam/Entity.scala
Scala
gpl-3.0
121
package beam.calibration import java.io.File import beam.experiment.ExperimentApp import beam.tags.Periodic import com.sigopt.Sigopt import com.sigopt.exception.APIConnectionError import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpecLike} import scala.util.{Failure, Success, Try} class BeamSigoptTunerSpec ext...
colinsheppard/beam
src/test/scala/beam/calibration/BeamSigoptTunerSpec.scala
Scala
gpl-3.0
2,857
/* Copyright (c) 2016, Robby, Kansas State University 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...
sireum/v3
pilar/jvm/src/test/scala/org/sireum/pilar/test/parser/Antlr4PilarParserTestDefProvider.scala
Scala
bsd-2-clause
1,937
package sorra.lanka.core import org.eclipse.jdt.core.dom._ import scala.reflect.ClassTag import scala.collection.mutable.ArrayBuffer class Selector[T <: ASTNode: ClassTag](nodeVisit: T => Boolean) extends ASTVisitor { private val clazz = implicitly[ClassTag[T]].runtimeClass private var started = false private ...
sorra/Lanka
src/sorra/lanka/core/Selector.scala
Scala
apache-2.0
972
package mesosphere.marathon.core.task.update.impl.steps import com.google.inject.Inject import mesosphere.marathon.core.task.TaskStateOp import mesosphere.marathon.core.task.bus.MarathonTaskStatus import mesosphere.marathon.core.task.bus.TaskChangeObservables.TaskChanged import mesosphere.marathon.core.task.update.Tas...
ss75710541/marathon
src/main/scala/mesosphere/marathon/core/task/update/impl/steps/NotifyHealthCheckManagerStepImpl.scala
Scala
apache-2.0
1,217
package filodb.prom.downsample import scala.concurrent.Await import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration._ import akka.actor.{ActorSystem, CoordinatedShutdown} import akka.http.scaladsl.Http import akka.http.scaladsl.model.{HttpRequest, Uri} import akka.http.scaladsl.mod...
tuplejump/FiloDB
http/src/test/scala/filodb/prom/downsample/GaugeDownsampleValidator.scala
Scala
apache-2.0
5,642
package com.yiguang.mqtt.provider import org.scalatest.{Matchers, FlatSpec} /** * Created by yigli on 14-11-19. */ class EventBusSpec extends FlatSpec with Matchers { "Publish Event" should "serialize and unSerialize" in { // val e = PublishEvent("client","topic","messageId") // val s = e.toBytes(...
liyiguang/finagle-mqtt
src/test/scala/com/yiguang/mqtt/provider/EventBusSpec.scala
Scala
apache-2.0
712
/* * 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 ...
scouter-project/scouter
scouter.server/src/main/scala/scouter/server/netio/service/handle/SummaryService.scala
Scala
apache-2.0
13,882
/* * 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...
yiheng/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/nn/ops/LogicalOrSpec.scala
Scala
apache-2.0
1,621
/** * 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...
wangcy6/storm_app
frame/kafka-0.11.0/kafka-0.11.0.1-src/core/src/test/scala/unit/kafka/utils/timer/MockTimer.scala
Scala
apache-2.0
1,728
/* * 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...
asorianostratio/incubator-toree
communication/src/main/scala/org/apache/toree/communication/actors/DealerSocketActor.scala
Scala
apache-2.0
1,891
package com.softwaremill.bootzooka.email class EmailTemplates { def registrationConfirmation(userName: String): EmailSubjectContent = { EmailTemplateRenderer("registrationConfirmation", Map("userName" -> userName)) } def passwordReset(userName: String, resetLink: String): EmailSubjectContent = { EmailTe...
softwaremill/bootzooka
backend/src/main/scala/com/softwaremill/bootzooka/email/EmailTemplates.scala
Scala
apache-2.0
757
/* * 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 ...
akopich/spark
mllib/src/test/scala/org/apache/spark/mllib/stat/HypothesisTestSuite.scala
Scala
apache-2.0
11,772
package vultura.factor.generation import org.specs2.Specification import vultura.factor.generation.graph._ class GraphGeneratorTest extends Specification { def is = s2"""Check constant degree of some graphs | | torodial 2d lattice has only nodes of degree 4 ${allDegreesAre(_ == 4)(lattice(3 ->...
ziggystar/vultura-factor
src/test/scala/vultura/factor/generation/GraphGeneratorTest.scala
Scala
mit
1,100
package org.vaadin.hezamu.dungeongame import rx.lang.scala.Observable import rx.lang.scala.Observer import vaadin.scala._ import vaadin.scala.server.FontAwesome import org.vaadin.hezamu.dungeongame.model._ import Implicits._ class DungeonGameUI extends UI(title = "Dungeon Game", theme = "dungeongame") { content = n...
hezamu/DungeonGame
src/main/scala/org/vaadin/hezamu/dungeongame/DungeonGameUI.scala
Scala
apache-2.0
3,771
/* * Copyright 2019 Spotify AB. * * 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 ...
spotify/scio
scio-core/src/main/scala/com/spotify/scio/VersionUtil.scala
Scala
apache-2.0
5,695
package edu.ucsc.dbtune.cli import java.sql.Connection import edu.ucsc.dbtune.DatabaseSystem import edu.ucsc.dbtune.metadata.Catalog import edu.ucsc.dbtune.metadata.ColumnOrdering import edu.ucsc.dbtune.metadata.Index import edu.ucsc.dbtune.optimizer.ExplainedSQLStatement import edu.ucsc.dbtune.optimizer.Optimizer im...
dbgroup-at-ucsc/dbtune
extensions/cli/src/edu/ucsc/dbtune/cli/Database.scala
Scala
bsd-3-clause
3,576
/* * 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 ...
rednaxelafx/apache-spark
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/OptimizeLocalShuffleReader.scala
Scala
apache-2.0
6,182
package beam.calibration import java.nio.file.Paths import beam.calibration.BeamSigoptTuner.{createExperiment, fetchExperiment} import beam.experiment.ExperimentDef import com.sigopt.model.Experiment import com.typesafe.config.{Config, ConfigFactory} import com.typesafe.scalalogging.LazyLogging import scala.util.Try...
colinsheppard/beam
src/main/scala/beam/calibration/SigoptExperimentData.scala
Scala
gpl-3.0
1,565
package skadi.container.processing import org.junit.{Assert, Test} import skadi.beans.{Bean, Beans, Prop} class PropertiesResolverTest { // class under test val resolver = new PropertiesResolver @Test def testProcess { val beans = Beans( new Bean named 'postDao implementedWith classOf[com.s...
nmilinkovic/Skadi
src/test/scala/skadi/container/processing/PropertiesResolverTest.scala
Scala
bsd-3-clause
1,342
/* * 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
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StreamingRelation.scala
Scala
apache-2.0
3,468
package gh.test.gh2011.event import gh2011.events.WatchEventParser import net.liftweb.json._ import org.scalatest.{FlatSpec, Matchers} class WatchEventTest extends FlatSpec with Matchers { "A valid WatchEvent" must "be correctly parsed" in { val json = parse( """ | { | ...
mgoeminne/github_etl
src/test/scala/gh/test/gh2011/event/WatchEventTest.scala
Scala
mit
1,878
package models import net.fwbrasil.activate.ActivateContext import net.fwbrasil.activate.storage.relational.idiom.postgresqlDialect import net.fwbrasil.activate.storage.relational.PooledJdbcRelationalStorage import net.fwbrasil.activate.storage.relational.idiom.mySqlDialect import play.api.Play import net.fwbrasil.act...
seem-sky/FrameworkBenchmarks
play-activate-mysql/app/models/PersistenceContext.scala
Scala
bsd-3-clause
1,085
/* * 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 ...
BryanCutler/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetIOSuite.scala
Scala
apache-2.0
35,616
/*********************************************************************** * Copyright (c) 2013-2019 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...
elahrvivaz/geomesa
geomesa-tools/src/main/scala/org/locationtech/geomesa/tools/utils/JobRunner.scala
Scala
apache-2.0
2,370
/* * @author Philip Stutz * * Copyright 2014 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.apache.org/licenses/LICENSE-2.0 * * U...
uzh/signal-collect
src/main/scala/com/signalcollect/examples/EfficientPageRank.scala
Scala
apache-2.0
2,749
/* * 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/main/scala/org/apache/flink/table/codegen/calls/BuiltInMethods.scala
Scala
apache-2.0
7,358
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
Dax1n/spark-core
core/src/test/scala/org/apache/spark/ui/storage/StorageTabSuite.scala
Scala
apache-2.0
9,297
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.2 * @date Sun Sep 23 21:14:14 EDT 2012 * @see LICENSE (MIT style license file). */ package scalation.analytics.classifier import scala.math.round import scalation.linalgebra.{MatriD, Ma...
NBKlepp/fda
scalation_1.2/src/main/scala/scalation/analytics/classifier/ClassifierInt.scala
Scala
mit
8,678
package at.logic.gapt.provers.sat import at.logic.gapt.examples.{ BussTautology, PigeonHolePrinciple } import at.logic.gapt.expr._ import org.specs2.mutable._ class GlucoseTest extends Specification { if ( !Glucose.isInstalled ) skipAll "find a model for an atom" in { Glucose.solve( SATProblems.getProblem1() ) m...
gebner/gapt
tests/src/test/scala/at/logic/gapt/provers/sat/GlucoseTest.scala
Scala
gpl-3.0
1,679
/* * Copyright (c) 2013-2014 Telefónica Investigación y Desarrollo S.A.U. * * 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 * * Unle...
telefonicaid/fiware-cosmos-platform
infinity/server/src/test/scala/es/tid/cosmos/infinity/server/unfiltered/request/MockHttpRequest.scala
Scala
apache-2.0
1,716
package org.geoscript.geocss import org.geotools.{ styling => gt } import gt.Style import collection.JavaConversions._ object Benchmark { val Translator = new Translator() val template = """ [%1$s < 10] { stroke: black; label: "%1$s - 1"; } [%1$s > 20] { stroke: red; label: "%1$s - 2"; } [%1$s < 20] { ...
dwins/geoscript.scala
geocss/src/test/scala/org/geoscript/geocss/Benchmark.scala
Scala
mit
2,244
package io.gatling.elassandra object Predef { def elassandra( clusterName:String = "Localhost", clusterContactPoint:String ="172.28.198.16", keyspaceName:String = "customer", tableName:String = "external" ):ElassandraProtocol = new ElassandraProtocol(clusterName,clusterContactPoint...
diegopacheco/scala-playground
gatling-elassandra/src/main/scala/io/gatling/elassandra/Predef.scala
Scala
unlicense
349
/* * Copyright 2016 Guy Van den Broeck and Wannes Meert (UCLA and KU Leuven) * * 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 * * Un...
UCLA-StarAI/Forclift
src/main/scala/edu/ucla/cs/starai/forclift/rcr/RelaxCompensateExperiment.scala
Scala
apache-2.0
6,001
package akkaviz.frontend.components import org.scalajs.dom.html._ import org.scalajs.dom.{Element => domElement, console} import rx.{Rx, Var} import scala.scalajs.js.ThisFunction0 import scala.util.Try import scalatags.JsDom.all._ class MessageFilter( seenMessages: Var[Set[String]], selectedMessages: Var[Set...
blstream/akka-viz
frontend/src/main/scala/akkaviz/frontend/components/MessageFilter.scala
Scala
mit
2,395
package at.logic.gapt.examples.tip.isaplanner import at.logic.gapt.expr._ import at.logic.gapt.formats.ClasspathInputFile import at.logic.gapt.formats.tip.TipSmtParser import at.logic.gapt.proofs.Ant import at.logic.gapt.proofs.gaptic._ object prop_30 extends TacticsProof { val bench = TipSmtParser.fixupAndParse( C...
gebner/gapt
examples/tip/isaplanner/prop_30.scala
Scala
gpl-3.0
1,652
package aecor.example import io.circe.{ Decoder, Encoder } import shapeless.Unwrapped trait AnyValCirceEncoding { implicit def anyValEncoder[V, U](implicit ev: V <:< AnyVal, V: Unwrapped.Aux[V, U], encoder: Encoder[U]): Encoder[V] = { val _ =...
notxcain/aecor
modules/example/src/main/scala/aecor/example/AnyValCirceEncoding.scala
Scala
mit
655
/* * Copyright (c) 2018. Fengguo Wei and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License v2.0 * which accompanies this distribution, and is available at * https://www.apache.org/licenses/LICENSE-2.0 * * Detailed contributors ar...
arguslab/Argus-SAF
jawa/src/main/scala/org/argus/jawa/flow/dda/InterProceduralReachingDefinitionAnalysis.scala
Scala
apache-2.0
6,838
/* * Copyright 2014 Renaud Bruneliere * * 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...
bruneli/scalaopt
core/src/test/scala/com/github/bruneli/scalaopt/core/gradient/SteihaugCGSpec.scala
Scala
apache-2.0
1,883
/* * Copyright 2012 Comcast Cable Communications Management, 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 require...
Comcast/money
money-core/src/main/scala/com/comcast/money/core/formatters/FormatterChain.scala
Scala
apache-2.0
1,848
/*********************************************************************** * Copyright (c) 2013-2019 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...
elahrvivaz/geomesa
geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/audit/AuditedEvent.scala
Scala
apache-2.0
2,560
/* * Licensed to the Massive Data Science and Derrick R. Burns under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * Massive Data Science and Derrick R. Burns licenses this file to You under the * Apache Lic...
derrickburns/generalized-kmeans-clustering
src/main/scala/com/massivedatascience/clusterer/KMeansParallel.scala
Scala
apache-2.0
11,457
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package com.jspha.maia import scala.language.higherKinds import com.jspha.maia import scala.collection.immutable...
tel/scala-maia
maia/src/main/scala-2.12/com/jspha/maia/Fields.scala
Scala
mpl-2.0
4,414
package class_property_extractor import scala.collection.JavaConversions._ import scala.collection.mutable.Map import scala.collection.mutable.Set import org.scalaquery.ql.basic.BasicDriver.Implicit.queryToQueryInvoker import org.scalaquery.ql.basic.BasicDriver.Implicit.tableToQuery import org.scalaquery.ql.basic.Bas...
t-morita/JWO_Refinement_Tools
src/main/scala/class_property_extractor/ClassPropertyExtractor.scala
Scala
apache-2.0
3,750
/* * 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/nisp-frontend
test/uk/gov/hmrc/nisp/views/formatting/NispMoneySpec.scala
Scala
apache-2.0
1,165
/* Copyright 2015 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...
tglstory/scalding
scalding-serialization/src/main/scala/com/twitter/scalding/serialization/Serialization2.scala
Scala
apache-2.0
2,998
package com.lot.exchange import scala.collection.mutable.ListBuffer import com.lot.order.model.Order import com.lot.order.model.OrderType import com.lot.order.dao.OrderDao import com.typesafe.scalalogging.LazyLogging import scala.concurrent.duration.Duration import scala.concurrent.Await /** * Manages all the unfil...
thimmaiah/life_of_a_trade_scala
src/main/scala/com/lot/exchange/UnfilledOrderManager.scala
Scala
apache-2.0
6,826