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 me.reminisce.stats.statistics import com.github.nscala_time.time.Imports._ import me.reminisce.stats.statistics.Stats.{QuestionsByType, Rival, StatsEntities} object Responses { case class StatsResponse( userId: String, date: DateTime = DateTime.now, amount: Int, win: Int, loss: Int, ...
reminisceme/stats
src/main/scala/me/reminisce/stats/statistics/Responses.scala
Scala
apache-2.0
654
package models import org.joda.time.DateTime import securesocial.core._ import securesocial.core.IdentityId import securesocial.core.OAuth1Info import securesocial.core.OAuth2Info import securesocial.core.PasswordInfo case class User(uid: Option[Long] = None, identityId: IdentityId, fi...
phantomtype/Phantasm
app/models/Models.scala
Scala
mit
2,752
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
maropu/spark
core/src/main/scala/org/apache/spark/deploy/master/ui/ApplicationPage.scala
Scala
apache-2.0
6,523
package spotlight.model.outlier import omnibus.akka.envelope.WorkId import shapeless.Lens import spotlight.model.outlier.AnalysisPlan.Scope /** Created by rolfsd on 11/4/16. */ trait CorrelatedData[T] { def data: T def correlationIds: Set[WorkId] def scope: Option[AnalysisPlan.Scope] = None def withData( ne...
dmrolfs/lineup
core/src/main/scala/spotlight/model/outlier/CorrelatedData.scala
Scala
mit
1,542
/* * 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 ...
ajbozarth/incubator-livy
thriftserver/server/src/main/scala/org/apache/livy/thriftserver/ui/ThriftJsonServlet.scala
Scala
apache-2.0
2,008
/* * Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> */ package detailedtopics.configuration.gzipencoding import play.api.test._ import play.filters.gzip.GzipFilter import play.api.mvc.Results import play.core.j.JavaGlobalSettingsAdapter import play.twirl.api.Html object GzipEncoding extends PlaySpe...
jyotikamboj/container
pf-documentation/manual/detailedTopics/configuration/code/GzipEncoding.scala
Scala
mit
1,689
/* * 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 ...
apache/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/runtime/harness/WindowTableFunctionHarnessTest.scala
Scala
apache-2.0
18,523
import org.specs2.mutable._ import org.specs2.runner._ import org.junit.runner._ import org.openqa.selenium.htmlunit.HtmlUnitDriver import play.api.test._ import play.api.test.Helpers._ /** * add your integration spec here. * An integration test will fire up a whole play application in a real (or headless) browser...
aevalo/dvdrental
test/IntegrationSpec.scala
Scala
mit
596
package freetocompose.example import scala.language.higherKinds import cats.Monad import cats.instances.list._ import cats.syntax.foldable._ object Utils { def repeat[M[_]: Monad](times: Int)(fa: M[_]) = List.fill(times)(fa).sequence_ def iterateUntil[M[_]: Monad, A](pred: A ⇒ Boolean)(fa: M[A]): M[A] = Monad...
msiegenthaler/free-to-compose
example/src/main/scala/freetocompose/example/Utils.scala
Scala
apache-2.0
405
package mesosphere.marathon import java.util.concurrent.CountDownLatch import java.util.{ Timer, TimerTask } import javax.inject.{ Inject, Named } import akka.Done import akka.actor.{ ActorRef, ActorSystem } import akka.stream.Materializer import akka.util.Timeout import com.google.common.util.concurrent.AbstractExec...
janisz/marathon
src/main/scala/mesosphere/marathon/MarathonSchedulerService.scala
Scala
apache-2.0
11,873
package test.substance import org.scalatest.Spec import org.scalatest.matchers.ShouldMatchers import vog.substance.Substance import swing.{Graphics2D} import org.scalatest.mock.MockitoSugar import org.mockito.Mockito._ import vog.cache.Image import java.awt.image.{BufferedImage, ImageObserver} /** * @author Ivyl */...
ivyl/vog-engine
test/substance/SubstanceSpec.scala
Scala
mit
1,963
package com.art4ul.algorithms.sort class InsertionSort[T <% Ordered[T]]{ def swap(array: Array[T], firstIndex: Int, secondIndex: Int): Unit = { val tmp: T = array(firstIndex) array(firstIndex) = array(secondIndex) array(secondIndex) = tmp } def sort(array: Array[T]): Unit = { for (i <- 1 to arr...
art4ul/AlgorithmSandbox
src/main/scala/com/art4ul/algorithms/sort/InsertionSort.scala
Scala
apache-2.0
458
package com.twitter.finagle import com.github.benmanes.caffeine.cache.{CacheLoader, Caffeine, LoadingCache} import com.twitter.cache.caffeine.CaffeineCache import com.twitter.concurrent.AsyncSemaphore import com.twitter.conversions.time._ import com.twitter.finagle.stats.{DefaultStatsReceiver, StatsReceiver} import co...
mkhq/finagle
finagle-core/src/main/scala/com/twitter/finagle/InetResolver.scala
Scala
apache-2.0
9,551
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
hequn8128/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/metadata/FlinkRelMdRowCollationTest.scala
Scala
apache-2.0
6,870
package io.apibuilder.validation import io.apibuilder.spec.v0.models._ /** * A cache of all of the operations defined in the list of services. Allows * for resolution from a Method and Path to the service in which that operation * is defined. * * As paths can be dynamic, it's difficult to precache the exact...
flowcommerce/lib-apidoc-json-validation
src/main/scala/io/apibuilder/validation/ServiceOperationResolver.scala
Scala
mit
2,278
package com.twitter.finagle.client import com.twitter.finagle._ import com.twitter.finagle.filter.RequestLogger import com.twitter.finagle.naming.BindingFactory import com.twitter.finagle.param._ import com.twitter.finagle.stack.nilStack import com.twitter.finagle.util.Showable /** * The standard template implementa...
luciferous/finagle
finagle-core/src/main/scala/com/twitter/finagle/client/EndpointerStackClient.scala
Scala
apache-2.0
4,957
package io.swagger.client.model import io.swagger.client.core.ApiModel import org.joda.time.DateTime case class Inline_response_200_6 ( data: Option[Connector], success: Option[Boolean]) extends ApiModel
QuantiModo/QuantiModo-SDK-Akka-Scala
src/main/scala/io/swagger/client/model/Inline_response_200_6.scala
Scala
gpl-2.0
216
/* * 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 ...
nkhuyu/Spark-SQL-on-HBase
src/main/scala/org/apache/spark/sql/hbase/catalyst/expressions/PartialPredicateOperations.scala
Scala
apache-2.0
13,367
package equellatests.tests import equellatests.domain.{Fairness, RandomWord, RandomWords, TestLogon} import equellatests.instgen.workflow._ import equellatests.pages.cloudprovider.{ CloudProviderListPage, TestCloudProviderDetails, TestCloudProviderPage } import equellatests.restapi.ERest import equellatests.rest...
equella/Equella
autotest/Tests/src/test/scala/equellatests/tests/CloudProviderProperties.scala
Scala
apache-2.0
5,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 ...
jkbradley/spark
core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala
Scala
apache-2.0
24,459
/* * Copyright (C) 2015 Stratio (http://stratio.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
danielcsant/sparta
test-at/src/test/scala/com/stratio/sparta/testat/internal/ISocketOElasticsearchJsonAT.scala
Scala
apache-2.0
3,024
/* * Copyright © 2015 Lukas Rosenthaler, Benjamin Geer, Ivan Subotic, * Tobias Schweizer, André Kilchenmann, and Sepideh Alassi. * * This file is part of Knora. * * Knora is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the F...
nie-ine/Knora
salsah/src/main/scala/org/knora/salsah/Settings.scala
Scala
agpl-3.0
2,059
package au.com.intelix.rs.core.actors import au.com.intelix.evt.{InfoE, WarningE} object CommonActorEvt { object Evt { case object PostStop extends InfoE case object PreStart extends InfoE case object PreRestart extends WarningE case object PostRestart extends WarningE case object StateTransiti...
intelix/reactiveservices
platform/core/src/main/scala/au/com/intelix/rs/core/actors/CommonActorEvt.scala
Scala
apache-2.0
344
/* Copyright 2009-2021 EPFL, Lausanne */ object Nested3 { def foo(a: BigInt): BigInt = { require(a >= 0 && a <= 50) val b = a + 2 val c = a + b def rec1(d: BigInt): BigInt = { require(d >= 0 && d <= 50) val e = d + b + c e } rec1(2) } ensuring(_ > 0) }
epfl-lara/stainless
frontends/benchmarks/verification/valid/MicroTests/Nested3.scala
Scala
apache-2.0
302
package io.scalajs.npm.mongodb import io.scalajs.nodejs.Assert import org.scalatest.FunSpec import scala.concurrent.Future import scala.scalajs.js /** * Db Test Suites * @author [email protected] */ class DbTest extends FunSpec with MongoDBTestSupport { describe("Db") { it("supports executing ...
scalajs-io/mongodb
src/test/scala/io/scalajs/npm/mongodb/DbTest.scala
Scala
apache-2.0
554
package edu.gemini.pit.ui.util import swing._ import java.awt import javax.swing.BorderFactory import scalaz._ import Scalaz._ import java.awt.Color class ProposalSubmissionErrorDialog(msg: Seq[String]) extends StdModalEditor[String]("Proposal submission errors") { dialog => contents = Content // Our main con...
spakzad/ocs
bundle/edu.gemini.pit/src/main/scala/edu/gemini/pit/ui/util/ProposalSubmissionErrorDialog.scala
Scala
bsd-3-clause
1,604
package org.template.classification import io.prediction.controller.IEngineFactory import io.prediction.controller.Engine class Query( val features: Array[Double] ) extends Serializable class PredictedResult( val label: Double ) extends Serializable object ClassificationEngine extends IEngineFactory { def app...
beni55/PredictionIO
examples/scala-parallel-classification/add-algorithm/src/main/scala/Engine.scala
Scala
apache-2.0
548
package com.monsanto.stats.tables.models object PeerType { val Follower = 1 val Friend = 2 } case class Peer( originalUserId: Long, peerType: Int, peerUserId: Long )
MonsantoCo/chinese-restaurant-process
src/main/scala/com/monsanto/stats/tables/models/Peer.scala
Scala
bsd-3-clause
180
package org.knora.webapi.util import org.knora.webapi.messages.v1.responder.usermessages.UserProfileV1 /** * Holds an optional, mutable IRI for use in tests. */ class MutableUserProfileV1 { private var maybeUserProfile: Option[UserProfileV1] = None /** * Stores the user's profile. * @param us...
nie-ine/Knora
webapi/src/test/scala/org/knora/webapi/util/MutableUserProfileV1.scala
Scala
agpl-3.0
1,030
package com.twitter.finagle.mux import com.twitter.app.GlobalFlag import com.twitter.conversions.time._ import com.twitter.finagle._ import com.twitter.finagle.context.Contexts import com.twitter.finagle.mux.lease.exp.{Lessee, Lessor, nackOnExpiredLease} import com.twitter.finagle.netty3.{BufChannelBuffer, ChannelBuff...
nomadlabs/finagle
finagle-mux/src/main/scala/com/twitter/finagle/mux/Server.scala
Scala
apache-2.0
13,184
package ru.maizy.ambient7.core.config.helper /** * Copyright (c) Nikita Kovaliov, maizy.ru, 2017 * See LICENSE.txt for details. */ import ru.maizy.ambient7.core.config.{ Ambient7Options, ParsingError } object ConfigRuleOps { import ru.maizy.ambient7.core.config.reader.UniversalConfigReader._ implicit class ...
maizy/ambient7
core/src/main/scala/ru/maizy/ambient7/core/config/helper/ConfigRuleOps.scala
Scala
apache-2.0
644
package bakery.sbt import java.nio.charset.Charset import com.typesafe.sbt.packager.Keys.packageName import com.typesafe.sbt.packager.archetypes.JavaAppPackaging import com.typesafe.sbt.packager.docker.{CmdLike, DockerPlugin, ExecCmd} import com.typesafe.sbt.packager.docker.DockerPlugin.autoImport._ import com.typesa...
ing-bank/baker
project/BuildInteractionDockerImageSBTPlugin.scala
Scala
mit
9,258
// Copyright (C) 2017 Calin Cruceru <[email protected]>. // // See the LICENCE file distributed with this work for additional // information regarding copyright ownership. package org.symnet package models.iptables.virtdev package devices abstract class VirtualDevice[+Config]( name: String, ...
calincru/iptables-sefl
src/main/scala/org/symnet/models/iptables/virtdev/devices/VirtualDeviceBase.scala
Scala
mit
2,379
package com.productfoundry.play.hal import play.api.mvc.Call trait Related[A] { def name: String def item: A def cardinality: Related.Cardinality.Cardinality def single(): Related[A] } case class RelatedLink( name: String, item: Link, cardinality: Related.Cardinality.Cardinality = Related.Cardinalit...
Product-Foundry/hal-scala
src/main/scala/com/productfoundry/play/hal/Related.scala
Scala
apache-2.0
1,131
object ControlUnit // This set of comments is to answer the question in Exercise 5. // Responsibilities: // 1. check if sensors are triggered etc.. (poll the sensors) class ControlUnit (sensors: List[Sensor]) { def pollSensors() { for (sensor <- sensors) { if (sensor.isTriggered) { System.out.print...
BBK-PiJ-2015-67/sdp-portfolio
exercises/week02/alarmsystem-scala/src/ControlUnit.scala
Scala
unlicense
553
/* Copyright 2016 Shyam Anand 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...
shyam-anand/play-scala-akka-slick
app/modules/ActorModule.scala
Scala
apache-2.0
1,063
/** * © 2019 Refinitiv. 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 required by applicable l...
e-orz/CM-Well
server/project/cmwell-build-plugin/src/main/scala/cmwell/build/CMWellCommon.scala
Scala
apache-2.0
3,466
/** * Copyright (C) 2016 Orbeon, Inc. * * 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 * 2.1 of the License, or (at your option) any later version. * * This program i...
orbeon/orbeon-forms
form-runner/jvm/src/main/scala/org/orbeon/oxf/fr/persistence/relational/index/status/UI.scala
Scala
lgpl-2.1
1,505
/** * Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com> */ package akka.actor import language.existentials import scala.util.control.NonFatal import scala.util.{ Try, Success, Failure } import scala.collection.immutable import scala.concurrent.duration.FiniteDuration import scala.concurrent.duration.D...
jmnarloch/akka.js
akka-js-actor/jvm/src/main/scala/akka/actor/TypedActor.scala
Scala
bsd-3-clause
27,785
package com.github.spirom.sparkflights.experiments import com.github.spirom.sparkflights.experiments.common.ByYearAdderCombiner import com.github.spirom.sparkflights.fw.CoreExperiment import org.apache.spark.SparkContext import org.apache.spark.rdd.RDD import org.apache.spark.sql.DataFrame class TopAirlinesByAnnualDe...
spirom/SparkFlightExamples
src/main/scala/com/github/spirom/sparkflights/experiments/TopAirlinesByAnnualDeparturesCore.scala
Scala
mit
1,215
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
jedesah/Quasar
connector/src/main/scala/quasar/NameGenerator.scala
Scala
apache-2.0
2,971
package io.vamp.workflow_driver import akka.actor.{ ActorRef, ActorSystem } import akka.util.Timeout import io.vamp.common.{ ClassProvider, Config, Namespace } import io.vamp.common.akka.{ ActorBootstrap, IoC } import io.vamp.workflow_driver.notification.{ UnsupportedWorkflowDriverError, WorkflowDriverNotificationProv...
dragoslav/vamp
workflow_driver/src/main/scala/io/vamp/workflow_driver/WorkflowDriverBootstrap.scala
Scala
apache-2.0
1,165
/* * 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
mllib/src/main/scala/org/apache/spark/ml/feature/VectorSlicer.scala
Scala
apache-2.0
6,852
package uima.ae.ir.en import java.util.Locale import org.apache.uima.jcas.JCas import uima.ae.ir.MultiLingualInformationRetriever import uima.modules.common.en.EnglishDocumentAnnotator import uima.modules.ir.correction.en.{EnglishBoWBasedIRDocCorrector, EnglishKeywordBasedIRDocCorrector} import uima.modules.ir.fullte...
ktr-skmt/FelisCatusZero-multilingual
src/main/scala/uima/ae/ir/en/EnglishInformationRetriever.scala
Scala
apache-2.0
2,611
package com.nhlreplay.parser.playbyplay object Pattern { lazy val Assists = """.+?:""" lazy val BlockedBy = """\s+BLOCKED\sBY\s+""" lazy val Count = """\((\d+)\)""" lazy val Distance = """(\d+\sft)\.""" lazy val DrawnBy = """Drawn\sBy:""" lazy val Hit = """\s+HIT\s+""" lazy val Label = """((?:\w|\s)+)\:"...
peruukki/NHLReplay
app/com/nhlreplay/parser/playbyplay/Pattern.scala
Scala
mit
1,035
package HackerRank.TenDaysOfStatistics import java.io.{ByteArrayInputStream, IOException, InputStream, PrintWriter} import java.util.InputMismatchException import scala.annotation.tailrec import scala.collection.generic.CanBuildFrom import scala.language.higherKinds /** * Copyright (c) 2017 A. Roberto Fischer * ...
robertoFischer/hackerrank
src/main/scala/HackerRank/TenDaysOfStatistics/Day4BinomialDistribution1.scala
Scala
mit
9,253
package com.github.mdr.graphospasm.grapheditor.part import com.github.mdr.graphospasm.grapheditor.figure.NodeFigure import com.github.mdr.graphospasm.grapheditor.Plugin import org.eclipse.swt.graphics.Color import org.eclipse.draw2d.IFigure import org.eclipse.gef.EditPart import org.eclipse.gef.GraphicalEditPart impor...
mdr/graphospasm
com.github.mdr.graphospasm.grapheditor/src/main/scala/com/github/mdr/graphospasm/grapheditor/part/ConnectionTargetFeedbackEditPolicy.scala
Scala
mit
1,511
package models.slick.systemmanage /** * Created by hooxin on 15-2-10. */ import com.typesafe.slick.driver.oracle.OracleDriver.simple._ import models.systemmanage.{RoleFunc, RoleMenu, Role} import scala.slick.lifted._ class RoleTable(tag:Tag) extends Table[Role](tag,"t_role"){ def rolename = column[String]("rolen...
firefoxmmx2/techsupport_ext4_scala
app/models/slick/systemmanage/RoleTable.scala
Scala
apache-2.0
1,332
/* ************************************************************************************* * 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/domain/appconfig/RudderWebProperty.scala
Scala
agpl-3.0
2,154
package com.github.splee.burrower.write import com.github.splee.burrower.lag.LagGroup trait Writer { def write(lagGroup: LagGroup) }
splee/burrower
src/main/scala/com/github/splee/burrower/write/Writer.scala
Scala
mit
137
package es.weso.wiFetcher.dao import java.io.FileNotFoundException import org.junit.runner.RunWith import org.scalatest.BeforeAndAfter import org.scalatest.FunSuite import org.scalatest.Matchers import org.scalatest.junit.JUnitRunner import es.weso.wiFetcher.dao.file.CountryDAOImpl @RunWith(classOf[JUnitRunner]) clas...
weso/wiFetcher
test/es/weso/wiFetcher/dao/CountryDAOImplSuite.scala
Scala
apache-2.0
1,489
def foo[A <% String : Manifest](x: Int = 45) = x foo[Int]()(/*caret*/) // implicit ev$1: (Int) => String, ev$2: Manifest[Int]
double-y/translation-idea-plugin
testdata/parameterInfo/functionParameterInfo/simple/SyntheticParameter.scala
Scala
apache-2.0
126
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This file is part of Rudder. * * Rudder is free software: you can redistribute it and/or modify * it under the...
armeniaca/rudder
rudder-web/src/main/scala/com/normation/rudder/web/snippet/configuration/RuleManagement.scala
Scala
gpl-3.0
11,372
package pl.writeonly.son2.vaadin.ui import com.vaadin.annotations.{Theme, Title} import com.vaadin.ui.Button.ClickEvent import com.vaadin.ui._ import pl.writeonly.son2.path.core.ConfigPath @Title("json path") @Theme("valo") class UIDiff extends UITrait2 { override def componentsCenter2: Components = new Components(...
writeonly/scalare
scalare-adin/src/main/scala/pl/writeonly/son2/vaadin/ui/UIDiff.scala
Scala
artistic-2.0
872
package org.dele.text.lapa.patterns import DomainStructure._ import org.scalatest.ShouldMatchers import org.scalatest.prop.TableDrivenPropertyChecks import org.scalatest.testng.TestNGSuite import org.testng.annotations.Test /** * Created by jiaji on 2016-02-19. */ class DomainStructureTest extends TestNGSuite wit...
new2scala/text-util
lapa/src/test/scala/org/dele/text/lapa/patterns/DomainStructureTest.scala
Scala
apache-2.0
994
package fp import scala.annotation.implicitNotFound @implicitNotFound(msg = "No implicit Semigroup defined for ${A}.") trait Semigroup[A] { def op(a1: A, a2: => A): A } object Semigroup { def apply[A](implicit S: Semigroup[A]): Semigroup[A] = S object SemigroupLaws { def associativity[A](a1: A, a2: A, a3...
adamgfraser/fp
src/main/scala/fp/Semigroup.scala
Scala
apache-2.0
1,059
/** * Copyright 2013 Netflix, 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 ...
devisnik/RxJava
language-adaptors/rxjava-scala/src/examples/scala/rx/lang/scala/examples/Olympics.scala
Scala
apache-2.0
4,755
object DemoSequence { def main (args: Array[String]): Unit = { try { println("DEMO PART 1: POPULATING TEST COLLECTION") PopulateTestCollection.main(Array[String]()) println("DEMO PART 2: BASIC QUERY") BasicQuery.main(Array[String]()) println("DEMO PART 3: SQL QUERIES") SQLQue...
spirom/spark-mongodb-examples
src/main/scala/DemoSequence.scala
Scala
apache-2.0
390
package colossus package protocols.telnet import core.DataBuffer import org.scalatest._ import akka.util.ByteString import scala.util.Success class TelnetSpec extends WordSpec with MustMatchers{ def testCmdParser(input: String, expected: TelnetCommand) { val p = new TelnetCommandParser p.parse(DataBuffe...
zgagnon/colossus
colossus-tests/src/test/scala/colossus/protocols/telnet/TelnetSpec.scala
Scala
apache-2.0
1,297
package org.zouzias.spark.lucenerdd.aws.utils // CAUTION: Do not remove this (sbt-build-info) import org.apache.spark.rdd.RDD import org.apache.spark.sql.SparkSession import org.joda.time.DateTime import org.joda.time.format.DateTimeFormat import org.zouzias.spark.lucenerdd.aws.BuildInfo object Utils { val FuzzyEd...
zouzias/spark-lucenerdd-aws
src/main/scala/org/zouzias/spark/lucenerdd/aws/utils/Utils.scala
Scala
apache-2.0
1,043
/*********************************************************************** * Copyright (c) 2013-2016 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is ...
nagavallia/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/iterators/KryoLazyAggregatingIterator.scala
Scala
apache-2.0
6,731
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/amls-frontend
test/models/deregister/DeregistrationReasonSpec.scala
Scala
apache-2.0
9,012
/* NSC -- new Scala compiler * Copyright 2005-2013 LAMP/EPFL * @author Martin Odersky */ package scala.tools.nsc import settings.MutableSettings /** A compatibility stub. */ class Settings(errorFn: String => Unit) extends MutableSettings(errorFn) { def this() = this(Console.println) override def withErrorF...
felixmulder/scala
src/compiler/scala/tools/nsc/Settings.scala
Scala
bsd-3-clause
444
import eu.inn.binders.core.FieldNotFoundException import org.scalatest.{FlatSpec, Matchers} case class TestString(stringVal: String) case class TestStringN(stringValN1: Option[String], stringValN2: Option[String]) case class TestStringArray(stringArray: Seq[String]) case class TestStringArrayN(stringArrayN: Seq[Optio...
InnovaCo/binders-json
src/test/scala/TestStringJsonSerializer.scala
Scala
bsd-3-clause
2,643
/* * 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 ...
manuzhang/incubator-gearpump
examples/streaming/wordcount/src/test/scala/org/apache/gearpump/streaming/examples/wordcount/SumSpec.scala
Scala
apache-2.0
1,811
package controller.impl.command.impl import controller.impl.messages.MessageText import model.impl.{Field, PlayerNameEnum, Tile, TileNameEnum} import org.scalatest.{FlatSpec, Matchers} import util.position.Position class TrapCommandSpec extends FlatSpec with Matchers { val playerGoldTiles = Set(new Tile(TileNameEn...
MartinLei/Arimaa
src/test/scala/controller/impl/command/impl/TrapCommandSpec.scala
Scala
mit
2,545
package net.ceedubs.scrutinator package swagger import scalaz.{ @@ => _, _ } import shapeless.tag._ import shapeless._ sealed trait SwaggerSpec object SwaggerSpec { val tagger: Tagger[SwaggerSpec] = tag[SwaggerSpec] def apply[A](a: A): A @@ SwaggerSpec = tagger[A](a) } object SwaggerShow { sealed trait Swagge...
ceedubs/scrutinator
swagger/src/main/scala/net/ceedubs/scrutinator/swagger/SwaggerShow.scala
Scala
mit
1,385
/* * 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-test/src/test/scala/com/spotify/scio/io/ScioIOTest.scala
Scala
apache-2.0
3,982
package com.twitter.concurrent import com.twitter.conversions.time._ import com.twitter.util._ import java.util.concurrent.{ConcurrentLinkedQueue, RejectedExecutionException} import org.junit.runner.RunWith import org.scalatest.fixture.FunSpec import org.scalatest.junit.JUnitRunner import scala.collection.mutable @Ru...
folone/util
util-core/src/test/scala/com/twitter/concurrent/AsyncSemaphoreTest.scala
Scala
apache-2.0
8,549
package edu.osu.cse.groenkeb.logic.proof.engine.learn.qapprx import edu.osu.cse.groenkeb.logic._ import edu.osu.cse.groenkeb.logic.proof._ import edu.osu.cse.groenkeb.logic.proof.engine.ProofStrategy import edu.osu.cse.groenkeb.logic.proof.engine.ProofStrategy.Action import edu.osu.cse.groenkeb.logic.proof.engine.Proo...
bgroenks96/AutoMoL
learn/src/main/scala/edu/osu/cse/groenkeb/logic/proof/engine/learn/qapprx/QLearningStrategy.scala
Scala
mit
603
package hello import org.springframework.web.bind.annotation.PathVariable import com.mongodb.DBObject import org.springframework.web.bind.annotation.RequestMapping import org.springframework.validation.ObjectError import com.mongodb.MongoClient import org.springframework.validation.FieldError import org.springframew...
nikhilpanicker/cmpe273-assignment2
src/main/scala/hello/HelloController.scala
Scala
mit
15,750
package com.tpalanga.testlib.test.client.impl import akka.actor.ActorSystem import akka.http.scaladsl.marshalling.Marshal import akka.http.scaladsl.model.{ContentTypes, RequestEntity} import akka.stream.{ActorMaterializer, ActorMaterializerSettings, Materializer} import com.tpalanga.testlib.test.client.{NoEntity, Resp...
tpalanga/akka-http-microservice
testLib/src/main/scala/com/tpalanga/testlib/test/client/impl/NewsletterServiceRestClient.scala
Scala
unlicense
2,584
package org.deca.compiler.signature import scala.collection.mutable.Lattice import scala.collection.mutable.Stack import scala.collection.immutable.Set import scala.math.PartialOrdering sealed abstract class InferenceConstraint { def substitute(vx: SignatureVariable,newY: MonoSignature): Unit def alpha: MonoSigna...
Playermet/codegoogle.decac
src/org/deca/compiler/signature/SignatureOrdering.scala
Scala
gpl-3.0
6,142
import scala.math object Prob46 { val twiceSquare = Stream.from(1).map { i => 2*i*i } val primes = Prime.set(10000000) def isGoldbach(n: Int): Boolean = twiceSquare.takeWhile(_ < n).exists{ i => primes.contains(n - i) } def main(args: Array[String]) { assert(Array(9, 15, 21, 25, 27, 33).forall(isGol...
ponkotuy/ProjectEular
src/main/scala/Prob46.scala
Scala
mit
470
/** * ==== * This file is part of SensApp [ http://sensapp.modelbased.net ] * * Copyright (C) 2011- SINTEF ICT * Contact: SINTEF ICT <[email protected]> * * Module: net.modelbased.sensapp * * SensApp is free software: you can redistribute it and/or modify * it under the terms of...
SINTEF-9012/sensapp
net.modelbased.sensapp.backyard.gatling/src/main/scala/net/modelbased/sensapp/backyard/gatling/SensorPushSimulation.scala
Scala
lgpl-3.0
4,221
package alexsmirnov.pbconsole.gcode import spray.json._ import spray.json.DefaultJsonProtocol._ import scala.util.Try import spray.json.ParserInput.apply object G2Response { case class G2CommandResponse(r: JsValue, f: List[Int], rawLine: String) extends CommandResponse with StatusResponse { def status = f(1) ...
alexsmirnov/printrbot-g2-console
src/main/scala/alexsmirnov/pbconsole/gcode/G2Response.scala
Scala
bsd-3-clause
1,514
/* * 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 ...
zzcclp/carbondata
streaming/src/main/scala/org/apache/carbondata/streaming/parser/RowStreamParserImp.scala
Scala
apache-2.0
3,425
/* * Copyright (c) 2015-2022 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.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.ap...
opencypher/openCypher
tools/tck-inspection/src/main/scala_2.13/org/opencypher/tools/tck/inspection/browser/web/PageBasic.scala
Scala
apache-2.0
9,243
/* * Copyright 2016 Ben Ripkens * * 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 ...
bripkens/health-check-adapter
src/main/scala/de/bripkens/ha/reporting/ConsoleReporter.scala
Scala
apache-2.0
2,174
/* Copyright 2012-2019 Micronautics Research 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...
mslinn/scalacourses-play-utils
src/main/scala/com/micronautics/playUtils/package.scala
Scala
mit
1,813
object Switch { // def withResource[A](f : Resource => A) : A = { // val r = getResource() // Replace with the code to acquire the resource // try { // f(r) // } finally { // r.dispose() // } // } abstract class ReturnBox[+T] { def value: T } case class Return[+T](val value:...
mbana/scalify
doc/Switch.scala
Scala
isc
1,476
package demo package components package materialui import chandu0101.scalajs.react.components.fascades.LatLng import chandu0101.scalajs.react.components.materialui.{MuiDatePicker, MuiDatePickerMode} import japgolly.scalajs.react.ReactComponentB import japgolly.scalajs.react.vdom.prefix_<^._ object MuiDatePickerDemo {...
tpdi/scalajs-react-components
demo/src/main/scala/demo/components/materialui/MuiDatePickerDemo.scala
Scala
apache-2.0
889
package springboard.fpscala.ds import scala.annotation.tailrec sealed trait List[+T] case object Nil extends List[Nothing] case class Cons[+A](h: A, t: List[A]) extends List[A] object List { def sum(ints: List[Int]): Int = ints match { case Nil => 0 case Cons(x,xs) => x + sum(xs) } def product(ds: Li...
defpearlpilot/webcrawler
app/springboard/fpscala/ds/List.scala
Scala
gpl-3.0
1,827
package com.arcusys.valamis.lesson.scorm.model.manifest /**Rollup rule action*/ object RollupAction extends Enumeration { type RollupAction = Value /** Rollup satisfied status */ val Satisfied = Value("satisfied") /** Rollup not satisfied status */ val NotSatisfied = Value("notSatisfied") /** Rollup comple...
ViLPy/Valamis
valamis-scorm-lesson/src/main/scala/com/arcusys/valamis/lesson/scorm/model/manifest/RollupAction.scala
Scala
lgpl-3.0
446
/* * Copyright (C) 2013 Alcatel-Lucent. * * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * Licensed to you 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 cop...
molecule-labs/molecule
molecule-core/src/main/scala/molecule/utils/Overload.scala
Scala
apache-2.0
1,375
package com.github.mdr.mash.ns.core import com.github.mdr.mash.functions.{ BoundParams, MashFunction, Parameter, ParameterModel } import com.github.mdr.mash.runtime.MashValue object TapFunction extends MashFunction("core.tap") { object Params { val F = Parameter( nameOpt = Some("f"), summaryOpt = Som...
mdr/mash
src/main/scala/com/github/mdr/mash/ns/core/TapFunction.scala
Scala
mit
850
import edu.uta.diql._ import com.twitter.scalding._ object Test extends ExecutionApp { case class Customer ( name: String, cid: Int, account: Float ) case class Order ( oid: Int, cid: Int, price: Float ) explain(true) def job: Execution[Unit] = Execution.getArgs.flatMap { case args ...
fegaras/DIQL
benchmarks/NestedScalding2.scala
Scala
apache-2.0
1,451
package grammarcomp package engine import grammar.utils._ import grammar._ import java.io._ import java.lang.management._ import scala.collection.JavaConversions._ import scala.collection.mutable.ListBuffer import grammar.EBNFGrammar._ import grammar.CFGrammar._ object GrammarToCFGA { def grammarToCFGA(g: Grammar...
epfl-lara/GrammarComparison
src/main/scala/grammarcomp/engine/GrammarToCFGA.scala
Scala
mit
954
/** * FILE: Catalog * Copyright (c) 2015 - 2018 GeoSpark Development Team * * MIT License * * 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 with...
zongsizhang/GeoSpark
sql/src/main/scala/org/datasyslab/geosparksql/UDF/Catalog.scala
Scala
mit
2,058
package se.uu.farmbio.vs.examples import org.apache.spark.Logging import org.apache.spark.SparkConf import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ import scopt.OptionParser import se.uu.farmbio.vs.SBVSPipeline import java.io.PrintWriter import openeye.oedocking.OEDockMethod import openeye...
laeeq80/spark-cpvs
vs.examples/src/main/scala/se/uu/farmbio/vs/examples/MoleculeCounter.scala
Scala
apache-2.0
1,512
package net.danielbrice.scalakata import org.scalatest.{FlatSpec, Matchers} class TreeFoldTest extends FlatSpec with Matchers { import TreeFold._ "treeFold" should "preserve the order of the tree" in { // given val tree = Branch(Branch(Leaf("a"), Leaf("b")), Branch(Leaf("c"), Leaf("d"))) // when ...
friedbrice/scala-kata
src/test/scala/net/danielbrice/scalakata/TreeFoldTest.scala
Scala
gpl-3.0
443
package net.sansa_stack.query.spark.ontop import java.sql.{Connection, DriverManager, SQLException} /** * Creates an in-memory H2 JDBC connection. * * @author Lorenz Buehmann */ object JDBCConnection { val logger = com.typesafe.scalalogging.Logger(JDBCConnection.getClass) val JDBC_URL: String = "jdbc:h2:mem...
SANSA-Stack/SANSA-RDF
sansa-query/sansa-query-spark/src/main/scala/net/sansa_stack/query/spark/ontop/JDBCConnection.scala
Scala
apache-2.0
913
package skinny.test import java.io.ByteArrayOutputStream import javax.servlet.{ ServletOutputStream, WriteListener } class MockServletOutputStream extends ServletOutputStream { private[this] val byteArrayOutputStream = new ByteArrayOutputStream() override def write(i: Int) = byteArrayOutputStream.write(i) ov...
skinny-framework/skinny-framework
test/src/main/scala/skinny/test/MockServletOutputStream.scala
Scala
mit
620
package no.hib.dpf.text.scala.bridge; import no.hib.dpf.text.scala.DPFTextCore import no.hib.dpf.text.scala.editor.Editor import no.hib.dpf.text.scala.output.EditorOutput import no.hib.dpf.text.scala.editor.EditorProposal import no.hib.dpf.text.scala.output.EclipseLog import no.hib.dpf.text.scala.ct._ import no.hib.dp...
fmantz/DPF_Text
no.hib.dpf.text/src_scala/no/hib/dpf/text/scala/bridge/ScalaBridge.scala
Scala
epl-1.0
26,568
/* * 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.async package ru...
scala/async
src/test/scala/scala/async/run/toughtype/ToughType.scala
Scala
bsd-3-clause
8,731
/* * 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/utils/tf/loaders/LgammaSpec.scala
Scala
apache-2.0
864
object Test { def main(args: Array[String]): Unit = { val seq: MySeq[Undefined] = new MySeq[Floats](new Array[Float](10)) println(10 == seq.array.length) } } sealed trait Undefined { type ArrayType <: Array[_] } sealed trait Floats extends Undefined { type ArrayType = Array[Float] } class MySeq[+T <: Undef...
yusuke2255/dotty
tests/pending/run/t3798.scala
Scala
bsd-3-clause
350
package yokohama.holdem import akka.actor.{ Actor, ActorLogging, ActorRef, FSM, Props, Terminated } import akka.contrib.pattern.ClusterSingletonProxy import akka.routing.FromConfig import akka.util.Timeout import scala.concurrent.duration.FiniteDuration /** * A game engine organizes, creates, and manages games. *...
jeffusan/yokohama-holdem
src/main/scala/yokohama/holdem/GameEngine.scala
Scala
gpl-2.0
1,842
package com.ftchinese.jobs.common /** * Apple server * Created by wanbo on 16/4/5. */ trait AppleServer { val pro_host: String = "" val pro_port: Int = 0 val dev_host: String = "" val dev_port: Int = 0 }
FTChinese/push
src/main/scala/com/ftchinese/jobs/common/AppleServer.scala
Scala
mit
228
package org.oedura.scavro.plugin import java.io.{FileOutputStream, InputStream} import sbt._ import scala.io.Source import scala.util.Random class TestUtils(workingDir: File) { (workingDir / "in").mkdir (workingDir / "out").mkdir def tmpDir = workingDir def tmpPath = workingDir.getAbsolutePath private d...
oedura/scavro
plugin/src/test/scala/org/oedura/scavro/plugin/TestUtils.scala
Scala
apache-2.0
2,699