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 com.twitter.finagle.util import com.twitter.util.{Closable, Future, Promise, Return, Time} /** * Allows resources to register their handlers to be invoked when service is closing. */ trait CloseNotifier { def onClose(h: => Unit): Unit } object CloseNotifier { /** * Creates CloseNotifier that invoke...
luciferous/finagle
finagle-core/src/main/scala/com/twitter/finagle/util/CloseNotifier.scala
Scala
apache-2.0
1,332
/* * 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 ...
yanboliang/spark
external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaSource.scala
Scala
apache-2.0
15,133
/* * Copyright 2013 Akiyoshi Sugiki, University of Tsukuba * * 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 a...
axi-sugiki/kumoi
src/kumoi/shell/event/TimerEvent.scala
Scala
apache-2.0
738
package org.apache.spark.mllib.feature import org.scalatest.Suite import org.scalatest.BeforeAndAfterAll import org.apache.spark.{SparkConf, SparkContext} import org.apache.spark.sql.SQLContext trait LocalSparkContext extends BeforeAndAfterAll { self: Suite => @transient var sc: SparkContext = _ @transient var s...
master/spark-stemming
src/test/scala/mllib/src/main/scala/org/apache/spark/mllib/feature/LocalSparkContext.scala
Scala
bsd-2-clause
653
package com.wbillingsley.handy import scala.collection.mutable import scala.concurrent.{Promise, ExecutionContext} import scala.util.Try /** * A cache for Refs. * * This is a simple class designed for two cases * - caches of values within a request on the server * - caches of values within a JavaScript cont...
wbillingsley/handy
handy/src/main/scala/com/wbillingsley/handy/RefCache.scala
Scala
mit
2,320
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
felixmulder/scala
src/library/scala/collection/immutable/IntMap.scala
Scala
bsd-3-clause
16,865
package com.olvind.crud package frontend import japgolly.scalajs.react.Callback import japgolly.scalajs.react.extra.~=> import org.scalajs.dom.ext.Ajax import upickle.default._ import scala.concurrent.Future object AjaxCall { def forEditor(id: EditorId): AjaxCall = AjaxCall(id.value) } case class AjaxCall(url...
elacin/slick-crud
crud/js/src/main/scala/com/olvind/crud/frontend/AjaxCall.scala
Scala
apache-2.0
917
/** * 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...
TiVo/kafka
core/src/test/scala/unit/kafka/server/AbstractMetadataRequestTest.scala
Scala
apache-2.0
2,941
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package play.it import ch.qos.logback.classic.Logger import ch.qos.logback.classic.spi.ILoggingEvent import ch.qos.logback.core.AppenderBase import org.slf4j.LoggerFactory import scala.collection.immutable import scala.collection.mutable.ArrayBuffer ...
wegtam/playframework
core/play-integration-test/src/it/scala/play/it/LogTester.scala
Scala
apache-2.0
1,348
/* * 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/test/scala/com/comcast/xfinity/sirius/itest/WriteAheadLogITest.scala
Scala
apache-2.0
2,394
package at.fh.swengb.resifo_android /** * Created by agnes on 02.02.2017. */ case class HauptwohnsitzBleibt(land:String, plz:String, ort:String, straße:String, tuer:String, hausnummer:String, stiege:String) extends Serializable
FlorianReinprecht/resifo-android
app/src/main/scala/at/fh/swengb/resifo_android/HauptwohnsitzBleibt.scala
Scala
gpl-3.0
234
object Test extends J { def h(xs: String*) {} g("a", "b", "c") }
felixmulder/scala
test/pending/pos/misc/S.scala
Scala
bsd-3-clause
69
package controllers import models.Transformer import play.api.Play.current import play.api.data.Forms._ import play.api.data._ import play.api.mvc._ import play.api.{Logger, Play} import support.bulkImport.ImportMangerSystem case class TransformerData( id: Long, ...
plamola/sendR
app/controllers/TransformerControl.scala
Scala
gpl-2.0
6,036
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.scaladsl.testkit.services import java.util.concurrent.ConcurrentLinkedQueue import akka.Done import akka.NotUsed import akka.stream.scaladsl.Flow import com.lightbend.lagom.scaladsl.api._ import com.lightbend.lag...
rcavalcanti/lagom
testkit/scaladsl/src/test/scala/com/lightbend/lagom/scaladsl/testkit/services/FakeServices.scala
Scala
apache-2.0
3,893
package dev.budget.reconciler.modules import com.fasterxml.jackson.databind.ObjectMapper import scaldi.Module class JsonModule extends Module { bind [ObjectMapper] to new ObjectMapper }
jhungerford/MintYnabReconciler
src/main/scala/dev/budget/reconciler/modules/JsonModule.scala
Scala
apache-2.0
190
package appear.dao import appear.domain._ import java.sql._ import scala.Some import scala.slick.driver.MySQLDriver.simple._ import scala.slick.driver.MySQLDriver.simple.Database.threadLocalSession import slick.jdbc.meta.MTable class IssueDAO { private val db = Database.forURL(url = "jdbc:mysql://localhost:3306/ap...
de-jan/appear-space-iot-spray
src/main/scala/appear/dao/IssueDAO.scala
Scala
mit
2,832
/* * Copyright 2014-2021 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 agr...
copperlight/atlas
atlas-wiki/src/main/scala/com/netflix/atlas/wiki/Page.scala
Scala
apache-2.0
3,919
package com.github.bespalovdn.asteriskscala.agi.command import com.github.bespalovdn.asteriskscala.common.protocol.AsteriskFormatter /** * Executes an application with given options. * [[http://www.voip-info.org/wiki/view/exec]] * @param application Application to be executed. * @param options List of application...
bespalovdn/asterisk-scala
agi/src/main/scala/com/github/bespalovdn/asteriskscala/agi/command/Exec.scala
Scala
mit
783
/* * Copyright 2009-2010 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
jeppenejsum/liftweb
framework/lift-base/lift-util/src/main/scala/net/liftweb/util/TemplateCache.scala
Scala
apache-2.0
2,065
package com.searchlight.khronus.store import com.searchlight.khronus.model.{Timestamp, HistogramSummary, Metric} import com.searchlight.khronus.util.{Settings, BaseIntegrationTest} import org.scalatest.{Matchers, FunSuite} import scala.concurrent.duration._ class CassandraHistogramSummaryStoreTest extends FunSuite w...
despegar/khronus
khronus-core/src/it/scala/com/searchlight/khronus/store/CassandraHistogramSummaryStoreTest.scala
Scala
apache-2.0
2,435
/* * HOLParser.scala * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ package at.logic.gapt.formats.simple import at.logic.gapt.expr._ import scala.util.matching.Regex trait SimpleFOLParser extends SimpleHOLParser { override def goal = term override de...
gisellemnr/gapt
src/main/scala/at/logic/gapt/formats/simple/SimpleFOLParser.scala
Scala
gpl-3.0
2,785
/* * 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 ...
bowenli86/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/expressions/validation/ScalarOperatorsValidationTest.scala
Scala
apache-2.0
2,709
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.linker.backend.emitter pr...
SebsLittleHelpers/scala-js
linker/shared/src/main/scala/org/scalajs/linker/backend/emitter/InternalOptions.scala
Scala
apache-2.0
1,188
package com.devdiscoveries.mazes.solvers import com.devdiscoveries.mazes.{Cell, Grid} import com.devdiscoveries.mazes.algorithms.MazeAlgorithm /** * Created by hugovalk on 25-10-16. */ trait Dijkstra extends MazeSolver { this: Grid with MazeAlgorithm => def distances(root: Cell): Seq[Distance] = { def lo...
hugovalk/mazes
src/main/scala/com/devdiscoveries/mazes/solvers/Dijkstra.scala
Scala
gpl-3.0
794
package com.prismtech.edison.grove.sensor import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicBoolean import com.prismtech.agentv.{PeriodicMicrosvc, Duration} import com.prismtech.edison.sensor.prelude._ import com.prismtech.edison.sensor.types.AnalogSensor import dds.prelude.SoftState impo...
PrismTech/agentv-edison-microsvcs
edison-grove-temperature/src/main/scala/com/prismtech/edison/grove/sensor/Temperature.scala
Scala
apache-2.0
2,367
package io.getquill.context.sql import io.getquill._ import io.getquill.context.mirror.Row class SqlActionMacroSpec extends Spec { "runs actions" - { import testContext._ "without bindings" - { "update" in { val q = quote { qr1.filter(t => t.s == null).update(_.s -> "s") } ...
mentegy/quill
quill-sql/src/test/scala/io/getquill/context/sql/SqlActionMacroSpec.scala
Scala
apache-2.0
2,462
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.testsuite.javalib.util.fun...
scala-js/scala-js
test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/util/function/LongConsumerTest.scala
Scala
apache-2.0
1,232
/* * -╥⌐⌐⌐⌐ -⌐⌐⌐⌐- * ≡╢░░░░⌐\░░░φ ╓╝░░░░⌐░░░░╪╕ * ╣╬░░` `░░░╢┘ φ▒╣╬╝╜ ░░╢╣Q * ║╣╬░⌐ ` ╤▒▒▒Å` ║╢╬╣ * ╚╣╬░⌐ ╔▒▒▒▒`«╕ ╢╢╣▒ * ╫╬░░╖ .░ ╙╨╨ ╣╣╬░φ ╓φ░╢╢Å * ╙╢░░░░⌐"░░░╜ ╙Å░░░░⌐░░░░╝` * ``˚¬ ⌐ ˚˚⌐´ * * ...
Flipkart/connekt
commons/src/main/scala/com/flipkart/connekt/commons/sync/SyncType.scala
Scala
mit
1,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 not use this f...
mandar2812/DynaML
dynaml-core/src/main/scala/io/github/tailhq/dynaml/kernels/WaveletKernel.scala
Scala
apache-2.0
1,969
package spray.client import helpers.WithoutEqualizer import org.scalatest.FunSpec import org.scalatest.prop.Checkers import scalaz.Scalaz._ import scalaz.concurrent.Task class TransformerPipelineSupportSpec extends FunSpec with Checkers with TransformerPipelineSupport with WithoutEqualizer { describe("(A => Tas...
msimav/spray-contrib-scalaz
src/test/scala/spray/client/TransformerPipelineSupportSpec.scala
Scala
mit
1,271
package kornell.server.api import javax.ws.rs._ import kornell.core.entity.Track import kornell.server.jdbc.repository.TracksRepo import kornell.server.util.AccessDeniedErr import kornell.server.util.Conditional.toConditional @Path("tracks") class TracksResource { @Path("{uuid}") def get(@PathParam("uuid") uuid:...
Craftware/Kornell
kornell-api/src/main/scala/kornell/server/api/TracksResource.scala
Scala
apache-2.0
676
package be.bolder.hoodie.linbin import collection.mutable.BitSet import scala.Array import java.lang.{IllegalStateException, IllegalArgumentException} final class StashOverflowException extends RuntimeException("Insert failure due to linbin stash overflow") final class KeyNotFoundException extends NoSuchElementExcep...
boggle/hoodie
src/main/scala/be/bolder/hoodie/linbin/linbin.scala
Scala
apache-2.0
16,630
package scalasthlm.ftpsamples // #imports import java.net.InetAddress import java.nio.file.{Files, Paths} import akka.actor.ActorSystem import akka.stream.alpakka.ftp.FtpSettings import akka.stream.alpakka.ftp.scaladsl.Ftp import akka.stream.scaladsl.{FileIO, Sink} import akka.stream.{ActorMaterializer, IOResult} impo...
ScalaSthlm/alpakka-integration-patterns
ftp-samples/src/main/scala/scalasthlm/ftpsamples/FtpToFile.scala
Scala
apache-2.0
2,643
package kafka.consumer import java.util.Properties import kafka.serializer.DefaultDecoder import kafka.utils.Logging /** * Copied from https://github.com/stealthly/scala-kafka, 0.8.2-beta (not released at the moment) */ class KafkaConsumer( topic: String, /** topic ...
amorfis/reactive-kafka
src/main/scala/kafka/consumer/KafkaConsumer.scala
Scala
apache-2.0
4,928
object Test { def main(args: Array[String]): Unit = { val a = 1 + 2 // [break] [step: a * 9] val b = a * 9 // [step: plus] val c = plus(a, b) // [step: x * x] print(c) } def plus(x: Int, y: Int) = { val a = x * x // [step: y * y] val b = y * y /...
som-snytt/dotty
tests/debug/method.scala
Scala
apache-2.0
411
/* NEST (New Scala Test) * Copyright 2007-2013 LAMP/EPFL * @author Philipp Haller */ package scala.tools.partest package nest import scala.tools.nsc.{ Global, Settings, CompilerCommand, FatalError } import scala.tools.nsc.reporters.{ Reporter, ConsoleReporter } import scala.tools.nsc.util.{ FakePos, stackTraceStri...
adriaanm/scala-partest
src/main/scala/scala/tools/partest/nest/DirectCompiler.scala
Scala
bsd-3-clause
5,192
/* * 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/test/scala/org/apache/carbondata/integration/spark/testsuite/bigdecimal/TestDimensionWithDecimalDataType.scala
Scala
apache-2.0
3,173
package org.holmesprocessing.totem.services.peid import dispatch.Defaults._ import dispatch.{url, _} import org.json4s.JsonAST.{JString, JValue} import org.holmesprocessing.totem.types.{TaskedWork, WorkFailure, WorkResult, WorkSuccess} import collection.mutable /** * YaraWork case class. Performs the actual enrichme...
HolmesProcessing/Holmes-Totem
src/main/scala/org/holmesprocessing/totem/services/peid/PEiDREST.scala
Scala
apache-2.0
3,747
/* * 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 ...
godfreyhe/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/batch/sql/RemoveShuffleTest.scala
Scala
apache-2.0
21,566
/* * 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 ...
ksimar/incubator-carbondata
integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/dataretention/DataRetentionConcurrencyTestCase.scala
Scala
apache-2.0
3,641
/* * ScalaMiner * ---------- * https://github.com/colinrgodsey/scalaminer * * Copyright 2014 Colin R Godsey <colingodsey.com> * * This program 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 ve...
colinrgodsey/scalaminer
src/main/scala/com/colingodsey/scalaminer/utils/ScalaSha256.scala
Scala
gpl-3.0
2,973
package com.github.maji_ky.plantuml import java.io.File import org.specs2.mutable.Specification import scala.util.{Failure, Try} class ClassDiagramGeneratorSpec extends Specification { sequential private val testPrivate = 'hoge val testVal = "test" var testVar = Map(testPrivate -> 5L) def testFunc(a: In...
maji-KY/sbt-plantuml-class-diagram
src/test/scala/com/github/maji_ky/plantuml/ClassDiagramGeneratorSpec.scala
Scala
gpl-3.0
5,423
/* * Copyright (C) 2005, The Beangle Software. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This...
beangle/notify
core/src/main/scala/org/beangle/notify/service/DefaultMessageQueue.scala
Scala
gpl-3.0
1,190
/* * Copyright 2015 Andreas Mosburger * * 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...
mosimos/sr_data_generator
spark/src/main/scala/queries/Query11.scala
Scala
apache-2.0
1,216
package scalaprops abstract class GenInstances1 extends GenInstances { implicit def javaEnumGen[A <: java.lang.Enum[A]](implicit A: reflect.ClassTag[A]): Gen[A] = { val array = A.runtimeClass.getEnumConstants.asInstanceOf[Array[A]] Gen.choose(0, array.length - 1).map(array) } }
scalaprops/scalaprops
gen/jvm/src/main/scala/scalaprops/GenInstances1.scala
Scala
mit
292
package net.mm.composer.properties import org.scalatest.FunSuite import org.scalatest.Matchers._ import Modifier._ class PropertiesParserSuite extends FunSuite { test("relation with field") { val parser = new PropertiesParserImpl parser.apply("username") shouldBe Right( Seq(FieldProperty("username")...
mosche/finatra-composition-proxy
composition-proxy/src/test/scala/net/mm/composer/properties/PropertiesParserSuite.scala
Scala
mit
2,262
package zzb.rest import shapeless._ /** * Provides a way to convert a value into an HList. * If the value is already an HList then it is returned unchanged, otherwise it's wrapped into a single-element HList. */ trait HListable[T] { type Out <: HList def apply(value: T): Out } object HListable extends LowerPr...
stepover/zzb
zzb-rest/src/main/scala/zzb/rest/HListable.scala
Scala
mit
626
package com.github.zhongl.codejam import System.{currentTimeMillis => now} import collection.mutable.ArrayBuffer import actors.{Scheduler, Actor, Reactor} /** * @author <a href="mailto:zhong.lunfu@gmail.com">zhongl<a> */ object ActorBasedPrime extends App { val (num, parallels) = args match { case Array(n) ...
zhongl/lab
codejam/src/main/scala/com/github/zhongl/codejam/ActorBasedPrime.scala
Scala
apache-2.0
2,499
// package com.gilesc // package mynab // package authentication // class AuthenticationSpec extends UnitSpec { // // "A login system" should { // // "allow you to login given valid credentials" in { // // // val info = AuthenticationInfo(testEmail, rawPassword) // // // val future = login(info).ru...
CraigGiles/mynab
service/src/test/scala/com/gilesc/mynab/authentication/AuthenticationSpec.scala
Scala
mit
836
/* * 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/responsiblepeople/NationalitySpec.scala
Scala
apache-2.0
4,039
/* * Copyright © 2014 Nemanja Stanarevic <nemanja@alum.mit.edu> * * Made with ❤ in NYC at Hacker School <http://hackerschool.com> * * Licensed under the GNU Affero General Public License, Version 3 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the ...
nemanja-stanarevic/gmail-api-scala-client
src/main/scala/gmailapi/resources/Draft.scala
Scala
agpl-3.0
932
/* * Copyright 2012-2013 Stephane Godbillon (@sgodbillon) * * 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 appl...
xnejp03/Play-ReactiveMongo
src/main/scala/play/modules/reactivemongo/bsonhandlers.scala
Scala
apache-2.0
1,758
package s99 import org.scalatest.FunSuite import org.scalatest.prop.Checkers import org.scalacheck.Arbitrary._ import org.scalacheck.Prop._ class P04Test extends FunSuite with Checkers { import P04._ test("list length check") { check { (a: List[Int]) => length(a) == a.size length2(a) == a.size ...
hzwuhao8/S99
src/test/scala/s99/P04Test.scala
Scala
apache-2.0
329
/* * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This program 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 Fou...
tesendic/Relite
test-src/test3.scala
Scala
agpl-3.0
1,786
/** * Copyright (C) 2012 Inria, University Lille 1. * * This file is part of PowerAPI. * * PowerAPI 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...
abourdon/powerapi-akka
examples/adam-demo/demo-full/src/main/scala/fr/inria/powerapi/example/adamdemo/full/Demo.scala
Scala
agpl-3.0
8,318
package unfiltered.request /** Utility for working with the request body. */ object Body { def stream[T](req: HttpRequest[T]) = req.inputStream def reader[T](req: HttpRequest[T]) = req.reader def bytes[T](req: HttpRequest[T]) = { val in = stream(req) val bos = new java.io.ByteArrayOutputStream val ba...
unfiltered/unfiltered
library/src/main/scala/request/readers.scala
Scala
mit
912
package com.arcusys.valamis.member.service import com.arcusys.learn.liferay.LiferayClasses.LUser import com.arcusys.valamis.member.model.{Member, MemberTypes} import com.arcusys.valamis.model.{RangeResult, SkipTake} import com.arcusys.learn.liferay.services.{OrganizationLocalServiceHelper => OrganizationHelper} import...
igor-borisov/valamis
valamis-core/src/main/scala/com/arcusys/valamis/member/service/MemberService.scala
Scala
gpl-3.0
3,643
/* * 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...
dotty-staging/scalatest
scalatest-test/src/test/scala/org/scalatest/matchers/dsl/ContainWordSpec.scala
Scala
apache-2.0
42,809
/* * Copyright 2014 Treode, 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...
Treode/store
server/test/com/treode/server/StubLibrarian.scala
Scala
apache-2.0
793
/* * Copyright (C) 2007 Lalit Pant <pant.lalit@gmail.com> * * The contents of this file are subject to the GNU General Public License * Version 3 (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.gnu.org/copyleft/gpl.html * ...
litan/jiva-ng
src/main/scala/net/kogics/jiva/jbridge/JFitnessWrapper.scala
Scala
gpl-3.0
899
package io.github.sclearn.model.linear import io.github.sclearn.Dataset class GDLinearRegression extends LinearRegression { }
sclearn/sclearn
sc/src/main/scala/io/github/sclearn/model/linear/GDLinearRegression.scala
Scala
apache-2.0
127
package org.sgine.ui.align import org.powerscala.{Enumerated, EnumEntry} /** * HorizontalAlignment of components. * * @author Matt Hicks <mhicks@sgine.org> */ sealed class HorizontalAlignment extends EnumEntry[HorizontalAlignment] object HorizontalAlignment extends Enumerated[HorizontalAlignment] { val Left = ...
Axiometry/sgine
ui/src/main/scala/org/sgine/ui/align/HorizontalAlignment.scala
Scala
bsd-3-clause
422
/* * 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/test/scala/org/apache/spark/ml/clustering/LDASuite.scala
Scala
apache-2.0
8,997
package com.twitter.jvm import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import org.junit.runner.RunWith import com.twitter.conversions.storage._ @RunWith(classOf[JUnitRunner]) class JvmTest extends FunSuite { test("PoolState.-") { val a = PoolState(1, 1000.kilobytes, 500.kilobytes) val ...
mosesn/util
util-jvm/src/test/scala/com/twitter/jvm/JvmTest.scala
Scala
apache-2.0
662
/* * 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
shared/src/main/scala/eu/cdevreeze/yaidom/queryapi/HasParentApi.scala
Scala
apache-2.0
2,279
package org.jetbrains.jps.incremental.scala package remote import java.io.File import com.intellij.openapi.util.io.FileUtil import org.jetbrains.jps.incremental.scala.data._ import org.jetbrains.jps.incremental.scala.model.{CompileOrder, IncrementalityType} import org.jetbrains.jps.incremental.scala.remote.Arguments....
triplequote/intellij-scala
scala/compiler-jps/src/org/jetbrains/jps/incremental/scala/remote/Arguments.scala
Scala
apache-2.0
5,089
/* * Copyright 2011-2021 Asakusa Framework Team. * * 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 ...
asakusafw/asakusafw-spark
runtime/src/main/scala/com/asakusafw/spark/runtime/graph/NewHadoopOutput.scala
Scala
apache-2.0
2,530
package scutil.lang import scutil.lang.tc._ object Ior { def left[A,B](a:A):Ior[A,B] = Left(a) def right[A,B](b:B):Ior[A,B] = Right(b) def both[A,B](a:A, b:B):Ior[A,B] = Both(a,b) def maybeLeft[A,B](a:Option[A], b:B):Ior[A,B] = a match { case Some(aa) => Both(aa, b) case None => Right(b) } def ma...
ritschwumm/scutil
modules/core/src/main/scala/scutil/lang/Ior.scala
Scala
bsd-2-clause
2,592
package troy package schema import troy.cql.ast.DataType import troy.cql.ast.dml.Operator object ColumnOps { implicit class Operations(val column: Column) extends AnyVal { import Operator._ import DataType._ // TODO: Add In def operandType(operator: Operator): Result[DataType] = operator match { ...
schemasafe/troy
troy-schema/src/main/scala/troy/schema/ColumnOps.scala
Scala
apache-2.0
997
/** * 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...
EasonYi/kafka
core/src/test/scala/unit/kafka/common/TopicTest.scala
Scala
apache-2.0
1,977
package com.frenchcoder.scalamones.utils import scala.concurrent.duration._ import scala.language.implicitConversions object Conversion { implicit def doubleToJavaLong(d:Double) : java.lang.Long = d.toLong.asInstanceOf[java.lang.Long] def millisToHuman(m: Long): String = { def _convert(u: List[(TimeUnit, Str...
jpthomasset/scalamones
src/main/scala-2.11/com/frenchcoder/scalamones/utils/Conversion.scala
Scala
mit
902
package typeformation.cf.syntax import io.circe.Json import org.scalatest.{FreeSpec, Matchers} import shapeless.Witness.Lt import shapeless.test.illTyped import typeformation.cf.CfExp.{FnJoin, FnSub} import typeformation.cf._ class InterpolatorsTest extends FreeSpec with Matchers { trait TestResource extends Resou...
typeformation/typeformation
cf/src/test/scala/typeformation/cf/syntax/InterpolatorsTest.scala
Scala
mit
3,072
package se.culvertsoft.mgen.compiler.util import scala.collection.JavaConverters.mapAsScalaMapConverter object SettingsUtils { implicit class RichSettings(_settings: java.util.Map[String, String]) { val settings = _settings.asScala def getBool(name: String): Option[Boolean] = { settings.get(name) ma...
culvertsoft/mgen
mgen-compiler/src/main/scala/se/culvertsoft/mgen/compiler/util/SettingsUtils.scala
Scala
mit
417
// Author: Olivier Chafik (http://ochafik.com) // Feel free to modify and reuse this for any purpose ("public domain / I don't care"). package scalaxy.extensions import scala.collection.mutable import scala.reflect.internal._ import scala.reflect.ClassTag import scala.tools.nsc.CompilerCommand import scala.tools.nsc...
nativelibs4java/Scalaxy
Obsolete/MacroExtensions/src/main/scala/scalaxy/extensions/MacroExtensionsPlugin.scala
Scala
bsd-3-clause
1,174
/* * Copyright 2022 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/fset-faststream
app/services/assistancedetails/AssistanceDetailsService.scala
Scala
apache-2.0
1,824
package org.jetbrains.plugins.scala.failed.typeInference import org.jetbrains.plugins.scala.lang.typeInference.TypeInferenceTestBase /** * @author Alefas * @since 23/03/16 */ class ValueClassesTest extends TypeInferenceTestBase { override protected def shouldPass: Boolean = false override def folderPath: ...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/failed/typeInference/ValueClassesTest.scala
Scala
apache-2.0
398
package org.crudible.core.model trait FormElement
rehei/crudible
crudible-core/src/main/scala/org/crudible/core/model/FormElement.scala
Scala
apache-2.0
50
package avrohugger package input package reflectivecompilation package schemagen import parsers.ScalaDocParser import stores.SchemaStore import org.apache.avro.Schema import java.util.{Arrays => JArrays} import scala.reflect.runtime.universe.Name import scala.collection.JavaConverters._ object EnumSchemaGenerator ...
julianpeeters/avrohugger
avrohugger-core/src/main/scala/input/reflectivecompilation/schemagen/EnumSchemaGenerator.scala
Scala
apache-2.0
946
package nexus.diff.collection import cats.~> import nexus.diff.BoxValuePair import scala.collection.Iterable /** * A map whose keys are symbolic expressions. * * @tparam V Higher-kinded type that specifies what is stored in this map. * A key of type `D[X]` is associated with a value of type `V[X]`. * ...
ctongfei/nexus
diff/src/main/scala/nexus/diff/collection/BoxMap.scala
Scala
mit
662
/* `uncons` has exactly the correct signature needed for `unfold`. (Notice that for any `Stream`, `s`, `unfold(s)(_.uncons) == s`. To implement `Stream.map`, we simply transform the first element of the pair returned, using the `map` method on `Option` (discussed in chapter 4). Variation 1 has the same function written...
willcodejavaforfood/fpinscala
answerkey/laziness/12.answer.scala
Scala
mit
2,250
/** Copyright 2015 TappingStone, 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 ...
nvoron23/PredictionIO
core/src/main/scala/controller/java/JavaAlgorithm.scala
Scala
apache-2.0
4,479
package metaconfig import org.scalacheck.Prop.forAll import org.scalacheck.ScalacheckShapeless._ class CodecRoundtripSuite extends munit.ScalaCheckSuite { def checkRoundtrip[T: ConfCodec](a: T): Boolean = { val conf = ConfEncoder[T].write(a) val b = ConfDecoder[T].read(conf).get a == b } property(...
olafurpg/metaconfig
metaconfig-tests/jvm/src/test/scala/metaconfig/CodecRoundtripSuite.scala
Scala
apache-2.0
499
package algebra package lattice import scala.{specialized => sp} /** * A meet-semilattice (or lower semilattice) is a semilattice whose * operation is called "meet", and which can be thought of as a * greatest lower bound. */ trait MeetSemilattice[@sp(Int, Long, Float, Double) A] extends Any with Serializable { s...
tixxit/algebra
core/src/main/scala/algebra/lattice/MeetSemilattice.scala
Scala
mit
1,000
package org.jetbrains.plugins.scala.lang.optimize.generated import java.util.regex.Pattern import com.intellij.psi.PsiFile import org.jetbrains.plugins.scala.editor.importOptimizer.ScalastyleSettings import org.jetbrains.plugins.scala.lang.optimize.OptimizeImportsTestBase /** * Nikolay.Tropin * 13-Feb-17 */ cl...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/optimize/generated/OptimizeImportsScalastyleGroupsTest.scala
Scala
apache-2.0
759
/* * 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
interface/src/test/scala/quasar/main/ExtractSchemaSpec.scala
Scala
apache-2.0
9,768
/* sbt -- Simple Build Tool * Copyright 2008, 2009, 2010 Mark Harrah */ package xsbt.boot import Pre._ import java.io.File import java.net.URL import scala.collection.immutable.List //TODO: use copy constructor, check size change final case class LaunchConfiguration(scalaVersion: Value[String], ivyConfiguration: I...
xeno-by/old-scalameta-sbt
launch/src/main/scala/xsbt/boot/LaunchConfiguration.scala
Scala
bsd-3-clause
8,504
/* * Licensed to Cloudera, Inc. under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Cloudera, Inc. licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use thi...
jjmleiro/hue
apps/spark/java/livy-repl/src/test/scala/com/cloudera/hue/livy/repl/SparkRInterpreterSpec.scala
Scala
apache-2.0
3,515
package org.scalaide.ui.internal.editor import scala.tools.eclipse.contribution.weaving.jdt.ui.javaeditor.IScalaEditor import org.eclipse.jdt.ui.text.IJavaPartitions import org.eclipse.ui.IEditorReference import org.eclipse.ui.IFileEditorInput import org.eclipse.ui.IWorkbenchPage import org.scalaide.core.IScalaProject...
dragos/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/ui/internal/editor/ScalaEditor.scala
Scala
bsd-3-clause
1,892
/* * 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
niflheim/src/main/scala/quasar/niflheim/Chef.scala
Scala
apache-2.0
2,966
/** * This file is part of agora-board. * Copyright (C) 2016 Agora Voting SL <agora@agoravoting.com> * agora-board 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....
agoravoting/agora-board
app/models/Base64Message.scala
Scala
agpl-3.0
1,531
package pt.cnbc.wikimodels; import junit.framework._; import Assert._; object AppTest { def suite: Test = { val suite = new TestSuite(classOf[AppTest]); suite } def main(args : Array[String]) { junit.textui.TestRunner.run(suite); } } /** * Unit test for simple App. */ class...
alexmsmartins/WikiModels
wm_auth_realm/src/test/scala/pt/cnbc/wikimodels/AppTest.scala
Scala
mit
438
package it.unibo.drescue.communication.messages import org.scalatest.FunSuite object RequestCpAlertsMessageTest { private val CpID1 = "RA01" } class RequestCpAlertsMessageTest extends FunSuite { val alertsMessage = RequestCpAlertsMessageImpl(RequestCpAlertsMessageTest.CpID1) test("Check MessageType") { a...
SofiaRosetti/S3-16-d-rescue
utils/src/test/scala/it/unibo/drescue/communication/messages/RequestCpAlertsMessageTest.scala
Scala
gpl-3.0
531
package com.study.spark.datasource import org.apache.spark.rdd.RDD import org.apache.spark.sql.sources.{BaseRelation, TableScan} import org.apache.spark.sql.types.{StringType, StructField, StructType} import org.apache.spark.sql.{Row, SQLContext} /** * Created by dltkr on 2017-01-13. * BaseRelation을 상속받아 스키마 정보를 ...
hackpupu/LML
spark_datasource/src/main/scala/com/study/spark/datasource/StudyRelation.scala
Scala
gpl-3.0
1,339
package com.scalaAsm.x86 package Instructions package System // Description: Get Value of Extended Control Register // Category: general trait XGETBV extends InstructionDefinition { val mnemonic = "XGETBV" } object XGETBV extends ZeroOperands[XGETBV] with XGETBVImpl trait XGETBVImpl extends XGETBV { implicit ob...
bdwashbu/scala-x86-inst
src/main/scala/com/scalaAsm/x86/Instructions/System/XGETBV.scala
Scala
apache-2.0
442
/** * Copyright 2013 Israel Freitas (israel.araujo.freitas@gmail.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...
ifreitas/brain
src/main/scala/brain/models/PersistentName.scala
Scala
apache-2.0
935
package mgoeminne.scalaggplot trait GGElement { }
mgoeminne/scala-ggplot
src/main/scala/mgoeminne/scalaggplot/GGElement.scala
Scala
lgpl-3.0
52
package com.giyeok.jparser import scala.collection.immutable.{ListMap, ListSet} trait Grammar { type RuleMap = ListMap[String, List[Symbols.Symbol]] type Symbol = Symbols.Symbol val name: String val rules: RuleMap val startSymbol: Symbols.Nonterminal } object Grammar { implicit class Gramma...
Joonsoo/moon-parser
base/src/main/scala/com/giyeok/jparser/Grammar.scala
Scala
mit
5,664
package agni package std import java.util.concurrent.Executor import agni.util.Futures import cats.MonadError import cats.instances.future._ import com.datastax.oss.driver.api.core.CqlSession import com.datastax.oss.driver.api.core.cql.BoundStatement import scala.concurrent.{ ExecutionContext, Promise, Future => SFu...
yanana/agni
core/src/main/scala/agni/std/Future.scala
Scala
mit
862
package reeds import java.util.{Currency, UUID} import cats.data.Validated.Valid import org.scalacheck.{Arbitrary, Gen} import org.scalatest.FreeSpec import org.scalatest.prop.{PropertyChecks, TableDrivenPropertyChecks} import scala.collection.JavaConverters.asScalaSetConverter class UtilTests extends FreeSpec with...
Acornsgrow/reeds
reeds-core/src/test/scala/reeds/UtilTests.scala
Scala
apache-2.0
1,425
/* * 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 ...
gioenn/xSpark
mllib/src/main/scala/org/apache/spark/ml/feature/PCA.scala
Scala
apache-2.0
8,090