code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
mrchristine/spark-examples-dbc
src/main/scala/org/apache/spark/examples/ml/NGramExample.scala
Scala
apache-2.0
1,731
/* * 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/vat-registration-frontend
app/services/ICLService.scala
Scala
apache-2.0
4,550
/* * 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 ...
prateekm/samza
samza-core/src/main/scala/org/apache/samza/job/local/ProcessJob.scala
Scala
apache-2.0
4,991
/* Copyright (C) 2008-2016 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
factorie/factorie
src/main/scala/cc/factorie/app/nlp/segment/DeterministicLexerTokenizer.scala
Scala
apache-2.0
9,101
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs // Licence: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.core import akka.actor._ import akka.event.LoggingReceive.withLabel import org.apache.commons.vfs2.FileObject import org.ensime.api._ import org.ensime.core.debug.DebugAct...
mwielocha/ensime-server
core/src/main/scala/org/ensime/core/Project.scala
Scala
gpl-3.0
5,981
/* * 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 ...
nchammas/spark
resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/ClientSuite.scala
Scala
apache-2.0
32,130
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
travisbrown/scalatest
src/main/scala/org/scalatest/StopOnFailure.scala
Scala
apache-2.0
908
/* * 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-common-cluster-test/src/test/scala/org/apache/carbondata/cluster/sdv/generated/GlobalSortTestCase.scala
Scala
apache-2.0
53,114
/* * Copyright 2014, by Vladimir Kostyukov and Contributors. * * This file is a part of a Finch library that may be found at * * https://github.com/finagle/finch * * Licensed under the Apache License, Version 2.0 (the "License"); * You may not use this file except in compliance with the License. * You may...
trane/finch
argonaut/src/main/scala/io/finch/argonaut/package.scala
Scala
apache-2.0
1,911
/* * 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-2.0 * ...
adarro/ddo-calc
subprojects/common/ddo-modeling/src/main/scala/io/truthencode/ddo/api/model/effect/FullEffectInfo.scala
Scala
apache-2.0
773
package com.twitter.zipkin.aggregate object RunHadoopJob extends App { com.twitter.scalding.Tool.main(Array("com.twitter.zipkin.aggregate.ZipkinAggregateJob","--hdfs") ++ args) }
travisbrown/zipkin
zipkin-aggregate/src/main/scala/com/twitter/zipkin/aggregate/RunHadoopJob.scala
Scala
apache-2.0
182
/* * Copyright (c) 2016 SnappyData, Inc. 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/LICENSE-2.0 * * Unless required by ap...
vjr/snappydata
core/src/main/scala/org/apache/spark/sql/sources/RuleUtils.scala
Scala
apache-2.0
23,829
/* * 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...
Comcast/sirius
src/test/scala/com/comcast/xfinity/sirius/api/impl/membership/MembershipHelperTest.scala
Scala
apache-2.0
5,061
package io.sphere.json package generic import io.sphere.json.JSON import scala.reflect.macros.blackbox private[generic] object JSONMacros { private def collectKnownSubtypes(c: blackbox.Context)( s: c.universe.Symbol): Set[c.universe.Symbol] = if (s.isModule || s.isModuleClass) Set(s) else if (s.isCla...
sphereio/sphere-scala-libs
json/json-derivation/src/main/scala/io/sphere/json/generic/JSONMacros.scala
Scala
apache-2.0
6,911
package io.mem0r1es.trank.pipeline import io.mem0r1es.trank.pipeline.NER._ import org.scalatest.FlatSpec import scala.io.Source class NERSpec extends FlatSpec { "A NER" should "extract entity labels" in { val content = Source.fromFile("src/test/resources/exascale.info.txt").mkString val entities = runNER(c...
homerquan/TRank
src/test/scala/io/mem0r1es/trank/pipeline/NERSpec.scala
Scala
apache-2.0
793
/* * Copyright 2012 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 t...
cogitate/twitter-zipkin-uuid
zipkin-query-core/src/main/scala/com/twitter/zipkin/builder/QueryServiceBuilder.scala
Scala
apache-2.0
2,403
import scala.of.coq.lang._ import Nat._ import Pairs._ import MoreLists._ import scala.concurrent.Future import MoreFutures._ object FutureMergeSort { def split[A](l: List[A]): (List[A], List[A]) = l match { case Nil => (Nil, Nil) case x :: Nil => (x :: Nil, Nil) case x :: y :: xs => { v...
JBakouny/Scallina
packaged-examples/snapshot/future-merge-sort/scallina/FutureMergeSort.scala
Scala
gpl-3.0
1,143
import org.cdent.World._ World().greet()
ingydotnet/cdent-py
dev-tests/hello-world/hello_world.scala
Scala
bsd-2-clause
42
package io.github.edadma.numbers object Platform { }
edadma/numbers
native/src/main/scala/io/github/edadma/numbers/Platform.scala
Scala
mit
56
package hotpepper4s.raw import hotpepper4s.{CodeName, Results} /** * Food Category * * @author ponkotuy * date: 2013/12/30 */ case class FoodCategoryResults( private val api_version: String, private val results_available: Int, private val results_returned: String, private val results_start: Int, ...
ponkotuy/hotpepper4s
src/main/scala/hotpepper4s/raw/FoodCategoryResults.scala
Scala
mit
732
/* * Copyright 2013-2015 Websudos, Limited. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, * this list of c...
analytically/phantom
project/Build.scala
Scala
bsd-2-clause
13,033
package io.surfkit.client import java.util.UUID import io.surfkit.clientlib.webrtc.Peer.PeerInfo import org.scalajs.dom.raw.MouseEvent import scala.scalajs.js import org.scalajs.dom import org.scalajs.dom.{ErrorEvent, CloseEvent, MessageEvent, Event} import org.scalajs.dom.raw.DOMError import scala.scalajs.js impor...
coreyauger/scala-webrtc-example
client-webrtc/src/main/scala/io/surfkit/client/WebRTCMain.scala
Scala
mit
7,632
object ErrorFile { val value = "someVal" def main(args: Array[String]): Unit = { println(value } }
bazelbuild/rules_scala
test_version/test_reporter/ErrorFile.scala
Scala
apache-2.0
110
/* * 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 ...
gengliangwang/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
Scala
apache-2.0
120,726
package com.sfxcode.sapphire.core.value import java.util import javafx.collections._ object FXBeanCollections { def observableMap[K, V <: AnyRef]: ObservableMap[K, FXBean[V]] = FXCollections.observableHashMap[K, FXBean[V]]() def observableList[T <: AnyRef]: ObservableList[FXBean[T]] = FXCollections.obs...
sfxcode/sapphire-core
src/main/scala/com/sfxcode/sapphire/core/value/FXBeanCollections.scala
Scala
apache-2.0
482
package templemore.sbt /** * @author Chris Turner */ case class Gem(name: String, version: String, source: String) { def command = "%s --version %s --source %s".format(name, version, source) }
skipoleschris/cucumber-sbt-plugin
src/main/scala/templemore/sbt/Gem.scala
Scala
apache-2.0
198
/* * 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 ...
pgandhi999/spark
graphx/src/main/scala/org/apache/spark/graphx/lib/SVDPlusPlus.scala
Scala
apache-2.0
7,850
/** * Copied from http://codereview.stackexchange.com/questions/79267/scala-trywith-that-closes-resources-automatically * with adaption for throwing exceptions as required for running tests */ package uk.ac.cdrc.mintsearch.neo4j import scala.util.control.NonFatal import scala.util.{Failure, Success, Try} objec...
spacelis/mint-search
neo4j-plugin/src/main/scala/uk/ac/cdrc/mintsearch/neo4j/WithResource.scala
Scala
apache-2.0
1,006
package org.jetbrains.plugins.scala.codeInspection.targetNameAnnotation import com.intellij.codeInspection._ import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.codeInspection.ScalaInspectionBundle class MultipleTargetNameAnnotationsInspection extends TargetNameInspectionBase { override protected ...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/codeInspection/targetNameAnnotation/MultipleTargetNameAnnotationsInspection.scala
Scala
apache-2.0
855
package com.github.diegopacheco.sandbox.scripts.scala.actors object ActorFun extends App { import scala.actors._ import scala.actors.Actor._ val deniro = actor { loop{ receive{ case s:String => println("Got String: " + s) case i:Int => println("Got Int: " + i) case _ => println("Have no idea wh...
diegopacheco/scala-playground
scala-playground/src/com/github/diegopacheco/sandbox/scripts/scala/actors/ActorFun.scala
Scala
unlicense
410
package varys.util import scala.collection.mutable.{ArrayBuffer, SynchronizedMap, HashMap} import scala.util.Random private[varys] class SlaveToBpsMap { val writeBlockRanGen = new Random() val idToBpsMap = new HashMap[String, BpsInfo] with SynchronizedMap[String, BpsInfo] def updateNetworkStats(id: S...
frankfzw/varys
core/src/main/scala/varys/util/SlaveToBpsMap.scala
Scala
apache-2.0
1,996
package pep_075 import common.GCD.gcd object Solution { def isPerimiterOfOnlyOneRightAngleTriangle(p: Int): Boolean = { var (t, k, overflow) = (0, 0, false) for (m <- 2 to math.floor(math.sqrt(p / 2)).toInt; if !overflow) { if ((p / 2) % m == 0) { if (m % 2 == 0) { k = m + 1 ...
filippovitale/pe
pe-solution/src/main/scala/pep_075/Solution.scala
Scala
mit
699
/* * 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/main/scala/org/apache/spark/scheduler/AsyncEventQueue.scala
Scala
apache-2.0
7,271
/** * 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...
guozhangwang/kafka
core/src/test/scala/unit/kafka/utils/CommandLineUtilsTest.scala
Scala
apache-2.0
8,732
/* * 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 ...
practice-vishnoi/dev-spark-1
mllib/src/main/scala/org/apache/spark/mllib/tree/impurity/Entropy.scala
Scala
apache-2.0
5,559
/** * Scala Units * Copyright (C) 2012 Bradley W. Kimmel * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * cop...
bwkimmel/scala-units
src/main/scala/ca/eandb/units/Exceptions.scala
Scala
mit
2,395
/* * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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 b...
hpe-cct/cct-core
src/main/scala/cogx/compiler/codegenerator/opencl/generator/FFTVectorConvolutionGenerator.scala
Scala
apache-2.0
11,349
/* * Copyright 2012 Eike Kettner * * 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...
eikek/publet
webdav/src/main/scala/org/eknet/publet/webdav/WebdavRequestUtil.scala
Scala
apache-2.0
2,293
package controllers import _root_.util.JsonHelpers import dbservice.DAO.userDAO import models.{UserHelpers, User} import models.UserHelpers.json._ import models.UserHelpers.json.implicits._ import play.api._ import play.api.libs.json._ import play.api.mvc.Results._ import pwguard.global.Globals.ExecutionContexts.Def...
bmc/pwguard
app/controllers/UserController.scala
Scala
bsd-3-clause
5,695
package uk.co.sprily.dh package util import java.util.concurrent.atomic.AtomicInteger import scala.concurrent.duration._ import org.specs2.ScalaCheck import org.specs2.mutable.Specification import org.specs2.time.NoTimeConversions class ResourcePoolSpec extends Specification with ScalaCheck { "Resource Pool" shou...
sprily/datahopper
util/src/test/scala/resourcePoolSpec.scala
Scala
gpl-3.0
2,868
/* * 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/Notifier.scala
Scala
gpl-3.0
928
package org.sodatest.runtime.processing.formatting.xhtml /* * Copyright (c) 2011 Belmont Technology Pty Ltd. 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 * * ...
GrahamLea/SodaTest
sodatest-runtime/src/main/scala/org/sodatest/runtime/processing/formatting/xhtml/XhtmlSodaTestResultWriter.scala
Scala
apache-2.0
2,132
package edu.berkeley.nlp.summ.data import scala.collection.JavaConverters._ import edu.berkeley.nlp.futile.fig.basic.IOUtils import edu.berkeley.nlp.futile.util.Counter import edu.berkeley.nlp.futile.util.Logger import edu.berkeley.nlp.futile.LightRunner import edu.berkeley.nlp.futile.EditDistance.EditOp import edu.be...
gregdurrett/berkeley-doc-summarizer
src/main/scala/edu/berkeley/nlp/summ/data/SummaryAligner.scala
Scala
gpl-3.0
4,784
package sigmastate.utxo import com.google.common.primitives.Longs import org.ergoplatform._ import org.ergoplatform.dsl.{ContractSpec, SigmaContractSyntax, TestContractSpec} import scorex.crypto.authds.avltree.batch._ import scorex.crypto.authds.{ADKey, ADValue, SerializedAdProof} import scorex.crypto.hash.{Digest32, ...
ScorexFoundation/sigmastate-interpreter
sigmastate/src/test/scala/sigmastate/utxo/AVLTreeScriptsSpecification.scala
Scala
mit
15,832
package com.realtimecep.scalatest.functionaltesting import org.openqa.selenium.WebDriver import org.openqa.selenium.htmlunit.HtmlUnitDriver import org.scalatest.selenium.WebBrowser import org.scalatest.{FlatSpec, Matchers} /** * Created on 9/23/14. * * @author <a href="[email protected]">Ted Won</a> * @vers...
jhshin9/helloworld-project
commons/src/test/scala/com/realtimecep/scalatest/functionaltesting/StormAdminUISpec.scala
Scala
apache-2.0
643
/* * Copyright 2014 Commonwealth Computer Research, 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 applicabl...
kevinwheeler/geomesa
geomesa-core/src/main/scala/org/locationtech/geomesa/core/transform/TransformCreator.scala
Scala
apache-2.0
2,344
/* * 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 ...
bwsw/sj-platform
core/sj-engine-core/src/main/scala/com/bwsw/sj/engine/core/engine/NumericalCheckpointTaskEngine.scala
Scala
apache-2.0
1,895
// Ensure we don't get "the type test for argType cannot be checked at runtime" warning class Symbol { type ThisName } type TermSymbol = Symbol { type ThisName = String } type TermSymbolOrNull = TermSymbol | Null def testSimple = val x: Symbol | Null = ??? x match case key: Symbol => 1 case null => 0 ...
dotty-staging/dotty
tests/explicit-nulls/pos-patmat/match-pat.scala
Scala
apache-2.0
551
package io.atal.butterfly.action import io.atal.butterfly.{Editor, Clipboard, Cursor} import org.scalatest._ import Matchers._ /** AddCursor action unit test */ class AddCursorTest extends FlatSpec { "The AddCursor action" should "add a cursor to the editor" in { val action = new AddCursor((1, 1)) val ed...
Matthieu-Riou/Butterfly
src/test/scala/io/atal/butterfly/action/AddCursorTest.scala
Scala
mit
517
package bad.robot.radiate import java.io.File import org.apache.log4j._ object Logging { def initialise() { val root = Logger.getRootLogger root.addAppender(createFileAppender) root.addAppender(createConsoleAppender) } private def createFileAppender: FileAppender = { val file = new RollingFil...
tobyweston/radiate
src/main/scala/bad/robot/radiate/Logging.scala
Scala
apache-2.0
943
package com.seanshubin.concurrency.samples.actor import com.seanshubin.concurrency.samples.domain.{Cleanup, Event} class CleanupActorSystems(eventActorSystem: ActorSystemContract[Event]) extends Cleanup { override def cleanup(): Unit = { eventActorSystem.terminate() } }
SeanShubin/concurrency-samples
actor/src/main/scala/com/seanshubin/concurrency/samples/actor/CleanupActorSystems.scala
Scala
unlicense
281
package slaq.meta import slaq.ResultSetInvoker import slaq.ql.TypeMapperDelegate /** * A wrapper for a row in the ResultSet returned by DatabaseMetaData.getUDTs(). */ case class MUDT( typeName: MQName, className: String, sqlType: Int, remarks: String, baseType: Option[Short] ) { def sqlTypeName = TypeMapperDel...
godenji/slaq
src/main/scala/slaq/scalaquery/meta/MUDT.scala
Scala
bsd-2-clause
808
package org.higherstate.jameson.validators import org.higherstate.jameson.Path import org.higherstate.jameson.failures.{ValidationFailure, InvalidValueFailure} trait LengthValidator extends Validator { def apply(value:Any, path:Path) = value match { case n:Seq[_] => validate(n.length, path) case n:S...
HigherState/jameson
src/main/scala/org/higherstate/jameson/validators/LengthValidator.scala
Scala
apache-2.0
1,169
package controllers import chess.format.Forsyth import chess.format.Forsyth.SituationPlus import chess.Situation import chess.variant.{ Variant, Standard, FromPosition } import play.api.i18n.Messages.Implicits._ import play.api.libs.json.Json import play.api.mvc._ import play.api.Play.current import scala.concurrent.d...
clarkerubber/lila
app/controllers/UserAnalysis.scala
Scala
agpl-3.0
5,196
abstract class foo(a: Int, b: Int) extends scala.DelayedInit { def delayedInit(x: => Unit) { println("delayed init"); x } } object Test { def main(args: Array[String]) { new foo(1, 2) { println("new foo(1, 2)") } new foo(b = 2, a = 1) { println("new foo(b = 2, a = 1)") } } }
felixmulder/scala
test/files/run/t6481.scala
Scala
bsd-3-clause
301
import language.higherKinds trait Travers[T[_]] extends Functor[T] with Foldable[T] { def traverse[F[_]:Applic,A,B](t: T[A])(f: A => F[B]): F[T[B]] override def map[A,B](functor: T[A])(g: A => B): T[B] = traverse(functor)((a:A) => Applic.ApplicId.pure(g(a)))(Applic.ApplicId).id override def foldMap[A,B:Monoi...
lkuczera/scalatypeclasses
solutions/Travers.scala
Scala
mit
2,296
/* * Copyright University of Basel, Graphics and Vision Research Group * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
unibas-gravis/scalismo-faces
src/main/scala/scalismo/faces/render/TextureExtraction.scala
Scala
apache-2.0
4,352
package pamflet case class Frontin(header: Option[String], body: String) object Frontin { val seperator = "---" def seperates(str: String): Boolean = (str.trim == seperator) && (str startsWith seperator) def apply(str: String): Frontin = str.linesWithSeparators.toList match { case Nil => Front...
n8han/pamflet
library/src/main/scala/frontin.scala
Scala
lgpl-3.0
575
/* * 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 ...
mdunker/usergrid
tests/performance/src/main/scala/org/apache/usergrid/simulations/AuditSimulation.scala
Scala
apache-2.0
2,765
package componentswing import componentwork._, javax.swing.{JFrame, JPanel}, java.awt.{BorderLayout, Component => SC,Color}, java.awt.event.{WindowAdapter,WindowEvent, ComponentAdapter, ComponentEvent, KeyListener, KeyEvent}, scala.collection.mutable.{Map => MMap} class Frame(val name:MMa...
AlexCAB/whfzf
componentswing/Frame.scala
Scala
mit
2,156
/* * Copyright (c) 2014-2021 by The Monix Project Developers. * See the project homepage at: https://monix.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...
monixio/monix
monix-tail/shared/src/main/scala/monix/tail/batches/DoublesBatch.scala
Scala
apache-2.0
1,808
package chapter2 object Exercise2_4 { /** * */ def uncurry[A, B, C](f : A => B => C): (A, B) => C = (x, y) => f(x)(y) def main(args: Array[String]): Unit = { def curriedAdd(a:Int)(b: Int) = a + b val unCurriedAdd = uncurry(curriedAdd) assert(unCurriedAdd(2, 3) == 5) println("Tests Su...
amolnayak311/functional-programming-in-scala
src/chapter2/Exercise2_4.scala
Scala
unlicense
336
/* * Copyright 2014–2020 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...
slamdata/quasar
foundation/src/test/scala/quasar/contrib/scalaz/MoreBindOpsSpec.scala
Scala
apache-2.0
1,058
package aug.profile object DefaultColorSchemes { val colorSchemes: List[ColorSchemeConfig] = { val list = List.newBuilder[ColorSchemeConfig] list += ColorSchemeConfig("default") list.result } }
austinmiller/augustmc
src/main/scala/aug/profile/DefaultColorSchemes.scala
Scala
apache-2.0
215
/******************************************************************************* Copyright 2009,2011, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. ***********************************************...
darkrsw/safe
src/main/scala/kr/ac/kaist/jsaf/scala_src/useful/Iterators.scala
Scala
bsd-3-clause
780
/** * 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...
Chasego/kafka
core/src/test/scala/unit/kafka/admin/ReassignPartitionsCommandArgsTest.scala
Scala
apache-2.0
9,998
/* ************************************************************************************* * 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-web/src/main/scala/com/normation/rudder/web/services/DirectiveEditorService.scala
Scala
agpl-3.0
4,218
package dpla.ingestion3.mappers.providers import dpla.ingestion3.enrichments.normalizations.filters.{DigitalSurrogateBlockList, ExtentIdentificationList} import dpla.ingestion3.mappers.utils._ import dpla.ingestion3.messages.IngestMessageTemplates import dpla.ingestion3.model.DplaMapData._ import dpla.ingestion3.model...
dpla/ingestion3
src/main/scala/dpla/ingestion3/mappers/providers/HarvardMapping.scala
Scala
mit
14,675
package actors import akka.ActorTimer import akka.actor.{ActorLogging, Actor} import akka.pattern.pipe import com.dvgodoy.spark.benford.image.SBA._ import com.dvgodoy.spark.benford.util.JobId import models.ImageCommons import models.ImageService._ import org.scalactic._ import play.api.libs.json.{JsValue, Json} impor...
dvgodoy/play-benford-analysis
app/actors/ImageActor.scala
Scala
apache-2.0
2,744
/* This file is part of Octetoscope. Copyright (C) 2013-2015 Octetoscope contributors (see /AUTHORS.txt) 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 ...
SpecLad/Octetoscope
presentation/src/test/scala/ru/corrigendum/octetoscope/presentation/PackageSuite.scala
Scala
gpl-3.0
5,160
package org.jetbrains.plugins.scala package lang package psi package impl package base package literals import java.lang import java.lang.{Double => JDouble} import com.intellij.lang.ASTNode import com.intellij.openapi.project.Project import com.intellij.psi.util.PsiLiteralUtil import org.jetbrains.plugins.scala.lang...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/base/literals/ScDoubleLiteralImpl.scala
Scala
apache-2.0
1,279
/* * This file is part of Kiama. * * Copyright (C) 2008-2015 Anthony M Sloane, Macquarie University. * * Kiama 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 ...
solomono/kiama
core/src/org/kiama/attribution/AttributionCommon.scala
Scala
gpl-3.0
2,219
/* * Copyright 2007-2015 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...
lift/framework
web/webkit/src/main/scala/net/liftweb/http/SecurityRules.scala
Scala
apache-2.0
16,478
package io.buoyant.marathon.v2 import com.twitter.finagle._ import com.twitter.finagle.util.DefaultTimer import com.twitter.finagle.tracing.Trace import com.twitter.util.{NonFatal => _, _} import scala.util.control.NonFatal object AppIdNamer { object Closed extends Throwable } class AppIdNamer( api: Api, prefi...
hhtpcd/linkerd
marathon/src/main/scala/io/buoyant/marathon/v2/AppIdNamer.scala
Scala
apache-2.0
4,079
//https://www.hackerrank.com/challenges/mirko-at-construction-site object Control { import scala.language.reflectiveCalls def using[A <: { def close(): Unit }, B](param: A)(f: A => B): B = try { f(param) } finally { param.close() } } object Perf { import java.util.concurrent.TimeUnit def time[R](...
flopezlasanta/hackerrank
src/functional_programming/functional_structures/MirkoConstructionSite.scala
Scala
mit
2,805
/* * Copyright 2014–2017 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...
drostron/quasar
niflheim/src/main/scala/quasar/niflheim/NIHDBActor.scala
Scala
apache-2.0
17,002
package org.jetbrains.plugins.dotty.lang.parser.parsing.statements import org.jetbrains.plugins.dotty.lang.parser.parsing.types.Type /** * @author adkozlov */ object VarDef extends org.jetbrains.plugins.scala.lang.parser.parsing.statements.VarDef { override protected val patDef = PatDef override protected val...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/dotty/lang/parser/parsing/statements/VarDef.scala
Scala
apache-2.0
337
/* * Happy Melly Teller * Copyright (C) 2013 - 2016, Happy Melly http://www.happymelly.com * * This file is part of the Happy Melly Teller. * * Happy Melly Teller 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 Fo...
HappyMelly/teller
app/controllers/AsyncController.scala
Scala
gpl-3.0
3,742
package sk.scalagine.math /** * Created with IntelliJ IDEA. * User: zladovan * Date: 25.5.2014 * Time: 12:04 */ class InverseMatrixNotExistsException(matrix: MatrixNxN[_]) extends RuntimeException("Non invertible matrix: " + matrix)
zladovan/scalagine
engine/math/src/main/scala/sk/scalagine/math/InverseMatrixNotExistsException.scala
Scala
mit
241
package com.idyria.osi.vui.implementation.swing import java.awt.Menu import java.awt.MenuItem import java.awt.event.ActionListener import java.awt.event.ActionEvent import javax.swing.MenuElement import javax.swing.JMenuItem import javax.swing.JMenu import javax.swing.JPopupMenu trait SwingUtilsTrait { def addActi...
richnou/vui2
vui2-javafx/src/main/scala/com/idyria/osi/vui/implementation/swing/SwingUtilsTrait.scala
Scala
agpl-3.0
2,020
/* * 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 ...
tophua/spark1.52
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/TableIdentifier.scala
Scala
apache-2.0
1,443
package rml.args.conversions.basic import rml.args.arg._ import rml.args.arg.input._ import rml.args.exceptions.IllegalArgException import rml.args.arg.restriction.NotRestricted import rml.args.arg.input.SingleArg import rml.args.arg.input.PositionalArg import rml.args.arg.input.ListArg0 import rml.args.arg.input.List...
rml/scala_args
src/main/scala/rml/args/conversions/basic/ToFloat.scala
Scala
gpl-3.0
1,156
/* * 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 ...
aosagie/spark
sql/core/src/test/scala/org/apache/spark/sql/UDFSuite.scala
Scala
apache-2.0
19,832
package l3 import l3.input.{ FileReader, SeqReader } import scala.util.parsing.input.{ StreamReader } object Main { def passThrough[T](f: T => Unit): T=>T = { t: T => f(t); t } def treePrinter[T <: Formatable](msg: String): T=>T = passThrough { tree => val writer = new java.io.PrintWriter(System.out) ...
sana/WorkAtEPFL
l3-compiler/compiler-backend/compiler/src/l3/Main.scala
Scala
gpl-3.0
1,514
/* * Happy Melly Teller * Copyright (C) 2013 - 2016, Happy Melly http://www.happymelly.com * * This file is part of the Happy Melly Teller. * * Happy Melly Teller 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 Fo...
HappyMelly/teller
app/modules/Actors.scala
Scala
gpl-3.0
1,515
package probability.bayes import au.id.cxd.math.probability.bayes.DiscreteBayes import au.id.cxd.math.probability.discrete.TableDistribution import breeze.linalg.{DenseMatrix, DenseVector} import org.scalatest._ trait TestData { /** * test the discrete bayes distribution * **/ val data = DenseMatrix...
cxd/scala-au.id.cxd.math
math/src/test/scala/probability/bayes/TestDiscreteBayes.scala
Scala
mit
2,901
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js Test Suite ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ ** ** /____/\\___/...
japgolly/scala-js
test-suite/js/src/test/scala/org/scalajs/testsuite/typedarray/TypedArrayConversionTest.scala
Scala
bsd-3-clause
5,302
package zeroadv.position import zeroadv.{DimM, PosM} import org.apache.commons.math3.optim.nonlinear.scalar.noderiv.{MultiDirectionalSimplex, SimplexOptimizer} import org.apache.commons.math3.optim.nonlinear.scalar.{GoalType, ObjectiveFunction} import org.apache.commons.math3.analysis.MultivariateFunction import org.a...
adamw/zeroadv
collector/src/main/scala/zeroadv/position/CalculatePosition.scala
Scala
gpl-2.0
2,038
package org.openguard.core.ftp import javax.sql.DataSource import org.apache.ftpserver.ftplet.{FtpException, User} import org.apache.ftpserver.usermanager.PasswordEncryptor import org.apache.ftpserver.usermanager.impl.{BaseUser, DbUserManager} import play.api.Play import play.api.Play.current class UserManager(dataS...
pbolle/openvideoguard
core/src/main/scala/org/openguard/core/ftp/UserManager.scala
Scala
apache-2.0
1,358
import eu.inn.binders.naming.CamelCaseToSnakeCaseConverter import org.scalatest.{FlatSpec, Matchers} class TestConvertJsonSerializer extends FlatSpec with Matchers { import eu.inn.binders.json._ "Json " should " serialize class with Int with Converter" in { implicit val factory = new DefaultSerializerFa...
InnovaCo/binders-json
src/test/scala/TestConvertJsonSerializer.scala
Scala
bsd-3-clause
460
/*********************************************************************** * Copyright (c) 2013-2015 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 which * accompanies this distribution and is ...
drackaer/geomesa
geomesa-convert/geomesa-convert-fixedwidth/src/test/scala/org/locationtech/geomesa/convert/fixedwidth/FixedWidthConverterTest.scala
Scala
apache-2.0
2,111
package unfiltered.response trait BaseContentType extends Responder[Any] { def respond(res: HttpResponse[Any]) { res.setContentType(contentType) } def contentType: String } case class CharContentType(content_type: String) extends BaseContentType { def contentType = "%s; charset=%s".format(content_type, ch...
softprops/Unfiltered
library/src/main/scala/response/types.scala
Scala
mit
1,055
package uk.co.pragmasoft.graphdb.orient import com.tinkerpop.blueprints.{Query, TransactionalGraph, Vertex} import com.tinkerpop.blueprints.impls.orient._ import uk.co.pragmasoft.graphdb.GraphDAO import uk.co.pragmasoft.graphdb.marshalling.{GraphMarshallingDSL, GraphMarshaller} import uk.co.pragmasoft.graphdb.validati...
galarragas/sgal
sgal-orient/src/main/scala/uk/co/pragmasoft/graphdb/orient/OrientDbDAO.scala
Scala
apache-2.0
5,627
package org.scalatra package auth import servlet.ServletBase import collection.mutable.{ HashMap, Map => MMap } import scala.PartialFunction import ScentryAuthStore.{SessionAuthStore, ScentryAuthStore} import util.RicherString import collection.immutable.List._ object Scentry { type StrategyFactory[UserType <: An...
louk/scalatra
auth/src/main/scala/org/scalatra/auth/Scentry.scala
Scala
bsd-2-clause
4,884
/*********************************************************************** * Copyright (c) 2013-2020 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
aheyne/geomesa
geomesa-fs/geomesa-fs-storage/geomesa-fs-storage-common/src/test/scala/org/locationtech/geomesa/fs/storage/common/partitions/PartitionSchemeConfTest.scala
Scala
apache-2.0
3,073
/** * Copyright (C) 2010 Orbeon, Inc. * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. * * This pr...
brunobuzzi/orbeon-forms
xforms/jvm/src/main/scala/org/orbeon/oxf/xforms/function/LocalDate.scala
Scala
lgpl-2.1
1,413
// scalac: -opt:l:inline -opt-inline-from:** -Yopt-inline-heuristics:everything -opt-warnings:_ -Werror class Test { def foo = A_1.test }
lrytz/scala
test/files/neg/inlineIndyLambdaPrivate/Test_2.scala
Scala
apache-2.0
140
/* (c) copyright This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope t...
mccv/processing-tweet-stream
src/main/scala/com/twitter/processing/Tweet.scala
Scala
lgpl-3.0
8,010
package robco import org.apache.spark.{SparkContext, SparkConf} object DataClasses { } object SparkSql { // case class Person(firstName: String, lastName: String, gender: String) case class Node(nodeId: String) case class Port(egressRate: String, nodeId: String, pirHigh: String, pirLow: String, portId: String)...
amazoncop/spark
src/main/scala/robco/SparkSql.scala
Scala
apache-2.0
2,736
/* * Copyright 2009-2010 LinkedIn, 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 ...
jhartman/norbert
cluster/src/test/scala/com/linkedin/norbert/cluster/ClusterClientSpec.scala
Scala
apache-2.0
10,880