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
/* * @author Philip Stutz * * Copyright 2014 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/licenses/LICENSE-2.0 * * U...
uzh/signal-collect
src/main/scala/com/signalcollect/util/HashSet.scala
Scala
apache-2.0
5,679
package org.jetbrains.plugins.scala.conversion.ast /** * Created by Kate Ustyuzhanina * on 10/27/15 */ case class AnnotaionConstruction(inAnnotation: Boolean, attributes: Seq[(Option[String], Option[IntermediateNode])], name: Option[IntermediateNode]) extends IntermediateNode { }...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/conversion/ast/AnnotaionConstruction.scala
Scala
apache-2.0
323
package scala.concurrent import org.junit.Assert.assertTrue import org.junit.Test import scala.tools.testkit.AssertUtil._ import scala.util.Try import duration.Duration.Inf class FutureTest { @Test def testZipWithFailFastBothWays(): Unit = { import ExecutionContext.Implicits.global val p1 = Promise[Int...
scala/scala
test/junit/scala/concurrent/FutureTest.scala
Scala
apache-2.0
2,890
package tholowka.diz.unmarshalling.terms import tholowka.diz.interfaces._ /** * This parser represents the parsing of a 'row' in a Json object definition. * It assumes that there is a left side of the row, and a right side, delimited by a colon. * The left side should parse to a string, the right can parse to any...
tholowka/diz
src/main/scala/tholowka/diz/unmarshalling/terms/Row.scala
Scala
mit
2,787
package edu.rice.habanero.benchmarks.radixsort import java.util.Random import edu.rice.habanero.actors.{ScalazActor, ScalazActorState, ScalazPool} import edu.rice.habanero.benchmarks.{Benchmark, BenchmarkRunner} /** * @author <a href="http://shams.web.rice.edu/">Shams Imam</a> ([email protected]) */ object RadixSortS...
smarr/savina
src/main/scala/edu/rice/habanero/benchmarks/radixsort/RadixSortScalazActorBenchmark.scala
Scala
gpl-2.0
3,737
import sbt._ import Keys._ import play.Project._ object ApplicationBuild extends Build { val appName = "app" val appVersion = "1.0-SNAPSHOT" val appDependencies = Seq( // Add your project dependencies here, ) val main = play.Project(appName, appVersion, appDependencies).settin...
cescoffier/maven-play2-plugin
src/test/resources/scala/app/project/Build.scala
Scala
apache-2.0
383
package org.thp.cortex.controllers import javax.inject.{ Inject, Singleton } import scala.concurrent.ExecutionContext import play.api.Configuration import play.api.http.Status import play.api.libs.json.{ JsString, Json } import play.api.libs.json.Json.toJsFieldJsValueWrapper import play.api.mvc.{ AbstractController,...
CERT-BDF/Cortex
app/org/thp/cortex/controllers/StatusCtrl.scala
Scala
agpl-3.0
1,881
package net.sansa_stack.inference.spark.data.writer import org.apache.jena.rdf.model.{Model, ModelFactory} import org.apache.jena.graph.{GraphUtil, NodeFactory, Triple} import org.apache.jena.sparql.util.TripleComparator import org.apache.spark.rdd.RDD import org.apache.spark.sql.{DataFrame, Row} import org.slf4j.Log...
SANSA-Stack/SANSA-RDF
sansa-inference/sansa-inference-spark/src/main/scala/net/sansa_stack/inference/spark/data/writer/RDFGraphWriter.scala
Scala
apache-2.0
4,112
package eu.gruchala.typelevel.full import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import scala.language.implicitConversions object F_MagnetPattern { class HttpResponse sealed trait StatusCode object StatusCode { case object Ok extends StatusCode case object Bad...
leszekgruchala/typelevel-programming-scala
src/main/scala/eu/gruchala/typelevel/full/F_MagnetPattern.scala
Scala
mit
1,850
package sbt package internal import java.util.concurrent.atomic.AtomicLong import java.io.Closeable import Def.{ ScopedKey, Setting, Classpath } import scala.concurrent.ExecutionContext import Scope.GlobalScope import java.io.File import sbt.io.{ IO, Hash } import sbt.io.syntax._ import sbt.util.{ Logger, LogExchange ...
Duhemm/sbt
main/src/main/scala/sbt/internal/DefaultBackgroundJobService.scala
Scala
bsd-3-clause
11,606
/* * 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 ...
ArvinDevel/onlineAggregationOnSparkV2
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerBackend.scala
Scala
apache-2.0
16,160
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
FusionWorks/avocado
avocado-core/src/main/scala/org/bdgenomics/avocado/algorithms/math/LogBinomial.scala
Scala
apache-2.0
2,325
package mesosphere.marathon.core.matcher.reconcile.impl import mesosphere.marathon.core.launcher.TaskOp import mesosphere.marathon.core.launcher.impl.TaskLabels import mesosphere.marathon.core.matcher.base.OfferMatcher import mesosphere.marathon.core.matcher.base.OfferMatcher.{ MatchedTaskOps, TaskOpSource, TaskOpWith...
yp-engineering/marathon
src/main/scala/mesosphere/marathon/core/matcher/reconcile/impl/OfferMatcherReconciler.scala
Scala
apache-2.0
3,797
package iot.pood.storage.actor import akka.actor.Actor.Receive import akka.actor.Props import iot.pood.base.actors.BaseActor import iot.pood.base.messages.integration.IntegrationMessages.DataMessages.DataMessage /** * Created by rafik on 26.9.2017. */ object DataStorage { val NAME = "dataStorage" def props(...
rafajpet/iot-pood
iot-pood-storage/src/main/scala/iot/pood/storage/actor/DataStorage.scala
Scala
mit
498
/* * 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 ...
fhueske/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/descriptors/SchemaTest.scala
Scala
apache-2.0
3,244
/** * 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-core/src/main/scala/io/gatling/core/action/builder/PaceBuilder.scala
Scala
apache-2.0
1,171
package com.sksamuel.scrimage.filter import com.sksamuel.scrimage.ImmutableImage import org.scalatest.FunSuite class TelevisionFilterTest extends FunSuite { private val original = ImmutableImage.fromResource("/bird_small.png") private val expected = ImmutableImage.fromResource("/com/sksamuel/scrimage/filters/bir...
sksamuel/scrimage
scrimage-filters/src/test/scala/com/sksamuel/scrimage/filter/TelevisionFilterTest.scala
Scala
apache-2.0
469
package skinny.http import org.specs2.mutable.Specification class RequestSpec extends Specification { sequential val request = new Request("http://example.com/") "Request" should { "be available" in { request.enableThrowingIOException(true) request.url("http://www.example.com") request....
Kuchitama/skinny-framework
http-client/src/test/scala/skinny/http/RequestSpec.scala
Scala
mit
663
package sjr import scalafix.v1._ class ScalaJsReactEffectAgnosticism extends SemanticRule("ScalaJsReactEffectAgnosticism") { private[this] val prohibitDefaultEffects = new ProhibitDefaultEffects override def fix(implicit doc: SemanticDocument): Patch = prohibitDefaultEffects.fix }
japgolly/scalajs-react
scalafixRules/src/main/scala/sjr/ScalaJsReactEffectAgnosticism.scala
Scala
apache-2.0
294
package colossus.controller import akka.actor._ import akka.util.ByteString import colossus.RawProtocol.{Raw, RawServerCodec} import colossus.core.{ConnectionManager, CoreDownstream, CoreUpstream, DynamicOutBuffer} import org.scalamock.scalatest.MockFactory import colossus.util.DataSize._ import colossus.streaming.{Bu...
tumblr/colossus
colossus-tests/src/test/scala/colossus/controller/Common.scala
Scala
apache-2.0
2,106
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
practice-vishnoi/dev-spark-1
streaming/src/main/scala/org/apache/spark/streaming/ui/AllBatchesTable.scala
Scala
apache-2.0
4,877
import leon.lang._ import leon.annotation._ object SemanticsPreservation { sealed abstract class Formula case class And(lhs: Formula, rhs: Formula) extends Formula case class Or(lhs: Formula, rhs: Formula) extends Formula case class Not(f: Formula) extends Formula case class Variable(id: Int) extends Formu...
ericpony/scala-examples
testcases/verification/compilation/SemanticsPreservation.scala
Scala
mit
1,310
/*********************************************************************** * 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-hbase/geomesa-hbase-jobs/src/main/scala/org/locationtech/geomesa/hbase/jobs/GeoMesaHBaseInputFormat.scala
Scala
apache-2.0
6,888
package net.xylophones.planetoid.game import net.xylophones.planetoid.game.maths.Vector2D import net.xylophones.planetoid.game.model._ class GameContainerFactory(rocketFactory: RocketFactory) { def createGameContainer(player1Id: String, player2Id: String) = { val phys = new GamePhysics val planetPosition =...
wjsrobertson/planetoid
game/src/main/scala/net/xylophones/planetoid/game/GameContainerFactory.scala
Scala
apache-2.0
1,068
package mimir.models; import java.io.File import java.sql.SQLException import java.util import scala.collection.JavaConversions._ import scala.util._ import scala.util.Random import com.typesafe.scalalogging.Logger import org.joda.time.{DateTime, Seconds, Days, Period} import com.typesafe.scalalogging.Logger import...
UBOdin/mimir
src/main/scala/mimir/models/SeriesMissingValueModel.scala
Scala
apache-2.0
11,150
//: ---------------------------------------------------------------------------- //: Copyright (C) 2015 Verizon. All Rights Reserved. //: //: Licensed under the Apache License, Version 2.0 (the "License"); //: you may not use this file except in compliance with the License. //: You may obtain a copy of the Licen...
neigor/funnel
http/src/main/scala/SSE.scala
Scala
apache-2.0
6,335
package org.jetbrains.plugins.dotty.lang.psi.impl.base.types import com.intellij.lang.ASTNode import org.jetbrains.plugins.dotty.lang.psi.api.base.types.DottyDesugarizableTypeElement import org.jetbrains.plugins.scala.lang.psi.ScalaPsiElementImpl import org.jetbrains.plugins.scala.lang.psi.api.base.types.ScInfixTypeEl...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/dotty/lang/psi/impl/base/types/DottyInfixTypeElementImpl.scala
Scala
apache-2.0
499
package pl.touk.nussknacker.ui.api import akka.http.scaladsl.model.{HttpEntity, MediaTypes, StatusCodes} import akka.http.scaladsl.testkit.ScalatestRouteTest import pl.touk.nussknacker.ui.util.ConfigWithScalaVersion import org.scalatest.{FunSuite, Matchers} import pl.touk.nussknacker.engine.api.DisplayJsonWithEncoder ...
TouK/nussknacker
ui/server/src/test/scala/pl/touk/nussknacker/ui/api/ServiceRoutesSpec.scala
Scala
apache-2.0
5,248
/* * 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...
scalatest/scalatest
jvm/scalatest-test/src/test/scala/org/scalatest/ShouldLengthSpec.scala
Scala
apache-2.0
137,353
package scratchpad.done import scratchpad.done.Applicative object Main { def main(args: Array[String]): Unit = { println(ListMonad.replicateM(10, List[Int](1, 2, 3))) println(OptionMonad.replicateM(5, Some("a"))) println(ListMonad.filterM(List(1, 2, 3, 4, 5, 6))((ele: Int) => List[Boolean](ele % 2 == 0)...
waxmittmann/fpinscala
answers/src/main/scala/scratchpad/done/Monad.scala
Scala
mit
4,724
package net.paploo.diestats.statistics.util object AdditionalOrderings { class SeqOrdering[A](implicit ord: Ordering[A]) extends Ordering[Seq[A]] { override def compare(x: Seq[A], y: Seq[A]): Int = { val as = x.iterator val bs = y.iterator // Find the first non-matching element. while(...
paploo/DieStats
src/main/scala/net/paploo/diestats/statistics/util/AdditionalOrderings.scala
Scala
bsd-3-clause
689
package com.seanshubin.detangler.collection case class DifferenceResult(isSame: Boolean, messageLines: Seq[String])
SeanShubin/detangler
collection/src/main/scala/com/seanshubin/detangler/collection/DifferenceResult.scala
Scala
unlicense
117
package org.chipmunk.value import java.sql.{ Date => SQLDate } import java.math.{ BigDecimal => JBigDecimal } import java.sql.Timestamp import java.util.UUID import scala.annotation.implicitNotFound import java.math.{BigDecimal => JBigDecimal} import java.sql.{Date => SQLDate} @implicitNotFound("No member of typeclas...
kpjjpk/chipmunk
src/main/scala/org/chipmunk/value/Defaultable.scala
Scala
mit
2,113
package de.unifreiburg.cs.proglang.jgs.typing import de.unifreiburg.cs.proglang.jgs.constraints.CTypes.CType import de.unifreiburg.cs.proglang.jgs.constraints.{CTypes, Constraint} import de.unifreiburg.cs.proglang.jgs.constraints.TypeVars.TypeVar import de.unifreiburg.cs.proglang.jgs.instrumentation.Var import de.unif...
luminousfennell/jgs
GradualConstraints/src/main/java/de/unifreiburg/cs/proglang/jgs/typing/EnvMap.scala
Scala
bsd-3-clause
4,781
package com.github.ldaniels528.trifecta import com.github.ldaniels528.commons.helpers.OptionHelper._ import com.github.ldaniels528.commons.helpers.Resource import org.scalatest.mock.MockitoSugar import org.scalatest.{BeforeAndAfterEach, FeatureSpec, GivenWhenThen} import scala.io.Source /** * Trifecta Configuration...
ldaniels528/trifecta
src/test/scala/com/github/ldaniels528/trifecta/TxConfigSpec.scala
Scala
apache-2.0
1,743
/* * 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 ...
agoncharuk/ignite
modules/scalar/src/main/scala/org/apache/ignite/scalar/lang/ScalarPredicate3X.scala
Scala
apache-2.0
1,318
/* * Copyright (C) 2015 Stratio (http://stratio.com) * * 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 app...
danielcsant/sparta
sdk/src/main/scala/com/stratio/sparta/sdk/Measures.scala
Scala
apache-2.0
720
/* * Copyright 2016 org.NLP4L * * 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...
NLP4L/framework
app/org/nlp4l/framework/builtin/acronym/AcronymExtractionProcessor.scala
Scala
apache-2.0
9,366
package skinny.test import skinny.controller.SkinnyServlet import skinny.micro.context.SkinnyContext /** * Mock of SkinnyServlet. */ trait MockServlet extends SkinnyServlet with MockControllerBase with MockWebPageControllerFeatures { // Work around for the following error // java.lang.NullPointerException ...
seratch/skinny-framework
test/src/main/scala/skinny/test/MockServlet.scala
Scala
mit
2,285
/* * NOTICE: The original file was changed by Philip Stutz and Sara Magliacane. * * This file is part of the PSL software. * Copyright 2011-2013 University of Maryland * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You ma...
uzh/fox
src/test/scala/com/signalcollect/psl/SquaredLinearLossSpec.scala
Scala
apache-2.0
1,853
package com.karasiq.shadowcloud.exceptions import java.io.FileNotFoundException import java.nio.file.FileAlreadyExistsException import com.karasiq.shadowcloud.index.diffs.IndexDiff import com.karasiq.shadowcloud.model.{Chunk, Path, RegionId, StorageId} abstract class SCException(message: String = null, cause: Throwa...
Karasiq/shadowcloud
model/src/main/scala/com/karasiq/shadowcloud/exceptions/SCException.scala
Scala
apache-2.0
1,633
package shop.infrastructure import slick.driver.PostgresDriver.simple._ // import org.joda.time.DateTime // import com.github.tototoshi.slick.PostgresJodaSupport._ import shop.model._ // import akka.event.Logging import scala.slick.jdbc.meta.MTable class ShopperSchema(tag: Tag) extends Table[(Long,String)](tag,"shop...
flurdy/shoppinglist
shopservice/src/main/scala/infrastructure/shopperrepository.scala
Scala
mit
4,129
package im.tox.antox.tox import java.sql.Timestamp import im.tox.antox.data.State import im.tox.antox.utils.TimestampUtils import im.tox.antox.wrapper._ import rx.lang.scala.subjects.BehaviorSubject object Reactive { val chatActive = BehaviorSubject[Boolean](false) val chatActiveSub = chatActive.subscribe(x => S...
Ansa89/Antox
app/src/main/scala/im/tox/antox/tox/Reactive.scala
Scala
gpl-3.0
3,313
/* This file is part of Intake24. Copyright 2015, 2016 Newcastle University. 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 appl...
digitalinteraction/intake24
ApiPlayServer/app/security/AuthenticationException.scala
Scala
apache-2.0
690
/* * Copyright 2022 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/iht-frontend
test/iht/models/application/debts/BasicEstateElementLiabilitiesTest.scala
Scala
apache-2.0
1,923
/* * tuProlog - Copyright (C) 2001-2002 aliCE team at deis.unibo.it * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any l...
zakski/project-soisceal
scala-core/src/main/scala/com/szadowsz/gospel/core/db/primitive/PrimitiveInfo.scala
Scala
lgpl-3.0
4,282
package com.pauldoo.euler.puzzle import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class Puzzle9Test extends PuzzleTest { def puzzle = Puzzle9; def expectedAnswer = 31875000; }
pauldoo/projecteuler
test/com/pauldoo/euler/puzzle/Puzzle9Test.scala
Scala
isc
233
/** * Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0 * See accompanying LICENSE file. */ package kafka.manager import akka.actor.{ActorRef, Cancellable, ActorPath} import scala.collection.mutable import scala.concurrent.Future import scala.concurrent.duration._ import scala.util.Try /** ...
LastManStanding/kafka-manager
app/kafka/manager/BrokerViewCacheActor.scala
Scala
apache-2.0
9,435
/* * 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.compat.java8 im...
scala/scala-java8-compat
src/test/scala/scala/compat/java8/DurationConvertersTest.scala
Scala
apache-2.0
3,588
package org.jetbrains.plugins.scala.components.libinjection import java.io._ import java.net.URL import java.util import java.util.concurrent.atomic.AtomicBoolean import com.intellij.ide.plugins.cl.PluginClassLoader import com.intellij.notification._ import com.intellij.openapi.application.ApplicationManager import c...
triplequote/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/components/libinjection/LibraryInjectorLoader.scala
Scala
apache-2.0
21,300
package models.dao import play.api.db.slick.Profile import org.joda.time.DateTime case class TestimonialRecord(id: Option[Long], authorName: String, authorEmail: Option[String], text: String, addedAt: DateTime, isApproved: Boolean) trait TestimonialComponent { this: Profile => import profile.simple._ import com....
vokhotnikov/sevstone-play
app/models/dao/Testimonial.scala
Scala
mit
968
/* * 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 ...
redhatanalytics/dstream-amqp
src/main/scala/io/radanalytics/streaming/amqp/AMQPInputDStream.scala
Scala
apache-2.0
2,432
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you...
apache/incubator-toree
kernel/src/test/scala/org/apache/toree/utils/DataFrameConverterSpec.scala
Scala
apache-2.0
3,505
package lila.puzzle import play.api.data._ import play.api.data.Forms._ object DataForm { val difficulty = Form(single( "difficulty" -> number(min = 1, max = 3) )) val attempt = Form(mapping( "win" -> number, "time" -> number )(AttemptData.apply)(AttemptData.unapply)) case class AttemptData( ...
Happy0/lila
modules/puzzle/src/main/DataForm.scala
Scala
mit
440
/** * 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...
tc-dc/kafka-mesos
src/scala/main/ly/stealth/mesos/kafka/scheduler/http/api/Model.scala
Scala
apache-2.0
1,735
/* * SPDX-License-Identifier: Apache-2.0 * Copyright 2016-2020 Daniel Urban and contributors listed in NOTICE.txt * * 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.ap...
durban/exp-reagents
stress/src/test/scala/dev/tauri/choam/kcas/IBRRelAcqTestReorder.scala
Scala
apache-2.0
1,971
package mobile.ionic import scalatags.Text.all._ object IonicHtmlTags { ///tags val ionNavBar = "ion-nav-bar".tag val ionNavView = "ion-nav-view".tag val ionNavBackButton = "ion-nav-back-button".tag val ionView = "ion-view".tag val ionContent = "ion-content".tag val ionList = "ion-list".tag val ionIt...
monifu/monix-ionic-sample
app-jvm/src/main/scala/mobile/ionic/IonicHtmlTags.scala
Scala
gpl-2.0
872
/** * Copyright (C) 2020 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...
orbeon/orbeon-forms
core-cross-platform/shared/src/main/scala/org/orbeon/oxf/util/CoreCrossPlatformSupportTrait.scala
Scala
lgpl-2.1
1,113
package pb.shared.protocol import java.util.UUID case class Session(path: String, id: UUID, hangoutUrl: String)
pairing-buddy/pairing-buddy
shared/src/main/scala/pb/shared/protocol/Session.scala
Scala
mit
114
/* * 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 ...
bowenli86/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/utils/UserDefinedFunctionTestUtils.scala
Scala
apache-2.0
13,830
package nounou.elements.data.filters import nounou.elements.data.NNData import breeze.numerics.isOdd import breeze.stats.median import breeze.linalg.{DenseVector => DV} import breeze.signal.{filterMedian, OptOverhang} import nounou.elements.ranges.{SampleRangeValid, SampleRange} /**This filter applies a median subtr...
ktakagaki/nounou.rebooted150527
src/main/scala/nounou/elements/data/filters/NNDataFilterMedianSubtract.scala
Scala
apache-2.0
2,800
package com.pragmasoft.scaldingunit import com.twitter.scalding._ import cascading.tuple.Tuple import scala.Predef._ import scala.collection.mutable.Buffer import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import cascading.pipe.Pipe import org.specs2.{mutable => mutableSpec} import Dsl._ // Shoul...
scalding-io/ScaldingUnit
scalding-unit/src/test/scala/com/pragmasoft/scaldingunit/HadoopSpec2SupportSpec.scala
Scala
apache-2.0
1,528
package org.jetbrains.plugins.scala.lang.completion.weighter import com.intellij.openapi.module.ModuleUtilCore import com.intellij.openapi.util.Key import com.intellij.psi._ import com.intellij.psi.util.proximity.ProximityWeigher import com.intellij.psi.util.{ProximityLocation, PsiTreeUtil} import org.jetbrains.plugin...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/lang/completion/weighter/ScalaExplicitlyImportedWeigher.scala
Scala
apache-2.0
7,620
package io.buoyant.router.http import com.twitter.finagle.Path import com.twitter.finagle.buoyant.Dst import com.twitter.finagle.http.Request import io.buoyant.router.RoutingFactory.{UnidentifiedRequest, IdentifiedRequest} import io.buoyant.test.{Awaits, Exceptions} import org.scalatest.FunSuite class PathIdentifierT...
denverwilliams/linkerd
router/http/src/test/scala/io/buoyant/router/http/PathIdentifierTest.scala
Scala
apache-2.0
4,556
package org.bdgenomics.sparkbox import org.apache.avro.file.{ DataFileWriter, DataFileReader } import org.apache.avro.io.EncoderFactory import org.apache.avro.specific.{ SpecificDatumWriter, SpecificDatumReader } import org.apache.hadoop.fs.{ FileContext, AvroFSInput, Path, FileSystem } import org.apache.spark.mllib.c...
timodonnell/sparkbox
src/main/scala/org/bdgenomics/sparkbox/LinearModelWithFeatureNames.scala
Scala
apache-2.0
3,298
package com.twitter.finagle.stats.buoyant import com.twitter.finagle.stats.{BucketAndCount, BucketedHistogram, Counter => FCounter, Stat => FStat} import com.twitter.util.{Duration, Time} import java.util.concurrent.atomic.AtomicLong sealed trait Metric object Metric { object None extends Metric class Counter ...
BuoyantIO/linkerd
telemetry/core/src/main/scala/com/twitter/finagle/stats/buoyant/Metric.scala
Scala
apache-2.0
2,251
package org.scalacvx import org.scalacvx.atoms.Expression import org.scalacvx.conic.ConicForm import org.scalacvx.constraints.{ComparisonConstraint, ConeConstraint, Constraint} import org.scalacvx.dcp.{AffineVexity, ConvexVexity, ConstantVexity, Vexity} case class ConvexProblem(objective: Expression, constraints:Arr...
lorenzolucido/ScalaCVX
src/main/scala/org/scalacvx/ConvexProblem.scala
Scala
mit
1,491
package io.iohk.ethereum.db.storage import io.iohk.ethereum.ObjectGenerators import io.iohk.ethereum.db.dataSource.EphemDataSource import io.iohk.ethereum.security.SecureRandomBuilder import io.iohk.ethereum.network.p2p.messages.CommonMessages import io.iohk.ethereum.network.p2p.messages.CommonMessages.NewBlock import...
input-output-hk/etc-client
src/test/scala/io/iohk/ethereum/db/storage/BlockBodiesStorageSpec.scala
Scala
mit
2,344
/* * Copyright 2013 Commonwealth Computer Research, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
jwkessi/geomesa
geomesa-core/src/main/scala/org/locationtech/geomesa/core/iterators/TimestampSetIterator.scala
Scala
apache-2.0
2,718
package frameless import org.scalacheck.Prop import org.scalacheck.Prop._ import shapeless.test.illTyped class DropTest extends TypedDatasetSuite { import DropTest._ test("fail to compile on missing value") { val f: TypedDataset[X] = TypedDataset.create(X(1, 1, false) :: X(1, 1, false) :: X(1, 10, false) :: ...
adelbertc/frameless
dataset/src/test/scala/frameless/DropTest.scala
Scala
apache-2.0
1,962
package benchmark import java.util.function.BiConsumer import org.openjdk.jmh.annotations._ import mutabilite._ import org.openjdk.jmh.infra.Blackhole import scala.collection.mutable.{OpenHashMap => StdlibMap} import java.util.{HashMap => JavaMap} @State(Scope.Thread) class MapBenchmark { import Benchmark._ v...
adamwy/scala-offheap-collections
benchmark/src/main/scala/MapBenchmark.scala
Scala
bsd-3-clause
6,141
package com.github.sstone.amqp.samples import scala.concurrent.ExecutionContext import scala.concurrent.duration._ import akka.actor.ActorSystem import akka.pattern.ask import akka.util.Timeout import com.github.sstone.amqp.{ConnectionOwner, RpcClient} import com.github.sstone.amqp.RpcClient.Request import com.github....
gawkermedia/amqp-client
src/main/scala/com/github.sstone/amqp/samples/BasicRpcClient.scala
Scala
mit
1,350
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
jedesah/Quasar
ejson/src/main/scala/quasar/ejson/optics.scala
Scala
apache-2.0
1,833
package is.launaskil import is.launaskil.models.Timestamp$ import org.joda.time.DateTime import scala.language.implicitConversions package object models { implicit def time2joda(time: Timestamp): DateTime = new DateTime(time.millis) }
olafurpg/slick-codegen-scalajs
server/app/is/launaskil/models/package.scala
Scala
mit
240
package org.bitcoins.spvnode.networking import java.net.{InetSocketAddress, ServerSocket} import akka.actor.ActorSystem import akka.io.{Inet, Tcp} import akka.testkit.{ImplicitSender, TestActorRef, TestKit, TestProbe} import org.bitcoins.core.config.TestNet3 import org.bitcoins.core.util.{BitcoinSLogger, BitcoinSUtil...
Christewart/bitcoin-s-spv-node
src/test/scala/org/bitcoins/spvnode/networking/ClientTest.scala
Scala
mit
2,809
/* 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 not use this f...
transcendent-ai-labs/DynaML
dynaml-core/src/main/scala/io/github/mandar2812/dynaml/models/lm/SparkGLM.scala
Scala
apache-2.0
2,833
package fpinscala.errorhandling import scala.{Option => _, Either => _, Left => _, Right => _, _} // hide std library `Option` and `Either`, since we are writing our own in this chapter sealed trait Either[+E,+A] { def map[B](f: A => B): Either[E, B] = this match { case lf@ Left(l) => lf case Right(r) => Righ...
mkunikow/fpinscala
exercises/src/main/scala/fpinscala/errorhandling/Either.scala
Scala
mit
1,997
/* * Copyright 2015-2020 Noel Welsh * * 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...
underscoreio/doodle
core/shared/src/main/scala/doodle/algebra/generic/GenericText.scala
Scala
apache-2.0
2,186
package dibl import java.io.{ BufferedReader, File, FileInputStream, InputStreamReader } import dibl.sheet.SheetSVG import scala.collection.JavaConverters._ object Patterns { private def getTesselaceNr(s: String) = { s.replaceAll(". pattern.*", "") .replaceAll(".*\\"", "") } private def toSheetSvg(...
d-bl/GroundForge
src/test/scala/dibl/Patterns.scala
Scala
gpl-3.0
1,903
package org.jetbrains.plugins.scala package codeInspection package shadow import com.intellij.codeInspection.ProblemsHolder import com.intellij.openapi.project.Project import com.intellij.psi.{PsiElement, PsiNamedElement, ResolveResult} import org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil import org.jetbrains.plug...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/codeInspection/shadow/VariablePatternShadowInspection.scala
Scala
apache-2.0
2,476
package api import models.api.IntegrationToken import models.{IntegrationTopic, IntegrationUpdate} import play.api.Play import play.api.mvc.{AnyContent, Request, Result} import scala.concurrent.Future import scala.concurrent.duration.FiniteDuration /** * @author Alefas * @since 15/09/15 */ trait Integration { ...
JetChat/JetChat
app/api/Integration.scala
Scala
apache-2.0
2,206
package im.tox.antox.callbacks import android.app.{Notification, PendingIntent} import android.content.{Context, Intent} import android.preference.PreferenceManager import android.support.v4.app.{NotificationCompat, TaskStackBuilder} import android.util.Log import im.tox.antox.R import im.tox.antox.activities.MainActi...
afkgeek/Antox
app/src/main/scala/im/tox/antox/callbacks/AntoxOnGroupMessageCallback.scala
Scala
gpl-3.0
1,164
/** * Copyright (C) 2010 Orbeon, Inc. * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. * * This program i...
orbeon/orbeon-forms
xforms-runtime/shared/src/main/scala/org/orbeon/oxf/xforms/event/events/XXFormsReplaceEvent.scala
Scala
lgpl-2.1
1,411
package org.jetbrains.plugins.scala package lang package psi package stubs package impl import com.intellij.psi.PsiElement import com.intellij.psi.stubs.{IStubElementType, StubElement} import com.intellij.util.io.StringRef import org.jetbrains.plugins.scala.lang.psi.api.statements.ScFunction import org.jetbrains.plugi...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/stubs/impl/ScFunctionStubImpl.scala
Scala
apache-2.0
1,229
object Test { def main(args: Array[String]): Unit = { println("CaseNums") test(CaseNums) println() println("IntNums") test(IntNums) } def test(numbers: Numbers) = { import numbers._ val zero: Nat = Zero val one: Nat = Succ(zero) val two: Nat = Succ(one) val thr...
som-snytt/dotty
tests/run/fully-abstract-nat-7.scala
Scala
apache-2.0
3,890
/* * 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 ...
hhbyyh/spark
core/src/test/scala/org/apache/spark/FileSuite.scala
Scala
apache-2.0
28,994
package com.atanana import java.nio.ByteBuffer import java.nio.channels.ServerSocketChannel import java.util import scala.io.Source import scala.util.Try class CommandProvider(socket: ServerSocketChannel) { private val buffer = ByteBuffer.allocate(128) def getCommand: Try[Option[String]] = { Try { var...
atanana/rating-bot
src/main/scala/com/atanana/CommandProvider.scala
Scala
mit
720
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
travisbrown/scalatest
src/test/scala/org/scalatest/suiteprop/FirstTestIgnoredExamples.scala
Scala
apache-2.0
19,745
/* * 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/v2/ContinuousScanExec.scala
Scala
apache-2.0
2,572
/* * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
hpe-cct/cct-core
src/main/scala/cogdebugger/opengl/SGLCanvas.scala
Scala
apache-2.0
5,058
def /*caret*/bar(a: Int, b: Int, c: String): String = ((a + b) * b).toString + c bar(4, 5, "foo") //((4 + 5) * 5).toString + "foo"
JetBrains/intellij-scala
scala/scala-impl/testdata/inline/arguments/MethodWithMultipleArgumentsWithMultipleReferenes.scala
Scala
apache-2.0
131
/* * 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/utils/AdditionalNotesAndFootnotesHelper.scala
Scala
apache-2.0
1,204
package keystoneml.utils import breeze.linalg.{SparseVector, DenseMatrix, DenseVector} /** * Provides conversions between MLlib vectors & matrices, and Breeze vectors & matrices */ object MLlibUtils { /** Convert an MLlib vector to a Breeze dense vector */ def mllibVectorToDenseBreeze(vector: org.apache.spark....
amplab/keystone
src/main/scala/keystoneml/utils/MLlibUtils.scala
Scala
apache-2.0
2,178
import math.{Ray, Vector3} import org.scalacheck.{Arbitrary, Gen} import org.scalacheck.Prop._ import org.specs2.{ScalaCheck, Specification} class RaySpec extends Specification with ScalaCheck { //TODO separate special cases of reflection and refraction def is = s2""" A ray should calculate the directio...
wookenny/scalarty
src/test/scala/RaySpec.scala
Scala
mit
1,472
package org.jetbrains.plugins.scala.lang.psi.stubs import com.intellij.psi.stubs.StubElement import org.jetbrains.plugins.scala.lang.psi.api.toplevel.ScEarlyDefinitions /** * User: Alexander Podkhalyuzin * Date: 17.06.2009 */ trait ScEarlyDefinitionsStub extends StubElement[ScEarlyDefinitions]
gtache/intellij-lsp
intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/psi/stubs/ScEarlyDefinitionsStub.scala
Scala
apache-2.0
299
import io.gatling.core.Predef._ import io.gatling.http.Predef._ import scala.concurrent.duration._ class OffshoreSimulation extends Simulation { val httpConf = http //ec2-52-7-167-16.compute-1.amazonaws.com //.baseURL("http://ec2-52-6-114-144.compute-1.amazonaws.com") // Here is the root for all relative UR...
jacekelgda/gatling-offshore
user-files/simulations/offshore/offshore.scala
Scala
apache-2.0
1,478
package dedep.bonobo.utils object MathUtils { def isPowerOfTwo(num: Int): Boolean = if (num < 1) false else getFloorPowerOfTwoNumber(num) == num def getFloorPowerOfTwoNumber(number: Int): Int = { require(number >= 1) Stream.iterate(1) { _ * 2 }.takeWhile(_ <= number).last } }
dedep/bonobo-core
src/main/scala/dedep/bonobo/utils/MathUtils.scala
Scala
mit
311
package at.logic.gapt.examples import at.logic.gapt.expr.fol.FOLSubstitution import at.logic.gapt.expr.{ FOLConst, FOLVar } import at.logic.gapt.formats.prover9.Prover9TermParserLadrStyle import at.logic.gapt.proofs.lk._ import at.logic.gapt.proofs.lk.base.LKProof object equation_example { def apply: ( LKProof, FOL...
loewenheim/gapt
src/main/scala/at/logic/gapt/examples/equation_example.scala
Scala
gpl-3.0
1,758
import org.apache.spark._ import org.apache.spark.graphx._ import org.apache.spark.rdd._ import org.apache.spark.SparkContext._ import org.json4s._ import org.json4s.JsonDSL._ import org.json4s.jackson.JsonMethods._ import java.io._ object PageRank{ def main(args: Array[String]){ val conf = new SparkConf().setApp...
project-asap/IReS-Platform
asap-tools/spark/scala/src/main/scala/PageRank.scala
Scala
apache-2.0
789
package com.sksamuel.scapegoat.inspections.math import com.sksamuel.scapegoat.PluginRunner import org.scalatest.{ OneInstancePerTest, FreeSpec, Matchers } /** @author Stephen Samuel */ class DivideByOneTest extends FreeSpec with PluginRunner with Matchers with OneInstancePerTest { override val insp...
jasonchaffee/scalac-scapegoat-plugin
src/test/scala/com/sksamuel/scapegoat/inspections/math/DivideByOneTest.scala
Scala
apache-2.0
1,616