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 ...
pgandhi999/spark
core/src/test/scala/org/apache/spark/deploy/history/ApplicationCacheSuite.scala
Scala
apache-2.0
13,639
/* * Copyright 2016 rdbc contributors * * 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...
rdbc-io/rdbc-pgsql
rdbc-pgsql-core/src/main/scala/io/rdbc/pgsql/core/internal/typeconv/StringTypeConverter.scala
Scala
apache-2.0
1,014
package org.bitcoins.core.protocol.transaction import org.bitcoins.core.gen.TransactionGenerators import org.bitcoins.core.util.{BitcoinSLogger, CryptoUtil} import org.scalacheck.{Prop, Properties} /** * Created by chris on 6/24/16. */ class TransactionSpec extends Properties("TransactionSpec") with BitcoinSLogge...
SuredBits/bitcoin-s-sidechains
src/test/scala/org/bitcoins/core/protocol/transaction/TransactionSpec.scala
Scala
mit
1,479
/** * Copyright 2015 Frank Austin Nothaft * * 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 ...
fnothaft/ananas
src/main/scala/net/fnothaft/ananas/debruijn/ColoredKmerVertex.scala
Scala
apache-2.0
4,375
/* * 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
core/src/main/scala/org/apache/spark/status/api/v1/OneApplicationResource.scala
Scala
apache-2.0
5,818
var v = { case class C } import /* resolved: false */v.C println(/* resolved: false */ C.getClass) println(classOf[ /* resolved: false */ C])
ilinum/intellij-scala
testdata/resolve2/import/source/Variable.scala
Scala
apache-2.0
146
/* package test import org.specs2.mutable._ import play.api.test._ import play.api.test.Helpers._ * Add your spec here. * You can mock out a whole application including requests, plugins etc. * For more information, consult the wiki. class ApplicationSpec extends Specification { "Application" should { "...
indykish/vertice_gateway
test/run/ApplicationSpec.scala
Scala
mit
776
//====================================================================================================================== // Facsimile: A Discrete-Event Simulation Library // Copyright © 2004-2020, Michael J Allen. // // This file is part of Facsimile. // // Facsimile is free software: you can redistribute it and/or mod...
MichaelJAllen/facsimile
facsimile-collection/src/main/scala/org/facsim/collection/immutable/Heap.scala
Scala
lgpl-3.0
4,823
package blended.jms.utils.internal import java.util.Date object ConnectionState { val CONNECTED = "connected" val CONNECTING = "connecting" val CLOSING = "closing" val DISCONNECTED = "disconnected" } case class ConnectionState( provider : String, status : String = ConnectionState.DISCONNECTED, lastCon...
lefou/blended
blended.jms.utils/src/main/scala/blended/jms/utils/internal/ConnectionState.scala
Scala
apache-2.0
563
import sbt._ object LibraryDependencies { private val play26Version = "2.6.25" private val play27Version = "2.7.9" private val play28Version = "2.8.7" val compile: Seq[ModuleID] = PlayCrossCompilation.dependencies( shared = Seq( "com.github.nscala-time" %% "nscala-time" % "2.22.0", "org....
hmrc/simple-reactivemongo
project/LibraryDependencies.scala
Scala
apache-2.0
2,461
package me.sgrouples.rogue.cc import me.sgrouples.rogue._ import me.sgrouples.rogue.cc.CcRogue._ import org.bson.types.ObjectId import me.sgrouples.rogue.BsonFormats._ import munit.FunSuite import me.sgrouples.rogue.QueryParser._ case class Inner(a: Int, b: String, c: Array[String] = Array.empty) case class Outer( ...
sgrouples/rogue-fsqio
cc/src/test/scala/me/sgrouples/rogue/cc/CCListArrayTest.scala
Scala
apache-2.0
3,570
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/vat-registration-frontend
it/controllers/registration/returns/WarehouseNameControllerISpec.scala
Scala
apache-2.0
4,687
package scalaprops import scala.concurrent.{Await, ExecutionContext, Future} import scala.concurrent.duration.Duration import java.lang.Thread.UncaughtExceptionHandler import sbt.testing.Logger import java.util.concurrent.ForkJoinPool object TestExecutorImpl { private[this] def newInstance(log: Logger): TestExecuto...
scalaprops/scalaprops
scalaprops/jvm/src/main/scala/scalaprops/TestExecutorImpl.scala
Scala
mit
1,325
/** Copyright 2014 Dropbox, Inc. Copyright 2021 cross-language-cpp * * 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 re...
cross-language-cpp/djinni-generator
src/main/scala/djinni/parser.scala
Scala
apache-2.0
15,168
/** * The only change is in the decision to replace a LOAD_LOCAL(l) * in the copy-propagation performed before ClosureElimination. * * In the general case, the local variable 'l' is connected through * an alias chain with other local variables and at the end of the * alias chain there may be a Value, call it 'v'....
yusuke2255/dotty
tests/pending/run/test-cpp.scala
Scala
bsd-3-clause
2,463
/** * 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...
chirino/activemq
activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ReplicationProtocolCodec.scala
Scala
apache-2.0
3,469
package test import org.specs2.mutable._ import play.api.test.Helpers._ import play.api.test.TestServer class IntegrationSpec extends Specification { "Application" should { "work from within a browser" in { running(TestServer(3333), FIREFOX) { browser => browser.goTo("http://localhost...
stevegocoding/BirdWatch
Scala-Play-SSE/test/IntegrationSpec.scala
Scala
gpl-3.0
404
import stainless.annotation._ import stainless.lang._ import stainless.io._ object FindIndex { def containsFrom[T](a: Array[T], t: T, j: Int): Boolean = { require(0 <= j && j < a.length) var i = j (while (i < a.length) { decreases(a.length - i) if (a(i) == t) return true i += 1 }).i...
epfl-lara/stainless
frontends/benchmarks/imperative/valid/FindIndex.scala
Scala
apache-2.0
1,708
package com.sksamuel.scapegoat.inspections import com.sksamuel.scapegoat.{PluginRunner, Reporter} import org.scalatest.{OneInstancePerTest, FreeSpec, Matchers} /** @author Stephen Samuel */ class NullUseTest extends FreeSpec with ASTSugar with Matchers with PluginRunner with OneInstancePerTest { override val inspe...
RichardBradley/scapegoat
src/test/scala/com/sksamuel/scapegoat/inspections/NullUseTest.scala
Scala
apache-2.0
1,533
package com.blackboxsociety.http.routes import com.blackboxsociety.http._ import scala.util.matching.Regex case class RegexPathRoute(path: String, args: String*) extends HttpRouteRule { val regPath = new Regex(path, args: _*) def route(request: HttpRequest): Option[HttpRequest] = { val r = regPath findFirst...
blackboxsociety/blackbox-http
src/main/scala/com/blackboxsociety/http/routes/RegexPathRoute.scala
Scala
mit
511
/* * Copyright (c) 2013-2014 Telefónica Investigación y Desarrollo S.A.U. * * 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 * * Unles...
telefonicaid/fiware-cosmos-platform
infinity/common/src/main/scala/es/tid/cosmos/infinity/common/json/MetadataParser.scala
Scala
apache-2.0
1,445
/* Copyright 2016-17, Hasso-Plattner-Institut fuer Softwaresystemtechnik GmbH 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 applicab...
bpn1/ingestion
src/test/scala/de/hpi/ingestion/textmining/nel/ArticleTrieSearchTest.scala
Scala
apache-2.0
2,065
package pages.acquire import uk.gov.dvla.vehicles.presentation.common.helpers.webbrowser.{Page, WebDriverFactory} object VersionPage extends Page { final val address = buildAppUrl("version") override lazy val url: String = WebDriverFactory.testUrl + address.substring(1) val title = "Version" }
dvla/vehicles-acquire-online
test/pages/acquire/VersionPage.scala
Scala
mit
304
package model import scalikejdbc.TypeBinder case class HashedPassword private[model] (value: String) { def verify(plainPassword: PlainPassword, salt: Any): Boolean = plainPassword.hash(salt) == this } object HashedPassword { implicit val typeBinder: TypeBinder[HashedPassword] = TypeBinder.string.map(HashedPasswor...
skinny-framework/skinny-framework
example/src/main/scala/model/HashedPassword.scala
Scala
mit
331
/* * 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 ...
bryanmontesv/incubator-spot
spot-ml/src/main/scala/org/apache/spot/utilities/TopDomains.scala
Scala
apache-2.0
1,103
/* * 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 reflect ...
martijnhoekstra/scala
src/reflect/scala/reflect/macros/whitebox/Context.scala
Scala
apache-2.0
4,599
/* * Copyright (C) 2013 Alcatel-Lucent. * * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * Licensed to you 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 cop...
molecule-labs/molecule
molecule-io/src/main/scala/molecule/io/RInput.scala
Scala
apache-2.0
3,122
//: ---------------------------------------------------------------------------- //: Copyright (C) 2015 Verizon. 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 Licen...
oncue/remotely
core/src/main/scala/Utils.scala
Scala
apache-2.0
1,284
/* * 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/dataload/TestLoadDataWithMalformedCarbonCommandException.scala
Scala
apache-2.0
2,455
package org.jetbrains.plugins.scala package worksheet.actions import com.intellij.ide.scratch.{ScratchFileService, ScratchRootType} import com.intellij.openapi.actionSystem.{AnAction, AnActionEvent, CommonDataKeys} import com.intellij.openapi.fileEditor.FileEditorManager import com.intellij.openapi.util.text.StringUti...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/worksheet/actions/CreateLightWorksheetAction.scala
Scala
apache-2.0
1,126
package org.andrewconner.spot.cmdrs import java.io.{ FileNotFoundException, PrintWriter, File } import cats.data.Xor import org.joda.time.DateTime import scala.collection.mutable import scala.io.Source case class PriceHistory(kind: InstanceKind, history: List[(DateTime, Price)]) { import HistoricalSpotPrice.TimeP...
andrewconner/spotsy
app/org/andrewconner/spot/cmdrs/PriceHistory.scala
Scala
mit
4,123
package model.viewmodels import model.dtos._ import org.apache.commons.lang3.StringUtils import play.api.i18n.Messages import play.api.libs.json._ import utils.ImplicitReadWrites._ import scala.collection.mutable.ArrayBuffer case class ConsultationViewModel(consultation:model.dtos.Consultation, ...
scify/DemocracIT-Web
app/model/viewmodels/ConsultationViewModel.scala
Scala
apache-2.0
8,678
package com.lookout.borderpatrol.auth.keymaster import com.lookout.borderpatrol.util.Combinators.tap import com.lookout.borderpatrol.sessionx._ import com.lookout.borderpatrol.{sessionx, ServiceIdentifier} import com.lookout.borderpatrol.auth._ import com.twitter.finagle.httpx.path.Path import com.twitter.finagle.{Fil...
tejom/borderpatrol
auth/src/main/scala/com/lookout/borderpatrol/auth/keymaster/Keymaster.scala
Scala
mit
6,405
/* A natural solution is using `foldRight`, however this will stack overflow for large lists. We can use `foldRightViaFoldLeft` to avoid the stack overflow (variation 1), but more commonly, with our current implementation of `List`, `map` will just be implemented using local mutation (variation 2). Again, notice that ...
ShokuninSan/fpinscala
answerkey/datastructures/18.answer.scala
Scala
mit
959
package com.app object Settings { // }
zentiment/zentiment-miner
app/src/main/scala/com/app/Settings.scala
Scala
apache-2.0
42
package org.draegisoft.ddlCodeGenerator sealed abstract class ColumnType(val name: String, val dataType: DataType) case class SimpleColumn(override val name: String, override val dataType: DataType) extends ColumnType(name, dataType) case class PkColumn(override val name: String, override val dataType: DataType) exte...
mdraeger/ddlCodeGenerator
src/main/scala/org/draegisoft/ddlCodeGenerator/ColumnType.scala
Scala
gpl-3.0
555
package is.hail.types.physical import is.hail.asm4s.Code import is.hail.types.virtual.{TStruct, Type} import is.hail.utils._ import org.apache.spark.sql.Row import collection.JavaConverters._ object PCanonicalStruct { private val requiredEmpty = PCanonicalStruct(Array.empty[PField], true) private val optionalEmp...
danking/hail
hail/src/main/scala/is/hail/types/physical/PCanonicalStruct.scala
Scala
mit
5,027
object CheckLoader { def main(args: Array[String]) { apply() } def apply() { val loader = getClass.getClassLoader val appLoader = ClassLoader.getSystemClassLoader assert(loader eq appLoader, "Application classes not loaded in the system class loader") } }
pdalpra/sbt
sbt/src/sbt-test/run/fork-loader/CheckLoader.scala
Scala
bsd-3-clause
264
package com.sksamuel.scapegoat import scala.collection.mutable.ListBuffer import scala.reflect.internal.util.Position import scala.tools.nsc.reporters.Reporter /** * @author * Stephen Samuel */ class Feedback( reporter: Reporter, configuration: Configuration ) { private val warningsBuffer = new ListBuffer...
sksamuel/scapegoat
src/main/scala/com/sksamuel/scapegoat/Feedback.scala
Scala
apache-2.0
3,285
/* * 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 ...
apache/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/stream/StreamPhysicalTemporalSort.scala
Scala
apache-2.0
2,628
/* * Custom routing Router to Mama (ROUTER to REQ) * * While this example runs in a single process, that is just to make * it easier to start and stop the example. Each thread has its own * context and conceptually acts as a separate process. * * * @author Giovanni Ruggiero * @email giovanni.ruggiero@gmail...
soscpd/bee
root/tests/zguide/examples/Scala/rtreq.scala
Scala
mit
2,024
/* * 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 ...
wangmiao1981/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/joins/ExistenceJoinSuite.scala
Scala
apache-2.0
11,092
/* * 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 collecti...
martijnhoekstra/scala
src/library/scala/collection/mutable/LinkedHashSet.scala
Scala
apache-2.0
5,003
package com.trueaccord.scalapb import protocbridge.ProtocBridge import scalapb.ScalaPbCodeGenerator object ScalaPBC { def main(args: Array[String]): Unit = { val (versionFlag, protocArgs) = if (args.length >= 1 && args(0).startsWith("-v")) { (args.head, args.tail) } else { ("-v300",...
eiennohito/ScalaPB
scalapbc/src/main/scala/com/trueaccord/scalapb/ScalaPBC.scala
Scala
apache-2.0
552
package spire.math.algebraic /** * This folds all ring ops (+, -, *) on constants to constants. This only works * on `IntLit`s for now, as `BigInt`s may be slow. * * TODO: It may be worth it to fold `BigIntLit`s for add/subtract, since the * space requirement would approximately half. */ trait ConstantFolder[A ...
lrytz/spire
core/src/main/scala/spire/math/algebraic/ConstantFolder.scala
Scala
mit
897
/*** * Copyright 2014 Rackspace US, 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 applica...
wdschei/api-checker
core/src/main/scala/com/rackspace/com/papi/components/checker/handler/InstrumentedHandlerMBean.scala
Scala
apache-2.0
755
package placid import Dependencies.Versions._ import com.typesafe.sbt.SbtScalariform import com.typesafe.sbt.SbtScalariform.ScalariformKeys import com.typesafe.sbt.SbtMultiJvm.MultiJvmKeys.MultiJvm import com.typesafe.sbteclipse.plugin.EclipsePlugin._ import com.typesafe.sbteclipse.plugin.EclipsePlugin.EclipseKeys._...
weltermann17/pleasant-scala
project/Settings.scala
Scala
apache-2.0
2,649
package object holder { class C object O trait T type A = Int def f {} val v1: Int = 1 var v2: Int = 2 } package holder { class C1 { println(classOf[/* line: 2 */C]) println(/* line: 3 */O.getClass) println(classOf[/* line: 4 */T]) println(classOf[/* line: 5 */A]) println(/* line: 6 */f) println(/* line: ...
LPTK/intellij-scala
testdata/resolve2/scope/PackageObject.scala
Scala
apache-2.0
357
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2002-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
felixmulder/scala
src/library/scala/Product14.scala
Scala
bsd-3-clause
3,476
package com.sksamuel.elastic4s.api import com.sksamuel.elastic4s.requests import com.sksamuel.elastic4s.requests.common.DocumentRef import com.sksamuel.elastic4s.requests.explain.ExplainRequest trait ExplainApi { def explain(ref: DocumentRef): ExplainRequest = requests.explain.ExplainRequest(ref.index, re...
sksamuel/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/api/ExplainApi.scala
Scala
apache-2.0
425
package musicsvc.test import java.io.{FileInputStream, File} import java.nio.charset.StandardCharsets import musicsvc.json.Implicits._ import musicsvc.models._ import musicsvc.util.MultipartFormDataWritable import musicsvc.util.Utils._ import org.apache.commons.io.IOUtils import org.junit.runner._ import org.specs2....
hermannhueck/MusicService
Services/MusicService-Play-Scala-Slick-NoAuth/test/musicsvc/test/WebServiceSpec.scala
Scala
apache-2.0
39,465
package is.hail.io import java.io._ import java.util import java.util.UUID import is.hail.annotations.{Memory, Region} import is.hail.io.compress.LZ4 import is.hail.utils._ trait InputBuffer extends Closeable { def close(): Unit def seek(offset: Long): Unit def readByte(): Byte def read(buf: Array[Byte], ...
cseed/hail
hail/src/main/scala/is/hail/io/InputBuffers.scala
Scala
mit
13,055
import java.io.{ByteArrayInputStream, ByteArrayOutputStream, ObjectInputStream, ObjectOutputStream} import breeze.linalg.sum import breeze.stats._ import geotrellis.proj4.CRS import geotrellis.raster.io.geotiff.writer.GeoTiffWriter import geotrellis.raster.io.geotiff.{SinglebandGeoTiff, _} import geotrellis.raster.{Ce...
phenology/infrastructure
applications/ides/scala/src/romulo/scala/satellite_model_correlation_len_neg.scala
Scala
apache-2.0
24,261
package com.overviewdocs.http import scala.concurrent.{ExecutionContext,Future} /** Sends GET requests. */ trait Client { /** Send a GET request. */ def get(request: Request)(implicit ec: ExecutionContext): Future[Response] /** Send a POST request. */ def post(request: Request)(implicit ec: ExecutionContex...
overview/overview-server
worker/src/main/scala/com/overviewdocs/http/Client.scala
Scala
agpl-3.0
726
/* * Copyright 2014 JHC Systems Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
kutchar/sqlest
sqlest/src/main/scala/sqlest/util/Logging.scala
Scala
apache-2.0
695
package org.bitcoins.core.serializers.p2p.messages import org.bitcoins.core.p2p.HeadersMessage import org.bitcoins.core.protocol.CompactSizeUInt import org.bitcoins.core.protocol.blockchain.BlockHeader import org.bitcoins.core.serializers.RawBitcoinSerializer import scodec.bits.ByteVector import scala.annotation.tail...
bitcoin-s/bitcoin-s
core/src/main/scala/org/bitcoins/core/serializers/p2p/messages/RawHeadersMessageSerializer.scala
Scala
mit
2,083
/* * Copyright (c) 2021, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ package com.krux.hyperion import java.net.URI import com.krux.hyperion.common.S3Uri impor...
realstraw/hyperion
core/src/main/scala/com/krux/hyperion/activity/package.scala
Scala
bsd-3-clause
654
package org.tribbloid.ispark.msg import org.tribbloid.ispark.UUID import org.tribbloid.ispark.display.{Data, MIME} object ExecutionStatuses extends Enumeration { type ExecutionStatus = Value val ok = Value val error = Value val abort = Value } object HistAccessTypes extends Enumeration { type HistAccessTyp...
tribbloid/ISpark
core/src/main/scala/org/tribbloid/ispark/msg/Msg.scala
Scala
apache-2.0
26,882
package org.locationtech.geomesa.feature import java.util import com.vividsolutions.jts.geom.Geometry import org.geotools.feature.NameImpl import org.geotools.feature.simple.SimpleFeatureImpl import org.geotools.filter.identity.FeatureIdImpl import org.junit.runner.RunWith import org.locationtech.geomesa.utils.geotoo...
nhambletCCRI/geomesa
geomesa-feature/src/test/scala/org/locationtech/geomesa/feature/AvroSimpleFeatureTest.scala
Scala
apache-2.0
7,699
package com.sksamuel.elastic4s.requests.searches.aggs import com.sksamuel.exts.OptionImplicits._ case class GeoHashGridAggregation(name: String, field: Option[String] = None, shardSize: Option[Int] = None, size: Opti...
stringbean/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/GeoHashGridAggregation.scala
Scala
apache-2.0
1,158
/* * 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...
poplav/incubator-toree
kernel/src/test/scala/integration/InterpreterActorSpecForIntegration.scala
Scala
apache-2.0
4,549
/* * 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/deprecated/GetUsersSimulation.scala
Scala
apache-2.0
2,096
package models case class Artist(name:String, country:String) object Artist { val availableArtist =Seq(Artist("Wolfgang Amadeus Mozart", "Austria"), Artist("Ludwig van Beethoven", "Germany"), Artist("Johann Sebastian Bach", "Germany"), Artist("Frédéric François Chopin", "Poland"), Artist("Joseph Haydn", "Austria...
NOOYA/chapter02Action
app/models/Artist.scala
Scala
mit
1,068
/* * 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 ...
zohar-mizrahi/flink
flink-mesos/src/main/scala/org/apache/flink/mesos/runtime/clusterframework/MesosJobManager.scala
Scala
apache-2.0
3,764
package texteditor.signalsAndEventsFromEventsOnly import javax.swing import rescala._ class Timer(delay0: Int) { val peer: swing.Timer = new swing.Timer(delay0, null) { override def fireActionPerformed(e: java.awt.event.ActionEvent): Unit = { Timer.this.isRunning() = isRunning(); fired.fire() } } def this...
volkc/REScala
Examples/Editor/src/main/scala/texteditor/signalsAndEventsFromEventsOnly/Timer.scala
Scala
apache-2.0
962
/* Copyright 2014 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-core/src/main/scala/com/twitter/scalding/source/TypedSequenceFile.scala
Scala
apache-2.0
1,751
package com.arcusys.learn.liferay.services import com.liferay.portal.service.ServiceContext import com.liferay.portlet.polls.service.PollsChoiceLocalServiceUtil object PollsChoiceLocalServiceHelper { def addChoice(userId: Long, questionId: Long, name: String, description: String, serviceContext: Ser...
ViLPy/Valamis
learn-liferay620-services/src/main/scala/com/arcusys/learn/liferay/services/PollsChoiceLocalServiceHelper.scala
Scala
lgpl-3.0
434
/* * Part of NDLA image-api * Copyright (C) 2019 NDLA * * See LICENSE */ package no.ndla.imageapi.repository import java.net.Socket import no.ndla.imageapi.model.domain.ImageTitle import no.ndla.imageapi.{DBMigrator, ImageApiProperties, TestData, TestEnvironment, UnitSuite} import no.ndla.scalatestsuite.Integra...
NDLANO/image-api
src/test/scala/no/ndla/imageapi/repository/ImageRepositoryTest.scala
Scala
gpl-3.0
4,863
package com.ataraxer.apps.chess.scala import org.scalatest._ abstract class UnitSpec extends FlatSpec with Matchers with OptionValues with Inside with Inspectors // vim: set ts=2 sw=2 et:
ataraxer/chess-game-scala
src/test/scala/UnitSpec.scala
Scala
mit
202
/* MET-API Copyright (C) 2014 met.no Contact information: Norwegian Meteorological Institute Box 43 Blindern 0313 OSLO NORWAY E-mail: met-api@met.no This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as publ...
metno/metapi-elements
app/services/elements/CodeTablesJsonFormat.scala
Scala
gpl-2.0
3,243
import scala.language.experimental.macros import scala.reflect.macros.whitebox object util { def lazily[T](implicit t: => T): T = t } abstract class Quux { def ping: Ping def pong: Pong } object Quux { implicit def mkQuux: Quux = macro mkImpl def mkImpl(c: whitebox.Context): c.Tree = { import c.unive...
scala/scala
test/files/pos/byname-implicits-31/Macros_1.scala
Scala
apache-2.0
967
package com.softwaremill.bootzooka.sql import com.flowy.common.utils.sql.{DatabaseConfig, SqlDatabase} import com.typesafe.config.ConfigFactory import org.h2.tools.Console object H2BrowserConsole extends App { val config = new DatabaseConfig { def rootConfig = ConfigFactory.load() } new Thread(new Runnabl...
asciiu/fomo
api/src/main/scala/com/softwaremill/bootzooka/sql/H2BrowserConsole.scala
Scala
apache-2.0
501
package com.arcusys.valamis.web.servlet.social.notification import javax.servlet.http.HttpServletRequest import com.arcusys.learn.liferay.model.Activity import com.arcusys.learn.liferay.util.{PortletName, ServiceContextFactoryHelper, UserNotificationEventLocalServiceHelper} import com.arcusys.valamis.util.serializati...
igor-borisov/valamis
valamis-portlets/src/main/scala/com/arcusys/valamis/web/servlet/social/notification/ActivityNotificationHelper.scala
Scala
gpl-3.0
1,838
/* * 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 ...
manishgupta88/incubator-carbondata
integration/spark-common/src/main/scala/org/apache/spark/sql/execution/streaming/CarbonAppendableStreamSink.scala
Scala
apache-2.0
14,933
// Wei Chen - BIRCH // 2016-11-18 package com.scalaml.algorithm import com.scalaml.general.MatrixFunc._ class BIRCH() extends Clustering { val algoname: String = "BIRCH" val version: String = "0.1" var centers = Array[(Int, Array[Double], Array[Double])]() var limit = 1.0 override def clear(): B...
Wei-1/Scala-Machine-Learning
src/main/scala/algorithm/clustering/BIRCH.scala
Scala
mit
2,353
package org.brandonhaynes.bfs import java.lang.Iterable import scala.language.reflectiveCalls import scala.collection.JavaConversions._ import org.apache.hadoop.conf.Configuration import org.apache.hadoop.io.Text import org.apache.hadoop.mapreduce._ import org.apache.hadoop.mapreduce.lib.input.{KeyValueLineRecordReade...
BrandonHaynes/timr
src/org/brandonhaynes/bfs/NaiveBFS.scala
Scala
mit
3,224
/* * 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 ...
hafizmujadid/ActiveMQReceiver
src/test/scala/org/apache/spark/streaming/activemq/test/junit.scala
Scala
apache-2.0
2,964
package cafesat.sat import org.scalatest.funsuite.AnyFunSuite class VectorSuite extends AnyFunSuite { test("init with append") { val v1 = new Vector[Int](50) assert(v1.size === 0) v1.append(3) assert(v1.size === 1) assert(v1(0) === 3) v1.append(5) assert(v1.size === 2) assert(v1(0) ...
regb/cafesat
src/test/scala/cafesat/sat/VectorSuite.scala
Scala
mit
2,905
package com.typesafe.sbt package packager import java.io.File import sbt.Process object chmod { def apply(file: File, perms: String): Unit = Process(Seq("chmod", perms, file.getAbsolutePath)).! match { case 0 => () case n => sys.error("Error running chmod " + perms + " " + file) } def safe(fil...
yanns/sbt-native-packager
src/main/scala/com/typesafe/sbt/packager/FileUtil.scala
Scala
bsd-2-clause
435
package japgolly.univeq import scala.compiletime.* private object UnivEqOpsInlineHacks: inline def eq_Byte (a: Byte , b: Byte ): Boolean = a == b inline def eq_Char (a: Char , b: Char ): Boolean = a == b inline def eq_Short (a: Short , b: Short ): Boolean = a == b inline def eq_Int (a: Int ...
japgolly/univeq
univeq/shared/src/main/scala-3/japgolly/univeq/ops.scala
Scala
apache-2.0
3,236
package org.jetbrains.plugins.scala package lang.completeStatement import org.jetbrains.plugins.scala.codeInsight.ScalaCodeInsightTestBase /** * @author Ksenia.Sautina * @since 2/25/13 */ class ScalaCompleteWhileConditionTest extends ScalaCodeInsightTestBase { def testWhileCondition() { val fileText = ...
triggerNZ/intellij-scala
test/org/jetbrains/plugins/scala/lang/completeStatement/ScalaCompleteWhileConditionTest.scala
Scala
apache-2.0
4,168
package net.scalytica.symbiotic.models.dman import net.scalytica.symbiotic.core.http.{Failed, SymbioticRequest} import net.scalytica.symbiotic.models.FileId import net.scalytica.symbiotic.routing.SymbioticRouter import play.api.libs.json.{Json, Reads} import scala.concurrent.Future import scala.scalajs.concurrent.JSE...
kpmeen/symbiotic
examples/symbiotic-client/src/main/scala/net/scalytica/symbiotic/models/dman/FolderTree.scala
Scala
apache-2.0
2,658
package scalaz.stream.mongodb.filesystem import org.specs2.{ScalaCheck, Specification} import org.specs2.specification.Snippets import scalaz.stream.mongodb.collectionSyntax._ import scalaz.stream.mongodb.MongoRuntimeSpecification import org.specs2.matcher.MatchResult import org.scalacheck.{Gen, Arbitrary} import com...
Spinoco/scalaz-stream-mongodb
core/src/test/scala/scalaz/stream/mongodb/filesystem/FSListSpec.scala
Scala
mit
5,437
package gui.dialog import java.awt.Color import java.awt.Container import java.awt.event.ActionListener import java.awt.event.MouseAdapter import java.awt.event.MouseEvent import scala.collection.mutable.ArrayBuffer import scala.collection.mutable.MutableList import scala.xml.XML import javax.swing.BoxLayout import ...
AlexGonRo/Instance-Selection-Algorithms-Spark
Algoritmos_de_selección_de_instancias/src/main/scala/gui/dialog/ChooseElementDialog.scala
Scala
gpl-3.0
6,152
package com.eevolution.context.dictionary.infrastructure.service.impl import java.util.UUID import com.eevolution.context.dictionary.infrastructure.repository.ElementTrlRepository import com.eevolution.context.dictionary.infrastructure.service.ElementTrlService import com.lightbend.lagom.scaladsl.api.ServiceCall impo...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/service/impl/ElementTrlServiceImpl.scala
Scala
gpl-3.0
2,046
package is.hail.asm4s import is.hail.HailSuite import is.hail.annotations.Region import is.hail.expr.ir.{EmitCodeBuilder, EmitFunctionBuilder} import is.hail.types.physical.stypes.SValue import is.hail.types.physical.stypes.concrete._ import is.hail.types.physical.stypes.primitives.{SFloat32Value, SFloat64Value, SInt3...
hail-is/hail
hail/src/test/scala/is/hail/asm4s/CodeSuite.scala
Scala
mit
4,008
package simpleEMS.parser import scala.language.postfixOps import scala.util.parsing.combinator.JavaTokenParsers import scala.util.parsing.combinator.PackratParsers import simpleEMS.ir._ object SimpleEMSParser extends JavaTokenParsers with PackratParsers { // parsing interface def apply(s: String): ParseResul...
mjeongDSL/SimpleEMS
src/SimpleEMS/parser/Parser.scala
Scala
gpl-3.0
2,046
// pattern matcher crashes here trying to synthesize an unneeded outer test. // no-symbol does not have an owner // at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:49) // at scala.tools.nsc.Global.abort(Global.scala:253) // at scala.reflect.internal.Symbols$NoSymbol.owner(Symbols.scala:3248) // at sca...
scala/scala
test/files/neg/t7214neg.scala
Scala
apache-2.0
1,748
package breeze.linalg.operators import breeze.linalg._ import breeze.generic._ import breeze.linalg.support._ import breeze.math.{Ring, Field, Semiring} import breeze.util.ArrayUtil import com.github.fommil.netlib.BLAS.{getInstance => blas} import breeze.macros.expand import breeze.math.PowImplicits._ import breeze.s...
crealytics/breeze
math/src/main/scala/breeze/linalg/operators/DenseVectorOps.scala
Scala
apache-2.0
29,997
package net.tomasherman.specus.server.api.net import org.specs2.mutable.Specification import net.tomasherman.specus.server.api.net.DecodingUtils._ import net.tomasherman.specus.server.api.net.EncodingUtils._ import org.jboss.netty.buffer.ChannelBuffers import org.specs2.specification.Scope import net.tomasherman.specu...
tomasherman/specus
server_api/src/test/scala/net/tomasherman/specus/server/api/net/MagicCodecSpec.scala
Scala
gpl-3.0
2,611
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/amls-frontend
test/views/responsiblepeople/legal_nameSpec.scala
Scala
apache-2.0
2,082
package com.codacy.client.bitbucket.v1 import java.time.LocalDateTime import play.api.libs.functional.syntax._ import play.api.libs.json._ case class CommitComment(id: Long, username: String, commit: String, display_name: String, content: String, created_on: LocalDateTime) object CommitComment { val dateFormat = ...
rtfpessoa/bitbucket-scala-client
src/main/scala/com/codacy/client/bitbucket/v1/CommitComment.scala
Scala
apache-2.0
767
/* * 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 ...
cloudera/spark
mllib/src/main/scala/org/apache/spark/mllib/recommendation/ALS.scala
Scala
apache-2.0
26,437
/*§ =========================================================================== EighthBridge =========================================================================== Copyright (C) 2016 Gianluca Costa =========================================================================== Licensed under the Apache Lic...
giancosta86/EighthBridge
src/main/scala/info/gianlucacosta/eighthbridge/graphs/point2point/visual/DefaultVisualLink.scala
Scala
apache-2.0
1,837
package com.example.http4s package ssl import cats.effect._ import fs2.StreamApp.ExitCode import fs2._ import java.nio.file.Paths import org.http4s.server.SSLKeyStoreSupport.StoreInfo import org.http4s.server.middleware.HSTS import org.http4s.server.{SSLKeyStoreSupport, ServerBuilder} abstract class SslExample[F[_]: ...
reactormonk/http4s
examples/src/main/scala/com/example/http4s/ssl/SslExample.scala
Scala
apache-2.0
918
package lila.pref import reactivemongo.api.bson._ import lila.db.BSON import lila.db.dsl._ private object PrefHandlers { implicit val prefBSONHandler = new BSON[Pref] { def reads(r: BSON.Reader): Pref = Pref( _id = r str "_id", bg = r.getD("bg", Pref.default.bg), bgImg = r.strO(...
luanlv/lila
modules/pref/src/main/PrefHandlers.scala
Scala
mit
4,465
package cn.gridx.scala.lang.traits.basics /** * Created by tao on 12/30/15. */ trait Flying { def fly() = println("I'm flying") }
TaoXiao/Scala
lang/src/main/scala/cn/gridx/scala/lang/traits/basics/Flying.scala
Scala
apache-2.0
137
/* * Copyright (c) 2016 JLCM * * 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, copy, modify, merge, publish, distr...
beikern/quilltests
src/main/scala/de/beikern/quilltests/package.scala
Scala
mit
1,414
package me.jeffmay.neo4j.client.cypher import scala.annotation.implicitNotFound /** * A serializer for converting any given type into either a specific subclass of [[CypherValue]], * or any parent of [[CypherValue]] (given access to all subclasses through normal variance rules). */ @implicitNotFound( "Cannot ...
jeffmay/neo4j-scala-client
core/src/main/scala/me/jeffmay/neo4j/client/cypher/CypherWrites.scala
Scala
apache-2.0
5,135
package poly.algebra import poly.algebra.factory._ /** * Represents a magma, which is a set endowed with a binary operator. * No laws is specified with regards to the operator (except closure, * which is satisfied by the type system). * * @author Tongfei Chen * @since 0.4.0 */ trait Magma[X] { /** The binar...
ctongfei/poly-algebra
src/main/scala/poly/algebra/Magma.scala
Scala
mit
533