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 ...
shuangshuangwang/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/hash.scala
Scala
apache-2.0
35,960
package burnup import java.time.{LocalDate, ZonedDateTime, DayOfWeek} import org.specs2.mutable._ class UtilSpec extends Specification { "the response of dayOfWeekBetween" should { "include the first day if it's the nominated day" in { val from = ZonedDateTime.parse("2015-06-15T00:00:00Z") // Monday ...
shuwada/github-burnup-chart
src/test/scala/burnup/UtilSpec.scala
Scala
apache-2.0
1,669
package com.peterpotts.common.sample import scala.util.Random class SamplePick[T](values: IndexedSeq[T]) extends Sample[T] { def next(): T = values(Random.nextInt(values.size)) } object SamplePick { def apply[T](values: IndexedSeq[T]) = new SamplePick(values) }
peterpotts/mobius
src/main/scala/com/peterpotts/common/sample/SamplePick.scala
Scala
mit
269
package net.kwas.impatient.ch7 package object random { var seed = 0; def nextInt(): Int = { seed = seed * 1664525 + 1013904223 % 2 * 32 seed } def setSeed(newSeed: Int): Unit = { // Println to prove my RNG is being used println(s"Setting seed to ${newSeed}") seed = newSeed } }
dkwasny/ScalaImpatient
src/main/scala/net/kwas/impatient/ch7/random/package.scala
Scala
mit
311
/* * 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 ...
hongyuhong/flink
flink-scala/src/test/scala/org/apache/flink/api/operator/MinByOperatorTest.scala
Scala
apache-2.0
5,251
/* * Copyright 2012-2014 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 * * Unl...
mattinger/sirius
src/main/scala/com/comcast/xfinity/sirius/api/impl/paxos/Acceptor.scala
Scala
apache-2.0
6,188
package sc.ala.http.mock sealed abstract class HttpMethod(val value: String) extends Product with Serializable case object GET extends HttpMethod("GET") case object POST extends HttpMethod("POST") case object PUT extends HttpMethod("PUT") case object PATCH extends HttpMethod("PATCH") case object DELETE extends HttpMet...
xuwei-k/http-mock
src/main/scala/sc/ala/http/mock/HttpMethod.scala
Scala
mit
428
package contege import scala.collection.JavaConversions._ import scala.collection.mutable.Set import scala.collection.mutable.Map import java.util.ArrayList import java.lang.reflect.Constructor import contege.seqgen._ /** * Computes all sequential interleavings of two suffixes. * Both suffixes must share the same p...
michaelpradel/ConTeGe
src/contege/SequentialInterleavings.scala
Scala
gpl-2.0
3,156
package endpoints.play.client import endpoints.algebra import endpoints.algebra.BasicAuthentication.Credentials import play.api.libs.ws.WSAuthScheme trait BasicAuthentication extends algebra.BasicAuthentication { self: Endpoints => /** * Supplies the credential into the request headers */ private[endpoin...
Krever/endpoints
play/client/src/main/scala/endpoints/play/client/BasicAuthentication.scala
Scala
mit
755
package one.murch.bitcoin.coinselection import scala.collection.mutable.ListBuffer import scala.io.Source import scala.util.Random /** * Created by murch on 31.12.16. */ object TestCaseMoneyPot15Coins extends Scenario(Set(), ListBuffer(), "TESTCASE 11: Starts with fifteen 1BTC UTXO, then performs all operations f...
Xekyo/CoinSelectionSimulator
src/main/scala/one/murch/bitcoin/coinselection/TestCaseMoneyPot15Coins.scala
Scala
mit
794
package com.github.dannywe.csv.format object DefaultErrorLineFormatter extends ErrorLineFormatter { override def format(lineNumber: Int, columnName: String, errorMessage: String): String = { if (columnName == null) s"Line $lineNumber $errorMessage." else s"Line $lineNumber Column $columnName $errorMessage." ...
DannyWE/CsvStreamUtils
src/main/scala/com/github/dannywe/csv/format/DefaultErrorLineFormatter.scala
Scala
apache-2.0
326
package blended.itestsupport.docker import com.github.dockerjava.api.DockerClient trait DockerClientProvider { def getClient : DockerClient }
woq-blended/blended
blended.itestsupport/src/main/scala/blended/itestsupport/docker/DockerClientProvider.scala
Scala
apache-2.0
146
/* * 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...
i8run/BigDL-1
spark/dl/src/test/scala/com/intel/analytics/bigdl/optim/ValidationSpec.scala
Scala
apache-2.0
20,155
package pl.newicom.dddd.messaging import pl.newicom.dddd.aggregate.EntityId trait AddressableMessage { def destination: Option[EntityId] def payload: Any }
odd/akka-ddd
akka-ddd-messaging/src/main/scala/pl/newicom/dddd/messaging/AddressableMessage.scala
Scala
mit
162
package com.eneco.trading.kafka.connect.twitter import java.util import org.apache.kafka.clients.consumer.OffsetAndMetadata import org.apache.kafka.common.TopicPartition import org.apache.kafka.connect.sink.{SinkRecord, SinkTask} import scala.collection.JavaConverters._ import scala.util.{Success, Failure} class Twit...
alexott/kafka-connect-twitter
src/main/scala/com/eneco/trading/kafka/connect/twitter/TwitterSinkTask.scala
Scala
apache-2.0
1,573
/** * This file is part of mycollab-esb. * * mycollab-esb is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * mycollab-esb is d...
uniteddiversity/mycollab
mycollab-esb/src/main/scala/com/esofthead/mycollab/module/project/esb/impl/DeleteProjectMilestoneCommand.scala
Scala
agpl-3.0
2,496
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
Intel-bigdata/OAP
oap-native-sql/core/src/test/scala/org/apache/spark/sql/TPCHQuerySuite.scala
Scala
apache-2.0
4,953
package io.udash.web.guide.views.ext.demo.charts import io.udash.wrappers.highcharts.config.HighchartsConfig import io.udash.wrappers.highcharts.config.axis.{Axis, AxisTitle, XAxis, YAxis} import io.udash.wrappers.highcharts.config.credits.Credits import io.udash.wrappers.highcharts.config.drilldown.Drilldown import i...
UdashFramework/udash-guide
guide/src/main/scala/io/udash/web/guide/views/ext/demo/charts/ColumnWithDrilldown.scala
Scala
gpl-3.0
3,217
package controllers import play.api.mvc.{Action, Controller} import models.{Executor, FilePaths} import java.nio.file.{StandardCopyOption, Paths, Files} import play.api.Logger import java.io.{FileWriter, File} object Api extends Controller { val log = Logger(getClass) def sparqlInput(endpointUri: String, inputG...
avengerpenguin/r2r
r2rgui/app/controllers/Api.scala
Scala
gpl-3.0
2,094
/** * Created by 58 on 2015/4/11. */ import java.util.Calendar import common.mutil import org.apache.commons.cli._ import org.apache.hadoop.fs.{FileSystem, Path} import org.apache.spark.SparkContext import org.apache.spark.mllib.evaluation.BinaryClassificationMetrics import org.apache.spark.mllib.linalg.{Vector => ...
hu17889/mllib_subpackage
src/main/scala/lambda_mart.scala
Scala
apache-2.0
10,622
package io.reactivecqrs.core.eventstore import java.time.Instant import io.reactivecqrs.api.id.{AggregateId, UserId} import io.reactivecqrs.api._ import io.reactivecqrs.core.aggregaterepository.AggregateRepositoryActor.PersistEvents import io.reactivecqrs.core.eventstore.MemoryEventStoreState.EventRow import scalikej...
marpiec/ReactiveCQRS
core/src/main/scala/io/reactivecqrs/core/eventstore/MemoryEventStoreState.scala
Scala
apache-2.0
5,904
package com.lookout.borderpatrol import com.lookout.borderpatrol.session.EmptyToken import com.twitter.finagle.http.{Cookie, Response => FinagleResponse} import com.twitter.util.Await import org.jboss.netty.handler.codec.http._ import org.scalatest.{FlatSpec, Matchers} class LoginFilterSpec extends FlatSpec with Matc...
rtyler/borderpatrol
borderpatrol-core/src/test/scala/com/lookout/borderpatrol/LoginFilterSpec.scala
Scala
mit
1,641
package controllers.api import javax.inject.{Inject, Singleton} import db.{AccountDto, OrderDto} import models.frontend.AccountReceivedFromFrontend import play.api.libs.json._ import play.api.mvc.{Action, Controller} import services._ @Singleton class AccountApi @Inject()(val orderService: OrderService) extends Cont...
PanzerKunst/redesigned-cruited.com-frontend
website/app/controllers/api/AccountApi.scala
Scala
gpl-3.0
4,044
/* * 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
core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedClusterMessage.scala
Scala
apache-2.0
4,220
package jwo_jwn_alignment_tool import scala.collection.mutable.ListBuffer object StringSimilarityUtil { /** * N-Gramセットを返す */ def getNgramSet(n: Int, term: String): scala.collection.immutable.Set[String] = { val ngramArray = ListBuffer[String]() for (i <- 0 to term.size - n) { ngra...
t-morita/JWO_Refinement_Tools
src/main/scala/jwo_jwn_alignment_tool/StringSimilarityUtil.scala
Scala
apache-2.0
3,663
trait A extends DelayedInit { print("-A") def delayedInit(body: => Unit) = { body postConstructionCode } def postConstructionCode: Unit = { print("\\n A+") } } trait B extends A { print(" -B") override def postConstructionCode: Unit = { super.postConstructionCode print(" B+") } } t...
martijnhoekstra/scala
test/files/run/delay-bad.scala
Scala
apache-2.0
1,464
package smtlib package theories import trees.Terms._ import Operations._ object Reals { /* * TODO: how about providing a Rational constructor? maybe it should go in Constructors? */ object RealSort { def apply(): Sort = { Sort(Identifier(SSymbol("Real"))) } def unapply(sort: Sort): Bool...
regb/scala-smtlib
src/main/scala/smtlib/theories/Reals.scala
Scala
mit
1,441
package de.agilecoders.projects.scaspell.service import com.twitter.finagle.Service import com.twitter.finagle.http.{Response, Request} import com.twitter.util.Future /** * TODO miha: document class purpose * * @author miha */ case class BadRequestService() extends Service[Request, Response] { def apply(req...
l0rdn1kk0n/scaspell
scaspell-service/src/main/scala/de/agilecoders/projects/scaspell/service/BadRequestService.scala
Scala
apache-2.0
445
import scala.quoted.* import scala.quoted.staging.* import Macros.* object Test { inline def assert(expr: => Boolean): Unit = ${ assertImpl('expr) } def program(using Quotes) = '{ val x = 1 assert(x != 0) ${ assertImpl('{x != 0}) } } given Compiler = Compiler.make(getClass.getClassLoader...
dotty-staging/dotty
tests/pos-staging/quote-assert/quoted_2.scala
Scala
apache-2.0
339
package org.jetbrains.plugins.scala.debugger.renderers import java.util import javax.swing.Icon import scala.collection.JavaConverters._ import scala.concurrent.duration.DurationDouble import com.intellij.debugger.engine.evaluation.{EvaluateException, EvaluationContextImpl} import com.intellij.debugger.ui.impl.Threa...
triplequote/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/debugger/renderers/RendererTestBase.scala
Scala
apache-2.0
3,892
package org.bayswater.musicrest.model import scalaz.Validation import scalaz.syntax.validation._ import com.mongodb.casbah.Imports._ import com.mongodb.casbah.MongoDB trait MongoTransaction { /** Apparently, Mongo doesn't do transactions - this is the nearest we get - it ties the sequence of statements * to...
newlandsvalley/musicrest
src/main/scala/org/bayswater/musicrest/model/MongoTransaction.scala
Scala
apache-2.0
1,220
package com.github.diegopacheco.akkastreams.fun import akka.actor.ActorSystem import akka.stream.ActorMaterializer import akka.stream.scaladsl.Source object BasicsMain extends App { implicit val system = ActorSystem("basics") implicit val materializer = ActorMaterializer() import system.dispatcher ...
diegopacheco/scala-playground
akka-http-streams-fun/src/main/java/com/github/diegopacheco/akkastreams/fun/BasicsMain.scala
Scala
unlicense
434
package skuber.apps import org.specs2.mutable.Specification import play.api.libs.json._ import skuber.LabelSelector.dsl._ import skuber._ import skuber.json.apps.format._ /** * Created by hollinwilkins on 4/5/17. */ class StatefulSetSpec extends Specification { "This is a unit specification for the skuber State...
doriordan/skuber
client/src/test/scala/skuber/apps/StatefulSetSpec.scala
Scala
apache-2.0
3,782
/* * Copyright (C) 2014 - 2016 Softwaremill <http://softwaremill.com> * Copyright (C) 2016 - 2019 Lightbend Inc. <http://www.lightbend.com> */ package akka.kafka.benchmarks import akka.kafka.benchmarks.app.RunTestCommand import org.apache.kafka.clients.consumer.{ConsumerConfig, KafkaConsumer} import org.apache.kaf...
softwaremill/reactive-kafka
benchmarks/src/main/scala/akka/kafka/benchmarks/KafkaConsumerFixtureGen.scala
Scala
apache-2.0
1,608
/* * Copyright University of Basel, Graphics and Vision Research Group * * 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 ...
unibas-gravis/scalismo-faces
src/main/scala/scalismo/faces/deluminate/SphericalHarmonicsSolver.scala
Scala
apache-2.0
3,520
package com.v_standard.scalikejdbc.orm.dao import com.v_standard.scalikejdbc.orm.DBSpecBase import com.v_standard.scalikejdbc.orm.condition.{Condition, LogicalExpressionCondition} import com.v_standard.scalikejdbc.orm.definition.{AbstractEntityDefinition, Column, TableBase} import com.v_standard.scalikejdbc.orm.query....
VanishStandard/scalikejdbc-orm
src/test/scala/com/v_standard/scalikejdbc/orm/dao/WriteDaoSpec.scala
Scala
bsd-3-clause
13,656
package examples.dropdown import java.awt.Color import javax.swing.{ComboBoxModel, JComboBox} import reswing.{ReSwingEvent, _} import scala.swing.ComboBox import scala.swing.event.SelectionChanged class DynamicComboBox[A] extends ComboBox[A](Nil: List[A]) { val peerBox: JComboBox[_] = this.peer.asInstanceOf[J...
volkc/REScala
Examples/examples-reswing/src/examples/dropdown/DynamicComboBox.scala
Scala
apache-2.0
1,288
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.2 * @date Sun Dec 29 21:28:40 EST 2013 * @see LICENSE (MIT style license file). * @see http://irh.inf.unideb.hu/~jsztrik/education/16/SOR_Main_Angol.pdf */ package scalation.queue...
scalation/fda
scalation_1.2/src/main/scala/scalation/queueingnet/MMc_Queue.scala
Scala
mit
5,158
package services import models.{ Account, OAuthClient } import models.db.OAuthClientsTable import scala.concurrent.{ ExecutionContext, Future } trait OAuthClientsService extends OAuthClientsTable { def create(client: OAuthClient): Future[OAuthClient] def validate(clientId: String, clientSecret: String, grantTy...
ziyasal/Reserveon
src/main/scala/services/OAuthClientsService.scala
Scala
mit
2,062
package io.github.interestinglab.waterdrop.output.batch import org.apache.spark.sql.{Dataset, Row} class S3 extends FileOutputBase { override def checkConfig(): (Boolean, String) = { checkConfigImpl(List("s3://", "s3a://", "s3n://")) } override def process(df: Dataset[Row]): Unit = { super.processImp...
InterestingLab/waterdrop
waterdrop-core/src/main/scala/io/github/interestinglab/waterdrop/output/batch/S3.scala
Scala
apache-2.0
342
/* * Copyright © 2014 Teo Klestrup, Carl Dybdahl * * This file is part of Republix. * * Republix 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 Free Software Foundation, either version 3 of the License, or * (at your op...
teozkr/republix-online
republix/src/main/scala/republix/ui/Vote.scala
Scala
agpl-3.0
1,702
/* * 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/src/test/scala/org/apache/flink/table/runtime/stream/table/TableSourceITCase.scala
Scala
apache-2.0
31,310
package org.jmespike.controls import org.jmespike.conf.Conf import com.jme3.scene.control.Control /** * A configuration that creates a control for an entity. */ trait ControlConf extends Conf { def createControl(seed: Int): Control }
zzorn/skycastle
src/main/scala/org/jmespike/controls/ControlConf.scala
Scala
gpl-2.0
241
package com.twitter.finatra.thrift import com.twitter.finagle.http.{Request, Response, Status} import com.twitter.finatra.http.exceptions.ExceptionMapper import com.twitter.finatra.http.response.{ErrorsResponse, ResponseBuilder} import com.twitter.inject.thrift.ThriftClientException import com.twitter.util.Throwables ...
joecwu/finatra
inject-thrift-client-http-mapper/src/main/scala/com/twitter/finatra/thrift/ThriftClientExceptionMapper.scala
Scala
apache-2.0
857
/* * 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
streaming/src/main/scala/org/apache/spark/streaming/DStreamGraph.scala
Scala
apache-2.0
6,759
/* * 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 ...
matthewfranglen/spark
sql/core/src/main/scala/org/apache/spark/sql/functions.scala
Scala
mit
170,892
package eventstore package akka import scala.concurrent.duration._ import _root_.akka.actor.Terminated import _root_.akka.testkit.TestProbe class SubscriptionActorITest extends AbstractSubscriptionActorITest { "SubscriptionActor" should { "subscribe from the beginning" in new SubscriptionScope { expectE...
EventStore/EventStore.JVM
client/src/test/scala/eventstore/akka/SubscriptionActorITest.scala
Scala
bsd-3-clause
2,215
package shredzzz.kirkwood.scalatest.runner import scala.reflect.ClassTag import shredzzz.kirkwood.traits.{TypeSpecificTester, CuTester} import shredzzz.kirkwood.driver.CuContext import shredzzz.kirkwood.cumath.{Sentinel, Assigner, EagerSentinel} import shredzzz.kirkwood.cumath.tensor.{CuVector, CuMatrix} import shredz...
shredzzz/kirkwood
src/test/scala/shredzzz/kirkwood/scalatest/runner/BinaryWithTensorRunner.scala
Scala
apache-2.0
13,192
package collins.util import play.api.i18n.Lang import play.api.i18n.Messages trait MessageHelperI { val parentKey: String def message(key: String, args: Any*)(implicit lang: Lang): String = { Messages(keyFor(key), args:_*) } def messageWithDefault(key: String, default: String, args: Any*)(implicit lang: ...
funzoneq/collins
app/collins/util/MessageHelper.scala
Scala
apache-2.0
870
package org.sparklinedata.hive.metadata trait Def { def fqn : String }
hbutani/hive-lineage
core/src/main/scala/org/sparklinedata/hive/metadata/Def.scala
Scala
apache-2.0
74
import scala.reflect.{ClassTag, classTag} @deprecated("Suppress warnings", since="2.11") object Test extends App { def testValueClass(tag: ClassTag[_]): Unit = { println(s"runtimeClass = ${tag.runtimeClass}, toString = ${tag.toString}") println(tag <:< tag) println(tag <:< ClassTag.AnyVal) println(ta...
som-snytt/dotty
tests/run/t6246.scala
Scala
apache-2.0
861
/* * 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
app/exceptions/InvalidEnrolmentCredentialsException.scala
Scala
apache-2.0
734
package scalapb.textformat import scalapb.descriptors.{FieldDescriptor, PEmpty, PRepeated} import scalapb.{GeneratedMessage, textformat} object Printer { def print(t: GeneratedMessage, out: TextGenerator): Unit = { print(t.toPMessage, out) } def print(p: scalapb.descriptors.PMessage, out: TextGenerator): U...
trueaccord/ScalaPB
scalapb-runtime/src/main/scala/scalapb/textformat/Printer.scala
Scala
apache-2.0
2,975
/** * 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...
solidfire/jsvcgen
jsvcgen/src/main/scala/com/solidfire/jsvcgen/codegen/GolangCodeFormatter.scala
Scala
apache-2.0
6,004
package com.jamontes79.scala.movielist.entities import java.io.{File, FileInputStream, FileOutputStream} import android.util.Log import com.jamontes79.MyUtil import com.jamontes79.database.{DBUtil, DataDictionary} import com.jamontes79.scala.movielist.utils.MyUtils case class Root( movies: Seq[Movie...
jamontes79/movieList
src/main/scala/com/jamontes79/scala/movielist/entities/Movie.scala
Scala
apache-2.0
7,536
package com.github.aselab.activerecord import org.specs2.mutable._ object supportSpec extends Specification { "primitiveClasses" should { val f = support.primitiveClasses.apply _ "String" in { f("java.lang.String") == classOf[String] must beTrue } "Boolean" in { f("boolean") == classOf...
xdougx/scala-activerecord
activerecord/src/test/scala/packagesSpec.scala
Scala
mit
1,703
package programming.scala.one /** * AKKA의 Actor를 확인하기 위한 예제 * Actor Model of Concurrency(동시성 액터 모델) * * Actor라는 서로 아무런 상태 정보를 교환하지 않는 독립적인 요소가 존재 * * @author loustler * @since 12/23/2016 15:27 */ abstract class Shapes { def draw(f: String => Unit): Unit = f(s"draw: ${this.toString}") } /** * case ...
loustler/scala
src/main/scala/programming/scala/one/Shapes.scala
Scala
mit
936
/* * 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 ...
sachintyagi22/spark
core/src/main/scala/org/apache/spark/serializer/SerializerManager.scala
Scala
apache-2.0
8,303
import sbt._ import Keys._ import java.io.File import scala.io.Source import IO._ object BuildSettings { val buildSettings: Seq[Setting[_]] = Defaults.defaultSettings ++ Seq[Setting[_]]( organization := "com.flyobjectspace", version := "0.0.2-SNAPSHOT", scalaVersion := "2.12.1", scalaBinaryVersion :...
fly-object-space/Flight
project/FlightBuild.scala
Scala
apache-2.0
4,608
package com.softwaremill.bootzooka.common.api import java.time.OffsetDateTime import java.time.format.DateTimeFormatter import java.util.UUID import akka.http.scaladsl.model.StatusCodes.ClientError import io.circe._ import io.circe.syntax._ trait CirceEncoders { val dateTimeFormat = DateTimeFormatter.ISO_DATE_TIM...
aywengo/bootzooka
backend/src/main/scala/com/softwaremill/bootzooka/common/api/CirceEncoders.scala
Scala
apache-2.0
742
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
scalatest/scalatest
dotty/scalatest-test/src/test/scala/org/scalatest/matchers/must/MustBeCanEqualSpec.scala
Scala
apache-2.0
2,204
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
sh-cho/cshSpark
util/random/package.scala
Scala
apache-2.0
906
/* * Copyright (c) 2015 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org...
jramos/kinesis-redshift-sink
src/main/scala/com.snowplowanalytics.snowplow.storage.kinesis/redshift/RawEventTransformer.scala
Scala
apache-2.0
4,570
package scalax /** * Contains the base traits and objects needed to use '''Graph for Scala'''. * * The '''Graph4Scala-UserGuide''' is available at * [[http://www.assembla.com/spaces/scala-graph/documents]]. * @author Peter Empen */ package object collection { /** * The default filter function for degrees to...
opyate/scala-graph
core/src/main/scala/scalax/collection/package.scala
Scala
bsd-3-clause
432
package fpinscala.errorhandling sealed trait Option[+A] { def map[B](f: A => B): Option[B] = this match { case None => None case Some(a) => Some(f(a)) } def getOrElse[B>:A](default: => B): B = this match { case None => default case Some(a) => a } def flatMap[B](f: A => Option[B]): Optio...
galarragas/FpInScala
answers/src/main/scala/fpinscala/errorhandling/Option.scala
Scala
mit
4,141
package expressd import java.io.File import scala.collection.JavaConversions._ import scala.collection.Traversable import scala.collection.mutable.ArrayBuffer import joptsimple.{OptionSet, OptionParser} import org.apache.spark.{Accumulable, AccumulableParam} import org.apache.spark.SparkContext import org.apache.sp...
adarob/eXpress-d
src/main/scala/expressd/ExpressRunner.scala
Scala
apache-2.0
6,436
/** * Copyright 2011-2012 eBusiness Information, Groupe Excilys (www.excilys.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * U...
Tjoene/thesis
Case_Programs/gatling-1.4.0/gatling-charts/src/main/scala/com/excilys/ebi/gatling/charts/result/reader/FileDataReader.scala
Scala
gpl-2.0
9,857
import _root_.io.gatling.core.scenario.Simulation import ch.qos.logback.classic.{Level, LoggerContext} import io.gatling.core.Predef._ import io.gatling.http.Predef._ import org.slf4j.LoggerFactory import scala.concurrent.duration._ /** * Performance test for the Evenement entity. */ class EvenementGatlingTest exte...
bzinoun/cream
src/test/gatling/simulations/EvenementGatlingTest.scala
Scala
apache-2.0
3,451
import scala.io.Source object Day6 { def openFile() : Array[String] = { var lines = Array[String]() val buffered = Source.fromFile("input.txt") for (line <- buffered.getLines) { lines = lines :+ line.trim } buffered.close lines } def main(args: Ar...
dooleykh/Advent2016
6/6.scala
Scala
mit
762
package us.feliscat.text.similarity import us.feliscat.util.LibrariesConfig import scala.collection.mutable /** * @author K.Sakamoto * Created on 2016/05/23 */ object DamerauLevenshteinDistance extends DamerauLevenshteinDistance( LibrariesConfig.damerauLevenshteinDeleteCost, LibrariesConfig.damerau...
ktr-skmt/FelisCatusZero-multilingual
libraries/src/main/scala/us/feliscat/text/similarity/DamerauLevenshteinDistance.scala
Scala
apache-2.0
3,742
/*********************************************************************** * Copyright (c) 2013-2020 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...
aheyne/geomesa
geomesa-fs/geomesa-fs-storage/geomesa-fs-storage-orc/src/main/scala/org/locationtech/geomesa/fs/storage/orc/utils/OrcOutputFormatWriter.scala
Scala
apache-2.0
24,932
/* ** Copyright [2013-2014] [Megam Systems] ** ** 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...
indykish/retail_analytics
app/models/package.scala
Scala
apache-2.0
1,988
package enumeratum.values import play.api.data.format.{Formats, Formatter} import play.api.data.Mapping /** Created by Lloyd on 4/13/16. * * Copyright 2016 */ sealed trait PlayFormValueEnum[ValueType, EntryType <: ValueEnumEntry[ValueType]] { enum: ValueEnum[ValueType, EntryType] => /** The [[Formatter]] f...
lloydmeta/enumeratum
enumeratum-play/src/main/scala/enumeratum/values/PlayFormValueEnum.scala
Scala
mit
2,129
package spark.scheduler.cluster import spark._ import spark.deploy.yarn.{ApplicationMaster, YarnAllocationHandler} import org.apache.hadoop.conf.Configuration /** * * This is a simple extension to ClusterScheduler - to ensure that appropriate initialization of ApplicationMaster, etc is done */ private[spark] class...
baeeq/incubator-spark
core/src/hadoop2-yarn/scala/spark/scheduler/cluster/YarnClusterScheduler.scala
Scala
bsd-3-clause
1,650
import sbt._ import Keys._ trait Version { lazy val releaseVersion = List("0.0.1") lazy val gitSha = Process("git rev-parse --short HEAD").lines.take(1).toList lazy val username = Option(System.getProperty("user.name")).toList lazy val localChanges: List[String] = { val stagedChanges = ("git diff-index ...
newhoggy/pico-cuckoo-filter
project/Version.scala
Scala
bsd-3-clause
800
package org.alitouka.spark.dbscan.util.commandLine import org.apache.commons.math3.ml.distance.DistanceMeasure import org.alitouka.spark.dbscan.DbscanSettings private [dbscan] class CommonArgs ( var masterUrl: String = null, var jar: String = null, var inputPath: String = null, var outputPath: String = null, ...
isaacboucinha/CardioStream
web-app/src/main/scala/org/alitouka/spark/dbscan/util/commandLine/CommonArgs.scala
Scala
apache-2.0
449
/* * 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 ...
sachintyagi22/spark
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
Scala
apache-2.0
31,036
package one.lockstep.util.codec import one.lockstep.util._ import scodec._ import scodec.codecs._ import shapeless.Lazy import scala.language.implicitConversions import scala.reflect.{ClassTag, classTag} @deprecated("see one.lockstep.util.protocol.Encoded", since = "now") case class Encoded[A : ClassTag](raw: Bytes)...
lockstep-one/vault
vault-common/src/main/scala/one/lockstep/util/codec/Encoded.scala
Scala
agpl-3.0
1,047
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
travisbrown/scalatest
src/main/scala/org/scalatest/exceptions/NotAllowedException.scala
Scala
apache-2.0
3,904
/* * Copyright 2014 Lars Edenbrandt * * 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...
slicebox/slicebox
src/main/scala/se/nimsa/sbx/metadata/MetaDataDAO.scala
Scala
apache-2.0
28,283
/* * 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 ...
jackylk/incubator-carbondata
integration/spark/src/main/scala/org/apache/spark/sql/profiler/Profiler.scala
Scala
apache-2.0
7,332
/* * 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/test/scala/edu/ucla/cs/starai/forclift/bugs/TestBug20.scala
Scala
apache-2.0
2,079
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
wgpshashank/spark
core/src/main/scala/spark/util/MetadataCleaner.scala
Scala
apache-2.0
2,138
package org.jetbrains.plugins.scala.lang.parameterInfo.functionParameterInfo package generated class FunctionParameterInfoConstructorsTest extends FunctionParameterInfoTestBase { //This class was generated by build script, please don't change this override def folderPath: String = super.folderPath + "constructors/...
advancedxy/intellij-scala
test/org/jetbrains/plugins/scala/lang/parameterInfo/functionParameterInfo/generated/FunctionParameterInfoConstructorsTest.scala
Scala
apache-2.0
782
package scmirror.test case class SimpleCaseClass(ok:Boolean) case object SimpleCaseObject sealed abstract class ParamBaseClass(val id:String) case class InheritingParamCaseClass(val name:String) extends ParamBaseClass("4711") case object InheritingParamCaseObject extends ParamBaseClass("4711") sealed abstract cl...
ritschwumm/scmirror
src/test/scala/scmirror/reflection/TestClasses.scala
Scala
bsd-2-clause
1,046
package org.scalameta.reflection import scala.reflect.macros.{Universe => MacroUniverse} import scala.tools.nsc.Global import scala.org.scalameta.reflection.TreeHelpers import org.scalameta.ast.{Reflection => AstReflection} trait MacroToolkit extends Metadata with AstReflection { val global: MacroUniverse lazy va...
mdemarne/scalahost
foundation/src/main/scala/org/scalameta/reflection/Toolkits.scala
Scala
bsd-3-clause
971
package scorex.crypto.authds.legacy.treap import scorex.crypto.authds._ import scorex.crypto.authds.avltree.batch.Modification import scorex.crypto.authds.legacy.treap.Constants.LevelFunction import scorex.crypto.hash._ import scorex.utils.ByteArray import scala.util.{Failure, Success, Try} case class TreapModifyPro...
ScorexProject/scrypto
src/main/scala/scorex/crypto/authds/legacy/treap/TreapModifyProof.scala
Scala
cc0-1.0
4,499
package android import java.io.{File, InputStream, OutputStream} import java.util.concurrent.{LinkedBlockingDeque, ThreadPoolExecutor, TimeUnit} import java.util.jar.JarFile import java.util.zip.{Deflater, ZipEntry} import android.Keys.PackagingOptions import com.android.SdkConstants import com.android.apkzlib.zfile....
pfn/android-sdk-plugin
src/Packaging.scala
Scala
bsd-3-clause
15,992
/* * Copyright 2001-2008 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
vivosys/scalatest
src/test/scala/org/scalatest/fixture/SpecSpec.scala
Scala
apache-2.0
103,654
package com.avsystem.scex package compiler import java.{lang => jl, util => ju} import scala.language.dynamics /** * Created: 8/8/13 * Author: ghik */ object SomeDynamic extends Dynamic { def selectDynamic(attr: String) = attr }
pnf/scex
scex-derived/src/test/scala/com/avsystem/scex/compiler/SomeDynamic.scala
Scala
apache-2.0
237
/* sbt -- Simple Build Tool * Copyright 2009 Mark Harrah */ import sbt._ class SbtTest(info: ProjectInfo) extends PluginProject(info) { val publishTo = "Scala Tools Nexus" at "http://nexus.scala-tools.org/content/repositories/releases/" Credentials(Path.fromFile(System.getProperty("user.home")) / ".ivy2" / ".cre...
matheshar/simple-build-tool
scripted/project/build/SbtTest.scala
Scala
bsd-3-clause
337
/** * 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...
guozhangwang/kafka
core/src/test/scala/unit/kafka/server/epoch/EpochDrivenReplicationProtocolAcceptanceWithIbp26Test.scala
Scala
apache-2.0
1,325
package com.chinthaka.imagesimilarity.search import com.chinthaka.imagesimilarity.db.ImageMetadata import com.chinthaka.imagesimilarity.storage.ImageMetadataStorage import com.chinthaka.imagesimilarity.util.GlobalContext import collection.mutable.{HashMap, MultiMap} import collection.immutable.{Set, Seq} import net.sf...
echinthaka/ImageSimilarity
src/main/scala/com/chinthaka/imagesimilarity/search/ImageIndex.scala
Scala
apache-2.0
1,383
package pokescala.model import java.time.LocalDateTime import pokescala.net.PokeAPI class Sprite( val name : String, val pokemonURI : String, val imageURI : String, val id : Int, val resourceURI : String, val created : LocalDateTime, val modified : LocalDateTime) extends Model[Sprite] { ...
haferflocken/PokeScala
PokeScala/src/pokescala/model/Sprite.scala
Scala
apache-2.0
607
/* * 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 ...
shaoxuan-wang/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/calcite/FlinkRelOptClusterFactory.scala
Scala
apache-2.0
1,820
object Test { def main(args: Array[String]): Unit = { assert(Macro.foo[Foo] == "symbol") assert(Macro.foo[Box] == "no symbol") } }
som-snytt/dotty
tests/run-macros/no-symbol/2.scala
Scala
apache-2.0
143
/* * * o o o o o * | o | |\\ /| | / * | o-o o--o o-o oo | | O | oo o-o OO o-o o o * | | | | | | | | | | | | | | | | \\ | | \\ / * O---oo-o o--O | o-o o-o-o o o o-o-o o o o-o o * | ...
anskarl/LoMRF
src/main/scala/lomrf/util/package.scala
Scala
apache-2.0
14,251
/* * Copyright (C) 2017 Radicalbit * * This file is part of flink-JPMML * * flink-JPMML 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 Free Software Foundation, either version 3 of the * License, or (at your option) an...
francescofrontera/flink-jpmml
flink-jpmml-scala/src/test/scala/io/radicalbit/flink/pmml/scala/api/converter/VectorConverterSpec.scala
Scala
agpl-3.0
3,048
/*********************************************************************** * Copyright (c) 2013-2015 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...
vpipkt/geomesa
geomesa-blobstore/geomesa-blobstore-core/src/main/scala/org/locationtech/geomesa/blob/core/AccumuloBlobStore.scala
Scala
apache-2.0
4,088
package com.karasiq.nanoboard.test import org.scalatest.{FlatSpec, Matchers} import com.karasiq.nanoboard.NanoboardMessage import com.karasiq.nanoboard.sources.bitmessage.BitMessageTransport class BitMessageTest extends FlatSpec with Matchers { "BitMessage transport" should "encode message" in { val message = ...
Karasiq/nanoboard
library/src/test/scala/com/karasiq/nanoboard/test/BitMessageTest.scala
Scala
apache-2.0
1,341