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
// TODO(low): proper generated API sources caching: doesn't detect output directory change import sbt._ import Keys._ import Project.Initialize import Util._ import Common._ import Licensed._ import Scope.ThisScope import LaunchProguard.{ proguard, Proguard } object Sbt extends Build { override lazy val settings = ...
niktrop/sbt
project/Sbt.scala
Scala
bsd-3-clause
22,748
object ContextBound { val blubb = new Blubb/*#*/ def work[A: Foo/*#*/](f: Blubb/*#*/ => A/*#*/): A/*#*/ = f(blubb/*#*/) ensuring { implicitly[Foo/*#*/[A/*#*/]].foo/*#*/(_) >= 42 } } trait Foo[A] { def foo(a: A/*#*/): Int } class Blubb
felixmulder/scala
test/pending/presentation/context-bounds1/src/ContextBounds.scala
Scala
bsd-3-clause
249
package eva4s import scala.util.Random package object recombining { private[recombining] def sample(x: Double): Double = nextDoubleWithin(-x, 1 + x) private[recombining] def nextDoubleWithin(lower: Double, upper: Double): Double = lower + (upper - lower) * Random.nextDouble }
wookietreiber/eva4s-old
core/main/scala/recombining/package.scala
Scala
gpl-3.0
294
package org.machine.engine.graph.commands.workflows import com.typesafe.scalalogging.{LazyLogging} import scala.collection.JavaConversions._ import scala.collection.mutable.ArrayBuffer import scala.util.{Either, Left, Right} import org.machine.engine.graph.Neo4JHelper import org.machine.engine.exceptions.{InternalErro...
sholloway/graph-engine
src/main/scala/org/machine/engine/graph/commands/workflows/ElementDefintionWorkflowFunctions.scala
Scala
mit
8,538
package is.hail.types.physical.stypes.primitives import is.hail.annotations.{CodeOrdering, Region} import is.hail.asm4s.{Code, IntInfo, Settable, SettableBuilder, TypeInfo, Value} import is.hail.expr.ir.{EmitCodeBuilder, EmitMethodBuilder, SortOrder} import is.hail.types.physical.stypes.{SCode, SType} import is.hail.t...
danking/hail
hail/src/main/scala/is/hail/types/physical/stypes/primitives/SInt32.scala
Scala
mit
3,000
package pl.msitko.xml.entities /** * As documented here: https://www.w3.org/TR/xml/#NT-content */ sealed trait Node /** * According to https://www.w3.org/TR/xml/#NT-Misc it is: * Misc ::= Comment | PI | S * * For sake of simplicity xml-lens defines it as: * Misc ::= Comment | PI * * That...
note/xml-lens
ast/src/main/scala/pl/msitko/xml/entities/AST.scala
Scala
mit
4,644
/* * Copyright 2014 Michał Fijas * * 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...
mfijas/sxxp
src/main/scala/org/sxxp/xpath1/parser/Predicate.scala
Scala
apache-2.0
1,132
import play.Play.autoImport._ import sbt._, Keys._ object BuildSettings { import Dependencies._ val globalScalaVersion = "2.11.7" def buildSettings = Defaults.defaultSettings ++ Seq( organization := "org.lichess", scalaVersion := globalScalaVersion, resolvers ++= Dependencies.Resolvers.commons, ...
Happy0/lila
project/BuildSettings.scala
Scala
mit
1,629
package ohnosequences.nispero.bundles.console import unfiltered.request._ import unfiltered.response._ import unfiltered.response.ResponseString import unfiltered.Cycle import org.clapper.avsl.Logger import ohnosequences.nispero.utils.{JSON, Utils} trait Users { def auth(u: String, p: String): Boolean } case ...
ohnosequences/nispero
nispero-abstract/src/main/scala/ohnosequences/nispero/bundles/console/FrontEnd.scala
Scala
agpl-3.0
4,782
// ticket #3502 object Test { object GeneratePrimeFactorsLazy extends (Int => List[Int]) { override def apply(n:Int) = { val s = LazyList.range(2, n / 2).filter(n % _ == 0) //val s = for (i <- LazyList.range(2, n / 2); if n % i == 0) yield i s.headOption.map(x => x :: apply(n / x)).getOrElse(Li...
som-snytt/dotty
tests/run/t3502.scala
Scala
apache-2.0
511
package org.littlewings.javaee7.rest import java.time.LocalDateTime import javax.servlet.DispatcherType import io.undertow.Undertow import io.undertow.servlet.Servlets import io.undertow.servlet.api.FilterInfo import org.jboss.resteasy.plugins.server.undertow.UndertowJaxrsServer import scala.io.StdIn object Server ...
kazuhira-r/javaee7-scala-examples
resteasy-swagger/src/main/scala/org/littlewings/javaee7/rest/Server.scala
Scala
mit
948
package edu.berkeley.ce.sparkrocks import com.esotericsoftware.kryo.Kryo import com.twitter.chill.SingletonSerializer import org.apache.spark.serializer.KryoRegistrator /** * Kryo serializer registrator for all classes that are to be serialized. */ class ClassRegistrator extends KryoRegistrator { override def r...
cb-geo/spark-rocks
src/main/scala/edu/berkeley/ce/sparkrocks/ClassRegistrator.scala
Scala
gpl-2.0
1,983
/* * Copyright 2014-2022 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...
Netflix/atlas
atlas-chart/src/main/scala/com/netflix/atlas/chart/graphics/ListItem.scala
Scala
apache-2.0
1,382
package com.sksamuel.scapegoat.inspections.exception import com.sksamuel.scapegoat.{ Inspection, InspectionContext, Inspector, Levels } /** @author Stephen Samuel */ class CatchThrowable extends Inspection { def inspector(context: InspectionContext): Inspector = new Inspector(context) { override def postTyperT...
pwwpche/scalac-scapegoat-plugin
src/main/scala/com/sksamuel/scapegoat/inspections/exception/CatchThrowable.scala
Scala
apache-2.0
1,238
package com.buransky.struct.mutable import com.buransky.struct.IntStruct import org.junit.runner.RunWith import org.scalatest.FlatSpec import org.scalatest.junit.JUnitRunner import org.scalatest.prop.PropertyChecks import org.scalacheck.Gen @RunWith(classOf[JUnitRunner]) class FixedStructBufferSpec extends FlatSpec w...
RadoBuransky/scala-struct
src/test/scala/com/buransky/struct/mutable/FixedStructBufferSpec.scala
Scala
apache-2.0
2,755
package carldata.sf.compiler import carldata.sf.compiler.AST.FunctionDef /** * Executable code */ object Executable { case class ExecCode(functions: Seq[FunctionDef]) }
carldata/flow-script
src/main/scala/carldata/sf/compiler/Executable.scala
Scala
apache-2.0
178
import scalaz._, Scalaz._ object InterpretedQuery extends Query { import Database.schema, Database.FilterExpr, Operators._ class FilterInterpreter(expr: FilterExpr, schema: Map[String, Int]) { /** return true if row is filtered out by expr */ def isFiltered(row: Product): Boolean = evalFilterOn(row) ...
devth/devth.github.com
_code/compiled-query/src/main/scala/InterpretedQuery.scala
Scala
mit
1,684
/* * ModMakeLoop.scala * (FScape) * * Copyright (c) 2001-2022 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU Affero General Public License v3+ * * * For further information, please contact Hanns Holger Rutz at * contact@sciss.de */ package de.sciss.fscape.modules ...
Sciss/FScape-next
modules/src/main/scala/de/sciss/fscape/modules/ModMakeLoop.scala
Scala
agpl-3.0
7,413
package hammock import cats.{Eq, Show} import monocle.macros.Lenses @Lenses case class HttpResponse(status: Status, headers: Map[String, String], entity: Entity) object HttpResponse { implicit val show: Show[HttpResponse] = Show.fromToString implicit val eqHttpResponse = new Eq[HttpResponse] { def eqv(x: Ht...
pepegar/hammock
core/src/main/scala/hammock/HttpResponse.scala
Scala
mit
457
sealed abstract class N trait Z extends N trait S[P] extends N object Test { type T[X] <: N = X match { case Z => Z case S[p] => T[p] } }
som-snytt/dotty
tests/pos/i5650.scala
Scala
apache-2.0
161
/** * 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...
linkedin/pinot
pinot-connectors/pinot-spark-connector/src/test/scala/org/apache/pinot/connector/spark/connector/PinotUtilsTest.scala
Scala
apache-2.0
5,865
package benchmark.oneServer.oneClient import benchmark.utils.Launcher import benchmark.utils.writer.TransactionDataWriter object OneTransactionTest extends Launcher { override val streamName = "stream" override val clients = 1 private val txnCount = 1000000 private val dataSize = 1 private val rand = new sc...
bwsw/tstreams-transaction-server
src/test/scala/benchmark/oneServer/oneClient/OneTransactionTest.scala
Scala
apache-2.0
627
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
mrchristine/spark-examples-dbc
src/main/scala/org/apache/spark/examples/mllib/PCAOnRowMatrixExample.scala
Scala
apache-2.0
2,085
/* * 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 ...
netconstructor/zipkin
zipkin-scrooge/src/test/scala/com/twitter/zipkin/adapter/ThriftAdapterSpec.scala
Scala
apache-2.0
4,376
package com.physion.ovation.importer.xls /** * Created by IntelliJ IDEA. * User: barry * Date: 3/8/12 * Time: 3:45 PM * To change this template use File | Settings | File Templates. */ class XlsImporter { }
physion/ovation-xls-importer
src/com/physion/ovation/importer/xls/XlsImporter.scala
Scala
bsd-2-clause
216
def test = (x: Int) => x.toString test(34)./* */substring(1)
ilinum/intellij-scala
testdata/resolve2/bug/FunctionEmptyParamList.scala
Scala
apache-2.0
61
package unfiltered.netty import io.netty.channel.{ ChannelHandlerContext, ChannelInboundHandlerAdapter } import io.netty.channel.ChannelHandler.Sharable import io.netty.handler.ssl.{ NotSslRecordException, SslHandshakeCompletionEvent } /** Adds ssl handshaking to a channel handler's #channelConnected method * This ...
hamnis/unfiltered
netty/src/main/scala/secured.scala
Scala
mit
2,248
package pl.pholda.malpompaaligxilo.dsl import pl.pholda.malpompaaligxilo.dsl.parser.expr.FormExprParser import pl.pholda.malpompaaligxilo.form.FormInstance import pl.pholda.malpompaaligxilo.i18n.TranslationProvider import pl.pholda.malpompaaligxilo.util.DateCompanion import utest._ trait MathExprParserTest extends Te...
pholda/MalpompaAligxilo
dsl/shared/src/test/scala/pl/pholda/malpompaaligxilo/dsl/MathExprParserTest.scala
Scala
gpl-3.0
1,316
import Predef.{augmentString as _, wrapString as _, intArrayOps as _, booleanArrayOps as _, genericArrayOps as _, refArrayOps as _, wrapIntArray as _, wrapBooleanArray as _, wrapRefArray as _, genericWrapArray as _, *} import scala.reflect.ClassTag object Test { import colltest6.strawman.collections.* import Colle...
dotty-staging/dotty
tests/run/colltest6/CollectionTests_2.scala
Scala
apache-2.0
7,887
/* * 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...
qiuxin2012/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/ops/DepthwiseConv2D.scala
Scala
apache-2.0
6,191
/* * 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 ...
bdrillard/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/sql/ReplaceTableStatement.scala
Scala
apache-2.0
2,220
/* * Wire * Copyright (C) 2016 Wire Swiss GmbH * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This progr...
wireapp/wire-android-sync-engine
zmessaging/src/main/scala/com/waz/sync/client/PushNotificationsClient.scala
Scala
gpl-3.0
7,045
package io.vamp.persistence import io.vamp.common.Artifact import io.vamp.common.akka.ExecutionContextProvider import io.vamp.model.artifact._ import scala.concurrent.Future import scala.language.postfixOps trait PersistenceMultiplexer { this: ExecutionContextProvider ⇒ protected def split(artifact: Artifact, e...
dragoslav/vamp
persistence/src/main/scala/io/vamp/persistence/PersistenceMultiplexer.scala
Scala
apache-2.0
10,775
package com.github.j5ik2o.spetstore.adaptor.aggregate import java.util.{ Currency, Locale, UUID } import akka.actor.{ ActorLogging, ActorRef, ActorSystem, Props } import akka.persistence.PersistentActor import akka.persistence.fsm.PersistentFSM import akka.persistence.fsm.PersistentFSM.FSMState import com.github.j5ik...
j5ik2o/spetstore-cqrs-es-akka
write-interface/src/main/scala/com/github/j5ik2o/spetstore/adaptor/aggregate/ProcessManager.scala
Scala
mit
7,763
package org.jetbrains.plugins.scala.lang.completion import com.intellij.codeInsight.completion._ import com.intellij.codeInsight.lookup._ import com.intellij.openapi.application.ApplicationManager import com.intellij.patterns.PsiElementPattern.Capture import com.intellij.patterns.{ElementPattern, PlatformPatterns, Sta...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/completion/ScalaSmartCompletionContributor.scala
Scala
apache-2.0
33,702
package org.danielnixon.extrawarts import wartremover.Wart object ExtraWart { val EnumerationPartial: Wart = wart("EnumerationPartial") val FutureObject: Wart = wart("FutureObject") val GenMapLikePartial: Wart = wart("GenMapLikePartial") val GenTraversableLikeOps: Wart = wart("GenTraversableLikeOps") val Ge...
danielnixon/extrawarts
sbt-plugin/src/main/scala/org/danielnixon/extrawarts/ExtraWart.scala
Scala
apache-2.0
777
/* * 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/ct600/v2/retriever/CT600BoxRetriever.scala
Scala
apache-2.0
2,955
package com.varunvats.practice.array import scala.collection.{BitSet, mutable} object PatchArray { def apply(nums: Seq[Int], end: Int): List[Int] = { require(nums == nums.sorted, "The input array must be sorted") val possibleSums = getPossibleSums(nums, end) patch(possibleSums, end) } private def ...
varunvats/practice
jvm/src/main/scala/com/varunvats/practice/array/PatchArray.scala
Scala
mit
1,278
package scala.scalajs.tools.classpath import scala.scalajs.tools.io._ import scala.scalajs.tools.jsdep._ import java.io._ import java.util.zip._ import scala.collection.mutable import scala.annotation.tailrec private[classpath] class ClasspathBuilder { private val irFiles = mutable.Map.empty[String, VirtualScal...
swhgoon/scala-js
tools/src/main/scala/scala/scalajs/tools/classpath/ClasspathBuilder.scala
Scala
bsd-3-clause
7,379
package org.skrushingiv.repository import scala.concurrent.Future import scala.language.implicitConversions /** * This mixin provides support for "upsert" behavior in repositories. * * Ideal usage is that the a generic repository will incorporate this mixin, * use the `upsert` method to build storage-system-agno...
srushingiv/org.skrushingiv
src/main/scala/org/skrushingiv/repository/Upsertable.scala
Scala
mit
1,085
package tastytest import scala.runtime.ScalaRunTime object TestBox extends Suite("TestBox") { test("productString(Box(true)) is Box(true)") { assert(productString(Box(true)) === "Box(true)") } test("Box(23).a is 23") { assert(Box(23).a === 23) } def productString(p: Product) = ScalaRunTime._toStr...
scala/scala
test/tasty/run/src-2/tastytest/TestBox.scala
Scala
apache-2.0
329
/* * R2R * * Copyright 2010-2011 Freie Universität Berlin * * 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 requi...
icaromedeiros/r2r
src/main/scala/de/fuberlin/wiwiss/r2r/functions/RegExToListFunctionFactory.scala
Scala
apache-2.0
1,592
package info.armado.ausleihe.client.transport.dataobjects.entities import javax.xml.bind.annotation.{XmlAccessType, XmlAccessorType, XmlRootElement, XmlSeeAlso} @XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) @XmlSeeAlso(value = Array(classOf[GameDTO], classOf[IdentityCardDTO], classOf[EnvelopeDTO])) abstract c...
Spielekreis-Darmstadt/lending
lending-client-interfaces/src/main/scala/info/armado/ausleihe/client/transport/dataobjects/entities/LendingEntityDTO.scala
Scala
apache-2.0
363
package org.mentha.tools.archimate.model.nodes.impl import org.mentha.tools.archimate.model._ import org.mentha.tools.archimate.model.nodes._ import org.mentha.tools.archimate.model.edges._ @javax.annotation.Generated(Array("org.mentha.tools.archimate.model.generator$")) sealed trait PhysicalElement extends PhysicalL...
zhuj/mentha-web-archimate
archimate-model/src/main/scala/org/mentha/tools/archimate/model/nodes/impl/PhysicalElements.scala
Scala
mit
7,017
package epic.trees /* 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 law or agreed to in w...
maxim-rabinovich/epic
src/main/scala/epic/trees/TreeInstance.scala
Scala
apache-2.0
1,275
import java.io._ import java.util.StringTokenizer import scala.collection.mutable._ object Solution { val rd = new BufferedReader(new InputStreamReader(System.in)) val pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))) val N = rd.readLine().toInt val bd = Array.ofDim[Int](9, 9) val ...
shengmin/coding-problem
hackerrank/sudoku/Solution.scala
Scala
mit
2,303
package com.github.j5ik2o.forseti.domain.json import java.net.URI import com.github.j5ik2o.forseti.domain.json.jwk.JWK import com.github.j5ik2o.forseti.infrastructure.util.{Base64String, Base64UrlSafeString} import scalaz.{Maybe, NonEmptyList} trait CommonSEHeader extends Header { // jku protected[json] val jk...
j5ik2o/forseti
domain/src/main/scala/com/github/j5ik2o/forseti/domain/json/CommonSEHeader.scala
Scala
mit
1,019
package at.logic.gapt.examples import at.logic.gapt.expr._ import at.logic.gapt.proofs.epsilon.epsilonize import at.logic.gapt.proofs.reduction.{ HOFunctionReduction, LambdaEliminationReduction } import at.logic.gapt.provers.escargot.Escargot object epsilon extends Script { println( "Exercises for the lecture on eps...
gebner/gapt
examples/epsilon/epsilon.scala
Scala
gpl-3.0
1,153
package examples import scala.scalajs.js import org.scalajs.dom import org.scalajs.dom.KeyboardEvent import org.scalajs.dom.ext.KeyCode import scala.xml.Node import Function.tupled import mhtml._ /** mhtml port of http://elm-lang.org:1234/examples/mario */ object Mario extends Example { // MODEL sealed trait Dir...
OlivierBlanvillain/monadic-html
examples/src/main/scala/mhtml/examples/Mario.scala
Scala
mit
3,589
import sbt._ import Keys._ import play.Project._ import de.johoop.jacoco4sbt._ import JacocoPlugin._ import info.schleichardt.sbt.sonar.SbtSonarPlugin._ object ApplicationBuild extends Build { val appName = "JavaPlay215" val appVersion = "1.0-SNAPSHOT" val appDependencies = Seq( // Add your p...
schleichardt/sbt-sonar
integration-test-apps/JavaPlay215/project/Build.scala
Scala
apache-2.0
591
package presentation._6 import com.twitter.finagle.http.Method.{Get, Post} import com.twitter.finagle.http.filter.Cors import com.twitter.finagle.http.filter.Cors.HttpFilter import com.twitter.finagle.http.path.Root import com.twitter.finagle.http.{Request, Response, Status} import com.twitter.finagle.{Http, Service} ...
daviddenton/fintrospect
src/test/scala/presentation/_6/SearchApp.scala
Scala
apache-2.0
2,323
package org.jetbrains.plugins.scala.lang.typeInference import org.jetbrains.plugins.scala.base.ScalaLightCodeInsightFixtureTestAdapter class TptToDesignatorConformanceTest extends ScalaLightCodeInsightFixtureTestAdapter { def testSCL17725(): Unit = checkTextHasNoErrors( """ |trait FF[F[_]] |type Id[...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/typeInference/TptToDesignatorConformanceTest.scala
Scala
apache-2.0
914
package com.clarifi.reporting import scalaz._ import Scalaz.{mapShow => _, _} import scalaz.Show._ import scalaz.std.map.mapKeys import util.{Clique, Keyed, PartitionedSet} import ReportingUtils.simplifyPredicate import Reporting._ object Predicates { def IsNull(expr: Op): Predicate = Predicate.IsNull(expr) de...
ermine-language/ermine-legacy
src/main/scala/com/clarifi/reporting/Predicates.scala
Scala
bsd-2-clause
11,609
package models import scala.slick.driver.PostgresDriver.simple._ import play.api.Play.current case class Configuration(id: Option[Int] = None, message: String) class ConfigurationTable(tag: Tag) extends Table[Configuration](tag, "configuration") { // Auto Increment the id primary key column def id = column[Int](...
leninmedeiros/play-heroku-seed
app/models/Configuration.scala
Scala
mit
1,371
package oil.views import oil.{ClientSideConstraint, Form} import play.twirl.api.Html class ValidationUtil(val form: Form[_, _]) { private var _allInputProvidersIncludes = Set.empty[Html] private var _allInputProvidersOnReady = Set.empty[Html] private var _allConstraintsCustomValidationMethods = Set.empty[Html] ...
Lasering/Oil
project-code/app/oil/views/ValidationUtil.scala
Scala
apache-2.0
1,867
/* __ *\\ ** ________ ___ / / ___ Scala Ant Tasks ** ** / __/ __// _ | / / / _ | (c) 2005-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
felixmulder/scala
src/compiler/scala/tools/ant/ClassloadVerify.scala
Scala
bsd-3-clause
1,996
package io.vamp.container_driver.marathon import io.vamp.common.http.HttpClient import io.vamp.common.{ Config, Namespace } import scala.concurrent.duration.FiniteDuration object MarathonClientConfig { import MarathonDriverActor._ def apply()(implicit namespace: Namespace): MarathonClientConfig = { Maratho...
magneticio/vamp
dcos/src/main/scala/io/vamp/container_driver/marathon/MarathonClientConfig.scala
Scala
apache-2.0
1,662
import leon.annotation._ import leon.lang._ import leon.lang.synthesis._ object Complete { sealed abstract class List case class Cons(head: Int, tail: List) extends List case object Nil extends List def size(l: List) : Int = (l match { case Nil => 0 case Cons(_, t) => 1 + size(t) }) ensuring(res...
ericpony/scala-examples
testcases/synthesis/oopsla2013/SortedList/Sort.scala
Scala
mit
3,292
/* * Copyright 2011-2019 Asakusa Framework Team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
ueshin/asakusafw-spark
compiler/src/main/scala/com/asakusafw/spark/compiler/graph/DirectOutputPrepareInstantiator.scala
Scala
apache-2.0
3,992
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.it.test import play.api.libs.ws.WSResponse import play.api.mvc._ import play.api.test.PlaySpecification /** * Tests that [[OkHttpEndpointSupport]] works properly. */ class WSEndpointSpec extends PlaySpecification with Endpoint...
zaneli/playframework
framework/src/play-integration-test/src/test/scala/play/it/test/WSEndpointSpec.scala
Scala
apache-2.0
929
/* * Copyright 2014 IBM Corp. * * 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...
yeghishe/spark-kernel
kernel/src/test/scala/com/ibm/spark/boot/CommandLineOptionsSpec.scala
Scala
apache-2.0
10,490
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @builder scalation.util.bld.BldSorting * @version 1.3 * @date Sat Sep 26 20:25:19 EDT 2015 * @see LICENSE (MIT style license file). */ package scalation.util import scala.util.Random import scala...
NBKlepp/fda
scalation_1.3/scalation_mathstat/src/main/scala/scalation/util/SortingQ.scala
Scala
mit
31,202
package breeze.linalg import org.scalatest._ import org.scalatest.junit._ import org.junit.runner.RunWith import breeze.math._ import org.scalacheck.Arbitrary import breeze.stats.mean /** * * @author dlwh */ @RunWith(classOf[JUnitRunner]) class SparseVectorTest extends FunSuite { val TOLERANCE = 1e-4 def asse...
wstcpyt/breeze
math/src/test/scala/breeze/linalg/SparseVectorTest.scala
Scala
apache-2.0
12,706
/*********************************************************************** * 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-convert/geomesa-convert-json/src/test/scala/org/locationtech/geomesa/convert/json/JsonCompositeConverterTest.scala
Scala
apache-2.0
4,116
package au.id.cxd.math.probability.random class RChisq(val df:Double) extends RandomDeviate { val gamma = RGamma(0.5*df.toDouble, 0.5) /** * random draw from a distribution * * @return */ override def draw(): Double = gamma.draw() } object RChisq { def apply(df:Double) = new RChisq(df) }
cxd/scala-au.id.cxd.math
math/src/main/scala/au/id/cxd/math/probability/random/RChisq.scala
Scala
mit
316
/* * Copyright (C) 02/10/13 Romain Reuillon * * 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 Foundation, either version 3 of the License, or * (at your option) any later version. * * This pr...
openmole/openmole
openmole/core/org.openmole.core.serializer/src/main/scala/org/openmole/core/serializer/file/FileSerialisation.scala
Scala
agpl-3.0
3,286
package de.tuberlin.uebb.sl2.tests.impl import de.tuberlin.uebb.sl2.tests.specs.SignatureSerializerSpec import de.tuberlin.uebb.sl2.impl.SignatureJsonSerializer class SignatureJsonSerializerTest extends SignatureSerializerSpec with SignatureJsonSerializer { def testedImplementationName = "Signature JSON serializ...
mzuber/simple-language
src/test/scala/impl/SignatureJsonSerializerTest.scala
Scala
bsd-3-clause
329
import java.security.MessageDigest import org.apache.spark.sql.expressions.UserDefinedFunction import org.apache.spark.sql.functions.udf import scala.util.matching.Regex object RegExSample { def main(args: Array[String]): Unit = { val regexes = Map("11 numbers" -> raw"\\b\\d{11}\\b".r) def sample(reg: Reg...
rockiey/explore-spark
src/main/scala/RegExSample.scala
Scala
mit
1,584
package org.rebeam.tree.view.measure import japgolly.scalajs.react.vdom.html_<^._ import japgolly.scalajs.react._ import org.rebeam.tree.view.measure.Measure.Dimensions object MeasureDemo { class Backend(scope: BackendScope[Unit, Dimensions]) { def render(props: Unit, l: Dimensions) = { Measure( ...
trepidacious/tree-material-ui
js/src/main/scala/org/rebeam/tree/view/measure/MeasureDemo.scala
Scala
gpl-3.0
766
/* * ButtonClickedExpandedImpl.scala * (LucreSwing) * * Copyright (c) 2014-2021 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU Affero General Public License v3+ * * * For further information, please contact Hanns Holger Rutz at * contact@sciss.de */ package de.sciss....
Sciss/LucreSwing
jvm/src/main/scala/de/sciss/lucre/swing/graph/impl/ButtonClickedExpandedImpl.scala
Scala
agpl-3.0
1,480
package org.jetbrains.plugins.scala package codeInsight package generation import com.intellij.psi.PsiClass import org.jetbrains.generate.tostring.GenerateToStringClassFilter import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.ScTemplateDefinition import org.jetbrains.plugins.scala.lang.psi.light.PsiClass...
JetBrains/intellij-scala
scala/codeInsight/src/org/jetbrains/plugins/scala/codeInsight/generation/GenerateToStringScalaClassFilter.scala
Scala
apache-2.0
623
/* Copyright 2009 David Hall, Daniel Ramage 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 writi...
scalanlp/chalk
src/main/scala/chalk/text/tokenize/RegexSearchTokenizer.scala
Scala
apache-2.0
908
/* Copyright 2009-2021 EPFL, Lausanne */ import stainless.lang._ import stainless.proof._ import stainless.collection._ object FlatMap { def append[T](l1: List[T], l2: List[T]): List[T] = l1 match { case Cons(head, tail) => Cons(head, append(tail, l2)) case Nil() => l2 } def associative_append_lemma[T...
epfl-lara/stainless
frontends/benchmarks/verification/valid/FlatMap.scala
Scala
apache-2.0
1,887
/* * Copyright (c) 2017 Magomed Abdurakhmanov, Hypertino * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * */ import java.io.Reader import com.hypertino.binders....
hypertino/hyperbuts-t-zeromq
src/test/scala/ZMQClientSpec.scala
Scala
bsd-3-clause
9,293
package leo.modules.agent.multisearch import leo.Configuration import leo.agents.{Agent, CompletedState, DoItYourSelfAgent, OpenState} import leo.datastructures.{AnnotatedClause, Signature} import leo.datastructures.blackboard.{Blackboard, Delta} import leo.datastructures.blackboard.scheduler.Scheduler import leo.data...
lex-lex/Leo-III
oldsrc/main/scala/leo/modules/agent/multisearch/SchedulingPhase.scala
Scala
bsd-3-clause
3,083
package org.aguo.civsim.view import org.aguo.civsim.model.World case class ErrorScreen(e: Throwable) extends Screen { override def generateMessage(world: World): String = s"${Console.RED}Error:${Console.RESET} ${e.getMessage}" }
aguo777/civ-sim
src/main/scala/org/aguo/civsim/view/ErrorScreen.scala
Scala
mit
232
package org.bitcoins.core.script.crypto import org.bitcoins.core.number.Int32 import org.bitcoins.crypto.{ECDigitalSignature, Factory} import scodec.bits.ByteVector /** Created by chris on 1/18/16. */ sealed trait HashType { def num: Int32 def byte: Byte = num.bytes.last } object HashType extends Factory[HashT...
bitcoin-s/bitcoin-s
core/src/main/scala/org/bitcoins/core/script/crypto/HashType.scala
Scala
mit
7,860
/* * 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/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableDropPartitionSuiteBase.scala
Scala
apache-2.0
9,262
/* * Copyright 2013 Stephan Rehfeld * * 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 ...
stephan-rehfeld/scaladelray
src/main/scala/scaladelray/geometry/Triangle.scala
Scala
apache-2.0
2,332
package se.culvertsoft.mgen.visualdesigner.control import se.culvertsoft.mgen.visualdesigner.model.Entity import se.culvertsoft.mgen.visualdesigner.model.PlacedEntity trait ControllerListener { /** * **************************** * * * MODEL CHANGES * * *************************** */ def o...
culvertsoft/mgen-visualdesigner
src/main/scala/se/culvertsoft/mgen/visualdesigner/control/ControllerListener.scala
Scala
gpl-2.0
1,313
package scalax.collection import GraphEdge.{EdgeLike, EdgeCopy, DiHyperEdgeLike} /** * This object serves as a container for several `Graph`-related definitions like * parameter-types and implicit conversions. * * You will usually simply import all its members along with the members of `EdgeOut`: * {{{ ...
opyate/scala-graph
core/src/main/scala/scalax/collection/GraphPredef.scala
Scala
bsd-3-clause
7,892
package pl.gosub.akka.online import akka.actor.{Actor, ActorRef, ActorSystem, Props} import akka.event.Logging import akka.stream.{ActorMaterializer, OverflowStrategy, QueueOfferResult, ThrottleMode} import akka.stream.scaladsl.{Sink, Source, SourceQueueWithComplete} import org.apache.spark.streamdm.classifiers.trees....
gosubpl/akka-online
src/main/scala/pl/gosub/akka/online/HoeffdingTreeFlowActor.scala
Scala
apache-2.0
4,203
package pregnaware.naming.entities case class NameStat(name: String, isBoy: Boolean, year: Int, count: Int) case class NameStatByCountry(name: String, isBoy: Boolean, year: Int, country: String, count: Int) case class NameStatByMonth(name: String, isBoy: Boolean, year: Int, month: String, count: Int) case class NameSt...
jds106/pregnaware
service/src/main/scala/pregnaware/naming/entities/NameStat.scala
Scala
mit
467
package com.ponkotuy.data import org.json4s._ /** 図鑑データ * * 図鑑APIそのものはステータス、Info等、沢山情報が取れるが、要らないのでかなり削っている * Date: 14/03/17. */ abstract class Book { def id: Int def indexNo: Int def name: String } object Book { implicit val formats = DefaultFormats def fromJson(json: JValue): List[Book] = { js...
b-wind/MyFleetGirls
library/src/main/scala/com/ponkotuy/data/Book.scala
Scala
mit
2,291
/** * Copyright (c) 2016 Intel Corporation  * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * *       http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicabl...
ashaarunkumar/spark-tk
sparktk-core/src/main/scala/org/trustedanalytics/sparktk/frame/internal/rdd/VectorUtils.scala
Scala
apache-2.0
2,142
package gitbucket.core.controller.api import gitbucket.core.api._ import gitbucket.core.controller.ControllerBase import gitbucket.core.model.{WebHook, WebHookContentType} import gitbucket.core.service.{RepositoryService, WebHookService} import gitbucket.core.util._ import gitbucket.core.util.Implicits._ import org.sca...
xuwei-k/gitbucket
src/main/scala/gitbucket/core/controller/api/ApiRepositoryWebhookControllerBase.scala
Scala
apache-2.0
3,966
package com.github.diegopacheco.scala.playground.camel.simple import org.apache.camel.impl.DefaultCamelContext import org.apache.camel.builder.RouteBuilder class Source { def produce() = "Hi \\n This \\n Splits" } class Target { def consume(n: Any) = { Thread.sleep(1000) println("Got: " + n) } } objec...
diegopacheco/scala-playground
scala-camel-simple/src/main/scala/com/github/diegopacheco/scala/playground/camel/simple/SplitApp.scala
Scala
unlicense
787
/* * Copyright 2017 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...
pncampbell/ct-calculations
src/test/scala/uk/gov/hmrc/ct/computations/calculations/NonTradeIncomeCalculatorSpec.scala
Scala
apache-2.0
1,361
// Code generated by sbt-mavgen. Manual edits will be overwritten package scavlink.message.enums /** * Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability. */ object MavProtocolCapability extends Enumeration with Flag { val _UNKNOWN = Value(0) /** * A...
nickolasrossi/scavlink
src/main/scala/scavlink/message/enums/MavProtocolCapability.scala
Scala
mit
1,409
/* * 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/submission/duplicate_enrolmentSpec.scala
Scala
apache-2.0
1,490
/* * 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/test/scala/org/apache/spark/sql/catalyst/SQLKeywordSuite.scala
Scala
apache-2.0
8,110
package org.jetbrains.plugins.scala package codeInspection.collections import com.intellij.openapi.project.Project import org.jetbrains.annotations.Nls import org.jetbrains.plugins.scala.codeInspection.AbstractFixOnPsiElement import org.jetbrains.plugins.scala.lang.psi.api.expr.ScExpression import org.jetbrains.plugin...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/codeInspection/collections/OperationOnCollectionQuickFix.scala
Scala
apache-2.0
1,225
package cobalt.parser.statement import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.{FunSpec, Matchers} @RunWith(classOf[JUnitRunner]) class ModifierParserTest extends FunSpec with Matchers { describe("Method parser") { it("Should parse method definitions with no fields...
Michael2109/cobalt
src/test/scala/cobalt/parser/statement/ModifierParserTest.scala
Scala
lgpl-3.0
478
package com.sksamuel.scapegoat.inspections.math import com.sksamuel.scapegoat.InspectionTest class NanComparisonTest extends InspectionTest { override val inspections = Seq(new NanComparison) "nan comparison" - { "should report warning" - { val code = """class Test { | | va...
sksamuel/scalac-scapegoat-plugin
src/test/scala/com/sksamuel/scapegoat/inspections/math/NanComparisonTest.scala
Scala
apache-2.0
629
/* * Part of GDL book_api. * Copyright (C) 2018 Global Digital Library * * See LICENSE */ package io.digitallibrary.bookapi.repository import io.digitallibrary.language.model.LanguageTag import io.digitallibrary.bookapi.TestData.Domain.{DefaultInTranslationFile, DefaultinTranslation} import io.digitallibrary.boo...
GlobalDigitalLibraryio/book-api
src/test/scala/io/digitallibrary/bookapi/repository/InTranslationFileRepositoryTest.scala
Scala
apache-2.0
3,518
// Comment before package package org // Comment before import // Comment before object object A { def test(): B = {} }
JetBrains/intellij-scala
scala/scala-impl/testdata/move/singleObject/after/org/A.scala
Scala
apache-2.0
123
package at.forsyte.apalache.tla.assignments import at.forsyte.apalache.tla.lir.oper.TlaActionOper import at.forsyte.apalache.tla.lir.transformations.impl.{IdleTracker, TrackerWithListeners} import at.forsyte.apalache.tla.lir._ import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUn...
konnov/dach
tla-assignments/src/test/scala/at/forsyte/apalache/tla/assignments/TestSymbTransGenerator.scala
Scala
apache-2.0
6,081
package controllers.dealer.settings import com.avaje.ebean.Ebean import controllers.Secured import controllers.dealer.routes import models.{Db, Dealer} import play.api.mvc.Controller import play.mvc.Result import views.html.dealer.settings.index import play.mvc.Results.ok import play.mvc.Results.redirect /** * Creat...
ruraj/stock-manager
app/controllers/dealer/settings/Index.scala
Scala
bsd-3-clause
646
package org.scalamu.plugin.mutators.arithmetic import org.scalamu.plugin.Mutator import org.scalamu.plugin.testutil.SingleMutationSpec class ReplaceLogicalOperatorsSpec extends SingleMutationSpec { override def mutation: Mutator = ReplaceLogicalOperators "ReplaceLogicalOperators" should "swap \\'&&\\' and \\'||\...
sugakandrey/scalamu
scalac-plugin/src/test/scala/org/scalamu/plugin/mutators/arithmetic/ReplaceLogicalOperatorsSpec.scala
Scala
gpl-3.0
1,156
object B { def onX(m: { def x: Int } ) = m.x }
jamesward/xsbt
sbt/src/sbt-test/source-dependencies/struct/B.scala
Scala
bsd-3-clause
49