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 ...
manuzhang/incubator-gearpump
external/kudu/src/test/scala/org/apache/gearpump/external/kudu/KuduSinkSpec.scala
Scala
apache-2.0
2,836
/* * 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/tax-account-router-frontend
test/config/FrontendAppConfigSpec.scala
Scala
apache-2.0
1,144
/* * Copyright 2017 PayPal * * 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 ...
Harikiranvuyyuru/squbs
squbs-testkit/src/main/scala/org/squbs/testkit/japi/CustomTestKit.scala
Scala
apache-2.0
2,291
package com.aberdyne.graphchat abstract class Protocol(name: String, id: Long, events: List[Class[Event]]) { }
Kenishi/GraphChat
src/main/com/aberdyne/graphchat/Protocol.scala
Scala
apache-2.0
113
package io.pathfinder.websockets import io.pathfinder.models.{Commodity, Cluster, ModelId} import io.pathfinder.websockets.WebSocketMessage.MessageCompanion import io.pathfinder.authentication.AuthenticationStatus._ import play.Logger import play.api.libs.json.{JsSuccess, JsResult, Format, Json, JsValue, __} import pl...
CSSE497/pathfinder-server
app/io/pathfinder/websockets/WebSocketMessage.scala
Scala
mit
17,851
package skinny.test import javax.servlet.http._ import javax.servlet.ServletContext import org.json4s._ import org.mockito.Mockito._ import skinny.SkinnyEnv import skinny.micro.{ UnstableAccessValidation, SkinnyMicroParams } import skinny.micro.context.SkinnyContext import skinny.json.JSONStringOps import scala.collec...
Kuchitama/skinny-framework
test/src/main/scala/skinny/test/MockControllerBase.scala
Scala
mit
3,124
package com.romankagan.languages.classroomanalysis /** * Created by roman on 5/6/15. */ object SortingStudents extends App{ }
kagan770/talentbuddy
src/com/romankagan/languages/classroomanalysis/SortingStudents.scala
Scala
apache-2.0
130
package io.youi.layout class ReversedVerticalLayout(spacing: Double = 0.0) extends Layout { override def connect(container: Component): Unit = { update(container, Vector.empty) } override def disconnect(container: Component): Unit = Component.childrenFor(container).foreach { c => Snap(c).verticalReset()...
outr/youi
ui/js/src/main/scala/io/youi/layout/ReversedVerticalLayout.scala
Scala
mit
1,001
package controllers import play.api.mvc._ object Info extends Controller { def info = Action { val html ="""<html> <head> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /> </head> <bod...
mateuszlor/ProjektArchWiki
app/controllers/Info.scala
Scala
mit
1,217
package org.randi3.model.criterion import org.randi3.model.criterion.constraint.DateConstraint import org.randi3.model.Entity._ import scalaz._ import Scalaz._ import org.joda.time.LocalDate case class DateCriterion private(id: Int, version: Int, name: String, description: String, inclusionConstraint: Option[DateCons...
dschrimpf/randi3-core
src/main/scala/org/randi3/model/criterion/DateCriterion.scala
Scala
gpl-3.0
1,712
package pipelines.images.imagenet import java.io.File import scala.reflect.ClassTag import breeze.linalg._ import breeze.stats._ import breeze.stats.distributions._ import scopt.OptionParser import org.apache.spark.{SparkConf, SparkContext} import org.apache.spark.rdd.RDD import evaluation.MulticlassClassifierEval...
shivaram/keystone
src/main/scala/pipelines/images/imagenet/ImageNetSiftLCSInteractionTerms.scala
Scala
apache-2.0
10,215
object Requires { def f(x: BigInt): Unit = { require(0 <= x && x <= 100) val y = x + 2 require(y * y >= x + 40) } def g: Unit = { f(10) } }
epfl-lara/stainless
frontends/benchmarks/verification/valid/MicroTests/Requires.scala
Scala
apache-2.0
167
package uk.gov.bis.taxserviceMock.data import scala.concurrent.{ExecutionContext, Future} case class GatewayUser(gatewayID: String, password: String, empref: Option[String], name: String, require2SV: Option[Boolean]) trait GatewayUserOps { def forGatewayID(gatewayID: String)(implicit ec: ExecutionContext): Future[...
WellFactored/das-alpha-taxservice-mock
src/main/scala/uk.gov/bis/taxserviceMock/data/GatewayUserOps.scala
Scala
mit
549
/* * 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
examples/src/main/scala/org/scalatest/examples/spec/beforeandafter/ExampleSpec.scala
Scala
apache-2.0
1,337
/* * 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/main/scala/com/intel/analytics/bigdl/dllib/utils/python/api/PythonBigDL.scala
Scala
apache-2.0
94,877
package com.socrata.internal.http.pingpong import java.nio.channels.spi.SelectorProvider import java.nio.{BufferOverflowException, ByteBuffer} import scala.util.Random import com.rojoma.simplearm.util._ import java.nio.channels.ClosedByInterruptException import java.net.InetSocketAddress import java.io.{Closeable, IOE...
socrata-platform/socrata-internal-http
src/main/scala/com/socrata/internal/http/pingpong/Pong.scala
Scala
apache-2.0
3,315
package org.scalaide.core.internal.quickassist // Java imports import java.util.regex.Pattern /** * This object is used for applying code transformations based on the found and required type * extract from the annotation message (such as quick fix message) and the expression in the source code. * The object argume...
scala-ide/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/core/internal/quickassist/TypeMismatchQuickFixProcessor.scala
Scala
bsd-3-clause
5,338
package com.github.pavlov99 abstract sealed class Treap[+K <% Ordered[K], +P <% Ordered[P]]{ def key: K def priority: P def left: Treap[K, P] def right: Treap[K, P] def size: Int def isEmpty: Boolean override def toString: String = if (isEmpty) { "." } else { "{" + left + "(" + key ...
pavlov99/scalastructures
src/main/scala/com/github/pavlov99/tree/Treap.scala
Scala
mit
4,596
package org.bowlerframework.view.scuery.stub /** * Created by IntelliJ IDEA. * User: wfaler * Date: 13/03/2011 * Time: 23:37 * To change this template use File | Settings | File Templates. */ class ExtendingComponent extends MySimpleComponent
rkpandey/Bowler
core/src/test/scala/org/bowlerframework/view/scuery/stub/ExtendingComponent.scala
Scala
bsd-3-clause
250
/* * Copyright 2012 杨博 (Yang Bo) * * 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...
Atry/commons-continuations
src/main/scala/com/dongxiguo/commons/continuations/io/package.scala
Scala
apache-2.0
3,247
//@ package xyz.hyperreal.energize import org.apache.http.client.fluent.Request import xyz.hyperreal.bvm.VM import xyz.hyperreal.json.DefaultJSONReader object ClientFunctions { def requestJSON( vm: VM, url: String ): Any = DefaultJSONReader.fromString( Request.Get(url) .addHeader( "Accept", "ap...
vinctustech/energize
src/main/scala/ClientFunctions.scala
Scala
isc
441
package scalakurs.myfutures import support.FlatSpecHelper import work._ import org.scalatest.matchers.ShouldMatchers import scala.concurrent._ import scala.concurrent.duration._ import scala.concurrent.ExecutionContext.Implicits.global class MyFuturesTest extends FlatSpecHelper with ShouldMatchers { def delayFact...
elacin/scala-kurs
oppgaver/src/test/scala/scalakurs/myfutures/MyFuturesTest.scala
Scala
apache-2.0
3,773
/** * @author Carol Alexandru * @author Silvan Troxler * * Copyright 2013 University of Zurich * * Licensed below 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.or...
mageru/signal-collect
src/main/scala/com/signalcollect/console/DataProvider.scala
Scala
apache-2.0
20,226
package app import com.google.inject.Guice import com.mohiva.play.silhouette.api.{ Logger, SecuredSettings } import controllers.routes import play.api._ import play.api.GlobalSettings import play.api.i18n.{ Lang, Messages } import play.api.mvc._ import play.api.mvc.Results._ import play.api.mvc.{ RequestHeader, Result...
danZzyy/SidewalkWebpage
sidewalk-webpage/app/Global.scala
Scala
mit
2,887
package org.hammerlab.guacamole.alignment import org.hammerlab.guacamole.alignment.AffineGapPenaltyAlignment.{align, scoreAlignmentPaths} import org.hammerlab.guacamole.util.BasesUtil._ import org.scalatest.{FunSuite, Matchers} class AffineGapPenaltyAlignmentSuite extends FunSuite with Matchers { test("score align...
hammerlab/guacamole
src/test/scala/org/hammerlab/guacamole/alignment/AffineGapPenaltyAlignmentSuite.scala
Scala
apache-2.0
3,096
package com.github.vitalsoftware.scalaredox import com.github.vitalsoftware.scalaredox.models.{ GroupedOrdersMessage, Order, SexType } import org.specs2.mutable.Specification class GroupedOrdersTest extends Specification with RedoxTest { "alter GroupedOrders" should { "post a new GroupedOrders given Redox Dev T...
vital-software/scala-redox
src/test/scala/com/github/vitalsoftware/scalaredox/GroupedOrdersTest.scala
Scala
mit
15,572
/* * Copyright 2014 Alan Rodas Bonjour * * 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 ...
alanrodas/Fronttier
core/src/main/scala/com/alanrodas/fronttier/ConfigParser.scala
Scala
apache-2.0
830
package org.jetbrains.sbt package project.module import java.awt.event.{ActionEvent, ActionListener} import java.util import javax.swing.table.AbstractTableModel import com.intellij.openapi.roots.ui.configuration.{ModuleConfigurationState, ModuleElementsEditor} import com.intellij.ui.CollectionListModel import com.in...
double-y/translation-idea-plugin
src/org/jetbrains/sbt/project/module/SbtModuleSettingsEditor.scala
Scala
apache-2.0
3,327
package mesosphere.marathon package api.akkahttp.v2 import mesosphere.UnitTest import mesosphere.marathon.state.PathId import org.scalatest.matchers.{ HavePropertyMatchResult, HavePropertyMatcher } import play.api.libs.json.{ JsNumber, JsObject, JsValue } trait ResponseMatchers { this: UnitTest => /** * Have p...
janisz/marathon
src/test/scala/mesosphere/marathon/api/akkahttp/v2/ResponseMatchers.scala
Scala
apache-2.0
7,063
package com.sksamuel.elastic4s.requests.admin case class ShrinkIndexRequest(source: String, target: String, waitForActiveShards: Option[Int] = None, settings: Map[String, String] = Map.empty) { def settings(map: Map[String, St...
sksamuel/elastic4s
elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/admin/ShrinkIndexRequest.scala
Scala
apache-2.0
372
package epic.logo import breeze.util.Index import breeze.math.MutableInnerProductModule case class MulticlassOracleInferencer[L, F, W]( validLabels: IndexedSeq[L], labelConjoiner: (L, F) => W)(implicit space: MutableInnerProductModule[W, Double]) extends OracleInferencer[LabeledDatum[L, F], W, Unit] { overrid...
langkilde/epic
src/main/scala/epic/logo/MulticlassOracleInferencer.scala
Scala
apache-2.0
583
package es.uvigo.ei.sing.sds package service import scala.collection.JavaConversions._ import scala.concurrent.Future import play.api.libs.concurrent.Execution.Implicits.defaultContext import uk.ac.cam.ch.wwmm.oscar.Oscar import uk.ac.cam.ch.wwmm.oscar.chemnamedict.entities.{ FormatType, ResolvedNamedEntity } final...
agjacome/smart-drug-search
src/main/scala/service/OscarService.scala
Scala
mit
968
package org.hibernate.cache.rediscala import scala.annotation.varargs /** * Hash 관련 툴 * * @author 배성혁 sunghyouk.bae@gmail.com */ private[rediscala] object Hashs { /** The constant NULL_VALUE. */ val NULL_VALUE = 0 /** The constant ONE_VALUE. */ val ONE_VALUE = 1 /** The constant FACTOR. */ val FACTOR...
debop/debop4s
hibernate-rediscala/src/test/scala/org/hibernate/cache/rediscala/Hashs.scala
Scala
apache-2.0
960
/* * 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 ...
matthewfranglen/spark
resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/PVTestsSuite.scala
Scala
mit
5,972
// Solution-1.scala // Solution to Exercise 1 in "Conditional Expressions" val a = 1 val b = 5 if(a < b) { println("a is less than b") } else { println("a is not less than b") } /* OUTPUT_SHOULD_BE a is less than b */
P7h/ScalaPlayground
Atomic Scala/atomic-scala-solutions/05_ConditionalExpressions/Solution-1.scala
Scala
apache-2.0
225
package org.dresdenocl.attributegrammar.integration.kiama import java.lang.reflect.{ Proxy, InvocationHandler, Method } import org.eclipse.emf.ecore._ import org.eclipse.emf.common.util._ import org.eclipse.emf.common.notify._ import org.dresdenocl.essentialocl.expressions._ import org.kiama.attribution._...
dresden-ocl/dresdenocl
plugins/org.dresdenocl.attributegrammar.integration.kiama/src/org/dresdenocl/attributegrammar/integration/kiama/AttributableEObject.scala
Scala
lgpl-3.0
5,940
import leon.collection._ object ADTWithArray5 { case class HashTable(table: Array[BigInt]) { require(table.length > 0) def apply(index: Int): BigInt = { require(index >= 0 && index < table.length) table(index) } } }
epfl-lara/leon
src/test/resources/regression/verification/purescala/valid/ADTWithArray5.scala
Scala
gpl-3.0
248
package com.sageserpent.plutonium import scala.reflect.runtime.universe._ // TODO - document the mysterious behaviour of the items returned. trait RecorderFactory { def apply[Item: TypeTag](id: Any): Item }
sageserpent-open/open-plutonium
src/main/scala/com/sageserpent/plutonium/RecorderFactory.scala
Scala
mit
211
/* * Copyright 2019 Google 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 applicable law or agreed to i...
GoogleCloudPlatform/professional-services
tools/bigquery-hive-external-table-loader/src/main/scala/com/google/cloud/bqhiveloader/Kerberos.scala
Scala
apache-2.0
1,859
package org.twitterist.utils.solr.schemamanager /** Package for schema management DSL */ package object dsl { /** Creates a FieldBuilder instance for a static field * * @param name The name of the field * @return a FieldBuilder instance */ def field(name: String): FieldBuilder = new FieldBuilder(fa...
twitterist/solr-schema-manager
src/main/scala/org/twitterist/utils/solr/schemamanager/dsl/package.scala
Scala
mit
1,276
package com.azavea.opentransit.indicators import com.github.nscala_time.time.Imports._ case class SamplePeriod( id: Int, periodType: String, start: LocalDateTime, end: LocalDateTime ) { def period: Period = new Period(start, end) } object SamplePeriod { def getRepresentativeWeekday(periods: Seq[SamplePer...
flibbertigibbet/open-transit-indicators
scala/opentransit/src/main/scala/com/azavea/opentransit/indicators/SamplePeriod.scala
Scala
gpl-3.0
477
/* * 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 ...
sh-cho/cshSpark
ui/ToolTips.scala
Scala
apache-2.0
4,346
/** * 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...
sebadiaz/kafka
core/src/test/scala/integration/kafka/api/MetricsTest.scala
Scala
apache-2.0
15,159
package org.jetbrains.plugins.scala.lang.resolve2 /** * Pavel.Fatin, 02.02.2010 */ class FunctionTypeGenericTest extends ResolveTestBase { override def folderPath: String = { super.folderPath + "function/type/generic/" } def testFunction1() = doTest() def testFunction2() = doTest() //TODO answer? //...
katejim/intellij-scala
test/org/jetbrains/plugins/scala/lang/resolve2/FunctionTypeGenericTest.scala
Scala
apache-2.0
482
package com.eevolution.context.dictionary.domain.model import ai.x.play.json.Jsonx import com.eevolution.context.dictionary.api.{ActiveEnabled, DomainModel, Identifiable, Traceable} import org.joda.time.DateTime /** * Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com * This progra...
adempiere/ADReactiveSystem
dictionary-api/src/main/scala/com/eevolution/context/dictionary/domain/model/LdapProcessorLog.scala
Scala
gpl-3.0
3,714
trait MM { protected def method = "bip" } trait NN { protected def method = "bop" } trait OOOOO extends MM with NN { override protected def method = super[MM].method + super[NN].method override def hashCode = super[MM].hashCode + super[NN].hashCode }
felixmulder/scala
test/pending/run/bug4704run.scala
Scala
bsd-3-clause
259
package com.gx.strategy.fp /** * Copyright 2017 josephguan * * 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 require...
josephguan/scala-design-patterns
behavioral/strategy/src/main/scala/com/gx/strategy/fp/Sorter.scala
Scala
apache-2.0
784
/* * Copyright 2016 Nikolay Smelik * * 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 ...
kerzok/ScalaBot
Examples/src/main/scala/scalabot/examples/teamnotification/states/AddNotificationStateProvider.scala
Scala
apache-2.0
1,458
package capitulo11 class Sec04_OperadoresAtribuicao { /** * Um operador de atribuição tem a forma operador=. e a expressão * a operador= b * significa o mesmo que * a = a operador b * Por exemplo, a += b é equivalente a: a = a + b * Existem alguns detalhes técnicos. * 1) <=, >=, e != não são operadores d...
celioeduardo/scala-impatient
src/test/scala/capitulo11/Sec04_OperadoresAtribuicao.scala
Scala
mit
551
package com.karasiq.bootstrap4.pagination import rx.{Rx, Var} import com.karasiq.bootstrap.context.RenderingContext trait UniversalPageSelectors extends PageSelectors { self: RenderingContext ⇒ import scalaTags.all._ type PageSelector = UniversalPageSelector object PageSelector extends PageSelectorFactory { ...
Karasiq/scalajs-bootstrap
library-v4/shared/src/main/scala/com/karasiq/bootstrap4/pagination/UniversalPageSelectors.scala
Scala
mit
2,143
object Version { val akka = "2.4.7" val scalaTest = "2.2.1" val scalaCheck = "1.12.1" val logback = "1.1.2" val scalaLogging = "3.1.0" }
jmarin/microservice-template
project/Version.scala
Scala
apache-2.0
183
/** * Magmanics Licensing. This web application allows for centralized control * of client application activation, with optional configuration parameters * to control licensable features, and storage of supplementary information * about the client machine. Client applications may interface with this * central serv...
manicmonkey/licensing
Licensing-Server/src/main/scala/com/magmanics/licensing/datalayer/model/ProductOptionEntity.scala
Scala
gpl-3.0
4,113
/* * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Fou...
TiarkRompf/lancet
src/main/scala/lancet/interpreter/Interpreter_LMS.scala
Scala
agpl-3.0
15,380
package HackerRank.Training.DataStructures.Arrays import java.io.{ByteArrayInputStream, IOException, InputStream, PrintWriter} import java.util.InputMismatchException import scala.collection.generic.CanBuildFrom import scala.language.higherKinds /** * Copyright (c) 2017 A. Roberto Fischer * * @author A. Robert...
robertoFischer/hackerrank
src/main/scala/HackerRank/Training/DataStructures/Arrays/AlgorithmicCrush.scala
Scala
mit
8,832
package spire package object algebra { type Eq[A] = _root_.algebra.Eq[A] val Eq = _root_.algebra.Eq type PartialOrder[A] = _root_.algebra.PartialOrder[A] val PartialOrder = _root_.algebra.PartialOrder type Order[A] = _root_.algebra.Order[A] val Order = _root_.algebra.Order type Semigroup[A] = _root_....
non/spire
core/src/main/scala/spire/algebra/package.scala
Scala
mit
6,018
/** * Copyright (C) 2013 Typesafe Inc. <http://typesafe.com> */ package com.twitter_typesafe.config.impl import com.twitter_typesafe.config._ import java.io.{ InputStream, InputStreamReader } import java.time.Duration; import beanconfig._ import org.junit.Assert._ import org.junit._ import scala.collection.JavaCo...
twitter-forks/config
config/src/test/scala/com/typesafe/config/impl/ConfigBeanFactoryTest.scala
Scala
apache-2.0
9,077
// Copyright (C) 2017 the original author or authors. // See the LICENCE.txt 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. // You may o...
andrewresearch/sangria-play-demo
src/test/scala/FunctionalSpec.scala
Scala
apache-2.0
1,985
package com.sksamuel.elastic4s.requests.searches.aggs.pipeline import com.sksamuel.elastic4s.requests.script.Script case class BucketScriptPipelineAgg(name: String, script: Script, bucketsPaths: Map[String, String], ...
sksamuel/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/pipeline/BucketScriptPipelineAgg.scala
Scala
apache-2.0
876
import sbt._ import Keys._ object CommonPlayTemplatesBuild extends Build { val appReleaseSettings = Seq( // Publishing options: publishMavenStyle := true, publishArtifact in Test := false, pomIncludeRepository := { x => false }, publishTo <<= version { (v: String) => val nexus = "https://d...
Defra/capd-common-play-templates
project/Build.scala
Scala
mit
1,330
/* * 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 ...
Intel-bigdata/OAP
oap-native-sql/core/src/test/scala/org/apache/spark/sql/sources/BucketedReadSuite.scala
Scala
apache-2.0
35,662
package looty package model.parsers import looty.model.ComputedItem ////////////////////////////////////////////////////////////// // Copyright (c) 2013 Ben Jackman, Jeff Gomberg // All Rights Reserved // please contact ben@jackman.biz or jeff@cgtanalytics.com // for licensing inquiries // Created by bjackman @ 12/19...
benjaminjackman/looty
looty/src/main/scala/looty/model/parsers/SocketsParser.scala
Scala
gpl-2.0
650
trait Foo { def foo = 4 } object Bar extends Foo { inline def bar = super[Foo].foo // error } object Main { Bar.bar }
som-snytt/dotty
tests/neg/i2901.scala
Scala
apache-2.0
124
// Starter Code for Exercise 6 // From "Functions as Objects" atom import com.atomicscala.AtomicTest._ between(70, 80, 90) is false between(70, 60, 90) is true
P7h/ScalaPlayground
Atomic Scala/atomic-scala-solutions/31_FunctionsasObjects/Starter-6.scala
Scala
apache-2.0
161
/* * 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...
yiheng/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/keras/nn/AtrousConvolution2DSpec.scala
Scala
apache-2.0
2,292
import com.google.caliper.runner.{CaliperMain => CaliperRunner} object Runner { // main method for IDEs, from the CLI you can also run the caliper Runner directly // or simply use SBTs "run" action def main(args: Array[String]) { // we simply pass in the CLI args, // we could of course also just pass ha...
bzz/scala-benchmark
src/main/scala/Runner.scala
Scala
apache-2.0
419
import sbt._ import Keys._ object Util { val buildScalaVersion = System.getProperty("scala.version", "2.11.8") val buildScalaVersions = Seq("2.11.8", "2.10.6") val javaVersion = System.getProperty("java.version") def loadCredentials(): List[Credentials] = { val mavenSettingsFile = System.getProperty...
scala/pickling
project/Util.scala
Scala
bsd-3-clause
1,142
package impl import akka.util.ByteString import scala.io.Source import java.net.InetSocketAddress import data.ProposalID import java.io.FileInputStream import java.io.FileOutputStream import java.io.ObjectInputStream import java.io.ObjectOutputStream /** * singleton object contains useful functions to support the fu...
allenfromu/Multi-Paxos2
src/main/scala/impl/Util.scala
Scala
mit
1,566
/* * MIT License * * Copyright (c) 2016 Gonçalo Marques * * 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 use, copy, ...
gonmarques/slick-repo
src/test/scala/com/byteslounge/slickrepo/repository/TestInstantVersionedEntityRepository.scala
Scala
mit
2,615
/* * Motto Web App Demo Application - oximity.com * Copyright (c) 2013 Oximity Limited * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option...
oximity/motto
src/main/scala/demo/motto/service/content/MottoDBService.scala
Scala
gpl-2.0
2,118
package dotty.tools.languageserver.util.actions import dotty.tools.languageserver.util.PositionContext import dotty.tools.languageserver.util.embedded.CodeMarker import dotty.tools.languageserver.util.server.TestFile import org.eclipse.lsp4j.{CompletionItem, CompletionItemKind} import org.junit.Assert.{assertEquals, ...
som-snytt/dotty
language-server/test/dotty/tools/languageserver/util/actions/CodeCompletion.scala
Scala
apache-2.0
1,708
/* * Copyright (c) 2011-2017 Interfaculty Department of Geoinformatics, University of * Salzburg (Z_GIS) & Institute of Geological and Nuclear Sciences Limited (GNS Science) * in the SMART Aquifer Characterisation (SAC) programme funded by the New Zealand * Ministry of Business, Innovation and Employment (MBIE) * ...
ZGIS/smart-portal-backend
app/models/owc/OwcAuthorDAO.scala
Scala
apache-2.0
4,654
package chat.tox.antox.wrapper import im.tox.tox4j.core.data.ToxNickname case class GroupInfo(key: GroupKey, online: Boolean, name: ToxNickname, alias: Option[ToxNickname], topic: String, blocked: Boolean, ...
wiiam/Antox
app/src/main/scala/chat/tox/antox/wrapper/GroupInfo.scala
Scala
gpl-3.0
906
import scala.util.parsing.combinator._ object Regexen { val RangeRegex = """\\[(\\\\\\]|[^\\]])*\\]""".r val ModifierRegex = """(\\*|\\+|\\?|\\{\\d+,\\d*\\}|\\{\\d+\\})\\??""".r val CharacterRegex = ("""\\\\""" + """u[\\daa-fA-F]{4}|\\\\.|[^()|]""").r val ExactRegex = """\\{(\\d+)\\}.*""".r val RepetitionRe...
fblundun/analyze-regex
analyzer.scala
Scala
apache-2.0
3,679
/* * Copyright 2011-2018 GatlingCorp (http://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applic...
wiacekm/gatling
gatling-charts/src/main/scala/io/gatling/charts/stats/buffers/BufferKey.scala
Scala
apache-2.0
821
import sbt._ import Keys._ object SprayCanBuild extends Build { import Dependencies._ import BuildSettings._ // configure prompt to show current project override lazy val settings = super.settings :+ { shellPrompt := { s => Project.extract(s).currentProject.id + " > " } } // -------------------------...
spray/spray-can
project/SprayCanBuild.scala
Scala
apache-2.0
1,805
package uk.gov.homeoffice.akka.schedule import akka.actor.ActorPath object Protocol { case object Schedule case object IsScheduled case class Scheduled(actorPath: ActorPath) case object NotScheduled case object Wakeup }
UKHomeOffice/rtp-akka-lib
src/main/scala/uk/gov/homeoffice/akka/schedule/Protocol.scala
Scala
mit
235
/* * 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 ...
ashokblend/incubator-carbondata
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/carbonTableSchema.scala
Scala
apache-2.0
27,702
package com.wordnik.client.api import java.math.BigDecimal import com.wordnik.client.model.Inline_response_200_23 import com.wordnik.client.model.VariableCategory import com.wordnik.client.model.Inline_response_200_24 import com.wordnik.client.model.Inline_response_200_2 import java.io.File import org.scalatra.{ Typ...
QuantiModo/QuantiModo-SDK-Scalatra
src/main/scala/com/wordnik/client/api/VariableCategoryApi.scala
Scala
gpl-2.0
7,111
/* * Copyright (c) 2016. Fengguo (Hugo) Wei and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Detailed co...
arguslab/argus-cit-intellij
src/main/scala/org/argus/cit/intellij/jawa/lang/psi/api/expr/JawaExpression.scala
Scala
epl-1.0
663
package com.equalinformation.interview.algo.scala.string_and_array import java.util /** * Created by bpupadhyaya on 6/12/16. */ object ReversePolishNotationEvaluation_NaiveTest extends App { val soln = new ReversePolishNotationEvaluation_Naive val tokens = Array("2","1","+","3","*") println("Result: " + so...
bpupadhyaya/interview-collections
interview-collections-algo/src/main/scala/com/equalinformation/interview/algo/scala/string_and_array/2-A-1-ReversePolishNotationEvaluation_Naive.scala
Scala
mit
1,052
/* * 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 ...
saltstar/spark
mllib/src/main/scala/org/apache/spark/ml/param/params.scala
Scala
apache-2.0
32,423
package scalaDemo /** * 从此可以看出在方法返回类型上使用this.type就可以写出像链条一样的代码,不断地点出来:) */ object ThisTypeDemo extends App { //食物点出来 val food = new Food food.setName("rice").setAge(2) println("Food : " + food) //大米点出来 val rice = new Rice //这是没问题的因为返回的是Food rice.setName("guangxidami").setAge(3) //这样也没问题,setgrow()...
tophua/spark1.52
examples/src/main/scala/scalaDemo/ThisTypeDemo.scala
Scala
apache-2.0
1,728
package objektwerks.types import org.scalatest.funsuite.AnyFunSuite import org.scalatest.matchers.should.Matchers class TypeAliasTest extends AnyFunSuite with Matchers { test("type alias") { type User = String type Age = Int val users = Map[User, Age]("john" -> 21, "jane" -> 19) users("john") shou...
objektwerks/scala
src/test/scala/objektwerks/types/TypeAliasTest.scala
Scala
apache-2.0
369
package com.gx.simplefactory /** * Copyright 2017 josephguan * * 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 requi...
josephguan/scala-design-patterns
creational/simple-factory/src/main/scala/com/gx/simplefactory/Operation.scala
Scala
apache-2.0
1,602
/* * Copyright (C) 2014 Romain Reuillon * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This progra...
openmole/openmole
openmole/plugins/org.openmole.plugin.task.netlogo/src/main/scala/org/openmole/plugin/task/netlogo/package.scala
Scala
agpl-3.0
1,521
package bad.robot.radiate.config import java.time.LocalTime import java.time.LocalTime._ import scalaz.{Failure, Success, Validation} object EcoMode { def validate(start: Option[String], end: Option[String]): Validation[String, Option[EcoMode]] = (start, end) match { case (Time(start), Time(end)) => Success(So...
tobyweston/radiate
src/main/scala/bad/robot/radiate/config/EcoMode.scala
Scala
apache-2.0
1,017
/* *\\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2015, G...
derekmorr/squants
shared/src/test/scala/squants/space/AngleSpec.scala
Scala
apache-2.0
4,026
/* * Copyright (C) 2013 Tactix4 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is dis...
NeovaHealth/t4openerp-connector
src/main/scala/com/tactix4/t4openerp.connector/transport/OEType.scala
Scala
agpl-3.0
5,318
/* * 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/test/scala/org/beangle/commons/lang/StringBuilderTest.scala
Scala
lgpl-3.0
1,106
package org.neo4j.cypher.internal.executionplan.builders /** * Copyright (c) 2002-2012 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Pu...
dksaputra/community
cypher/src/test/scala/org/neo4j/cypher/internal/executionplan/builders/IndexQueryBuilderTest.scala
Scala
gpl-3.0
4,967
/* * Copyright 2020 Precog Data * * 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 ...
djspiewak/quasar
api/src/main/scala/quasar/api/push/param/package.scala
Scala
apache-2.0
1,505
/* * 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 * distribute...
haghard/mongo-query-streams
src/test/scala/mongo/query/test/IntegrationMongoStreamsSpec.scala
Scala
apache-2.0
5,587
class Outer { class Inner { class Inner2 } } class HasA { type A } class Foo[A] object Test { def test = { val a: Outer#Inner = { val o = new Outer new o.Inner } val b: Outer#Inner#Inner2 = { val o = new Outer val i = new o.Inner new i.Inner2 } val c: Has...
lampepfl/dotty
tests/pos/escapingRefs.scala
Scala
apache-2.0
645
import org.scalacheck._, Prop._, Gen._, Arbitrary._ import scala.reflect.runtime.universe._, Flag._ object UnliftableProps extends QuasiquoteProperties("unliftable") { property("unlift name") = test { val termname0 = TermName("foo") val typename0 = TypeName("foo") val q"${termname1: TermName}" = Ident(te...
felixmulder/scala
test/files/scalacheck/quasiquotes/UnliftableProps.scala
Scala
bsd-3-clause
7,739
package com.twitter.finatra.http.modules import com.twitter.finatra.http.exceptions.DefaultExceptionMapper import com.twitter.finatra.http.internal.exceptions.{ExceptionManager, FinatraDefaultExceptionMapper} import com.twitter.finatra.http.internal.exceptions.json.{JsonParseExceptionMapper, CaseClassExceptionMapper} ...
tom-chan/finatra
http/src/main/scala/com/twitter/finatra/http/modules/ExceptionMapperModule.scala
Scala
apache-2.0
796
package org.http4s.client.oauth1 import org.http4s._ import org.http4s.client.oauth1 import org.http4s.util.CaseInsensitiveString import org.specs2.mutable.Specification class OAuthTest extends Specification { // some params taken from http://oauth.net/core/1.0/#anchor30, others from // http://tools.ietf.org/html...
ZizhengTai/http4s
client/src/test/scala/org/http4s/client/oauth1/OAuthTest.scala
Scala
apache-2.0
2,852
package hevs.especial.dsl.components import java.io.IOException import grizzled.slf4j.Logging import hevs.especial.dsl.components.core.Constant import hevs.especial.utils.{ComponentNotFound, CycleException, IoTypeMismatch} import scala.language.higherKinds import scalax.collection.GraphPredef._ import scalax.collect...
hevs-isi/especial-frontend
src/main/scala/hevs/especial/dsl/components/ComponentManager.scala
Scala
mit
13,147
package beppo2k.ftp.server.command import java.nio.channels.SelectionKey import java.nio.channels.Selector import java.nio.channels.SocketChannel import beppo2k.ftp.server.datatransfer.handler.{StorHandler, RetrHandler, NlstHandler} import beppo2k.ftp.server.{FtpUserSession, DataTransferSession, DataTransferActor} imp...
beppo2k/ftpserver
src/main/scala/beppo2k/ftp/server/command/FtpCommand.scala
Scala
mit
17,833
package protocgen import protocbridge.ProtocCodeGenerator import com.google.protobuf.ExtensionRegistry import com.google.protobuf.CodedInputStream import com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest import com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse import com.google.protobuf.Desc...
trueaccord/protoc-bridge
protoc-gen/src/main/scala/protocgen/CodeGenApp.scala
Scala
apache-2.0
1,985
package com.github.andr83.parsek.spark import com.github.andr83.parsek._ import com.github.andr83.parsek.spark.SparkPipeContext.{LongCountersParam, StringTuple2} import com.github.andr83.parsek.spark.pipe.RDDPipe import com.github.andr83.parsek.spark.sink.Sink import com.github.andr83.parsek.spark.source.Source import...
andr83/parsek
spark/src/main/scala/com/github/andr83/parsek/spark/ParsekJob.scala
Scala
mit
3,371