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
package test.testSpark import org.apache.spark.SparkConf import org.apache.spark.SparkContext import org.apache.spark.{SparkConf, SparkContext} import org.apache.spark.sql.SQLContext case class Emp(id: Int, country: String, gender: String, salary: Int) object CountByEmployeeDF { def main(args: Array[String]) { ...
arunchan05/sparkLearning
src/main/scala/test/testSpark/CountByEmployeeDF.scala
Scala
apache-2.0
1,032
/* * 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 ...
YanjieGao/spark-druid-olap
src/test/scala/org/sparklinedata/druid/client/DruidRewritesTest.scala
Scala
apache-2.0
8,632
package org.jetbrains.plugins.scala package debugger.evaluation import com.intellij.codeInsight.PsiEquivalenceUtil import com.intellij.debugger.engine.evaluation.expression.ExpressionEvaluator import com.intellij.debugger.impl.{DebuggerManagerAdapter, DebuggerSession} import com.intellij.debugger.{DebuggerManagerEx, S...
advancedxy/intellij-scala
src/org/jetbrains/plugins/scala/debugger/evaluation/ScalaEvaluatorCache.scala
Scala
apache-2.0
2,673
/* * Copyright 2017 TEAM PER LA TRASFORMAZIONE DIGITALE * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
seralf/daf-semantics
semantic_manager/app/ErrorHandler.scala
Scala
apache-2.0
2,213
/* * Copyright 2014-2021 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
brharrington/atlas
atlas-core/src/main/scala/com/netflix/atlas/core/norm/MaxValueFunction.scala
Scala
apache-2.0
1,386
/* * Licensed to Intel Corporation under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * Intel Corporation licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use t...
SeaOfOcean/BigDL
dl/src/main/scala/com/intel/analytics/bigdl/nn/CMaxTable.scala
Scala
apache-2.0
3,327
/* * Copyright (c) 2015 Miles Sabin * * 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...
milessabin/kittens
core/src/main/scala/cats/derived/semigroupk.scala
Scala
apache-2.0
3,718
package com.eevolution.context.dictionary.domain.api.service import com.eevolution.context.dictionary.api import com.eevolution.context.dictionary.domain.model.InformationWindowTrl /** * Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com * This program is free software: you can red...
adempiere/ADReactiveSystem
dictionary-api/src/main/scala/com/eevolution/context/dictionary/domain/api/service/InformationWindowTrlService.scala
Scala
gpl-3.0
1,262
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
travisbrown/scalatest
src/test/scala/org/scalatest/suiteprop/PathBeforeAndAfterExamples.scala
Scala
apache-2.0
20,607
package dispatch.oauth.spec import org.asynchttpclient.oauth.{ConsumerKey, RequestToken} import org.scalacheck.Gen.listOf import org.scalacheck.Prop.forAll import org.scalacheck.{Gen, Properties} /** * Tests for oauth / exchange. * * @author Erik-Berndt Scheper * @since 25-01-2017 * */ object ExchangeSpec...
dispatch/reboot
core/src/test/scala/oauth/exchange.scala
Scala
lgpl-3.0
2,131
package commons.models import commons.repositories.BaseId trait IdMetaModel { type ModelId <: BaseId[_] val id: Property[Option[ModelId]] = Property("id") }
Dasiu/play-framework-test-project
app/commons/models/IdMetaModel.scala
Scala
mit
165
/* * 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 ...
WindCanDie/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/DateTimeBenchmark.scala
Scala
apache-2.0
4,982
package mq.consumer import mq.{Message, BrokerActor} /** * Created by Bruce on 3/1/15. */ class ConsolePrint extends BrokerActor { def process(m: Message) = { println(m) } }
ElasticQueue/ElasticQueue
src/main/scala/mq/consumer/ConsolePrint.scala
Scala
mit
190
package dzufferey.smtlib import org.scalatest.funsuite.AnyFunSuite class DRealSuite extends AnyFunSuite { val sampleModel1 = """delta-sat with delta = 0.1 beam.dx : [-inf, 1015.625] = [0, 0] beam.dy : [-inf, 1015.625] = [0, 0] beam.dz : [ ENTIRE ] = [-162.9375, -153.875] beam.q_a : [-inf, 1] = [1, 1] beam.q_i : [-...
dzufferey/scala-smtlib-interface
src/test/scala/dzufferey/smtlib/DRealSuite.scala
Scala
apache-2.0
3,485
package es.weso.shex case class ValueClassDefinition( defn: Either[(ValueClass,Actions), External] ) object ValueClassDefinition { def fromValueClass(vc: ValueClass): ValueClassDefinition = { ValueClassDefinition(Left((vc,Actions.empty))) } def fromValueClassActions(vc: ValueClass, as: Actions): V...
labra/ShExcala
src/main/scala/es/weso/shex/ValueClassDefinition.scala
Scala
mit
508
/* * 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/pensions-lifetime-allowance-frontend
app/models/IP14PensionSavingsModel.scala
Scala
apache-2.0
826
object X { def f(e: Either[Int, X.type]) = e match { case Left(i) => i case Right(X) => 0 // scala/bug#5986 spurious exhaustivity warning here } }
loskutov/intellij-scala
testdata/scalacTests/pos/t5968.scala
Scala
apache-2.0
164
package com.airbnb.common.ml.strategy.trainer import org.junit.Test import com.airbnb.common.ml.strategy.data.BinarySampleMockUtil import com.airbnb.common.ml.strategy.eval.BinaryMetrics import com.airbnb.common.ml.strategy.params.BaseParam import com.airbnb.common.ml.util.ScalaLogging class BinaryRegressionTrainer...
airbnb/aerosolve
airlearner/airlearner-strategy/src/test/scala/com/airbnb/common/ml/strategy/trainer/BinaryRegressionTrainerTest.scala
Scala
apache-2.0
1,010
package im.actor.server.values import akka.actor.{ ActorSystem, ExtendedActorSystem, Extension, ExtensionId, ExtensionIdProvider } import akka.util.Timeout import im.actor.config.ActorConfig final class ValuesExtension(val system: ActorSystem) extends Extension with SyncedSet { val defaultTimeout = Timeout(ActorCon...
EaglesoftZJ/actor-platform
actor-server/actor-core/src/main/scala/im/actor/server/values/ValuesExtension.scala
Scala
agpl-3.0
610
package org.jetbrains.sbt.runner import com.intellij.execution.configurations.{RunProfile, RunProfileState, RunnerSettings} import com.intellij.execution.executors.DefaultDebugExecutor import com.intellij.execution.runners.{ExecutionEnvironment, GenericProgramRunner, ProgramRunner} /** * User: Dmitry.Naydanov * D...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/sbt/runner/SbtProgramRunner.scala
Scala
apache-2.0
999
/* __ *\\ ** ________ ___ / / ___ __ ____ PhantomJS support for Scala.js ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013-2017, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ https://www.scala-js.org/ **...
sjrd/scala-js-env-phantomjs
phantomjs-env/src/main/scala/org/scalajs/jsenv/phantomjs/WebsocketManager.scala
Scala
bsd-3-clause
815
import org.apache.http.client.HttpClient import org.apache.http.impl.client.DefaultHttpClient import org.apache.http.client.methods.HttpGet import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer import org.apache.commons.io.IOUtils object TwitterPull { val AccessToken = "access token for your app"; val Ac...
riccardomerolla/scala-twitter-client
src/main/scala/TwitterPull.scala
Scala
mit
1,006
/* * This file is part of P2pCore. * * Copyright (C) 2012 Timur Mehrvarz, timur.mehrvarz(at)gmail.com * * 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 <http://www.gnu.org/licenses/>, eith...
mehrvarz/P2pCore
src/RelayBase.scala
Scala
gpl-3.0
951
package objsets import TweetReader._ /** * A class to represent tweets. */ class Tweet(val user: String, val text: String, val retweets: Int) { override def toString: String = "User: " + user + "\\n" + "Text: " + text + " [" + retweets + "]" } /** * This represents a set of objects of type `Tweet` ...
mathusuthan/scala-fun
objsets/src/main/scala/objsets/TweetSet.scala
Scala
mit
8,243
/* * Copyright 2014 http4s.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 law or agreed to i...
http4s/http4s
server/shared/src/main/scala/org/http4s/server/middleware/HSTS.scala
Scala
apache-2.0
3,037
package io.buoyant.linkerd.protocol.http import com.twitter.finagle.Path import com.twitter.finagle.util.LoadService import io.buoyant.config.Parser import io.buoyant.linkerd.IdentifierInitializer import io.buoyant.linkerd.protocol.HttpIdentifierConfig import org.scalatest.FunSuite class PathIdentifierConfigTest exte...
denverwilliams/linkerd
linkerd/protocol/http/src/test/scala/io/buoyant/linkerd/protocol/http/PathIdentifierConfigTest.scala
Scala
apache-2.0
1,037
package com.blinkbox.books.search import java.io.IOException import scala.concurrent.Future import scala.concurrent.duration._ import org.json4s._ import org.json4s.jackson.JsonMethods._ import org.junit.runner.RunWith import org.mockito.Matchers import org.mockito.Matchers._ import org.mockito.Mockito._ import org.sc...
blinkboxbooks/spray-search-service.scala
src/test/scala/com/blinkbox/books/search/SearchApiTests.scala
Scala
mit
9,057
package breeze.config import com.thoughtworks.paranamer.AdaptiveParanamer import java.lang.reflect.Type import collection.mutable.ArrayBuffer import java.io.File import java.{lang=>jl} import ReflectionUtils._ /** * Generates a Help message from a case class. If a constructor parameter has a "Help" annotation * ...
dlwh/breeze-config
src/main/scala/breeze/config/GenerateHelp.scala
Scala
apache-2.0
5,377
package fpinscala.datastructures import List._ object TestingTheList {;import org.scalaide.worksheet.runtime.library.WorksheetSupport._; def main(args: Array[String])=$execute{;$skip(207); val res$0 = // What happens when we call foldRight using Nil and Cons themselves... foldRight(List(1, 2, 3), Nil: List...
js1972/fpinscala
exercises/.worksheet/src/fpinscala.datastructures.TestingTheList.scala
Scala
mit
3,500
package pt.org.apec.services.users import spray.routing._ import pt.org.apec.services.users.common.json.JsonProtocol import pt.org.apec.services.users.dal._ import spray.http.StatusCodes._ import pt.org.apec.services.users.common._ import spray.httpx.PlayJsonSupport import scala.concurrent.ExecutionContext class Us...
ragb/apec-users-service
service/src/main/scala/pt/org/apec/services/users/UsersService.scala
Scala
apache-2.0
1,147
/** * 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...
samaitra/kafka
core/src/test/scala/integration/kafka/api/SaslSslEndToEndAuthorizationTest.scala
Scala
apache-2.0
1,120
package uk.gov.dvla.vehicles.presentation.common.controllers import com.google.inject.Inject import play.api.mvc.{Action, Controller} import play.api.data.Form import uk.gov.dvla.vehicles.presentation.common.models import uk.gov.dvla.vehicles.presentation.common.views import uk.gov.dvla.vehicles.presentation.common.cl...
dvla/vehicles-presentation-common
common-test/app/uk/gov/dvla/vehicles/presentation/common/controllers/EmailController.scala
Scala
mit
1,020
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala.tools.nsc packag...
scala/scala
src/interactive/scala/tools/nsc/interactive/ContextTrees.scala
Scala
apache-2.0
7,784
package scalads package core import scalads.readers.ObjectReader import scalads.macroimpls.EntityBuilder /** * @author Bryce Anderson * Created on 6/1/13 */ trait QueryIterator[+U, E] extends Iterator[U] { self => def nextEntity(): E def next(): U override def map[Z](f: (U) => Z): QueryIter...
bryce-anderson/scalads
macros/src/main/scala/scalads/core/QueryIterator.scala
Scala
apache-2.0
864
package akka import akka.actor._ import akka.event.Logging import akka.routing.RoundRobinPool //TODO rename to bigsoup import org.kirhgoff.ap.core._ sealed trait RunnerMessage case class StartWorldProcessing(world:WorldModel, listener:WorldModelListener, iterations:Int) extends RunnerMessage case class CalculateNew...
kirhgoff/life-server
app/akka/LifeActors.scala
Scala
mit
4,800
// Generated by the Scala Plugin for the Protocol Buffer Compiler. // Do not edit! // // Protofile syntax: PROTO3 package com.google.protobuf.duration /** A Duration represents a signed, fixed-length span of time represented * as a count of seconds and fractions of seconds at nanosecond * resolution. It is indepe...
dotty-staging/ScalaPB
scalapb-runtime/jvm/src/main/scala/com/google/protobuf/duration/Duration.scala
Scala
apache-2.0
9,804
def f(p: Int*) = {} val args1: Array[Int] = Array(1, 2) println(/* offset: 4, applicable: false */ f(args1))
whorbowicz/intellij-scala
testdata/resolve2/function/repeat/ArrayRaw.scala
Scala
apache-2.0
110
opaque type T[X] = X object T { def f(x: T[Int]): Int = x // OK def g(x: Int): T[Int] = x // OK }
som-snytt/dotty
tests/pos/toplevel-opaque/opaque-id.scala
Scala
apache-2.0
102
/* Copyright (C) 2008-2010 Univ of Massachusetts Amherst, Computer Science Dept This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://code.google.com/p/factorie/ This software is provided under the terms of the Eclipse Public License 1.0 as published by...
andrewmilkowski/factorie
src/main/scala/cc/factorie/Mixture.scala
Scala
epl-1.0
5,254
/* * The MIT License * * Copyright (c) 2017 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/api/SamOrderTest.scala
Scala
mit
10,440
package forcomp import common._ object Anagrams { /** A word is simply a `String`. */ type Word = String /** A sentence is a `List` of words. */ type Sentence = List[Word] /** `Occurrences` is a `List` of pairs of characters and positive integers saying * how often the character appears. * This l...
xupeixiang/scala-course
progfun-forcomp/src/main/scala/forcomp/Anagrams.scala
Scala
apache-2.0
6,439
/* * 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 ...
fanyon/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/scala/expressionDsl.scala
Scala
apache-2.0
25,019
package com.stulsoft.yscdcatalogue.scala.service import org.apache.commons.lang3.StringUtils import org.apache.logging.log4j.LogManager import org.apache.logging.log4j.Logger import javafx.collections.FXCollections import javafx.collections.ObservableList import javafx.scene.control.TreeItem import com.stulsoft.yscd...
ysden123/YSCDCatalogue
src/main/scala/com/stulsoft/yscdcatalogue/scala/service/Search.scala
Scala
mit
4,155
package com.chatwork.sbt.aws.eb import com.amazonaws.AmazonServiceException import com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient import com.chatwork.sbt.aws.core.SbtAwsCoreKeys._ import com.chatwork.sbt.aws.eb.SbtAwsEbPlugin.autoImport import org.sisioh.aws4s.eb.Implicits._ import org.sisioh.aws4s....
chatwork/sbt-aws
sbt-aws-eb/src/main/scala/com/chatwork/sbt/aws/eb/ConfigurationTemplateSupport.scala
Scala
mit
7,655
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
practice-vishnoi/dev-spark-1
mllib/src/test/scala/org/apache/spark/ml/classification/LogisticRegressionSuite.scala
Scala
apache-2.0
30,055
/* * 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 ...
sgururajshetty/carbondata
integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/preaggregate/TestPreAggregateWithSubQuery.scala
Scala
apache-2.0
4,353
package scalaDemo /** * Created by liush on 17-7-17. * scala中hdfs文件的操作 * FileSystem定义了hadoop的一个文件系统接口 * 对于org.apache.Hadoop.fs.Path来说, path.getName只是文件名,不包括路径 path.getParent也只是父文件的文件名,同样不包括路径 path.toString才是文件的全路径名 */ import java.io.{FileSystem => _, _} import org.apache.hadoop.fs._ import ...
tophua/spark1.52
examples/src/main/scala/scalaDemo/HDFSHelper.scala
Scala
apache-2.0
6,225
/* * 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/main/scala/org/apache/spark/mllib/tree/impurity/Variance.scala
Scala
apache-2.0
4,722
package is.hail.expr.ir import is.hail.HailContext import is.hail.annotations._ import is.hail.backend.ExecuteContext import is.hail.backend.spark.SparkBackend import is.hail.expr.JSONAnnotationImpex import is.hail.types.physical.{PArray, PCanonicalStruct, PStruct, PType} import is.hail.types.virtual._ import is.hail....
hail-is/hail
hail/src/main/scala/is/hail/expr/ir/MatrixValue.scala
Scala
mit
14,426
package cbt import java.io.File import java.net.URL import scala.collection.immutable.Seq abstract class PublishBuild(context: Context) extends PackageBuild(context){ def name = artifactId def description: String def url: URL def developers: Seq[Developer] def licenses: Seq[License] def scmUrl: String de...
tobias-johansson/cbt
stage2/PublishBuild.scala
Scala
bsd-2-clause
1,384
/* * 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 ...
gioenn/xSpark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/LiteralExpressionSuite.scala
Scala
apache-2.0
5,493
package gv package jleon4 trait PathPackage { this: TypeClassPackage ⇒ trait Path[T] extends Any with TypeClass.WithTypeParams[T, Path.Ops] object Path extends TypeClassCompanion[Path] { trait Ops extends Any { type Self <: JPath def self: Self final def addExt(ext: String): JPath = sel...
mouchtaris/jleon
src/main/scala-2.12/gv/jleon4/PathPackage.scala
Scala
mit
402
/*start*/ <elem> content </elem> /*end*/; //Elem
ilinum/intellij-scala
testdata/typeInference/xml/Element.scala
Scala
apache-2.0
48
/* ************************************************************************** * * * Copyright (C) 2011-2012 Peter Kossek, Nils Foken, Christian Krause * * * * Pete...
wookietreiber/scalomator
core/src/test/scala/DSLSpec.scala
Scala
gpl-3.0
2,965
/** * Copyright 2017-2020 The OpenZipkin 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 ...
bizreach/play-zipkin-tracing
play/src/test/scala/brave/play/module/ZipkinModuleSpec.scala
Scala
apache-2.0
2,641
import sbt._ class Plugins(info: ProjectInfo) extends PluginDefinition(info) { val bankSimpleRepo = "BankSimple Repo" at "http://nexus.banksimple.com/content/groups/public" val sbtIdeaRepo = "sbt-idea-repo" at "http://mpeltonen.github.com/maven/" val sbtIdeaPlugin = "com.github.mpeltonen" % "sbt-idea-plugin" %...
KirinDave/Clipping
project/plugins/plugins.scala
Scala
apache-2.0
507
package test.scala import org.specs.Specification import com.protose.resque._ import com.protose.resque.FancySeq._ object FancySeqSpec extends Specification { "it joins seqs of strings together" in { List("1", "2", "3").join must_== "123" } "it joins with a delimiter" in { List("1", "2", "3...
jamesgolick/scala-resque-worker
src/test/scala/FancySeqSpec.scala
Scala
mit
384
package chrome.webRequest import chrome.events._ import chrome.webRequest.bindings._ import scala.language.implicitConversions import scala.scalajs.js import scala.scalajs.js.UndefOr trait WebRequestEventSource[T <: js.Function] { def listen(callback: T, filter: RequestFilter, opt_extraIn...
lucidd/scala-js-chrome
bindings/src/main/scala/chrome/webRequest/BlockingRequestEventSource.scala
Scala
mit
1,155
package uima.ae import geography.GeographyExtractorForQuestion import jeqa.types._ import org.apache.uima.UimaContext import org.apache.uima.analysis_component.JCasAnnotator_ImplBase import org.apache.uima.analysis_engine.AnalysisEngineProcessException import org.apache.uima.cas.FSIterator import org.apache.uima.jcas....
ktr-skmt/FelisCatusZero
src/main/scala/uima/ae/QuestionAnalyzer.scala
Scala
apache-2.0
5,450
package com.splicemachine.spark.splicemachine import org.apache.spark.sql.SparkSession object ThisVersionSpecificItems { def beforeAll(spark: SparkSession): Unit = {} val schema = SparkVersionSpecificItems.schemaWithoutMetadata }
splicemachine/spliceengine
splice_spark/src/test/spark2.4/com/splicemachine/spark/splicemachine/ThisVersionSpecificItems.scala
Scala
agpl-3.0
238
package com.twitter.scalding.spark_backend import com.stripe.dagon.{FunctionK, Memoize} import com.twitter.algebird.Semigroup import com.twitter.scalding.Config import com.twitter.scalding.typed._ import com.twitter.scalding.typed.functions.{DebugFn, FilterKeysToFilter} import java.util.{LinkedHashMap => JLinkedHashMa...
twitter/scalding
scalding-spark/src/main/scala/com/twitter/scalding/spark_backend/SparkBackend.scala
Scala
apache-2.0
14,909
package com.kubukoz.adventofcode2016 import com.kubukoz.adventofcode2016.Day7._ import org.scalatest.{FlatSpec, Matchers} class Day7Tests extends FlatSpec with Matchers { "supportsTLS" should "work properly for case 1" in { supportsTLS("abba[mnop]qrst") shouldBe true } it should "work for case 2" in { ...
kubukoz/advent-of-code-2016
src/test/scala/com/kubukoz/adventofcode2016/Day7Tests.scala
Scala
apache-2.0
1,674
/* * Copyright 2009-2015 DigitalGlobe, 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 ag...
bradh/mrgeo
mrgeo-mapalgebra/mrgeo-mapalgebra-terrain/src/main/scala/org/mrgeo/spark/SlopeDriver.scala
Scala
apache-2.0
1,504
/** * 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...
usakey/kafka
core/src/main/scala/kafka/security/auth/ResourceType.scala
Scala
apache-2.0
1,544
/* * 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...
intel-analytics/BigDL
scala/dllib/src/test/scala/com/intel/analytics/bigdl/dllib/nn/ops/MultplySpec.scala
Scala
apache-2.0
1,268
package command case class SmsJob() extends Job { private var id: Int = 0 private var _sms: Some[Sms] = _ def setSms(sms: Sms): Unit = _sms = Some(sms); id = id + 1 override def run: Unit = { println(s"Job ID: $id executing sms jobs.") _sms.foreach(_.sendSms()) } }
BBK-PiJ-2015-67/sdp-portfolio
exercises/week10/src/main/scala/command/SmsJob.scala
Scala
unlicense
287
/** * 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/spark/wrappers/estimators/GBTClassifier.scala
Scala
apache-2.0
3,132
/* Copyright 2009-2016 EPFL, Lausanne */ package leon.lang import leon.annotation._ object Set { @library def empty[T] = Set[T]() @ignore def apply[T](elems: T*) = { new Set[T](scala.collection.immutable.Set[T](elems : _*)) } @extern @library def mkString[A](map: Set[A], infix: String, fA : A =>...
epfl-lara/leon
library/leon/lang/Set.scala
Scala
gpl-3.0
933
import scala.tools.nsc.doc.model._ import scala.tools.partest.ScaladocModelTest import language._ object Test extends ScaladocModelTest { override def resourceFile = "negative-defaults.scala" override def scaladocSettings = "" def testModel(root: Package) = { import access._ val pkg = root._package("tes...
lrytz/scala
test/scaladoc/run/t10391.scala
Scala
apache-2.0
919
/** * Copyright 2013-2015, AlwaysResolve Project (alwaysresolve.org), MOYD.CO LTD * This file incorporates work covered by the following copyright and permission notice: * * Copyright 2012 silenteh * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in complianc...
Moydco/AlwaysResolveDNS
src/main/scala/models/AddressHost.scala
Scala
apache-2.0
2,824
/* * 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/vat-registration-frontend
test/views/transactor/DeclarationCapacityViewSpec.scala
Scala
apache-2.0
2,268
package blended.updater.config /** * A bundle with a start configuration. * Used as part of [[Profile]] oder [[FeatureConfig]]. * * @param artifact The artifact (file). * @param start `true` if the bundle should be auto-started on container start. * @param startLevel The start level of this bundle. * @see [[Pro...
woq-blended/blended
blended.updater.config/shared/src/main/scala/blended/updater/config/BundleConfig.scala
Scala
apache-2.0
1,206
/* * 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
frontend/src/main/scala/quasar/sql/OrderType.scala
Scala
apache-2.0
955
package org.jetbrains.plugins.scala.lang.parser.parsing.top import com.intellij.psi.tree.IElementType import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes import org.jetbrains.plugins.scala.lang.parser.{ErrMsg, ScalaElementTypes, ScalaTokenBinders} import org.jetbrains.plugins.scala.lang.parser.parsing.base.M...
gtache/intellij-lsp
intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/parser/parsing/top/TmplDef.scala
Scala
apache-2.0
3,126
package services import org.scalamock.scalatest.MockFactory import org.scalatest.{BeforeAndAfter, Matchers, WordSpecLike} import play.api.Configuration class ConfigurationServiceImplTest extends WordSpecLike with BeforeAndAfter with Matchers with MockFactory { var config: Configuration = _ var service: Configura...
atanana/vue-stocks
test/services/ConfigurationServiceImplTest.scala
Scala
mit
1,010
package nars.logic.language import nars.storage.Memory //remove if not needed import scala.collection.JavaConversions._ object Instance { /** * Try to make a new compound from two components. Called by the inference rules. * <p> * A {-- B becomes {A} --> B * @param subject The first compoment * @pa...
printedheart/opennars
nars_lab_x/nars_scala/src/main/scala/nars/language/Instance.scala
Scala
agpl-3.0
596
import java.io._ import scala.xml._ import scala.util.matching.Regex //IMPROVE ERROR HANDLING EVERYWHERE, ESP. IN XML CREATION! class PerseusText( val urn: String, val filePath: String) { def xmlText:scala.xml.Elem = { val plnText = scala.io.Source.fromFile(filePath).mkString.replaceAll("TEI.2", "TEI") if ("...
srdee/tei-conversion-tools
scala/tests.scala
Scala
gpl-3.0
2,933
/* * 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 ...
sgururajshetty/carbondata
integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/partition/TestDDLForPartitionTableWithDefaultProperties.scala
Scala
apache-2.0
10,628
package service import model.domain.{Category, CategoryDistribution, StoreProduct} import scala.concurrent.Future trait StoreFront { /** * Retrieves a map of categories alongside a count of products in each category. * @return A Map where each entry is a [[Category]] together with the total count of produ...
alexflav23/exercises
rps/app/service/StoreFront.scala
Scala
apache-2.0
1,531
/* * Copyright (c) 2017-2019 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://www.apach...
RetentionGrid/snowplow
3-enrich/scala-common-enrich/src/main/scala/com.snowplowanalytics.snowplow.enrich/common/enrichments/registry/pii/PiiPseudonymizerEnrichment.scala
Scala
apache-2.0
14,263
// Generated by ScalaBuff, the Scala Protocol Buffers compiler. DO NOT EDIT! // source: riak.proto package com.basho.riak.protobuf final case class RpbErrorResp( `errmsg`: com.google.protobuf.ByteString = com.google.protobuf.ByteString.EMPTY, `errcode`: Int = 0) extends com.google.protobuf.GeneratedMessageLite ...
gideondk/Raiku
src/main/scala/com/basho/riak/protobuf/RiakPB.scala
Scala
apache-2.0
54,688
package com.sksamuel.scapegoat.inspections.math import com.sksamuel.scapegoat._ /** * @author * Stephen Samuel */ class BigDecimalScaleWithoutRoundingMode extends Inspection( text = "BigDecimal `setScale()` without rounding mode", defaultLevel = Levels.Warning, description = "Checks...
sksamuel/scapegoat
src/main/scala/com/sksamuel/scapegoat/inspections/math/BigDecimalScaleWithoutRoundingMode.scala
Scala
apache-2.0
1,297
package de.htwg.zeta.server.routing import com.google.inject.Provider import de.htwg.zeta.server.controller.ActivateAccountController import de.htwg.zeta.server.controller.ApplicationController import de.htwg.zeta.server.controller.ChangePasswordController import de.htwg.zeta.server.controller.DynamicFileController im...
Zeta-Project/zeta
api/server/app/de/htwg/zeta/server/routing/WebControllerContainer.scala
Scala
bsd-2-clause
3,383
package polyfunic /** Represents a sequent in a proof tree. */ sealed trait SequentLike { val lhs : List[ScalaType] val rhs : ScalaType } /** Represents a sequent with two contexts (lefts - Gamma, rights - Delta) and a primary formula on the left hand side. */ case class Context( lefts : List[ScalaType], fo...
JerrySwan/PolyFunic-pub
Sequent.scala
Scala
bsd-3-clause
1,731
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package scalaguide.async.scalaasync import javax.inject.Inject import scala.concurrent._ import akka.actor._ import play.api._ import play.api.mvc._ import play.api.test._ class ScalaAsyncSpec extends PlaySpecification { def samples(impl...
wsargent/playframework
documentation/manual/working/scalaGuide/main/async/code/ScalaAsync.scala
Scala
apache-2.0
3,031
package com.twitter.scalding.reducer_estimation import cascading.flow.{ FlowStep, Flow, FlowStepStrategy } import com.twitter.algebird.Monoid import com.twitter.scalding.{ StringUtility, Config } import org.apache.hadoop.mapred.JobConf import java.util.{ List => JList } import scala.collection.JavaConverters._ import...
nvoron23/scalding
scalding-core/src/main/scala/com/twitter/scalding/reducer_estimation/Common.scala
Scala
apache-2.0
4,973
import scala.concurrent.stm._ object HelloWorld { def main(args: Array[String]) { val x = Ref("hello world!") println(x.single()) } }
djspiewak/scala-stm
dep_tests/sbt/src/main/scala/HelloWorld.scala
Scala
bsd-3-clause
147
package org.sisioh.aws4s.sqs.model import com.amazonaws.services.sqs.model._ import org.sisioh.aws4s.PimpedType import scala.collection.JavaConverters._ object DeleteMessageBatchRequestFactory { def create(): DeleteMessageBatchRequest = new DeleteMessageBatchRequest() def create(queueUrl: String): DeleteMessag...
sisioh/aws4s
aws4s-sqs/src/main/scala/org/sisioh/aws4s/sqs/model/RichDeleteMessageBatchRequest.scala
Scala
mit
1,159
package example import org.scalatest.FunSuite import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner /** * This class implements a ScalaTest test suite for the methods in object * `Lists` that need to be implemented as part of this assignment. A test * suite is simply a collection of individual te...
RominYue/sourceCode
Functional-Programming-Principles-in-Scala/week0/example/src/test/scala/example/ListsSuite.scala
Scala
gpl-3.0
4,551
// Copyright (C) 2020 The Android Open Source Project // // 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 ...
WANdisco/gerrit
e2e-tests/src/test/scala/com/google/gerrit/scenarios/GitSimulation.scala
Scala
apache-2.0
1,548
/* * Copyright 2007-2011 WorldWide Conferencing, LLC * * 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...
lift/framework
core/actor/src/main/scala/net/liftweb/actor/LAPinger.scala
Scala
apache-2.0
3,066
package org.hqjpa.generator import java.util.regex.Pattern import java.util.regex.Matcher /** * Companion object for related class.<br/> * <br/> * Static members are thread safe, intance members are not. */ object JpaEntityMetadataParser { /** Model of JPA entity meta-data. */ class Model { /** Package line. ...
vejobrolis/hqjpa
hqjpa/src/org/hqjpa/generator/JpaEntityMetadataParser.scala
Scala
lgpl-3.0
6,084
/* * 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 ...
lincoln-lil/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/typeutils/TypeInfoCheckUtils.scala
Scala
apache-2.0
5,397
// scalac: -Ypickle-java class Test
scala/scala
test/files/pos/java-import-static-from-subclass/Test.scala
Scala
apache-2.0
36
/* * 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 ...
ioana-delaney/spark
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/MountSecretsBootstrap.scala
Scala
apache-2.0
2,572
package com.dslplatform.sbt import sbt._ import Keys._ import com.dslplatform.compiler.client.parameters.{Settings, Targets, TempPath} import sbt.Def.Initialize import sbt.complete.Parsers import sbt.plugins.JvmPlugin import scala.collection.mutable.ArrayBuffer import scala.util.Try object SbtDslPlatform...
hperadin/dsl-compiler-client
SbtPlugin/src/main/scala/com/dslplatform/sbt/SbtDslPlatformPlugin.scala
Scala
bsd-3-clause
18,903
package com.example.http4s.blaze.demo.server.endpoints import cats.effect.{Async, Timer} import cats.implicits._ import java.util.concurrent.TimeUnit import org.http4s.{ApiVersion => _, _} import org.http4s.dsl.Http4sDsl import scala.concurrent.duration.FiniteDuration import scala.util.Random class TimeoutHttpEndpoin...
aeons/http4s
examples/blaze/src/main/scala/com/example/http4s/blaze/demo/server/endpoints/TimeoutHttpEndpoint.scala
Scala
apache-2.0
646
/* * 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
index/secondary-index/src/test/scala/org/apache/carbondata/spark/testsuite/secondaryindex/TestIndexModelWithUnsafeColumnPage.scala
Scala
apache-2.0
1,996
class Foo { def h: Int = 20 final def f: Int = h final def init: Int = f } class Bar extends Foo { private var m = 10 override def h: Int = m } class Qux extends Bar { init override def h = a private val a = 30 // error }
som-snytt/dotty
tests/init/neg/override36.scala
Scala
apache-2.0
242
/* * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
hpe-cct/cct-core
src/main/scala/cogx/platform/opencl/OpenCLRestoredDeviceKernel.scala
Scala
apache-2.0
2,921