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
import collection.mutable.{Stack, StackProxy} class A extends StackProxy[Int] { val self = Stack[Int]() } object Test { def main(args: Array[String]) { val a = new A a push 3 a push 4 a push 5 a.push(6, 7, 8) println(a) a.pop } }
felixmulder/scala
test/files/run/t5428.scala
Scala
bsd-3-clause
278
/* Lodo is a layered to-do list (Outliner) Copyright (C) 2015 Keith Morrow. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License v3 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, ...
k3d3/lodo
lodo/js/src/main/scala/components/Sidebar.scala
Scala
agpl-3.0
1,569
package io.protoless.messages.encoders import scala.annotation.implicitNotFound import shapeless.HList import io.protoless.messages.Encoder @implicitNotFound("No CustomMappingEncoder found for type ${A} and ${L}.") @annotation.inductive trait CustomMappingEncoder[A, L <: HList] extends Encoder[A] /** * Utilities...
julien-lafont/protoless
modules/core/src/main/scala/io/protoless/messages/encoders/CustomMappingEncoder.scala
Scala
apache-2.0
508
package com.twitter.finatra.http.tests import com.twitter.finatra.test.LocalFilesystemTestUtils.{createFile, writeStringToFile} /** Tests when the mustache template directory is different from the local doc root directory */ class LocalTemplateRootTest extends AbstractTemplateRootTest { def templateRootDirectory(b...
twitter/finatra
http-mustache/src/test/scala/com/twitter/finatra/http/tests/LocalTemplateRootTest.scala
Scala
apache-2.0
1,081
package org.phillipgreenii.codedependencytracker class DummyEntityRelationshipExtractor extends EntityRelationshipExtractor[FileEntity] { def apply(fileEntity: FileEntity): List[Relationship[FileEntity, _]] = { List(new Relationship[FileEntity, UriEntity](fileEntity.asReference(), new EntityReference[UriEntity]...
phillipgreenii/code-dependency-tracker
src/it/scala/org/phillipgreenii/codedependencytracker/DummyEntityRelationshipExtractor.scala
Scala
mit
366
/*********************************************************************** * Copyright (c) 2013-2016 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is ...
nagavallia/geomesa
geomesa-accumulo/geomesa-accumulo-raster/src/main/scala/org/locationtech/geomesa/raster/iterators/IndexIterator.scala
Scala
apache-2.0
2,283
package com.outr.arango.api import com.outr.arango.api.model._ import io.youi.client.HttpClient import io.youi.http.HttpMethod import io.youi.net._ import io.circe.Json import scala.concurrent.{ExecutionContext, Future} object APIViewViewNameRename { def put(client: HttpClient, viewName: String)(implicit ec:...
outr/arangodb-scala
api/src/main/scala/com/outr/arango/api/APIViewViewNameRename.scala
Scala
mit
513
/* * Copyright (C) 2012 Romain Reuillon * * 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 version 3 of the License, or * (at your option) any later version. * * This program is di...
ISCPIF/PSEExperiments
openmole-src/openmole/plugins/org.openmole.plugin.method.evolution/src/main/scala/org/openmole/plugin/method/evolution/ScalingGAPopulationTask.scala
Scala
agpl-3.0
2,024
package org.jetbrains.plugins.scala.testingSupport.scalatest.scala2_11.scalatest3_0_1 import org.jetbrains.plugins.scala.testingSupport.scalatest.ScalaTestSelectedTests class Scalatest2_11_3_0_1_SelectedTestsTest extends Scalatest2_11_3_0_1_Base with ScalaTestSelectedTests
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/testingSupport/scalatest/scala2_11/scalatest3_0_1/Scalatest2_11_3_0_1_SelectedTestsTest.scala
Scala
apache-2.0
276
/* * Copyright (c) 2017. Yuriy Stul */ package com.stulsoft.ysps.pvariance /** Playing with upper bound. * * An upper type bound T <: A declares that type variable T refers to a subtype of type A. * * @see [[http://docs.scala-lang.org/tutorials/tour/upper-type-bounds.html Upper Type Bounds]] * @author Yuriy St...
ysden123/ysps
src/main/scala/com/stulsoft/ysps/pvariance/OfficeUpperBound.scala
Scala
mit
2,264
/** * Copyright (c) 2002-2012 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j 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 Foundati...
dksaputra/community
cypher/src/main/scala/org/neo4j/cypher/internal/executionplan/builders/QueryToken.scala
Scala
gpl-3.0
1,252
/* * Copyright (c) 2015-2017 EpiData, Inc. */ package models import com.epidata.lib.models.{ SensorMeasurement => BaseSensorMeasurement, Measurement } import play.api.Logger import play.api.libs.json._ import _root_.util.Ordering import service.{ Configs, KafkaService, DataService } import scala.collection.convert.W...
epidataio/epidata-community
play/app/models/SensorMeasurement.scala
Scala
apache-2.0
3,099
/* * 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 ...
jeremiaswerner/openwhisk
tests/src/test/scala/org/apache/openwhisk/core/entity/test/ExecTests.scala
Scala
apache-2.0
11,292
/** * */ package plainer.items /** * @author eddie * */ object SetCreator { def getMutable(args: String*) = scala.collection.mutable.Set(args) def getImmutable(args: String*) = scala.collection.immutable.Set(args) }
zeroed/plainer.scala
src/plainer/items/SetCreator.scala
Scala
gpl-3.0
229
/* * Copyright 2015 Dennis Vriend * * 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 t...
dnvriend/jboss-wildfly-test
helloworld/src/main/scala/repository/JdbcConnection.scala
Scala
apache-2.0
16,330
/** * Copyright 2009 Google 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...
masterx2/noop
interpreter/src/test/scala/noop/interpreter/TempFileFixture.scala
Scala
apache-2.0
1,027
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js Test Suite ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013-2015, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ ** ** /____/\\___/...
lrytz/scala-js
test-interface/src/main/scala/org/scalajs/testinterface/HTMLRunner.scala
Scala
bsd-3-clause
15,368
/* Copyright 2015 White Label Personal Clouds Pty Ltd * * 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...
welcomer/framework
src/main/scala/me/welcomer/framework/pico/dsl/PicoRulesetContainerDSL.scala
Scala
apache-2.0
2,556
package skuber.apps import org.specs2.mutable.Specification import skuber.{Container, LabelSelector, ObjectMeta, Pod, ReplicationController, Scale} import play.api.libs.json.Json /** * @author David O'Riordan */ class ScaleSpec extends Specification { "This is a unit specification for the skuber Scale class. ".tx...
doriordan/skuber
client/src/test/scala/skuber/ext/ScaleSpec.scala
Scala
apache-2.0
2,518
/* * Copyright (C) 2012 The Regents of The University California. * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENS...
stefanvanwouw/puppet-shark
files/shark-0.9.0/src/test/scala/shark/memstore2/ColumnIteratorSuite.scala
Scala
mit
14,179
/* * 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
integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/joinquery/AllDataTypesTestCaseJoin.scala
Scala
apache-2.0
5,949
/* * 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
sql/core/src/test/scala/org/apache/spark/sql/streaming/FileStreamSinkSuite.scala
Scala
apache-2.0
15,884
package net.combinatory.rtm /* (c) rtm-scala contributors, 2012. All rights reserved. */ import Responses._ import cc.spray.json._ object Invoke { /* /** Right represents the data from node we are interested in. * Left is failure with the fail message" * A sample error response: * <rsp stat="fa...
comb/rtm-scala
src/main/scala/net/combinatory/rtm/Invoke.scala
Scala
apache-2.0
908
package org.edla.scalafxml.demo import scalafx.beans.property.{ BooleanProperty, IntegerProperty } import scalafx.collections.ObservableBuffer import scalafx.scene.control.SingleSelectionModel // scalastyle:off magic.number class AudioConfigModel { /** The minimum audio volume in decibels */ val minDec...
newca12/scalafxml-demo
src/main/scala/org/edla/scalafxml/demo/AudioConfigModel.scala
Scala
gpl-3.0
1,415
package com.sg.pnx.graphics.glbuffers import com.sg.pnx.reality.EntityBuilder import com.sg.pnx.graphics.util.GLUtil /** * Created by bodie on 7/28/14. */ object VertexBufferBuilder { def buildVertexBuffer( vertices: Array[Float] = Array[Float]( ), parentId: Int = -1, ...
synapse-garden/phoenix
src/main/scala/com/sg/pnx/graphics/glbuffers/VertexBufferBuilder.scala
Scala
mit
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 ...
PangZhi/flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/validation/TableSinksValidationTest.scala
Scala
apache-2.0
2,624
package bank5 import akka.actor.{ ActorSystem, Actor, Props, ActorRef } import akka.dispatch.Future case object Start case object RegisterSender // Use bank.prop in the code or Bank() or Bank(-1) // See http://doc.akka.io/docs/akka/snapshot/scala/actors.html#Recommended_Practices object Bank { def props(): Props...
Tjoene/thesis
benchmark/src/main/scala/bank5/Bank.scala
Scala
gpl-2.0
1,455
package utils import javax.inject.Singleton import com.google.inject.Inject import controllers.WebJarAssets import play.api.http.HttpErrorHandler import play.api.i18n.{I18nSupport, MessagesApi} import play.api.mvc.Results._ import play.api.mvc._ import scala.concurrent._ @Singleton class ErrorHandler @Inject()(val ...
asciiu/halo
arbiter/app/utils/ErrorHandler.scala
Scala
mit
914
/** * sbt-osgi-manager - OSGi development bridge based on Bnd and Tycho. * * Copyright (c) 2016 Alexey Aksenov [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...
digimead/sbt-osgi-manager
src/main/scala/sbt/osgi/manager/support/PluginClassLoader.scala
Scala
apache-2.0
9,292
package com.twitter.util import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class CloseAwaitablyTest extends FunSuite { def make() = new Closable with CloseAwaitably { val p = new Promise[Unit] var n = 0 def close(deadline:...
luciferous/util
util-core/src/test/scala/com/twitter/util/AwaitableTest.scala
Scala
apache-2.0
910
package extruder.instances import cats.Eq import cats.instances.all._ import cats.laws.discipline.InvariantTests import cats.syntax.applicative._ import extruder.core.{Decoder, Settings} import extruder.data.Validation import extruder.map._ import org.scalacheck.Arbitrary import org.scalatest.FunSuite import org.typel...
janstenpickle/extruder
core/src/test/scala/extruder/instances/DecoderInstancesSuite.scala
Scala
mit
1,059
/* * Copyright 2015-2020 Noel Welsh * * 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...
underscoreio/doodle
interact/shared/src/main/scala/doodle/interact/animation/Interpolator.scala
Scala
apache-2.0
8,214
/* * 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/main/scala/edu/ucla/cs/starai/forclift/languages/FactorGraphParser.scala
Scala
apache-2.0
8,251
/* * 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 ...
style95/openwhisk
core/controller/src/main/scala/org/apache/openwhisk/core/controller/Controller.scala
Scala
apache-2.0
12,814
/* * Copyright 2013 http4s.org * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
rossabaker/http4s
core/shared/src/main/scala/org/http4s/AuthScheme.scala
Scala
apache-2.0
764
package scala.meta.intellij import com.intellij.openapi.project.Project import org.jetbrains.plugins.scala.lang.psi.api.expr.ScAnnotation import scala.meta.trees.TreeConverter class IDEAContext(project: =>Project) extends TreeConverter { override def getCurrentProject = project // annotations filtering isn't r...
loskutov/intellij-scala
src/scala/meta/intellij/IDEAContext.scala
Scala
apache-2.0
412
package com.airbnb.aerosolve.training import com.airbnb.aerosolve.core.KDTreeNode import com.airbnb.aerosolve.core.KDTreeNodeType import com.airbnb.aerosolve.training.KDTree.KDTreeBuildOptions import org.junit.Test import org.slf4j.LoggerFactory import org.junit.Assert.assertEquals import org.junit.Assert.assertTrue i...
aglne/aerosolve
training/src/test/scala/com/airbnb/aerosolve/training/KDTreeTest.scala
Scala
apache-2.0
1,784
package org.bone.ircballoon import org.bone.ircballoon.model._ import org.bone.ircballoon.actor.message._ import I18N.i18n._ import ImageUtil._ import org.eclipse.swt.widgets.{List => SWTList, _} import org.eclipse.swt.layout._ import org.eclipse.swt.events._ import org.eclipse.swt.graphics._ import org.eclipse.swt....
brianhsu/IRCBalloon
src/main/scala/ui/VoteStatusWin.scala
Scala
gpl-3.0
5,354
package com.duffmanstudios.memory /** * Allows translation of card numbers selected by the player into (y,x) coordinates * on the game board. This was added as it is more user friendly than selecting * a card by coordinates. * * @author Iain Duff */ object CardToBoardTranslator { def translateCardNumberInt...
iainduff91/memory-backend
src/main/java/com/duffmanstudios/memory/CardToBoardTranslator.scala
Scala
gpl-2.0
1,156
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs // Licence: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.intg import akka.event.slf4j.SLF4JLogging import java.io.File import akka.testkit._ import java.io.InputStream import java.util.Scanner import org.ensime.api._ import org...
d1egoaz/ensime-sbt
src/sbt-test/sbt-ensime/ensime-server/core/src/it/scala/org/ensime/intg/DebugTest.scala
Scala
apache-2.0
21,511
package com.sksamuel.elastic4s.search.queries import com.sksamuel.elastic4s.requests.common.Operator import com.sksamuel.elastic4s.testkit.DockerTests import com.sksamuel.elastic4s.{ElasticDsl, Indexable} import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec import scala.util.Try cl...
sksamuel/elastic4s
elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/search/queries/CombinedFieldsQueryTest.scala
Scala
apache-2.0
2,092
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.registry.impl import java.util.Collections import java.util.Optional import java.util.concurrent.ExecutionException import akka.actor.ActorRef import akka.actor.ActorSystem import akka.actor.Props import akka.pat...
ignasi35/lagom
dev/service-registry/service-locator/src/test/scala/com/lightbend/lagom/registry/impl/ServiceRegistryImplSpec.scala
Scala
apache-2.0
7,758
/* * Copyright (c) 2016. Fengguo (Hugo) Wei and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Detailed co...
arguslab/argus-cit-intellij
src/main/scala/org/argus/cit/intellij/jawa/hierarchy/JawaCalleeMethodsTreeStructure.scala
Scala
epl-1.0
3,954
package pregnaware.utils import com.typesafe.scalalogging.StrictLogging import spray.http.{HttpMethods, HttpMethod, HttpHeaders, SomeOrigins} import spray.routing._ /** Wraps a Route in the appropriate CORS header to allow cross-origin resource sharing */ object CorsWrapper extends Directives with StrictLogging { ...
jds106/pregnaware
service/src/main/scala/pregnaware/utils/CorsWrapper.scala
Scala
mit
1,723
import dotty.tools.dotc.ast.Trees.Thicket import dotty.tools.dotc.ast.tpd._ object Labels { def main(args: Array[String]): Unit = { var i = 10 while(i>0) { var j = 0 while(j<i) { println(j +" " + i) j = j + 1 } i = i - 1} pattern(1) pattern(2) pattern(3) } def pattern(a: Int) = a m...
yusuke2255/dotty
tests/pos/Labels.scala
Scala
bsd-3-clause
598
/* * 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
compiler/src/main/scala/com/asakusafw/spark/compiler/operator/user/CoGroupOperatorCompiler.scala
Scala
apache-2.0
9,740
import scala.reflect.macros.blackbox.Context import language.experimental.macros trait Tree case object SomeTree extends Tree object NewQuasiquotes { implicit class QuasiquoteInterpolation(c: StringContext) { object nq { def unapply(t: Tree) = macro QuasiquoteMacros.unapplyImpl } } }
nativelibs4java/Scalaxy
Experiments/Quasiquotes/src/main/scala/NewQuasiquotes.scala
Scala
bsd-3-clause
305
package io.finch.benchmarks.service package argonaut class ArgonautBenchmark extends UserServiceBenchmark(() => userService)
travisbrown/finch
benchmarks/src/main/scala/io/finch/benchmarks/service/argonaut/benchmark.scala
Scala
apache-2.0
126
package misc import org.scalatest.{Matchers, FlatSpec} class EightQueensSpec extends FlatSpec with Matchers{ it should "check Cols" in { val eightQueens = new EightQueens(5) eightQueens.checkCol(4,2) should be (true) eightQueens.modifyQueenPosition(3,2,true) eightQueens.checkCol(4,2) should be (f...
sajit/skalad
scala/src/test/scala/misc/EightQueensSpec.scala
Scala
apache-2.0
1,072
package io.skysail.server.app import akka.actor.ActorSystem import akka.pattern.ask import akka.util.Timeout import io.skysail.api.ui.Client import io.skysail.domain.app.Application import io.skysail.server.actors.ApplicationsActor import scala.concurrent.Future import scala.concurrent.duration.DurationInt class App...
evandor/skysail-server
skysail.server/src/io/skysail/server/app/ApplicationService.scala
Scala
apache-2.0
653
package scala.meta package internal package prettyprinters import scala.meta.internal.{ast => impl} import scala.meta.dialects.`package`.Scala211 private[meta] object toString { def apply(tree: Tree) = { val prettyprinter = TreeSyntax[Tree](Scala211) val code = prettyprinter(tree).toString tree match { ...
beni55/scalameta
scalameta/trees/src/main/scala/scala/meta/internal/prettyprinters/ToString.scala
Scala
bsd-3-clause
447
/** * 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...
gf53520/kafka
core/src/test/scala/unit/kafka/server/StopReplicaRequestTest.scala
Scala
apache-2.0
2,244
package experiments import org.junit.runner._ import org.specs2.mutable._ import org.specs2.runner._ import play.api.libs.iteratee._ import scala.concurrent.Await import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration._ @RunWith(classOf[JUnitRunner]) class IterateeSpec extends Spe...
lizepeng/app.io
test/experiments/IterateeSpec.scala
Scala
apache-2.0
621
/* * Copyright 2011-2022 GatlingCorp (https://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
gatling/gatling
gatling-recorder/src/main/scala/io/gatling/recorder/util/Labelled.scala
Scala
apache-2.0
708
package rml.args.run import scala.util.Try import com.typesafe.scalalogging.{LazyLogging => Logging} import rml.args.arg.FuncArg import rml.args.config.ConfigAdjuster import rml.args.config.FullConfig import rml.args.exceptions.FunctionNotFoundException import rml.args.register.FunctionRegister import scala.util.Failu...
rml/scala_args
src/main/scala/rml/args/run/FunctionRunner.scala
Scala
gpl-3.0
1,304
package bad.robot.temperature.rrd import java.io.File import org.rrd4j.DsType.GAUGE import org.rrd4j.core.{DsDef, RrdDb, RrdDef} import org.specs2.mutable.Specification import org.specs2.specification.BeforeEach import scala.Double._ import scala.util.{Failure, Success, Try} import bad.robot.temperature.Files._ cla...
tobyweston/temperature-machine
src/test/scala/bad/robot/temperature/rrd/RrdDbOpsTest.scala
Scala
apache-2.0
4,225
package com.example import com.twitter.algebird._ case class Example( x: Int, y: Long) object Foo { def main(args: Array[String]) = { println("Hello from Foo") val m = (0 until 1000).map(x => x % 17 -> x).toMap val r = MapAlgebra.sumByKey(m).toSeq.sorted r.foreach{ case (x, y) => pri...
ianoc/ExampleScalaProject
example-core/src/main/scala/com/example/Example.scala
Scala
apache-2.0
357
package quizleague.web.names trait ComponentNames { val typeName:String }
gumdrop/quizleague-maintain
js/src/main/scala/quizleague/web/names/ComponentNames.scala
Scala
mit
76
package scalanlp.classify import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import scalala.tensor.mutable.Counter /** * * @author dlwh */ @RunWith(classOf[JUnitRunner]) class NaiveBayesTrainerTest extends ClassifierTrainerTestHarness { def trainer[L,T]:Classifier.Trainer[L,Counter[T,Double]...
MLnick/scalanlp-core
learn/src/test/scala/scalanlp/classify/NaiveBayesTrainerTest.scala
Scala
apache-2.0
356
package com.twitter.scalding.bdd import cascading.flow.FlowDef import com.twitter.scalding._ import com.twitter.scalding.source.TypedText import scala.collection.mutable.Buffer import TDsl._ trait TBddDsl extends FieldConversions with TypedPipeOperationsConversions { def Given[TypeIn](source: TypedTestSource[TypeI...
tglstory/scalding
scalding-core/src/main/scala/com/twitter/scalding/bdd/TBddDsl.scala
Scala
apache-2.0
4,215
package recommender import breeze.collection.mutable.SparseArray import org.apache.spark.mllib.clustering.KMeans import org.apache.spark.rdd.RDD abstract class ClusteredKnnRecommender(vectorsRDD: RDD[UserVector], numberOfClusters: Int, numberOfNeighbors: Int, distanceMetric: DistanceMetric = CosineDistance) extend...
litaoran/spray-sample
src/main/scala/recommender/ClusterRecommender.scala
Scala
mit
5,722
package scales.component import scala.scalajs.js import scala.scalajs.js.UndefOr import org.scalajs.dom.Element import scales.el.ExpressionContext class ComponentContext[A <: Element]( val element: Element, val parent: Option[ExpressionContext]) extends ExpressionContext { require(element != null, "Missing ar...
nightscape/scales
core/src/main/scala/scales/component/ComponentContext.scala
Scala
apache-2.0
654
package com.crackcell.jiezi.dict.loader.io import java.io.{ByteArrayInputStream, InputStream} import org.apache.spark.sql.SparkSession /** * ε°†HDFSθ·―εΎ„θ½¬ζ’ζˆζ΅ * * @author Menglong TAN */ class HdfsToStream extends ToStream[String] { private lazy val spark = SparkSession.builder().getOrCreate() override def t...
crackcell/jiezi
spark/src/main/scala/com/crackcell/jiezi/dict/loader/io/HdfsToStream.scala
Scala
apache-2.0
510
package scala.internal /** A type for skolems that are generated during capture conversion. Capture conversion * narrows the type of a tree whose type has wildcard arguments. A typical situation * is a tree `t` of type `C[_ >: L <: U]` and an expected type `C[X]` where `X` is an * instantiatable type variable. T...
som-snytt/dotty
library/src/scala/internal/TypeBox.scala
Scala
apache-2.0
534
trait Foo[T] object Foo: given [T] as Foo[Tuple1[T]] given [T, U] as Foo[(T, U)] given [T, U, V] as Foo[(T, U, V)]
som-snytt/dotty
tests/pos/i6938.scala
Scala
apache-2.0
120
/* * 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/main/scala/kafka/zookeeper/ZooKeeperClient.scala
Scala
apache-2.0
24,229
package org.jetbrains.plugins.scala.lang.typeInference import org.jetbrains.plugins.scala.{LatestScalaVersions, ScalaVersion} import org.jetbrains.plugins.scala.base.ScalaLightCodeInsightFixtureTestAdapter import org.jetbrains.plugins.scala.settings.ScalaProjectSettings class Scala3ExtensionsTest extends ScalaLightCo...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/typeInference/Scala3ExtensionsTest.scala
Scala
apache-2.0
9,346
/* * 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.testing.adapter import ja...
scala-js/scala-js
test-adapter/src/main/scala/org/scalajs/testing/adapter/HTMLRunnerBuilder.scala
Scala
apache-2.0
4,886
package org.awong.beyond import org.awong.AbstractWordSpec import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class BeyondSpec extends AbstractWordSpec { "This" should { "load 1423 pairs" in { BeyondData.rs1423.nPairs should be (1423) } } "Lamport clock" ...
alanktwong/algorithms-scala
beyond/src/test/scala/org/awong/beyond/BeyondSpec.scala
Scala
mit
2,004
package ml.dmlc.xgboost4j.scala.spark.mleap import java.nio.file.Files import ml.combust.bundle.BundleContext import ml.combust.bundle.dsl.{Model, NodeShape, Value} import ml.combust.bundle.op.OpModel import ml.dmlc.xgboost4j.scala.spark.XGBoostRegressionModel import ml.dmlc.xgboost4j.scala.{XGBoost => SXGBoost} impo...
combust/mleap
mleap-xgboost-spark/src/main/scala/ml/dmlc/xgboost4j/scala/spark/mleap/XGBoostRegressionModelOp.scala
Scala
apache-2.0
3,733
package fpoo object Chapter01 { def second[A](list: List[A]): A = list(1) def third[A](list: List[A]): A = list(2) def third2[A](list: List[A]): A = list.tail.tail.head def addSquares[T](list: List[T])(implicit n: Numeric[T]): T = list.map( x => n.times(x, x) ).sum def bizarreFactorial(n: Int): Int = n match...
bradleyscollins/fpoo-scala
src/main/scala/fpoo/Chapter01.scala
Scala
gpl-2.0
1,118
/* Copyright 2015 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
twitter/scalding
scalding-serialization/src/main/scala/com/twitter/scalding/serialization/StringOrderedSerialization.scala
Scala
apache-2.0
3,920
/* * Copyright 2011-2022 GatlingCorp (https://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
gatling/gatling
gatling-commons/src/test/scala/io/gatling/commons/util/CircularIteratorSpec.scala
Scala
apache-2.0
1,875
/* * 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 ...
bharathkk/samza
samza-kafka/src/test/scala/org/apache/samza/system/kafka_deprecated/TestTopicMetadataCache.scala
Scala
apache-2.0
5,882
package com.forged import akka.actor.{ActorSystem, Props} import akka.pattern.ask import akka.event.Logging import akka.io.IO import akka.util.Timeout import com.forged.server.ServerActor import spray.can.Http import scala.concurrent.duration._ /** * Created by visitor15 on 11/28/15. */ object Boot extends App { ...
Visitor15/webPresence-scala
src/main/scala/com/forged/Boot.scala
Scala
mit
671
package controllers.c5 import play.api.mvc._ /** * Created by trydofor on 7/10/15. * @see https://playframework.com/documentation/2.4.x/ScalaJsonInception */ class S5ScalaJsonInception extends Controller { val a0 = Action { Ok( """ 5.5.JSON Macro Inception all codes work well just...
moilioncircle/playframework-2.4.x-scala
app/controllers/c5/S5ScalaJsonInception.scala
Scala
apache-2.0
1,579
/* * 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...
scalatest/scalatest
jvm/common-test/src/main/scala/org/scalatest/path/ExampleLikeSpecs.scala
Scala
apache-2.0
1,188
package com.seremis.geninfusion.util import java.awt.image.BufferedImage import javax.imageio.ImageIO import com.seremis.geninfusion.api.model.ITexturedRect import net.minecraft.util.ResourceLocation import scala.collection.mutable.HashMap object TextureHelper { val imageCache: HashMap[ResourceLocation, Buffer...
Seremis/Genetic-Infusion
src/main/scala/com/seremis/geninfusion/util/TextureHelper.scala
Scala
gpl-3.0
3,583
/** * 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...
roadboy/KafkaACL
core/src/test/scala/unit/kafka/producer/ProducerTest.scala
Scala
apache-2.0
13,436
/* * -β•₯⌐⌐⌐⌐ -⌐⌐⌐⌐- * β‰‘β•’β–‘β–‘β–‘β–‘βŒ\\β–‘β–‘β–‘Ο† β•“β•β–‘β–‘β–‘β–‘βŒβ–‘β–‘β–‘β–‘β•ͺβ•• * ╣╬░░` `β–‘β–‘β–‘β•’β”˜ Ο†β–’β•£β•¬β•β•œ β–‘β–‘β•’β•£Q * β•‘β•£β•¬β–‘βŒ ` β•€β–’β–’β–’Γ…` ║╒╬╣ * β•šβ•£β•¬β–‘βŒ β•”β–’β–’β–’β–’`Β«β•• β•’β•’β•£β–’ * ╫╬░░╖ .β–‘ ╙╨╨ ╣╣╬░φ β•“Ο†β–‘β•’β•’Γ… * β•™β•’β–‘β–‘β–‘β–‘βŒ"β–‘β–‘β–‘β•œ β•™Γ…β–‘β–‘β–‘β–‘βŒβ–‘β–‘β–‘β–‘β•` * ``˚¬ ⌐ ˚˚⌐´ * * ...
Flipkart/connekt
receptors/src/main/scala/com/flipkart/connekt/receptors/directives/IdempotentDirectives.scala
Scala
mit
2,524
package dotty.tools package backend package jvm import scala.language.unsafeNulls import scala.annotation.switch import scala.collection.mutable.SortedMap import scala.tools.asm import scala.tools.asm.{Handle, Opcodes} import BCodeHelpers.InvokeStyle import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.Compilati...
dotty-staging/dotty
compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala
Scala
apache-2.0
71,740
package com.pragmaxim.scalajs.bindings.mbostock import scala.scalajs.js import scala.scalajs.js.native @native trait Geo extends js.Object { def path(): Path = js.native def circle(): Circle = js.native def area(feature: js.Any): Double = js.native def bounds(feature: js.Any): js.Array[js.Array[Double]] = js....
viagraphs/scalajs-bindings
d3/src/main/scala/com/pragmaxim/scalajs/bindings/mbostock/Geo.scala
Scala
mit
6,281
package net.fehmicansaglam.bson.reader import java.nio.ByteBuffer import java.nio.ByteOrder._ import akka.util.ByteString import net.fehmicansaglam.bson.BsonDocument import net.fehmicansaglam.bson.element.BsonElement import scala.collection.mutable.ArrayBuffer import scala.util.control.Breaks._ case class BsonDocum...
danielwegener/tepkin
bson/src/main/scala/net/fehmicansaglam/bson/reader/BsonDocumentReader.scala
Scala
apache-2.0
1,712
package io.cumulus.stream.storage import java.io.OutputStream import java.security.MessageDigest import java.time.LocalDateTime import java.util.UUID import scala.concurrent.ExecutionContext import akka.NotUsed import akka.stream._ import akka.stream.scaladsl.{Broadcast, Flow, GraphDSL, ZipWith} import akka.stream.st...
Cumulus-Cloud/cumulus
server/cumulus-core/src/main/scala/io/cumulus/stream/storage/StorageObjectWriter.scala
Scala
mit
6,793
package com.lucidchart.relate import org.postgresql.util.PGInterval import scala.concurrent.duration.FiniteDuration import java.sql.PreparedStatement package object postgres { implicit class PGIntervalParameter(value: PGInterval) extends SingleParameter { protected def set(stmt: PreparedStatement, i: Int) = st...
pauldraper/relate
postgres/src/main/scala/com/lucidchart/relate/postgres/package.scala
Scala
apache-2.0
497
/* * 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/AuditService.scala
Scala
apache-2.0
1,938
/*********************************************************************** * Copyright (c) 2013-2017 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...
ronq/geomesa
geomesa-hbase/geomesa-hbase-tools/src/main/scala/org/locationtech/geomesa/hbase/tools/stats/HBaseStatsBoundsCommand.scala
Scala
apache-2.0
1,198
package com.wavesplatform.matcher.model import com.wavesplatform.matcher.model.Events.{OrderCanceled, OrderExecuted} import com.wavesplatform.matcher.model.LimitOrder.OrderStatus import com.wavesplatform.matcher.util.{Cache, TTLCache} import scorex.transaction.AssetAcc import scorex.transaction.assets.exchange.Order i...
B83YPoj/Waves
src/main/scala/com/wavesplatform/matcher/model/OrderHistory.scala
Scala
apache-2.0
3,515
/* * 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 ...
andrewor14/iolap
core/src/test/scala/org/apache/spark/shuffle/unsafe/UnsafeShuffleManagerSuite.scala
Scala
apache-2.0
4,543
package db import com.bryzek.apidoc.api.v0.models.UserForm import lib.Role import org.scalatest.{FunSpec, Matchers} import org.junit.Assert._ import java.util.UUID class EmailVerificationsDaoSpec extends FunSpec with Matchers with util.TestApplication { def emailVerificationConfirmationsDao = play.api.Play.current...
Seanstoppable/apidoc
api/test/db/EmailVerificationsDaoSpec.scala
Scala
mit
5,878
package screact import scala.language.implicitConversions import scutil.lang.* object Cell { implicit def asSignal[T](it:Cell[T]):Signal[T] = it.signal } /** An Cell is a source for a Signal and can trigger an update cycle in the Engine */ trait Cell[T] extends AutoCloseable { outer => val signal:Signal[T] def s...
ritschwumm/screact
src/main/scala/screact/Cell.scala
Scala
bsd-2-clause
885
/* Title: Pure/General/pretty.scala Author: Makarius Generic pretty printing module. */ package isabelle object Pretty { /* spaces */ val space = " " private val static_spaces = space * 4000 def spaces(k: Int): String = { require(k >= 0) if (k < static_spaces.length) static_spaces...
MerelyAPseudonym/isabelle
src/Pure/General/pretty.scala
Scala
bsd-3-clause
5,819
// Copyright 2015 Ricardo Gladwell. // Licensed under the GNU Lesser General Public License. // See the README.md file for more information. package microtesia import org.specs2.mutable.Specification import scala.util.{Failure, Success, Try} object TrySequenceSpec extends Specification { "Sequence of Try should...
rgladwell/microtesia
src/test/scala/microtesia/TrySequenceSpec.scala
Scala
lgpl-3.0
1,138
package $basePackageName$; import io.skysail.core.akka.actors._ import scala.concurrent.ExecutionContext import scala.concurrent.Future class ApplicationService { //(implicit val executionContext: ExecutionContext) { //var applications = List[Application]() def createApplication(app: Application): Future[Option...
evandor/skysail-core
skysail.template.app/resources/template/$srcDir$/$basePackageDir$/services.scala
Scala
apache-2.0
647
/* * 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...
svn2github/scalatest
src/test/scala/org/scalatest/DeprecatedMethodFormSuiteSpec.scala
Scala
apache-2.0
32,176
package com.arcusys.learn.quiz.storage.impl.liferay import com.arcusys.learn.storage.impl.KeyedEntityStorage import com.arcusys.learn.persistence.liferay.service.{ LFQuizQuestCatLocalServiceUtil, LFQuizQuestionLocalServiceUtil } import com.arcusys.learn.persistence.liferay.model.LFQuizQuestCat import com.arcusys.valam...
ViLPy/Valamis
learn-persistence-liferay-wrapper/src/main/scala/com/arcusys/learn/quiz/storage/impl/liferay/LFQuizQuestionCategoryStorageImpl.scala
Scala
lgpl-3.0
6,152
/* * 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/src/main/scala/org/apache/spark/sql/catalyst/CarbonDDLSqlParser.scala
Scala
apache-2.0
45,547
package picasso.analysis import picasso.math._ import picasso.utils.{LogCritical, LogError, LogWarning, LogNotice, LogInfo, LogDebug, Logger, Misc, Config} trait KarpMillerTree extends CoveringSet { self : WSTS with WADL => sealed abstract class KMTree { /** Returns the state/limit contained on that n...
dzufferey/picasso
core/src/main/scala/picasso/analysis/KarpMillerTree.scala
Scala
bsd-2-clause
14,503
package org.archive.archivespark.sparkling class SparklingDistributedProp (get: => Any, set: Any => Unit) extends Serializable { private var value: Any = _ def save(): Unit = value = get def restore(): Unit = set(value) }
helgeho/ArchiveSpark
src/main/scala/org/archive/archivespark/sparkling/SparklingDistributedProp.scala
Scala
mit
229
/* * Copyright 2013 websudos ltd. * * 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 t...
nosheenzaza/phantom-data-centric
phantom-dsl/src/test/scala/com/websudos/phantom/dsl/query/BatchRestrictionTest.scala
Scala
gpl-2.0
2,745