code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
/* * Copyright (C) 2015 Stratio (http://stratio.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
darroyocazorla/crossdata
cassandra/src/test/scala/com/stratio/crossdata/connector/cassandra/CassandraTypesIT.scala
Scala
apache-2.0
5,222
/* Copyright (C) 2013-2019 Expedia Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
mikkokar/styx
system-tests/e2e-suite/src/test/scala/com/hotels/styx/plugins/PluginErrorHandlingSpec.scala
Scala
apache-2.0
3,884
package wzk.akkalogger.message /** * Message type that carries metrics that need to be averaged on the logger side. */ case class AverageMetricLogMessage(val metrics:Map[String, Long]) {} case class SimpleStringMessage(val senderHostName:String, val msg:String) {} case class ClearMetricLogMessage(msg:String) {}...
wangzk/my-util-codebase
scala/AkkaBasedRemoteLogger/src/main/scala/wzk/akkalogger/message/Messages.scala
Scala
apache-2.0
379
package personalizedAssignment.stepDefs import cucumber.api.java.After import cucumber.api.java.en.Given import cucumber.api.java.en.Then import cucumber.api.java.en.When import org.scalatest.selenium.WebBrowser.{go, goBack} import pages.BeforeYouStartPageSteps import pages.CaptureCertificateDetailsPageSteps import pa...
dvla/vrm-assign-online
acceptance-tests/src/test/scala/personalizedAssignment/stepDefs/NavigationStepDefs.scala
Scala
mit
10,270
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/amls-frontend
test/models/payments/TypeOfBankSpec.scala
Scala
apache-2.0
1,913
/** * Copyright (C) 2013 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...
brunobuzzi/orbeon-forms
src/main/scala/org/orbeon/oxf/util/StringReplacer.scala
Scala
lgpl-2.1
2,098
/******************************************************************************* Copyright (c) 2013-2014, S-Core, KAIST. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. *********************************************************...
darkrsw/safe
src/main/scala/kr/ac/kaist/jsaf/analysis/typing/models/Tizen/TIZENcalendar.scala
Scala
bsd-3-clause
32,918
/** * A SBT Plugin for wro4j (http://code.google.com/p/wro4j/) * * Copyright 2012 David Heidrich * * 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/LI...
BowlingX/xsbt-wro4j-plugin
src/main/scala/com/bowlingx/sbt/plugins/Wro4jPlugin.scala
Scala
apache-2.0
11,088
package org.clulab.processors.clu.tokenizer import java.io.StringReader import scala.collection.mutable import scala.util.matching.Regex import uk.ac.susx.informatics.Morpha import EnglishLemmatizer._ import lemport.lemma.{ LemmatizeException, Lemmatizer => LemmatizerPT } trait Lemmatizer { def lemmatizeWord(word:...
sistanlp/processors
main/src/main/scala/org/clulab/processors/clu/tokenizer/Lemmatizer.scala
Scala
apache-2.0
2,100
package models import play.api.libs.functional.syntax._ import play.api.libs.json.{Format, JsPath} case class Edition(id: Long, code: String) object Edition { implicit val format: Format[Edition] = ( (JsPath \\ "id").format[Long] and (JsPath \\ "code").format[String] )(Edition.appl...
PanzerKunst/redesigned-cruited.com-frontend
rater-ui/app/models/Edition.scala
Scala
gpl-3.0
348
class Box[X](val x: X) extends AnyVal { def map[Y](f: X => Y): Box[Y] = ((bx: Box[X]) => new Box(f(bx.x)))(this) } object Test { def map2[X, Y](self: Box[X], f: X => Y): Box[Y] = ((bx: Box[X]) => new Box(f(bx.x)))(self) def main(args: Array[String]) { val f = (x: Int) => x + 1 val g = (x: String...
loskutov/intellij-scala
testdata/scalacTests/pos/t6260.scala
Scala
apache-2.0
388
package com.sksamuel.elastic4s import org.elasticsearch.action.delete.DeleteResponse import org.elasticsearch.client.{Client, Requests} import org.elasticsearch.index.VersionType import scala.concurrent.Future import scala.language.implicitConversions /** @author Stephen Samuel */ trait DeleteDsl extends QueryDsl { ...
k4200/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/DeleteDsl.scala
Scala
apache-2.0
1,730
package com.github.tanacasino package object eucalyptuscala { trait ROD { val Endpoint: String val AccessKeyId: String = "AWS_ACCESS_KEY" val SecretAccessKey: String = "AWS_SECRET_KEY" // R.O.D!!! def readOrDie: (String, String, String) = (rod(Endpoint), rod(AccessKeyId), rod(SecretAcces...
tanacasino/eucalyptuscala
src/main/scala/com/github/tanacasino/eucalyptuscala/package.scala
Scala
mit
471
/* * 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
mv/core/src/test/scala/org/apache/carbondata/mv/rewrite/MVCreateTestCase.scala
Scala
apache-2.0
83,668
package springscala import org.springframework.http.{MediaType, ResponseEntity} import org.springframework.stereotype.Controller import org.springframework.web.bind.annotation.{PathVariable, RequestMapping, RequestParam, ResponseBody} import org.springframework.web.servlet.ModelAndView import springscala.ExampleContro...
ThStock/springboot-scala
src/main/scala/springscala/ExampleController.scala
Scala
apache-2.0
1,775
package org.eso.ias.heartbeat.test import org.eso.ias.heartbeat.serializer.HbJsonSerializer import org.eso.ias.heartbeat.{Heartbeat, HeartbeatProducerType, HeartbeatStatus} import org.scalatest.FlatSpec class TestJsonSerialization extends FlatSpec { /** The JSON serializer to test */ val serializer = new HbJso...
IntegratedAlarmSystem-Group/ias
Heartbeat/src/test/scala/org/eso/ias/heartbeat/test/TestJsonSerialization.scala
Scala
lgpl-3.0
1,851
/** * Copyright 2015 Devon Miller * * 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...
nightscape/scala-vdom
shared/src/main/scala/org/im/vdom/Diff.scala
Scala
apache-2.0
1,922
package com.blogspot.nurkiewicz.springwadl import org.springframework.web.bind.annotation.RequestParam import net.java.dev.wadl._ import net.java.dev.wadl.WadlParamStyle._ /** * @author Tomasz Nurkiewicz * @since 21.01.12, 14:17 */ object WadlMethodPostProcessors { def addHttpMethod(wadlMethod: WadlMethod, wra...
nurkiewicz/spring-rest-wadl
generator/src/main/scala/com/blogspot/nurkiewicz/springwadl/WadlMethodPostProcessors.scala
Scala
apache-2.0
1,545
package scala.pickling.binary.array.int import org.scalatest.FunSuite import scala.pickling._, scala.pickling.Defaults._, binary._ import scala.pickling.static._ import scala.reflect.runtime.universe._ class ArrayIntBinaryTest extends FunSuite { test("main") { val ia = Array[Int](30, 31) val pickle: Binar...
scala/pickling
core/src/test/scala/scala/pickling/binary/ArrayIntBinaryTest.scala
Scala
bsd-3-clause
618
package com.chrisrebert.lmvtfy.http import java.util.{Collection=>JavaCollection} import java.util.Map.{Entry=>MapEntry} import java.io.InputStream import scala.collection.JavaConverters._ import com.jcabi.http._ object UserAgentWire { private val userAgentHeader = "User-Agent" } case class UserAgentWire(private va...
cvrebert/lmvtfy
src/main/scala/com/chrisrebert/lmvtfy/http/UserAgentWire.scala
Scala
mit
817
package io.continuum.bokeh sealed trait Color { def toCSS: String } case object Transparent extends Color { def toCSS = "transparent" } abstract class RGBAColor(red: Int, green: Int, blue: Int, alpha: Double) extends Color case class RGBA(red: Int, green: Int, blue: Int, alpha: Double) extends RGBAColor(red, gr...
bokeh/bokeh-scala
bokeh/src/main/scala/Colors.scala
Scala
mit
12,196
/* * 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
effect/src/main/scala/quasar/effect/AtomicRef.scala
Scala
apache-2.0
5,273
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.api.http import org.specs2.mutable.Specification import play.api.inject.{ Injector, NewInstanceInjector } import play.api.mvc.{ EssentialAction, EssentialFilter } import play.api.{ Configuration, Environment, PlayException } /**...
wsargent/playframework
framework/src/play/src/test/scala/play/api/http/EnabledFiltersSpec.scala
Scala
apache-2.0
2,893
/* * _____ __ _ __ * / ___/_________ _/ /____ _ (_)__ __/ /________ __ * \\__ \\/ ___/ __ `/ // __ `/ / // / / / __/ ___/ / / / * ___/ / /__/ /_/ / // /_/ / / // /_/ / /_(__ ) /_/ / * /____/\\___/\\__,_/_/ \\__,_/__/ / \\__,_/\\__/____/\\__,_/ * ...
oforero/Metadata
compiler-plugin/src/main/scala/uk/ac/liv/oforero/metadata/plugin/MetadataPlugin.scala
Scala
bsd-3-clause
3,042
/* * 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 ...
bOOm-X/spark
sql/core/src/test/scala/org/apache/spark/sql/SessionStateSuite.scala
Scala
apache-2.0
8,681
package java.lang import scala.scalajs.js // This class is not emitted, but we need to define its members correctly final class Byte(value: scala.Byte) extends Number with Comparable[Byte] { def this(s: String) = this(Byte.parseByte(s)) override def byteValue(): scala.Byte = sys.error("stub") override def sho...
swhgoon/scala-js
javalib/source/src/java/lang/Byte.scala
Scala
bsd-3-clause
1,463
package com.rouesnel.typedsql import com.twitter.scrooge.ThriftStruct trait CompiledSqlQuery { /** The HiveQL - note this must be a string literal */ def sql: String /** How to partition the output table (if at all) */ def partitions: List[(String, String)] = Nil /** Source datasets inside the query */ ...
laurencer/typedsql
macro/src/main/scala/com/rouesnel/typedsql/CompiledSqlQuery.scala
Scala
apache-2.0
500
package org.mireynol.credit.service import akka.actor.{ActorSystem, Props} import akka.io.IO import spray.can.Http import akka.pattern.ask import akka.util.Timeout import org.slf4j.LoggerFactory import scala.concurrent.duration._ import scala.util.Properties object Main extends App { val logger = LoggerFactory.ge...
reynoldsm88/scala-drools
credit-approval-service/src/main/scala/org/mireynol/credit/service/Main.scala
Scala
apache-2.0
801
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.linker import scala.concu...
scala-js/scala-js
linker/jvm/src/main/scala/org/scalajs/linker/PathOutputDirectory.scala
Scala
apache-2.0
7,292
package hammock package circe import io.circe.generic.auto._ import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec class CirceCodecSpec extends AnyWordSpec with Matchers { case class Dummy(a: Int, b: String) import implicits._ val dummyValue = Dummy(1, "patata") val json ...
pepegar/hammock
hammock-circe/src/test/scala/hammock/circe/CirceCodecSpec.scala
Scala
mit
835
package com.avsystem.commons.misc import com.avsystem.commons.JInteger import org.scalatest.funsuite.AnyFunSuite class OptRefTest extends AnyFunSuite { test("nonempty test") { val opt = OptRef("lol") opt match { case OptRef(str) => assert(str == "lol") } } test("empty test") { val str: St...
AVSystem/scala-commons
commons-core/src/test/scala/com/avsystem/commons/misc/OptRefTest.scala
Scala
mit
843
package server import common._ import com.typesafe.config.ConfigFactory import akka.actor.{Actor, ActorLogging, ActorRef, ActorSystem, Props, OneForOneStrategy} class MasterActor extends Actor { // Test Supervisor by sending input def test(supervisor: ActorRef) = { supervisor ! 4 supervisor ! "anything" ...
highlanderkev/DeathWatch
server/src/main/scala/server/server.scala
Scala
mit
1,227
package io.github.electricmind.autocomplete import _root_.io.github.electricmind.autocomplete.Vocabulary.Vocabulary /* * A mapping NGrams to Words */ object NGram2Words { type NGram2Words = Map[String, Set[String]] def apply(words: Vocabulary) = (for { word <- words.toList ngrams <- (1 to 4).map...
electricmind/autocomplete
src/main/scala/autocomplete/NGram2Words.scala
Scala
apache-2.0
507
/** * 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...
sslavic/kafka
core/src/test/scala/unit/kafka/admin/DeleteOffsetsConsumerGroupCommandIntegrationTest.scala
Scala
apache-2.0
7,427
/* Copyright 2009-2016 EPFL, Lausanne */ import leon.lang._ object Composition { def passing_1(f: (Int) => Int, g: (Int) => Int, x: Int): Int = { require(g(1) == 2 && forall((a: Int) => f(g(a)) == a)) val a = g(x) if(x == 1) f(g(a)) else 2 } ensuring { _ == 2 } } // vim: set ts=4 sw=4 et:
regb/leon
src/test/resources/regression/verification/purescala/valid/Composition.scala
Scala
gpl-3.0
320
package yiris.core.math /** * An object contains basic math calculation such as unit conversions and * round-up functions. */ object Math { /** * Returns the decimal number in X decimal places. * @param d the decimal number. */ def toXDecimals(d: Double, x: Int = 2): Double = { BigDecimal(d).setSc...
kasonchan/yiris
core/src/main/scala/yiris/core/math/Math.scala
Scala
apache-2.0
936
package com.readclosely.model /* Copyright 2009-2010 Karl Pichotta 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 l...
kpich/readclosely
src/main/scala/com/readclosely/model/Mod.scala
Scala
apache-2.0
1,551
println("Hello World") val x = 1 val y = 1.3 val z = "hello" val q:Integer = 1 val multiline = """test test test test""" println(x, y, z, q, multiline) var a = 2 println(a) val b = 3 val c = { a += 1 a += b a } println(c, a) val d = { 1 > 0 } val e = if (d) 1 else 2 var f = ...
Gerula/Books
Atomic_Scala/script_demo.scala
Scala
isc
538
package eu.phisikus.plotka.framework.consul.consumer import eu.phisikus.plotka.framework.consul.ConsulServiceRegistryManager import eu.phisikus.plotka.model.{NetworkMessage, NetworkPeer} import eu.phisikus.plotka.network.consumer.StandardNetworkMessageConsumer import eu.phisikus.plotka.network.talker.Talker /** * T...
phisikus/plotka
framework/src/main/scala/eu/phisikus/plotka/framework/consul/consumer/ClusteredNetworkMessageConsumer.scala
Scala
bsd-3-clause
1,367
package com.querydsl.scala import java.io.{File, FileOutputStream, OutputStreamWriter} import java.io.File.pathSeparator import java.nio.charset.StandardCharsets import scala.tools.nsc._ import scala.tools.nsc.reporters.ConsoleReporter object CompileTestUtils { private def jarPathOfClass(className: String) = { ...
lpandzic/querydsl
querydsl-scala/src/test/scala/com/querydsl/scala/CompileTestUtils.scala
Scala
apache-2.0
1,780
package sledtr import org.scalatest.FunSuite class TestSuite extends FunSuite { test("aiueos") { assert(true) } }
K2Da/sledtr
src/test/scala/sledtr/TestSuite.scala
Scala
gpl-3.0
122
/* * Copyright (c) 2017 Richard Hull * * 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, modify, merge, publis...
rm-hull/byok3
repl/src/main/scala/byok3/console/SyntaxHighlighter.scala
Scala
mit
1,785
/* * Copyright 2012. * Filippo De Luca <me@filippodeluca.com> * Fantayeneh Asres Gizaw <fantayeneh@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.ap...
filosganga/scala-wurfl
src/main/scala/org/scalawurfl/repository/xml/XmlResource.scala
Scala
apache-2.0
2,440
package models.discipline /** * Created by Ravis on 23/02/15. */ import anorm._ import play.api.db.DB import play.api.Play.current class Discipline(val did: Long, val title: String) object Discipline { def apply(did: Long, title: String): Discipline = new Discipline(did, title) def Row2Discipline(row: Ro...
RavisMsk/Design-Tech-Home-Task
app/models/discipline/Discipline.scala
Scala
mit
841
package net.itadinanta.rnkr.engine trait LeaderboardTestConstants { val largeCount = 1000 val count = 500 val smallCount = 100 }
itadinanta/rnkr
rnkr-engine/src/test/scala/net/itadinanta/rnkr/engine/LeaderboardTestConstants.scala
Scala
gpl-2.0
132
package scalangine.samples import org.lwjgl.input.Keyboard import org.lwjgl.opengl.{GL11, Display, DisplayMode} import scalangine.engine.BasicGameRunner import scalangine.components.MouseInputComponent /** * Created by maxim_000 on 11/19/2014. */ object Game extends BasicGameRunner with MouseInputComponent { var...
sanecommajustin/scalangine
src/main/scala/scalangine/samples/Game.scala
Scala
mit
2,416
/* * 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 ...
sryza/spark
graphx/src/main/scala/org/apache/spark/graphx/package.scala
Scala
apache-2.0
1,345
package jinesra.vkMessageHistory import org.rogach.scallop._ import scala.xml._ import ch.qos.logback.classic.Level import org.slf4j.LoggerFactory object Script { def main(args: Array[String]) { object P extends ScallopConf(args) { val token = opt[String]("token", required = true, descr = "Access ...
arsenij-solovjev/vkMessageHistory
src/main/scala/jinesra/vkMessageHistory/Script.scala
Scala
apache-2.0
798
/* * TwoWayCapable.scala * * Updated: Feb 11, 2015 * * Copyright (c) 2015, CodeMettle */ package com.codemettle.reactivemq /** * @author steven * */ trait TwoWayCapable { protected def oneway: Boolean = false } trait Oneway extends TwoWayCapable { override final def oneway: Boolean = true }
CodeMettle/reactivemq
src/main/scala/com/codemettle/reactivemq/TwoWayCapable.scala
Scala
apache-2.0
311
/* * Copyright 2015 Heiko Seeberger * * 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...
el-dom/akka-http-json
akka-http-circe/src/test/scala/de/heikoseeberger/akkahttpcirce/CirceSupportSpec.scala
Scala
apache-2.0
5,498
package controllers import models.{Department, Student} import play.api.libs.json.JsValue import play.api.libs.json.Json._ import scala.util.control.Exception._ import scala.xml.NodeSeq object DepartmentSerializers { def toXmlString(deps:List[Department]): String = deps.map(departmentToXml).map(_.toString).foldLef...
sayon/simple-rest-app
app/controllers/DepartmentSerializers.scala
Scala
mit
1,857
package de.unihamburg.vsis.sddf.pipe import de.unihamburg.vsis.sddf.pipe.context.AbstractPipeContext abstract class PipeElementPassthrough[A] extends PipeElement[A, A] { def substep(input: A)(implicit pipeContext: AbstractPipeContext): Unit def step(input: A)(implicit pipeContext: AbstractPipeContext): A = ...
numbnut/sddf
src/main/scala/de/unihamburg/vsis/sddf/pipe/PipeElementPassthrough.scala
Scala
gpl-3.0
362
package actorbase.driver /** * This trait defines a Connection interface. */ trait Connection { def closeConnection(): Unit def executeQuery(query: String): String }
SweeneyThreads/ActorbaseDriver
src/main/scala/actorbase/driver/Connection.scala
Scala
mit
177
package fpinscala.monads import java.util.concurrent.ExecutorService import java.util.concurrent.Executors import org.junit.runner.RunWith import org.scalacheck.Arbitrary import org.scalacheck.Arbitrary.arbitrary import org.scalacheck.Gen import org.scalatest.BeforeAndAfterEach import org.scalatest.FlatSpec import org...
fpinscala-muc/fpinscala-abo64
exercises/src/test/scala/fpinscala/monads/MonadSpec.scala
Scala
mit
12,185
// Copyright 2016 The Bazel Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appl...
bazelbuild/rules_scala
test_version/version_specific_tests_dir/HelloLibTest.scala
Scala
apache-2.0
1,044
package bad.robot.radiate.ui trait Ui { def start() }
tobyweston/radiate
src/main/scala/bad/robot/radiate/ui/Ui.scala
Scala
apache-2.0
57
package outdated import leon.lazyeval._ import leon.lazyeval.$._ import leon.lang._ import leon.annotation._ import leon.collection._ import leon.instrumentation._ import leon.math._ //TODO: need to automatically check monotonicity of isConcrete // requires `unfoldFactor=2` /** * Here, both front and rear streams are...
epfl-lara/leon
testcases/lazy-datastructures/ManualnOutdated/RealTimeDeque.scala
Scala
gpl-3.0
11,681
package org.apache.datacommons.prepbuddy.imputations import org.apache.datacommons.prepbuddy.rdds.TransformableRDD import org.apache.datacommons.prepbuddy.utils.RowRecord /** * A contract for an imputation strategy */ trait ImputationStrategy extends Serializable { def prepareSubstitute(rdd: TransformableRDD,...
blpabhishek/prep-buddy
src/main/scala/org/apache/datacommons/prepbuddy/imputations/ImputationStrategy.scala
Scala
apache-2.0
401
package com.sksamuel.elastic4s.requests.searches.aggs import com.sksamuel.elastic4s.requests.script.Script import com.sksamuel.exts.OptionImplicits._ case class SumAggregation(name: String, field: Option[String] = None, missing: Option[AnyRef] = None, ...
stringbean/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/SumAggregation.scala
Scala
apache-2.0
978
/* * 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 * distrib...
fusepoolP3/p3-silk
silk-workbench/app/models/EvalLink.scala
Scala
apache-2.0
1,904
package net.numa08.genrelease trait NoteConverter { def convert(note: ReleaseNote): String }
numa08/gradle-releasenote-gen-plugin
src/main/scala/net/numa08/genrelease/NoteConverter.scala
Scala
mit
98
package controllers import javax.inject.Inject import models.db._ import models.query._ import models.service.{AgeGroupService, CityFactsComparison, SchoolingService} import play.api.i18n.{I18nSupport, MessagesApi} import play.api.libs.json.{JsError, JsResult, Json} import play.api.mvc.{Action, BodyParsers, Controlle...
LeonardoZ/SAEB
app/controllers/CityComparisonController.scala
Scala
mit
6,251
/* * 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 ...
ptkool/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/FileStreamSource.scala
Scala
apache-2.0
19,852
package com.robocubs4205.cubscout.model.access import com.netaporter.uri.Uri import com.robocubs4205.cubscout.TokenVal sealed trait Client { def id: TokenVal def name: String def author: String def redirectUris: Seq[Uri] def firstParty: Boolean } object Client { sealed trait ClientWithSecret extends...
robocubs4205/cubscout-server
common/src/main/scala/com/robocubs4205/cubscout/model/access/Client.scala
Scala
mit
1,146
package uk.gov.gds.ier.transaction.ordinary.name import uk.gov.gds.ier.test.FormTestSuite class NameFormTests extends FormTestSuite with NameForms { it should "error out on empty json" in { val js = JsNull nameForm.bind(js).fold( hasErrors => { hasErrors.errors.size should be(5) h...
alphagov/ier-frontend
test/uk/gov/gds/ier/transaction/ordinary/name/NameFormTests.scala
Scala
mit
13,374
/** * 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...
mohiva/silhouette
modules/http/src/main/scala/silhouette/http/RequestExtractor.scala
Scala
apache-2.0
9,254
package com.cloudray.scalapress.account import org.springframework.stereotype.Component import org.springframework.transaction.annotation.Transactional import com.cloudray.scalapress.util.{GenericDaoImpl, GenericDao} import com.sksamuel.scoot.soa.Page import com.googlecode.genericdao.search.Search import com.cloudray....
vidyacraghav/scalapress
src/main/scala/com/cloudray/scalapress/account/dao.scala
Scala
apache-2.0
3,663
/* * 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 ...
aosagie/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/util/TimestampFormatterSuite.scala
Scala
apache-2.0
5,029
/* * Copyright (C) 2016 Nikos Katzouris * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is d...
nkatzz/OLED
src/main/scala/oled/mwua/bandits/BanditFunctions.scala
Scala
gpl-3.0
794
package com.lightbend.coursegentools /** * Copyright Β© 2016 Lightbend, 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 * ...
lightbend-training/course-management-tools
core/src/main/scala/com/lightbend/coursegentools/ProcessDSL.scala
Scala
apache-2.0
2,368
/** * 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...
guozhangwang/kafka
core/src/main/scala/kafka/server/DynamicConfig.scala
Scala
apache-2.0
5,660
/* * Copyright (c) 2014 Robert Conrad - All Rights Reserved. * Unauthorized copying of this file, via any medium is strictly prohibited. * This file is proprietary and confidential. * Last modified by rconrad, 12/24/14 4:37 PM */ package base.entity.db import base.common.service.{ Service, ServiceCompanion } imp...
robconrad/base-api
project-entity/src/main/scala/base/entity/db/DbConfigService.scala
Scala
mit
1,369
package ru.makkarpov.scalingua.pofile import java.io.StringReader import java_cup.runtime.ComplexSymbolFactory import parse.{ErrorReportingParser, PoLexer, PoParser, PoParserSym} object ParserTest extends App { val text = "# comment\\n#. ex comment\\n#: test.scala:10\\n#, fuzzy,qwe\\n#~ some.tag\\nmsgid \\"ololo\\...
makkarpov/scalingua
scalingua/shared/src/main/scala/ru/makkarpov/scalingua/pofile/ParserTest.scala
Scala
apache-2.0
781
package ru.org.codingteam.icfpc class PRNG(seed: Long) extends BufferedIterator[Int] { var state = seed val MODULO: Long = math.pow(2, 32).toLong val MULTIPLIER: Long = 1103515245 val INCREMENT: Long = 12345 def hasNext: Boolean = true def next_state: Long = (MULTIPLIER * state + INCREMENT) ...
codingteam/icfpc-2015
src/main/scala/ru/org/codingteam/icfpc/PRNG.scala
Scala
mit
578
package com.msilb.scalandav20.model import java.time.Instant import com.msilb.scalandav20.model.account.{AccountFinancingMode, AccountID} import com.msilb.scalandav20.model.orders.TimeInForce.GTC import com.msilb.scalandav20.model.orders._ import com.msilb.scalandav20.model.pricing.PriceValue import com.msilb.scaland...
msilb/scalanda-v20
src/main/scala/com/msilb/scalandav20/model/transactions/package.scala
Scala
mit
66,146
// Project: angulate2 // Description: FaΓ§ade trait for @angular/forms/FormsModule // Copyright (c) 2016 Johannes.Kastner <jokade@karchedon.de> // Distributed under the MIT License (see included LICENSE file) package angulate2.forms import scala.scalajs.js import scala.scalajs.js.annotation.JSImport ...
jokade/angulate2
bindings/src/main/scala/angulate2/forms/FormsModule.scala
Scala
mit
412
package scaudio.output final class FrameBuffer { var left:Float = 0 var right:Float = 0 inline def clear():Unit = { left = 0 right = 0 } //------------------------------------------------------------------------------ inline def set(left:Float, right:Float):Unit = { this.left = left this.right = right...
ritschwumm/scaudio
src/main/scala/output/FrameBuffer.scala
Scala
bsd-2-clause
1,122
package features import org.scalatest.{BeforeAndAfter, FunSpec} import org.apache.http.HttpVersion import org.github.nicholasren.moco.helper.RemoteTestHelper import com.github.nicholasren.moco.dsl.SMoco import com.github.nicholasren.moco.dsl.SMoco._ import com.github.nicholasren.moco.dsl.Conversions._ class RequestM...
nicholasren/moco-scala
src/test/scala/features/RequestMatcherTest.scala
Scala
mit
3,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 ...
1ambda/zeppelin
zeppelin-display/src/main/scala/org/apache/zeppelin/display/angular/paragraphscope/AngularElem.scala
Scala
apache-2.0
3,176
package slick.codegen import slick.SlickException import slick.ast.ColumnOption import slick.{model => m} import slick.model.ForeignKeyAction import slick.relational.RelationalProfile import slick.sql.SqlProfile /** Base implementation for a Source code String generator */ abstract class AbstractSourceCodeGenerator(m...
slick/slick
slick-codegen/src/main/scala/slick/codegen/AbstractSourceCodeGenerator.scala
Scala
bsd-2-clause
13,275
package frameless import org.apache.spark.sql.FramelessInternals import org.apache.spark.sql.catalyst.analysis.GetColumnByOrdinal import org.apache.spark.sql.catalyst.expressions._ import org.apache.spark.sql.catalyst.expressions.objects.{Invoke, NewInstance} import org.apache.spark.sql.types._ import shapeless.labell...
bamine/frameless
dataset/src/main/scala/frameless/RecordEncoder.scala
Scala
apache-2.0
2,872
package jp.pigumer.sbt.cloud.aws.cloudformation sealed trait CloudformationTemplate case class Template(value: String) extends CloudformationTemplate case class TemplateBody(value: String) extends CloudformationTemplate
PigumerGroup/sbt-aws-cloudformation
src/main/scala/jp/pigumer/sbt/cloud/aws/cloudformation/Template.scala
Scala
mit
223
/* * 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/main/scala/com/intel/analytics/bigdl/transform/vision/image/Convertor.scala
Scala
apache-2.0
9,881
/* * 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 ...
DieBauer/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/scala/groupWindows.scala
Scala
apache-2.0
3,557
package com.twitter.finagle import scala.collection.generic.CanBuildFrom import scala.collection.mutable.Builder import scala.collection.immutable.VectorBuilder /** * A Dtab--short for delegation table--comprises a sequence of * delegation rules. Together, these describe how to bind a * [[com.twitter.finagle.Path]...
twitter/finagle
finagle-core/src/main/scala-2.12-/com/twitter/finagle/Dtab.scala
Scala
apache-2.0
1,464
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
Kegeruneku/rudder
rudder-core/src/main/scala/com/normation/rudder/services/eventlog/InventoryEventLogServiceImpl.scala
Scala
agpl-3.0
2,672
/* * Copyright 2011 BigData Mx * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
bigdata-mx/DataLib
src/main/scala/mx/bigdata/datalib/sql/SqlResultServlet.scala
Scala
apache-2.0
2,420
package macrame.scalaz.enums import macrame.EnumApi import org.scalacheck.{ Arbitrary, Gen } trait HasGenerator[Enum] { self : EnumApi[Enum] β‡’ lazy val gen = Gen.oneOf[Enum](valuesImpl.toSeq) implicit lazy val arbitrary : Arbitrary[Enum] = Arbitrary[Enum](gen) }
ChrisNeveu/macrame
macrame-scalaz/src/test/scala/macrame/scalaz/enums/HasGenerator.scala
Scala
bsd-3-clause
274
package dotty.tools.dotc package transform import TreeTransforms._ import core.DenotTransformers._ import core.Symbols._ import core.Contexts._ import core.Types._ import core.Flags._ import core.Decorators._ import core.StdNames.nme import ast.Trees._ import dotty.tools.dotc.ast.tpd import dotty.tools.dotc.core.Const...
AlexSikia/dotty
src/dotty/tools/dotc/transform/Literalize.scala
Scala
bsd-3-clause
3,293
package tests package hierarchy trait A1 trait A2[T] trait A3[A, B] trait A4 trait B1 extends A1 trait B2 extends A1 with A2[Int] trait B3 extends A2[Int] with A3[Int, String] class C1[A, B, C] extends B1 with B2 with B3 trait D1 trait D2[T, R] trait D3 extends A4 class E1 extends C1[Int, String, Boolean] with D1...
dotty-staging/dotty
scaladoc-testcases/src/tests/hierarchy.scala
Scala
apache-2.0
390
package io.buoyant.router import com.twitter.finagle.{Stack, Stackable, ServiceFactory, param} import com.twitter.finagle.buoyant.RetryFilter import com.twitter.finagle.service.{RetryFilter => _, _} import com.twitter.util.{Duration, Try} object ClassifiedRetries { val role = Stack.Role("ClassifiedRetries") /** ...
hhtpcd/linkerd
router/core/src/main/scala/io/buoyant/router/ClassifiedRetries.scala
Scala
apache-2.0
2,401
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
pgandhi999/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/CountIf.scala
Scala
apache-2.0
2,186
package com.arcusys.learn.liferay.services import java.util.Locale import com.arcusys.learn.liferay.LiferayClasses._ import com.liferay.counter.service.CounterLocalServiceUtil import com.liferay.portal.kernel.dao.orm._ import com.liferay.portal.kernel.util.OrderByComparator import com.liferay.portal.service.{ClassNam...
arcusys/Valamis
learn-liferay620-services/src/main/scala/com/arcusys/learn/liferay/services/AssetCategoryLocalServiceHelper.scala
Scala
gpl-3.0
3,467
package org.jetbrains.plugins.scala.failed.resolve import org.jetbrains.plugins.scala.PerfCycleTests import org.jetbrains.plugins.scala.lang.resolve2.ResolveTestBase import org.junit.experimental.categories.Category /** * @author Roman.Shein * @since 29.03.2016. */ @Category(Array(classOf[PerfCycleTests])) clas...
ilinum/intellij-scala
test/org/jetbrains/plugins/scala/failed/resolve/UnaryMethodPostfixNotationTest.scala
Scala
apache-2.0
486
package com.twitter.finagle.service import com.twitter.conversions.time._ import com.twitter.finagle.context import com.twitter.finagle.util.DefaultTimer import com.twitter.finagle.{ServiceFactory, FailedFastException, Service} import com.twitter.finagle.stats.{NullStatsReceiver, InMemoryStatsReceiver} import com.twit...
BuoyantIO/finagle
finagle-core/src/test/scala/com/twitter/finagle/service/RequeueFilterTest.scala
Scala
apache-2.0
5,946
package huffman import collection.mutable.{ Map => MMap } import util.control.Breaks._ import java.io._ object Huffman { def toDOT[T](tree: Tree[T]) = { def quote(s: String) = "\"" + s.replace("\"", "\\\"") + "\"" def iter(tree: Tree[T], prefix: String = ""): String = { tree match { case Fork...
anishathalye/huffman
src/main/scala/huffman/Huffman.scala
Scala
mit
1,990
/* * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - Redistributions of source code must retain the above copyright * no...
benhutchison/scala-swing
examples/src/main/scala/scala/swing/examples/tutorials/misc/FocusConceptsDemo.scala
Scala
bsd-3-clause
4,141
/* * 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 ...
zohar-mizrahi/flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/batch/sql/SetOperatorsTest.scala
Scala
apache-2.0
5,489
/** * Copyright 2015, 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
reportlib/src/main/scala/io/deepsense/reportlib/model/StructTypeJsonProtocol.scala
Scala
apache-2.0
974
package com.twitter.finagle.http.filter import com.twitter.finagle.{CancelledRequestException, Service, SimpleFilter} import com.twitter.finagle.http.{Request, Response, Status} import com.twitter.logging.Logger import com.twitter.util.{NonFatal, Future} import org.jboss.netty.handler.codec.http.HttpResponseStatus /...
kristofa/finagle
finagle-http/src/main/scala/com/twitter/finagle/http/filter/ExceptionFilter.scala
Scala
apache-2.0
2,207