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 org.jetbrains.plugins.scala package codeInsight.intentions.implementAbstract import org.jetbrains.plugins.scala.codeInsight.intentions.ScalaIntentionTestBase import com.intellij.codeInsight.intention.impl.ImplementAbstractMethodAction import com.intellij.testFramework.fixtures.CodeInsightTestFixture import org...
consulo/consulo-scala
test/org/jetbrains/plugins/scala/codeInsight/intentions/implementAbstract/ImplementAbstractMethodTest.scala
Scala
apache-2.0
2,434
/* * 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/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/describeTable/TestDescribeTable.scala
Scala
apache-2.0
3,774
package _10._6_DefiningParametricFields import _10._3_DefiningParameterlessMethods.Element class FullArrayElement(x123: Array[String]) extends Element { val contents: Array[String] = x123 }
wenxinhe/ProgrammingInScala
src/main/scala/_10/_6_DefiningParametricFields/FullArrayElement.scala
Scala
apache-2.0
196
package com.twitter.finagle.mysql import com.twitter.conversions.storage._ import com.twitter.finagle.Stack import com.twitter.finagle.mysql.Charset.Utf8_general_ci import com.twitter.util.{Return, StorageUnit, Throw, Try} /** * A base class for exceptions related to client incompatibility with an * upstream MySQL ...
mkhq/finagle
finagle-mysql/src/main/scala/com/twitter/finagle/mysql/Handshake.scala
Scala
apache-2.0
4,836
package models import play.api.db.slick.Config.driver.simple._ case class SampleSampleFileLink(id: Option[Int], sampleId: Int, sampleFileId: Int, created: java.sql.Timestamp) class SampleSampleFileLinkTable(tag: Tag) extends Table[SampleSampleFileLink](tag, "sample_sample_file_link") { val samples = TableQuery[Sa...
seqprodbio/restoule
app/models/SampleSampleFileLink.scala
Scala
gpl-3.0
893
package gopher import scala.util.Try def await[F[_],T](f:F[T])(using am:CpsAsyncMonad[F]):T = ??? trait CpsAsyncMonad[F[_]]: def adoptCallbackStyle[A](source: (Try[A]=>Unit) => Unit): F[A] trait IChannel[F[_]:CpsAsyncMonad, A]: def aread:F[A] = summon[CpsAsyncMonad[F]].adoptCallbackStyle(f => addReade...
dotty-staging/dotty
tests/pos/i10477/A.scala
Scala
apache-2.0
489
package com.jetprobe.fastgen.common import java.io.{File, PrintWriter} import com.typesafe.scalalogging.LazyLogging /** * @author Shad. */ case class FileWriter(data: Array[String]) extends LazyLogging { /** * Write the data to a specific path * @param f File to write the output * @return the file...
amezng/fastgen
src/main/scala/com/jetprobe/fastgen/common/FileWriter.scala
Scala
apache-2.0
1,175
package models import java.sql.Timestamp import slick.driver.PostgresDriver.api._ /** * Created by pnagarjuna on 06/09/15. */ class Users(tag: Tag) extends Table[User](tag, "free_busy_users") { def key = column[String]("key") def accessToken = column[String]("access_token") def refreshToken = column[String]("...
pamu/play-freebusy
app/models/Users.scala
Scala
apache-2.0
621
/* *\\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2015, G...
derekmorr/squants
shared/src/main/scala/squants/thermal/Temperature.scala
Scala
apache-2.0
12,882
package auctionsniper import java.util.EventListener trait SniperListener extends EventListener { def sniperStateChanged(snapshot: SniperSnapshot) }
sptz45/goos-scala
src/auctionsniper/SniperListener.scala
Scala
apache-2.0
153
package com.conversantmedia.sparkprofiler import org.apache.spark.sql.{Column, DataFrame, Dataset, SparkSession} import org.apache.spark.SparkConf /** * A simple example of "profiling". * This profiler simply performs a "describe" on appropriate * numeric values to provide a summary of the application. */ obj...
JThakrar/sparkprofiler
src/main/scala/com/conversantmedia/sparkprofiler/Profiler.scala
Scala
apache-2.0
1,381
package scalikejdbc.bigquery import java.time.{LocalDate, LocalTime, ZoneId, ZonedDateTime} import com.google.cloud.bigquery._ import org.scalatest.flatspec.AnyFlatSpec class BqResultSetTest extends AnyFlatSpec { it should "be able to instantiate from null Schema" in { val tableResult = MockUtil.tableResultFr...
ocadaruma/scalikejdbc-bigquery
src/test/scala/scalikejdbc/bigquery/BqResultSetTest.scala
Scala
apache-2.0
3,536
package org.racka.scallion.core.gen.ream /** * REAM (Reactive Mongo) generates entities that are required to connect to a mongoDb using * Reactive Mongo * @author S.Hosein Ayat */ class ReamEntityGenerator { }
h-ayat/Scallion
core/src/main/scala/org/racka/scallion/core/gen/ream/ReamEntityGenerator.scala
Scala
apache-2.0
216
package io.github.binaryfoo.lagotto.shell import io.github.binaryfoo.lagotto.JoinMode.JoinMode import io.github.binaryfoo.lagotto._ import io.github.binaryfoo.lagotto.output.GnuplotOptions import io.github.binaryfoo.lagotto.reader.LogType import io.github.binaryfoo.lagotto.shell.DelimitedTableFormat._ import scala.an...
binaryfoo/lagotto
src/main/scala/io/github/binaryfoo/lagotto/shell/CmdLineOptions.scala
Scala
mit
3,935
package nbot import akka.actor.{Actor, ActorRef} class Factoids extends Actor with CommandDelegator[String,String] { val delegates = Seq(FactoidFile, RandomFactoid) // TODO: make this code less repetitive def receive = { case Privmsg(nick, target, msg) if { val smsg = msg.split(' '); smsg(0).equals("!give"...
dkess/NBot
src/nbot/Factoids.scala
Scala
mit
793
/** * Copyright 2012-2013 StackMob * * 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...
stackmob/newman
src/test/scala/com/stackmob/newman/test/client/ETagAwareApacheHttpClientSpecs.scala
Scala
apache-2.0
8,471
package scala.offheap import scala.language.experimental.{macros => CanMacro} import scala.offheap.internal.macros /** An alternative implemenation of an array that inlines * allocation of given offheap class into the array layout. * This effectively makes it an array of structs in C sense. */ final class EmbedA...
arosenberger/scala-offheap
core/src/main/scala/offheap/EmbedArray.scala
Scala
bsd-3-clause
2,807
/* * 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 ...
iiisthu/sparkSdn
core/src/main/scala/org/apache/spark/util/Utils.scala
Scala
apache-2.0
28,985
package im.actor.server import akka.actor.{ ActorRef, ActorSystem } import akka.stream.Materializer import im.actor.server.api.rpc.service.auth.AuthServiceImpl import im.actor.server.oauth.{ GoogleProvider, OAuth2GoogleConfig } import im.actor.server.session.SessionRegion import slick.driver.PostgresDriver.api._ trai...
lstNull/actor-platform
actor-server/actor-tests/src/test/scala/im/actor/server/ImplicitAuthService.scala
Scala
mit
852
package controllers.admin import jp.t2v.lab.play2.auth.test.Helpers.AuthFakeRequest import model.form.data._ import model.form.{BlockPageForm, ComputerForm, SSHOrderForm, SelectComputersForm} import model.json.LoginJson import play.api.libs.json.Json import play.api.test.FakeRequest import services.state /** * Comp...
ProjectAton/AtonLab
test/controllers/admin/ComputerControllerNotFoundSpec.scala
Scala
gpl-3.0
3,816
import sbt._ object Dependencies { val awsSdk = "com.amazonaws" % "aws-java-sdk" % "1.9.12" val scalaTest = "org.scalatest" %% "scalatest" % "2.2.6" % "test" val scalaCheck = "org.scalacheck" %% "scalacheck" % "1.12.5" % "test" }
guardian/mongodb-auto-discovery
project/Dependencies.scala
Scala
apache-2.0
236
import org.sbuild._ @version("0.7.9010") @classpath("/home/lefou/work/tototec/sbuild/sbuild-scalac-plugin/org.sbuild.plugins.scalac/target/org.sbuild.plugins.scalac-0.0.9000.jar", "/home/lefou/work/tototec/sbuild/sbuild-bndjar-plugin/org.sbuild.plugins.bndjar/target/org.sbuild.plugins.bndjar-0.0.9000.jar", "http:/...
SBuild-org/sbuild-eclipse-plugin
de.tototec.sbuild.eclipse.plugin/SBuild.scala
Scala
apache-2.0
4,991
/** * 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 * distributed ...
TiVo/kafka
core/src/test/scala/unit/kafka/server/KafkaMetricReporterExceptionHandlingTest.scala
Scala
apache-2.0
4,228
package org.tejo.iza.rules.facts.control import scala.beans.BeanInfo /** An instance is inserted to the memory when rule discovers * the situation. Actors might query for it and take actions * accordingly. */ @BeanInfo case class KunmetuCmd(listId: String)
tomaszym/izabela
rules/src/main/scala/org/tejo/iza/rules/facts/control/KunmetuCmd.scala
Scala
gpl-2.0
264
/* * Copyright 2015 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/scala-csv
refined/jvm/src/test/scala/kantan/csv/refined/SerialisationTests.scala
Scala
mit
1,255
/* * Copyright 2009-2016 DigitalGlobe, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
akarmas/mrgeo
mrgeo-mapalgebra/mrgeo-mapalgebra-image/src/main/scala/org/mrgeo/mapalgebra/CropExactMapOp.scala
Scala
apache-2.0
4,863
package com.alugarei.cielo.domain import scala.xml.Elem /** * Created by Gustavo on 09/02/2016. */ case class RequisicaoConsulta( tid: String, dadosEC: DadosEC) extends Requisicao { override def toXml: Elem = { <requisicao-consulta id={id} versao={vers...
alugarei/cielo-scala
src/main/scala/com/alugarei/cielo/domain/RequisicaoConsulta.scala
Scala
mit
403
package cfc.shale.selenium /** A Selenium session id. Identifies a browser instance on a node. * Note that this is different from a Shale session id. */ case class SeleniumSessionId(id: String)
cardforcoin/shale-scala
selenium-client/src/main/scala/cfc/shale/selenium/SeleniumSessionId.scala
Scala
mit
197
package com.github.gdefacci.di.macrodef import scala.reflect.macros.blackbox.Context trait DagToExpressionFactoryMixin[C <: Context] { self: DagNodes[C] => val context: C import context.universe._ import DagToExpression.singletonize object DagToExpressionFactory { private def createConnections(ids: Se...
gdefacci/di
macros/src/main/scala/com/github/gdefacci/di/macrodef/DagToExpressionFactory.scala
Scala
mit
4,734
/* * Copyright 2011-2018 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 applic...
wiacekm/gatling
gatling-http/src/main/scala/io/gatling/http/resolver/AliasesAwareNameResolver.scala
Scala
apache-2.0
2,096
/* Copyright 2013 Josh Conrad 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 di...
jmconrad/scala-groupcache
src/main/scala/groupcache/lru/Cache.scala
Scala
apache-2.0
3,577
/** * 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...
dopuskh3/kafka
core/src/test/scala/unit/kafka/admin/DeleteTopicTest.scala
Scala
apache-2.0
14,997
package edu.gemini.spModel import scalaz.Order package object obs { implicit val ObservationStatusOrder: Order[ObservationStatus] = Order.orderBy(_.ordinal()) }
arturog8m/ocs
bundle/edu.gemini.pot/src/main/scala/edu/gemini/spModel/obs/package.scala
Scala
bsd-3-clause
171
package com.socrata.pg.store import java.io.Closeable import java.util.concurrent.{CountDownLatch, TimeUnit} import com.socrata.curator.CuratorFromConfig import com.socrata.pg.BuildInfo import com.mchange.v2.c3p0.DataSources import com.rojoma.json.v3.ast.JObject import com.rojoma.simplearm.v2._ import com.socrata.dat...
socrata-platform/soql-postgres-adapter
store-pg/src/main/scala/com/socrata/pg/store/PGSecondary.scala
Scala
apache-2.0
35,152
/* * 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/main/scala/com/intel/analytics/bigdl/utils/tf/loaders/Maximum.scala
Scala
apache-2.0
1,521
package smx.stream import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ import org.apache.spark.streaming._ import org.apache.spark.streaming.dstream._ import org.apache.spark._ import java.util.Date import smx.utils.Log object StreamProcessor { def main(args: Array[String]) { println(s...
DavidContrerasICAI/sparkCode
wordcounttwitter/src/main/scala/smx/stream/StreamProcessor.scala
Scala
mit
2,771
package pl.touk.nussknacker.ui.db.entity import pl.touk.nussknacker.engine.api.process.ProcessId import slick.lifted.{TableQuery => LTableQuery} import slick.sql.SqlProfile.ColumnOption.NotNull trait TagsEntityFactory extends BaseEntityFactory { import profile.api._ val processesTable: LTableQuery[ProcessEntity...
TouK/nussknacker
ui/server/src/main/scala/pl/touk/nussknacker/ui/db/entity/TagsEntityFactory.scala
Scala
apache-2.0
1,011
package com.twitter.querulous.unit import org.specs.mock.JMocker import org.specs.Specification import com.twitter.querulous.database.{Database, DatabaseFactory, MemoizingDatabaseFactory} class MemoizingDatabaseFactorySpec extends Specification with JMocker { val username = "username" val password = "password" ...
beni55/querulous
src/test/scala/com/twitter/querulous/unit/MemoizingDatabaseFactorySpec.scala
Scala
apache-2.0
1,546
package scalan /** Non-thread safe (but efficient on single thread) immutable lazy value. * The `block` is executed only once. */ class Lazy[A] private (block: => A) { @volatile private[this] var _isSet: Boolean = false private[this] var _value: A = _ def value: A = { if (!_isSet) { _value = block ...
ScorexFoundation/sigmastate-interpreter
common/src/main/scala/scalan/Lazy.scala
Scala
mit
567
/* * Copyright (c) 2012-15 Miles Sabin * * 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...
rorygraves/perf_tester
corpus/shapeless/src/main/scala/shapeless/ops/zipper.scala
Scala
apache-2.0
12,652
package com.whitepages.cloudmanager.action import com.whitepages.cloudmanager.state.{ClusterManager, SolrState} import scala.annotation.tailrec import com.whitepages.cloudmanager.ManagerSupport import scala.concurrent.duration._ object Conditions extends ManagerSupport { type Condition = (SolrState) => Boolean d...
whitepages/solrcloud_manager
src/main/scala/com/whitepages/cloudmanager/action/Conditions.scala
Scala
apache-2.0
2,348
/** * Copyright (C) 2007 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 prog...
ajw625/orbeon-forms
src/main/scala/org/orbeon/oxf/xml/Dom4j.scala
Scala
lgpl-2.1
8,108
package scala package tools.nsc import scala.tools.nsc.reporters.{ ConsoleReporter, Reporter } import Properties.{ versionMsg, residentPromptString } import scala.reflect.internal.util.FakePos abstract class Driver { val prompt = residentPromptString var reporter: Reporter = _ protected var command: CompilerC...
felixmulder/scala
src/compiler/scala/tools/nsc/Driver.scala
Scala
bsd-3-clause
2,184
package co.theasi.plotly trait Writable[T] { def toPType(x: T): PType } trait WritableImplicits { implicit object WritableDouble extends Writable[Double] { def toPType(x: Double): PDouble = PDouble(x) } implicit object WritableInt extends Writable[Int] { def toPType(x: Int): PInt = PInt(x) } impli...
ASIDataScience/scala-plotly-client
src/main/scala/co/theasi/plotly/Writable.scala
Scala
mit
428
package latis.ops.math import latis.dm.Dataset import latis.dm.Function import latis.dm.Number import latis.dm.Real import latis.dm.Sample import latis.dm.Scalar import latis.dm.Text import latis.dm.Tuple import latis.dm.Variable class BinaryMathOperation(op: (Double, Double) => Double, other: Dataset) extends MathOp...
dlindhol/LaTiS
src/main/scala/latis/ops/math/BinaryMathOperation.scala
Scala
epl-1.0
3,950
import scala.reflect.runtime.universe._ import scala.reflect.runtime.{universe => ru} import scala.reflect.runtime.{currentMirror => cm} import scala.tools.reflect.ToolBox import scala.annotation._ import scala.annotation.meta._ object Test extends App { // test 1: reify val tree = reify{ class Tree[A, +B](@(i...
som-snytt/dotty
tests/disabled/macro/run/reify_ann3.scala
Scala
apache-2.0
573
/** * Copyright (c) 2013, The National Archives <digitalpreservation@nationalarchives.gov.uk> * http://www.nationalarchives.gov.uk * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozi...
digital-preservation/dali
src/main/scala/ScalatraBootstrap.scala
Scala
mpl-2.0
1,514
package org.zalando.jsonapi.json.playjson import org.scalatest.MustMatchers import org.zalando.jsonapi.json.JsonBaseSpec import org.zalando.jsonapi.model.RootObject.ResourceObject import org.zalando.jsonapi.model._ import play.api.libs.json._ class PlayJsonJsonapiFormatSpec extends JsonBaseSpec[JsValue] with MustMatc...
texvex/scala-jsonapi
src/test/scala/org/zalando/jsonapi/json/playjson/PlayJsonJsonapiFormatSpec.scala
Scala
mit
6,796
package com.tmyjoe.akka.support import spray.json.DefaultJsonProtocol trait Protocol extends DefaultJsonProtocol { // implicit val usersFormat = jsonFormat3(UserEntity) // implicit val tokenFormat = jsonFormat3(TokenEntity) }
tmyjoe/akka-microservices-template
src/main/scala/com/tmyjoe/akka/support/Protocol.scala
Scala
mit
230
/* * Copyright 2011-2017 Chris de Vreeze * * 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...
dvreeze/yaidom
jvm/src/test/scala/eu/cdevreeze/yaidom/queryapitests/indexed/RobustQueryTest.scala
Scala
apache-2.0
1,266
/** * Copyright 2015 Adrian Hurtado (adrianhurt) * * 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...
mkurz/play-bootstrap3
play25-bootstrap4/module/app/views/b4/vertical/package.scala
Scala
apache-2.0
2,693
package org.psesd.srx.shared.core.io import java.io._ import java.util.UUID import org.apache.commons.vfs2._ import org.apache.commons.vfs2.impl.StandardFileSystemManager import org.apache.commons.vfs2.provider.sftp.{IdentityInfo, SftpFileSystemConfigBuilder} import org.apache.poi.util.IOUtils import org.psesd.srx.sh...
PSESD/srx-shared-core
src/main/scala/org/psesd/srx/shared/core/io/SftpClient.scala
Scala
mit
4,686
/* * 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 ...
GordonWang/rabbit-spark
src/main/scala/io/pivotal/RabbitMQUtil.scala
Scala
apache-2.0
7,003
package mesosphere.marathon.state import java.util.concurrent.atomic.AtomicInteger import javax.validation.ConstraintViolationException import akka.actor.{ ActorRefFactory, ActorSystem } import akka.event.EventStream import akka.testkit.TestKit import com.google.inject.name.Named import mesosphere.marathon.event.Even...
murat-lacework/marathon
src/test/scala/mesosphere/marathon/state/GroupManagerTest.scala
Scala
apache-2.0
6,711
package org.bitcoins.core.serializers.p2p.messages import org.bitcoins.core.number.UInt64 import org.bitcoins.core.p2p.PongMessage import org.bitcoins.core.serializers.RawBitcoinSerializer import scodec.bits.ByteVector trait RawPongMessageSerializer extends RawBitcoinSerializer[PongMessage] { override def read(byt...
bitcoin-s/bitcoin-s
core/src/main/scala/org/bitcoins/core/serializers/p2p/messages/RawPongMessageSerializer.scala
Scala
mit
560
/* * 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
external/kafka-0-10/src/test/scala/org/apache/spark/streaming/kafka010/KafkaDataConsumerSuite.scala
Scala
apache-2.0
5,555
package com.mehmetakiftutuncu.eshotroidplus.data import com.github.mehmetakiftutuncu.errors.{CommonError, Errors} import com.mehmetakiftutuncu.eshotroidplus.models._ import com.mehmetakiftutuncu.eshotroidplus.parsers.{BusListParserBase, BusPageParserBase} import com.mehmetakiftutuncu.eshotroidplus.utilities.{ConfBase,...
mehmetakiftutuncu/EshotroidPlusServer
app/com/mehmetakiftutuncu/eshotroidplus/data/BusData.scala
Scala
gpl-3.0
16,108
/* * * 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 * distri...
flaminem/flamy
src/main/scala/com/flaminem/flamy/exec/hive/ModelHiveRunner.scala
Scala
apache-2.0
1,234
package scala.com.blazedb.ml import com.blazedb.ml.ClusteringUtils import org.apache.spark.SparkContext import org.apache.spark.mllib.clustering.SpectralClustering /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this ...
javadba/mlpoc
src/main/test/scala/com/blazedb/ml/TestSpectralClustering.scala
Scala
apache-2.0
1,389
package com.wallace.demo.app.strategypatterndemo import scala.util.Try /** * Created by Wallace on 2017/4/16. */ class CashRebate(m_Rebate: String) extends CashSuper { private val DEFAULT_REBATE = 1.0 private val moneyRebate: Double = Try(m_Rebate.toDouble).getOrElse(DEFAULT_REBATE) override def acceptCash...
BiyuHuang/CodePrototypesDemo
demo/ScalaDemo/src/main/scala/com/wallace/demo/app/strategypatterndemo/CashRebate.scala
Scala
apache-2.0
416
/** * Copyright (c) 2007-2011 Eric Torreborre <etorreborre@yahoo.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation * the rights to us...
stuhood/specs
src/main/scala/org/specs/mock/Mockito.scala
Scala
mit
16,267
/* * 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 ...
WindCanDie/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeTestUtils.scala
Scala
apache-2.0
3,266
package rugloom.util.test /** * RugLoom - Explorative analysis pipeline prototype * Created by oliverr on 8/11/2015. */ object Test { implicit class AsTest[T](f: T => Boolean) extends Test[T] { override def apply(item: T): Boolean = f(item) override def toString = f.toString } implicit class EqualT...
curoli/rugloom-client
app/rugloom/util/test/Test.scala
Scala
mit
1,698
package powercards object Stage extends Enumeration { type Stage = Value val Action, Treasure, Buy, Cleanup = Value } class Game(playerNames: Seq[String]) { var players: Vector[Player] = playerNames.map(new Player(_)).toVector private var activePlayerIndex = util.Random.nextInt(players.length) val piles: V...
whence/powerlife
scala/powercards_adt/src/main/scala/powercards/Game.scala
Scala
mit
15,429
/* * 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
streaming/src/main/scala/org/apache/carbondata/streaming/parser/RowStreamParserImp.scala
Scala
apache-2.0
2,845
package org.kimbasoft.specs2.contexts import org.specs2.execute.{Result, AsResult} import org.specs2.mutable.Specification import org.specs2.specification.AroundEach /** * Missing documentation. * * @author <a href="steffen.krause@soabridge.com">Steffen Krause</a> * @since 1.0 */ class AroundEachContext extends...
kimba74/sandbox-scala
src/main/scala/org/kimbasoft/specs2/contexts/AroundEachContext.scala
Scala
gpl-3.0
664
/*********************************************************************** * Copyright (c) 2015-2022 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...
geomesa/geomesa-nifi
geomesa-datastore-bundle/geomesa-datastore-processors/src/main/scala/org/geomesa/nifi/datastore/processor/AvroToPutGeoMesa.scala
Scala
apache-2.0
762
package com.twitter.finagle.memcached.unit import com.twitter.concurrent.Broker import com.twitter.conversions.time._ import com.twitter.finagle._ import com.twitter.finagle.memcached._ import com.twitter.finagle.service.Backoff import com.twitter.finagle.service.exp.FailureAccrualPolicy import com.twitter.finagle.sta...
liamstewart/finagle
finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/KetamaFailureAccrualFactoryTest.scala
Scala
apache-2.0
6,420
/* * 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 agreed to in writ...
scalatest/scalatest
jvm/scalatest-test/src/test/scala/org/scalatest/ListShouldContainOnlyLogicalOrSpec.scala
Scala
apache-2.0
62,051
/*-------------------------------------------------------------------------- * Copyright 2013 Taro L. Saito * * 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://ww...
xerial/larray
larray/src/test/scala/xerial/larray/example/LArrayExampleTest.scala
Scala
apache-2.0
1,379
/* * 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...
Frannie-Ludmilla/sparta
plugins/src/test/scala/com/stratio/sparta/plugin/cube/operator/entityCount/OperatorEntityCountTest.scala
Scala
apache-2.0
1,727
package org.pgscala package builder package converters object PGLocalDateConverterBuilder extends PGConverterBuilder { override val imports = """ import org.joda.time.LocalDate """ val scalaClazz = "org.joda.time.LocalDate" val defaultValue = """LocalDate.parse("0001-01-01")""" }
melezov/pgscala
builder/src/main/scala/org/pgscala/builder/converters/scala/PGLocalDateConverterBuilder.scala
Scala
bsd-3-clause
295
package edu.gemini.qv.plugin.charts import edu.gemini.qpt.shared.sp.{Conds, Obs} import edu.gemini.qv.plugin.charts.util.{XYPlotter, ColorCoding, XYAxes} import edu.gemini.qv.plugin.selector.OptionsSelector._ import edu.gemini.qv.plugin.selector.{ConstraintsSelector, OptionsSelector} import edu.gemini.qv.plugin.ui.QvG...
arturog8m/ocs
bundle/edu.gemini.qv.plugin/src/main/scala/edu/gemini/qv/plugin/charts/VisibilityChart.scala
Scala
bsd-3-clause
15,264
package nz.wicker.autoencoder.math.matrix trait RangeSelector extends (Int => (Int, Int)) trait IndexSelector extends (Int => Int) { def ::: (start: IndexSelector) = TwoEndRangeSelector(start, this) def ::: (i: Int) = TwoEndRangeSelector(ConstantIndexSelector(i), this) } case class ConstantIndexSelector(i: Int) ...
joergwicker/autoencoder
src/main/scala/nz/wicker/autoencoder/math/matrix/RangeSelector.scala
Scala
gpl-3.0
527
package examples.spray.aggregate import akka.actor.ActorContext import akka.actor.ActorRef import akka.actor.Props import everstore.adapter.akka.extension.PersistenceActor.StopAndKillActor object AggregateManager { // How many children this aggregate manager allows to exist at once val maxChildren = 5000 // Ho...
perandersson/everstore-scala-adapter
examples/akka-spray-example/src/main/scala/examples/spray/aggregate/AggregateManager.scala
Scala
apache-2.0
1,821
/* * Copyright 2020 Precog Data * * 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 ...
djspiewak/quasar
frontend/src/main/scala/quasar/ScalarStages.scala
Scala
apache-2.0
1,564
import sbt._ import Keys._ import org.scalatra.sbt._ import org.scalatra.sbt.PluginKeys._ import com.mojolly.scalate.ScalatePlugin._ import ScalateKeys._ object ReactScalatra extends Build { val Organization = "com.fourgee" val Name = "react-scalatra" val Version = "0.1.0-SNAPSHOT" val ScalaVersion = "2.11.7" ...
waynebli/react-scalatra
project/build.scala
Scala
unlicense
2,275
package edu.fuberlin.hotspots import org.apache.spark.{SparkConf, SparkContext} import org.scalatest.{Outcome, Tag, fixture} /** * Created by Christian Windolf on 06.07.16. */ class SparkSpec extends fixture.FlatSpec { case class FixtureParam(context:SparkContext) override def withFixture(test:OneArgTest): Out...
parasmehta/giscup2016
src/test/scala/edu/fuberlin/hotspots/SparkSpec.scala
Scala
apache-2.0
622
package net.liftmodules.squerylauth package model import field._ import java.util.{Locale, UUID} import org.joda.time.DateTime import net.liftweb._ import common._ import http.{Req, S} import http.provider.HTTPCookie import record.field.LongField import record.{MetaRecord, Record} import squerylrecord.KeyedRecord i...
gensosrl/squeryl-auth-module
src/main/scala/net/liftmodules/squerylauth/model/ExtSession.scala
Scala
apache-2.0
2,969
/* * 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 ...
bdrillard/spark
core/src/main/scala/org/apache/spark/SparkEnv.scala
Scala
apache-2.0
17,327
package orc.servlettests import scala.concurrent.duration._ import io.gatling.core.Predef._ import io.gatling.http.Predef._ import io.gatling.jdbc.Predef._ class ChatServerGatling extends Simulation { val httpProtocol = http .baseURL("http://localhost:8080") .inferHtmlResources() .acceptHeader("text/html,app...
orc-lang/orc
OrcTests/test_data/performance/ChatServerGatling.scala
Scala
bsd-3-clause
4,067
import ornicar.scalalib package object chess extends scalalib.OrnicarValidation with scalalib.OrnicarCommon with scalalib.OrnicarNonEmptyLists with scalaz.NonEmptyLists with scalaz.Strings with scalaz.Lists with scalaz.Booleans { val White = Color.White val Black = Color.Black type...
cxd4/scalachess
src/main/scala/package.scala
Scala
mit
495
/** * 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...
unix1986/universe
tool/kafka-0.8.1.1-src/core/src/main/scala/kafka/api/OffsetCommitResponse.scala
Scala
bsd-2-clause
2,782
package com.datastax.spark.connector.rdd.partitioner import com.datastax.spark.connector.rdd.CassandraRDD import com.datastax.spark.connector.rdd.partitioner.dht.TokenFactory private[rdd] trait SplitSizeEstimator[R] { this: CassandraRDD[R] => @transient implicit lazy val tokenFactory = TokenFactory.forSystemLoca...
datastax/spark-cassandra-connector
connector/src/main/scala/com/datastax/spark/connector/rdd/partitioner/SplitSizeEstimator.scala
Scala
apache-2.0
1,361
/* * ecalogic: a tool for performing energy consumption analysis. * * Copyright (c) 2013, J. Neutelings, D. Peelen, M. Schoolderman * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * R...
jangroothuijse/ecalogic-c
web/src/main/scala/nl/ru/cs/ecalogic/web/snippet/CodeForm.scala
Scala
bsd-3-clause
6,556
package retronym.lessons.salutation // Obligatory Hello World! object HelloWorldApp { // No static methods in Scala. main() is a method on the singleton object that I have // called HelloWorldApp. // def main(args: Array[String]) = { hello4(args) } // This is identical to main. scala.Predef...
retronym/scala-sandbox
lessons/src/main/scala/retronym/lessons/salutation/HelloWorldApp.scala
Scala
mit
970
package aecor.distributedprocessing import aecor.distributedprocessing.DistributedProcessingSupervisor.{ GracefulShutdown, ShutdownCompleted, Tick } import aecor.distributedprocessing.DistributedProcessingWorker.KeepRunning import akka.actor.{ Actor, ActorLogging, ActorRef, Props, Terminated } import akka.cluste...
notxcain/aecor
modules/distributed-processing/src/main/scala/aecor/distributedprocessing/DistributedProcessingSupervisor.scala
Scala
mit
1,844
package org.danielnixon.playwarts import org.scalatest.FunSuite import org.wartremover.test.WartTestTraverser import play.api.data.Form import play.api.data.Forms.text class FormPartialTest extends FunSuite { test("can't use Form#get") { val result = WartTestTraverser(FormPartial) { Form("foo" -> text).ge...
danielnixon/playwarts
core/src/test/scala/org/danielnixon/playwarts/FormPartialTest.scala
Scala
apache-2.0
1,166
package com.sksamuel.scrimage.filter import org.scalatest.{ OneInstancePerTest, BeforeAndAfter, FunSuite } import com.sksamuel.scrimage.Image /** @author Stephen Samuel */ class DiffuseFilterTest extends FunSuite with BeforeAndAfter with OneInstancePerTest { val original = Image(getClass.getResourceAsStream("/bird...
carlosFattor/scrimage
scrimage-filters/src/test/scala/com/sksamuel/scrimage/filter/DiffuseFilterTest.scala
Scala
apache-2.0
441
/* * OneTime.scala * One-time algorithms. * * Created By: Avi Pfeffer (apfeffer@cra.com) * Creation Date: Jan 1, 2009 * * Copyright 2013 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email figaro@cra.com for information. * * See http://www.github.com/p2t2/figaro for ...
jyuhuan/figaro
Figaro/src/main/scala/com/cra/figaro/algorithm/OneTime.scala
Scala
bsd-3-clause
927
package it.polimi.genomics.spark.implementation /** * Created by Abdulrahman Kaitoua on 27/05/15. * Email: abdulrahman.kaitoua@polimi.it * */ import java.io.{BufferedWriter, OutputStreamWriter} import it.polimi.genomics.GMQLServer.Implementation import it.polimi.genomics.core.DataStructures.GroupMDParameters...
DEIB-GECO/GMQL
GMQL-Spark/src/main/scala/it/polimi/genomics/spark/implementation/GMQLSparkExecutor.scala
Scala
apache-2.0
17,878
/** * Copyright (C) 2015 DANS - Data Archiving and Networked Services (info@dans.knaw.nl) * * 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...
DANS-KNAW/easy-update-solr-index
lib/src/main/scala/nl.knaw.dans.easy.solr/EasyUpdateSolrIndex.scala
Scala
apache-2.0
3,625
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js Test Suite ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013-2015, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ ** ** /____/\\___/...
CapeSepias/scala-js
test-suite/src/test/scala/org/scalajs/testsuite/javalib/util/HashMapTest.scala
Scala
bsd-3-clause
1,163
/* * 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 ...
LantaoJin/spark
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClient.scala
Scala
apache-2.0
10,642
/* * 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 not u...
nilbody/sparkling-water
core/src/test/scala/org/apache/spark/h2o/H2OConfTestSuite.scala
Scala
apache-2.0
3,281
object main extends App { /* * Implicit classes: * Implicit classes cannote be case class * and its constructor must have exactly one parameter. * Furthermore, an implicit class must be located * within some other object, class or trait. */ class Rectangle(width: Int, height: Int) implicit class...
arcyfelix/Courses
18-10-18-Programming-in-Scala-by-Martin-Odersky-Lex-Spoon-and-Bill-Venners/59-ImplicitClasses/src/main.scala
Scala
apache-2.0
692
package com.blackboxsociety.http object Cookie { def serialize(data: Map[String, String]): String = data.map { case (k, v) => s"$k=$v" } mkString "; " def parse(str: String): Map[String, String] = { val pairs = str.split("; ") val keys = pairs.map(_.split("=")) keys.foldLeft[Map[String, String]...
blackboxsociety/blackbox-http
src/main/scala/com/blackboxsociety/http/Cookie.scala
Scala
mit
451
/* * The MIT License (MIT) * <p> * Copyright (c) 2020 * <p> * 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...
amannocci/streamy
core/src/test/scala/io/techcode/streamy/util/monitor/JvmMonitorSpec.scala
Scala
mit
2,188
import collection.mutable.Stack import org.scalatest._ class ExampleSpec extends FlatSpec with Matchers { "A Stack" should "pop values in last in first out order" in { val stack = new Stack[Int] stack.push(1) stack.push(2) stack.pop should be (2) stack.pop should be (1) ...
oreillyross/temp
src/test/scala/ExampleSpec.scala
Scala
apache-2.0
546
import hyperion._ package hyperion { case class NodeProperty(id : String, left: Int, top: Int, content: PipeOptions) case class Connection(from: String, to : String) case class Config(nodes : List[NodeProperty], connections : List[Connection]) object Registry { val nodes : scala.collection.mu...
talien/hyperion
src/main/scala/registry.scala
Scala
lgpl-3.0
1,183