code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
package sbt import java.io.File import org.scalacheck.{Arbitrary, Gen, Prop, Properties} import Prop._ import Process._ private[this] object ProcessSpecification extends Properties("Process I/O") { implicit val exitCodeArb: Arbitrary[Array[Byte]] = Arbitrary(Gen.choose(0, 10) flatMap { size => Gen.resize(size, Arbi...
kuochaoyi/xsbt
util/process/src/test/scala/ProcessSpecification.scala
Scala
bsd-3-clause
3,329
/* * Copyright 2013 Akiyoshi Sugiki, University of Tsukuba * * 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 a...
axi-sugiki/kumoi
src/kumoi/impl/vm/vdisk/VirtualDiskImpl.scala
Scala
apache-2.0
3,687
/* * MUSIT is a museum database to archive natural and cultural history data. * Copyright (C) 2016 MUSIT Norway, part of www.uio.no (University of Oslo) * * 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 ...
kpmeen/musit
musit-service/src/main/scala/no/uio/musit/healthcheck/HealthCheckStatus.scala
Scala
gpl-2.0
1,429
package de.zalando.play.compiler import java.io.File import de.zalando.apifirst.Application.StrictModel import de.zalando.apifirst.Domain.PrimitiveType import de.zalando.apifirst.ScalaName import de.zalando.apifirst.generators.ScalaGenerator import org.apache.commons.io.FileUtils import play.routes.compiler.RoutesCom...
zalando/play-swagger
play-scala-generator/src/main/scala/de/zalando/play/compiler/playScalaCompiler.scala
Scala
mit
7,994
/* * Copyright (C) 2013 The Mango 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 agre...
feijoas/mango
src/main/scala/org/feijoas/mango/common/collect/mutable/TreeRangeMapWrapper.scala
Scala
apache-2.0
2,534
package io.reactors package protocol /** Backpressure protocols ensure that fast producers do not overwhelm consumers. * * In an asynchronous system, there is always a possibility that a producer reactor * sends more events than the consumer can handle. This can eventually blow up the * memory requirements...
storm-enroute/reactors
reactors-protocol/shared/src/main/scala/io/reactors/protocol/backpressure-protocols.scala
Scala
bsd-3-clause
12,788
package com.crealytics.spark.excel import java.util import com.holdenkarau.spark.testing.DataFrameSuiteBase import org.apache.spark.sql.{Row, _} import org.apache.spark.sql.types._ import org.scalatest.funspec.AnyFunSpec import org.scalatest.matchers.should.Matchers import scala.collection.JavaConverters._ object P...
crealytics/spark-excel
src/test/scala/com/crealytics/spark/excel/PlainNumberReadSuite.scala
Scala
apache-2.0
3,841
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js sbt plugin ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ ** ** /____/\\___/...
matthughes/scala-js
sbt-plugin/src/main/scala/scala/scalajs/sbtplugin/ScalaJSCrossVersion.scala
Scala
bsd-3-clause
1,716
package darkpool.server import java.util.UUID import akka.actor.{ActorSystem, Props} import akka.io.IO import akka.pattern.ask import akka.util.Timeout import darkpool.actors.{LedgerActor, MatchingEngineActor, QueryActor} import darkpool.book.OrderBook import darkpool.engine.commands.Add import darkpool.models.orders....
film42/dark-pool
src/main/scala/darkpool/server/WebServer.scala
Scala
mit
2,549
/* * Artificial Intelligence for Humans * Volume 2: Nature Inspired Algorithms * Java Version * http://www.aifh.org * http://www.jeffheaton.com * * Code repository: * https://github.com/jeffheaton/aifh * * Copyright 2014 by Jeff Heaton * * Licensed under the Apache License, Version 2.0 (the "License"); * y...
PeterLauris/aifh
vol2/vol2-scala-examples/src/main/scala/com/heatonresearch/aifh/error/ErrorCalculationRMS.scala
Scala
apache-2.0
1,573
/** * 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...
cloudera/crunch
scrunch/src/test/scala/org/apache/scrunch/WordCountTest.scala
Scala
apache-2.0
1,639
/** * 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...
hongliangzhao/kafka
core/src/main/scala/kafka/controller/PartitionLeaderSelector.scala
Scala
apache-2.0
11,988
package $package$ import org.specs2.mutable.Specification final class CommonItSpec extends Specification { "Common integration" should { "integrate with Cauchy" in { 1 mustEqual 1 } } }
MateuszKubuszok/SBTScalaMultiproject2.g8
src/main/g8/modules/common/src/it/scala/$package$/CommonItSpec.scala
Scala
mit
208
package ingraph.ire.nodes.unary import ingraph.ire.datatypes.Tuple import ingraph.ire.messages.{ChangeSet, ReteMessage} import ingraph.ire.messages.SingleForwarder abstract class ProjectionImpl(val mask: Vector[Tuple => Any]) extends UnaryNode { override def onSizeRequest() = 0 override def onChangeSet(changeSet:...
FTSRG/ingraph
ire/src/main/scala/ingraph/ire/nodes/unary/ProjectionNode.scala
Scala
epl-1.0
664
package jsky.app.ot.tpe import edu.gemini.pot.sp._ import edu.gemini.shared.util.immutable.{None => JNone, Option => JOption} import edu.gemini.shared.util.immutable.ScalaConverters._ import edu.gemini.spModel.core.Site import edu.gemini.spModel.data.{ISPDataObject, IOffsetPosListProvider} import edu.gemini.spModel.g...
spakzad/ocs
bundle/jsky.app.ot/src/main/scala/jsky/app/ot/tpe/TpeContext.scala
Scala
bsd-3-clause
8,343
package com.faacets.qalg package algos package impl import scala.{specialized => sp} import spire.algebra._ import spire.math._ import spire.syntax.all._ import algebra._ import syntax.all._ import util._ final class DenseGramSchmidtE[M, V, @sp(Long) A](implicit M: MatRing[M, A] with MatSlice[M, V, A], MM: MatMut[M...
denisrosset/qalg
core/src/main/scala/qalg/algos/impl/DenseGramSchmidtE.scala
Scala
mit
2,860
/* * 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/test/scala/org/apache/spark/sql/catalyst/optimizer/PropagateEmptyRelationSuite.scala
Scala
apache-2.0
8,140
/* * 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 ...
chuckchen/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala
Scala
apache-2.0
39,797
import sbt._ import sbt.Keys._ import bintray.Plugin._ import bintray.Keys._ object Build extends Build { val customBintraySettings = bintrayPublishSettings ++ Seq( packageLabels in bintray := Seq("http", "web"), bintrayOrganization in bintray := Some("blackboxsociety"), repository in bintray ...
blackboxsociety/blackbox-http
project/Build.scala
Scala
mit
1,227
package com.eevolution.context.dictionary.infrastructure.repository import java.util.UUID import com.eevolution.context.dictionary.domain._ import com.eevolution.context.dictionary.domain.model.PrintPaper import com.eevolution.context.dictionary.infrastructure.db.DbContext._ import com.eevolution.utils.PaginatedSeque...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/repository/PrintPaperRepository.scala
Scala
gpl-3.0
2,742
/* * 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...
rahulkavale/scalatest
examples/src/main/scala/org/scalatest/examples/funspec/composingwithfixture/ExampleSpec.scala
Scala
apache-2.0
1,752
// Copyright (C) 2019 MapRoulette contributors (see CONTRIBUTORS.md). // Licensed under the Apache License, Version 2.0 (see LICENSE). package org.maproulette.models.dal import java.sql.{Connection, PreparedStatement} import anorm.SqlParser._ import anorm._ import org.joda.time.DateTime import org.maproulette.Config ...
Crashfreak/maproulette2
app/org/maproulette/models/dal/BaseDAL.scala
Scala
apache-2.0
15,642
/////////////////////////////////////////////////////////////////////////////// // Document.scala // // Copyright (C) 2010-2014 Ben Wing, The University of Texas at Austin // Copyright (C) 2011, 2012 Stephen Roller, The University of Texas at Austin // // Licensed under the Apache License, Version 2.0 (the "License...
utcompling/textgrounder
src/main/scala/opennlp/textgrounder/gridlocate/Document.scala
Scala
apache-2.0
49,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 ...
apache/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/nodes/logical/FlinkLogicalWindowTableAggregate.scala
Scala
apache-2.0
3,721
package scalaDemo import org.apache.spark.deploy.SparkSubmit /** * Created by liush on 17-7-19. */ object ThreadJoinTest { val thread = new Thread { var counter=0 override def run() = try { while (counter <= 10) { println("Counter = " + counter + " ") counter=counter+1 } ...
tophua/spark1.52
examples/src/main/scala/scalaDemo/ThreadJoinTest.scala
Scala
apache-2.0
1,073
package com.twitter.finagle.mysql import com.twitter.finagle.mysql.transport.MysqlBuf import com.twitter.io.{Buf, Charsets} import java.sql.Timestamp import java.util.TimeZone import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class Tim...
adriancole/finagle
finagle-mysql/src/test/scala/com/twitter/finagle/mysql/unit/ValueTest.scala
Scala
apache-2.0
2,445
package diffson package jsonpointer import cats.implicits._ import org.scalatest._ import org.scalatest.flatspec.AnyFlatSpec import scala.util.Try import scala.language.implicitConversions import org.scalatest.matchers.should.Matchers abstract class TestJsonPointer[Json](implicit Json: Jsony[Json]) extends AnyFlat...
gnieh/diffson
testkit/shared/src/main/scala/diffson/TestJsonPointer.scala
Scala
apache-2.0
3,337
/* * Firms.scala * An example with rich constraints. * * Created By: Avi Pfeffer (apfeffer@cra.com) * Creation Date: Jan 1, 2009 * * Copyright 2013 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email figaro@cra.com for information. * * See http://www.github.com/p2t2/...
jyuhuan/figaro
FigaroExamples/src/main/scala/com/cra/figaro/example/Firms.scala
Scala
bsd-3-clause
1,285
package test import Factory.FactorySemiProportionnel import Gvote._ import implementationVoteSimple._ import GUI._ import org.scalatest.FunSuite import scala.collection.mutable.MutableList class TestSemiProportionnel extends FunSuite{ //On doit obligatoirement definir le nombre de siege val numberOfSeat = 2 va...
DoumbiaAmadou/FrameworkVote
TestGVote/src/test/TestSemiProportionnel.scala
Scala
mit
1,699
package scorex.network import akka.actor.ActorRef import scorex.network.NetworkController.DataFromPeer import scorex.network.TransactionalMessagesRepo.TransactionMessageSpec import scorex.network.UnconfirmedPoolSynchronizer.BroadcastRandom import scorex.network.message.Message import scorex.settings.Settings import sc...
B83YPoj/Waves
src/main/scala/scorex/network/UnconfirmedPoolSynchronizer.scala
Scala
apache-2.0
2,453
/* * Copyright 2014–2018 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...
slamdata/slamengine
impl/src/main/scala/quasar/impl/datasource/local/LocalParsedDatasourceModule.scala
Scala
apache-2.0
2,269
import plm.core.model.lesson.Lessons import scala.language.postfixOps import scala.concurrent.duration._ import scala.concurrent.{Await, ExecutionContext, Promise} import org.scalatestplus.play._ import com.github.andyglow.websocket.util.Uri import com.github.andyglow.websocket.{WebsocketClient, WebsocketHandler} impor...
MatthieuNICOLAS/webPLM
test/RemoteTest.scala
Scala
agpl-3.0
2,245
/* * 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 ...
hequn8128/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/nodes/datastream/DataStreamGroupAggregateBase.scala
Scala
apache-2.0
6,097
package net.spraycookies.tldlist import scala.io.Source trait EffectiveTldList { def contains(domain: String): Boolean } trait TrieTldList extends EffectiveTldList { def domainTrie: TldTrie private def contains(domain: List[String]) = domainTrie.contains(domain) def contains(domain: String) = domainTrie.con...
intracer/scalawiki
http-extensions/src/main/scala/net/spraycookies/tldlist/EffectiveTldList.scala
Scala
apache-2.0
664
package com.sksamuel.scapegoat.inspections import com.sksamuel.scapegoat.PluginRunner import com.sksamuel.scapegoat.inspections.unsafe.IsInstanceOf import org.scalatest.{ FreeSpec, Matchers, OneInstancePerTest } /** @author Stephen Samuel */ class IsInstanceOfTest extends FreeSpec with Matchers with PluginRunner with...
pwwpche/scalac-scapegoat-plugin
src/test/scala/com/sksamuel/scapegoat/inspections/IsInstanceOfTest.scala
Scala
apache-2.0
2,407
package me.yingrui.segment.core trait Tokenizer { def tokenize(sentence: String): Array[String] }
yingrui/mahjong
lib-segment/src/main/scala/me/yingrui/segment/core/Tokenizer.scala
Scala
gpl-3.0
102
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.scaladsl.persistence.multinode import akka.actor.setup.ActorSystemSetup import akka.actor.ActorRef import akka.actor.ActorSystem import akka.actor.Address import akka.actor.BootstrapSetup import akka.cluster.Cluster import ...
lagom/lagom
persistence/scaladsl/src/multi-jvm/scala/com/lightbend/lagom/scaladsl/persistence/multinode/AbstractClusteredPersistentEntitySpec.scala
Scala
apache-2.0
11,098
/* * Copyright 2016 OrgSync. * * 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 ...
orgsync/oskr-events
src/main/scala/com/orgsync/oskr/events/messages/delivery_events/DeliveryEventType.scala
Scala
apache-2.0
945
package com.github.ldaniels528.scalascript.extensions import scala.language.implicitConversions import scala.scalajs.js import scala.scalajs.js.UndefOr /** * Type-Safe AngularJS Route */ @js.native trait RouteTo extends js.Object { /** * Controller function that should be associated with newly created scope o...
ldaniels528/scalascript
src/main/scala/com/github/ldaniels528/scalascript/extensions/RouteTo.scala
Scala
apache-2.0
3,418
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js tools ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013-2016, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ ** ** /____/\\___/...
xuwei-k/scala-js
tools/shared/src/main/scala/org/scalajs/core/tools/linker/backend/ModuleKind.scala
Scala
bsd-3-clause
1,435
package io.shaka.http import java.io.InputStream import scala.collection.mutable.ArrayBuffer object IO { def inputStreamToByteArray(is: InputStream): Array[Byte] = { val buffer = new Array[Byte](1024 * 8) val output = new ArrayBuffer[Byte]() Stream.continually(is.read(buffer)).takeWhile(_ != -1).foreac...
stacycurl/naive-http
src/main/scala/io/shaka/http/IO.scala
Scala
apache-2.0
379
package controllers.auth import com.google.inject.ImplementedBy import play.api.Play import javax.inject.{Inject,Singleton} @ImplementedBy(classOf[DefaultAuthConfig]) trait AuthConfig { /** If false, the browser is always logged in as a dummy admin User. */ val isMultiUser: Boolean /** If true, only administra...
overview/overview-server
web/app/controllers/auth/AuthConfig.scala
Scala
agpl-3.0
673
package utils //import awscala._, s3._ import java.io._ object ExperimentUtils { // From http://stackoverflow.com/a/11458240/1073963 def cut[A](xs: Seq[A], n: Int) = { val m = xs.length val targets = (0 to n).map{x => math.round((x.toDouble*m)/n).toInt} def snip(xs: Seq[A], ns: Seq[Int], got: Vector[...
Vaishaal/ckm
keystone_pipeline/src/main/scala/utils/ExperimentUtils.scala
Scala
apache-2.0
2,181
/* * Copyright 2013 the original author or 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 appli...
lanwen/rest-assured
examples/scalatra-example/src/main/scala/com/jayway/restassured/scalatra/SecuredScalatraRestExample.scala
Scala
apache-2.0
1,132
/* * 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 ...
wangmiao1981/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/AnsiCastSuiteBase.scala
Scala
apache-2.0
20,574
package pl.touk.nussknacker.engine.graph import io.circe.generic.JsonCodec import pl.touk.nussknacker.engine.graph.evaluatedparam.Parameter object subprocess { @JsonCodec case class SubprocessRef(id: String, parameters: List[Parameter]) }
TouK/nussknacker
scenario-api/src/main/scala/pl/touk/nussknacker/engine/graph/subprocess.scala
Scala
apache-2.0
245
package scala.meta.internal.semanticdb.scalac import scala.tools.nsc.interactive.Global trait VersionCompilerOps { def forceWarnings(global: Global) = {} }
scalameta/scalameta
semanticdb/scalac/library/src/main/scala-2.13.8/scala/meta/internal/semanticdb/scalac/VersionCompilerOps.scala
Scala
bsd-3-clause
162
package org.loudkicks import org.scalatest.{Inside, Matchers, WordSpec} import scala.util.parsing.input.CharSequenceReader import scala.language.implicitConversions abstract class UnitSpec extends WordSpec with Matchers with Inside with TestUsers { implicit def readerFromString(s: String) = new CharSequenceReader(...
timothygordon32/loudkicks
src/test/scala/org/loudkicks/UnitSpec.scala
Scala
apache-2.0
325
package cn.edu.sjtu.omnilab.livewee.kc import java.io.{BufferedWriter, FileWriter, File} import java.util.UUID import com.redis.RedisClient import kafka.consumer.KafkaConsumer import org.joda.time.format.DateTimeFormat import scala.collection.mutable.HashMap case class ManPoint(mac: String, time: Long, code: Int, a...
OMNILab/LiveWee
kcwee/src/main/scala/cn/edu/sjtu/omnilab/livewee/kc/MobilityInspector.scala
Scala
mit
3,192
import sbt.Keys._ import sbt._ object build extends Build { val paradiseVersion = "2.0.0" val buildSettings = Defaults.defaultSettings ++ Seq( organization := "com.github.dcapwell", version := "0.1.0", scalacOptions ++= Seq("-deprecation", "-feature"), scalaVersion := "2.11.1", crossScalaVersi...
dcapwell/scala-playground
project/Build.scala
Scala
mit
2,726
package org.broadinstitute.dsde.firecloud.service import akka.http.scaladsl.testkit.ScalatestRouteTest import org.scalatest.freespec.AnyFreeSpec import scala.concurrent.ExecutionContext class FireCloudDirectivesSpec extends AnyFreeSpec with ScalatestRouteTest with FireCloudDirectives { override val executionConte...
broadinstitute/firecloud-orchestration
src/test/scala/org/broadinstitute/dsde/firecloud/service/FireCloudDirectivesSpec.scala
Scala
bsd-3-clause
1,438
package com.twitter.finagle.redis.integration import com.twitter.finagle.redis.RedisClientTest import com.twitter.finagle.redis.protocol.BitOp import com.twitter.finagle.redis.tags.{RedisTest, ClientTest} import com.twitter.io.Buf import com.twitter.util.Await final class StringClientIntegrationSuite extends RedisCli...
luciferous/finagle
finagle-redis/src/it/scala/com/twitter/finagle/redis/commands/string/StringClientIntegrationSuite.scala
Scala
apache-2.0
7,555
package chess.test import org.specs2.mutable._ import chess._ import chess.graficos._ import chess.movimientos._ import chess.tablero._ import org.junit.runner.RunWith import org.specs2.runner.JUnitRunner import TipoDeTrebejo._ import chess.builders.GeneradorDePiezas @RunWith(classOf[JUnitRunner]) class ReglasDeMovim...
upsidedownmind/ScalaChess
src/test/scala/chess/test/ReglasDeMovimientoSpecs.scala
Scala
mit
972
package com.datastax.spark.connector.rdd.partitioner import com.datastax.spark.connector.{PartitionKeyColumns, SparkCassandraITFlatSpecBase} import com.datastax.spark.connector.cql.CassandraConnector import com.datastax.spark.connector.cql.Schema import com.datastax.driver.core.Token import com.datastax.spark.connecto...
ponkin/spark-cassandra-connector
spark-cassandra-connector/src/it/scala/com/datastax/spark/connector/rdd/partitioner/TokenGeneratorSpec.scala
Scala
apache-2.0
3,345
package filodb.repair import com.typesafe.config.{ConfigFactory, ConfigRenderOptions} import filodb.core.GlobalConfig import org.apache.spark.SparkConf import org.scalatest.{BeforeAndAfterAll, DoNotDiscover} import org.scalatest.concurrent.ScalaFutures import org.scalatest.funspec.AnyFunSpec import org.scalatest.match...
filodb/FiloDB
spark-jobs/src/test/scala/filodb/repair/PartitionKeysCopierValidatorSpec.scala
Scala
apache-2.0
1,627
// Copyright (c) 2013-2020 Rob Norris and Contributors // This software is licensed under the MIT License (MIT). // For more information see LICENSE or https://opensource.org/licenses/MIT package doobie.util import shapeless.{ HList, HNil, ::, Generic, Lazy, <:!< } import shapeless.labelled.{ field, FieldType } trai...
tpolecat/doobie
modules/core/src/main/scala-2/util/ReadPlatform.scala
Scala
mit
2,418
package cz.kamenitxan.jakon.validation.validators import java.lang.annotation.Annotation import java.lang.reflect.Field import cz.kamenitxan.jakon.validation.{ValidationResult, Validator} class MaxValidator extends Validator { private val error = "TOO_BIG" private val nan = "NOT_A_NUMBER" override def isValid(va...
kamenitxan/Jakon
modules/backend/src/main/scala/cz/kamenitxan/jakon/validation/validators/MaxValidator.scala
Scala
bsd-3-clause
734
/** * ***************************************************************************** * Copyright (c) 2013 Guillaume DUBUISSON DUPLESSIS <guillaume.dubuisson_duplessis@insa-rouen.fr>. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0...
GuillaumeDD/scala99problems
src/main/scala/list/P03/sol02.scala
Scala
gpl-3.0
1,030
/* * Licensed to Intel Corporation under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * Intel Corporation licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use t...
SeaOfOcean/BigDL
dl/src/main/scala/com/intel/analytics/bigdl/nn/LogSoftMax.scala
Scala
apache-2.0
4,220
/* * 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 ...
tysonnorris/openwhisk
tests/src/test/scala/system/basic/WskBasicSwift311Tests.scala
Scala
apache-2.0
1,049
/* * Copyright (c) 2018 Georgios Andreadakis * * 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...
GeorgiosAndreadakis/TextAnalyzerPlatform
app/models/DocumentViewModels.scala
Scala
apache-2.0
3,643
/* * This file is part of the ToolXiT project. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
gnieh/toolxit-bibtex
src/main/scala/toolxit/bibtex/machine/AuxTools.scala
Scala
apache-2.0
1,088
package scaladex.server.service import java.time.Instant import scala.concurrent.Await import scala.concurrent.ExecutionContext import scala.concurrent.Future import scala.concurrent.duration._ import scala.util.control.NonFatal import akka.actor import akka.actor.ActorSystem import akka.actor.Cancellable import com...
scalacenter/scaladex
modules/server/src/main/scala/scaladex/server/service/Scheduler.scala
Scala
bsd-3-clause
2,751
package woshilaiceshide.sserver.benchmark.akka import akka.http.scaladsl.Http import akka.http.scaladsl.model.HttpMethods._ import akka.http.scaladsl.model._ import akka.stream.ActorMaterializer import akka.stream.scaladsl.Sink import akka.actor._ import scala.concurrent._ object AkkaHttpServer extends App with wosh...
woshilaiceshide/s-server-benchmark
src/main/scala/woshilaiceshide/sserver/benchmark/akka/AkkaHttpServer.scala
Scala
apache-2.0
2,625
/* * 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...
SRGOM/scalatest
scalatest/src/main/scala/org/scalatest/package.scala
Scala
apache-2.0
3,653
/* * 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 ...
shaoxuan-wang/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/nodes/physical/stream/StreamExecGroupAggregate.scala
Scala
apache-2.0
8,351
/* * Copyright (c) 2015 Andreas Wolf * * See te LICENSE file in the project root for further copyright information. */ package info.andreaswolf.roadhopper.simulation.vehicle object VehicleParameters { /** * A set of vehicle parameters for a typical compact car with an electric engine. */ val CompactCar = ne...
andreaswolf/roadhopper
src/main/scala/info/andreaswolf/roadhopper/simulation/vehicle/VehicleParameters.scala
Scala
mit
2,298
import stainless.math.BitVectors._ object BitVectors1 { def test1(n1: UInt3, n2: UInt3, n3: UInt3) = { require(n2 <= n3 && n1 <= n3 - n2 && n1 + n2 == n3) assert(n3 - n1 == n2) } def test2(n: UInt10) = { assert((n ^ n) == 0) } def test3(n: UInt100) = { assert((n & n) == n) assert((n &...
epfl-lara/stainless
frontends/benchmarks/verification/valid/MicroTests/scalac/BitVectors1.scala
Scala
apache-2.0
1,513
/** * 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 ap...
batermj/algorithm-challenger
books/cs/machine-learning/scala-for-machine-learning/1rst-edition/original-src-from-the-book/src/main/scala/org/scalaml/plots/PlotTheme.scala
Scala
apache-2.0
4,265
/** * Copyright: Copyright (C) 2016, ATS Advanced Telematic Systems GmbH * License: MPL-2.0 */ package org.genivi.sota.device_registry import akka.actor.ActorSystem import akka.http.scaladsl.model.StatusCodes._ import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.server.{Directive1, Route} imp...
PDXostc/rvi_sota_server
device-registry/src/main/scala/org/genivi/sota/device_registry/SystemInfoResource.scala
Scala
mpl-2.0
2,447
package app import _root_.util.Directory._ import _root_.util.Implicits._ import _root_.util.ControlUtil._ import _root_.util.{StringUtil, FileUtil, Validations, Keys} import org.scalatra._ import org.scalatra.json._ import org.json4s._ import jp.sf.amateras.scalatra.forms._ import org.apache.commons.io.FileUtils impo...
oho-sugu/gitbucket
src/main/scala/app/ControllerBase.scala
Scala
apache-2.0
7,953
package org.jetbrains.plugins.scala.codeInsight.intention.booleans import com.intellij.codeInsight.intention.PsiElementBaseIntentionAction import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.openapi.util.TextRange import com.intellij.psi.util.PsiTreeUtil import com...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/codeInsight/intention/booleans/ExpandBooleanIntention.scala
Scala
apache-2.0
2,565
/* * 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 ...
mike0sv/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/ReorderAssociativeOperatorSuite.scala
Scala
apache-2.0
2,799
package org.jetbrains.plugins.scala package codeInspection.redundantBlock import com.intellij.codeInspection.ProblemsHolder import com.intellij.openapi.project.Project import com.intellij.openapi.util.TextRange import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.codeInspection.{AbstractFixOnPsiElemen...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/codeInspection/redundantBlock/RedundantBlockInspection.scala
Scala
apache-2.0
3,024
/* ************************************************************************************* * 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/repository/jdbc/HistorizationJdbcRepository.scala
Scala
agpl-3.0
17,432
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2002-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
felixmulder/scala
src/library/scala/Char.scala
Scala
bsd-3-clause
16,504
object Test extends App { List(1,2,3) match { case Seq(x, y, z) => println(x * y * z) } }
felixmulder/scala
test/files/run/virtpatmat_unapplyseq.scala
Scala
bsd-3-clause
97
/* * Copyright 2015 LinkedIn Corp. * * 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 w...
linkedin/play-parseq
sample/app/controllers/Application.scala
Scala
apache-2.0
1,060
/* * Copyright 2014 Databricks * * 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...
andrewrothstein/spark-csv
src/main/scala/com/databricks/spark/csv/CsvParser.scala
Scala
apache-2.0
3,228
/* * BasicTools.scala * (Mellite) * * Copyright (c) 2012-2022 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU Affero General Public License v3+ * * * For further information, please contact Hanns Holger Rutz at * contact@sciss.de */ package de.sciss.mellite import...
Sciss/Mellite
core/src/main/scala/de/sciss/mellite/BasicTools.scala
Scala
agpl-3.0
506
package magic.gol.services import akka.actor.{ Actor, Props } class TeamService extends Actor { def receive = { case GetTeamRequest(name) => sender ! GetTeamResponse(name) } } object TeamService { def props = Props[TeamService] } case class GetTeamRequest(name: String) case class GetTeamResponse(name: Stri...
dvallejo/spray-example
src/main/scala/magic/gol/services/TeamService.scala
Scala
apache-2.0
324
/* * 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 ...
RSulzmann/openwhisk
tests/src/test/scala/org/apache/openwhisk/core/database/test/behavior/ArtifactStoreWhisksQueryBehaviors.scala
Scala
apache-2.0
3,349
package io.neons.collector.application.akka.http.router import akka.http.scaladsl.server._ trait Router { def retrieve: Route }
NeonsIo/collector
src/main/scala/io/neons/collector/application/akka/http/router/Router.scala
Scala
mit
132
package com.wavesplatform.lang.v1.repl import cats.implicits._ import cats.{Eval, Monad, StackSafeMonad} import com.wavesplatform.lang.EvalF import scala.concurrent.ExecutionContext.Implicits.{global => g} import scala.concurrent.Future object Implicits { implicit def stackUnsafeMonad[F[_] : Monad]: Monad[EvalF[F,...
wavesplatform/Waves
repl/shared/src/main/scala/com/wavesplatform/lang/v1/repl/Implicits.scala
Scala
mit
714
package org.ciroque.ccr.datastores object DataStoreResults { trait DataStoreResult case class Added[T](item: T) extends DataStoreResult case class Errored[T](item: T, message: String) extends DataStoreResult case class Deleted[T](item: T) extends DataStoreResult case class Failure(message: String, cause...
ciroque/central-configuration-repository
src/main/scala/org/ciroque/ccr/datastores/DataStoreResults.scala
Scala
mit
586
package controllers import play.api.mvc._ import play.api.libs.json.Json object Application extends Controller { def json() = Action { Ok(Json.obj("message" -> "Hello, World!")) } }
hamiltont/FrameworkBenchmarks
frameworks/Scala/play2-scala/play2-scala/app/controllers/Application.scala
Scala
bsd-3-clause
193
/* * 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 ...
vax11780/spark
examples/src/main/scala/spark/streaming/examples/QueueStream.scala
Scala
apache-2.0
1,962
/* * Seldon -- open source prediction engine * ======================================= * Copyright 2011-2015 Seldon Technologies Ltd and Rummble Ltd (http://www.seldon.io/) * ********************************************************************************************** * * Licensed under the Apache License, Vers...
smrjan/seldon-server
offline-jobs/spark/src/main/scala/io/seldon/spark/mllib/SimilarItems.scala
Scala
apache-2.0
11,158
package com.imgupload.route import org.junit.runner.RunWith import org.specs2.mutable.Specification import org.specs2.runner.JUnitRunner import com.imgupload.ServiceConfig @RunWith(classOf[JUnitRunner]) class PackageSpec extends Specification { "ServiceConfig" should { "load configuration from resources" >> { ...
victorfranz/img-upload
src/test/scala/com/imgupload/route/packageSpec.scala
Scala
mit
585
package com.campudus.tableaux.api.structure import com.campudus.tableaux.testtools.TableauxTestBase import io.vertx.ext.unit.TestContext import io.vertx.ext.unit.junit.VertxUnitRunner import org.junit.Test import org.junit.runner.RunWith import org.vertx.scala.core.json.{Json, JsonObject} import scala.util.Random @R...
campudus/tableaux
src/test/scala/com/campudus/tableaux/api/structure/CreateTableTest.scala
Scala
apache-2.0
3,643
/* * Copyright 2007-2010 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
wsaccaco/lift
framework/lift-base/lift-webkit/src/main/scala/net/liftweb/http/provider/HTTPParam.scala
Scala
apache-2.0
971
/* ____ __ ____ ____ ____,,___ ____ __ __ ____ * ( _ \\ /__\\ (_ )(_ _)( ___)/ __) ( _ \\( )( )( _ \\ Read * ) / /(__)\\ / /_ _)(_ )__) \\__ \\ )___/ )(__)( ) _ < README.txt * (_)\\_)(__)(__)(____)(____)(____)(___/ (__) (______)(____/ LICENSE.txt */ package ...
razie/diesel-rx
diesel/src/main/scala/razie/diesel/engine/nodes/EEngMsg.scala
Scala
apache-2.0
2,117
package net.shift package engine import net.shift.common._ import net.shift.security.SecurityFailure import net.shift.server.http.Responses._ import net.shift.server.http.{Request, _} import scala.util.{Failure, Success} object Engine { private val log = LogBuilder.logger(getClass) def run(app: ShiftApplicatio...
mariusdanciu/shift
shift-engine/src/main/scala/net/shift/engine/Engine.scala
Scala
apache-2.0
1,632
/* * Copyright (c) 2014 Oculus Info Inc. * http://www.oculusinfo.com/ * * Released under the MIT License. * * 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, includ...
unchartedsoftware/aperture-tiles
tile-generation/src/main/scala/com/oculusinfo/tilegen/tiling/SequenceFileTileIO.scala
Scala
mit
12,195
package mdtags import scala.language.postfixOps private[mdtags] trait Util { def pad(chars: Int, chr: Char): String = pad(chars, chr toString) def pad(chars: Int, str: String): String = List() padTo(chars, str) mkString def indent(indentSpaces: Int, text: String): String = { def getIndentString: String =...
timo-schmid/mdtags
src/main/scala/mdtags/Util.scala
Scala
apache-2.0
971
/* * Copyright 2014-2022 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
Netflix/atlas
atlas-eval/src/main/scala/com/netflix/atlas/eval/stream/SyntheticDataSource.scala
Scala
apache-2.0
4,959
package smt.report import smt.NamedMoveStates object ReportersAction { def reportToAll(nms: NamedMoveStates)(reporters: List[Reporter]): Unit = { reporters.foreach(_.report(nms)) } }
davidpeklak/smt
src/main/scala/smt/report/ReportersAction.scala
Scala
mit
194
/* * The MIT License * * Copyright (c) 2015 Fulcrum Genomics LLC * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to us...
fulcrumgenomics/dagr
tasks/src/main/scala/dagr/tasks/picard/DownsampleSam.scala
Scala
mit
3,400
package io.iohk.ethereum.jsonrpc import akka.util.ByteString import io.iohk.ethereum.domain.Address import io.iohk.ethereum.jsonrpc.FilterManager.TxLog case class TransactionReceiptResponse( transactionHash: ByteString, transactionIndex: BigInt, blockNumber: BigInt, blockHash: ByteString, cumulati...
input-output-hk/etc-client
src/main/scala/io/iohk/ethereum/jsonrpc/TransactionReceiptResponse.scala
Scala
mit
421
/** * Copyright (C) 2012 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 ...
travisbrown/finatra
src/main/scala/com/twitter/finatra/MultipartItem.scala
Scala
apache-2.0
945