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 cobase.play.post import play.api.data.Form import play.api.data.Forms._ /** * The form which handles the creation of a post. */ object PostForm { /** * A play framework form. */ val form = Form( mapping( "content" -> nonEmptyText )(PostFormData.apply)(PostFormData.unapply) ) } ca...
Cobase/cobase-pro
app/cobase/play/post/PostForm.scala
Scala
mit
359
/** * 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 * dist...
DigitalAssetCom/hlp-candidate
server/network/src/test/scala/org/hyperledger/network/ProtocolTests.scala
Scala
apache-2.0
1,502
package chrome.sockets.tcpServer import chrome.events.EventSource import chrome.sockets.tcp import chrome.sockets.tcpServer.bindings._ import scala.concurrent.Future import scala.scalajs.concurrent.JSExecutionContext.Implicits.queue import scala.scalajs.js class Socket(val socketId: SocketId) { val onAccept = TCP...
lucidd/scala-js-chrome
bindings/src/main/scala/chrome/sockets/tcpServer/Socket.scala
Scala
mit
1,662
package com.example import akka.http.scaladsl.model.{StatusCodes, HttpEntity, ContentTypes} import akka.http.scaladsl.server.{Directive1, Directives} import com.example.model.Post import com.example.service.{Health, HealthCheckService, PostService} import scala.concurrent.Future class Route(postService: PostService,...
ocadaruma/introduction-to-kubernetes
app/src/main/scala/com/example/Route.scala
Scala
mit
1,377
package org.coursera.naptime.courier import com.linkedin.data.DataMap import org.coursera.courier.templates.DataTemplates import org.scalatest.junit.AssertionsForJUnit object CourierAssertions extends AssertionsForJUnit { def assertSameJson(json: String, expectedJson: String): Unit = { assert(DataTemplates.rea...
vkuo-coursera/naptime
naptime-models/src/test/scala/org/coursera/naptime/courier/CourierAssertions.scala
Scala
apache-2.0
527
package cfc.shale.http_server import cfc.shale.core.ShaleSessionId import cfc.shale.selenium.SeleniumSessionId case class Session( sessionId: ShaleSessionId, webdriverId: Option[SeleniumSessionId], tags: Set[String], reserved: Boolean, currentUrl: String, browserName: String, node: Node )
cardforcoin/shale-scala
shale-http-server/src/main/scala/cfc/shale/http_server/Session.scala
Scala
mit
306
/* * Copyright 2009-2011 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
sortable/framework
core/json/src/test/scala/net/liftweb/json/ParserBugs.scala
Scala
apache-2.0
2,172
import scala.tools.partest.DirectTest object Test extends DirectTest { override def extraSettings: String = s"-usejavacp -Vprint-pos -Vprint:typer -Yrangepos -Ystop-after:typer -cp ${testOutput.path}" override def code = """ object X { val d = new D d.field } """.trim override def sh...
scala/scala
test/files/run/dynamic-selectDynamic.scala
Scala
apache-2.0
439
package beam.agentsim.agents.ridehail import akka.actor.ActorRef import beam.agentsim.agents.vehicles.PassengerSchedule import org.matsim.api.core.v01.Id import org.matsim.vehicles.Vehicle case class RepositionVehicleRequest( passengerSchedule: PassengerSchedule, tick: Int, vehicleId: Id[Vehicle], rideHailAge...
colinsheppard/beam
src/main/scala/beam/agentsim/agents/ridehail/RepositionVehicleRequest.scala
Scala
gpl-3.0
335
package lila.blog import org.joda.time.DateTime case class MiniPost( id: String, slug: String, title: String, shortlede: String, date: DateTime, image: String) object MiniPost { def fromDocument(coll: String)(doc: io.prismic.Document): Option[MiniPost] = for { title <- doc getText s"$coll.title" ...
Happy0/lila
modules/blog/src/main/MiniPost.scala
Scala
mit
577
/* * 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-core/src/main/scala/de/fuberlin/wiwiss/silk/util/convert/SparqlRestrictionParser.scala
Scala
apache-2.0
3,011
package workflow /** * A rule to remove all nodes & sources in a graph that don't lead to any sink, * and are effectively unused. */ object UnusedBranchRemovalRule extends Rule { override def apply(plan: Graph, prefixes: Map[NodeId, Prefix]): (Graph, Map[NodeId, Prefix]) = { val ancestorsOfSinks = plan.sinks....
tomerk/keystone
src/main/scala/workflow/UnusedBranchRemovalRule.scala
Scala
apache-2.0
970
/* * Copyright 2017-2020 47 Degrees Open Source <https://www.47deg.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 ...
frees-io/freestyle-rpc
modules/tests/src/test/scala/higherkindness/mu/rpc/channel/okhttp/ManagedChannelInterpreterOkHttpTests.scala
Scala
apache-2.0
1,229
package pdf import java.io.{ByteArrayOutputStream, File, FileNotFoundException, OutputStream} import com.google.inject.Inject import org.apache.pdfbox.Overlay import org.apache.pdfbox.pdmodel.PDDocument import org.apache.pdfbox.pdmodel.PDPage import org.apache.pdfbox.pdmodel.edit.PDPageContentStream import org.apache...
dvla/vrm-assign-online
app/pdf/PdfServiceImpl.scala
Scala
mit
9,539
/* * The MIT License (MIT) * * Copyright (c) 2017 Lars Kroll <bathtor@googlemail.com> * * 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 limitatio...
Bathtor/common-utils
data-tools/shared/src/main/scala-2.13/com/lkroll/common/collections/TreeSetMultiMap.scala
Scala
mit
3,471
package com.github.mrpowers.spark.spec.sql import org.apache.spark.sql.Encoders import org.apache.spark.sql.Row import org.apache.spark.sql.types.{StringType, StructField, StructType} import org.scalatest._ import com.github.mrpowers.spark.spec.SparkSessionTestWrapper import com.github.mrpowers.spark.fast.tests.Datas...
MrPowers/spark-spec
src/test/scala/com/github/mrpowers/spark/spec/sql/SparkSessionSpec.scala
Scala
mit
2,857
/* * 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-common/src/main/scala/com/bwsw/sj/common/engine/core/environment/StatefulModuleEnvironmentManager.scala
Scala
apache-2.0
3,314
/* * Copyright 2001-2008 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...
hubertp/scalatest
src/main/scala/org/scalatest/tools/FilterReporter.scala
Scala
apache-2.0
3,343
package spray.contrib.socketio.mq import akka.actor.Actor import akka.actor.ActorRef import akka.actor.Terminated import akka.contrib.pattern.DistributedPubSubMediator.{ Publish, Subscribe, SubscribeAck, Unsubscribe, UnsubscribeAck } import akka.event.LoggingAdapter import akka.pattern.ask import akka.routing.ActorRef...
wandoulabs/spray-socketio
spray-socketio/src/main/scala/spray/contrib/socketio/mq/Publishable.scala
Scala
apache-2.0
2,561
package leo.datastructures import java.util.concurrent.atomic.AtomicInteger /** * Created by mwisnie on 2/3/16. */ object Store { var unnamedFormulas : AtomicInteger = new AtomicInteger(0) def apply(cl: Clause, role: Role, status: Int, annotation: ClauseAnnotation = NoAnnotation): FormulaStore = new Formul...
Ryugoron/Leonora
src/main/scala/leo/datastructures/Store.scala
Scala
mit
826
/* * 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...
fjsc/sparta
plugins/src/main/scala/com/stratio/sparta/plugin/transformation/filter/FilterParser.scala
Scala
apache-2.0
1,732
package lila.search import play.api.libs.json._ import play.api.libs.ws._ import play.api.libs.ws.JsonBodyWritables._ import scala.annotation.nowarn sealed trait ESClient { def search[Q: Writes](query: Q, from: From, size: Size): Fu[SearchResponse] def count[Q: Writes](query: Q): Fu[CountResponse] def store(...
luanlv/lila
modules/search/src/main/ESClient.scala
Scala
mit
2,872
package se.ramn.bottfarmen.simulation import collection.immutable.IndexedSeq import TileMap.Tile import se.ramn.bottfarmen.simulation.entity.Position import se.ramn.bottfarmen.util.loadTextFileFromClassPath trait TileMap { val rowCount: Int val colCount: Int val rows: IndexedSeq[IndexedSeq[Tile]] def startin...
ramn/bottfarmen
common/src/main/scala/simulation/TileMap.scala
Scala
gpl-3.0
2,839
package mesosphere.marathon.core.externalvolume import com.wix.accord.Validator import mesosphere.marathon.state.ExternalVolume trait ExternalVolumes object ExternalVolumes { def validExternalVolume: Validator[ExternalVolume] = ??? }
vivint-smarthome/ceph-on-mesos
marathon-submodule/src/main/scala/mesosphere/marathon/core/externalvolume/ExternalVolumes.scala
Scala
apache-2.0
238
/* * 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 ...
brad-kaiser/spark
core/src/main/scala/org/apache/spark/util/Utils.scala
Scala
apache-2.0
104,424
// Woot, Scala has traits which are like Ruby Mixins or a Java Interface (plus implementation) class Person(val name: String) trait Nice { def greet() = println("Howdily doodily.") } class Character(override val name:String) extends Person(name) with Nice val flanders = new Character("Ned")
FredericJacobs/Scala-Tests
nicetraits.scala
Scala
gpl-2.0
296
package com.twitter.finatra.http.tests.integration.tweetexample.main.services.admin import com.twitter.finatra.http.tests.integration.tweetexample.main.services.TweetsRepository import javax.inject.Inject class UserService @Inject() (database: DatabaseClient, tweetsRepository: TweetsRepository) { assert(tweetsRepos...
twitter/finatra
http-server/src/test/scala/com/twitter/finatra/http/tests/integration/tweetexample/main/services/admin/UserService.scala
Scala
apache-2.0
397
package com.twitter.inject import org.scalacheck.Arbitrary import org.scalatest.funsuite.AnyFunSuite import org.scalatestplus.scalacheck.ScalaCheckDrivenPropertyChecks import scala.reflect.runtime.universe._ trait A trait B class TypeUtilsTest extends AnyFunSuite with ScalaCheckDrivenPropertyChecks { test("asMani...
twitter/util
util-inject/src/test/scala/com/twitter/util/inject/TypeUtilsTest.scala
Scala
apache-2.0
1,623
import test.BigFloat object Test extends App { val x: BigFloat = 1234.45e3333333333 // error: exponent too large }
som-snytt/dotty
tests/neg-macros/BigFloat/Test_2.scala
Scala
apache-2.0
117
package play.api.libs.typedmap /** * An entry that binds a typed key and a value. These entries can be * placed into a [[TypedMap]] or any other type of object with typed * values. * * @param key The key for this entry. * @param value The value for this entry. * @tparam A The type of the value. */ final case c...
aradchykov/playframework
framework/src/play/src/main/scala/play/api/libs/typedmap/TypedEntry.scala
Scala
apache-2.0
474
package edu.gemini.pit.ui.editor import edu.gemini.model.p1.immutable._ import javax.swing.BorderFactory import edu.gemini.pit.ui.util.{Platform, StdModalEditor} import swing._ import Swing._ import BorderPanel.Position._ object VisitorSelector { def open(is:List[(Investigator, Boolean)], canEdit: Boolean, parent:U...
arturog8m/ocs
bundle/edu.gemini.pit/src/main/scala/edu/gemini/pit/ui/editor/VisitorSelector.scala
Scala
bsd-3-clause
1,308
import org.apache.spark.SparkConf import org.apache.spark.SparkContext import org.apache.spark.sql.SQLContext import org.apache.spark.sql.functions._ import scala.collection.mutable.WrappedArray import org.apache.spark.sql._ import scala.util.parsing.json.JSONArray import scala.util.parsing.json.JSONObject import scala...
amitlondhe/spark-app
spark-scala/BusinessByDemographics.scala
Scala
mit
4,922
package ecdc.crypto import java.io.{ InputStreamReader, InputStream } import java.security.{ Security, PrivateKey } import org.bouncycastle.asn1.DERNull import org.bouncycastle.asn1.pkcs.{ RSAPrivateKey, PKCSObjectIdentifiers, PrivateKeyInfo } import org.bouncycastle.asn1.x509.AlgorithmIdentifier import org.bouncycast...
benfrasersimpson/ecdc
src/crypto/src/main/scala/ecdc/crypto/SecretKeyProvider.scala
Scala
isc
1,131
package breeze.linalg /* Copyright 2012 David Hall 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...
doron123/breeze
math/src/test/scala/breeze/linalg/DenseMatrixTest.scala
Scala
apache-2.0
22,832
/* * 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 ...
manishgupta88/incubator-carbondata
integration/spark2/src/main/spark2.2/org/apache/spark/sql/hive/CarbonOptimizer.scala
Scala
apache-2.0
1,481
/* date: Aug 16, 2012 PARENTHESIZED Used in: DisplayParser The Display command may have Parenthesizedd Components. The components are delimited by open and closed parentheses. There are eight component types: 1. variables, e.g., (# $one) 2. contents of variables (% $one) 3. text to be mo...
hangle/Script
src/Parenthesized.scala
Scala
apache-2.0
5,591
package org.hammerlab.guacamole.commands import org.apache.spark.SparkContext import org.apache.spark.rdd.RDD import org.bdgenomics.adam.rdd.ADAMContext import org.bdgenomics.formats.avro.VariantAnnotation import org.hammerlab.commands.Args import org.hammerlab.guacamole.distributed.PileupFlatMapUtils.pileupFlatMapTwo...
hammerlab/guacamole
src/main/scala/org/hammerlab/guacamole/commands/SomaticStandardCaller.scala
Scala
apache-2.0
9,290
package io.scalajs.nodejs.url import io.scalajs.RawOptions import scala.scalajs.js import scala.scalajs.js.annotation.JSImport import scala.scalajs.js.| /** * The URLSearchParams API provides read and write access to the query of a URL. The URLSearchParams * class can also be used standalone with one of the four...
scalajs-io/nodejs
app/current/src/main/scala/io/scalajs/nodejs/url/URLSearchParams.scala
Scala
apache-2.0
7,122
package domino.configuration_watching import domino.capsule.Capsule import org.osgi.service.metatype.{MetaTypeProvider => JMetaTypeProvider} import domino.scala_osgi_metatype.adapters.MetaTypeProviderAdapter import domino.scala_osgi_metatype.interfaces.MetaTypeProvider /** * Contains some common methods for both th...
helgoboss/domino
src/main/scala/domino/configuration_watching/AbstractConfigurationWatcherCapsule.scala
Scala
mit
1,076
package io.ddf.spark.content import io.ddf.content.Schema.{ColumnClass, ColumnType} import io.ddf.spark.ATestSuite import scala.collection.JavaConversions._ /** */ class FactorSuite extends ATestSuite { createTableMtcars() createTableAirlineWithNA() test("test get factors on DDF with TablePartition") { v...
ubolonton/DDF
spark/src/test/scala/io/ddf/spark/content/FactorSuite.scala
Scala
apache-2.0
6,728
package edu.uw.at.iroberts.wirefugue.kafka.consumer import akka.actor.ActorSystem import akka.kafka.scaladsl.Consumer import akka.kafka.{ConsumerSettings, Subscriptions} import akka.stream.ActorMaterializer import akka.stream.scaladsl.{Keep, Sink, Source} import com.typesafe.config.ConfigFactory import edu.uw.at.irobe...
robertson-tech/wirefugue
sensor/src/main/scala/edu/uw/at/iroberts/wirefugue/kafka/consumer/PacketConsumer.scala
Scala
gpl-3.0
1,857
package edu.ucsb.apss.partitioning import java.io.File import java.nio.file.{Files, Paths} import edu.ucsb.apss.Context import edu.ucsb.apss.util.{VectorWithNorms, FileSystemManager} import org.apache.commons.io.FileUtils import org.apache.hadoop.conf.Configuration import org.apache.hadoop.fs.Path import org.apache.s...
danielryan2430/All-Pairs-Similarity-Spark
src/test/scala/edu/ucsb/apss/partitioning/FileSystemManagerTest.scala
Scala
apache-2.0
3,800
package org.leebli.connector.maven import org.junit.Test import org.junit.Before import java.io.File import java.nio.file.Files import java.nio.file.Paths import java.nio.file.Path import org.apache.commons.io.FileUtils class MavenConnectorTestCase { }
jonathan-macke/leebli
connectors/maven-connector/src/test/scala/org/leebli/connector/maven/MavenConnectorTestCase.scala
Scala
apache-2.0
257
/* * Copyright 2022 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/self-service-time-to-pay-frontend
app/bars/model/BarsError.scala
Scala
apache-2.0
948
/* * Accio is a platform to launch computer science experiments. * Copyright (C) 2016-2018 Vincent Primault <v.primault@ucl.ac.uk> * * Accio 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...
privamov/accio
accio/java/fr/cnrs/liris/sparkle/filesystem/DefaultFilesystem.scala
Scala
gpl-3.0
2,894
/*********************************************************************** * Copyright (c) 2013-2016 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 ...
nagavallia/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/process/tube/package.scala
Scala
apache-2.0
570
import sbt._ import de.heikoseeberger.sbtheader._ import scala.util.matching.Regex object Copyright extends AutoPlugin { override def requires = HeaderPlugin override def trigger = allRequirements val HeaderRegex = "(?s)(// Copyright[^\\n]*[\\n]// Licen[cs]e[^\\n]*[\\n])(.*)".r val CopyrightHeader = "// Copy...
espinhogr/ensime-server
project/Copyright.scala
Scala
gpl-3.0
1,085
// load this script in `play console` via // :load scripts/console.scala val app = new play.core.StaticApplication(new java.io.File(".")) import play.api.Play.current val conf = current.configuration import keemun.models._ val userAccount = GithubUser("user", Some("http://example.com/u.png")) val orgAccount = GithubOr...
maizy/keemun
scripts/console.scala
Scala
mit
1,270
/* Copyright 2015 Mario Pastorelli (pastorelli.mario@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.apache.org/licenses/LICENSE-2.0 * * Unless...
jyt109/PureCSV
src/main/scala/purecsv/safe/converter/defaults/rawfields/package.scala
Scala
apache-2.0
2,346
package models; import scala.io.Source import scala.collection.immutable.List import scala.collection.mutable.ListBuffer import org.apache.commons.vfs2._ import org.apache.commons.vfs2.auth.StaticUserAuthenticator import org.apache.commons.vfs2.impl.DefaultFileSystemConfigBuilder import org.apache.commons.vfs2.provid...
seqprodbio/restoule
app/models/FileRetrival.scala
Scala
gpl-3.0
3,809
package org.apache.spark.ml.mleap.converter import com.truecar.mleap.core.linalg import org.apache.spark.mllib.linalg.{SparseVector, DenseVector, Vector} /** * Created by hwilkins on 11/18/15. */ case class VectorToMleap(vector: Vector) { def toMleap: linalg.Vector = { vector match { case DenseVector(...
TrueCar/mleap
mleap-spark/src/main/scala/org/apache/spark/ml/mleap/converter/VectorToMleap.scala
Scala
apache-2.0
465
package scala.meta.internal.hosts.scalac package reflect import scala.tools.nsc.Global import scala.reflect.internal.Flags import scala.collection.mutable import org.scalameta.invariants._ trait TypeHelpers { self: GlobalToolkit => import global.{require => _, _} import definitions._ implicit class RichHelp...
beni55/scalameta
scalahost/src/main/scala/scala/meta/internal/hosts/scalac/reflect/TypeHelpers.scala
Scala
bsd-3-clause
1,391
package pirc.kpi.impl import scala.collection.JavaConverters._ import akka.actor.{Actor, ActorSystem, Props} // ---------------------------------------------------------------------- // // L O G // // T R A C K E R // // A tracker that accumulates...
Pirc/kpi
src/main/scala/LogTracker.scala
Scala
apache-2.0
2,282
import sbt._ import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._ import sbt.Keys._ import scalajsbundler.sbtplugin.ScalaJSBundlerPlugin.autoImport._ /** * Application settings. Configure the build for your application here. * You normally don't have to touch the actual build definition after this. */ object Se...
beikern/foulkon-ui
project/Settings.scala
Scala
apache-2.0
3,087
package daos.doobie import doobie.specs2.imports.AnalysisSpec import org.specs2.mutable.Specification import testutil.TestUtil import PagosDaoDoobie._ object PagosDaoDoobieSpec extends Specification with AnalysisSpec { val transactor = TestUtil.transactor() check(qAddPago(0L, BigDecimal("0"), None)) check(qTod...
kdoomsday/kaminalapp
test/daos/doobie/PagosDaoDoobieSpec.scala
Scala
mit
336
import org.scalatest.FunSuite import scala.reflect.runtime.universe._ class Issue10 extends FunSuite { test("compiles") {} }
hiroshi-cl/InverseMacros
paradise_tests/src/test/scala/annotations/run/Issue10.scala
Scala
bsd-2-clause
128
package ml.combust.mleap.core.tree import ml.combust.mleap.core.annotation.SparkCode import org.apache.spark.ml.linalg.Vector /** Trait for a split logic. * * Normally used for splits in a decision tree. */ @SparkCode(uri = "https://github.com/apache/spark/blob/v2.0.0/mllib/src/main/scala/org/apache/spark/ml/tr...
combust/mleap
mleap-core/src/main/scala/ml/combust/mleap/core/tree/Split.scala
Scala
apache-2.0
2,818
package composition import play.api.GlobalSettings import play.api.mvc.EssentialAction import play.api.mvc.Filters trait WithFilters extends Composition with GlobalSettings { override def doFilter(a: EssentialAction): EssentialAction = { Filters(super.doFilter(a), filters: _*) } }
dvla/vrm-retention-online
app/composition/WithFilters.scala
Scala
mit
292
package mesosphere.marathon package api.v2.json import mesosphere.marathon.api.JsonTestHelper import mesosphere.marathon.api.v2.{AppHelpers, AppNormalization, ValidationHelper} import mesosphere.marathon.core.check.MesosCommandCheck import mesosphere.marathon.core.health.{MarathonHttpHealthCheck, MesosCommandHealthChe...
mesosphere/marathon
src/test/scala/mesosphere/marathon/api/v2/json/AppDefinitionTest.scala
Scala
apache-2.0
28,955
/* * 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 ...
hengyicai/OnlineAggregationUCAS
sql/catalyst/src/main/scala/org/apache/spark/sql/types/dataTypes.scala
Scala
apache-2.0
42,226
package org.vitrivr.adampro.utils.exception /** * adamtwo * * Ivan Giangreco * August 2015 */ case class EntityExistingException(message : String = "Entity exists already.") extends GeneralAdamException(message)
dbisUnibas/ADAMpro
src/main/scala/org/vitrivr/adampro/utils/exception/EntityExistingException.scala
Scala
mit
219
/* Copyright 2013 Crossing-Tech 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 distr...
Crossing-Tech/akka-osgi-sample
project/Build.scala
Scala
apache-2.0
4,963
/** * Copyright (c) 2012, www.quartzsource.org * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable la...
cyberspinach/meutrino
src/test/scala/org/quartzsource/meutrino/hglib/OutgoingIncomingTest.scala
Scala
apache-2.0
2,206
package breeze.linalg import org.scalatest.funsuite.AnyFunSuite /** * 2/21/15. * @author Rakesh Chalasani */ class tileTest extends AnyFunSuite { test("tile ( DenseMatrix , Int)") { val m = new DenseMatrix(2, 2, Array.range(0, 4)) assert(tile(m, 2) == new DenseMatrix[Int](4, 2, Array(0, 1, 0, 1, 2, 3, 2,...
scalanlp/breeze
math/src/test/scala/breeze/linalg/functions/tileTest.scala
Scala
apache-2.0
1,158
/*** * Copyright 2017 Rackspace US, 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 applica...
rackerlabs/api-checker
util/src/test/scala/com/rackspace/com/papi/components/checker/util/XQueryEvaluatorPoolSuite.scala
Scala
apache-2.0
2,719
/* *\\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2015, G...
rmihael/squants
shared/src/main/scala/squants/electro/ElectricCurrent.scala
Scala
apache-2.0
3,102
/* * Copyright 2013 Steve Vickers * * 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 ...
osxhacker/ReactiveMongo-Criteria
src/main/scala/dsl/criteria/Term.scala
Scala
apache-2.0
5,799
/* * Copyright 2012-2014 Comcast Cable Communications Management, 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 * * Unl...
weggert/sirius
src/main/scala/com/comcast/xfinity/sirius/uberstore/data/UberStoreFileOps.scala
Scala
apache-2.0
1,626
/* * Copyright © 2014 TU Berlin (emma@dima.tu-berlin.de) * * 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...
emmalanguage/emma
emma-spark/src/main/scala/org/emmalanguage/compiler/opt/SparkOptimizations.scala
Scala
apache-2.0
1,036
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.api.libs.streams import akka.stream.scaladsl.Flow import akka.stream.stage._ import akka.stream._ import org.reactivestreams.{ Processor, Subscription, Subscriber, Publisher } /** * Probes, for debugging reactive streams. */ o...
wsargent/playframework
framework/src/play-streams/src/main/scala/play/api/libs/streams/Probes.scala
Scala
apache-2.0
4,533
package mesosphere.marathon.state import com.google.common.collect.Lists import mesosphere.marathon.MarathonSpec import mesosphere.marathon.Protos.MarathonTask import mesosphere.mesos.protos.Implicits._ import mesosphere.mesos.protos.TextAttribute import org.scalatest.{ GivenWhenThen, Matchers } class MarathonTaskTes...
ss75710541/marathon
src/test/scala/mesosphere/marathon/state/MarathonTaskTest.scala
Scala
apache-2.0
2,365
package mesosphere.marathon.core.launchqueue.impl import java.util.concurrent.TimeUnit import mesosphere.marathon.core.base.Clock import mesosphere.marathon.state.{ AppDefinition, PathId, Timestamp } import org.apache.log4j.Logger import scala.concurrent.duration._ /** * Manages the task launch delays for every a...
EasonYi/marathon
src/main/scala/mesosphere/marathon/core/launchqueue/impl/RateLimiter.scala
Scala
apache-2.0
3,164
package pl.iterators.kebs_benchmarks import java.time.format.DateTimeFormatter import java.time.{LocalDate, LocalTime} import java.util.concurrent.TimeUnit import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport import akka.http.scaladsl.marshalling.ToResponseMarshallable import akka.http.scaladsl.model.Stat...
theiterators/kebs
benchmarks/src/main/scala/pl/iterators/kebs_benchmarks/SprayJsonFormatBenchmark.scala
Scala
mit
12,390
package text.normalizer import text.StringOption /** * @author ynupc * Created on 2016/08/06 */ object SentenceNormalizer { def normalize(str: StringOption): StringOption = { SentenceEndingNormalizer.normalize( SentenceBeginningNormalizer.normalize(str)) } }
ynupc/scalastringcourseday7
src/main/scala/text/normalizer/SentenceNormalizer.scala
Scala
apache-2.0
289
/** * Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0 * See accompanying LICENSE file. */ package controllers import java.util.Properties import kafka.manager.ActorModel.TopicIdentity import kafka.manager.utils.TopicConfigs import kafka.manager.{Kafka_0_8_2_1, ApiError, Kafka_0_8_2_0, Kaf...
evertrue/kafka-manager
app/controllers/Topic.scala
Scala
apache-2.0
10,473
package com.javachen.grab import org.apache.spark.mllib.recommendation.{ALS, MatrixFactorizationModel, Rating} import org.apache.spark.rdd.RDD /** * * Created by <a href="mailto:junechen@163.com">june</a> on 2015-05-27 09:13. */ object EvaluateResult { def coverage(training: RDD[Rating],userRecommends:RDD[(Int, ...
grayaaa/learning-spark
src/main/scala/com/javachen/spark/examples/mllib/EvaluateResult.scala
Scala
apache-2.0
2,322
package com.yukihirai0505.sInstagram.exceptions /** * Created by yukihirai on 2016/11/09. */ class OAuthException(message: String, e: Exception = null) extends RuntimeException(message, e)
yukihirai0505/sInstagram
src/main/scala/com/yukihirai0505/sInstagram/exceptions/OAuthException.scala
Scala
mit
194
package jsm4s.algorithm import java.io.{ByteArrayOutputStream, OutputStream, OutputStreamWriter} import com.typesafe.scalalogging.LazyLogging import jsm4s.FIMI import jsm4s.algorithm.Strategies._ import jsm4s.ds._ import jsm4s.processing.SortingProcessor import jsm4s.property.{Composite, Property, PropertyFactory} i...
DmitryOlshansky/jsm4s
src/main/scala/jsm4s/algorithm/Algorithm.scala
Scala
gpl-2.0
5,297
package spire package std import spire.algebra.{Eq, EuclideanRing, IsIntegral, NRoot, Order, Signed, TruncatedDivisionCRing} import spire.math.BitString import spire.util.Opt trait ShortIsEuclideanRing extends EuclideanRing[Short] { override def minus(a:Short, b:Short): Short = (a - b).toShort def negate(a:Short)...
non/spire
core/src/main/scala/spire/std/short.scala
Scala
mit
4,666
/* * Copyright 2014–2020 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/quasar
ejson/src/main/scala/quasar/ejson/implicits.scala
Scala
apache-2.0
3,472
package com.sohu.mrd.sonlp.core import java.io.{File, PrintWriter} import com.sohu.mrd.sonlp.SoNLP import com.sohu.mrd.sonlp.util.FileProcessor import scala.collection.mutable /** * Created by huangyu on 15/12/20. */ class NewsClassification(_parameterPath: String) { val words: mutable.Set[String] = new mutabl...
huangfish/sonlp
sonlp-core/src/main/scala/com/sohu/mrd/sonlp/core/NewsClassification.scala
Scala
apache-2.0
4,874
package com.github.mogproject.redismock.util import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach, FunSpec, Matchers} import org.scalatest.prop.GeneratorDrivenPropertyChecks class BytesSpec extends FunSpec with Matchers with GeneratorDrivenPropertyChecks with BeforeAndAfterEach with BeforeAndAfterAll { desc...
mogproject/scala-redis-mock
src/test/scala/com/github/mogproject/redismock/util/BytesSpec.scala
Scala
apache-2.0
3,686
/** * 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...
serejja/kafka
src/test/ly/stealth/mesos/kafka/CliTest.scala
Scala
apache-2.0
5,780
/* * Copyright 2020 Spotify AB. * * 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 ...
spotify/scio
scio-core/src/main/scala/com/spotify/scio/coders/instances/kryo/GrpcSerializers.scala
Scala
apache-2.0
2,216
package rx.lang.scala import org.junit.Test import org.scalatest.junit.JUnitSuite import rx.lang.scala.observers.TestSubscriber import scala.concurrent.Future import scala.util.{Failure, Success, Try} class ScalaTypesConversionsTests extends JUnitSuite { @Test def testIterableConversion() = { val it = Seq("...
joohnnie/RxScala
src/test/scala/rx/lang/scala/ScalaTypesConversionsTests.scala
Scala
apache-2.0
3,070
package hu.frankdavid.diss.util import scala.collection.{Iterator, mutable} import hu.frankdavid.diss.expression.Expression class JobList extends mutable.LinkedHashSet[Expression] { def reverseIterator: Iterator[Expression] = new Iterator[Expression] { private var cur = lastEntry def hasNext = cur ne null ...
frankdavid/diss
src/main/scala/hu/frankdavid/diss/util/JobList.scala
Scala
apache-2.0
436
package mesosphere.marathon package integration import mesosphere.marathon.integration.facades.MarathonFacade._ import mesosphere.marathon.integration.setup.{ EmbeddedMarathonTest, MesosConfig } import mesosphere.marathon.raml.{ App, Container, DockerContainer, EngineType } import mesosphere.marathon.state.PathId._ im...
natemurthy/marathon
src/test/scala/mesosphere/marathon/integration/DockerAppIntegrationTest.scala
Scala
apache-2.0
2,213
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
Intel-bigdata/OAP
oap-native-sql/core/src/main/scala/com/intel/oap/execution/BroadcastColumnarRDD.scala
Scala
apache-2.0
2,106
package com.datastax.spark.connector.cluster import java.net.InetSocketAddress import com.datastax.oss.driver.api.core.Version import com.datastax.spark.connector.ccm.{CcmBridge, CcmConfig} /** Cluster facade used by test code. */ case class Cluster( name: String, private[cluster] val config: CcmConfig, ...
datastax/spark-cassandra-connector
connector/src/it/scala/com/datastax/spark/connector/cluster/Cluster.scala
Scala
apache-2.0
1,331
package slaq.ql import slaq.util.{Node, ValueLinearizer} /** * A packed value together with its unpacking */ case class Unpackable[T, U](value: T, unpack: Unpack[T, U]) { def linearizer = unpack.linearizer(value).asInstanceOf[ValueLinearizer[U]] def mapOp(f: Node => Node) = unpack.mapOp(value, f).asInstanceOf[T...
godenji/slaq
src/main/scala/slaq/scalaquery/ql/Unpackable.scala
Scala
bsd-2-clause
711
package mesosphere.marathon.state import mesosphere.marathon.StoreCommandFailedException import mesosphere.marathon.metrics.Metrics.Histogram import mesosphere.marathon.metrics.{ MetricPrefixes, Metrics } import mesosphere.util.LockManager import mesosphere.util.state.PersistentStore import org.slf4j.LoggerFactory im...
yp-engineering/marathon
src/main/scala/mesosphere/marathon/state/MarathonStore.scala
Scala
apache-2.0
3,493
/* * Copyright 2018 CJWW Development * * 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...
cjww-development/auth-microservice
app/common/BackendController.scala
Scala
apache-2.0
1,711
package com.sksamuel.elastic4s.streams import akka.actor.ActorSystem import com.sksamuel.elastic4s.{ElasticClient, ElasticDsl, IndexAndTypes, SearchDefinition} import scala.concurrent.duration._ import scala.language.implicitConversions object ReactiveElastic { implicit class ReactiveElastic(client: ElasticClien...
muuki88/elastic4s
elastic4s-streams/src/main/scala/com/sksamuel/elastic4s/streams/ReactiveElastic.scala
Scala
apache-2.0
2,249
package org.cloudio.morpheus.tutor.chat.frag.step7 import java.util.Locale import org.morpheus._ import Morpheus._ /** * Making the Contact entity immutable. * * Created by zslajchrt on 04/05/15. */ object Session { } @dimension trait Contact { val firstName: String val lastName: String val male: Boolean va...
zslajchrt/morpheus-tutor
src/main/scala/org/cloudio/morpheus/tutor/chat/frag/step7/Session.scala
Scala
apache-2.0
4,520
package api.domain import spray.json.{DefaultJsonProtocol, JsonFormat} private[api] trait CommonJsonProtocols extends ResponseJsonProtocol private[api] case class RequestResponse[+T](success:Boolean, content:Option[T], redirect:Option[String], errors:List[String]) {} private[api] object RequestResponse extends Resp...
onurzdg/spray-app
src/main/scala/api/domain/CommonJsonProtocols.scala
Scala
apache-2.0
500
package com.lunatic.mlx.kddcup99.mllib.modgen import com.lunatic.mlx.kddcup99._ import com.lunatic.mlx.kddcup99.mllib.metadata._ import AnalysedPrediction._ import com.lunatic.mlx.kddcup99.mllib.Configuration import org.apache.spark.SparkContext import org.apache.spark.annotation.Experimental import org.apache.spark.m...
tupol/sparx-mllib
src/main/scala/com/lunatic/mlx/kddcup99/mllib/modgen/PredictKMeans.scala
Scala
apache-2.0
5,557
package com.vivint.ceph.model sealed trait Location { def ipOpt: Option[String] def portOpt: Option[Int] def hostnameOpt: Option[String] def withIP(ip: String): Location } object Location { val empty = PartialLocation(None, None) } case class PartialLocation(ip: Option[String], port: Option[Int]) extends Lo...
vivint-smarthome/ceph-on-mesos
src/main/scala/com/vivint/ceph/model/Location.scala
Scala
apache-2.0
1,072
/*********************************************************************** * Copyright (c) 2013-2020 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...
aheyne/geomesa
geomesa-gt/geomesa-gt-tools/src/main/scala/org/locationtech/geomesa/geotools/tools/export/GeoToolsPlaybackCommand.scala
Scala
apache-2.0
1,396
package org.otw.open.screens import com.badlogic.gdx.scenes.scene2d.Actor import com.badlogic.gdx.utils.Array import org.otw.open.actors.{StaticAnimationActor, MenuButtonActor, BackgroundActor} import org.otw.open.controllers._ import org.otw.open.listeners.DispatchEventListener import org.otw.open.testconfig.UnitSpec...
danielEftimov/OPEN
core/test/org/otw/open/screens/ActionResultScreenTest.scala
Scala
apache-2.0
5,039
package com.ldaniels528.ricochet.entity import java.awt.Color /** * Represents a semi-stationary brick * @author "Lawrence Daniels" <lawrence.daniels@gmail.com> */ case class Brick(x: Double, var y: Double, width: Int, height: Int, color: Color) extends GenericBrick(width, height, color) { override def update...
ldaniels528/ricochet
src/main/scala/com/ldaniels528/ricochet/entity/Brick.scala
Scala
apache-2.0
387