code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
/** * Licensed 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 * distributed ...
ksmpartners/ernie
ernie-engine/src/main/scala/com/ksmpartners/ernie/engine/report/ReportManager.scala
Scala
apache-2.0
10,050
/* * Copyright 2013 Turkcell Teknoloji Inc. and individual * contributors by the 'Created by' comments. * 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/li...
Turkcell/swarm
coreservice/src/test/scala/io/swarm/security/shiro/RealmBehaviors.scala
Scala
apache-2.0
4,730
package sandbox.lift.hellodarwin.snippet import _root_.scala.xml.NodeSeq import _root_.net.liftweb.http.S._ import _root_.net.liftweb.http.SHtml._ import _root_.net.liftweb.http.RequestVar import _root_.net.liftweb.util.Helpers._ import _root_.net.liftweb.util.Full class HelloForm3 { object who extends RequestVar(F...
andreum/liftweb
sites/hellodarwin/src/main/scala/sandbox/lift/hellodarwin/snippet/HelloForm3.scala
Scala
apache-2.0
660
import org.oedura.scavro.plugin.AvroCodegenPlugin import sbt._ import sbt.Keys._ import AvroCodegenPlugin.autoImport._ object DemoBuild extends Build { lazy val demoSettings = baseAvroCodegenSettings ++ Seq( // General settings organization := "org.oedura", name := "scavrodemo", version := "1.0.3", ...
oedura/scavro
demo/project/Build.scala
Scala
apache-2.0
1,132
package fat.jar class Test { def callPackageObject: String = to.be.shaded.MyString }
sbt/sbt-assembly
src/sbt-test/shading/scalasigannot/fatlib/src/main/scala/fat/jar/Test.scala
Scala
mit
89
package com.github.jonfreedman.timeseries.performance import java.time.LocalDate import com.github.jonfreedman.timeseries.performance.OpenExchangeAPI.DateParam import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder import org.junit.{Ignore, Test, BeforeClass} import org.junit.Assert._ /** * @author jon */ @I...
jonfreedman/timeseries
src/test/scala/com/github/jonfreedman/timeseries/performance/OpenExchangeIT.scala
Scala
gpl-3.0
997
package de.johoop.xplane.network.protocol import java.nio.ByteBuffer import de.johoop.xplane.network.protocol.Message.ProtocolError trait XPlaneEncoder[T] { def encode(t: T): ByteBuffer } trait XPlaneDecoder[T] { def decode(bytes: ByteBuffer): Either[ProtocolError, T] }
jmhofer/xplane-udp
src/main/scala/de/johoop/xplane/network/protocol/XPlaneCodec.scala
Scala
gpl-3.0
280
package scala.meta.contrib.instances import scala.meta.contrib._ import scala.meta._ trait ReplaceModsInstances { implicit val replaceClassMods: Replace[Defn.Class, Mod] = Replace((a, bs) => a.copy(mods = bs)) implicit val replaceTraitMods: Replace[Defn.Trait, Mod] = Replace((a, bs) => a.copy(mods = bs))...
scalameta/scalameta
scalameta/contrib/shared/src/main/scala/scala/meta/contrib/instances/ReplaceModsInstances.scala
Scala
bsd-3-clause
1,505
package ohnosequences.datasets package object illumina { type SingleEndType = singleEndType.type val SingleEndType: SingleEndType = singleEndType type PairedEndType = pairedEndType.type val PairedEndType: PairedEndType = pairedEndType }
ohnosequences/datasets.illumina
src/main/scala/package.scala
Scala
agpl-3.0
248
package mesosphere.marathon.integration.setup import java.io.File import java.util.Date import akka.actor.ActorSystem import mesosphere.marathon.api.v2.json.{ V2AppDefinition, V2AppUpdate, V2Group, V2GroupUpdate } import mesosphere.marathon.event.http.EventSubscribers import mesosphere.marathon.event.{ Subscribe, Uns...
mikejihbe/marathon
src/test/scala/mesosphere/marathon/integration/setup/MarathonFacade.scala
Scala
apache-2.0
11,888
/* __ *\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2018, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\___/_/ |_/...
ashawley/scala-xml
shared/src/main/scala/scala/xml/ProcInstr.scala
Scala
bsd-3-clause
1,535
package jsky.app.ot.viewer.action import edu.gemini.pot.client.SPDB import jsky.app.ot.OT import jsky.app.ot.vcs.{VcsOtClient, SyncAllDialog, VcsIcon} import jsky.app.ot.viewer.SPViewer import java.awt.event.ActionEvent import javax.swing.Action final class SyncAllAction(viewer: SPViewer) extends AbstractViewerActi...
arturog8m/ocs
bundle/jsky.app.ot/src/main/scala/jsky/app/ot/viewer/action/SyncAllAction.scala
Scala
bsd-3-clause
770
package org.scalatra import org.specs2.mutable.Specification import skinny.micro.data.{ MultiParamsValueReader, StringMapValueReader } import skinny.micro.implicits.DefaultImplicits class ValueReaderSpec extends Specification with DefaultImplicits { val params = Map( "hello" -> "world", "int" -> "1", "...
xerial/skinny-micro
micro/src/test/scala/org/scalatra/ValueReaderSpec.scala
Scala
bsd-2-clause
2,456
package com.github.nscala_time.time import com.github.nscala_time.time.Imports.{richDuration, richSDuration} import org.joda.time.Duration import org.scalacheck.{Prop, Arbitrary, Properties} import scala.concurrent.duration.{Duration => SDuration} object DurationSpec extends Properties("Duration"){ private[this] i...
xuwei-k/nscala-time
src/test/scala/DurationSpec.scala
Scala
apache-2.0
695
package org.scalareflect.reflectdoc import reflectdoc.tools.nsc.doc._ import reflectdoc.tools.nsc.doc.model.TemplateEntity import scala.reflect.semantic.HostContext import reflectdoc.tools.nsc.reporters.ConsoleReporter import scala.reflect.internal.util.FakePos import scala.reflect.internal.FatalError /** The main cl...
VladUreche/reflectdoc
components/core/src/org/scalareflect/reflectdoc/Main.scala
Scala
bsd-3-clause
1,733
/* * DataProblem.scala * * Copyright 2017 wayfarerx <x@wayfarerx.net> (@thewayfarerx) * * 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...
wayfarerx/dreamsleeve
shared/data/src/main/scala/net/wayfarerx/dreamsleeve/data/DataProblem.scala
Scala
apache-2.0
1,053
package com.github.havarunner import org.junit.runner.manipulation.Filter import org.junit.runner.Description import scala.collection.JavaConversions._ import scala.collection.JavaConverters._ /** * Place here code that is indirectly related to running tests. */ private[havarunner] object RunnerHelper { def acce...
havarunner/havarunner
src/main/scala/com/github/havarunner/RunnerHelper.scala
Scala
mit
1,645
package mesosphere.marathon package stream import akka.NotUsed import akka.stream.scaladsl.{Flow, Sink, Source} import mesosphere.AkkaUnitTest import mesosphere.marathon.test.SettableClock import mesosphere.marathon.util.StreamHelpers import org.scalatest.Inside import scala.concurrent.duration._ class TimedEmitterT...
mesosphere/marathon
src/test/scala/mesosphere/marathon/stream/TimedEmitterTest.scala
Scala
apache-2.0
1,844
package org.bitcoins.core.serializers.p2p.messages import org.bitcoins.core.protocol.CompactSizeUInt import org.bitcoins.core.serializers.{RawBitcoinSerializer, RawSerializerHelper} import org.bitcoins.core.p2p.{Inventory, InventoryMessage} import scodec.bits.ByteVector import scala.annotation.tailrec /** * Serial...
bitcoin-s/bitcoin-s-core
core/src/main/scala/org/bitcoins/core/serializers/p2p/messages/RawInventoryMessageSerializer.scala
Scala
mit
2,377
package debop4s.timeperiod.calendars import debop4s.timeperiod._ trait ICalendarPeriodCollectorFilter extends ICalendarVisitorFilter { def collectingMonths: Seq[MonthRangeInYear] def collectingDays: Seq[DayRangeInMonth] }
debop/debop4s
debop4s-timeperiod/src/main/scala/debop4s/timeperiod/calendars/ICalendarPeriodCollectorFilter.scala
Scala
apache-2.0
232
package com.evojam.mongodb.client.model.options import scala.language.implicitConversions import com.mongodb.client.model.{MapReduceAction => MongoMapReduceAction} object MapReduceAction extends Enumeration { type MapReduceAction = Value val Replace, Merge, Reduce = Value implicit def mapReduceAction2Mongo(a...
evojam/mongodb-driver-scala
src/main/scala/com/evojam/mongodb/client/model/options/MapReduceAction.scala
Scala
apache-2.0
542
package edu.rice.habanero.benchmarks.bitonicsort import edu.rice.habanero.actors.{JetlangActor, JetlangActorState, JetlangPool} import edu.rice.habanero.benchmarks.philosopher.PhilosopherAkkaActorBenchmark.ExitMessage import edu.rice.habanero.benchmarks.{Benchmark, BenchmarkRunner, PseudoRandom} import scala.collecti...
shamsmahmood/savina
src/main/scala/edu/rice/habanero/benchmarks/bitonicsort/BitonicSortJetlangActorBenchmark.scala
Scala
gpl-2.0
16,639
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
apache/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/stream/table/LegacyTableSourceTest.scala
Scala
apache-2.0
11,479
package com.cloudray.scalapress.plugin.feed.gbase import org.scalatest.FunSuite import org.scalatest.mock.MockitoSugar import com.cloudray.scalapress.item.Item import com.cloudray.scalapress.TestDatabaseContext /** @author Stephen Samuel */ class GoogleBaseServiceTest extends FunSuite with MockitoSugar { test("tha...
vidyacraghav/scalapress
src/test/scala/com/cloudray/scalapress/plugin/feed/gbase/GoogleBaseServiceTest.scala
Scala
apache-2.0
1,011
/* * 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/http-verbs
http-verbs-common/src/main/scala/uk/gov/hmrc/http/client/package.scala
Scala
apache-2.0
2,262
/** * This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]]. */ // DO NOT EDIT MANUALLY import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError } trait CommandSourceFormats { self: sjsonnew.BasicJsonProtocol => implicit lazy val CommandSourceFormat: JsonFormat[sbt...
Duhemm/sbt
main-command/src/main/contraband-scala/CommandSourceFormats.scala
Scala
bsd-3-clause
950
package filodb.http import scala.collection.JavaConverters._ import scala.concurrent.{Await, Future} import scala.concurrent.duration.FiniteDuration import akka.actor.{ActorRef, ActorSystem} import akka.http.scaladsl.Http import akka.http.scaladsl.model.HttpResponse import akka.http.scaladsl.model.StatusCodes._ impor...
filodb/FiloDB
http/src/main/scala/filodb/http/FiloHttpServer.scala
Scala
apache-2.0
3,294
package com.sksamuel.elastic4s.requests.analyzers import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec class PatternCaptureTokenFilterTest extends AnyWordSpec with TokenFilterApi with Matchers { "PatternAnalyzer builder" should { "set patterns" in { patternCaptureTokenF...
stringbean/elastic4s
elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/requests/analyzers/PatternCaptureTokenFilterTest.scala
Scala
apache-2.0
890
import sbt._ import Keys._ object B extends Build { override def settings = super.settings ++ Seq( organization := "org.example", version := "2.0-SNAPSHOT" ) lazy val root = proj("root", ".") aggregate(a,b) lazy val a = proj("a", "a") dependsOn(b) lazy val b = proj("b", "b") private[this] def proj(id: Stri...
pdalpra/sbt
sbt/src/sbt-test/dependency-management/cache-resolver/changes/def/Build.scala
Scala
bsd-3-clause
416
package com.natalinobusa.tradr import akka.actor.{Actor,Props} class TradrActor extends Actor { val worldActor = context.actorOf(Props[WorldActor]) def receive = { case Start => worldActor ! "risk" case s: String => println("Received message: %s".format(s)) } }
natalinobusa/tradr
src/main/scala/com/natalinobusa/tradr/TradrActor.scala
Scala
apache-2.0
285
package org.oxbow.codebridge import javafx.application.Application import javafx.stage.Stage import javafx.scene.Scene import javafx.scene.layout.BorderPane import java.util.Properties import javafx.fxml.FXMLLoader import scaldi.PropertiesInjector import scaldi.Injectable import scaldi.Module import org.oxbow.codebrid...
eugener/codebridge
codebridge/src/main/scala/org/oxbow/codebridge/CodeBridge.scala
Scala
gpl-3.0
1,727
/* * 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 ...
goldmedal/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V1FallbackWriters.scala
Scala
apache-2.0
4,634
package suiryc.scala.util /** * Hash class companion object. */ object Hash { import scala.language.implicitConversions /** Factory method from bytes array. */ def apply(bytes: Array[Byte]): Hash = { // scalastyle:off null require(bytes != null) // scalastyle:on null new Hash(bytes) } /...
suiryc/suiryc-scala
core/src/main/scala/suiryc/scala/util/Hash.scala
Scala
gpl-3.0
1,542
package org.jetbrains.plugins.scala.lang.resolve import org.jetbrains.plugins.scala.base.ScalaLightCodeInsightFixtureTestAdapter /** * @author mucianm * @since 05.04.16. */ class NamedArgsTest extends ScalaLightCodeInsightFixtureTestAdapter with SimpleResolveTestBase { import SimpleResolveTestBase._ def t...
ilinum/intellij-scala
test/org/jetbrains/plugins/scala/lang/resolve/NamedArgsTest.scala
Scala
apache-2.0
654
package reductions import java.util.concurrent._ import scala.collection._ import org.scalatest.FunSuite import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import common._ import ParallelCountChange.{countChange, _} @RunWith(classOf[JUnitRunner]) class ParallelCountChangeSuite extends FunSuite { ...
masipauskas/coursera-scala
parprog1/reductions/src/test/scala/reductions/ParallelCountChangeSuite.scala
Scala
unlicense
5,571
/*** * 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...
tylerroyal/api-checker
core/src/main/scala/com/rackspace/com/papi/components/checker/step/results/ErrorResult.scala
Scala
apache-2.0
1,668
package uk.org.nbn.nbnv.importer.logging import org.apache.log4j._ import java.io.File object Log { def configure(logDir: String, archivePath: String, logLevel: String) { val level = Level.toLevel(logLevel) val pattern = new PatternLayout("%d{yyyy-MMM-dd HH:mm:ss} %-5p %m%n") val fa = new...
JNCC-dev-team/nbn-importer
importer/src/main/scala/uk/org/nbn/nbnv/importer/logging/Log.scala
Scala
apache-2.0
980
/* * Copyright University of Basel, Graphics and Vision Research Group * * 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 ...
unibas-gravis/scalismo-faces
src/main/scala/scalismo/faces/sampling/face/ParametricImageRenderer.scala
Scala
apache-2.0
937
/** * 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...
evlist/orbeon-forms
src/main/scala/org/orbeon/oxf/xforms/function/xxforms/XXFormsFormatMessage.scala
Scala
lgpl-2.1
2,531
// count the occurence of '7's in a number package level1 import scala.annotation.tailrec object Count7 extends App { def countOccOf7(n: Int): Int = { @tailrec def go(n: Int, count: Int): Int = { n match { case 0 => count case _ => go(n / 10, (count + isSeven(n))) } } ...
boseabhishek/scala_recursion
src/main/scala/level1/Count7.scala
Scala
mit
460
package java.nio private[nio] final class HeapDoubleBuffer private ( _capacity: Int, _array0: Array[Double], _arrayOffset0: Int, _initialPosition: Int, _initialLimit: Int, _readOnly: Boolean) extends DoubleBuffer(_capacity, _array0, _arrayOffset0) { position(_initialPosition) limit(_initialLimit) p...
jmnarloch/scala-js
javalib/src/main/scala/java/nio/HeapDoubleBuffer.scala
Scala
bsd-3-clause
2,913
package org.scalaide.core.internal.lexical import org.eclipse.jface.text._ import org.eclipse.jface.text.rules._ import scala.collection.mutable.ListBuffer import org.eclipse.jface.util.PropertyChangeEvent import org.scalaide.ui.syntax.ScalaSyntaxClasses._ import org.eclipse.jface.preference.IPreferenceStore import or...
Kwestor/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/core/internal/lexical/XmlCDATAScanner.scala
Scala
bsd-3-clause
2,252
package spire.benchmark import scala.{specialized => spec} import scala.util.Random import Random._ import spire.algebra._ import spire.math._ import spire.implicits._ import com.google.caliper.Runner import com.google.caliper.SimpleBenchmark import com.google.caliper.Param object ComplexAddBenchmarks extends MyRu...
lrytz/spire
benchmark/src/main/scala/spire/benchmark/ComplexAddBenchmarks.scala
Scala
mit
2,367
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * 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 * * https://www.apache.org/licenses/LICENSE...
adarro/ddo-calc
subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/feats/SilverFlameExorcism.scala
Scala
apache-2.0
1,939
package com.nthportal.shell package compat import java.util import com.nthportal.shell.compat.{LineParser => JLineParser} import com.nthportal.shell.{LineParser => SLineParser} import scala.collection.JavaConverters private[compat] case class JCompatLineParser(parser: SLineParser) extends JLineParser { override d...
NthPortal/app-shell
src/main/scala/com/nthportal/shell/compat/JCompatLineParser.scala
Scala
apache-2.0
613
package wdl.types import wdl.AstTools.EnhancedAstNode import wdl.{WdlExpression, WdlSyntaxErrorFormatter} import wdl4s.parser.WdlParser import wom.core.WorkflowSource import wom.types.{WomBooleanType, WomFloatType, WomIntegerType, WomType} import wom.values.{WomBoolean, WomFloat, WomInteger, WomValue} import scala.co...
ohsu-comp-bio/cromwell
wdl/src/main/scala/wdl/types/WdlFlavoredWomType.scala
Scala
bsd-3-clause
2,346
/** * Copyright 2016, deepsense.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 ...
deepsense-io/seahorse-workflow-executor
deeplang/src/main/scala/io/deepsense/deeplang/doperables/serialization/DefaultMLWriter.scala
Scala
apache-2.0
2,981
package org.openurp.edu.eams.teach.program.common.copydao.plancourse import org.openurp.edu.teach.plan.MajorPlanCourse import org.openurp.edu.eams.teach.program.major.model.MajorPlanCourseBean //remove if not needed class MajorPlanCourseCopyDaoHibernate extends AbstractPlanCourseCopyDao { protected override def n...
openurp/edu-eams-webapp
plan/src/main/scala/org/openurp/edu/eams/teach/program/common/copydao/plancourse/MajorPlanCourseCopyDaoHibernate.scala
Scala
gpl-3.0
382
package mimir.data import com.typesafe.scalalogging.LazyLogging import org.apache.spark.sql.{ DataFrame, SaveMode } import org.apache.spark.sql.catalyst.TableIdentifier import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan import org.apache.spark.sql.catalyst.analysis.{ UnresolvedRelation, NoSuchDatabaseExce...
UBOdin/mimir
src/main/scala/mimir/data/SparkSchemaProvider.scala
Scala
apache-2.0
2,601
package com.twitter.finagle.param import com.twitter.finagle.Stack import com.twitter.finagle.loadbalancer.LoadBalancerFactory /** * A collection of methods for configuring the Load Balancing (default) module * of Finagle clients. * * @tparam A a [[Stack.Parameterized]] client to configure * * @see [[http://twi...
liamstewart/finagle
finagle-core/src/main/scala/com/twitter/finagle/param/DefaultLoadBalancingParams.scala
Scala
apache-2.0
1,830
import financial.MockServices import scala.concurrent.{Future, Promise} import scala.concurrent.ExecutionContext.Implicits.global import scala.util.Try /** * A simple example of how Promises and Futures can * make a program more concurrent. * * This impl uses a more imperative style onSuccess{..} * * Will be the...
slevine/concurrency-scratchpad
src/main/scala/promises/SimplePromises.scala
Scala
apache-2.0
1,243
/** * 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...
rhauch/kafka
core/src/test/scala/unit/kafka/message/MessageCompressionTest.scala
Scala
apache-2.0
3,534
package org.jetbrains.plugins.scala package decompileToJava import com.intellij.openapi.application.ApplicationManager import org.jetbrains.plugins.scala.lang.psi.api.ScFile import scala.util.Try trait ScalaDecompilerService { def decompile(sourceFile: ScFile): Try[String] } object ScalaDecompilerService { def ...
JetBrains/intellij-scala
scala/integration/java-decompiler/src/org/jetbrains/plugins/scala/decompileToJava/ScalaDecompilerService.scala
Scala
apache-2.0
434
/* * Copyright 2010 Michael Fortin <mike@brzy.org> * * 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 la...
m410/brzy
src/main/scala/org/brzy/webapp/action/args/NotMultipartPostException.scala
Scala
apache-2.0
772
package me.fornever.githublo.common import java.util.Properties case class Configuration(trelloApiKey: String, trelloToken: String) { def toProperties = { val properties = new Properties() properties.setProperty(Configuration.TrelloApiKey, trelloApiKey) properties.setProperty(Configuration.TrelloToken,...
ForNeVeR/githublo
src/main/scala/me/fornever/githublo/common/Configuration.scala
Scala
mit
693
package mosaico.docker import sbt._, Keys._ import sbt.plugins.JvmPlugin import sbtdocker.DockerPlugin import mosaico.config.MosaicoConfigPlugin /** * Plugin for docker builds, see documentation for details. */ object MosaicoDockerPlugin extends AutoPlugin with DownloadSettings with AlpineSettings w...
sciabarra/Mosaico
plugin/src/main/scala/mosaico/docker/MosaicoDockerPlugin.scala
Scala
apache-2.0
628
/* * 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/computations/covidSupport/package.scala
Scala
apache-2.0
1,496
/* * 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 ...
VigneshMohan1/spark-branch-2.3
sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala
Scala
apache-2.0
76,303
package org.squeryl.sharding import java.sql.Connection /** * * User: takeshita * Create: 12/02/15 14:34 */ class DummyShardedSession(val shardName : String, val shardMode : ShardMode.Value) extends ShardedSession { def bindToCurrentThread() {} def unbindFromCurrentThread() {} def use() {} def cleanu...
takezoux2/squeryl-experimental
src/test/scala/org/squeryl/sharding/DummyShardedSession.scala
Scala
apache-2.0
528
/** * * Copyright (c) 2014 Chris Norman * * @author Chris Norman (cmn397@gmail.com) * */ import org.scalatest.FunSuite import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import scala.util.{ Try, Success, Failure } import bioscala.core._ import bioscala.gentypes._ import bioscala.filehand...
chrisnorman/BioScala
src/test/scala/FileHandlersSuite.scala
Scala
mit
3,065
/* * 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/controllers/registration/deceased/DeceasedAddressDetailsUKControllerTest.scala
Scala
apache-2.0
11,935
package chap3 object Exe28 extends App { val tree = Branch(Branch(Leaf(1), Leaf(2)), Leaf(4)) val result = Branch(Branch(Leaf(2), Leaf(3)), Leaf(5)) assert(Tree.map(tree)(_ + 1) == result) }
ponkotuy/FPScala
src/main/scala/chap3/Exe28.scala
Scala
unlicense
198
package dao.generic import generated.Tables.profile.api._ import play.api.db.slick._ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.{Future, _} /** * Generic Strong DAO implementation */ abstract class GenericDaoAutoIncImpl[T <: Table[E] with IdentifyableTable[PK], E <: EntityA...
bravegag/play-authenticate-usage-scala
app/dao/generic/GenericDaoAutoIncImpl.scala
Scala
apache-2.0
1,246
/* * 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 ...
tillrohrmann/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/utils/TestContextTableFactory.scala
Scala
apache-2.0
2,707
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package play.api.test import org.specs2.mock.Mockito import org.specs2.mutable._ import play.api.Application import play.api.inject.Injector import scala.language.reflectiveCalls class InjectingSpec extends Specification with Mockito { class Foo ...
wegtam/playframework
testkit/play-test/src/test/scala/play/api/test/InjectingSpec.scala
Scala
apache-2.0
792
import scala.collection.immutable import immutable.Bag import scala.util.hashing.Hashing /** * Created by nicolasstucki on 25/05/15. */ object Main { def main (args: Array[String]) { object StrSize extends Ordering[String] with Hashing[String] { def hash(x: String): Int = x.size ...
nicolasstucki/multisets
src/main/scala/Main.scala
Scala
bsd-3-clause
673
def species(using quoted.Quotes) = '{ case object Bar // error case class FooT() // error ${ case object Baz // error ??? } FooT() }
dotty-staging/dotty
tests/neg-macros/i7068-c.scala
Scala
apache-2.0
151
package rugloom.rug /** * RugLoom - Explorative analysis pipeline prototype * Created by oliverr on 8/7/2015. */ object Genotype { } case class Genotype(variation: Variation, zygosity: Int) { override def toString: String = "" + variation + ":" + zygosity }
curoli/rugloom-client
app/rugloom/rug/GenoType.scala
Scala
mit
268
package com.twitter.webbing.route import com.twitter.util.Await import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.{AssertionsForJUnit, JUnitRunner} @RunWith(classOf[JUnitRunner]) class PathRouterTest extends FunSuite with AssertionsForJUnit { import PathRouter._ trait Test...
finagle/webbing
route/src/test/scala/com/twitter/webbing/route/PathRouterTest.scala
Scala
apache-2.0
3,774
package shapeless.contrib.scalachecktests import org.scalacheck.{Arbitrary,Gen,Properties,Shrink,Test} import org.scalacheck.Prop.forAll import shapeless.contrib.scalacheck._ object ArbitrarySpec extends Properties("Arbitrary") { private val ok = (_: Any) => true sealed trait Tree[A] case class Node[A](left: ...
typelevel/shapeless-contrib
scalacheck/src/test/scala/ShrinkSpec.scala
Scala
mit
1,090
/* * 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/utils/events/AggregatingSignal.scala
Scala
gpl-3.0
2,521
package org.salgo.sorting import scala.reflect.ClassTag object HeapSort extends GeneralSortingAlgorithm { def sort[T <: Any : ClassTag](seq: Array[T])(implicit ev: T => Ordered[T]) : Unit = { this.heapify(seq, seq.length) var end = seq.length - 1 while (end > 0) { this.swap(seq, 0, end) end ...
ascensio/salgo
src/org.salgo/sorting/HeapSort.scala
Scala
apache-2.0
1,137
package net.rrm.ehour.ui.manage.lock import java.util.Date import net.rrm.ehour.domain.TimesheetLock object LockAdminBackingBeanObjectMother { def create = { val lock = new TimesheetLock() lock.setDateStart(new Date()) lock.setDateEnd(new Date) new LockAdminBackingBean(lock) } }
momogentoo/ehour
eHour-wicketweb/src/test/scala/net/rrm/ehour/ui/manage/lock/LockAdminBackingBeanObjectMother.scala
Scala
gpl-2.0
304
/** * Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0 * See accompanying LICENSE file. */ package kafka.manager.utils import TopicErrors._ import kafka.manager.ActorModel.TopicDescription import kafka.manager.TopicIdentity /** * @author hiral */ class TestCreateTopic extends CuratorAware...
patricklucas/kafka-manager
test/kafka/manager/utils/TestCreateTopic.scala
Scala
apache-2.0
3,373
package registration import _root_.controllers.AssetsComponents import _root_.models.NewsstandShardConfig import akka.actor.ActorSystem import cats.effect.IO import com.gu.AppIdentity import com.softwaremill.macwire._ import metrics.{CloudWatchMetrics, Metrics} import play.api.ApplicationLoader.Context import play.api...
guardian/mobile-n10n
registration/app/registration/RegistrationApplicationLoader.scala
Scala
apache-2.0
3,154
/* 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-core/src/main/scala/com/twitter/scalding/Job.scala
Scala
apache-2.0
21,157
package slide import scala.scalajs.js import org.scalajs.jquery._ import org.scalajs.dom._ import js.annotation.JSExport object AsInt { def unapply(s: String): Option[Int] = { try { Some(s.toInt) } catch { case e: NumberFormatException => None } } } @JSExport object ScalaJSSlide extends...
kmizu/slide_cho_tuning
src/main/scala/slide/ScalaJSSlide.scala
Scala
gpl-3.0
2,287
package ru.maizy.ambient7.core.tests.config.reader /** * Copyright (c) Nikita Kovaliov, maizy.ru, 2017 * See LICENSE.txt for details. */ import ru.maizy.ambient7.core.config.options.DbOptions import ru.maizy.ambient7.core.config.reader.UniversalConfigReader trait SampleReaders { class ReaderWithSimpleOpts exte...
maizy/ambient7
core/src/test/scala/ru/maizy/ambient7/core/tests/config/reader/SampleReaders.scala
Scala
apache-2.0
3,305
/******************************************************************************* * Copyright (c) 2016 Andreas Wagner. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * ht...
MultiDeviceCTT/MCTT
MCTT-Translator/src/main/scala/mctt/emitter/qml/MappingParser.scala
Scala
epl-1.0
5,537
package squants.energy import squants.mass.{ChemicalAmount, Moles} import squants.{AbstractQuantityNumeric, Dimension, PrimaryUnit, Quantity, SiUnit, UnitConverter, UnitOfMeasure} /** * * @author Nicolas Vinuesa * @since 1.4 * * @param value Double */ final class MolarEnergy private (val value: Double, va...
underscorenico/squants
shared/src/main/scala/squants/energy/MolarEnergy.scala
Scala
apache-2.0
1,456
package io.scrapeyard.scrapers import io.scrapeyard.MomondoScraper import org.scalatest.{Matchers, WordSpecLike} class MomondoSpec extends WordSpecLike with Matchers with TestParams { "Momondo scraper" should { "find cheapest flight" in { val scraper = new MomondoScraper() val res = scraper.scrape(p...
zoltanmaric/scrapeyard
server/src/test/scala/io/scrapeyard/scrapers/MomondoSpec.scala
Scala
gpl-2.0
480
package inverse_macros.continuations import org.scalatest.junit.JUnitSuite import org.junit.Test import org.junit.Assert.assertEquals import scala.annotation._ import scala.collection.generic.CanBuildFrom import scala.language.{higherKinds, implicitConversions} import scala.util.control.ControlThrowable class Patter...
hiroshi-cl/InverseMacros
inverse_macros_libraries/src/test/scala/inverse_macros/continuations/PatternMatching.scala
Scala
bsd-2-clause
2,230
package com.mayreh.kaiyote import scopt.OptionParser sealed abstract class Command object Command { case object Local extends Command case class Help(helpOption: HelpOption) extends Command } case class HelpOption(targetCommand: Helps.Command) case class Arguments( command: Option[Command] = None) object Arg...
ocadaruma/kaiyote
cli/src/main/scala/com/mayreh/kaiyote/Arguments.scala
Scala
apache-2.0
811
package com.twitter.finatra.benchmarks import com.twitter.inject.Test class RoutingServiceBenchmarkTest extends Test { "test" in { val benchmark = new RoutingServiceBenchmark() benchmark.testRoutingController() } }
tom-chan/finatra
benchmarks/src/test/scala/com/twitter/finatra/benchmarks/RoutingServiceBenchmarkTest.scala
Scala
apache-2.0
230
/*********************************************************************** * Copyright (c) 2013-2016 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 is ...
mdzimmerman/geomesa
geomesa-tools/src/main/scala/org/locationtech/geomesa/tools/accumulo/ingest/AutoIngestAvro.scala
Scala
apache-2.0
2,591
package org.scalameta.adt import scala.language.experimental.macros import scala.annotation.StaticAnnotation import org.scalameta.invariants.nonEmpty import scala.reflect.macros.whitebox.Context import scala.collection.mutable.ListBuffer import org.scalameta.adt.{Reflection => AdtReflection} class root extends Static...
mdemarne/scalameta
foundation/src/main/scala/org/scalameta/adt/Adt.scala
Scala
bsd-3-clause
12,653
/* * */ package com.mind_era.knime.vega /** * The batch processing package for the Vega framework. * * @author Gabor Bakos */ package object batch { }
aborg0/com.mind_era.knime.vega.batch
com.mind_era.knime.vega.batch/src/main/scala/com/mind_era/knime/vega/batch/package.scala
Scala
agpl-3.0
158
package spire package math import org.scalatestplus.scalacheck.ScalaCheckDrivenPropertyChecks import spire.implicits._ import spire.laws.arb.{ complex, real } import org.scalatest.matchers.should.Matchers import org.scalatest.propspec.AnyPropSpec class ComplexCheck extends AnyPropSpec with Matchers with ScalaCheckDr...
non/spire
tests/src/test/scala/spire/math/ComplexCheck.scala
Scala
mit
5,662
package com.raquo.dombuilder.generic.nodes import com.raquo.domtypes trait Text[N, TextRef <: BaseRef, BaseRef] extends Node[N, TextRef, BaseRef] with domtypes.generic.nodes.Text { this: N => }
raquo/scala-dom-builder
shared/src/main/scala/com/raquo/dombuilder/generic/nodes/Text.scala
Scala
mit
200
package scala.reflect package macros object blackbox extends Compat { type Context = scala.reflect.macros.Context }
xeno-by/scalamacros
tests/api/src/main/scala-2.10/scala/macros/blackbox.scala
Scala
bsd-3-clause
119
/* * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - Redistributions of source code must retain the above copyright * no...
benhutchison/scala-swing
examples/src/main/scala/scala/swing/examples/tutorials/components/BorderDemo.scala
Scala
bsd-3-clause
7,045
/* *\\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2015, G...
derekmorr/squants
shared/src/main/scala/squants/motion/AngularVelocity.scala
Scala
apache-2.0
2,993
/** * 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...
brunobuzzi/orbeon-forms
xforms/jvm/src/main/scala/org/orbeon/oxf/xforms/function/xxforms/XXFormsListInstances.scala
Scala
lgpl-2.1
1,477
package godot.imperative import scala.language.implicitConversions import scala.concurrent.{Await, ExecutionContext, Future, Promise} import scala.concurrent.duration._ import scala.language.postfixOps /*** Data-flow future implementation * * Data-flow futures have been implemented using a singleton object and t...
kikofernandez/kikofernandez.github.io
files/godot/godot/src/main/scala/godot/imperative/ImperativeFlow.scala
Scala
mit
8,138
package glaux.neuralnetwork.layers import glaux.linearalgebra.Dimension import glaux.neuralnetwork._ case class Regression(inDimension: Dimension.Row) extends LossLayer { def loss(target: Output, actual: Output): (Loss, InGradient) = { assert(target.dimension == outDimension && actual.dimension == outDimension)...
A-Noctua/glaux
neural-network/src/main/scala/glaux/neuralnetwork/layers/Regression.scala
Scala
mit
683
package org.monarchinitiative.dosdp import org.monarchinitiative.dosdp.cli.Generate import org.phenoscape.scowl._ import org.semanticweb.owlapi.model.{OWLAnnotationAssertionAxiom, OWLAnnotationProperty, OWLClass} import org.semanticweb.owlapi.vocab.OWLRDFVocabulary import zio.test.Assertion._ import zio.test._ import ...
INCATools/dosdp-tools
src/test/scala/org/monarchinitiative/dosdp/IRIAnnotationValuesTest.scala
Scala
mit
1,520
/* * 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 ...
WeichenXu123/spark
sql/hive/src/test/scala/org/apache/spark/sql/hive/client/VersionsSuite.scala
Scala
apache-2.0
46,300
/* * Copyright 2014 porter <https://github.com/eikek/porter> * * 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...
eikek/porter
api/src/main/scala/porter/model/Credentials.scala
Scala
apache-2.0
3,780
/* * 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 ...
starpit/openwhisk
tests/src/test/scala/system/basic/WskPackageTests.scala
Scala
apache-2.0
5,467
package us.feliscat.m17n import us.feliscat.text.StringOption import us.feliscat.text.normalizer.ja.JapaneseNormalizedString /** * <pre> * Created on 2017/02/04. * </pre> * * @author K.Sakamoto */ trait Japanese extends MultiLingual with JapaneseLocale { override def normalize(textOpt: StringOption): St...
ktr-skmt/FelisCatusZero-multilingual
libraries/src/main/scala/us/feliscat/m17n/Japanese.scala
Scala
apache-2.0
394