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
/* * Copyright 2020 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/time
src/main/scala/uk/gov/hmrc/time/DateConverter.scala
Scala
apache-2.0
1,854
package com.mesosphere.cosmos import _root_.io.circe.jawn.decode import _root_.io.circe.syntax._ import _root_.io.circe.Decoder import _root_.io.circe.Encoder import _root_.io.circe.Printer import com.mesosphere.cosmos.rpc.v1.model.SearchResult import com.mesosphere.universe import com.mesosphere.universe.bijection.Un...
dcos/cosmos
cosmos-test-common/src/test/scala/com/mesosphere/cosmos/SelectedPackageSpec.scala
Scala
apache-2.0
3,031
package specs.fast import org.scalacheck.Properties import org.scalacheck.Prop.forAll object JNumberSpec extends Properties("fast.JNumber") { import org.json4s.ast.fast._ property("Int") = forAll { (i: Int) => JNumber(i).value == i.toString } property("Long") = forAll { (l: Long) => JNumber(l).valu...
json4s/json4s-ast
js/src/test/scala/specs/fast/JNumberSpec.scala
Scala
apache-2.0
871
/** * Copyright (C) 2016 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 License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
Verizon/trapezium
simulation/src/main/scala/com/verizon/trapezium/datasimulation/kafka/SaveRdd.scala
Scala
apache-2.0
1,872
package edu.gemini.auxfile.osgi import org.osgi.framework.{BundleContext, BundleActivator} final class Activator extends BundleActivator { // These three Activators used to live in separate bundles. We'll just // call them one by one from our bundle's official registered Activator. private val subAct = List( ...
arturog8m/ocs
bundle/edu.gemini.auxfile.workflow/src/main/scala/edu/gemini/auxfile/osgi/Activator.scala
Scala
bsd-3-clause
810
package com.transport.domain.protocol import com.transport.domain.otp.OTPGraphService import org.opentripplanner.common.model.GenericLocation import org.opentripplanner.routing.core.{RoutingRequest, TraverseMode, TraverseModeSet} import org.opentripplanner.routing.services.GraphService import org.opentripplanner.routi...
ksarath/transport-using-opentripplanner
src/test/scala/com/transport/domain/protocol/NearByTransitStopsSpec.scala
Scala
apache-2.0
1,384
/* * 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...
dotty-staging/scalatest
scalatest-test/src/test/scala/org/scalatest/AsyncWordSpecLikeSpec.scala
Scala
apache-2.0
42,030
package com.blockcypher.api.marshallers import com.blockcypher.api.protocol.{BlockCypherInputImpl, BlockCypherInput} import org.scalacoin.currency.Satoshis import spray.json._ /** * Created by chris on 12/19/15. */ object BlockCypherInputMarshaller extends DefaultJsonProtocol with MarshallerUtil { implicit obj...
Christewart/blockcypher-api
src/main/scala/com/blockcypher/api/marshallers/BlockCypherInputMarshaller.scala
Scala
mit
2,203
package uk.co.turingatemyhamster.shortbol import java.io.StringWriter import sharedAst._ import shorthandAst._ import uk.co.turingatemyhamster.shortbol.ops.{PrettyPrinter, ShortbolParser} import utest._ /** * * * @author Matthew Pocock */ object Regressions extends TestSuite { override def tests = TestSuit...
drdozer/shortbol
shortbol/core/shared/src/test/scala/uk/co/turingatemyhamster/shortbol/Regressions.scala
Scala
apache-2.0
1,238
package common.validation import cats.data.Validated.{Invalid, Valid} import cats.data.{NonEmptyList, Validated} import cats.syntax.apply._ import cats.syntax.traverse._ import cats.instances.list._ object ErrorOr { type ErrorOr[+A] = Validated[NonEmptyList[String], A] implicit class ShortCircuitingFlatMap[A](va...
ohsu-comp-bio/cromwell
common/src/main/scala/common/validation/ErrorOr.scala
Scala
bsd-3-clause
10,779
trait T2 { def foo(x: String, y: String*)(z: Boolean*)(u: Int, l: Int*): Int }
som-snytt/dotty
tests/pos/t1625.scala
Scala
apache-2.0
80
package org.jetbrains.plugins.scala package codeInspection package fileNameInspection import com.intellij.codeInspection.{ProblemDescriptor, LocalQuickFix} import com.intellij.openapi.project.Project import java.lang.String import lang.psi.api.ScalaFile import com.intellij.refactoring.rename.RenameProcessor import co...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/codeInspection/fileNameInspection/ScalaRenameFileQuickFix.scala
Scala
apache-2.0
1,053
/* * 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 ...
esi-mineset/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/ui/SQLAppStatusStore.scala
Scala
apache-2.0
4,642
/******************************************************************************* * Copyright (C) 2012 Łukasz Szpakowski. * * 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 ver...
luckboy/LkbGraph
src/main/org/lkbgraph/immutable/TreeLike.scala
Scala
lgpl-3.0
6,754
package gapt.cutintro import gapt.expr._ import gapt.expr.formula.All import gapt.expr.formula.Ex import gapt.expr.formula.Formula import gapt.proofs.Sequent import gapt.proofs.gaptic._ import gapt.proofs.gaptic.{ Lemma, guessLabels, tactics } import gapt.proofs.gaptic.tactics._ import gapt.proofs.lk.LKProof /** * Co...
gapt/gapt
core/src/main/scala/gapt/cutintro/proveWithPi2Cut.scala
Scala
gpl-3.0
3,419
/* Copyright 2013 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...
nvoron23/summingbird
summingbird-storm/src/main/scala/com/twitter/summingbird/storm/package.scala
Scala
apache-2.0
732
package com.mesosphere.cosmos.finch import cats.data.NonEmptyList import com.mesosphere.cosmos.http.MediaType import io.circe.Encoder import io.circe.Json /** Associates a media type with an [[io.circe.Encoder]] instance. */ trait MediaTypedEncoder[A] { /// Describes the JSON encoder associated with this type. va...
takirala/cosmos
cosmos-common/src/main/scala/com/mesosphere/cosmos/finch/MediaTypedEncoder.scala
Scala
apache-2.0
1,162
/* * 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/domain
src/main/scala/uk/gov/hmrc/domain/AwrsUtr.scala
Scala
apache-2.0
1,055
/* * The MIT License * * Copyright (c) 2022 Fulcrum Genomics LLC * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to us...
fulcrumgenomics/fgbio
src/test/scala/com/fulcrumgenomics/bam/pileup/RandomAccessPileupBuilderTest.scala
Scala
mit
3,003
package com.yetu.oauth2provider.oauth2.services import com.yetu.oauth2provider.signature.models.{ SignatureException, SignatureSyntaxException } import com.yetu.oauth2provider.signature.services.SignatureService import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import scalaoauth...
yetu/oauth2-provider
app/com/yetu/oauth2provider/oauth2/services/SignatureHandler.scala
Scala
mit
1,377
package org.jetbrains.plugins.scala.testingSupport.scalatest.fileStructureView import org.jetbrains.plugins.scala.lang.structureView.element.Test._ import org.jetbrains.plugins.scala.testingSupport.scalatest.ScalaTestTestCase trait PropSpecFileStructureViewTest extends ScalaTestTestCase { private val className = "...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/testingSupport/scalatest/fileStructureView/PropSpecFileStructureViewTest.scala
Scala
apache-2.0
1,193
/** * _____ _ _ _____ _ * | __| |_ ___|_|___ ___| __|___| |_ _ ___ ___ * |__ | _| _| | | . |__ | . | | | | -_| _| * |_____|_| |_| |_|_|_|_ |_____|___|_|\\_/|___|_| * |___| * * File name: Evalu...
MikaelMayer/StringSolver
src/main/scala/ch/epfl/lara/synthesis/stringsolver/Evalutator.scala
Scala
gpl-2.0
8,894
package alexsmirnov.stream import scala.collection.JavaConverters._ import org.scalatest.FlatSpec import org.scalatest.concurrent.Eventually import org.scalatest.prop.PropertyChecks import org.reactivestreams._ import java.util.concurrent.ConcurrentLinkedQueue import java.util.concurrent.atomic.AtomicInteger class Pr...
alexsmirnov/printrbot-g2-console
src/test/scala/alexsmirnov/stream/ProcessorTest.scala
Scala
bsd-3-clause
1,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 may ...
tophua/spark1.52
mllib/src/test/scala/org/apache/spark/ml/tuning/TrainValidationSplitSuite.scala
Scala
apache-2.0
6,219
package net.ellisw.quvault.server.scope import scala.collection.mutable.ArrayBuffer import scala.xml._ import net.ellisw.quvault.server.scope._ class QuRendererMathlib(spec: QuRenderSpec, result: QuRenderResult, state: QuRenderState) extends QuRenderer(spec, result, state) { override protected def render(node:...
ellis/2009QuVault
quvault/server-scope/src/main/scala/net/ellisw/quvault/server/scope/QuRendererMathlib.scala
Scala
gpl-3.0
8,324
/* * 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 ...
pgandhi999/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
Scala
apache-2.0
33,430
package net.virtualvoid.bytecode import org.specs._ object BytecodeCompilerSpecs extends Specification{ def compiledTests(compiler: net.virtualvoid.bytecode.backend.ByteletCompiler) { import Bytecode._ import Bytecode.Implicits._ import Bytecode.Instructions._ import Methods._ val boxInt:Me...
jrudolph/bytecode
src/test/scala/net/virtualvoid/bytecode/BytecodeCompilerSpecs.scala
Scala
bsd-2-clause
12,934
package org.scalaide.core.internal.builder import org.eclipse.core.resources.IResource import org.eclipse.core.resources.IMarker import org.scalaide.core.resources.MarkerFactory import org.scalaide.core.resources.MarkerFactory.Position import org.scalaide.core.resources.MarkerFactory.NoPosition import org.scalaide.cor...
stephenh/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/core/internal/builder/BuildProblemMarker.scala
Scala
bsd-3-clause
2,033
package uk.gov.gds.ier.transaction.ordinary.previousAddress import uk.gov.gds.ier.test.ControllerTestSuite import uk.gov.gds.ier.model.{PartialManualAddress, PartialAddress, MovedHouseOption, PartialPreviousAddress} class PreviousAddressFirstControllerTests extends ControllerTestSuite { behavior of "PreviousAddres...
michaeldfallen/ier-frontend
test/uk/gov/gds/ier/transaction/ordinary/previousAddress/PreviousAddressFirstControllerTests.scala
Scala
mit
15,401
/* * 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/pbik-frontend
test/support/StubBikListService.scala
Scala
apache-2.0
1,222
/* * Copyright 2015-2016 IBM 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 applicable law or agree...
nwspeete-ibm/openwhisk
tests/src/whisk/core/cli/test/ApiGwTests.scala
Scala
apache-2.0
12,102
package ir.xamin.packet.receive import ir.xamin.PaymentPolicy import ir.xamin.packet.reply.{ApplianceSet => ReplyApplianceSet} import ir.xamin.providers.ApplianceSetProvider import ir.xamin.Appliance import scala.xml._ import org.jivesoftware.smack.packet.IQ /** this class ables rms to tell peace about new appliances...
XaminProject/peace
src/main/scala/ir/xamin/packet/receive/ApplianceSet.scala
Scala
mit
6,196
package com.twitter.finagle.exp.mysql import com.twitter.finagle.exp.mysql.transport.{Buffer, Packet} import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner trait HexDump { val hex: String // parse multi-line hex dump where packets are delimited by '|' lazy val pack...
lukiano/finagle
finagle-mysql/src/test/scala/com/twitter/finagle/mysql/unit/ResultTest.scala
Scala
apache-2.0
5,875
package reductions import org.scalameter._ import common._ import scala.annotation.tailrec object LineOfSightRunner { val standardConfig = config( Key.exec.minWarmupRuns -> 40, Key.exec.maxWarmupRuns -> 80, Key.exec.benchRuns -> 100, Key.verbose -> true ) withWarmer (new Warmer.Default) def m...
anand-singh/scala-parallel
reductions/src/main/scala/reductions/LineOfSight.scala
Scala
apache-2.0
3,936
class A { var x = 3 }
xeno-by/old-scalameta-sbt
sbt/src/sbt-test/source-dependencies/var/changes/A.scala
Scala
bsd-3-clause
22
package org.jetbrains.plugins.scala.lang.psi.impl.toplevel.typedef import org.jetbrains.plugins.scala.lang.psi.types.Signature private[typedef] trait SignatureSink[T <: Signature] { def put(signature: T): Unit }
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/toplevel/typedef/SignatureSink.scala
Scala
apache-2.0
216
package napplelabs.mockdbs.views import com.explodingpixels.macwidgets._ import com.explodingpixels.widgets.PopupMenuCustomizerUsingStrings import javax.swing.{ImageIcon, JPanel} class SourceListView { val basicNeuronsCat = new SourceListCategory( "Basic Neurons" ) val blueSliImageIcon = new ImageIcon( class...
zk/mockdbs-scala
src/main/scala/napplelabs/mockdbs/views/SourceListView.scala
Scala
gpl-2.0
1,469
/** * Copyright (C) 2010-2011 LShift Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...
lshift/diffa
kernel/src/main/scala/net/lshift/diffa/kernel/participants/AddressDrivenFactory.scala
Scala
apache-2.0
1,376
package com.github.mdr.mash.ns.collections import java.util.regex.Pattern import com.github.mdr.mash.evaluator.ToStringifier import com.github.mdr.mash.functions._ import com.github.mdr.mash.inference._ import com.github.mdr.mash.ns.core.objectClass.GrepMethod import com.github.mdr.mash.ns.core.{ ObjectClass, StringC...
mdr/mash
src/main/scala/com/github/mdr/mash/ns/collections/GrepFunction.scala
Scala
mit
5,871
package de.htwg.zeta.parser.diagram.check import de.htwg.zeta.parser.check.ErrorCheck import de.htwg.zeta.parser.check.ErrorCheck.ErrorMessage import de.htwg.zeta.parser.check.FindDuplicates import de.htwg.zeta.parser.diagram.DiagramParseTree import de.htwg.zeta.parser.diagram.NodeParseTree case class CheckDuplicateN...
Zeta-Project/zeta
api/parser/src/main/scala/de/htwg/zeta/parser/diagram/check/CheckDuplicateNodes.scala
Scala
bsd-2-clause
656
/* * 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/controllers/responsiblepeople/address/NewHomeAddressNonUKControllerSpec.scala
Scala
apache-2.0
14,701
package specs.conduit import com.plasmaconduit.conveyance._ import org.specs2.mutable._ class ConduitOnErrorResumeNext extends Specification { "Performing onErrorResumeNext on a conduit that contains a value" should { "produce a conduit containing that value" in { var pumped = Seq[Int]() Conduit.of...
plasmaconduit/conveyance
src/test/scala/specs/conduit/ConduitOnErrorResumeNext.scala
Scala
mit
1,815
import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ import org.apache.spark.SparkConf import org.apache.spark.sql.SQLContext import org.apache.spark.sql.functions._ import com.databricks.spark.avro._ object WarehouseFromDatabase { def sqlString(multilineString: String) : String = { multil...
edpaget/spark-scala-template
src/main/scala/WarehouseFromDatabase.scala
Scala
apache-2.0
1,822
package com.github.tanacasino.time4s.wrappers.objects import java.time._ import java.time.temporal.TemporalAccessor import java.time.format.DateTimeFormatter object StaticZonedDateTime extends StaticZonedDateTime trait StaticZonedDateTime { def from(temporal: TemporalAccessor): ZonedDateTime = ZonedDateTime.fr...
tanacasino/time4s
src/main/scala/com/github/tanacasino/time4s/wrappers/objects/StaticZonedDateTime.scala
Scala
apache-2.0
1,749
/* * 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
core/src/main/scala/org/apache/spark/ui/WebUI.scala
Scala
apache-2.0
8,843
package com.sksamuel.scapegoat.inspections.collections import com.sksamuel.scapegoat.InspectionTest /** @author Stephen Samuel */ class PreferSetEmptyTest extends InspectionTest { override val inspections = Seq(new PreferSetEmpty) "set apply" - { "should report warning" in { val code = """object Test...
sksamuel/scalac-scapegoat-plugin
src/test/scala/com/sksamuel/scapegoat/inspections/collections/PreferSetEmptyTest.scala
Scala
apache-2.0
1,494
/** * This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]]. */ // DO NOT EDIT MANUALLY package sbt.internal.bsp /** * Position in a text document expressed as zero-based line and zero-based character offset. * A position is between two characters like an 'insert' cursor in a editor...
xuwei-k/xsbt
protocol/src/main/contraband-scala/sbt/internal/bsp/Position.scala
Scala
apache-2.0
1,353
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2018, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
ashawley/scala-xml
shared/src/main/scala/scala/xml/Attribute.scala
Scala
bsd-3-clause
3,598
package im.tox.antox.wrapper import java.io.File import java.sql.Timestamp import im.tox.antox.utils.TimestampUtils import im.tox.tox4j.core.enums.ToxStatus case class FriendInfo( online: Boolean, name: String, status: String, statusMessage: String, key: String, avatar: Option[File], receivedAvatar: Bo...
ak-67/Antox
app/src/main/scala/im/tox/antox/wrapper/FriendInfo.scala
Scala
gpl-3.0
1,064
package eventstore package core package operations import scala.reflect.ClassTag import scala.util.{ Failure, Success } import Inspection.Decision.Stop private[eventstore] abstract class ErrorInspection[I <: In, E](implicit val in: ClassTag[I], error: ClassTag[E]) extends Inspection { def expected = in.runtime...
EventStore/EventStore.JVM
core/src/main/scala/eventstore/core/operations/ErrorInspection.scala
Scala
bsd-3-clause
469
/* * Copyright 2014–2017 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...
drostron/quasar
marklogic/src/main/scala/quasar/physical/marklogic/fs/data.scala
Scala
apache-2.0
15,912
//default = true def foo(x: Int) = /*start*/1/*end*/ /* //default = true def foo(x: Int, param: Int = 1) = /*start*/param/*end*/ */
LPTK/intellij-scala
testdata/introduceParameter/param/AddDefaultParam.scala
Scala
apache-2.0
131
/* * Copyright (c) 2014-2020 by The Monix Project Developers. * See the project homepage at: https://monix.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...
alexandru/monifu
monix-eval/shared/src/test/scala/monix/eval/TaskConversionsKSuite.scala
Scala
apache-2.0
2,693
/* * ComponentHolder.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.lucre.swin...
Sciss/LucreSwing
shared/src/main/scala/de/sciss/lucre/swing/impl/ComponentHolder.scala
Scala
agpl-3.0
790
package com.github.ldaniels528.trifecta.sjs.controllers import com.github.ldaniels528.trifecta.sjs.controllers.GlobalLoading._ import com.github.ldaniels528.trifecta.sjs.controllers.InspectController._ import com.github.ldaniels528.trifecta.sjs.models._ import com.github.ldaniels528.trifecta.sjs.services.{BrokerServic...
ldaniels528/trifecta
app-js/src/main/scala/com/github/ldaniels528/trifecta/sjs/controllers/InspectController.scala
Scala
apache-2.0
15,942
package slick.jdbc.meta import java.sql._ import slick.jdbc.ResultSetAction import slick.driver.JdbcTypesComponent /** A wrapper for a row in the ResultSet returned by DatabaseMetaData.getVersionColumns(). */ case class MVersionColumn( column: String, sqlType: Int, typeName: String, columnSize: Option[Int], buffe...
dotta/slick
slick/src/main/scala/slick/jdbc/meta/MVersionColumn.scala
Scala
bsd-2-clause
906
/* * This file is part of Apparat. * * Copyright (C) 2010 Joa Ebert * http://www.joa-ebert.com/ * * 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 Lice...
joa/apparat
apparat-core/src/main/scala/apparat/graph/immutable/Graph.scala
Scala
lgpl-2.1
5,888
package com.github.leifker.spark.sentiment import com.github.leifker.spark.sentiment.test.UnitTest import org.scalatest.FlatSpec /** * Created by dleifker on 2/16/17. */ class NLPUtilsTest extends FlatSpec { "NLPUtils" should "be able to detect English" taggedAs(UnitTest) in { assert(NLPUtils.isEnglish("Th...
leifker/geo-sentiment
spark/src/test/scala/com/github/leifker/spark/sentiment/NLPUtilsTest.scala
Scala
gpl-3.0
778
package uk.ac.surrey.xw.extension.prim import org.nlogo.api.Argument import org.nlogo.api.Context import org.nlogo.api.Dump import org.nlogo.api.Reporter import org.nlogo.core.LogoList import org.nlogo.core.Syntax import org.nlogo.core.Syntax.ListType import org.nlogo.core.Syntax.NormalPrecedence import org.nlogo.core...
CRESS-Surrey/eXtraWidgets
xw/src/main/scala/uk/ac/surrey/xw/extension/prim/Of.scala
Scala
mit
1,445
package oauthorize.service import oauthorize.utils._ import oauthorize.model._ import oauthorize.hash._ import java.util.UUID import java.security.SecureRandom import org.mindrot.jbcrypt.BCrypt import scala.concurrent.{ Future, ExecutionContext } trait ClientSecretHasher extends SecretHasher class Sha256ClientSecretH...
adaptorel/oauthorize
oauthorize-core/src/main/scala/models/service.scala
Scala
apache-2.0
7,316
/* * 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 ...
StephanEwen/incubator-flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/rules/logical/ConvertToNotInOrInRuleTest.scala
Scala
apache-2.0
5,763
package test package sample import akka.actor.{ ActorSystem, Actor, Props, ActorRef } import scala.util.Random import java.util.concurrent.CountDownLatch case class Sort(input: Array[Int]) case class Result(res: Array[Int]) class QuickSort extends Actor { var result_part1 = Array[Int]() var result_part2 = Array[...
samira-t/Bita
src/test/scala/sample/QuickSort.scala
Scala
apache-2.0
2,021
package org.scalaide.extensions package autoedits import org.junit.Test import org.scalaide.core.text.Document import org.scalaide.core.text.TextChange class SurroundBlockTest extends AutoEditTests { override def autoEdit(doc: Document, change: TextChange) = new SurroundBlock { override val document = doc ...
dragos/scala-ide
org.scala-ide.sdt.core.tests/src/org/scalaide/extensions/autoedits/SurroundBlockTest.scala
Scala
bsd-3-clause
5,307
package eventstreams.support /* * Copyright 2014-15 Intelix Pty Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless req...
intelix/eventstreams
es-sources/es-source-file/src/test/scala/eventstreams/support/FileTailerTestSupport.scala
Scala
apache-2.0
5,478
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); yo...
TiVo/kafka
core/src/test/scala/integration/kafka/api/EndToEndClusterIdTest.scala
Scala
apache-2.0
9,847
/* * Copyright (C) FuseSource, Inc. * http://fusesource.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 ...
Jitendrakry/fuse
fabric/fabric-monitor/src/main/scala/org/fusesource/fabric/monitor/plugins/SystemPollerFactory.scala
Scala
apache-2.0
3,278
/* * 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 ...
ddna1021/spark
core/src/main/scala/org/apache/spark/deploy/history/HistoryPage.scala
Scala
apache-2.0
4,026
/*-------------------------------------------------------------------------*\\ ** ScalaCheck ** ** Copyright (c) 2007-2014 Rickard Nilsson. All rights reserved. ** ** http://www.scalacheck.org ** ** ...
slothspot/scala
src/partest-extras/scala/org/scalacheck/Commands2.scala
Scala
bsd-3-clause
6,802
/* * 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/EberronReligionWarforged.scala
Scala
apache-2.0
1,132
package de.tu_berlin.impro3.scala.spatio_temporal_dynamics.model import de.tu_berlin.impro3.scala.spatio_temporal_dynamics._ import geo.Location /** Representation of a tweet with some relevant metadata. */ case class Tweet(text: String, user: String, time: Long, tags: Seq[String], gps: Option[(Doubl...
joroKr21/spatio-temporal-dynamics
impro3-ws14-scala/src/main/scala/de/tu_berlin/impro3/scala/spatio_temporal_dynamics/model/Tweet.scala
Scala
apache-2.0
696
package com.greencatsoft.greenlight object FrameworkTest extends TestSuite { "The framework" should "be able to test equality" in { (1 + 1) must be (2) ("A" + "B") should be ("AB") "Scala.js" must not be ("overlooked!") } It should "be able to check if a collection is empty" in { List(1, 2,...
greencatsoft/greenlight
shared/test/scala/com/greencatsoft/greenlight/FrameworkTest.scala
Scala
apache-2.0
1,557
package sttp.client3 import sttp.monad.MonadError /** A base class for delegate backends, which includes delegating implementations for `close` and `responseMonad`, so * that only `send` needs to be defined. */ abstract class DelegateSttpBackend[F[_], +P](delegate: SttpBackend[F, P]) extends SttpBackend[F, P] { ...
softwaremill/sttp
core/src/main/scala/sttp/client3/DelegateSttpBackend.scala
Scala
apache-2.0
450
/* * 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/integration/InterpreterActorSpecForIntegration.scala
Scala
apache-2.0
4,097
/* * 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 ...
icexelloss/spark
sql/core/src/test/scala/org/apache/spark/sql/FileBasedDataSourceSuite.scala
Scala
apache-2.0
27,159
import sbt._ object Dependencies { val GatlingVersion = "3.2.0" val GatlingGitVersion = "1.0.12" lazy val gatling = Seq( "io.gatling.highcharts" % "gatling-charts-highcharts", "io.gatling" % "gatling-test-framework", ).map(_ % GatlingVersion % Test) lazy val gatlingGit = Seq( "com.gerritforge" ...
GerritCodeReview/gerrit
e2e-tests/project/Dependencies.scala
Scala
apache-2.0
491
package sangria.parser import org.parboiled2._ import sangria.ast.AstLocation import scala.annotation.tailrec trait PositionTracking { this: Parser => /** The indices (offsets into the source code) of the first characters of each line. */ private[this] var lineIdx = Array(0) def parseLocations: Boolean def...
OlegIlyenko/sangria
modules/core/src/main/scala/sangria/parser/PositionTracking.scala
Scala
apache-2.0
1,621
/* * 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 ...
tzulitai/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/api/stream/ExplainTest.scala
Scala
apache-2.0
6,618
package domino import scala.language.implicitConversions import org.osgi.framework.{BundleContext, ServiceReference} /** * Provides common implicit conversions. This is used by the other traits. */ trait DominoImplicits { /** Dependency */ protected def bundleContext: BundleContext /** * Converts a servic...
domino-osgi/domino
src/main/scala/domino/DominoImplicits.scala
Scala
mit
611
package phenan.util sealed trait Union sealed trait :|: [+L, +R <: Union] extends Union final case class -:|: [+L, +R <: Union] (l: L) extends :|: [L, R] final case class :|:- [+L, +R <: Union] (r: R) extends :|: [L, R] sealed trait UNil extends Union object Union { def apply[C <: Union] = new UnionFactory[C] ...
csg-tokyo/proteaj2
src/main/scala/phenan/util/Union.scala
Scala
mit
711
/* * Copyright (c) 2014-2021 by The Monix Project Developers. * See the project homepage at: https://monix.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...
monix/monix
monix-reactive/shared/src/main/scala/monix/reactive/ObservableLike.scala
Scala
apache-2.0
6,395
import scala.quoted.Type trait Tensor[S <: Tuple] { def sum[Axis <: Shape: Type](axis: Axis): Tensor[S] = { // error Tensor.mk } } object Tensor { def mk[S <: Tuple]: Tensor[S] = new Tensor {} } object Foo { val t1: Tensor[("batch", "len", "embed")] = Tensor.mk def foo(x: Any) = { } foo(foo(t1.su...
dotty-staging/dotty
tests/neg/i13407.scala
Scala
apache-2.0
342
package io.fintrospect.renderers.util import io.fintrospect.formats.Argo.JsonFormat._ import org.scalatest.{FunSpec, Matchers} import scala.io.Source.fromInputStream class JsonToJsonSchemaTest extends FunSpec with Matchers { describe("JsonToJsonSchema") { it("renders all different types of json value as expec...
daviddenton/fintrospect
core/src/test/scala/io/fintrospect/renderers/util/JsonToJsonSchemaTest.scala
Scala
apache-2.0
1,014
/* * 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...
gridgain/apache-bigtop
bigtop-bigpetstore/bigpetstore-spark/src/main/scala/org/apache/bigpetstore/spark/etl/ETL.scala
Scala
apache-2.0
6,152
package loader.core import loader.core.definition.Processor import loader.core.events.Event /** Hoelts the framework's defined general exceptions. * They are usually lifted to the package object. */ object exceptions { //index used to easily identify the exception as an Event. val userExceptionIdx =...
Y-P-/data-processing-binding
Core/src/loader/core/exceptions.scala
Scala
gpl-3.0
3,374
package workflow import org.apache.spark.rdd.RDD /** * An operator takes a sequence of [[Expression]]s as input and returns an [[Expression]]. * One is stored internally inside each node of a [[Graph]], which represents how data * is intended to flow through the operators. */ private[workflow] sealed trait Operat...
tomerk/keystone
src/main/scala/workflow/Operator.scala
Scala
apache-2.0
6,815
/** * Copyright (C) 2017 Orbeon, Inc. * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. * * This p...
orbeon/orbeon-forms
src/main/scala/org/orbeon/oxf/servlet/ServletSessionImpl.scala
Scala
lgpl-2.1
3,135
/* * @author Philip Stutz * * Copyright 2010 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...
danihegglin/DynDCO
src/main/scala/com/signalcollect/Graph.scala
Scala
apache-2.0
9,870
import sbt._ object Dependencies { lazy val scalaTest: ModuleID = "org.scalatest" %% "scalatest" % "3.0.1" lazy val scalaCheck: ModuleID = "org.scalacheck" %% "scalacheck" % "1.13.4" lazy val scalaMock: ModuleID = "org.scalamock" %% "scalamock-scalatest-support" % "3.5.0" }
kelebra/impatient-scala-katas
project/Dependencies.scala
Scala
mit
283
/* * Copyright 2019 CJWW Development * * 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 agree...
cjww-development/auth-service
test/forms/OrgRegisterFormSpec.scala
Scala
apache-2.0
3,075
/* * Created on 2010/12/13 * Copyright (c) 2010-2014, Wei-ju Wu. * 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 notice, ...
weiju/zmpp2
zmpp-tads3/src/test/scala/org/zmpp/tads3/LookupTableTest.scala
Scala
bsd-3-clause
5,014
package lila.api import akka.actor._ import com.typesafe.config.Config import lila.common.PimpedConfig._ import lila.simul.Simul import scala.collection.JavaConversions._ import scala.concurrent.duration._ final class Env( config: Config, db: lila.db.Env, renderer: ActorSelection, router: ActorSelecti...
r0k3/lila
modules/api/src/main/Env.scala
Scala
mit
4,799
/** * 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...
crashlytics/kafka
core/src/main/scala/kafka/api/OffsetFetchRequest.scala
Scala
apache-2.0
4,498
package entities import scalaz.Equal object PostId{ //this typeclass allows use of scalaz's type-safe === method implicit val equals: Equal[PostId] = Equal.equal(_ == _) } //Post Id wrapper class. case class PostId(pid: String) extends AnyVal
alanktwong/typesafe_activators
redis-twitter-clone/app/entities/PostId.scala
Scala
mit
251
package fr.acinq.bitcoin import java.io.{InputStream, OutputStream} import java.math.BigInteger import java.nio.ByteOrder import fr.acinq.bitcoin.Protocol._ import scodec.bits._ object BlockHeader extends BtcSerializer[BlockHeader] { override def read(input: InputStream, protocolVersion: Long): BlockHeader = { ...
btcontract/lnwallet
app/src/main/java/fr/acinq/bitcoin/Block.scala
Scala
apache-2.0
8,897
package root.core /** * User: Constantine Solovev * Created: 25.05.17 13:17 */ object PatternMatching extends App { val x: List[Any] = List("str", "otherStr", 1, 2, 3, 5, 6, 7D, 8F, ("str", "2"), (10, "2"), List(1, 2, 3)) val result = x collect { case "str" => "string str" case 1 | 2 | 3 => "number...
RicoGit/scala-core
src/main/scala/root/core/PatternMatching.scala
Scala
apache-2.0
556
class Foo { new this.Inner val list = List(1, 2, 3) // error, as Inner access `this.list` val inner: Inner = new this.Inner // ok, `list` is instantiated lib.escape(inner) // error val name = "good" class Inner { val len = list.size } } object lib { def escape(x: Foo#Inner): Uni...
som-snytt/dotty
tests/init/neg/inner1.scala
Scala
apache-2.0
330
package io.getquill.context.sql.norm import io.getquill.{ MirrorSqlDialect, Query, SnakeCase, Spec, SqlMirrorContext } import io.getquill.context.sql.{ testContext, testContextUpperEscapeColumn } import io.getquill.context.sql.util.StringOps._ class ExpandNestedQueriesSpec extends Spec { "keeps the initial table a...
getquill/quill
quill-sql/src/test/scala/io/getquill/context/sql/norm/ExpandNestedQueriesSpec.scala
Scala
apache-2.0
25,283
package chapter26 /** * 26.4 가변 인자 익스트랙터 * * 앞에서 본 전자우편 주소 익스트랙터 메소드는 모두 정해진 개수의 값을 반환했다. 때때로 이는 충분히 * 유연하지 못하다. 예를 들어 도메인 이름을 표현하는 문자열을 매치하되 도메인의 각 부분을 다른 하위 패턴에 * 저장하고 싶다고 하자. * * 이 예제의 구성은 도메인을 역순으로 확장하게 되어있기에 시퀀스 패턴의 이점을 더 살릴 수 있다. * 15.2절에서 인자 목록의 나머지 원소를 시퀀스에 매치해주는 시퀀스 와일드 카드 패턴인 _*를 봤다. * 이 기능은 상위 도메...
seraekim/srkim-lang-scala
src/main/java/chapter26/c26_i04.scala
Scala
bsd-3-clause
3,404
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js tools ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013-2014, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ ** ** /____/\\___/...
renyaoxiang/scala-js
tools/shared/src/main/scala/org/scalajs/core/tools/optimizer/IRChecker.scala
Scala
bsd-3-clause
32,739
/* * The MIT License (MIT) * * Copyright (c) 2016 Algolia * http://www.algolia.com/ * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation...
algolia/algoliasearch-client-scala
src/main/scala/algolia/dsl/WaitForTaskDsl.scala
Scala
mit
4,337