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 |
|---|---|---|---|---|---|
/* sbt -- Simple Build Tool
* Copyright 2009 Mark Harrah
*/
package xsbt
import java.lang.{Process => JProcess, ProcessBuilder => JProcessBuilder}
import java.io.{Closeable, File, IOException}
import java.io.{BufferedReader, InputStream, InputStreamReader, OutputStream, PipedInputStream, PipedOutputStream}
import j... | harrah/process | Process.scala | Scala | bsd-3-clause | 6,926 |
/*
* Copyright 2016 The BigDL Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | intel-analytics/BigDL | scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/nn/ops/Tile.scala | Scala | apache-2.0 | 3,787 |
package controllers
import java.util.UUID
import javax.inject.Inject
import com.mohiva.play.silhouette.api.{Environment, Silhouette}
import com.mohiva.play.silhouette.impl.authenticators.JWTAuthenticator
import forms.BookClubForm
import models.services.BookClubService
import models.{BookClub, User}
import play.api.i1... | slopyjoe/book-club | app/controllers/BookClubController.scala | Scala | apache-2.0 | 1,914 |
/***********************************************************************
* Copyright (c) 2013-2019 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... | elahrvivaz/geomesa | geomesa-redis/geomesa-redis-datastore/src/main/scala/org/locationtech/geomesa/redis/data/util/RedisBackedMetadata.scala | Scala | apache-2.0 | 2,643 |
/*
* 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 ... | yew1eb/flink | flink-libraries/flink-table/src/test/scala/org/apache/flink/table/runtime/batch/sql/CalcITCase.scala | Scala | apache-2.0 | 15,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 ... | hvanhovell/spark | sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2FunctionSuite.scala | Scala | apache-2.0 | 24,186 |
package feh.tec.rubik
import feh.tec.rubik.RubikCube._
import feh.util._
/** Immutable Rubik's Cube */
case class RubikCubeInstance[T: WithSideName] (cubesPositions: Map[CubeId, CubeWithOrientation[T]],
parent: Option[RubikCubeInstance[T]],
... | fehu/int-sis--AStar | rubik/src/main/scala/feh/tec/rubik/RubikCubeInstance.scala | Scala | mit | 1,720 |
package scala.meta.internal.classpath
import java.io.File
import java.io.FilterInputStream
import java.io.InputStream
import java.nio.file.Files
import java.nio.file.Path
import java.util.zip.ZipEntry
import java.util.zip.ZipFile
import scala.collection.mutable
import scala.meta.io.AbsolutePath
/** Represents a entry... | scalameta/scalameta | semanticdb/metacp/src/main/scala/scala/meta/internal/classpath/ClasspathElement.scala | Scala | bsd-3-clause | 2,277 |
/*
* Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com>
*/
package play.it.i18n
import play.api.test.{ PlaySpecification, WithApplication }
import play.api.mvc.Controller
import play.api.i18n._
class MessagesSpec extends PlaySpecification with Controller {
sequential
implicit val lang = Lang("... | aradchykov/playframework | framework/src/play-integration-test/src/test/scala/play/it/i18n/MessagesSpec.scala | Scala | apache-2.0 | 2,017 |
import scala.quoted.*
object Macros {
inline def matches[A, B]: Unit = ${ matchesExpr[A, B] }
private def matchesExpr[A, B](using a: Type[A], b: Type[B])(using Quotes) : Expr[Unit] = {
import quotes.reflect.*
val res = quotes.asInstanceOf[scala.quoted.runtime.QuoteMatching].TypeMatch.unapply[Tuple, Tupl... | dotty-staging/dotty | tests/run-macros/quote-type-matcher/quoted_1.scala | Scala | apache-2.0 | 673 |
/*
* Copyright (c) 2013. Regents of the University of California
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | hammerlab/avocado | avocado-core/src/main/scala/org/bdgenomics/avocado/calls/reads/ReadCallUnspecified.scala | Scala | apache-2.0 | 1,781 |
package mesosphere.marathon.state
import java.io.{ ByteArrayInputStream, ObjectInputStream }
import javax.inject.Inject
import mesosphere.marathon.Protos.StorageVersion
import mesosphere.marathon.metrics.Metrics
import mesosphere.marathon.state.PathId._
import mesosphere.marathon.state.StorageVersions._
import mesosp... | MrMarvin/marathon | src/main/scala/mesosphere/marathon/state/Migration.scala | Scala | apache-2.0 | 6,290 |
package net.countercraft.movecraft.utils
import com.google.common.collect.ImmutableSet
import com.alexknvl.shipcraft.MaterialDataPredicate
import net.minecraft.server.v1_12_R1.Item
import net.minecraft.server.v1_12_R1.ItemStack
import org.bukkit.Material
import org.bukkit.material.MaterialData
import scala.annotation... | steamcraft/Movecraft-3 | movecraft-core/src/main/java/net/countercraft/movecraft/utils/BlockNames.scala | Scala | gpl-3.0 | 2,355 |
/**
* Copyright (C) 2015 DANS - Data Archiving and Networked Services ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0... | DANS-KNAW/easy-update-fs-rdb | lib/src/main/scala/nl.knaw.dans.easy.fsrdb/package.scala | Scala | apache-2.0 | 2,538 |
/* This file is part of gnieh-coroutines.
*
* See the NOTICE file distributed with this work for copyright information.
*
* 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.o... | satabin/gnieh-coroutines | library/gnieh/coroutines/package.scala | Scala | apache-2.0 | 1,828 |
/*
* Copyright 2017 Datamountaineer.
*
* 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... | CodeSmell/stream-reactor | kafka-connect-blockchain/src/test/scala/com/datamountaineer/streamreactor/connect/blockchain/GetResourcesFromDirectoryFnTest.scala | Scala | apache-2.0 | 1,051 |
package net.softler.processor
import akka.http.scaladsl.model.{HttpResponse, ResponseEntity, StatusCodes}
import akka.stream.Materializer
import net.softler.exception._
/**
* The response processor is handling all common [[StatusCodes]]
* The processor can be overridden with any logic you want
* In the future t... | Freshwood/akka-http-rest-client | client/akka-http/src/main/scala/net/softler/processor/ResponseProcessor.scala | Scala | mit | 4,570 |
/*
* Copyright 2016 The BigDL Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | intel-analytics/BigDL | scala/dllib/src/test/scala/com/intel/analytics/bigdl/dllib/keras/layers/ExpandDimSpec.scala | Scala | apache-2.0 | 2,417 |
/*
Copyright (c) 2014 by 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 agreed to in writing, so... | yuikns/iphigenia | src/main/scala/ml/dmlc/xgboost4j/scala/example/util/CustomEval.scala | Scala | mit | 1,716 |
package org.locationtech.geomesa.process
import com.google.common.hash.Hashing
import org.geotools.data.DataUtilities
import org.geotools.data.simple.SimpleFeatureCollection
import org.geotools.feature.collection.DelegateSimpleFeatureIterator
import org.geotools.feature.simple.{SimpleFeatureBuilder, SimpleFeatureTypeB... | drackaer/geomesa | geomesa-process/src/main/scala/org/locationtech/geomesa/process/HashAttributeProcess.scala | Scala | apache-2.0 | 3,191 |
object Foo {
def isGood(x: Int): Boolean = { x % 2 == 0 }
}
object ArrayUtils {
def filter(xs: Array[Int], /* something */): Array[Int] = ???
}
trait Function1[T, R] {
def apply(x: T): R
}
| agconti/scala-school | 04-functions-as-values/slides/slide022.scala | Scala | mit | 201 |
package com.coiney.akka.rabbit.actors
import akka.actor.ActorSystem
import akka.testkit.{TestProbe, ImplicitSender, TestKit}
import com.coiney.akka.rabbit.protocol._
import org.scalacheck.Gen.Choose
import org.scalatest.prop.GeneratorDrivenPropertyChecks
import org.scalatest.{BeforeAndAfterEach, BeforeAndAfterAll, Mat... | Coiney/akka-rabbit | akka-rabbit-core/src/test/scala/com/coiney/akka/rabbit/actors/RPCSystemSpec.scala | Scala | bsd-3-clause | 4,405 |
package org.jetbrains.plugins.scala.lang
package resolve
package processor
package precedence
import java.util
import com.intellij.psi.util.PsiTreeUtil.getContextOfType
import com.intellij.psi.{PsiElement, PsiPackage}
import com.intellij.util.containers.SmartHashSet
import org.jetbrains.plugins.scala.lang.psi.api.bas... | jastice/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/lang/resolve/processor/precedence/PrecedenceHelper.scala | Scala | apache-2.0 | 5,210 |
package sampleclean.eval
import sampleclean.clean.deduplication.join._
import sampleclean.clean.deduplication.blocker._
import sampleclean.clean.deduplication.matcher._
import sampleclean.clean.deduplication._
import sampleclean.api.SampleCleanContext
import org.apache.spark.sql.{SchemaRDD, Row}
import org.apache.spark... | sjyk/sampleclean-async | src/main/scala/sampleclean/eval/PersistentHomologyThresholdTuner.scala | Scala | apache-2.0 | 2,672 |
/*
* 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/registrationprogress/sectionSpec.scala | Scala | apache-2.0 | 2,831 |
package com.twitter.util.registry
import java.util.logging.Logger
/**
* Utility for library owners to register information about their libraries in
* the registry.
*/
object Library {
private[this] val log = Logger.getLogger(getClass.getName)
private[registry] val Registered = "__registered"
/**
* Regist... | BuoyantIO/twitter-util | util-registry/src/main/scala/com/twitter/util/registry/Library.scala | Scala | apache-2.0 | 2,296 |
package net.liftmodules.staticsitemap
import net.liftweb.sitemap.{Menu, Loc}
import net.liftweb.sitemap.Loc.LocParam
import net.liftweb.util.NamedPartialFunction
import net.liftweb.common.Box
import net.liftweb.sitemap.Menu.Menuable
import net.liftmodules.staticsitemap.path.PathParts
/**
* A Route without a paramete... | jeffmay/lift-staticsitemap | src/main/scala/net/liftmodules/staticsitemap/ParameterlessRoute.scala | Scala | apache-2.0 | 2,294 |
/**
* ____ __ ____ ____ ____,,___ ____ __ __ ____
* ( _ \\ /__\\ (_ )(_ _)( ___)/ __) ( _ \\( )( )( _ \\ Read
* ) / /(__)\\ / /_ _)(_ )__) \\__ \\ )___/ )(__)( ) _ < README.txt
* (_)\\_)(__)(__)(____)(____)(____)(___/ (__) (______)(____/ LICENSE.txt
*/
... | razie/diesel-hydra | diesel/src/main/scala/razie/wiki/model/Reactor.scala | Scala | apache-2.0 | 3,835 |
// Copyright (C) 2011-2012 the original author or authors.
// See the LICENCE.txt file distributed with this work for additional
// information regarding copyright ownership.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You ... | kahosato/scalastyle | src/main/scala/org/scalastyle/PrintAst.scala | Scala | apache-2.0 | 1,830 |
package com.github.j5ik2o.forseti.domain.accessToken
import java.time.ZonedDateTime
import com.github.j5ik2o.forseti.domain.Scope
import com.github.j5ik2o.forseti.domain.client.ClientId
import com.github.j5ik2o.forseti.domain.support.Entity
import com.github.j5ik2o.forseti.domain.user.UserId
import scala.concurrent.... | j5ik2o/forseti | domain/src/main/scala/com/github/j5ik2o/forseti/domain/accessToken/AccessToken.scala | Scala | mit | 1,690 |
package modules
import com.google.inject.AbstractModule
import models.daos.{ AuthTokenDAO, AuthTokenDAOImpl }
import models.services.{ AuthTokenService, AuthTokenServiceImpl }
import net.codingwell.scalaguice.ScalaModule
import play.api.ApplicationLoader
/**
* The base Guice module.
*/
class BaseModule extends Abst... | stanikol/walnuts | server/app/modules/BaseModule.scala | Scala | apache-2.0 | 544 |
package bytecode
import sai.bytecode.Method
import sai.bytecode.instruction.Instruction
object BasicBlocks {
def apply(method: Method): List[BasicBlock] = {
for (instruction <- method.instructions if isLeader(instruction))
yield new BasicBlock(method, leader = instruction)
}
private def isLeader(i: ... | oliverhaase/sai | src/sai/bytecode/BasicBlocks.scala | Scala | mit | 399 |
/*
* 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 ... | hequn8128/flink | flink-tests/src/test/scala/org/apache/flink/api/scala/manual/MassiveCaseClassSortingITCase.scala | Scala | apache-2.0 | 6,943 |
/*
* 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 ... | lzbj/openwhisk | tests/src/test/scala/whisk/core/controller/test/PackageActionsApiTests.scala | Scala | apache-2.0 | 28,997 |
package org.rovak.steamclient.steam3.handlers
import akka.actor.Actor
import rovak.steamkit.steam.IPacketMsg
import org.rovak.steamclient.steam3.SteamClient
trait MessageHandlerStack extends Actor {
def wrappedHandleMessage(message: IPacketMsg)
def wrappedReceive: Receive
def receive = {
case x => if (wra... | Rovak/scala-steamkit | steamkit/src/main/scala/org/rovak/steamclient/steam3/handlers/MessageHandlerStack.scala | Scala | mit | 482 |
package com.example.infrastructure
import org.apache.spark.streaming.{Duration => SparkDuration}
import scala.concurrent.duration.Duration
object Utils {
implicit def scalaDurationToSparkDuration(time: Duration): SparkDuration =
new SparkDuration(time.toMillis)
}
| btrofimov/spark-enterprise-example | nonblocking-bulletinboard/bl-processor/src/main/scala/com/example/infrastructure/Utils.scala | Scala | apache-2.0 | 276 |
package com.datawizards.dmg.dialects
import com.datawizards.dmg.TestModel._
import com.datawizards.dmg.{DataModelGenerator, DataModelGeneratorBaseTest}
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
@RunWith(classOf[JUnitRunner])
class GenerateJavaClassTest extends DataModelGeneratorBaseTest {... | mateuszboryn/data-model-generator | src/test/scala/com/datawizards/dmg/dialects/GenerateJavaClassTest.scala | Scala | apache-2.0 | 11,389 |
package org.bitcoins.core.protocol.blockchain
import org.bitcoins.core.crypto.DoubleSha256Digest
import org.bitcoins.core.number.UInt32
import org.bitcoins.core.protocol.NetworkElement
import org.bitcoins.core.serializers.blockchain.RawBlockHeaderSerializer
import org.bitcoins.core.util.{ BitcoinSUtil, CryptoUtil, Bit... | Christewart/bitcoin-s-core | src/main/scala/org/bitcoins/core/protocol/blockchain/BlockHeader.scala | Scala | mit | 3,939 |
class InnerCompanionTraitRename {
sealed trait Mode
object Mode {
case object DropAllCreate extends Mode
case object DropCreate extends Mode
case object Create extends Mode
case object None extends Mode
}
class Instance
( mode : /*caret*/Mode = Mode.None )
}
/*
class InnerCompanionTraitRename... | ilinum/intellij-scala | testdata/rename/class/InnerCompanionTraitRename.scala | Scala | apache-2.0 | 665 |
/*
* Copyright (C) 2007-2008 Artima, 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 requir... | peachyy/scalastu | compo-inherit/Ex8.scala | Scala | apache-2.0 | 1,109 |
package im.mange.little
import javax.servlet.http.HttpServlet
import org.eclipse.jetty.server._
import org.eclipse.jetty.servlet.{ServletContextHandler, ServletHolder}
//TODO: merge wiht LittleServer
class LittleServletServer(port: Int, autoStart: Boolean = true) {
private val server = buildServer
private val co... | alltonp/little-server | src/main/scala/im/mange/little/LittleServletServer.scala | Scala | apache-2.0 | 1,981 |
package org.scaladebugger.api.profiles.traits.requests.classes
import org.scaladebugger.api.lowlevel.JDIArgument
import org.scaladebugger.api.lowlevel.classes.ClassUnloadRequestInfo
import org.scaladebugger.api.lowlevel.events.data.JDIEventDataResult
import org.scaladebugger.api.pipelines.Pipeline
import org.scaladebug... | ensime/scala-debugger | scala-debugger-api/src/test/scala/org/scaladebugger/api/profiles/traits/requests/classes/ClassUnloadRequestSpec.scala | Scala | apache-2.0 | 5,172 |
/*
* 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 ... | yu-iskw/criteo-display-advertising-challenge-with-spark | src/test/scala/org/apache/spark/util/MLlibTestSparkContext.scala | Scala | apache-2.0 | 1,621 |
package svez.akka.stream.stages
import akka.NotUsed
import akka.stream.scaladsl.Flow
import cats.data.Ior
import scala.concurrent.{ExecutionContext, Future}
object ior {
def mapLeft[L, R, O](f: L ⇒ O): Flow[Ior[L, R], Ior[O, R], NotUsed] =
Flow[Ior[L, R]].map { _.leftMap(f) }
def mapRight[L, R, O](f: R ⇒ O... | svezfaz/akka-stream-fp | core/src/main/scala/svez/akka/stream/stages/ior.scala | Scala | apache-2.0 | 1,098 |
/*
* Copyright 2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | arkadius/micro-burn | src/main/scala/org/github/microburn/integration/support/kanban/ScrumSimulatorActor.scala | Scala | apache-2.0 | 6,366 |
package io.getquill
import com.datastax.driver.core.BoundStatement
import com.datastax.driver.core.Row
import com.typesafe.config.Config
import io.getquill.util.LoadConfig
import io.getquill.context.cassandra.CassandraSessionContext
import scala.collection.JavaConverters._
import com.datastax.driver.core.Cluster
clas... | jcranky/quill | quill-cassandra/src/main/scala/io/getquill/CassandraSyncContext.scala | Scala | apache-2.0 | 1,756 |
/***********************************************************************
* Copyright (c) 2013-2022 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and... | locationtech/geomesa | geomesa-kudu/geomesa-kudu-datastore/src/main/scala/org/locationtech/geomesa/kudu/index/Z2ColumnMapper.scala | Scala | apache-2.0 | 3,654 |
/*
* Copyright (C) 2010 Lalit Pant <[email protected]>
*
* The contents of this file are subject to the GNU General Public License
* Version 3 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.gnu.org/copyleft/gpl.html
*
*... | vnkmr7620/kojo | KojoEnv/src/net/kogics/kojo/story/LinkListener.scala | Scala | gpl-3.0 | 3,332 |
package dbtarzan.db
case class IdentifierDelimiters(start: Char, end: Char) {
def withDelimiters(identifier: String) : String = start + identifier + end
}
object IdentifierDelimitersValues {
val squareBrackets: IdentifierDelimiters = IdentifierDelimiters('[', ']')
val doubleQuotes: IdentifierDelimiters = Iden... | aferrandi/dbtarzan | src/main/scala/dbtarzan/db/QueryAttributes.scala | Scala | apache-2.0 | 663 |
package GraphX
import org.apache.spark.graphx._
/**
* Created by troy on 21/02/16.
*/
class Util {
def removeLoop(graph: Graph[Int, Int]): Graph[Int, PartitionID] = {
val convert = graph.edges.filter{s => s.srcId != s.dstId}
val raw_graph: Graph[Int, PartitionID] =
Graph.fromEdges(convert, 0)
... | MagicTroy/Clustering-Coefficient | CC-Final-Version/Util.scala | Scala | apache-2.0 | 1,883 |
package packagesAPI
import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
class GetPackages3 extends Simulation {
val httpProtocol = http
.baseURL("http://sp.int3.sonata-nfv.eu:4002")
.inferHtmlResources()
.acceptHeader("*/*")
... | sonata-nfv/son-qual | qual-stress-gtkapi/src/test/scala/3_packages_API/Recorder3.scala | Scala | apache-2.0 | 788 |
/*
* Copyright 2013 - 2020 Outworkers 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... | outworkers/phantom | phantom-dsl/src/main/scala/com/outworkers/phantom/builder/query/execution/QueryInterface.scala | Scala | apache-2.0 | 3,616 |
/*
* Copyright 2015 eleflow.com.br.
*
* 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 ... | eleflow/uberdata | iuberdata_core/src/main/scala/org/apache/spark/ml/param/shared/HasGamma.scala | Scala | apache-2.0 | 1,043 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | gioenn/xSpark | mllib/src/main/scala/org/apache/spark/mllib/evaluation/BinaryClassificationMetrics.scala | Scala | apache-2.0 | 8,548 |
package com.overviewdocs.metadata
import org.specs2.matcher.JsonMatchers
import org.specs2.mutable.Specification
import org.specs2.specification.Scope
import play.api.libs.json.{JsObject,Json}
class MetadataSchemaSpec extends Specification with JsonMatchers {
trait BaseScope extends Scope
"#toJson" should {
... | overview/overview-server | common/src/test/scala/com/overviewdocs/metadata/MetadataSchemaSpec.scala | Scala | agpl-3.0 | 4,792 |
package org.smitt.conf
import akka.actor.Props
import org.smitt.Endpoint
trait MessengerConf {
def emailMessengerProps(endpoint: Endpoint): Props
}
| sergius/smitt | src/main/scala/org/smitt/conf/MessengerConf.scala | Scala | mit | 154 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | trueyao/spark-lever | mllib/src/main/scala/org/apache/spark/mllib/tree/RandomForest.scala | Scala | apache-2.0 | 24,240 |
/*
* 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 ... | BryanCutler/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala | Scala | apache-2.0 | 38,329 |
/*
* 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/carbondata | integration/spark2/src/main/scala/org/apache/carbondata/spark/util/CarbonSparkUtil.scala | Scala | apache-2.0 | 5,911 |
package org.jetbrains.plugins.scala.lang.resolve2
/**
* Pavel.Fatin, 02.02.2010
*/
class ImportAliasTest extends ResolveTestBase {
override def folderPath: String = {
super.folderPath + "import/alias/"
}
//TODO importexclude
// def testExclude = doTest
//TODO importexclude
// def testExcludeOnRename... | triggerNZ/intellij-scala | test/org/jetbrains/plugins/scala/lang/resolve2/ImportAliasTest.scala | Scala | apache-2.0 | 381 |
/**
* Copyright 2011-2017 GatlingCorp (http://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... | MykolaB/gatling | gatling-charts/src/main/scala/io/gatling/charts/template/MenuTemplate.scala | Scala | apache-2.0 | 3,516 |
package akka.http.scaladsl.marshallers.argonaut
import argonaut._
import akka.http.scaladsl.model.{HttpCharsets, MediaTypes}
import akka.http.scaladsl.model.MediaTypes.`application/json`
import akka.http.scaladsl.marshalling.{ToEntityMarshaller, Marshaller}
import akka.http.scaladsl.unmarshalling.{FromEntityUnmarshall... | vikraman/akka-argonaut | src/main/scala/akka/http/scaladsl/marshallers/argonaut/ArgonautSupport.scala | Scala | mit | 1,814 |
package com.rasterfoundry.database
import com.rasterfoundry.common.Generators.Implicits._
import com.rasterfoundry.database.Implicits._
import com.rasterfoundry.datamodel._
import cats.implicits._
import doobie.implicits._
import org.scalacheck.Prop.forAll
import org.scalatestplus.scalacheck.Checkers
import org.scala... | raster-foundry/raster-foundry | app-backend/db/src/test/scala/com/azavea/rf/database/ToolDaoSpec.scala | Scala | apache-2.0 | 4,162 |
package users.models
import authentication.models.api.PlainTextPassword
import commons.models.Login
private[users] case class UserRegistration(login: Login, password: PlainTextPassword) {
}
| Dasiu/play-framework-test-project | app/users/models/UserRegistration.scala | Scala | mit | 192 |
/**
* Copyright (C) 2017 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 p... | brunobuzzi/orbeon-forms | xforms/js/src/main/scala/org/orbeon/xforms/ServerValueStore.scala | Scala | lgpl-2.1 | 2,437 |
package org.falcon.main
import org.falcon.streaming.Collector
import org.falcon.util.Util
/**
* Project: falcon
* Package: org.falcon.main
*
* Author: Sergio Álvarez
* Date: 09/2013
*/
object Main {
def main(args: Array[String]): Unit = {
CLIParser.parse(args, Configuration()) map { config => run(config) ... | sergio-alvarez/falcon | src/main/scala/org/falcon/main/Main.scala | Scala | apache-2.0 | 647 |
package leibniz
package internal
import leibniz.inhabitance.{Contractible, Inhabited, SingletonOf}
import scala.reflect.macros.blackbox
import scala.reflect.macros.whitebox
import scala.tools.nsc.ast.NodePrinters
import scala.reflect.internal.Types
@SuppressWarnings(Array("org.wartremover.warts.AsInstanceOf"))
seal... | alexknvl/leibniz | src/main/scala/leibniz/internal/MacroUtil.scala | Scala | mit | 9,851 |
package Tutorial
import Chisel._
import Node._
import Literal._
import scala.collection.mutable.HashMap
import scala.collection.mutable.ArrayBuffer
class KReduce extends gComponentLeaf (() => new KEngineIO_t)(() => new KEngineIO_t) (ArrayBuffer(("partialAccumulatorMem", () => new pointMemInput_t , () => new pointMe... | seyedmaysamlavasani/GorillaPP | chisel/Gorilla++/emulator/src/KReduce.scala | Scala | bsd-3-clause | 10,399 |
package com.tribbloids.spookystuff.utils
import com.tribbloids.spookystuff.utils.lifespan.LifespanContext
case class ThreadLocal[A](init: LifespanContext => A) extends java.lang.ThreadLocal[A] with (() => A) {
override def initialValue: A = {
val ctx = LifespanContext()
init(ctx)
}
def apply: A = get
... | tribbloid/spookystuff | mldsl/src/main/scala/com/tribbloids/spookystuff/utils/ThreadLocal.scala | Scala | apache-2.0 | 322 |
/**
* Copyright (C) 2013 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 program i... | wesley1001/orbeon-forms | src/main/scala/org/orbeon/oxf/fr/ResourcesPatcher.scala | Scala | lgpl-2.1 | 4,179 |
/*
* 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/ct-calculations | src/main/scala/uk/gov/hmrc/ct/ct600j/v3/SchemeReferenceNumberBox.scala | Scala | apache-2.0 | 1,416 |
package org.bm
import scala.collection.immutable.Queue
/**
* .
* @author Baptiste Morin
*/
package object logviewer {
type Token = String
type Tokens = Queue[String]
type ParsedMessage = Map[String, String]
}
| morinb/logviewer | src/main/scala/org/bm/logviewer/package.scala | Scala | apache-2.0 | 221 |
package net.fwbrasil.smirror
class SParameterSpecTestClass(
val m1: Int,
m2: String,
m3: Array[Int],
m4: Object,
m5: Any,
m6: String = "a") {
def m7(m8: Exception, m9: Any = 1, m10: Int = m1) = null
}
class SParameterSpec extends SMirrorSpec {
"Contructor parameters" should "be reflected" in
test[SP... | fwbrasil/smirror | src/test/scala/net/fwbrasil/smirror/SParameterSpec.scala | Scala | lgpl-2.1 | 1,290 |
package io.skysail.api.osgi.events.impl
import org.apache.felix.bundlerepository.RepositoryAdmin
import io.skysail.api.osgi.bundlerepository.RepositoryService
class SkysailObrCommands(repoService: RepositoryService) {
//private val app = new ObrApplication(null, null, null, repoAdmin)
def listRepos(): Unit = {
... | evandor/skysail-server | skysail.api/src/io/skysail/api/osgi/events/impl/SkysailObrCommands.scala | Scala | apache-2.0 | 926 |
/*
* 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.tools.nsc.interp... | scala/scala | src/repl-frontend/scala/tools/nsc/interpreter/shell/Completion.scala | Scala | apache-2.0 | 1,325 |
package spatial.tests
import org.scalatest.{Matchers, FlatSpec}
import spatial.dsl._
import virtualized._
object BinaryFileTest extends SpatialTest {
type Nibble = FixPt[TRUE,_4,_0]
type UByte = FixPt[FALSE,_8,_0]
type UShort = FixPt[FALSE,_16,_0]
@virtualize def main(): Unit = {
Accel { /* No hardware st... | stanford-ppl/spatial-lang | spatial/core/test/spatial/tests/FileIOTests.scala | Scala | mit | 2,462 |
import scala.language.experimental.macros
object Unused {
// seen as used before expansion
private def usedMacro(): Unit = macro UnusedMacro.usedMacroImpl
// never used
private def unusedMacro(): Unit = macro UnusedMacro.usedMacroImpl
def f() = usedMacro()
}
| martijnhoekstra/scala | test/files/neg/t10296-warn/Unused_2.scala | Scala | apache-2.0 | 273 |
package com.amichalo.mooolelo.protocol
import spray.json._
//FIXME implement it using macros
trait AnyValJsonFormat {
def fromStringJsonFormat[T](factory: String => T, extractor: T => String): RootJsonFormat[T] = new RootJsonFormat[T] {
override def read(json: JsValue): T = json match {
case JsString(va... | amichalo/mooolelo | src/main/scala/com/amichalo/mooolelo/protocol/AnyValJsonFormat.scala | Scala | apache-2.0 | 1,253 |
package japgolly.scalajs.react.hooks
// DO NOT MANUALLY EDIT
// DO NOT MANUALLY EDIT
//
// THIS IS GENERATED BY RUNNING genHooks IN SBT
//
// DO NOT MANUALLY EDIT
// DO NOT MANUALLY EDIT
import japgolly.scalajs.react.Reusable
import japgolly.scalajs.react.hooks.Hooks.UseCallbackArg
import japgolly.scalajs.react.util.... | japgolly/scalajs-react | coreGeneric/src/main/scala/japgolly/scalajs/react/hooks/UseCallbackBoilerplate.scala | Scala | apache-2.0 | 11,349 |
package com.bigchange.datamining
import java.io.File
import org.apache.spark.SparkContext
import org.apache.spark.mllib.classification.{NaiveBayes, NaiveBayesModel}
import org.apache.spark.mllib.regression.LabeledPoint
import org.apache.spark.rdd.RDD
import scala.collection.mutable
import scala.collection.mutable.Li... | bigchange/AI | src/main/scala/com/bigchange/datamining/CustomNaiveBayes.scala | Scala | apache-2.0 | 5,976 |
package com.rackspace.prefs
import com.nparry.orderly._
import com.rackspace.prefs.model.DBTables._
import com.rackspace.prefs.model.{DBTables, Preferences, PreferencesMetadata}
import org.joda.time.DateTime
import org.json4s.{JValue, JNothing, DefaultFormats, Formats}
import org.json4s.JsonDSL.WithDouble._
import org... | shintasmith/cloudfeeds-preferences-svc | app/src/main/scala/com/rackspace/prefs/PreferencesService.scala | Scala | apache-2.0 | 20,218 |
package controllers
import java.util.UUID
import javax.inject.Inject
import com.mohiva.play.silhouette.api._
import com.mohiva.play.silhouette.api.services.{ AuthInfoService, AvatarService }
import com.mohiva.play.silhouette.api.util.PasswordHasher
import com.mohiva.play.silhouette.impl.authenticators.SessionAuthenti... | hariDasu/play-silhouette-seed | app/controllers/SignUpController.scala | Scala | apache-2.0 | 2,950 |
import scala.reflect.runtime.universe._
import scala.tools.reflect.Eval
object Test extends App {
reify {
class Y {
def y = 100
}
trait Z { this: Y =>
val z = 2 * y
}
class X extends Y with Z {
def println() = Predef.println(z)
}
new X().println()
}.eval
} | felixmulder/scala | test/files/run/t5270.scala | Scala | bsd-3-clause | 310 |
import Dependencies._
import sbt.Keys._
import sbt._
object Shared {
lazy val sparkVersion = SettingKey[String]("x-spark-version")
lazy val hadoopVersion = SettingKey[String]("x-hadoop-version")
lazy val jets3tVersion = SettingKey[String]("x-jets3t-version")
lazy val jlineDef = SettingKey[(String, String)](... | antonkulaga/spark-notebook | project/Shared.scala | Scala | apache-2.0 | 2,780 |
package org.jetbrains.plugins.scala.lang.scaladoc
import com.intellij.codeInsight.editorActions.{CommentCompleteHandler, JavaLikeQuoteHandler, QuoteHandler, TypedHandler}
import com.intellij.lang.{CodeDocumentationAwareCommenter, Language, LanguageParserDefinitions}
import com.intellij.lexer.Lexer
import com.intellij.... | triggerNZ/intellij-scala | src/org/jetbrains/plugins/scala/lang/scaladoc/ScalaIsCommentComplete.scala | Scala | apache-2.0 | 3,993 |
package gitbucket.core.plugin
import java.io.{File, FilenameFilter, InputStream}
import java.net.URLClassLoader
import javax.servlet.ServletContext
import javax.servlet.http.{HttpServletRequest, HttpServletResponse}
import gitbucket.core.controller.{Context, ControllerBase}
import gitbucket.core.service.RepositorySer... | noc06140728/gitbucket | src/main/scala/gitbucket/core/plugin/PluginRegistory.scala | Scala | apache-2.0 | 6,420 |
package com.codeseq.mcdc
import akka.io.{PipelineContext, PipelinePorts, PipelineFactory}
import akka.util.ByteString
import org.scalatest.{WordSpec, Matchers}
import scala.concurrent.duration._
class protocolSpec extends WordSpec with Matchers with Implicits {
import MemcacheProtocol._
"marshalling" should { //... | derekwyatt/akka-memcached | src/test/scala/com/codeseq/mcdc/protocolSpec.scala | Scala | apache-2.0 | 8,861 |
package io.atal.butterfly
import org.scalatest._
class ButterflyTest extends FlatSpec {
"A simple integer" should "be equals with its same value" in {
assert(1 == 1)
}
}
| Matthieu-Riou/Butterfly | src/test/scala/io/atal/butterfly/ButterflyTest.scala | Scala | mit | 181 |
package com.wavesplatform.mining
import cats.data.NonEmptyList
import com.wavesplatform.block.Block
import com.wavesplatform.features.BlockchainFeatures
import com.wavesplatform.settings.MinerSettings
import com.wavesplatform.state.Blockchain
case class MiningConstraints(total: MiningConstraint, keyBlock: MiningConst... | wavesplatform/Waves | node/src/main/scala/com/wavesplatform/mining/MiningConstraints.scala | Scala | mit | 2,772 |
/*
* 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 ... | witgo/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVInferSchema.scala | Scala | apache-2.0 | 7,973 |
/*
* Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Fou... | TiarkRompf/lancet | src/main/scala/generated/scala/BooleanUnsupervisedTrainingSet.scala | Scala | agpl-3.0 | 1,084 |
/*************************************************************************
* *
* This file is part of the 20n/act project. *
* 20n/act enables DNA prediction for synthetic biology/bioengineering. *
* Copyright (C) 201... | 20n/act | reachables/src/main/scala/com/act/biointerpretation/l2expansion/SparkSubstrateExpansionDriverWorkflow.scala | Scala | gpl-3.0 | 9,297 |
package org.jetbrains.plugins.scala.lang.refactoring.rename
import java.awt.BorderLayout
import java.util
import javax.swing.{JCheckBox, JComponent, JPanel}
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.project.Project
import com.intellij.psi.{PsiElement, PsiReference}
import com.intellij.refa... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/lang/refactoring/rename/RenameScalaClassProcessor.scala | Scala | apache-2.0 | 5,988 |
package controllers
object Utility {
final val _BR_ = System.getProperty("line.separator")
def htmlEscape(s: String): String = {
val s1: String = s.replaceAll("&", "&");
val s2: String = s1.replaceAll("<", "<");
val s3: String = s2.replaceAll(">", ">");
val s4: String = s3.replaceAll('"... | windymelt/p2p2ch | app/controllers/Utility.scala | Scala | bsd-3-clause | 1,565 |
package se.lu.nateko.cp.meta.test.persistence.postgres
import se.lu.nateko.cp.meta.persistence.postgres.PostgresRdfLog
import org.eclipse.rdf4j.model.impl.SimpleValueFactory
import se.lu.nateko.cp.meta.persistence.postgres._
import se.lu.nateko.cp.meta.instanceserver.RdfUpdate
import se.lu.nateko.cp.meta.instanceserve... | ICOS-Carbon-Portal/meta | src/test/scala/se/lu/nateko/cp/meta/test/persistence/postgres/Manual.scala | Scala | gpl-3.0 | 1,568 |
package com.malaska.spark.training.timeseries
import org.apache.log4j.{Level, Logger}
import org.apache.spark.sql.SparkSession
import scala.collection.mutable
object SessionWindowing {
Logger.getLogger("org").setLevel(Level.OFF)
Logger.getLogger("akka").setLevel(Level.OFF)
def main(args:Array[String]): Unit =... | TedBear42/spark_training | src/main/scala/com/malaska/spark/training/timeseries/SessionWindowing.scala | Scala | apache-2.0 | 2,159 |
package org.randi3.simulation
import org.junit.runner.RunWith
import org.scalatest.matchers.MustMatchers
import org.scalatest.FunSpec
import org.scalatest.junit.JUnitRunner
import org.randi3.model.criterion.OrdinalCriterion
import org.randi3.simulation.distributions.OrdinalCriterionEqualDistributed
import org.randi3.si... | dschrimpf/randi3-simulation | src/test/scala/org/randi3/simulation/SimulationUtilSpec.scala | Scala | gpl-3.0 | 2,716 |
object O {
trait T
class VC(val self: Any) extends AnyVal {
def extMethod(f: F1[T, Any]) = ()
}
}
trait F1[A, B]
| loskutov/intellij-scala | testdata/scalacTests/pos/t9542.scala | Scala | apache-2.0 | 124 |
package com.blinkbox.books.schemas.ingestion.file.pending.v2
import java.net.URI
import com.blinkbox.books.messaging.{EventBody, MediaType, JsonEventBody}
import org.joda.time.DateTime
object FilePending {
case class Details(source: FileSource)
case class FileSource(
deliveredAt: DateTime,
uri: URI,
u... | blinkboxbooks/message-schemas.scala | src/main/scala/com/blinkbox/books/schemas/ingestion/file/pending/v2/Schema.scala | Scala | mit | 822 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | tejasapatil/spark | core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala | Scala | apache-2.0 | 44,957 |
Subsets and Splits
Filtered Scala Code Snippets
The query filters and retrieves a sample of code snippets that meet specific criteria, providing a basic overview of the dataset's content without revealing deeper insights.