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) 2008 Google 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...
mjanson/gdata-scala-client
src/com/google/gdata/calendar/CalendarQuery.scala
Scala
apache-2.0
3,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 ...
ueshin/apache-spark
core/src/main/scala/org/apache/spark/api/python/PythonRunner.scala
Scala
apache-2.0
28,873
/* * 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
web/src/main/scala/quasar/api/services/invoke.scala
Scala
apache-2.0
2,381
package xi.armatweet.nlp import edu.stanford.nlp.ie.util.RelationTriple import edu.stanford.nlp.ling.{CoreAnnotations, IndexedWord} import edu.stanford.nlp.semgraph.SemanticGraph import edu.stanford.nlp.trees.UniversalEnglishGrammaticalRelations import net.sf.extjwnl.data.{POS, Synset} import net.sf.extjwnl.dictionary...
eXascaleInfolab/2016-armatweet
NLP/src/main/scala/xi/armatweet/nlp/VerbLinker.scala
Scala
mit
7,675
/** * 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...
Mszak/kafka
core/src/main/scala/kafka/server/KafkaApis.scala
Scala
apache-2.0
47,260
/* * 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-http/src/main/scala/io/gatling/http/request/builder/ws/WsRequestExpressionBuilder.scala
Scala
apache-2.0
1,179
package io.github.shogowada.scala.jsonrpc.server import io.github.shogowada.scala.jsonrpc.Models._ import io.github.shogowada.scala.jsonrpc.serializers.UpickleJSONSerializer import io.github.shogowada.scala.jsonrpc.{BaseSpec, Constants, api} import org.scalatest.Assertion import scala.collection.mutable.ListBuffer im...
shogowada/scala-json-rpc
shared/src/test/scala/io/github/shogowada/scala/jsonrpc/server/JSONRPCServerTest.scala
Scala
mit
6,892
/* * Copyright 2013 James Shade * * 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...
jamesshade/time
src/main/scala/org/shade/time/Clock.scala
Scala
apache-2.0
757
package scala.c.engine import org.eclipse.cdt.core.dom.ast.{IASTCaseStatement, IASTDeclarationStatement, IASTEqualsInitializer, _} import scala.collection.mutable.ListBuffer import java.nio.ByteBuffer import java.nio.ByteOrder import org.eclipse.cdt.core.dom.ast.IASTBinaryExpression.op_assign import org.eclipse.cdt....
bdwashbu/cEngine
src/scala/c/engine/cEngine.scala
Scala
apache-2.0
23,838
package org.tlc.template.ui.layouts import android.widget._ import macroid.ActivityContext import macroid.FullDsl._ /** * Author: @aguestuser * Date: 4/22/15 * License: GPLv2 (https://www.gnu.org/licenses/gpl-2.0.html) */ // layouts are composable! object MainLayouts { def layout1(implicit ctx: ActivityContex...
aguestuser/macroid-template
src/main/scala/org/tlc/template/ui/layouts/MainLayouts.scala
Scala
gpl-3.0
674
package grid.engine import cats.Eq import enumeratum.values._ object Nagios extends Nagios trait Nagios { sealed abstract class Severity(val value: Int) extends IntEnumEntry { def exit(): Nothing def prefix: String final def println(msg: String): this.type = { Console.out.println(s"$prefix $msg...
idiv-biodiversity/grid-engine-tools
src/main/scala/Nagios.scala
Scala
unlicense
1,596
import scala.util.control.NonFatal trait NonFatalTests { //NonFatals val nonFatals: Seq[Throwable] = Seq(new RuntimeException, new Exception, new Throwable, new NotImplementedError) //Fatals val fatals: Seq[Throwable] = Seq(new InterruptedException, ne...
scala/scala
test/files/jvm/non-fatal-tests.scala
Scala
apache-2.0
1,103
package org.jetbrains.plugins.scala.lang.completion import com.intellij.codeInsight.completion._ import com.intellij.codeInsight.lookup._ import com.intellij.openapi.util.Iconable._ import com.intellij.patterns.PlatformPatterns import com.intellij.psi._ import com.intellij.psi.filters._ import com.intellij.psi.filters...
jeantil/intellij-scala
src/org/jetbrains/plugins/scala/lang/completion/ScalaOverrideContributor.scala
Scala
apache-2.0
8,037
package de.jasminelli.souffleuse.bench /** * Parameters to a run of a RpcBench instance * * @author Stefan Plantikow<[email protected]> * * Originally created by User: stepn Date: 13.02.2009 Time: 15:30:08 */ final case class BenchParams(val load: RqLoad, val workDur: L...
boggle/souffleuse
src/test/scala/de/jasminelli/souffleuse/bench/BenchParam.scala
Scala
mit
1,132
package com.twitter.finagle.stats import com.twitter.common.metrics.Metrics import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import scala.collection.JavaConverters._ @RunWith(classOf[JUnitRunner]) class StatsFormatterTest extends FunSuite { private val metrics = ...
kumasento/finagle
finagle-stats/src/test/scala/com/twitter/finagle/stats/StatsFormatterTest.scala
Scala
apache-2.0
1,636
package shared.api import shared.dto.{CreateUserRequest, User} import shared.forms.Forms.SubmitResponse trait ServerApi { def logIn(login: String, pass: String): Either[String, User] def createUser(user: CreateUserRequest): SubmitResponse[CreateUserRequest,User] def listUsers(u: Unit): Either[String, List[User]...
Igorocky/lesn
shared/src/main/scala/shared/api/ServerApi.scala
Scala
mit
324
package dbtarzan.gui import scalafx.stage.Stage import scalafx.scene.control.{Label, Menu, MenuBar, MenuItem, SplitPane, TextField} import scalafx.scene.layout.{BorderPane, FlowPane} import scalafx.scene.Parent import scalafx.Includes._ import akka.actor.ActorRef import scalafx.event.ActionEvent import scalafx.geometr...
aferrandi/dbtarzan
src/main/scala/dbtarzan/gui/Database.scala
Scala
apache-2.0
4,049
/** * 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...
guozhangwang/kafka
core/src/main/scala/kafka/server/ControllerApis.scala
Scala
apache-2.0
36,262
package teststate.util import teststate.util.StdlibUtil._ trait StdlibUtil { implicit def toStateTestEitherStringExt[A](e: Either[String, A]): StateTestEitherStringExt[A] = new StateTestEitherStringExt(e) implicit def TestStateOptionExt[A](a: Option[A]): TestStateOptionExt[A] = new TestStateOptionExt(a)...
japgolly/test-state
util/shared/src/main/scala/teststate/util/StdlibUtil.scala
Scala
apache-2.0
5,348
package org.vaadin.addons.rinne import java.util.Date import com.vaadin.event.dd.DropHandler import com.vaadin.ui.Calendar import com.vaadin.ui.components.calendar.event.CalendarEventProvider import org.vaadin.addons.rinne.mixins.AbstractComponentMixin class VCalendar extends Calendar with AbstractComponentMixin { ...
LukaszByczynski/rinne
src/main/scala/org/vaadin/addons/rinne/VCalendar.scala
Scala
apache-2.0
1,905
import sbt._ import Process._ import com.twitter.sbt._ class CachetProject(info: ProjectInfo) extends StandardProject(info) { val specs = "org.scala-tools.testing" % "specs" % "1.6.2.1" % "test" val configgy = "net.lag" % "configgy" % "1.5" val jetty = "org.mortbay.jetty" % "jetty" % "6.1.24" val jetty_util = ...
nkallen/cachet
project/build/Cachet.scala
Scala
mit
1,019
package model import org.bson.types.ObjectId /** * The Class Tags. * * @author Nguyen Duc Dung * @since 2/7/14 5:28 PM * */ case class Tag( _id: ObjectId = new ObjectId(), name: String, count: Long = 0, read: Long = 0 )
SunriseSoftVN/hayhayblog
core/app/model/Tag.scala
Scala
gpl-2.0
308
/* The random case is simple - we generate a double and use this to choose between * the two random samplers. The exhaustive case is trickier if we want to try * to produce a stream that does a weighted interleave of the two exhaustive streams. */ def weighted[A](g1: (Gen[A],Double), g2: (Gen[A],Double)): Gen[A] = {...
ShokuninSan/fpinscala
answerkey/testing/11.answer.scala
Scala
mit
1,696
package org.jetbrains.plugins.scala.testingSupport.scalatest.scala2_10.scalatest2_1_7 import org.jetbrains.plugins.scala.SlowTests import org.jetbrains.plugins.scala.testingSupport.scalatest.staticStringTest._ import org.junit.experimental.categories.Category /** * @author Roman.Shein * @since 24.06.2015. */ @Cate...
triplequote/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/testingSupport/scalatest/scala2_10/scalatest2_1_7/Scalatest2_10_2_1_7_StaticStringTest.scala
Scala
apache-2.0
673
package org.jetbrains.jps.incremental.scala package remote import java.io.{File, PrintStream} import java.util.{Timer, TimerTask} import com.intellij.util.Base64Converter import com.martiansoftware.nailgun.NGContext import org.jetbrains.jps.incremental.messages.BuildMessage.Kind import org.jetbrains.jps.incremental.s...
JetBrains/intellij-scala-historical
jps-plugin/src/org/jetbrains/jps/incremental/scala/remote/Main.scala
Scala
apache-2.0
2,871
/** * Copyright (C) 2007 Orbeon, Inc. * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. * * This prog...
martinluther/orbeon-forms
src/main/scala/org/orbeon/oxf/xforms/analysis/controls/SelectAppearanceTrait.scala
Scala
lgpl-2.1
2,394
package uk.co.pollett.flink.newsreader.rss import org.apache.flink.streaming.util.serialization.SerializationSchema class Serializer extends SerializationSchema[(String, Entry, Int)] { override def serialize(element: (String, Entry, Int)): Array[Byte] = { (element._1 + " - " + element._3 + "\\n").getBytes } }...
pollett/flink-newsreader
src/main/scala/uk/co/pollett/flink/newsreader/rss/Serializer.scala
Scala
mit
320
package sims.collision.narrowphase package gjk import sims.collision._ import sims.math._ import scala.collection.mutable.ListBuffer class GJK[A <: Collidable: ClassManifest] extends narrowphase.NarrowPhaseDetector[A] { def penetration(pair: (A, A)): Option[Penetration] = { val ms = new MinkowskiSum(pair) ...
jodersky/sims2
src/main/scala/sims/collision/narrowphase/gjk/GJK.scala
Scala
bsd-3-clause
2,536
class ReturnNoOutput { def foo(i: Int): Int = { /*start*/ if (true) return i println(i) /*end*/ println() 42 } } /* class ReturnNoOutput { def foo(i: Int): Int = { testMethodName(i) match { case Some(toReturn) => return toReturn case None => } println() 42 } def ...
ilinum/intellij-scala
testdata/extractMethod/output/ReturnNoOutput.scala
Scala
apache-2.0
421
package org.drooms.gui.swing import org.scalatest.FunSuite import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import java.awt.Color @RunWith(classOf[JUnitRunner]) class PlayersListSuite extends FunSuite { trait SamplePlayers { var playersList = new PlayersList() playersList = playersList...
triceo/drooms
drooms-swing-gui/src/test/scala/org/drooms/gui/swing/PlayersListSuite.scala
Scala
apache-2.0
2,505
/* * Copyright 2017-2022 John Snow Labs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
JohnSnowLabs/spark-nlp
src/test/scala/com/johnsnowlabs/ml/crf/ForwardBackwardSpec.scala
Scala
apache-2.0
4,115
import org.scalacheck._ object BasicTest extends Properties("A basic runnable test") { specify("startsWith", (a: String, b: String) => (a+b).startsWith(a)) } abstract class AbstractNotATest extends Properties("Not a runnable test") { specify("Fail", (a: Int, b: Int) => false) } class ClassNotATest extends Properti...
matheshar/simple-build-tool
src/sbt-test/tests/scalacheck-a/changes/BasicTest.scala
Scala
bsd-3-clause
482
package com.eevolution.context.dictionary.infrastructure.service import java.util.UUID import akka.NotUsed import com.eevolution.context.dictionary.domain._ import com.eevolution.context.dictionary.domain.model.BrowseAccess import com.eevolution.utils.PaginatedSequence import com.lightbend.lagom.scaladsl.api.{Service...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/service/BrowseAccessService.scala
Scala
gpl-3.0
2,073
package hubcat import dispatch._ sealed trait Credentials { def sign(req: Req): Req } case class OAuth2(access: String) extends Credentials { def sign(req: Req) = req <:< Map("Authorization" -> "token %s".format(access)) } case class BasicAuth(user: String, pass: String) extends Credentials { def sign(req...
softprops/hubcat
src/main/scala/credentials.scala
Scala
mit
356
package ssh import org.apache.sshd.server.{CommandFactory, Environment, ExitCallback, Command} import org.slf4j.LoggerFactory import java.io.{InputStream, OutputStream} import util.ControlUtil._ import org.eclipse.jgit.api.Git import util.Directory._ import org.eclipse.jgit.transport.{ReceivePack, UploadPack} import o...
campolake/gitbucketV2.1
src/main/scala/ssh/GitCommand.scala
Scala
apache-2.0
4,799
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
ConeyLiu/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/json/JsonSuite.scala
Scala
apache-2.0
100,585
package scalariform.astselect import org.scalatest._ import org.scalatest.matchers._ import scalariform.utils.Range import scalariform.ScalaVersions // format: OFF class AstSelectorTest extends FlatSpec with ShouldMatchers { // Legend: // // "|" denotes a zero-width selection before the position // "$" denot...
gawkermedia/scalariform
scalariform/src/test/scala/scalariform/astselect/AstSelectorTest.scala
Scala
mit
8,340
package io.skysail.domain.resources import io.skysail.domain.RequestEvent import io.skysail.domain.app.ApplicationApi /** * */ abstract class AsyncStaticResource extends AsyncResource[ApplicationApi,Any] { def getAsync(requestEvent: RequestEvent): Unit }
evandor/skysail-server
skysail.domain/src/io/skysail/domain/resources/AsyncStaticResource.scala
Scala
apache-2.0
264
package com.jiffey.slick.additions.dialects import com.jiffey.slick.additions.DatabaseDialect import com.jiffey.slick.additions.components.PostgreSQL object PostgreSQLDatabaseDialect extends DatabaseDialect[PostgreSQL]
dre1080/slick-additions
src/main/scala/com/jiffey/slick/additions/dialects/PostgreSQLDatabaseDialect.scala
Scala
apache-2.0
221
package com.obecto.gattakka.genetics.operators import com.obecto.gattakka.genetics.{Chromosome, Genome} import com.obecto.gattakka.{IndividualDescriptor,IndividualState, PipelineOperator} import scala.collection.mutable.ListBuffer import scala.util.Random trait MutationBaseOperator extends PipelineOperator { def ...
obecto/gattakka
src/main/scala/com/obecto/gattakka/genetics/operators/MutationBaseOperator.scala
Scala
mit
1,752
/******************************************************************************* Copyright (c) 2013, KAIST, S-Core. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. ***************************************************************...
daejunpark/jsaf
src/kr/ac/kaist/jsaf/analysis/typing/models/DOMObject/XMLHttpRequest.scala
Scala
bsd-3-clause
10,514
package bootstrap.liftweb import net.liftweb._ import util._ import Helpers._ import common._ import http._ import sitemap._ import Loc._ import net.liftmodules.JQueryModule import net.liftweb.http.js.jquery._ import code.rest.Downloads /** * A class that's instantiated early and run. It allows the application *...
joescii/type-prog-impress
src/main/scala/bootstrap/liftweb/Boot.scala
Scala
apache-2.0
2,529
/** * Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com> */ package akka.remote import scala.annotation.tailrec import scala.util.control.NonFatal import akka.actor.{ VirtualPathContainer, Terminated, Deploy, Props, Nobody, LocalActorRef, InternalActorRef, Address, ActorSystemImpl, ActorRef, ActorPathE...
Fincore/org.spark-project.akka
remote/src/main/scala/akka/remote/RemoteDaemon.scala
Scala
mit
8,587
/* Code Pulse: a real-time code coverage tool, for more information, see <http://code-pulse.com/> * * Copyright (C) 2014-2017 Code Dx, Inc. <https://codedx.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 ...
secdec/codepulse
hq/src/main/scala/com/secdec/bytefrog/hq/trace/TracePlayerManager.scala
Scala
apache-2.0
2,151
trait Foo[In] { type Out } object Test { implicit def fooInt: Foo[Int] { type Out = String } = ??? implicit def str: String = ??? def test1[A](f1: Foo[A])(implicit f2: f1.Out) = ??? def test2[A](implicit f1: Foo[A], f2: f1.Out) = ??? test1(fooInt) // OK test2 // OK } object Test2 { implicit de...
dotty-staging/dotty
tests/pos/i5427.scala
Scala
apache-2.0
1,298
import sbt._ import Keys._ object Dependencies { object Version { val logback = "1.1.8" val akka = "2.4.14" val gremlin = "2.6.0" val orientDb = "2.2.13" val scalaTest = "3.0.1" } val logbackClassic = "ch.qos.logback" % "logback-classic" % Version.logback val scalaTest = "org.scalatest" %...
jurajzachar/orientdb-embedded
project/Dependencies.scala
Scala
mit
2,194
// Author: Olivier Chafik (http://ochafik.com) package scalaxy.privacy import scala.tools.nsc.Global import scala.tools.nsc.plugins.Plugin import scala.tools.nsc.plugins.PluginComponent object PrivacyPlugin { def getInternalPhases(global: Global): List[PluginComponent] = List( new PrivacyComponent(global)...
nativelibs4java/Scalaxy
Privacy/Plugin/src/main/scala/scalaxy/privacy/PrivacyPlugin.scala
Scala
bsd-3-clause
724
package models.manager.commands import models.Item import models.manager.commands.traits.CanStartPlayer /** * Created by rbrowning on 4/26/17. * * Sent from the endpoints to the manager, this will tell the manager to play the current items. * * If there's already a playlist this will stop the current player...
rebrowning/entertainment-cluster-member
src/main/scala/models/manager/commands/PlayAllItems.scala
Scala
apache-2.0
460
package com.faacets package ext import scala.math._ import alg._ import spire.std.int._ import spire.math.{lcm, Rational} /** Extensions of correlation inequalities with binary outputs, from * Wu et al. arXiv:1302.6698 Compact Bell inequalities for multipartite experiments. */ object Wu2013 { import alg.immuta...
denisrosset/faacets-families
src/main/scala/ext/Wu2013.scala
Scala
bsd-3-clause
2,139
// Copyright 2014 Commonwealth Bank of Australia // // 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 ap...
CommBank/ebenezer
example/src/main/scala/au/com/cba/omnia/ebenezer/example/HiveExampleStep1.scala
Scala
apache-2.0
2,081
package com.example.http4s package jetty import cats.effect._ import com.codahale.metrics.MetricRegistry import fs2._ import fs2.StreamApp.ExitCode import org.http4s.dsl.Http4sDsl import org.http4s.server.HttpMiddleware import org.http4s.server.jetty.JettyBuilder import org.http4s.server.metrics._ object JettyExample...
reactormonk/http4s
examples/jetty/src/main/scala/com/example/http4s/jetty/JettyExample.scala
Scala
apache-2.0
975
package mesosphere.marathon.api.v2 import javax.inject.Inject import javax.ws.rs._ import javax.ws.rs.core.Response.Status._ import javax.ws.rs.core.{ MediaType, Response } import mesosphere.marathon.api.v2.json.Formats._ import mesosphere.marathon.api.{ MarathonMediaType, RestResource } import mesosphere.marathon.st...
EasonYi/marathon
src/main/scala/mesosphere/marathon/api/v2/DeploymentsResource.scala
Scala
apache-2.0
2,653
package controllers import controllers.EmployeeController._ import model.Product import play.api.libs.json.Json import play.api.mvc.{Action, Controller} import play.api.{Logger, Play} import scala.reflect.io.File /** * Created by oguzhan on 8/20/14. */ object ProductController extends Controller { def list() =...
moguzhanataman/fikrimuhal-staj
server/fikrimuhal-json-api/app/controllers/ProductController.scala
Scala
mit
1,842
package ru.tinkoff.aerospikeexamples.example import ru.tinkoff.aerospikemacro.printer.Printer import ru.tinkoff.aerospikescala.domain.{ByteSegment, SingleBin} import shapeless._ import scala.collection.mutable.ArrayBuffer import scala.concurrent.Await import scala.concurrent.duration.Duration.Inf import scala.languag...
TinkoffCreditSystems/aerospike-scala
aerospike-scala-example/src/main/scala/ru/tinkoff/aerospikeexamples/example/SampleCollectionsApp.scala
Scala
apache-2.0
3,525
package spinoco.fs2.http.websocket import java.nio.channels.AsynchronousChannelGroup import java.util.concurrent.Executors import cats.Applicative import javax.net.ssl.SSLContext import cats.effect.{Concurrent, ConcurrentEffect, ContextShift, Timer} import fs2.Chunk.ByteVectorChunk import fs2._ import fs2.concurrent...
Spinoco/fs2-http
src/main/scala/spinoco/fs2/http/websocket/WebSocket.scala
Scala
mit
23,022
package com.twitter.finagle.filter import com.twitter.finagle.Service import com.twitter.util.{Future, Promise, Return} import org.junit.runner.RunWith import org.mockito.Matchers.anyObject import org.mockito.Mockito.{when, verify} import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import org.scalate...
JustinTulloss/finagle
finagle-core/src/test/scala/com/twitter/finagle/filter/MaskCancelFilterTest.scala
Scala
apache-2.0
1,274
/*start*/"a b c".split("\\\\s+").map(_.toUpperCase)/*end*/ //Array[String]
ilinum/intellij-scala
testdata/typeInference/expected/placeholder/Uppercase.scala
Scala
apache-2.0
72
package net.categoricaldata.category import org.scalatest.FlatSpec import org.scalatest.matchers.ShouldMatchers import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import scala.math._ import net.categoricaldata.examples.Examples import net.categoricaldata.ontology._ import net.categoricaldata.util.C...
JasonGross/categoricaldata
src/test/scala/net/categoricaldata/category/LeftPushforwardTest.scala
Scala
mit
5,986
package skuber.batch import skuber.ResourceSpecification.{Names, Scope} import skuber.{ObjectReference, LabelSelector, NonCoreResourceSpecification, ObjectMeta, ObjectResource, Pod, ResourceDefinition, Timestamp} /** * @author David O'Riordan */ case class CronJob(val kind: String ="CronJob", override val apiVe...
minatjanster/skuber
client/src/main/scala/skuber/batch/CronJob.scala
Scala
apache-2.0
1,588
/** * Copyright (C) 2011 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 program i...
brunobuzzi/orbeon-forms
form-runner/jvm/src/test/scala/org/orbeon/oxf/portlet/liferay/FormRunnerRequestFilterTest.scala
Scala
lgpl-2.1
5,533
/** * Copyright 2011-2016 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 appli...
ryez/gatling
gatling-app/src/main/scala/io/gatling/app/RunResultProcessor.scala
Scala
apache-2.0
2,899
package iot.pood.management.security import com.typesafe.config.ConfigFactory import iot.pood.base.actors.BaseTest import iot.pood.base.exception.Exceptions.IncorrectConfigurationException import org.scalatest._ import scala.collection.mutable /** * Created by rafik on 12.10.2017. */ class SecurityConfigTest exte...
rafajpet/iot-pood
iot-pood-management/src/test/scala/iot/pood/management/security/SecurityConfigTest.scala
Scala
mit
1,300
/* * 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 ...
shaneknapp/spark
mllib/src/main/scala/org/apache/spark/ml/r/RWrappers.scala
Scala
apache-2.0
3,975
/* * 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 ...
jianran/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercionSuite.scala
Scala
apache-2.0
47,236
/******************************************************************************* * (C) Copyright 2015 ADP, 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....
adplabs/unicorn
search/src/main/scala/unicorn/search/TextSearch.scala
Scala
apache-2.0
4,669
package com.productfoundry.akka.cqrs import akka.actor.{Actor, ActorLogging, ActorSystem, Props} import akka.event.Logging import akka.pattern.ask import akka.util.Timeout import scala.concurrent.{Await, ExecutionContext} /** * Collects all commits published on the system event stream. * * Can be used to check...
Product-Foundry/akka-cqrs
test/src/main/scala/com/productfoundry/akka/cqrs/LocalCommitCollector.scala
Scala
apache-2.0
2,804
package scala.virtualization.lms package epfl package test7 import common._ import test1._ import util.OverloadHack import scala.reflect.SourceContext import java.io.{PrintWriter,StringWriter,FileOutputStream} import scala.reflect.SourceContext trait ScalaGenFatArrayLoopsFusionOpt extends ScalaGenArrayLoopsFat wit...
afernandez90/virtualization-lms-core
test-src/epfl/test7-analysis/TestFusion.scala
Scala
bsd-3-clause
6,254
/** * 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...
cran/rkafkajars
java/kafka/producer/BaseProducer.scala
Scala
apache-2.0
2,618
package io.koff.generator import akka.actor.ActorSystem import akka.util.Timeout import io.koff.services.{SimpleService, SimpleServiceImpl} import scala.concurrent.Await import scala.concurrent.duration._ import scala.language.postfixOps object GeneratorMain { implicit val timeout = Timeout(5 seconds) def main(...
coffius/macro-actors
src/main/scala/io/koff/generator/GeneratorMain.scala
Scala
mit
594
/* * 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 ...
bwsw/sj-platform
core/sj-output-streaming-engine/src/test/scala/com/bwsw/sj/engine/output/benchmark/SjOutputModuleRunner.scala
Scala
apache-2.0
1,119
/** * Copyright (c) 2013-2015 Patrick Nicolas - Scala for Machine Learning - All rights reserved * * The source code in this file is provided by the author for the sole purpose of illustrating the * concepts and algorithms presented in "Scala for Machine Learning". It should not be used to build commercial applic...
batermj/algorithm-challenger
books/cs/machine-learning/scala-for-machine-learning/1rst-edition/original-src-from-the-book/src/test/scala/org/scalaml/app/chap8/SVCMarginEval.scala
Scala
apache-2.0
3,357
/* * Copyright 2013 Julian Peeters * * 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...
julianpeeters/artisanal-pickle-maker
src/main/scala/tags/ANNOTATEDtpe.scala
Scala
apache-2.0
1,868
/*********************************************************************** * Copyright (c) 2013-2015 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 which * accompanies this distribution and is ...
AndrewAnnex/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/index/QueryStrategyDeciderTest.scala
Scala
apache-2.0
13,851
/* * 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/play-language
src/main/scala/uk/gov/hmrc/play/language/LanguageUtils.scala
Scala
apache-2.0
12,254
/* * Copyright 2010 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
taihsun/Gitest
src/main/scala/com/twitter/naggati/Stage.scala
Scala
apache-2.0
1,247
package com.rocketfuel.sdbc.base /** * A `Select` is an operation on a resource that produces some values, T. * @tparam Connection is the resource that produces values. * @tparam T is the values. */ abstract class Select[Connection, T] { self: Logging => def iterator()(implicit connection: Connection): Iterat...
wdacom/sdbc
base/src/main/scala/com/rocketfuel/sdbc/base/Select.scala
Scala
bsd-3-clause
389
package com.sksamuel.scapegoat.inspections.collections import com.sksamuel.scapegoat._ /** * @author * Stephen Samuel */ class PredefSeqIsMutable extends Inspection( text = "Predef.Seq is mutable", defaultLevel = Levels.Info, description = "Checks for use of mutable Seq.", explanation...
sksamuel/scapegoat
src/main/scala/com/sksamuel/scapegoat/inspections/collections/PredefSeqIsMutable.scala
Scala
apache-2.0
1,041
package controllers import play.api.Play.current import play.api.db._ import com.lucidchart.open.relate._ import com.lucidchart.open.relate.Query._ object RelateTests { val nums = (1 to 100) val numsLong = (1L to 100L) val numsInt = nums val numsDouble = numsLong.map { _.toDouble} val numsStri...
lucidsoftware/relate-benchmarks
app/controllers/RelateTests.scala
Scala
mit
42,841
package com.github.ekroth.spotify object SpotifyExamples { val Image = """ { "height" : null, "url" : "http://profile-images.scdn.co/artists/default/d4f208d4d49c6f3e1363765597d10c4277f5b74f", "width" : null } """ val Followers = """ { "href" : null, "total" : 4561 } """ val Category = """ { "href" : "ht...
ekroth/play-spotify
src/test/scala/com/github/ekroth/spotify/SpotifyExamples.scala
Scala
mit
17,990
/* * ScalaRay - Ray tracer based on pbrt (see http://pbrt.org) written in Scala * Copyright (C) 2009, 2010, 2011 Jesper de Jong * * 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 ve...
jesperdj/scalaray
src/main/scala/org/jesperdj/scalaray/vecmath/package.scala
Scala
gpl-3.0
2,090
package org.jetbrains.plugins.scala package findUsages package compilerReferences import java.util.concurrent.TimeUnit import java.util.concurrent.locks.{Condition, Lock, ReentrantLock} import com.intellij.openapi.compiler.CompilerMessageCategory import com.intellij.openapi.module.Module import com.intellij.psi.PsiCl...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/findUsages/compilerReferences/ScalaCompilerReferenceServiceFixture.scala
Scala
apache-2.0
3,617
package reopp.common.examples import java.util.concurrent.Semaphore import reopp.common.{Predicate, Utils, OptionSol, Function} import reopp.common.guardedcommands.{GCSolution, GCConnector} import reopp.common.guardedcommands.dataconnectors.ConnectorGen._ import Utils._ /** * Created by jose on 14/04/15. */ objec...
joseproenca/ip-constraints
code/src/main/scala/reopp/common/examples/SungExperiments.scala
Scala
mit
4,637
package com.advancedtelematic.feed import org.joda.time.DateTime import play.api.libs.json.{Json, JsValue, Writes} case class TraceEntry(id: String, timestamp: DateTime, lat: BigDecimal, lng: BigDecimal, isOccupied: Boolean) { def toCsv() : String = s"$id $lat $lng $isOccupied ${timestamp.getMillis / 1000}" } obje...
PDXostc/rvi_big-data_datafeeds
src/main/scala/com/advancedtelematic/feed/TraceEntry.scala
Scala
mpl-2.0
1,249
package scalaz.stream package examples import scalaz.concurrent.Task import org.scalacheck._ import Prop._ object WritingAndLogging extends Properties("writing-and-logging") { /* A `Writer[F,W,O]` is a `Process[F, W \/ O]`. See `WriterSyntax` for convenience functions for working with either the written va...
scalaz/scalaz-stream
src/test/scala/scalaz/stream/examples/WritingAndLogging.scala
Scala
mit
2,762
package org.jetbrains.sbt package project.settings import com.intellij.openapi.components._ import com.intellij.openapi.externalSystem.service.project.PlatformFacade import com.intellij.openapi.externalSystem.settings.AbstractExternalSystemLocalSettings import com.intellij.openapi.project.Project import org.jetbrains....
triggerNZ/intellij-scala
src/org/jetbrains/sbt/project/settings/SbtLocalSettings.scala
Scala
apache-2.0
1,579
package org.scalatra package object validation { }
dozed/scalatra
commands/src/main/scala/org/scalatra/validation/package.scala
Scala
bsd-2-clause
53
package com.example.models import javax.xml.bind.annotation.XmlRootElement import javax.xml.bind.annotation.XmlRegistry import org.neo4j.graphdb.GraphDatabaseService /** * Example of using a model object which can be automatically serialized/unserialized * to/from JSON using JAXB. Unfortunately with this method yo...
ept/neo4j-scala-template
src/main/scala/com/example/models/Moo.scala
Scala
mit
1,466
package com.es.scala.chapter07 abstract class IntTree { def contains(t: IntTree, v: Int): Boolean = t match { case EmptyTree => false case Node(elem, left, right) => elem == v || contains(left, v) || contains(right, v) } } case object EmptyTree extends IntTree case class Node(elem: Int, left: IntTree, righ...
elephantscale/learning-scala
ScalaByExample/src/main/scala/com/es/scala/chapter07/IntTree.scala
Scala
apache-2.0
348
package com.doanduyhai.elevator.actors import java.io.PrintStream import akka.actor.{ActorRef, Actor, ActorLogging} import scala.collection.immutable.{Queue} class ControlSystemActor(val expectedElevatorCount: Int, private[actors] var orderQueue:Queue[Pickup] = Queue.empty[Pickup], ...
doanduyhai/elevator-control-system
src/main/scala/com/doanduyhai/elevator/actors/ControlSystemActor.scala
Scala
apache-2.0
3,228
/* * Copyright (c) 2014-2020 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
alexandru/monifu
monix-reactive/shared/src/main/scala/monix/reactive/internal/consumers/HeadOptionConsumer.scala
Scala
apache-2.0
1,763
/* * 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 ...
mkolod/incubator-spark
streaming/src/main/scala/org/apache/spark/streaming/Checkpoint.scala
Scala
apache-2.0
7,275
/* * 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...
poplav/incubator-toree
sparkr-interpreter/src/main/scala/org/apache/toree/kernel/interpreter/sparkr/SparkRService.scala
Scala
apache-2.0
4,315
package org.vitrivr.adampro.query.query import org.vitrivr.adampro.shared.catalog.CatalogManager import org.vitrivr.adampro.data.datatypes.vector.Vector._ import org.vitrivr.adampro.data.entity.Entity import org.vitrivr.adampro.data.entity.Entity.AttributeName import org.vitrivr.adampro.distribution.partitioning.Parti...
dbisUnibas/ADAMpro
src/main/scala/org/vitrivr/adampro/query/query/QueryObject.scala
Scala
mit
5,898
package com.dwolla.cloudflare import cats._ import cats.syntax.all._ import com.dwolla.cloudflare.domain.model.accesscontrolrules._ import com.dwolla.cloudflare.domain.model.{AccountId, ZoneId, tagAccountId, tagZoneId} import io.circe.syntax._ import io.circe._ import io.circe.optics.JsonPath._ import fs2._ import com...
Dwolla/scala-cloudflare
client/src/main/scala/com/dwolla/cloudflare/AccessControlRuleClient.scala
Scala
mit
4,369
package org.freeour.app import org.freeour.app.controllers.MainController import org.scalatra.test.specs2._ // For more on Specs2, see http://etorreborre.github.com/specs2/guide/org.specs2.guide.QuickStart.html class MainServletSpec extends ScalatraSpec { def is = "GET / on ProtectedServlet" ^ "should ret...
ideaalloc/freeour
src/test/scala/org/freeour/app/MainServletSpec.scala
Scala
gpl-2.0
460
/* * Copyright: Copyright (C) 2016, ATS Advanced Telematic Systems GmbH * License: MPL-2.0 */ package org.genivi.sota.monitoring import java.util.concurrent.TimeUnit import com.codahale.metrics.jvm.{GarbageCollectorMetricSet, MemoryUsageGaugeSet} import scala.collection.JavaConverters._ import com.codahale.metr...
PDXostc/rvi_sota_server
common/src/main/scala/org/genivi/sota/monitoring/MetricsSupport.scala
Scala
mpl-2.0
1,758
package scalapoi package dragons import org.apache.poi.hssf.usermodel._ import java.io.{File, FileOutputStream} import scala.collection.JavaConverters._ import utils._ object Document { // totes unsafe - should at least return an either def create(name: String): Workbook = { val file = new FileOutputStream(n...
hamishdickson/scalapoi
src/main/scala/scalapoi/dragons/Document.scala
Scala
mit
432
/* * 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
external/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/PostgresIntegrationSuite.scala
Scala
apache-2.0
10,464
package com.googlecode.kanbanik.model import org.bson.types.ObjectId import com.googlecode.kanbanik.db.HasMidAirCollisionDetection import com.googlecode.kanbanik.db.HasMongoConnection import com.mongodb.DBObject import com.mongodb.casbah.commons.MongoDBObject import com.googlecode.kanbanik.dtos.WorkflowitemType import...
aymenhs/kanbanik
kanbanik-server/src/main/scala/com/googlecode/kanbanik/model/Workflowitem.scala
Scala
apache-2.0
3,839
package com.ignition.stream import scala.xml.{ Elem, Node } import org.apache.spark.sql.Row import org.apache.spark.sql.catalyst.expressions.GenericRowWithSchema import org.apache.spark.streaming.kafka.KafkaUtils import org.json4s.JValue import org.json4s.JsonDSL._ import org.json4s.jvalue2monadic import com.ignitio...
uralian/ignition
src/main/scala/com/ignition/stream/KafkaInput.scala
Scala
apache-2.0
3,438