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 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...
jackylk/incubator-carbondata
integration/spark-common-cluster-test/src/test/scala/org/apache/carbondata/cluster/sdv/generated/Vector1TestCase.scala
Scala
apache-2.0
16,159
/* * 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...
asorianostratio/incubator-toree
kernel/src/main/scala/org/apache/toree/kernel/protocol/v5/handler/CodeCompleteHandler.scala
Scala
apache-2.0
2,761
package org.eknet.publet.webdav.pvfs import org.eknet.publet.vfs.{Modifyable, Resource} import io.milton.resource.DeletableResource import io.milton.http.exceptions.BadRequestException /** * @author Eike Kettner eike.kettner@gmail.com * @since 27.06.12 23:13 */ trait ResourceDelete extends DeletableResource { th...
eikek/publet
webdav/src/main/scala/org/eknet/publet/webdav/pvfs/ResourceDelete.scala
Scala
apache-2.0
531
package io.github.hbase4s import io.github.hbase4s.config.HBaseExternalConfig import io.github.hbase4s.utils.HBaseImplicitUtils._ import io.github.hbase4s.utils.HBaseTesting import org.scalatest.{FlatSpec, Matchers} import io.github.hbase4s.filter._ /** * Created by Volodymyr.Glushak on 10/05/2017. */ class HBase...
hbase4s/hbase4s
src/test/scala/io/github/hbase4s/HBaseClientTest.scala
Scala
mit
6,000
/** * Copyright (C) 2012 Typesafe, Inc. <http://www.typesafe.com> * Copyright (C) 2015 Pants project contributors (see CONTRIBUTORS.md). * Licensed under the Apache License, Version 2.0 (see LICENSE). */ package org.pantsbuild.zinc.logging import java.io.{ BufferedOutputStream, File, FileOutputStream, PrintWriter...
cevaris/pants
src/scala/org/pantsbuild/zinc/logging/Loggers.scala
Scala
apache-2.0
2,088
/* * 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 u...
tromika/sparkling-water
core/src/main/scala/org/apache/spark/rdd/H2ORDDLike.scala
Scala
apache-2.0
2,190
/** * 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...
fintler/kafka
core/src/main/scala/kafka/utils/VerifiableProperties.scala
Scala
apache-2.0
7,027
package io.reactivecqrs.core.eventstore import java.sql.Timestamp import java.time.Instant import io.mpjsons.MPJsons import io.reactivecqrs.api.id.{AggregateId, UserId} import io.reactivecqrs.api._ import io.reactivecqrs.core.aggregaterepository.AggregateRepositoryActor.PersistEvents import io.reactivecqrs.core.types...
marpiec/ReactiveCQRS
core/src/main/scala/io/reactivecqrs/core/eventstore/PostgresEventStoreState.scala
Scala
apache-2.0
14,448
package org.jetbrains.plugins.scala package refactoring.extractTrait import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.testFramework.UsefulTestCase import org.jetbrains.plugins.scala.base.ScalaLightPlatformCodeInsightTestCaseAdapter import org.jetbrains.plugins.s...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/refactoring/extractTrait/ExtractTraitTestBase.scala
Scala
apache-2.0
1,738
/** * Copyright (c) 2014-2016 Tim Bruijnzeels * 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, * this list of...
timbru/rpki-ca
src/main/scala/nl/bruijnzeels/tim/rpki/common/cqrs/Error.scala
Scala
bsd-3-clause
1,719
package dotty.tools package dotc package core import SymDenotations.{ SymDenotation, ClassDenotation, NoDenotation, NotDefinedHereDenotation } import Contexts.{Context, ContextBase} import Names.{Name, PreName} import Names.TypeName import Symbols.NoSymbol import Symbols._ import Types._ import Periods._ import Flags....
spetz911/dotty
src/dotty/tools/dotc/core/Denotations.scala
Scala
bsd-3-clause
44,056
/** * Copyright 2015 ICT. * * 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 ...
DataSysLab/netflow
load/src/test/scala/cn/as/ict/acs/netflow/load/worker/TestReceiver.scala
Scala
apache-2.0
895
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/amls-frontend
app/controllers/bankdetails/BankAccountNameController.scala
Scala
apache-2.0
5,388
import de.tototec.sbuild._ import de.tototec.sbuild.ant._ import de.tototec.sbuild.ant.tasks._ import de.tototec.sbuild.ant._ import de.tototec.sbuild.ant.tasks._ import de.tototec.sbuild._ @version("0.7.1") @classpath( "mvn:org.sbuild:org.sbuild.plugins.sbuildplugin:0.2.2", "mvn:org.apache.ant:ant:1.8.4", "mvn...
SBuild-org/sbuild-asciidoctor-plugin
org.sbuild.plugins.asciidoctor/SBuild.scala
Scala
apache-2.0
2,150
package japgolly.scalajs.react.vdom import japgolly.scalajs.react.{Callback, raw => Raw} import scala.scalajs.js sealed class VdomNode(val rawNode: Raw.React.Node) extends TagMod { override def applyTo(b: Builder): Unit = b.appendChild(rawNode) } object VdomNode { def apply(n: Raw.React.Node): VdomNode = ...
matthughes/scalajs-react
core/src/main/scala/japgolly/scalajs/react/vdom/VdomNode.scala
Scala
apache-2.0
1,784
package cilib package syntax import scalaz.{StateT,LensFamily} object step { final implicit class StepId[A](val self: A) extends AnyVal { // <<<<<<< HEAD // def liftStep[B]: Step[B,A] = Step.point(self) // //def liftStepS[F[_], B, S]: StepS[F,B,S,A] = StepS.point(self) // } // final implicit class Step...
robgarden/cilib
core/src/main/scala/cilib/syntax/Step.scala
Scala
gpl-3.0
971
package com.github.holothuroid package object covella { /** * Extension methods for turning strings into covella objects. * @param string THe enriched string */ implicit class CovellaStringOps(val string: String) extends AnyVal{ def dateInCalendar(implicit cal: Calendar) : Datum = c...
Holothuroid/Covella
covella/package.scala
Scala
mit
6,156
class Contra[-D](task: AnyRef) object Test { def narrow(task: AnyRef): Contra[task.type] = new Contra(task) def ident[Before](elems: Contra[Before]): Contra[Before] = elems val foo = null ident(narrow(foo)) }
som-snytt/dotty
tests/pos/i2152.scala
Scala
apache-2.0
217
package parsers.vamk import scala.util.matching.Regex import scala.collection.mutable import org.jsoup.Jsoup import models.Week import parsers.base.WeekListParser import java.io.File class IBVAMKWeekListParser(url: String) extends WeekListParser { val weekPattern = new Regex( """(\\d{2})""") def parse: Array[...
maxmouchet/vamk-timetables
parsers/src/main/scala/parsers/vamk/IBVAMKWeekListParser.scala
Scala
mit
851
/** * 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...
eribeiro/kafka
core/src/test/scala/integration/kafka/api/EndToEndAuthorizationTest.scala
Scala
apache-2.0
16,311
import sbt._ import Keys._ import Status.{isSnapshot, publishStatus} import org.apache.ivy.util.url.CredentialsStore object Release extends Build { lazy val publishRelease = TaskKey[Unit]("publish-release") lazy val publishAllArtifacts = TaskKey[Unit]("publish-all-artifacts") lazy val launcherRemotePath = Setti...
kuochaoyi/xsbt
project/Release.scala
Scala
bsd-3-clause
6,224
package com.goticks import akka.actor.{ ActorSystem } import akka.testkit.{ImplicitSender, TestKit} import org.scalatest.{WordSpecLike, MustMatchers} class TickerSellerSpec extends TestKit(ActorSystem("testTickets")) with WordSpecLike with MustMatchers ...
RayRoestenburg/akka-in-action
chapter-remoting/src/test/scala/com/goticks/TicketSellerSpec.scala
Scala
mit
2,244
package amailp.intellij.robot.psi.reference import com.intellij.util.Processor import com.jetbrains.python.psi.PyFunction import scala.collection.mutable.ListBuffer /** * @author Sergey Khomutinin skhomuti@gmail.com * Date: 30.08.2019 */ class MethodFinderWithoutUnderscoresAndSpaces(reference: String) ext...
AmailP/robot-plugin
src/main/scala/amailp/intellij/robot/psi/reference/MethodFinderWithoutUnderscoresAndSpaces.scala
Scala
gpl-3.0
1,293
package mesosphere.marathon package core.launchqueue.impl import mesosphere.UnitTest import mesosphere.marathon.core.instance.{Instance, TestInstanceBuilder} import mesosphere.marathon.core.instance.update.{InstancesSnapshot} import mesosphere.marathon.state.{AbsolutePathId, AppDefinition} import mesosphere.marathon.c...
mesosphere/marathon
src/test/java/mesosphere/marathon/core/launchqueue/impl/OfferConstraints.scala
Scala
apache-2.0
5,552
package intellij.haskell.action.ghci import com.intellij.openapi.actionSystem.{AnAction, AnActionEvent} import intellij.haskell.action.ActionUtil import intellij.haskell.psi.{HaskellPsiUtil, HaskellTypes} import intellij.haskell.runconfig.console.HaskellConsoleViewMap class SendToConsoleAction extends AnAction { o...
rikvdkleij/intellij-haskell
src/main/scala/intellij/haskell/action/ghci/SendToConsoleAction.scala
Scala
apache-2.0
1,425
/* * Copyright 2015 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 * * Unl...
unibas-gravis/scalismo
src/main/scala-2.13+/scalismo/common/Field.scala
Scala
apache-2.0
6,340
package org.scalaide.core.testsetup import org.eclipse.core.resources.IFile import org.eclipse.core.resources.IncrementalProjectBuilder import org.eclipse.core.runtime.NullProgressMonitor import org.eclipse.core.runtime.Path import org.eclipse.jdt.core.ICompilationUnit import org.eclipse.jdt.core.IPackageFragmentRoot...
dragos/scala-ide
org.scala-ide.sdt.core.tests/src/org/scalaide/core/testsetup/TestProjectSetup.scala
Scala
bsd-3-clause
6,765
package android import com.android.builder.internal.ClassFieldImpl import com.android.manifmerger.ManifestMerger2 import sbt._ import sbt.Keys._ import scala.collection.JavaConverters._ import scala.util.Try import scala.xml._ import language.postfixOps import java.util.Properties import java.io.File import com.andr...
pfn/android-sdk-plugin
src/tasks.scala
Scala
bsd-3-clause
57,750
/* * Copyright 2017-2022 John Snow Labs * * 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...
JohnSnowLabs/spark-nlp
src/main/scala/com/johnsnowlabs/nlp/annotators/TextMatcher.scala
Scala
apache-2.0
10,260
package com.twitter.finagle.http import com.twitter.finagle.http.netty.HttpMessageProxy import com.twitter.util.TwitterDateFormat import java.text.SimpleDateFormat import java.util.{Date, Locale, TimeZone} import scala.annotation.varargs import scala.collection.mutable import scala.collection.JavaConverters._ /** * ...
liamstewart/finagle
finagle-http/src/main/scala/com/twitter/finagle/http/HeaderMap.scala
Scala
apache-2.0
4,999
/** * This file is part of SensApp [ http://sensapp.modelbased.net ] * * Copyright (C) 2011- SINTEF ICT * Contact: SINTEF ICT <nicolas.ferry@sintef.no> * * Module: net.modelbased.sensapp * * SensApp is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public L...
SINTEF-9012/sensapp
_attic/net.modelbased.sensapp.registry/src/main/scala/net/modelbased/sensapp/registry/services/SensorListerService.scala
Scala
lgpl-3.0
2,881
package model import play.api.libs.json.{JsObject, JsValue} import lib.UptimeDisplay import org.joda.time.Duration object ElasticsearchStatsGroups { def parse(js: JsValue): List[Node] = { val JsObject(nodes) = (js \\ "nodes").get nodes.toList.map { case (_, json) => Node(json) } } case class StatsGro...
guardian/status-app
app/model/ElasticsearchStatsGroups.scala
Scala
apache-2.0
1,328
/* * Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com> */ package play.api.libs import akka.stream.scaladsl._ import org.specs2.mutable.Specification import play.api.http.ContentTypes import play.api.mvc.Results class EventSourceSpec extends Specification { import EventSource.Event "EventSou...
Shenker93/playframework
framework/src/play/src/test/scala/play/api/libs/EventSourceSpec.scala
Scala
apache-2.0
1,414
/** * Copyright (C) 2007 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 prog...
orbeon/orbeon-forms
xforms-runtime/jvm/src/main/scala/org/orbeon/oxf/xforms/function/XFormsValid.scala
Scala
lgpl-2.1
3,308
//package io.youi.example.ui.hypertext // //import io.youi.Color //import io.youi.hypertext.border.BorderStyle //import io.youi.hypertext.style.Overflow //import io.youi.hypertext.{Button, Component, Container} //import io.youi.layout.VerticalLayout // //import scala.concurrent.Future // //object VerticalLayoutExample ...
outr/youi
example/js/src/main/scala/io/youi/example/ui/hypertext/VerticalLayoutExample.scala
Scala
mit
1,923
/** * Licensed to the Minutemen Group under one or more contributor license * agreements. See the COPYRIGHT file distributed with this work for * additional information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in complian...
datalek/silhouette
silhouette/src/main/scala/silhouette/http/transport/QueryStringTransport.scala
Scala
apache-2.0
2,738
package org.jetbrains.plugins.scala.codeInsight.intention.comprehension import com.intellij.codeInsight.intention.PsiElementBaseIntentionAction import com.intellij.openapi.project.Project import com.intellij.openapi.editor.Editor import org.jetbrains.plugins.scala.lang.psi.impl.{ScalaFileImpl, ScalaPsiElementFactory} ...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/codeInsight/intention/comprehension/ConvertToCurlyBracesIntention.scala
Scala
apache-2.0
2,121
/* * 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/self-service-time-to-pay-frontend
test/pagespecs/InstalmentSummaryPageSpec.scala
Scala
apache-2.0
2,988
package scaladex.data.meta import java.time.Instant import scaladex.core.model.Artifact import scaladex.core.model.ArtifactDependency import scaladex.core.model.Project import scaladex.core.model.SemanticVersion import scaladex.data.cleanup._ import scaladex.data.maven.ArtifactModel import scaladex.infra.DataPaths c...
scalacenter/scaladex
modules/data/src/main/scala/scaladex/data/meta/ArtifactConverter.scala
Scala
bsd-3-clause
1,376
package io.flow.event.v2 import java.util.concurrent.ConcurrentLinkedQueue import io.flow.event.Record import io.flow.log.RollbarLogger import io.flow.play.util.Config import io.flow.util.StreamNames import software.amazon.kinesis.common.InitialPositionInStream import javax.inject.Inject import scala.concurrent.durat...
flowcommerce/lib-event
app/io/flow/event/v2/Queue.scala
Scala
mit
4,241
package org.jetbrains.plugins.scala package codeInsight.intentions.booleans import org.jetbrains.plugins.scala.codeInsight.intention.booleans.NegateComparisonIntention import org.jetbrains.plugins.scala.codeInsight.intentions.ScalaIntentionTestBase /** * @author Ksenia.Sautina * @since 5/13/12 */ class NegateComp...
LPTK/intellij-scala
test/org/jetbrains/plugins/scala/codeInsight/intentions/booleans/NegateComparisonIntentionTest.scala
Scala
apache-2.0
1,519
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
mrchristine/spark-examples-dbc
src/main/scala/org/apache/spark/examples/mllib/StreamingLinearRegressionExample.scala
Scala
apache-2.0
2,042
package io.ddf.spark.content import io.ddf.spark.ATestSuite /** */ class GetDDFSuite extends ATestSuite { createTableAirline() test("test GetDDF") { val ddf = manager.sql2ddf("select * from airline", "SparkSQL") manager.setDDFName(ddf, "awesome_ddf") val ddf1 = manager.getDDFByURI(ddf.getUri) as...
ubolonton/DDF
spark/src/test/scala/io/ddf/spark/content/GetDDFSuite.scala
Scala
apache-2.0
391
// Copyright 2017 Pants project contributors (see CONTRIBUTORS.md). // Licensed under the Apache License, Version 2.0 (see LICENSE). package org.pantsbuild.zinc.analysis import sbt.io.IO import org.junit.runner.RunWith import org.scalatest.WordSpec import org.scalatest.junit.JUnitRunner import org.scalatest.MustMatc...
fkorotkov/pants
tests/scala/org/pantsbuild/zinc/analysis/AnalysisMapSpec.scala
Scala
apache-2.0
831
/* * Copyright 2011-2022 GatlingCorp (https://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...
gatling/gatling
gatling-http/src/main/scala/io/gatling/http/funspec/GatlingHttpFunSpec.scala
Scala
apache-2.0
1,328
package org.nd4s.ops import org.nd4j.linalg.api.complex.IComplexNumber import org.nd4j.linalg.api.ndarray.INDArray import org.nd4j.linalg.api.ops.{BaseScalarOp, Op} import org.nd4j.linalg.factory.Nd4j import org.nd4s.Implicits._ trait LeftAssociativeBinaryOp { def op(origin: IComplexNumber, other: Double): IComple...
deeplearning4j/nd4s
src/main/scala/org/nd4s/ops/LeftAssociativeBinaryOp.scala
Scala
apache-2.0
743
package ildl package benchmark // // You can read about this benchmark on the following wiki page: // https://github.com/miniboxing/ildl-plugin/wiki/Sample-%7E-Data-Encoding // package object gcd { /** * The implicit class which adds the gaussian integer operations to * pairs of integers. * * For more d...
miniboxing/ildl-plugin
tests/benchmarks/src/ildl/benchmark/gcd/package.scala
Scala
bsd-3-clause
1,290
package evaluation import java.io.File import scala.io.Source import epic.sequences.SemiCRF /** * Created by milica on 22/03/16. */ object EpicEvaluation { var sentenceConll = "" def main(args: Array[String]): Unit = { var modelFileName: String = "./data/our_malware.ser.gz" if (args.length...
langkilde/epic
src/main/scala/evaluation/EpicEvaluation.scala
Scala
apache-2.0
5,144
/** * Ground the factor graph to file * * Using the schema and inference rules defined in application.conf, construct factor * graph files. * Input: variable tables, factor descriptions, holdout configuration, (feature tables) * Output: factor graph files: variables, factors, edges, weights, meta that the * samp...
sai16vicky/deepdive
src/main/scala/org/deepdive/inference/SQLInferenceRunner.scala
Scala
apache-2.0
44,478
package com.sk.app.proxmock.application.domain.conditions import com.fasterxml.jackson.annotation.JsonCreator import com.sk.app.proxmock.application.configuration.ConfigurationContext import org.springframework.messaging.Message /** * Created by szymo on 23/11/2016. */ case class BodyMatches(pattern: String) exten...
szymonkudzia/proxmock
sources/src/main/scala/com/sk/app/proxmock/application/domain/conditions/BodyMatches.scala
Scala
mit
622
package queries import models.Account import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder import scalikejdbc._ case class LoginEmail(email: String, password: String) { import LoginEmail._ def authenticate()(implicit session: DBSession): Option[Account] = { Account.findBy(sqls.eq(Account.c...
ponkotuy/train-stamp-rally
app/queries/LoginEmail.scala
Scala
apache-2.0
488
/* * Copyright (c) 2014 Paul Bernard * * 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 t...
quantintel/spectrum
financial/src/main/scala/org/quantintel/ql/cashflows/CashFlow.scala
Scala
apache-2.0
1,021
package com.github.golem.command.setup import com.github.golem.command.Command trait SetupCommand extends Command
pjarosik/golem
src/main/scala/com/github/golem/command/setup/SetupCommand.scala
Scala
gpl-2.0
116
package proofpeer.proofscript.proofdoc object ProofDocTest { val testSource = """ package proofpeer.editor import proofpeer.vue._ import proofpeer.vue.dom._ import proofpeer.vue.components._ import scala.scalajs.js import js.annotation._ object CodeMirror extends CustomComponentClass { case object READONLY e...
proofpeer/proofpeer-proofscript
shared/src/main/scala/proofpeer/proofscript/proofdoc/ProofDocTest.scala
Scala
mit
8,565
package io.scalac.frees.login.handlers.id import cats.Id import io.scalac.frees.login.algebras.{GitHubClient, GitHubDataResponse, GitHubFailure} class FailedIdGitHubHandler extends GitHubClient.Handler[Id] { override protected[this] def login(code: String): Id[GitHubDataResponse] = GitHubFailure(new RuntimeExce...
LGLO/freestyle-login
src/main/scala/io/scalac/frees/login/handlers/id/FailedIdGitHubHandler.scala
Scala
apache-2.0
372
/* * 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
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisTest.scala
Scala
apache-2.0
3,131
package mr.merc.map.hex.view import mr.merc.map.terrain._ import mr.merc.map.hex._ import mr.merc.map.terrain.TerrainKind._ import scala.collection.concurrent.TrieMap object TerrainHexViewAdditiveRule { // first is drawn first private def orderOfTypes = List[TerrainKind](MountainKind, HillKind, ForestKind, RoadK...
RenualdMarch/merc
src/main/scala/mr/merc/map/hex/view/TerrainHexViewAdditiveRule.scala
Scala
gpl-3.0
3,757
package org.allenai.common import org.allenai.common.testkit.UnitSpec class FileUtilsSpec extends UnitSpec { "FileUtils" should "correctly read plain text resource" in { val lines = FileUtils.getResourceAsLines(getClass, "testfile.txt") val whatIsExpected = Seq("This is line 1.", "This is line 2.", "...", ...
allenai/common
core/src/test/scala/org/allenai/common/FileUtilsSpec.scala
Scala
apache-2.0
645
object Test { def main(args: Array[String]): Unit = { val q = scala.collection.mutable.Queue[String]() assert(q.length == 0) try { assert(q.front != null) } catch { case _: Throwable => } } }
folone/dotty
tests/run/t3935.scala
Scala
bsd-3-clause
232
package org.insightcentre.cwneditor import org.eclipse.jetty.server.Server import org.eclipse.jetty.servlet.{DefaultServlet, ServletContextHandler} import org.eclipse.jetty.webapp.WebAppContext import org.scalatra.servlet.ScalatraListener object JettyLauncher { def main(args: Array[String]) { val port = if(arg...
jmccrae/cwn-editor
src/main/scala/ScalatraLauncher.scala
Scala
apache-2.0
755
/** * Copyright (C) 2009-2011 the original author or authors. * See the notice.md file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
maslovalex/scalate
scalate-core/src/main/scala/org/fusesource/scalate/support/ScalaCompiler.scala
Scala
apache-2.0
7,342
package cpup.poland.test import org.scalatest.FreeSpec class BaseSpec extends FreeSpec with Helper with PolandHelper { }
CoderPuppy/poland-scala
src/test/scala/cpup/poland/test/BaseSpec.scala
Scala
mit
123
/* * 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 ...
Panos-Bletsos/spark-cost-model-optimizer
sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala
Scala
apache-2.0
19,525
package leo package modules.input import leo.Ignored import leo.modules.SZSException /** * This suite tests parsing of the SYN000-sample problems of the TPTP library. * A tests succeeds if the parser can successfully parse the input and * fails otherwise (i.e. if a parse error occurs). * * @author Alexander Stee...
lex-lex/Leo-III
src/test/scala/leo/modules/input/ParserTestSuite.scala
Scala
bsd-3-clause
1,729
/* * 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 ...
zzcclp/carbondata
integration/spark/src/main/scala/org/apache/spark/sql/execution/command/mutation/CarbonProjectForDeleteCommand.scala
Scala
apache-2.0
8,103
package org.veripacks.verifier import scala.annotation.tailrec import org.veripacks.Logging import org.veripacks._ import ClassUsageVerifierResult._ import org.veripacks.PkgFilter.Yes class ClassUsageVerifier(accessDefinitions: AccessDefinitions, additionalRequireImportFilter: PkgFilter) extends Logging { /** * ...
adamw/veripacks
verifier/src/main/scala/org/veripacks/verifier/ClassUsageVerifier.scala
Scala
apache-2.0
5,670
package me.lightspeed7.crontab import java.time.Instant import java.time.LocalDateTime import java.time.ZoneOffset import java.time.temporal.ChronoUnit import java.util.concurrent.TimeoutException import scala.concurrent.Future import scala.concurrent.duration.Duration import scala.concurrent.duration.DurationInt ob...
dbuschman7/akka-crontab
core/src/main/scala/me/lightspeed7/crontab/Schedule.scala
Scala
apache-2.0
4,418
// Copyright (c) 2013, Johns Hopkins University. All rights reserved. // This software is released under the 2-clause BSD license. // See /LICENSE.txt // Travis Wolfe, twolfe18@gmail.com, 30 July 2013 package edu.jhu.hlt.parma.annotation import edu.jhu.hlt.parma.types._ import edu.jhu.hlt.parma.features.ReportingVer...
hltcoe/parma
src/main/scala/edu/jhu/hlt/parma/annotation/PredArgSelector.scala
Scala
bsd-2-clause
11,934
package org.caseinsensitive.folksent.model trait FolksonomyReadable[T <: Document] { def authors(): Seq[Author] def documents(): Seq[T] def topics(): Seq[Topic] // immutable.Set is annoyingly not covariant def author(document: T): Author def topics(document: T): Seq[Topic] def documents(author: Author): S...
bscheinman/folksent
src/main/scala/org/caseinsensitive/folksent/model/Folksonomy.scala
Scala
mit
1,004
package othello.info import scala.util.Random abstract class GamePlayer { def choose( list:Set[Move] , b:Board ):(Move) } object RandomPlayer extends GamePlayer { override def choose( list:Set[Move] , b:Board ):(Move) = Random.shuffle(list.toList).head } abstract class ScoringPlayer extends GamePlayer { def sc...
ShinyTechTastic/wookie-othello
src/othello/info/GamePlayer.scala
Scala
gpl-2.0
1,136
package io.scalajs.npm.mongodb import scala.scalajs.js /** * Insert Write Operation Result * @author lawrence.daniels@gmail.com */ @js.native trait InsertWriteOpResult extends js.Object { /** The total amount of documents inserted. */ var insertedCount: Int = js.native /** * All the documents insert...
scalajs-io/mongodb
src/main/scala/io/scalajs/npm/mongodb/InsertWriteOpResult.scala
Scala
apache-2.0
1,600
/** * 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 ...
massie/adam
adam-cli/src/test/scala/org/bdgenomics/adam/cli/ADAM2VcfSuite.scala
Scala
apache-2.0
1,778
object Solution { def main(args: Array[String]) { val it = scala.io.Source.stdin.getLines val n = it.next.toInt val regex = """(?i)^hi\\s(?!d).*""".r val res = it.filter { case regex(_*) => true case _ => false } res.foreach(println) } }
marcos-sb/hacker-rank
regex/applications/saying-hi/Solution.scala
Scala
apache-2.0
319
/* *\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2015, Ga...
rmihael/squants
shared/src/test/scala/squants/VectorSpec.scala
Scala
apache-2.0
13,831
package com.enkidu.lignum.parsers.ast.expression.types.primitives import com.enkidu.lignum.parsers.ast.expression.types.annotations.Annotation case class CharPrimitive(annotations: Seq[Annotation]) extends PrimitiveType
marek1840/java-parser
src/main/scala/com/enkidu/lignum/parsers/ast/expression/types/primitives/CharPrimitive.scala
Scala
mit
222
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/amls-frontend
app/controllers/payments/TypeOfBankController.scala
Scala
apache-2.0
3,557
package uk.co.grahamcox.dozy.servlet /** * Trait that represents the configuration class to use for the servlet */ trait Configuration { /** * Provide any configuration that is required for the trait to be able to find the classes needed * @param configuration The configuration that is used */ def confi...
sazzer/dozy
core/src/main/scala/uk/co/grahamcox/dozy/servlet/Configuration.scala
Scala
gpl-3.0
586
/* *\\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2014, G...
non/squants
src/main/scala/squants/electro/ElectricalConductance.scala
Scala
apache-2.0
1,984
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
psyyz10/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/dataset/Sample.scala
Scala
apache-2.0
4,360
def isAnagram(s:String, t:String) = if (s.reverse == t) true else false println(isAnagram("abc", "cba")) println(isAnagram("abc", "cba "))
ccqpein/Arithmetic-Exercises
Valid-Anagram/VA.scala
Scala
apache-2.0
140
/** * 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 * dist...
DigitalAssetCom/hlp-candidate
server/network/src/test/scala/org/hyperledger/network/flows/InitialBlockDownloaderTest.scala
Scala
apache-2.0
4,205
package play.api.test import org.specs2.mutable.Specification import org.specs2.time.NoTimeConversions import play.api.http.{ HttpProtocol, Status, HeaderNames } /** * Play specs2 specification. * * This trait excludes some of the mixins provided in the default specs2 specification that clash with Play helpers * ...
michaelahlers/team-awesome-wedding
vendor/play-2.2.1/framework/src/play-test/src/main/scala/play/api/test/PlaySpecification.scala
Scala
mit
698
import leon.lang._ import leon.lang.synthesis._ object ChurchNumerals { sealed abstract class Num case object Z extends Num case class S(pred: Num) extends Num def value(n:Num) : Int = { n match { case Z => 0 case S(p) => 1 + value(p) } } ensuring (_ >= 0) def add(x : Num, y : Num) :...
ericpony/scala-examples
testcases/synthesis/oopsla2013/Church/Squared.scala
Scala
mit
953
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.internal.scaladsl.broker.kafka import akka.actor.ActorSystem import akka.stream.Materializer import com.lightbend.lagom.internal.broker.kafka.KafkaConfig import com.lightbend.lagom.scaladsl.api.Descriptor.TopicCal...
rcavalcanti/lagom
service/scaladsl/kafka/client/src/main/scala/com/lightbend/lagom/internal/scaladsl/broker/kafka/ScaladslKafkaTopic.scala
Scala
apache-2.0
1,235
/** * This file is part of the TA Buddy project. * Copyright (c) 2012-2014 Alexey Aksenov ezh@ezh.msk.ru * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Global License version 3 * as published by the Free Software Foundation with the addition...
digimead/digi-TABuddy-desktop
part-logic/src/main/scala/org/digimead/tabuddy/desktop/logic/operation/OperationCreateElementFromTemplate.scala
Scala
agpl-3.0
5,126
/* * 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...
monixio/monix
monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropByPredicateWithIndexSuite.scala
Scala
apache-2.0
2,213
/*********************************************************************** * Copyright (c) 2013-2020 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...
aheyne/geomesa
geomesa-cassandra/geomesa-cassandra-tools/src/main/scala/org/locationtech/geomesa/cassandra/tools/commands/CassandraDeleteFeaturesCommand.scala
Scala
apache-2.0
1,468
package helpers import play.api.data.validation.ValidationError import play.api.i18n.Messages import play.api.libs.json._ object JsonFormat { def error(msg: String) = Json.obj("msg" -> msg) type JsonErrors = Seq[(JsPath, Seq[ValidationError])] def error(errors: JsonErrors) = { val errorFields = errors.ma...
innoq/activator-play-roca
app/helpers/JsonFormat.scala
Scala
apache-2.0
538
object MethodInjection extends App { trait Monoid[A] { def mappend(a1: A, a2: A): A def mzero: A } object Monoid { implicit val IntMonoid: Monoid[Int] = new Monoid[Int] { def mappend(a: Int, b: Int): Int = a + b def mzero: Int = 0 } implicit val StringMonoid: Monoid[String] ...
diegopacheco/scala-playground
scalaz/src/main/scala/MethodInjection.scala
Scala
unlicense
747
/** * Copyright (c) 2014-2016 Snowplow Analytics Ltd. * All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache * License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at * http:/...
Propertyfinder/snowplow
4-storage/kinesis-elasticsearch-sink/src/main/scala/com.snowplowanalytics.snowplow.storage.kinesis/elasticsearch/BadEventTransformer.scala
Scala
apache-2.0
2,477
package scodec package codecs import scodec.bits.{BitVector, ByteOrdering} private[codecs] final class VarIntCodec(ordering: ByteOrdering) extends Codec[Int] { private[this] val long = new VarLongCodec(ordering).xmap(_.toInt, VarIntCodec.toPositiveLong) override def sizeBound = SizeBound.bounded(1L, 5L) o...
alvaroc1/scodec
shared/src/main/scala/scodec/codecs/VarIntCodec.scala
Scala
bsd-3-clause
834
/* * 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/SuiteCompletedStatusReporter.scala
Scala
apache-2.0
2,871
/* * Copyright (C) 2005, The Beangle Software. * * 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 3 of the License, or * (at your option) any later version. * * This...
beangle/commons
core/src/main/scala/org/beangle/commons/io/Deserializer.scala
Scala
lgpl-3.0
987
package com.example.nslicer.connectors import java.sql.{Connection, DriverManager, PreparedStatement, ResultSet} import com.typesafe.config.Config import org.slf4j.{Logger, LoggerFactory} import spray.json.{JsArray, JsObject} import scala.collection.mutable.ArrayBuffer /** * Created by vishnu */ class MysqlClie...
greyhrHack-cyborgs/server
src/main/scala/com/example/nslicer/connectors/MysqlClient.scala
Scala
mpl-2.0
6,335
package io.skysail.core.server.routes import akka.actor.ActorSystem import akka.http.scaladsl.server.Route import io.skysail.api.security.AuthenticationService import io.skysail.core.app.SkysailApplication.DeleteApplicationActor import io.skysail.core.app.{ApplicationProvider, SkysailApplication} import org.slf4j.Logg...
evandor/skysail-core
skysail.core/src/io/skysail/core/server/routes/RoutesTracker.scala
Scala
apache-2.0
1,572
package org.invisibletech.myfpscala sealed trait Tree[+A] case class Leaf[A](value: A) extends Tree[A] case class Branch[A](left: Tree[A], right: Tree[A]) extends Tree[A] object Tree { def fold[A, B](t :Tree[A])(f: A => B)(g: (B, B) => B): B = { t match { case Leaf(x) => f(x) case Branch(l, r) => g...
InvisibleTech/my-fp-scala
src/main/scala/chapitre-3/Tree.scala
Scala
mit
710
package com.twitter.util import scala.util.control.{NonFatal => ScalaNonFatal} /** * A classifier of non-fatal Exceptions. * * Developers should prefer using `scala.util.control.NonFatal` from the * Scala standard library. * * @see Scala's [[http://www.scala-lang.org/api/current/#scala.util.control.NonFatal$ No...
BuoyantIO/twitter-util
util-core/src/main/scala/com/twitter/util/NonFatal.scala
Scala
apache-2.0
1,822
/* * The MIT License * * Copyright (c) 2016 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/dagr
tasks/src/main/scala/dagr/tasks/fgbio/FgBioTask.scala
Scala
mit
3,209
package org.jetbrains.plugins.scala.lang.completion3 import com.intellij.codeInsight.completion.CompletionType import com.intellij.openapi.vfs.VfsUtil import org.jetbrains.plugins.scala.codeInsight.ScalaCodeInsightTestBase import org.jetbrains.plugins.scala.extensions.inWriteAction import org.junit.Assert /** * User...
whorbowicz/intellij-scala
test/org/jetbrains/plugins/scala/lang/completion3/ScalaSmartCompletionTest.scala
Scala
apache-2.0
16,051
/* * 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/gmp-frontend
test/views/html/BulkReferenceSpec.scala
Scala
apache-2.0
3,398