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
/* * Copyright 2018 Analytics Zoo 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...
intel-analytics/analytics-zoo
zoo/src/main/scala/com/intel/analytics/zoo/pipeline/api/keras/layers/Masking.scala
Scala
apache-2.0
2,118
package org.jetbrains.plugins.scala.lang.psi.stubs.elements.signatures import com.intellij.lang.ASTNode import com.intellij.psi.PsiElement import com.intellij.psi.stubs.{StubElement, StubInputStream, StubOutputStream} import org.jetbrains.plugins.scala.lang.psi.api.statements.params.ScParameterClause import org.jetbra...
gtache/intellij-lsp
intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/psi/stubs/elements/signatures/ScParamClauseElementType.scala
Scala
apache-2.0
1,573
package memnets.fx.fx3d import memnets.model.Element import memnets.ui.TickableUI import scalafx.scene.Node trait Tickable3DFX extends TickableUI[Node] { def element: Element = { if (node.isDefined) node.get.userData.asInstanceOf[Element] else null } def element_=(r: Element): Unit = { i...
MemoryNetworks/memnets
fx/src/main/scala/memnets/fx/fx3d/Tickable3DFX.scala
Scala
apache-2.0
373
import swing.{BorderPanel, BoxPanel, FlowPanel, GridPanel, Panel, Button, Label, Swing, ProgressBar, Orientation, TextField, Table} import swing.event._ import swing.BorderPanel.Position._ import scala.collection.JavaConversions._ import scala.collection.mutable.ListBuffer import java.awt.event.{MouseEvent, KeyEvent...
goodlyrottenapple/muddy-children
calculus/src/scala/gui/GUIDialogHelper.scala
Scala
mit
20,579
/* ----------------- sse-breaker ----------------- *\\ * Licensed under the Apache License, Version 2.0. * * Author: Spiros Tzavellas * \\* ----------------------------------------------- */ package com.tzavellas.sse import scala.concurrent.duration._ package object breaker { val DefaultTe...
sptz45/sse-breaker
src/test/scala/com/tzavellas/sse/breaker/package.scala
Scala
apache-2.0
488
package com.rbmhtechnology.eventuate.sandbox import java.util.concurrent.TimeUnit import com.typesafe.config.Config import scala.concurrent.duration._ class ReplicationSettings(config: Config) { val askTimeout = config.getDuration("sandbox.replication.ask-timeout", TimeUnit.MILLISECONDS).millis val retryDe...
RBMHTechnology/eventuate-sandbox
src/main/scala/com/rbmhtechnology/eventuate/sandbox/ReplicationSettings.scala
Scala
apache-2.0
487
package kuaixue.scala.book.chapter5 object Enum extends Enumeration{ var Red, Yellow, Green = Value }
slieer/scala-tutorials
src/main/scala/kuaixue/scala/book/chapter5/Enum.scala
Scala
apache-2.0
108
/* * Copyright (C) 2015 Red Bull Media House GmbH <http://www.redbullmediahouse.com> - all rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/li...
linearregression/eventuate
src/it/scala/com/rbmhtechnology/eventuate/log/EventLogLifecycle.scala
Scala
apache-2.0
10,291
package com.rbmhtechnology.eventuate.chaos import akka.actor.Props import com.rbmhtechnology.eventuate.ReplicationEndpoint import com.rbmhtechnology.eventuate.crdt._ object ChaosCounterLeveldb extends ChaosLeveldbSetup { implicit val system = getSystem val endpoint = getEndpoint val service = new CounterServic...
RBMHTechnology/eventuate-chaos
src/main/scala/com/rbmhtechnology/eventuate/chaos/ChaosCounter.scala
Scala
apache-2.0
1,005
package com.rasterfoundry.backsplash.server import com.rasterfoundry.datamodel.AnnotationProject import com.rasterfoundry.datamodel.{ AuthResult, Project, ProjectLayer, Scene, ToolRun, UserWithPlatform } import com.rasterfoundry.http4s.{Cache => Http4sUtilCache} import com.typesafe.scalalogging.LazyLoggin...
raster-foundry/raster-foundry
app-backend/backsplash-server/src/main/scala/com/rasterfoundry/backsplash/Cache.scala
Scala
apache-2.0
1,587
package pl.pholda.malpompaaligxilo.util abstract class DateCompanion { def now: Date // ISO 8601 (YYYY-MM-DD) def fromString(str: String): Date }
pholda/MalpompaAligxilo
core/shared/src/main/scala/pl/pholda/malpompaaligxilo/util/DateCompanion.scala
Scala
gpl-3.0
154
/* * 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 ...
hhbyyh/spark
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveUtils.scala
Scala
apache-2.0
22,707
package colossus.metrics import akka.actor._ import akka.testkit._ import scala.language.higherKinds import org.scalatest._ class NewSpec extends WordSpec with MustMatchers with BeforeAndAfterAll{ implicit val sys = ActorSystem("test") def localCProbe: (LocalCollection, TestProbe) = { val p = TestProbe()...
zgagnon/colossus
colossus-metrics/src/test/scala/colossus/metrics/CollectionSpec.scala
Scala
apache-2.0
1,862
package skinny.task import org.scalatest._ class AssetsPrecompileTaskSpec extends FlatSpec with Matchers { it should "be available" in { AssetsPrecompileTask.main(Array("tmp")) } }
skinny-framework/skinny-framework
assets/src/test/scala/skinny/task/AssetsPrecompileTaskSpec.scala
Scala
mit
193
package org.thp.cortex.controllers import scala.concurrent.{ ExecutionContext, Future } import play.api.libs.json.JsObject import play.api.mvc.{ AbstractController, Action, AnyContent, ControllerComponents } import javax.inject.{ Inject, Singleton } import org.thp.cortex.models.{ BaseConfig, Roles } import org.thp.c...
CERT-BDF/Cortex
app/org/thp/cortex/controllers/ResponderConfigCtrl.scala
Scala
agpl-3.0
1,970
/** * 编写一个Scala对象,该对象带有一个易失(volatile)的Boolean字段。 * 让某一个线程睡眠一段时间,之后将该字段设为true,打印消息,然后退出。 * 而另一个线程不停的检查该字段是否为true。 * 如果是,它将打印一个消息并退出。 * 如果不是,则它将短暂睡眠,然后重试。如果变量不是易失的,会发生什么? */ /*** import concurrent.ops.spawn object Test06{ @volatile var value = false } spawn { Thread.sleep(100); Test06.value = true println...
vernonzheng/scala-for-the-Impatient
src/Chapter15/exercise06.scala
Scala
mit
692
package net.sansa_stack.inference.spark.forwardchaining.triples import net.sansa_stack.inference.data.RDF import net.sansa_stack.inference.rules.{HighLevelRuleDependencyGraphGenerator, RuleDependencyGraph, RuleDependencyGraphGenerator} import net.sansa_stack.inference.spark.data.model.AbstractRDFGraphSpark import net....
SANSA-Stack/SANSA-RDF
sansa-inference/sansa-inference-spark/src/main/scala/net/sansa_stack/inference/spark/forwardchaining/triples/ForwardRuleReasonerOptimized.scala
Scala
apache-2.0
5,547
import com.amazonaws.auth.InstanceProfileCredentialsProvider import com.typesafe.sbt.SbtScalariform._ import ohnosequences.sbt.SbtS3Resolver import ohnosequences.sbt.SbtS3Resolver.{ S3Resolver, s3, s3resolver } import org.scalastyle.sbt.ScalastylePlugin.{ Settings => styleSettings } import sbt.Keys._ import sbt._ impor...
abel-von/chaos
project/build.scala
Scala
apache-2.0
6,043
/* * Copyright 2018 Analytics Zoo 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...
intel-analytics/analytics-zoo
zoo/src/test/scala/com/intel/analytics/zoo/pipeline/api/keras/layers/CMulSpec.scala
Scala
apache-2.0
2,149
package io.iohk.ethereum.sync.util import akka.util.ByteString import cats.effect.Resource import io.iohk.ethereum.Mocks.MockValidatorsAlwaysSucceed import io.iohk.ethereum.blockchain.sync.SyncProtocol import io.iohk.ethereum.blockchain.sync.fast.FastSync import io.iohk.ethereum.blockchain.sync.fast.FastSync.SyncState...
input-output-hk/etc-client
src/it/scala/io/iohk/ethereum/sync/util/FastSyncItSpecUtils.scala
Scala
mit
6,251
package rest import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport import akka.http.scaladsl.model.StatusCodes._ import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.server.Route import entities.JsonProtocol import persistence.entities.{SimpleSupplier, Supplier} import utils.{PersistenceM...
Chehao/Akkala
game-account/src/main/scala/rest/SupplierRoutes.scala
Scala
apache-2.0
1,569
/* * -╥⌐⌐⌐⌐ -⌐⌐⌐⌐- * ≡╢░░░░⌐\\░░░φ ╓╝░░░░⌐░░░░╪╕ * ╣╬░░` `░░░╢┘ φ▒╣╬╝╜ ░░╢╣Q * ║╣╬░⌐ ` ╤▒▒▒Å` ║╢╬╣ * ╚╣╬░⌐ ╔▒▒▒▒`«╕ ╢╢╣▒ * ╫╬░░╖ .░ ╙╨╨ ╣╣╬░φ ╓φ░╢╢Å * ╙╢░░░░⌐"░░░╜ ╙Å░░░░⌐░░░░╝` * ``˚¬ ⌐ ˚˚⌐´ * * ...
Flipkart/connekt
firefly/src/main/scala/com/flipkart/connekt/firefly/flows/dispatchers/HttpDispatcher.scala
Scala
mit
2,854
package org.karps.row import org.apache.spark.sql.Row import org.apache.spark.sql.types._ import org.karps.structures.{AugmentedDataType, IsNullable} import spray.json.{DefaultJsonProtocol, JsArray, JsBoolean, JsNull, JsNumber, JsObject, JsString, JsValue, RootJsonFormat} import scala.util.{Failure, Success, Try} /...
krapsh/kraps-server
src/main/scala/org/karps/row/AlgebraicRow.scala
Scala
apache-2.0
1,475
/* * 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/main/scala/org/apache/spark/sql/execution/adaptive/ColumnarCustomShuffleReaderExec.scala
Scala
apache-2.0
3,888
package com.fang.page import com.thoughtworks.binding.{Binding, dom} import org.scalajs.dom.raw.{Event, Node} import com.fang.ImplicitConvert._ import com.fang.UserStatus import com.fang.UserStatus.UpdateUS import com.fang.data.GlobalValue import com.fang.game.rules.Rules import com.fang.segment.UserStatusNavBar import...
TianhaoFang/online-go
js/src/main/scala/com/fang/page/ChooseGamePage.scala
Scala
mit
1,474
package ir.fulltext.indri import java.nio.file.{Path, Paths} import util.Config /** * <pre> * Created on 2017/01/13. * </pre> * * @author K.Sakamoto */ object IndriWordLevelIndexer { private val indices: Array[String] = Config.wordLevelIndriIndices.toArray private val segmentations: Array[String] = C...
ktr-skmt/FelisCatusZero
src/main/scala/ir/fulltext/indri/IndriWordLevelIndexer.scala
Scala
apache-2.0
1,050
package dotty.tools.dotc package printing import core._ import Texts._, Types._, Flags._, Names._, Symbols._, NameOps._, Constants._, Denotations._ import StdNames._ import Contexts._ import Scopes.Scope, Denotations.Denotation, Annotations.Annotation import StdNames.nme import ast.Trees._ import typer.Implicits._ imp...
dotty-staging/dotty
compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala
Scala
apache-2.0
27,130
package com.krux.hyperion.aws /** * A condition that must be met before the object can run. * The activity cannot run until all its conditions are met. */ trait AdpPrecondition extends AdpDataPipelineObject { /** * The IAM role to use for this precondition. */ def role: String /** * The preconditio...
sethyates/hyperion
core/src/main/scala/com/krux/hyperion/aws/AdpPreconditions.scala
Scala
apache-2.0
5,159
/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package viper.silicon.tests import org.scalatest.FunSuite import org.scalatest.Matchers import vipe...
sccblom/vercors
viper/silicon/src/test/scala/SimpleArithmeticTermSolverTests.scala
Scala
mpl-2.0
3,292
/* * 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/execution/SparkPlanSuite.scala
Scala
apache-2.0
4,837
/* * Copyright 2014 Kevin Herron * * 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 ...
digitalpetri/scala-ethernet-ip
enip-core/src/main/scala/com/digitalpetri/ethernetip/cip/epath/DataSegment.scala
Scala
apache-2.0
2,576
import gruenewa.grid.GridRun object Hello { def main(args: Array[String]) { val func = (n: Int) => printf("Hello #%d!\\n", n) GridRun { gridify => (1 to 100).foreach(gridify(func)) } } }
gruenewa/gruenewa-grid
samples/Hello.scala
Scala
gpl-3.0
211
/** * Copyright (c) 2013 Saddle Development 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 ...
jyt109/saddle
saddle-core/src/main/scala/org/saddle/Vec.scala
Scala
apache-2.0
17,157
/*********************************************************************** * Copyright (c) 2013-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...
locationtech/geomesa
geomesa-hbase/geomesa-hbase-datastore/src/test/scala/org/locationtech/geomesa/hbase/data/HBaseSamplingFilterTest.scala
Scala
apache-2.0
9,660
/* * 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 n...
KevinLiLu/kafka
core/src/test/scala/unit/kafka/coordinator/transaction/TransactionStateManagerTest.scala
Scala
apache-2.0
30,433
package controllers import play.api.i18n.Lang import play.api.mvc._ import scala.concurrent.duration._ import scala.util.chaining._ import lila.app._ import lila.game.Pov import lila.user.{ User => UserModel } // both bot & board APIs final class PlayApi( env: Env, apiC: => Api )(implicit mat: akka.strea...
luanlv/lila
app/controllers/PlayApi.scala
Scala
mit
6,370
/* * 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 ...
bravo-zhang/spark
core/src/test/scala/org/apache/spark/scheduler/SchedulerIntegrationSuite.scala
Scala
apache-2.0
24,906
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.sexp.formats import collection.{ immutable => im } import org.ensime.sexp._ // http://docs.scala-lang.org/overviews/collections/overview.html class CollectionFormatsSpec ...
sugakandrey/ensime-server
s-express/src/test/scala/org/ensime/sexp/formats/CollectionFormatsSpec.scala
Scala
gpl-3.0
5,640
/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2010 Travis Brown, The University of Texas at Austin // // 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 ...
tectronics/textgrounder
src/main/scala/opennlp/textgrounder/topo/gaz/CorpusGazetteerReader.scala
Scala
apache-2.0
1,341
/* * Copyright 2015-2016 IBM Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
CrowdFlower/incubator-openwhisk
common/scala/src/main/scala/whisk/core/connector/MessageProducer.scala
Scala
apache-2.0
991
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
jedesah/Quasar
connector/src/main/scala/quasar/connector/ManagedQueryFile.scala
Scala
apache-2.0
2,718
/* * 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 ...
quasar-analytics/quasar
qsu/src/test/scala/quasar/qsu/ReadLPSpec.scala
Scala
apache-2.0
11,477
/* * Copyright 2017 PayPal * * 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 ...
paypal/squbs
squbs-pattern/src/main/scala/org/squbs/pattern/orchestration/Aggregator.scala
Scala
apache-2.0
6,696
package argonaut import monocle.macros.GenLens import scalaz._ import scala.annotation._ /** * Parameters for pretty-printing a JSON value. * * @author Tony Morris * * @param indent The indentation to use if any format strings contain a new line. * @param lbraceLeft Spaces to insert to left of a left brace. * ...
etorreborre/argonaut
src/main/scala/argonaut/PrettyParams.scala
Scala
bsd-3-clause
12,321
package bootstrap.liftweb import net.liftweb._ import util._ import Helpers._ import common._ import http._ import sitemap._ import Loc._ import mapper._ import code.model._ import nl.malienkolders.htm.battle.comet._ import nl.malienkolders.htm.battle.model._ /** * A class that's instantiated early and run. It allo...
hema-tournament-manager/htm
htm-battle/src/main/scala/bootstrap/liftweb/Boot.scala
Scala
apache-2.0
2,425
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala package util.par...
scala/scala-parser-combinators
shared/src/main/scala/scala/util/parsing/combinator/SubSequence.scala
Scala
apache-2.0
1,291
package scjson.converter import scutil.core.implicits.* import scutil.lang.* object NumberBigDecimalConverters { val IntToBigDecimal:JsonConverter[Int,BigDecimal] = Converter total { it => BigDecimal exact it.toLong } val BigDecimalToInt:JsonConverter[BigDecimal,Int] = Converter { it => try { Validated ...
ritschwumm/scjson
modules/converter/src/main/scala/converter/NumberBigDecimalConverters.scala
Scala
bsd-2-clause
2,264
/* * Copyright © 2014 TU Berlin ([email protected]) * * 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...
aalexandrov/emma
emma-spark/src/main/scala/org/emmalanguage/api/SparkDataset.scala
Scala
apache-2.0
8,690
package org.monkeynuthead.monkeybarrel.core /** * Type alias definitions */ object Types { type Attribute = String type AttributeValue = String type Measure = String type AggFunc = (Double, Double) => Double }
georgenicoll/monkey-barrel
old20150804/core/shared/src/main/scala/org/monkeynuthead/monkeybarrel/core/Types.scala
Scala
gpl-2.0
236
package me.aihe.dataframe import scala.util.Try /** * Created by aihe on 12/21/15. */ case class Row(private[dataframe] val index: Int, private[dataframe] val data: Seq[Any], private[dataframe] val names: Seq[String]) { lazy val valuesMap = Map(names.zip(data): _*) val length = data.length val size = len...
AiHe/DataFrame
src/main/scala/me/aihe/dataframe/Row.scala
Scala
apache-2.0
862
/* * Copyright 2001-2014 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...
cheeseng/scalatest
scalatest/src/main/scala/org/scalatest/PropSpecLike.scala
Scala
apache-2.0
690
/* * 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 ...
gustavoanatoly/flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/stream/table/OverWindowTest.scala
Scala
apache-2.0
20,433
/* Again, it is somewhat subjective whether to throw an exception when asked to drop more elements than the list contains. The usual default for `drop` is not to throw an exception, since it is typically used in cases where this is not indicative of a programming error. If you pay attention to how you use `drop`, it i...
willcodejavaforfood/fpinscala
answerkey/datastructures/4.answer.scala
Scala
mit
722
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * 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 * * https://www.apache.org/licenses/LICENSE...
adarro/ddo-calc
subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/item/weapon/WeaponCategory.scala
Scala
apache-2.0
10,936
package toguru.toggles import akka.actor.{ActorRef, Props} import akka.pattern.ask import akka.persistence.query.EventEnvelope import toguru.helpers.ActorSpec import toguru.toggles.AuditLog.Entry import toguru.toggles.AuditLogActor._ import toguru.toggles.events._ import scala.concurrent.duration._ class AuditLogAct...
andreas-schroeder/toguru
test/toguru/toggles/AuditLogActorSpec.scala
Scala
mit
2,510
package com.yetu.youtubeapp.services import com.yetu.youtubeapp.utils.{FakeGlobal, BaseSpec} import org.scalatest.time._ import play.api.Logger import play.api.libs.json.{JsValue, Json} import play.api.libs.ws.WSResponse class InboxServiceSpec extends BaseSpec { implicit val defaultPatience = PatienceConfig(ti...
yetu/youtube-app
test/com/yetu/youtubeapp/services/InboxServiceSpec.scala
Scala
mit
1,059
package com.codiply.barrio.helpers import java.nio.file.Files import java.nio.file.Paths import scopt.OptionParser import com.codiply.barrio.geometry.Metric object ArgsConfig { val defaultMaxPointsPerLeaf = 128 val defaultTreesPerNode = 3 } sealed trait DataSourceType object DataSourceType { case object Loc...
codiply/barrio
src/main/scala/com/codiply/barrio/helpers/ArgsParser.scala
Scala
apache-2.0
5,159
package com.twitter.scalding import com.twitter.algebird.Semigroup object ExecutionUtil { /** * Generate a list of executions from a date range * * @param duration Duration to split daterange * @param parallelism How many jobs to run in parallel * @param fn Function to run a execution given a date ra...
tglstory/scalding
scalding-core/src/main/scala/com/twitter/scalding/ExecutionUtil.scala
Scala
apache-2.0
2,822
/* * 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 ...
mahmoudhanafy/spark-testing-base
src/main/1.3/scala/com/holdenkarau/spark/testing/SharedSparkContext.scala
Scala
apache-2.0
1,689
/* ___ _ ___ _ _ *\\ ** / __| |/ (_) | | Your SKilL scala Binding ** ** \\__ \\ ' <| | | |__ generated: 01.02.2019 ...
skill-lang/skill
src/main/scala/de/ust/skill/sir/api/internal/F_UserdefinedType_hints.scala
Scala
bsd-3-clause
6,728
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
StephanEwen/incubator-flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/stream/StreamPhysicalWindowTableFunction.scala
Scala
apache-2.0
2,923
/* * Copyright 2012 The SIRIS Project * * 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...
simulator-x/basicexamples
src/simx/applications/examples/basic/cluster/ExampleClusterApplication.scala
Scala
apache-2.0
5,231
/* * Copyright (c) 2014 Oculus Info Inc. * http://www.oculusinfo.com/ * * Released under the MIT License. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, includ...
unchartedsoftware/aperture-tiles
tile-generation/src/main/scala/com/oculusinfo/tilegen/examples/datagen/lineStar.scala
Scala
mit
4,285
/* * OpenURP, Open University Resouce Planning * * Copyright (c) 2013-2014, OpenURP Software. * * OpenURP 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 ...
openurp/edu-core
attendance/ws/src/main/scala/org/openurp/edu/attendance/ws/web/app/CourseTableServlet.scala
Scala
gpl-3.0
2,145
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
zzcclp/carbondata
examples/spark/src/main/scala/org/apache/carbondata/examples/S3UsingSDkExample.scala
Scala
apache-2.0
4,416
package parsers.solutions import scala.util.parsing.combinator.JavaTokenParsers trait Exercise4 extends JavaTokenParsers { def number: Parser[Double] = floatingPointNumber ^^ { _.toDouble } def factor: Parser[Double] = number | "(" ~> expr <~ ")" def term: Parser[Double] = { (factor ~ ((("*"|"/") ~ facto...
julienrf/scala-lessons
highlights/parsers/code/src/main/scala/parsers/solutions/Exercise4.scala
Scala
mit
795
/** * 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...
jkreps/kafka
core/src/main/scala/kafka/controller/ReplicaStateMachine.scala
Scala
apache-2.0
22,134
object p { // test parametric case classes, which synthesis `canEqual` and `equals` enum Result[+T, +E] { case OK [T](x: T) extends Result[T, Nothing] case Err[E](e: E) extends Result[Nothing, E] } }
lampepfl/dotty
tests/pos-special/isInstanceOf/Result.scala
Scala
apache-2.0
215
package com.eltimn.scamongo.field /* * Copyright 2010 Tim Nelson * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless require...
eltimn/scamongo
src/main/scala/com/eltimn/scamongo/field/MongoMapField.scala
Scala
apache-2.0
2,832
/* * Copyright (c) 2014 the original author or authors. * * Licensed under the MIT License; * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: * * http://opensource.org/licenses/MIT * * Unless required by applicable law or agreed to in writing...
kaisellgren/ScalaGit
src/main/scala/git/PackFile.scala
Scala
mit
2,576
package com.arcusys.valamis.web.portlet import javax.portlet.{RenderRequest, RenderResponse} import com.arcusys.valamis.certificate.service.AssignmentService import com.arcusys.valamis.lrs.serializer.AgentSerializer import com.arcusys.valamis.lrs.service.util.TincanHelper._ import com.arcusys.valamis.util.serializati...
igor-borisov/valamis
valamis-portlets/src/main/scala/com/arcusys/valamis/web/portlet/GradebookView.scala
Scala
gpl-3.0
1,392
package binders import play.api.mvc.QueryStringBindable case class Bounds(min: Int, max: Int) object Bounds { implicit def binder(implicit intBinder: QueryStringBindable[Int]) = new QueryStringBindable[Bounds] { def bind(key: String, params: Map[String, Seq[String]]): Option[Either[String, Bounds]] = { f...
softberries/play-bootstrap-generator
play-bootstrap/app/binders/Bounds.scala
Scala
mit
979
package skinny.engine.routing import skinny.engine.MultiParams import scala.util.matching.Regex /** * A path pattern optionally matches a request path and extracts path * parameters. */ case class PathPattern(regex: Regex, captureGroupNames: List[String] = Nil) { def apply(path: String): Option[MultiParams] = ...
holycattle/skinny-framework
engine/src/main/scala/skinny/engine/routing/PathPattern.scala
Scala
mit
1,017
/* * Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> */ package play.utils /** * provides conversion helpers */ object Conversions { def newMap[A, B](data: (A, B)*) = Map(data: _*) }
jyotikamboj/container
pf-framework/src/play/src/main/scala/play/utils/Conversions.scala
Scala
mit
207
/* * 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
deploy/Command.scala
Scala
apache-2.0
1,091
package org.jetbrains.plugins.scala package conversion.copy import java.awt.datatransfer.Transferable import java.util.Collections._ import java.{lang, util} import com.intellij.codeInsight.editorActions.{CopyPastePostProcessor, TextBlockTransferableData} import com.intellij.openapi.editor.{Editor, RangeMarker} impor...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/conversion/copy/SingularCopyPastePostProcessor.scala
Scala
apache-2.0
2,062
package pl.touk.nussknacker.engine.util object ThreadUtils { def loadUsingContextLoader(className: String): Class[_] = Thread.currentThread().getContextClassLoader.loadClass(className) def withThisAsContextClassLoader[T](classLoader: ClassLoader)(block: => T): T = { val currentLoader = Thread.currentThread()...
TouK/nussknacker
utils/utils/src/main/scala/pl/touk/nussknacker/engine/util/ThreadUtils.scala
Scala
apache-2.0
522
// Jubatus: Online machine learning framework for distributed environment // Copyright (C) 2014-2015 Preferred Networks and Nippon Telegraph and Telephone Corporation. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License version 2.1...
jubatus/jubaql-server
processor/src/main/scala/us/jubat/jubaql_server/processor/SchemaDStream.scala
Scala
lgpl-2.1
9,873
import java.net.URI import java.time.ZonedDateTime import com.github.j5ik2o.forseti.adaptor.generator.IdGenerator import com.github.j5ik2o.forseti.adaptor.repository._ import com.github.j5ik2o.forseti.domain._ import com.github.j5ik2o.forseti.domain.client._ import com.github.j5ik2o.forseti.domain.user.{User, UserId, ...
j5ik2o/forseti
app/open-id-provider/app/DBInitializer.scala
Scala
mit
2,853
package common import xyz.nabijaczleweli.scala_game_of_life.cell.{Cell, Material} import xyz.nabijaczleweli.scala_game_of_life.engine.registries.CellRegistry import xyz.nabijaczleweli.scala_game_of_life.world.ICellAccess /** @author Jędrzej * @since 07.05.14 */ object ThingsForTests { final val testCellID = Sho...
nabijaczleweli/Scala-Game-of-Life
src/test/scala/common/ThingsForTests.scala
Scala
mit
689
package net.itadinanta.rnkr.backend.blackhole import akka.actor.Props import net.itadinanta.rnkr.backend.Metadata import net.itadinanta.rnkr.backend.Storage.Reader import net.itadinanta.rnkr.backend.Storage.Writer import scala.concurrent.Future import net.itadinanta.rnkr.backend.Watermark import net.itadinanta.rnkr.en...
itadinanta/rnkr
rnkr-engine/src/main/scala/net/itadinanta/rnkr/backend/blackhole/BlackHole.scala
Scala
gpl-2.0
1,934
package org.scalafmt import scala.language.postfixOps import scala.concurrent.Await import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import scala.meta.Tree import scala.meta.parsers.Parse import java.io.File import org.scalafmt.Error.Incomplete import org.scalafmt.Error.Searc...
Daxten/scalafmt
core/src/test/scala/org/scalafmt/FormatTests.scala
Scala
apache-2.0
3,771
package com.maximus.imr.rest import java.text.SimpleDateFormat import java.util.Date import com.maximus.imr.rest.util.RETURN import org.junit.Assert._ import org.junit.{Before, Ignore, Test} /** * Created by tstockton on 8/24/16. * */ class NoarfiFetchServiceTest extends NoarfiService { val sdf = new SimpleD...
maxird/imr-ca-sdk
scala/src/test/java/com/maximus/imr/rest/NoarfiFetchServiceTest.scala
Scala
mit
1,222
/** * 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/test/scala/unit/kafka/producer/AsyncProducerTest.scala
Scala
bsd-2-clause
22,648
package com.peterpotts.sample import org.scalatest.{Matchers, WordSpec} import scala.collection.immutable.IndexedSeq class SamplePickTest extends WordSpec with Matchers { "A sample pick instance" should { "pick values" in { val animals = IndexedSeq("cat", "dog") val animal = SamplePick(animals).nex...
peterpotts/sample
src/test/scala/com/peterpotts/sample/SamplePickTest.scala
Scala
mit
384
/* * 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 ...
haowu80s/spark
core/src/main/scala/org/apache/spark/ui/jobs/AllJobsPage.scala
Scala
apache-2.0
14,429
/* * 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 im...
scala-js/scala-js
test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/util/CollectionsOnSetsTest.scala
Scala
apache-2.0
1,991
/* * 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 ...
dmlc/mxnet
scala-package/infer/src/test/scala/org/apache/mxnet/infer/PredictorSuite.scala
Scala
apache-2.0
5,955
package com.datawizards.dqm.rules import com.datawizards.dqm.rules.field.FieldRule case class FieldRules(field: String, rules: Seq[FieldRule])
piotr-kalanski/data-quality-monitoring
src/main/scala/com/datawizards/dqm/rules/FieldRules.scala
Scala
apache-2.0
145
/* * 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
extensions/iterativebatch/compiler/core/src/test/scala/com/asakusafw/spark/extensions/iterativebatch/compiler/graph/AggregateClassBuilderSpec.scala
Scala
apache-2.0
13,285
object Test { class C(x: Int, y: Int) { def this(x: Int = 1)(y: String) = this(x, y.toInt) } def test: Unit = { new C()("1") } }
som-snytt/dotty
tests/pos/i3171.scala
Scala
apache-2.0
152
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
Kegeruneku/rudder
rudder-core/src/main/scala/com/normation/rudder/repository/jdbc/ReportsJdbcRepository.scala
Scala
agpl-3.0
22,805
/** * Copyright (C) 2009-2011 the original author or authors. * See the notice.md file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
scalate/scalate
scalate-core/src/main/scala/org/fusesource/scalate/support/TemplateFinder.scala
Scala
apache-2.0
3,891
package uk.co.bocuma.fourchan case class Board(board: String, title: Option[String] = None, threads: Option[List[Thread]] = None) extends FourChanEntity
cammellos/fourchan-scala
src/main/scala/uk/co/bocuma/fourchan/Board.scala
Scala
apache-2.0
153
/* * Copyright 2015 MongoDB, 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 ...
jCalamari/mongo-scala-driver
driver/src/main/scala/org/mongodb/scala/FindObservable.scala
Scala
apache-2.0
6,809
package com.github.jeanadrien.gatling.mqtt import java.nio.charset.StandardCharsets import com.github.jeanadrien.gatling.mqtt.actions._ import com.github.jeanadrien.gatling.mqtt.protocol.MqttProtocolBuilder import io.gatling.core.config.GatlingConfiguration import io.gatling.core.session._ /** * */ object Predef...
jeanadrien/gatling-mqtt-protocol
src/main/scala/com/github/jeanadrien/gatling/mqtt/Predef.scala
Scala
apache-2.0
1,377
package xyz.jmullin.drifter.entity import com.badlogic.gdx.graphics.g3d.{Environment, ModelBatch} import xyz.jmullin.drifter.DrifterInput import xyz.jmullin.drifter.enrich.RichGeometry._ import xyz.jmullin.drifter.GdxAlias._ /** * General purpose container for Entity3Ds, allows attachment and management of children ...
JustinMullin/drifter
src/main/scala/xyz/jmullin/drifter/entity/EntityContainer3D.scala
Scala
mit
3,148
package org.jetbrains.plugins.scala package lang package completion import com.intellij.codeInsight.completion.{CompletionParameters, PrefixMatcher} import com.intellij.openapi.util.Key import com.intellij.psi._ import org.jetbrains.plugins.scala.lang.lexer._ import org.jetbrains.plugins.scala.lang.parser._ import org...
advancedxy/intellij-scala
src/org/jetbrains/plugins/scala/lang/completion/ScalaCompletionUtil.scala
Scala
apache-2.0
10,849
package alexsmirnov.pbconsole.octoprint import org.scalatra.FutureSupport import org.scalatra.NoContent import org.scalatra.NotFound import org.scalatra.ScalatraServlet import alexsmirnov.pbconsole.PrinterModel import alexsmirnov.pbconsole.print.JobModel import scalafx.application.Platform import spray.json.DefaultJs...
alexsmirnov/printrbot-g2-console
src/main/scala/alexsmirnov/pbconsole/octoprint/VersionRoute.scala
Scala
bsd-3-clause
727
package org.oxygen.redio.items import net.minecraft.item.Item import org.oxygen.redio.CreativeTab object ItemComputeCore extends Item { setCreativeTab(CreativeTab) setMaxStackSize(1) setUnlocalizedName("compute_core") }
chenzhuoyu/RedIO
src/main/scala/org/oxygen/redio/items/ItemComputeCore.scala
Scala
lgpl-2.1
225