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 |
|---|---|---|---|---|---|
package com.goibibo.sqlshift.services
import com.whisk.docker.{DockerContainer, DockerKit, DockerReadyChecker}
/**
* Project: sqlshift
* Author: shivamsharma
* Date: 5/8/18.
*/
trait DockerZookeeperService extends DockerKit {
val ZK_PORT: Int = 2181
lazy val zkContainer: DockerContainer = DockerContai... | goibibo/SqlShift | src/test/scala/com/goibibo/sqlshift/services/DockerZookeeperService.scala | Scala | mit | 607 |
object Test extends App {
class Foo
class Bar extends Foo
def overload(implicit foo: Foo): Unit = {}
def overload(implicit bar: Bar): Unit = {}
overload(new Bar)
}
| som-snytt/dotty | tests/pos/3190.scala | Scala | apache-2.0 | 176 |
package com.sksamuel.scapegoat.inspections
import com.sksamuel.scapegoat.{Levels, Inspection, Reporter}
import scala.reflect.runtime._
/** @author Stephen Samuel */
class JavaConversionsUse extends Inspection {
import universe._
override def traverser(reporter: Reporter) = new Traverser {
override def trav... | RichardBradley/scapegoat | src/main/scala/com/sksamuel/scapegoat/inspections/JavaConversionsUse.scala | Scala | apache-2.0 | 600 |
/*
* 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/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/TableIdentifierParserSuite.scala | Scala | apache-2.0 | 13,700 |
/*
* Copyright (c) 2011-2012 by Alexander Grünewald
*
* This file is part of gruenewa-commons, a collection of generally
* useful utility functions.
*
* gruenewa-commons 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 Sof... | gruenewa/gruenewa-misc | gruenewa-commons/src/main/scala/Prelude.scala | Scala | gpl-3.0 | 2,233 |
/* __ *\\
** ________ ___ / / ___ __ ____ Scala.js sbt plugin **
** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ **
** /____/\\___/... | jmnarloch/scala-js | sbt-plugin/src/main/scala/scala/scalajs/sbtplugin/cross/CrossClasspathDependency.scala | Scala | bsd-3-clause | 1,134 |
package calc
object Calc9 extends App {
val stream = Stream.from(1).flatMap { _.toString }
println(stream.take(28383).last)
}
| ebowman/calc | src/main/scala/calc/Calc9.scala | Scala | unlicense | 133 |
package epic.parser
package projections
/*
Copyright 2012 David Hall
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 ... | maxim-rabinovich/epic | src/main/scala/epic/parser/projections/LabeledSpanProjector.scala | Scala | apache-2.0 | 4,026 |
package reswing.reshapes.ui.panels
import scala.swing.BoxPanel
import scala.swing.Component
import scala.swing.Orientation
import scala.swing.ScrollPane
import rescala.default._
import reswing.reshapes.ReShapes
import reswing.reshapes.drawing.Command
import reswing.reshapes.util.ReactiveUtil.UnionEvent
import reswing... | guidosalva/REScala | Code/Examples/examples/src/main/scala/reswing/reshapes/ui/panels/CommandPanel.scala | Scala | apache-2.0 | 1,259 |
/*
* @author Philip Stutz
* @author Thomas Keller
*
* Copyright 2011 University of Zurich
*
* 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/lic... | gmazlami/dcop-maxsum | src/test/scala/com/signalcollect/features/ComputationTerminationSpec.scala | Scala | apache-2.0 | 6,351 |
import org.scalatest.{FunSuite, Matchers}
/**
* Created by inieto on 27/04/15.
*/
class _14_PartiallyAppliedFunctions extends FunSuite with Matchers {
test("A partially applied function is a function that you do not apply any or all the arguments, creating another function."
+ "This partially applied func... | inieto/scala-47deg | ScalaExercises/src/test/scala-2.11/_14_PartiallyAppliedFunctions.scala | Scala | mit | 728 |
package teststate.core
import teststate.core.CoreExports._
import teststate.core.CoreExports2._
import teststate.data.Or
import teststate.typeclass.{ExecutionModel, ~~>}
case class Transformer[F [_], R , O , S , E ,
F2[_], R2, O2, S2, E2]
(actions : Actions[F, R, O, S, E] => Actions[F2, R... | japgolly/test-state | core/shared/src/main/scala/teststate/core/Transformer.scala | Scala | apache-2.0 | 6,838 |
/*
* Copyright 2014-2021 Netflix, 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... | brharrington/atlas | atlas-chart/src/main/scala/com/netflix/atlas/chart/graphics/ChartSettings.scala | Scala | apache-2.0 | 3,597 |
package com.scalaAsm.x86
package Instructions
package General
// Description: Set Byte on Condition - below/not above or equal/carry (CF=1)
// Category: general/datamov
trait SETNAE extends InstructionDefinition {
val mnemonic = "SETNAE"
}
object SETNAE extends OneOperand[SETNAE] with SETNAEImpl
trait SETNAEImpl ... | bdwashbu/scala-x86-inst | src/main/scala/com/scalaAsm/x86/Instructions/General/SETNAE.scala | Scala | apache-2.0 | 458 |
package com.searchlight.khronus.store
import com.searchlight.khronus.model.{ Metric, MetricMeasurement, _ }
import com.searchlight.khronus.util.{ Measurable, Settings, ConcurrencySupport }
import com.searchlight.khronus.util.log.Logging
import org.HdrHistogram.Histogram
import scala.collection.mutable
import scala.co... | despegar/khronus | khronus-core/src/main/scala/com/searchlight/khronus/store/MetricMeasurementStore.scala | Scala | apache-2.0 | 5,975 |
package org.jetbrains.plugins.scala.testingSupport.scalatest.scala2_11.scalatest3_0_1
import org.jetbrains.plugins.scala.testingSupport.scalatest.staticStringTest._
class Scalatest2_11_3_0_1_StaticStringTest extends Scalatest2_11_3_0_1_Base
with FeatureSpecStaticStringTest
with FlatSpecStaticStringTest
with Fre... | JetBrains/intellij-scala | scala/scala-impl/test/org/jetbrains/plugins/scala/testingSupport/scalatest/scala2_11/scalatest3_0_1/Scalatest2_11_3_0_1_StaticStringTest.scala | Scala | apache-2.0 | 500 |
package com.softwaremill.akka.stream.throttle
import com.softwaremill.akka.stream.throttle.IntervalBasedThrottlerSettings._
import org.scalatest.{FlatSpec, Matchers}
import scala.concurrent.duration._
class IntervalBasedThrottlerSettingsSpec extends FlatSpec with Matchers {
it should "return correct minimum inter... | mkubala/akka-stream-throttle | src/test/scala/com/softwaremill/akka/stream/throttle/IntervalBasedThrottlerSettingsSpec.scala | Scala | gpl-2.0 | 897 |
/*
---------------------------------------------------------------------------
This software is released under a BSD license, adapted from
http://opensource.org/licenses/bsd-license.php
Copyright (c) 2010 Brian M. Clapper. All rights reserved.
Redistribution and use in source and binary forms, with or witho... | bmc/argot | src/test/scala/org/clapper/argot/ArgotParser/flag.scala | Scala | bsd-3-clause | 4,466 |
package cats.derived
import cats.Show
import shapeless._
import shapeless.labelled._
trait ShowPretty[A] extends Show[A] {
def showLines(a: A): List[String]
def show(a: A): String = showLines(a).mkString("\n")
}
object ShowPretty {
implicit def fromShow[A](implicit s: Show[A]): ShowPretty[A] =
new ShowPret... | milessabin/kittens | core/src/main/scala/cats/derived/showPretty.scala | Scala | apache-2.0 | 2,926 |
package es.weso.wiFetcher.entities
import es.weso.wiFetcher.entities.IndicatorType._
import es.weso.wiFetcher.entities.IndicatorHighLow._
import java.util.Date
import es.weso.wiFetcher.entities.traits.Component
import scala.collection.mutable.HashMap
import scala.collection.mutable.ListBuffer
case class Indicator(
... | weso/wiFetcher | app/es/weso/wiFetcher/entities/Indicator.scala | Scala | apache-2.0 | 1,033 |
package com.gjos.scala.swoc.protocol
object Move {
FastMove.init()
def apply(moveType: MoveType, from: Location, to: Location): Move =
if (moveType == MoveType.Pass) 0 else FastMove.encode(moveType)(from)(to)
def moveType(m: Move): MoveType = FastMove.moveType(m)
def from(m: Move): Location = FastMove.fr... | Oduig/swoc2014 | Greedy/src/main/scala/com/gjos/scala/swoc/protocol/Move.scala | Scala | apache-2.0 | 583 |
package de.htwg.zeta.server.model.modelValidator.validator.rules.nullChecks
import de.htwg.zeta.common.models.project.instance.GraphicalDslInstance
import de.htwg.zeta.server.model.modelValidator.validator.rules.ModelRule
/**
* This file was created by Tobias Droth as part of his master thesis at HTWG Konstanz (03/2... | Zeta-Project/zeta | api/server/app/de/htwg/zeta/server/model/modelValidator/validator/rules/nullChecks/NodeAttributesNoNullValues.scala | Scala | bsd-2-clause | 752 |
/*
* 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/test/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/AC114Spec.scala | Scala | apache-2.0 | 1,249 |
/*
* 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... | zhangxiaoli73/BigDL | spark/dl/src/test/scala/com/intel/analytics/bigdl/integration/torch/SpatialDivisiveNormalizationSpec.scala | Scala | apache-2.0 | 5,854 |
package defend.shard
import akka.actor.{ ActorLogging, ActorRef, Props }
import akka.persistence._
import defend.model.DefenceTower
import defend.shard.MessageLostTracker.LastMessageId
import defend.ui.StatusKeeper
import pl.project13.scala.rainbow._
class MessageLostTracker(tower: DefenceTower, statusKeeper: ActorRe... | otrebski/reactive-missile-defend | src/main/scala/defend/shard/MessageLostTracker.scala | Scala | apache-2.0 | 2,239 |
package com.twitter.finagle.mux.transport
import com.twitter.finagle.{Path, tracing, Dtab, Dentry}
import com.twitter.io.Charsets
import com.twitter.util.Time
import com.twitter.util.TimeConversions.intToTimeableNumber
import org.jboss.netty.buffer.ChannelBuffers
import org.junit.runner.RunWith
import org.scalatest.Fu... | lukiano/finagle | finagle-mux/src/test/scala/com/twitter/finagle/mux/transport/MessageTest.scala | Scala | apache-2.0 | 5,366 |
/*
* 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 ... | datamountaineer/stream-reactor | kafka-connect-elastic6/src/main/scala/com/datamountaineer/streamreactor/connect/elastic6/indexname/CustomIndexName.scala | Scala | apache-2.0 | 2,484 |
package ruby.models
import com.bryzek.apidoc.generator.v0.models.InvocationForm
import org.scalatest.{ShouldMatchers, FunSpec}
class ExampleUnionTypesSpec extends FunSpec with ShouldMatchers {
private lazy val service = models.TestHelper.parseFile(s"/examples/apidoc-example-union-types.json")
it("generates expe... | Seanstoppable/apidoc-generator | ruby-generator/src/test/scala/models/ExampleUnionTypesSpec.scala | Scala | mit | 681 |
/*
* The Bluejelly project, Copyright 2012.
*
* This source code is distributed under the terms of
* the BSD license, see the LICENSE file for details.
*/
package bluejelly.asm
import scala.annotation.tailrec
import scala.language.postfixOps
import scala.util.control.Exception.catching
import scala.util.parsing... | ppedemon/Bluejelly | bluejelly-asm/src/main/scala/bluejelly/asm/Parser.scala | Scala | bsd-3-clause | 6,562 |
package time
import text.StringOption
/**
* @author K.Sakamoto
* Created on 15/10/19
*/
trait TimeExtractor {
def extract(text: StringOption): Seq[TimeTmp]
def extractUnionTime(text: StringOption): TimeTmp = {
val timeRanges: Seq[TimeTmp] = extract(text)
TimeMerger.union(timeRanges)
}
def... | ktr-skmt/FelisCatusZero | src/main/scala/time/TimeExtractor.scala | Scala | apache-2.0 | 467 |
package com.wavesplatform
import com.wavesplatform.account.{Address, AddressOrAlias, KeyPair}
import com.wavesplatform.block.{Block, MicroBlock}
import com.wavesplatform.common.state.ByteStr
import com.wavesplatform.common.utils._
import com.wavesplatform.history.DefaultBaseTarget
import com.wavesplatform.lang.script.... | wavesplatform/Waves | node/src/test/scala/com/wavesplatform/BlocksTransactionsHelpers.scala | Scala | mit | 6,508 |
/***
* 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... | rackerlabs/api-checker | core/src/test/scala/com/rackspace/com/papi/components/checker/GivenAWadlWithRolesAtResourceLevel.scala | Scala | apache-2.0 | 3,980 |
package fi.tp.experimental.pokerhands
import fi.tp.experimental.pokerhands.onepass.RecursiveOnePassScalaPokerHandComparator
import fi.tp.experimental.pokerhands.javainvokers.{ArrayOnePassJavaPokerHandComparatorInvoker, ObjectOrientedMultiPassJavaPokerHandComparatorInvoker}
import fi.tp.experimental.pokerhands.multipas... | taitopilvipete/experimental | src/test/scala/fi/tp/experimental/pokerhands/InputTextFilePokerHandComparatorTest.scala | Scala | apache-2.0 | 2,548 |
import stainless.annotation._
object Issue1167 {
@opaque @inlineOnce def f(x: Int): Int = 0
def test = assert(f(10) == f(10))
}
| epfl-lara/stainless | frontends/benchmarks/verification/valid/MicroTests/Issue1167.scala | Scala | apache-2.0 | 133 |
package BIDMach.models
import BIDMat.{Mat,SBMat,CMat,DMat,FMat,IMat,HMat,GMat,GIMat,GSMat,SMat,SDMat}
import BIDMat.MatFunctions._
import BIDMat.SciFunctions._
import BIDMach.datasources._
import BIDMach.updaters._
import BIDMach.mixins._
import BIDMach._
/**
* Basic DNN class. Learns a supervised map fro... | bikash/BIDMach | src/main/scala/BIDMach/models/DNN.scala | Scala | bsd-3-clause | 8,304 |
package demo
package routes
import demo.components.{ReactPopoverInfo, ReactPopoverDemo}
import demo.pages.ReactPopoverPage
import japgolly.scalajs.react.extra.router.RouterConfigDsl
object ReactPopoverRouteModule {
case object Info extends LeftRoute("Info", "info", () => ReactPopoverInfo())
case object Demo ext... | elacin/scalajs-react-components | demo/src/main/scala/demo/routes/ReactPopoverRouteModule.scala | Scala | apache-2.0 | 620 |
import twitter4j._
import scala.collection.mutable.HashMap
import scala.collection.JavaConversions._
import scala.io._
import scalax.chart.api._
//Tega razreda ni potrebno spreminjati, samo dodajte svoje ključe iz Twitterja
class TweetStreamer(manipulator: TweetManipulator) {
val config = new twitter4j.conf.Configur... | Meemaw/scalaProgramming | week9/src/main/scala/Main.scala | Scala | mit | 6,914 |
package com.minalien.mffs.proxy
import net.minecraftforge.common.DimensionManager
/**
* Functionality common to both Server & Client.
*/
class CommonProxy {
def registerRenderers() {}
def isServer = !DimensionManager.getWorld(0).isRemote
}
| Vexatos/MFFS | src/main/scala/com/minalien/mffs/proxy/CommonProxy.scala | Scala | gpl-3.0 | 248 |
/*
* 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/pensions-lifetime-allowance-frontend | test/views/pages/amends/AmendIP14PensionsTakenBeforeViewSpec.scala | Scala | apache-2.0 | 4,637 |
package mongodbapi
import org.specs2.matcher.Matcher
import org.specs2.mutable.Specification
import reactivemongo.bson.{BSONArray, BSONValue, BSONDocument}
trait BSONMatchers {
self: Specification =>
def toList(doc: BSONDocument): List[(String, BSONValue)] = {
def toList(bson: BSONValue, prefix: String): Lis... | kamilafsar/mongodb-api | src/test/scala/mongodbapi/BSONMatchers.scala | Scala | mit | 1,354 |
import scala.reflect.io.Streamable
import scala.tools.asm.{ClassWriter, ClassReader}
import scala.tools.asm.tree.ClassNode
import scala.tools.partest._
import scala.tools.partest.BytecodeTest.modifyClassFile
import java.io.{FileOutputStream, FileInputStream, File}
object Test extends DirectTest {
def code = ???
d... | martijnhoekstra/scala | test/files/run/t2464/Test.scala | Scala | apache-2.0 | 1,195 |
package gapt.proofs
/**
* Class for convenient construction of proofs.
* Allows you to write proofs post-order style (à la Bussproofs). Example:
* <pre>
* (ProofBuilder
* c LogicalAxiom(A)
* c LogicalAxiom(B)
* u (WeakeningLeftRule(_, C))
* b (AndRightRule(_,_, And(A, B))
* qed)
* </pre>
* The constructor i... | gapt/gapt | core/src/main/scala/gapt/proofs/ProofBuilder.scala | Scala | gpl-3.0 | 2,832 |
/* __ *\\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2006-2016, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ | http://www.scala-lang.org/ **
** /____/\\___/_/... | felixmulder/scala | src/library/scala/collection/convert/AsJavaConverters.scala | Scala | bsd-3-clause | 11,214 |
/*
* 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 ... | ravipesala/incubator-carbondata | integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/detailquery/HighCardinalityDataTypesTestCase.scala | Scala | apache-2.0 | 8,736 |
package us.blelbinha.scalaredisexample
object Main {
def main(args: Array[String]) {
}
}
| ExNexu/scala-redis-example | src/main/scala/us/blelbinha/scalaredisexample/Main.scala | Scala | bsd-3-clause | 95 |
package com.jeffrey.ocr
import scala.collection.mutable
trait Digit {
val marks: Set[DigitMark]
val number: Option[Int]
val isLegal = true
def alternatives = Digit.getAlternatives(this)
def toChar = {
number match {
case Some(n) => (48 + n).toChar
case None => '?'... | jbarrus/xtrac-dojo | src/main/scala/com/jeffrey/ocr/Digit.scala | Scala | mit | 4,170 |
package org.scalatra
import org.scalatra.test.scalatest.ScalatraFunSuite
import skinny.micro.SkinnyMicroServlet
import scala.collection.mutable.Map
trait AttributesTest {
this: ScalatraFunSuite =>
trait AttributesServlet extends SkinnyMicroServlet {
def attributesMap: Map[String, Any]
get("/attributes-... | xerial/skinny-micro | micro/src/test/scala/org/scalatra/AttributesTest.scala | Scala | bsd-2-clause | 845 |
package com.adamek.example.configuration
import org.springframework.context.annotation.Configuration
import org.springframework.web.servlet.config.annotation.{EnableWebMvc, ResourceHandlerRegistry, WebMvcConfigurerAdapter}
@Configuration
@EnableWebMvc
class WebConfig extends WebMvcConfigurerAdapter {
/**
* This... | marekadamek/spring4-scala-websocket | src/main/scala/com/adamek/example/configuration/WebConfig.scala | Scala | mit | 574 |
/*
* 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 ... | chenc10/Spark-PAF | streaming/src/test/scala/org/apache/spark/streaming/ReceivedBlockTrackerSuite.scala | Scala | apache-2.0 | 15,902 |
package com.twitter.finatra.multiserver.Add1HttpServer
import com.twitter.adder.thriftscala.Adder
import com.twitter.finagle.http.Request
import com.twitter.finatra.http.Controller
import com.twitter.util.Future
import javax.inject.Inject
class Add1Controller @Inject()(
adder: Adder[Future])
extends Controller {
... | syamantm/finatra | inject-thrift-client-http-mapper/src/test/scala/com/twitter/finatra/multiserver/Add1HttpServer/Add1Controller.scala | Scala | apache-2.0 | 762 |
package org.jetbrains.plugins.scala
package refactoring.introduceField
import java.io.File
import com.intellij.openapi.util.io.FileUtil
import com.intellij.openapi.util.text.StringUtil
import com.intellij.openapi.vfs.{CharsetToolkit, LocalFileSystem}
import com.intellij.testFramework.UsefulTestCase
import org.jetbrai... | triplequote/intellij-scala | scala/scala-impl/test/org/jetbrains/plugins/scala/refactoring/introduceField/IntroduceFieldTestBase.scala | Scala | apache-2.0 | 4,999 |
package com.github.novamage.svalidator.validation
/**
* Contains information about errors ocurred during the validation process
*
* @param validationFailures List of failures that occurred during validation
*/
case class ValidationSummary(validationFailures: List[ValidationFailure])
extends ValidationResult[... | NovaMage/SValidator | src/main/scala/com/github/novamage/svalidator/validation/ValidationSummary.scala | Scala | mit | 604 |
def f(arr:List[Int]):Int =
{
var count: Int = 0;
arr.foreach { _ => count += 1 }
count
}
| anishacharya/SCALA | Scala_Practice/List_length.scala | Scala | mit | 118 |
/*
* 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-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/batch/sql/RankTest.scala | Scala | apache-2.0 | 5,007 |
/*
* 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 | core/src/main/scala/org/apache/spark/rpc/RpcEndpointRef.scala | Scala | apache-2.0 | 3,417 |
package target
import target.jvm._
import t_inline.{InlinePriority,MAYBE_HOT_USE,SINGLE_USE,MAYBE_COLD_USE}
object JVMConfig extends TargetConfig {
def maxInlineInstructions(priority: InlinePriority) = priority match {
// Note that this must not go about 10,000. 10,000 is treated as a
// 'never inline valu... | j-c-w/mlc | src/main/scala/target/JVMConfig.scala | Scala | gpl-3.0 | 1,275 |
package com.arcusys.learn.liferay.util
import com.liferay.portal.service.GroupLocalServiceUtil
object CourseUtilHelper {
def getLink(courseId: Long): String = {
val course = GroupLocalServiceUtil.getGroup(courseId)
if (course.getPrivateLayoutsPageCount > 0)
"/group" + course.getFriendlyURL
else... | arcusys/Valamis | learn-liferay620-services/src/main/scala/com/arcusys/learn/liferay/util/CourseUtilHelper.scala | Scala | gpl-3.0 | 615 |
/* _____ _
* | ___| __ __ _ _ __ ___ (_) __ _ _ __
* | |_ | '__/ _` | '_ ` _ \| |/ _` | '_ \
* | _|| | | (_| | | | | | | | (_| | | | |
* |_| |_| \__,_|_| |_| |_|_|\__,_|_| |_|
*
* Copyright 2014 Pellucid Analytics
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you... | codeaudit/framian | framian/src/main/scala/framian/column/EvalColumn.scala | Scala | apache-2.0 | 2,880 |
package Generator
trait Generator {
type NodeType
type Connections
def neighbors(n: NodeType): Set[NodeType]
def connect(n: NodeType, ns: Set[NodeType], c: Connections): Connections
}
| neilvallon/Beagle | src/Generator/Generator.scala | Scala | mit | 193 |
package org.jetbrains.plugins.scala.lang.parser.parsing.top.params
import org.jetbrains.plugins.scala.lang.parser.ScalaElementTypes
import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder
/**
* @author Alexander Podkhalyuzin
* Date: 08.02.2008
*/
/*
* ClassParamClauses ::= {ClassParamClause}
... | gtache/intellij-lsp | intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/parser/parsing/top/params/ClassParamClauses.scala | Scala | apache-2.0 | 993 |
import sbt._
import Keys._
object B extends Build
{
lazy val dep = Project("dep", file("dep")) settings( baseSettings : _*) settings(
organization := "org.example",
version := "1.0",
publishTo <<= baseDirectory in ThisBuild apply { base =>
Some(Resolver.file("file", base / "repo")(Resolver.ivyStylePatterns))... | jamesward/xsbt | sbt/src/sbt-test/dependency-management/ivy-settings-c/project/P.scala | Scala | bsd-3-clause | 1,039 |
//package io.youi.example.ui.hypertext
//
//import io.youi.Color
//import io.youi.hypertext.border.BorderStyle
//import io.youi.hypertext.style.Overflow
//import io.youi.hypertext.{Button, Component, Container}
//import io.youi.layout.GridLayout
//
//import scala.concurrent.Future
//
//object GridLayoutExample extends ... | outr/youi | example/js/src/main/scala/io/youi/example/ui/hypertext/GridLayoutExample.scala | Scala | mit | 2,260 |
/*
* Copyright (C) 2016 Christopher Batey and Dogan Narinc
*
* 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... | mikefero/cpp-driver | gtests/src/integration/scassandra/server/server/src/test/scala/org/scassandra/server/e2e/prepared/PreparedStatementWithCollectionsTest.scala | Scala | apache-2.0 | 2,518 |
package org.opennetworkinsight.netflow
object FlowColumnIndex extends Enumeration {
val HOUR = 4
val MINUTE = 5
val SECOND = 6
val SOURCEIP = 8
val DESTIP = 9
val SOURCEPORT = 10
val DESTPORT = 11
val IPKT = 16
val IBYT = 17
val NUMTIME = 27
val IBYTBIN = 28
val IPKTYBIN... | Open-Network-Insight/oni-ml | src/main/scala/org/opennetworkinsight/netflow/FlowColumnIndex.scala | Scala | apache-2.0 | 440 |
package pages
import org.scalatest.selenium.WebBrowser.currentUrl
import pages.vrm_assign.VrmLockedPage.url
import uk.gov.dvla.vehicles.presentation.common.helpers.webbrowser.WebBrowserDriver
final class VrmLockedPageSteps(implicit webDriver: WebBrowserDriver)
extends helpers.AcceptanceTestHelper {
def `is displ... | dvla/vrm-assign-online | acceptance-tests/src/test/scala/pages/VrmLockedPageSteps.scala | Scala | mit | 403 |
/*
* La Trobe University - Distributed Deep Learning System
* Copyright 2014 Matthias Langer (t3l@threelights.de)
*
* 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.apa... | bashimao/ltudl | blaze/src/main/scala/edu/latrobe/blaze/modules/SoftPlus.scala | Scala | apache-2.0 | 3,941 |
/*
* 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 ... | SarahMehddi/HelloWorld | repository/src/test/scala/org/apache/atlas/query/ParserTest.scala | Scala | apache-2.0 | 3,341 |
/*
* 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... | SRGOM/scalatest | scalatest-test/src/test/scala/org/scalatest/BeforeNAfterSuite.scala | Scala | apache-2.0 | 8,141 |
/*
* 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/feature/pmem/NativeByteArray.scala | Scala | apache-2.0 | 1,974 |
package models
import anorm._
import play.api.libs.json._
trait PkFormatter {
implicit object PkFormat extends Format[Pk[Long]] {
def reads(json: JsValue):JsResult[Pk[Long]] = JsSuccess(Id(json.as[Long]))
def writes(id: Pk[Long]):JsNumber = JsNumber(id.get)
}
}
| radiantgeek/spending_map | app/models/PkFormatter.scala | Scala | apache-2.0 | 276 |
import sbt._
import Keys._
import sbtassembly.Plugin._
import AssemblyKeys._
import sbtrelease.ReleasePlugin._
import com.typesafe.sbt.SbtScalariform._
import net.virtualvoid.sbt.graph.Plugin.graphSettings
import ohnosequences.sbt.SbtS3Resolver.S3Resolver
import ohnosequences.sbt.SbtS3Resolver.{ s3, s3resolver }
import... | sielaq/marathon | project/build.scala | Scala | apache-2.0 | 8,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... | lresende/incubator-toree | plugins/src/test/scala-2.12/org/apache/toree/plugins/dependencies/ClassLoaderHelper.scala | Scala | apache-2.0 | 1,193 |
/*
* Copyright 2020 Lenses.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 applicable law or agreed to i... | datamountaineer/stream-reactor | kafka-connect-aws-s3/src/test/scala/io/lenses/streamreactor/connect/aws/s3/storage/S3ByteArrayOutputStream.scala | Scala | apache-2.0 | 1,146 |
package ly.stealth.phoenix
import java.io.File
import java.util
import java.util.UUID
import com.google.protobuf.ByteString
import ly.stealth.phoenix.Util.Str
import org.apache.log4j.Logger
import org.apache.mesos.Protos._
import org.apache.mesos.{MesosSchedulerDriver, SchedulerDriver}
import scala.collection.JavaCo... | smorin/phoenix | src/main/scala/ly/stealth/phoenix/Scheduler.scala | Scala | apache-2.0 | 8,327 |
package org.automanlang.adapters.mturk.util
object XML {
def surveyAnswerFilter(n: scala.xml.Node, id: String): scala.xml.Node = {
val toRet = (n \\\\ "Answer").filter { a => // get rid of question form header
(a \\\\ "QuestionIdentifier").foldLeft(false) {
case (acc, q) => acc || q.text == id
... | dbarowy/AutoMan | libautoman/src/main/scala/org/automanlang/adapters/mturk/util/XML.scala | Scala | gpl-2.0 | 347 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 Association du Paris Java User Group.
*
* 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 limitat... | CodeursEnSeine/cfp-2015 | app/library/VCard.scala | Scala | mit | 2,283 |
package servlet
import org.eclipse.jgit.http.server.GitServlet
import org.eclipse.jgit.lib._
import org.eclipse.jgit.transport._
import org.eclipse.jgit.transport.resolver._
import org.slf4j.LoggerFactory
import javax.servlet.ServletConfig
import javax.servlet.ServletContext
import javax.servlet.http.HttpServletReque... | odz/gitbucket | src/main/scala/servlet/GitRepositoryServlet.scala | Scala | apache-2.0 | 7,556 |
/*
* 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/mkldnn/BlasWrapper.scala | Scala | apache-2.0 | 11,469 |
/**
* Copyright (C) 2010-2011 LShift 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... | 0x6e6562/diffa | kernel/src/main/scala/net/lshift/diffa/kernel/differencing/DefaultDifferencesManager.scala | Scala | apache-2.0 | 11,996 |
/**
* Digi-Lib-Test - various test helpers for Digi components
*
* Copyright (c) 2012-2013 Alexey Aksenov ezh@ezh.msk.ru
*
* 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:... | ezh/digi-lib-test | src/main/scala/org/digimead/lib/test/StorageHelper.scala | Scala | apache-2.0 | 4,957 |
package com.ctask.utils
import org.scalatest.concurrent.Conductors
import org.scalatest.{BeforeAndAfterEach, FlatSpec, Matchers}
/**
* Spec file for UniqueId
*/
class UniqueIdSpec extends FlatSpec with Matchers with Conductors with BeforeAndAfterEach {
override def afterEach(): Unit = {
super.afterEach()
... | modsrm/ctask | common/src/test/scala/com/ctask/utils/UniqueIdSpec.scala | Scala | gpl-3.0 | 1,635 |
package com.twitter.finagle.context
/**
* [[com.twitter.finagle.context.Context]]s that are managed by Finagle.
*/
object Contexts {
/**
* Local contexts have lifetimes bound by Finagle server requests.
* They are local to the process.
*/
val local: LocalContext = new LocalContext
/**
* Broadcast ... | adriancole/finagle | finagle-core/src/main/scala/com/twitter/finagle/context/Contexts.scala | Scala | apache-2.0 | 1,315 |
package uk.ac.ncl.openlab.intake24.sql.tools.food.migrations
import java.io.FileReader
import anorm.{BatchSql, NamedParameter, SqlParser, ~, _}
import au.com.bytecode.opencsv.CSVReader
import org.rogach.scallop.ScallopConf
import uk.ac.ncl.openlab.intake24.sql.tools.{DatabaseConfigurationOptions, MigrationRunner}
im... | digitalinteraction/intake24 | DatabaseTools/src/main/scala/uk/ac/ncl/openlab/intake24/sql/tools/food/migrations/FoodV14_CreateMasterNutrientsList.scala | Scala | apache-2.0 | 1,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"); yo... | flange/drift-dev | kafka/00-kafka_2.11-0.10.1.0/libs/tmp/kafka/common/InconsistentBrokerIdException.scala | Scala | apache-2.0 | 1,175 |
/*
* 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 ... | DieBauer/flink | flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/batch/ExplainTest.scala | Scala | apache-2.0 | 4,817 |
package com.twitter.finagle.util
import com.twitter.concurrent.NamedPoolThreadFactory
import com.twitter.conversions.time._
import com.twitter.finagle.stats.{ReadableStat, InMemoryStatsReceiver}
import java.util.concurrent.TimeUnit
import org.jboss.netty.util.{TimerTask, HashedWheelTimer}
import org.junit.runner.RunWi... | lucaslanger/finagle | finagle-core/src/test/scala/com/twitter/finagle/util/TimerStatsTest.scala | Scala | apache-2.0 | 2,346 |
package org.bitcoins.rpc.marshallers.wallet
import org.bitcoins.rpc.bitcoincore.wallet.WalletInfo
import org.scalatest.{FlatSpec, MustMatchers}
import spray.json._
/**
* Created by Tom on 1/6/2016.
*/
class WalletMarshallerTest extends FlatSpec with MustMatchers {
var str =
"""
|{
| "walletversion"... | bitcoin-s/bitcoin-s-rpc-client | src/test/scala/org/bitcoins/rpc/marshallers/wallet/WalletMarshallerTest.scala | Scala | mit | 1,798 |
/*
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 to in writing, software
distr... | twitter/scalding | scalding-commons/src/main/scala/com/twitter/scalding/commons/source/VersionedKeyValSource.scala | Scala | apache-2.0 | 10,102 |
/**
* Copyright (C) 2015 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... | brunobuzzi/orbeon-forms | form-runner/jvm/src/test/scala/org/orbeon/oxf/fr/EmailTest.scala | Scala | lgpl-2.1 | 4,456 |
package com.github.mdr.mash.inference
import java.{ util ⇒ ju }
import com.github.mdr.mash.classes.{ MashClass, UserDefinedMethod }
import com.github.mdr.mash.evaluator.{ SystemCommandFunction, _ }
import com.github.mdr.mash.functions._
import com.github.mdr.mash.inference.Type.UserClassInstance
import com.github.mdr... | mdr/mash | src/main/scala/com/github/mdr/mash/inference/TypeInferencer.scala | Scala | mit | 22,161 |
package safe.actor
import akka.actor.{ ActorRef, Props, Status }
import scala.collection.mutable
import com.codahale.metrics.MetricRegistry
class ResequenceActor[A](f: A => SeqMetadata, next: Seq[ActorRef], metrics: Option[MetricRegistry]) extends FeatureActor {
// Used to keep track of the last number processed... | devonbryant/safe | safe-core/src/main/scala/safe/actor/ResequenceActor.scala | Scala | epl-1.0 | 2,400 |
package org.jetbrains.sbt
package annotator
import com.intellij.lang.annotation.{AnnotationHolder, Annotator}
import com.intellij.openapi.util.text.StringUtil
import com.intellij.psi.{PsiComment, PsiElement, PsiWhiteSpace}
import org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression
import org.jetbrains.plugins.s... | double-y/translation-idea-plugin | src/org/jetbrains/sbt/annotator/SbtAnnotator.scala | Scala | apache-2.0 | 3,562 |
package pureconfig
/**
* A trait that can be implemented to customize how case classes are read from and written to a config.
*
* @tparam T the type of case class for which this hint applies
*/
trait ProductHint[T] {
/**
* Returns the key in the config object associated with a given case class field.
*
... | derekmorr/pureconfig | core/src/main/scala/pureconfig/ProductHint.scala | Scala | mpl-2.0 | 1,380 |
package com.sksamuel.elastic4s.tasks
import com.sksamuel.elastic4s.ElasticsearchClientUri
import com.sksamuel.elastic4s.http.{ElasticDsl, HttpClient}
import com.sksamuel.elastic4s.testkit.SharedElasticSugar
import org.scalatest.{FlatSpec, Matchers}
class TasksTest extends FlatSpec with SharedElasticSugar with Matcher... | FabienPennequin/elastic4s | elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/tasks/TasksTest.scala | Scala | apache-2.0 | 893 |
package com.twitter.server.view
private[server] class CompositeView(views: Seq[View], separator: String = "") {
def render: String = views.map(_.render).mkString(separator)
}
| twitter/twitter-server | server/src/main/scala/com/twitter/server/view/CompositeView.scala | Scala | apache-2.0 | 180 |
package japgolly.scalajs.react.extra
import org.scalajs.dom.raw.EventTarget
import org.scalajs.dom.Event
import scala.scalajs.js
import scalaz.effect.IO
import japgolly.scalajs.react._
object EventListener {
def apply[E <: Event] = new OfEventType[E](true)
def defaultTarget[P, S, B, N <: TopNode]: ComponentScop... | elacin/scalajs-react | extra/src/main/scala/japgolly/scalajs/react/extra/EventListener.scala | Scala | apache-2.0 | 3,758 |
package fr.laas.fape.anml.pending
import fr.laas.fape.anml.model.concrete.{VarRef, VariableUser}
import fr.laas.fape.anml.model.{AbstractParameterizedStateVariable, IntFunction, LVarRef, ParameterizedStateVariable}
import scala.collection.mutable
abstract class IntExpression extends Comparable[IntExpression] with Va... | athy/fape | anml-parser/src/main/scala/fr/laas/fape/anml/pending/IntExpression.scala | Scala | bsd-2-clause | 13,799 |
package com.imaginea.activegrid.core.models
/**
* Created by shareefn on 8/12/16.
*/
case class CommandResult(result: List[Line], currentContext: Option[CommandExecutionContext])
| eklavya/activeGrid | src/main/scala/com/imaginea/activegrid/core/models/CommandResult.scala | Scala | apache-2.0 | 184 |
package eu.stratosphere.benchmarks.systemml.cli.command.visualizationUtil
import java.io.File
import scalax.chart.api._
import scalax.chart.XYChart
/**
* Created by felix on 11.10.16.
*/
class Chart(metricId: Int, chart: XYChart, folder: String, file: String) {
val metricID = metricId
var maxRuntime: Int = -1
... | fschueler/sysml-benchmark | sysml-benchmark-peelextensions/src/main/scala/eu/stratosphere/benchmarks/systemml/cli/command/visualizationUtil/Chart.scala | Scala | apache-2.0 | 1,098 |
/*
* 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 | app/models/declaration/AddPerson.scala | Scala | apache-2.0 | 3,810 |
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.