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 2016-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 ...
scala-exercises/evaluator
server/src/main/scala/org/scalaexercises/evaluator/codecs.scala
Scala
apache-2.0
1,117
package core import io.apibuilder.spec.v0.models.{Application, Organization, Import} import org.scalatest.{FunSpec, Matchers} class ImporterSpec extends FunSpec with Matchers { describe("with an invalid service") { val json = """ { "name": "Import Shared", "apidoc": { "version": "0.9.6" } }...
mbryzek/apidoc
core/src/test/scala/core/ImporterSpec.scala
Scala
mit
1,834
package org.littlewings.tweetbot.standard.lyrics.cachestore import java.util.UUID import org.infinispan.commons.configuration.ConfiguredBy import org.infinispan.commons.persistence.Store import org.infinispan.persistence.spi.InitializationContext import org.littlewings.tweetbot.cachestore.AutoReloadableInMemoryCacheS...
kazuhira-r/tweet-bot
src/main/scala/org/littlewings/tweetbot/standard/lyrics/cachestore/LyricsCacheStore.scala
Scala
mit
971
//////////////////////////////////////////////////////////////////////////////// // // // OpenSolid is a generic library for the representation and manipulation // // of geometric objects such as points, curves, surfaces, and volumes. ...
ianmackenzie/opensolid-core
src/main/scala/org/opensolid/core/LineSegment2d.scala
Scala
mpl-2.0
3,077
object Dependencies { import Dependency._ val sparkExtSql = Seq( sparkSql % "provided" , Test.scalaTest ) val sparkExtMllib = Seq( sparkMLLib % "provided" , s2Geometry , Test.scalaTest ) val sparkExtTest = Seq( sparkSql % "provided" , Test...
collectivemedia/spark-ext
project/Dependencies.scala
Scala
apache-2.0
397
package org.bitcoins.core.script.constant import org.bitcoins.core.number.Int64 import org.bitcoins.core.script.ScriptOperationFactory import org.bitcoins.core.util.{ BitcoinSUtil, BitcoinScriptUtil, Factory } import scala.util.{ Failure, Success, Try } /** * Created by chris on 1/6/16. */ /** * This is the root...
Christewart/bitcoin-s-core
src/main/scala/org/bitcoins/core/script/constant/Constants.scala
Scala
mit
11,084
/*** * Copyright 2014 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...
tylerroyal/api-checker
cli/wadl2checker/src/test/scala/com/rackspace/com/papi/components/checker/cli/Wadl2CheckerSuite.scala
Scala
apache-2.0
4,300
package lila.setup import chess.Mode private[setup] trait HumanConfig extends Config { // casual or rated val mode: Mode } private[setup] trait BaseHumanConfig extends BaseConfig { val modes = Mode.all map (_.id) val modeChoices = Mode.all map { e => e.id.toString -> e.toString } }
luanlv/lila
modules/setup/src/main/HumanConfig.scala
Scala
mit
302
package org.scalameter package deprecatedjapi import org.scalameter.japi.SerializableMethod import scala.collection.JavaConverters._ abstract class JavaPerformanceTest[U] extends BasePerformanceTest[U] with Serializable { import BasePerformanceTest._ private val Group = classOf[org.scalameter.deprecatedjapi.G...
kjanosz/scalameter
src/main/scala/org/scalameter/deprecatedjapi/JavaPerformanceTest.scala
Scala
bsd-3-clause
9,808
/* * 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/linkagerule/input/TransformInput.scala
Scala
apache-2.0
2,406
import scala.swing.SimpleSwingApplication import scala.swing.Swing._ import scala.swing.{MainFrame, Panel} import scala.swing.event._ import javax.swing.Timer import java.awt.{Color, Graphics2D, Point, geom} import java.awt.event.{ActionEvent, ActionListener} import java.nio.file._ import scala.collection.JavaConversio...
adatta02/turtle-graphics
src/LogoParser.scala
Scala
mit
4,079
package com.outr.iconsole import scala.language.experimental.macros import scala.language.implicitConversions import scala.reflect.macros.blackbox object ProcessorGenerator { def registerFromObject[T](c: blackbox.Context)(module: c.Expr[Option[String]], obj: c.Expr[T])(implicit t: c.WeakTypeTag[T]): c.Expr[List[Com...
outr/iconsole
core/js/src/main/scala/com/outr/iconsole/ProcessorGenerator.scala
Scala
apache-2.0
4,867
/* * sbt * Copyright 2011 - 2018, Lightbend, Inc. * Copyright 2008 - 2010, Mark Harrah * Licensed under Apache License 2.0 (see LICENSE) */ package sbt /* TODO: - index all available AutoPlugins to get the tasks that will be added - error message when a task doesn't exist that it would be provided by plugin x, en...
sbt/sbt
main/src/main/scala/sbt/Plugins.scala
Scala
apache-2.0
18,242
/** * 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...
ollie314/kafka
core/src/main/scala/kafka/utils/KafkaScheduler.scala
Scala
apache-2.0
5,202
package com.auginte.scarango.response.raw.query.simple import spray.json.{JsObject, JsString, JsValue} /** * Model for raw response of Document */ class Document(fields: Map[String, JsValue]) extends JsObject(fields) { def id = fieldToString("_id") def revision = fieldToString("_rev") def key = fieldToStrin...
aurelijusb/scarango
src/main/scala/com/auginte/scarango/response/raw/query/simple/Document.scala
Scala
apache-2.0
592
/** * Copyright 2011-2012 eBusiness Information, Groupe Excilys (www.excilys.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 * *...
Tjoene/thesis
Case_Programs/gatling-1.4.0/gatling-core/src/test/scala/com/excilys/ebi/gatling/core/result/writer/ConsoleDataWriterSpec.scala
Scala
gpl-2.0
2,821
package reactivemongo.core.protocol import scala.util.{ Failure, Success } import scala.concurrent.{ ExecutionContext, Future } import reactivemongo.io.netty.buffer.{ ByteBuf, Unpooled } import reactivemongo.core.errors._ /** * A Mongo Wire Protocol Response messages. * * @param header the header of this respon...
ornicar/ReactiveMongo
core/src/main/scala/core/protocol/Response.scala
Scala
apache-2.0
5,016
/* Copyright (c) 2010 Richard Searle * * 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...
searler/ScalaXML
src/test/scala/cognitiveentity/xml/combinators/NestedTest.scala
Scala
apache-2.0
5,154
package objektwerks object DeltaLakeApp extends App { import SparkInstance._ import Person.personStructType batch() structuredStreaming() def batch(): Unit = { val personsPath = "./target/delta/persons" val personsDataframe = sparkSession.read.json("./data/person/person.json") personsDatafram...
objektwerks/spark
src/main/scala/objektwerks/DeltaLakeApp.scala
Scala
apache-2.0
1,362
package org.crudible.core.binding import org.crudible.core.model.FormElement case class Section protected (protected val _label: Option[String], protected val _children: Seq[FormElement]) extends FormElement { def attach(node: FormElement*) = { new Section(label, _children ++ node) } def label(newLabel:...
rehei/crudible
crudible-core/src/main/scala/org/crudible/core/binding/Section.scala
Scala
apache-2.0
460
package org.bitcoins.core.serializers.p2p.messages import org.bitcoins.core.p2p._ import org.bitcoins.core.protocol.CompactSizeUInt import org.bitcoins.core.serializers.{RawBitcoinSerializer, RawSerializerHelper} import org.bitcoins.crypto.DoubleSha256Digest import scodec.bits.ByteVector import scala.annotation.tailr...
bitcoin-s/bitcoin-s
core/src/main/scala/org/bitcoins/core/serializers/p2p/messages/RawGetBlocksMessageSerializer.scala
Scala
mit
2,671
package org.questions.strings import org.specs2.mutable.Specification /** * @author maximn * @since 14-Nov-2015 */ class WildCardMatchingTest extends Specification { val matcher = new WildCardMatching "same string" should { "be matching" in { val string = "abc" matcher.isMatching(string, stri...
maximn/coding-interview-questions
src/test/scala/org/questions/strings/WildCardMatchingTest.scala
Scala
apache-2.0
965
/* * Copyright 2014 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...
cogitate/twitter-zipkin-uuid
zipkin-anormdb/src/main/scala/com/twitter/zipkin/storage/anormdb/AnormSpanStore.scala
Scala
apache-2.0
12,783
_oprot.{{protocolWriteMethod}}({{name}})
elipoz/scrooge
scrooge-generator/src/main/resources/scalagen/writeBase.scala
Scala
apache-2.0
41
package java.util.logging import java.lang.StringBuilder abstract class Formatter protected () { def format(record: LogRecord): String def getHead(h: Handler): String = "" def getTail(h: Handler): String = "" def formatMessage(record: LogRecord): String = { val msg = record.getMessage val params =...
scala-js/scala-js-java-logging
src/main/scala/java/util/logging/Formatter.scala
Scala
bsd-3-clause
2,395
package aia.persistence.rest import scala.concurrent.ExecutionContext import scala.concurrent.duration._ import scala.util.Try import akka.actor._ import akka.pattern.ask import akka.util.Timeout import akka.stream._ import akka.stream.scaladsl._ import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ im...
RayRoestenburg/akka-in-action
chapter-persistence/src/main/scala/aia/persistence/rest/ShopperService.scala
Scala
mit
3,388
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundatio...
HuangLS/neo4j
community/cypher/cypher-compiler-2.3/src/main/scala/org/neo4j/cypher/internal/compiler/v2_3/ast/convert/plannerQuery/PlannerQueryBuilder.scala
Scala
apache-2.0
3,557
import sbt._ import Keys._ import android.Keys._ object General { val settings = Defaults.defaultSettings ++ Seq ( name := "webSilvia", version := "0.1", scalaVersion := "2.10.4", resolvers ++= Seq( "sonatype-s" at "http://oss.sonatype.org/content/repositories/snapshots", "au...
relrod/webSilvia-android
project/Build.scala
Scala
bsd-3-clause
1,948
package uk.gov.dvla.vehicles.retain.gatling import io.gatling.core.Predef._ import io.gatling.core.feeder._ object Scenarios { // Happy paths def assetsAreAccessible = { val data = RecordSeqFeederBuilder[String](records = Array[Record[String]]()) val chain = new Chains(data) scenario("Assets Are acce...
dvla/vrm-retention-online
gatling-tests/src/test/scala/uk/gov/dvla/vehicles/retain/gatling/Scenarios.scala
Scala
mit
4,080
/* * 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/graph/SemanticCohesion.scala
Scala
apache-2.0
5,594
package worker import java.util.UUID import scala.concurrent.forkjoin.ThreadLocalRandom import scala.concurrent.duration._ import akka.actor.Actor import akka.actor.ActorLogging import akka.actor.ActorRef object WorkProducer { case object Tick } class WorkProducer(frontend: ActorRef) extends Actor with ActorLoggin...
typesafehub/activator-akka-distributed-workers
src/main/scala/worker/WorkProducer.scala
Scala
cc0-1.0
1,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 may ...
bdrillard/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/ParseDriver.scala
Scala
apache-2.0
11,729
package com.mesosphere.cosmos import org.scalatest.FreeSpec import org.scalatest.mock.MockitoSugar import org.scalatest.prop.TableDrivenPropertyChecks abstract class UnitSpec extends FreeSpec with TableDrivenPropertyChecks with MockitoSugar
movicha/cosmos
cosmos-server/src/test/scala/com/mesosphere/cosmos/UnitSpec.scala
Scala
apache-2.0
243
package jp.pigumer.sbt.cloud.aws.ecr import jp.pigumer.sbt.cloud.aws.cloudformation.AwscfSettings import com.amazonaws.services.ecr.{AmazonECR, AmazonECRClientBuilder} trait Ecr { lazy val ecr: (AwscfSettings) => AmazonECR = settings ⇒ AmazonECRClientBuilder.standard.withCredentials(settings.credentialsProvide...
PigumerGroup/sbt-aws-cloudformation
src/main/scala/jp/pigumer/sbt/cloud/aws/ecr/Ecr.scala
Scala
mit
362
package com.arcusys.learn.models.response.users import com.arcusys.learn.models.response.certificates.{ CertificateResponseContract } case class UserWithCertificatesResponse(id: Long, name: String, picture: String = "", pageUrl: String = "", certificates: Seq[CertificateResponseContract])
ViLPy/Valamis
learn-portlet/src/main/scala/com/arcusys/learn/models/response/users/UserWithCertificatesResponse.scala
Scala
lgpl-3.0
300
package com.twitter.zipkin.collector.processor /* * Copyright 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 *...
lanrion/zipkin
zipkin-server/src/main/scala/com/twitter/zipkin/collector/processor/OstrichProcessor.scala
Scala
apache-2.0
1,466
/* * Copyright (C) 2015 Romain Reuillon * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This progra...
openmole/openmole
openmole/plugins/org.openmole.plugin.hook.file/src/main/scala/org/openmole/plugin/hook/file/Activator.scala
Scala
agpl-3.0
1,725
/* * Copyright (C) 2011 Lalit Pant <pant.lalit@gmail.com> * * The contents of this file are subject to the GNU General Public License * Version 3 (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.gnu.org/copyleft/gpl.html * *...
vnkmr7620/kojo
KojoEnv/src/net/kogics/kojo/picture/transforms.scala
Scala
gpl-3.0
8,030
package concrete.constraint.extension import java.util import concrete.Domain trait Relation extends Iterable[Array[Int]] { type Self2 <: Relation def filterTrie(doms: Array[Domain], modified: List[Int]): Self2 def supported(domains: Array[Domain]): Array[util.HashSet[Int]] def contains(t: Array[Int]): Boo...
concrete-cp/concrete
src/main/scala/concrete/constraint/extension/Relation.scala
Scala
lgpl-2.1
689
/** * Copyright 2011-2012 eBusiness Information, Groupe Excilys (www.excilys.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 * *...
Tjoene/thesis
Case_Programs/gatling-1.4.0/gatling-recorder/src/main/scala/com/excilys/ebi/gatling/recorder/http/handler/AbstractBrowserRequestHandler.scala
Scala
gpl-2.0
3,393
/* * Copyright 2014 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 applicab...
CarloMicieli/first-steps-with-scala
src/test/scala/io/github/carlomicieli/scalakoans/AboutUniformAccessPrinciple.scala
Scala
apache-2.0
2,081
package tierney.core import cats.~> import cats.free.Free import cats.free.FreeApplicative import cats.data.EitherK /** * Higher-kinded functor */ trait FunctorK[S[_[_], _]] { self => def map[F[_], G[_]](f: F ~> G): S[F, ?] ~> S[G, ?] final def andThen[T[_[_], _]](other: FunctorK[T]): FunctorK[Lambda...
m50d/tierney
core/src/main/scala/tierney/core/FunctorK.scala
Scala
apache-2.0
1,666
/* * 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 ...
foryou2030/incubator-carbondata
integration/spark/src/main/scala/org/apache/carbondata/spark/csv/CarbonCsvReader.scala
Scala
apache-2.0
5,653
package com.agoda.kafka.connector.jdbc.models import enumeratum._ import scala.collection.immutable.IndexedSeq /** * Mode of operation * ~~~~~~~~~~~~~~~~~ * * Timestamp Mode :: creation timestamp of a record is stored as offset. * * Incrementing Mode :: unique (auto) incrementi...
arpanchaudhury/kafka-jdbc-connector
src/main/scala/com/agoda/kafka/connector/jdbc/models/Mode.scala
Scala
apache-2.0
906
/* # Copyright 2016 Georges Lipka # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
glipka/Easy-React-With-ScalaJS
src/main/scala/com/glipka/easyReactJS/react/ComponentLifecycle.scala
Scala
apache-2.0
1,429
trait M[X] trait N[X] class Foo[A](a: N[A]) { } val nb: N[Boolean] = null /*start*/new Foo(nb)/*end*/ // Foo[Boolean]
ilinum/intellij-scala
testdata/typeInference/bugs4/SCL3510C.scala
Scala
apache-2.0
119
import sbt._ import Import._ import Keys._ object MultiPublishTest extends Build { override lazy val settings = super.settings ++ Seq( organization := "A", version := "1.0", ivyPaths <<= baseDirectory( dir => new IvyPaths(dir, Some(dir / "ivy" / "cache")) ), externalResolvers <<= baseDirectory map { base =...
dansanduleac/sbt
sbt/src/sbt-test/dependency-management/publish-local/project/MultiPublishTest.scala
Scala
bsd-3-clause
926
package com.cdegroot.sgame /** * This class is a very minimal replacement of java.awt.Point */ case class SGPoint(x: Int, y: Int) { override def toString = "SGPoint(" + x + "," + y + ")" // Helper methods to make client code more readable when point is used as dimension def width = x def height = y } // Com...
cdegroot/sgame
src/main/scala/com/cdegroot/sgame/SGPoint.scala
Scala
bsd-3-clause
539
/** * Copyright 2017 https://github.com/sndnv * * 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 applicabl...
sndnv/noisecluster
noisecluster-jvm/src/main/scala/noisecluster/jvm/control/package.scala
Scala
apache-2.0
1,407
/** * 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...
dchenbecker/kafka-sbt
core/src/test/scala/unit/kafka/utils/TopicTest.scala
Scala
apache-2.0
1,988
/************************************************************************* * * * This file is part of the 20n/act project. * * 20n/act enables DNA prediction for synthetic biology/bioengineering. * * Copyright (C) 201...
20n/act
reachables/src/main/scala/similarity.scala
Scala
gpl-3.0
6,576
import scalaxb.compiler.wsdl11.{Driver} import java.io.{File} import scalaxb.compiler.{Config} object Wsdl11Soap11Test extends TestBase { override val module = new Driver // with Verbose lazy val generated = module.process(inFile, Config(packageNames = Map(None -> Some(packageName)), packageDir = true, ...
Banno/scalaxb
integration/src/test/scala/Wsdl11Soap11Test.scala
Scala
mit
1,088
/** * Copyright 2011-2017 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...
MykolaB/gatling
gatling-charts/src/main/scala/io/gatling/charts/template/StatsJsTemplate.scala
Scala
apache-2.0
4,566
package org.zbritva.graph.tree /** * Created by iigaliev on 20.05.2016. */ class TreeNode() { var node_columns: List[String] = List[String]() //list to childs with cost of computing //first cost of computing is if current node is properly sorted (wrong) //second cost of computing if current no...
zBritva/SparkCUBE
src/org/zbritva/graph/tree/TreeNode.scala
Scala
apache-2.0
2,837
package com.twitter.finatra.http.integration.doeverything.main import com.twitter.finagle.Filter import com.twitter.finagle.http.{Request, Response} import com.twitter.finatra.http.filters.CommonFilters import com.twitter.finatra.http.integration.doeverything.main.controllers.{DoEverythingController, DoNothingControll...
joecwu/finatra
http/src/test/scala/com/twitter/finatra/http/integration/doeverything/main/DoEverythingServer.scala
Scala
apache-2.0
2,767
package me.flygare.utils import akka.actor.ActorSystem import akka.stream.ActorMaterializer trait HttpConnection extends HttpConfig{ implicit val actorSystem = ActorSystem("system") implicit val actorMaterializer = ActorMaterializer() }
flygare/Minopt
RestService/src/main/scala/me.flygare/utils/HttpConnection.scala
Scala
mit
244
/* * Copyright 2017 Nicolas Rinaudo * * 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...
nrinaudo/kantan.mongodb
core/src/test/scala/kantan/mongodb/UriCodecTests.scala
Scala
apache-2.0
812
package me.frmr.wepay.api { import org.scalatest.FunSpec import net.liftweb.common._ import me.frmr.wepay._ import WePayTestHelpers._ import me.frmr.wepay.api._ class CreditCardSpec extends FunSpec { implicit val authorizationToken = testAuthorizationToken describe("A Credit Card") { var...
farmdawgnation/wepay-scala
src/test/scala/me/frmr/wepay/api/CreditCardSpec.scala
Scala
apache-2.0
1,828
package mesosphere.marathon.util import mesosphere.AkkaUnitTest import scala.concurrent.Future import scala.concurrent.duration._ class TimeoutTest extends AkkaUnitTest { "Timeout" when { "async" should { "complete" in { Timeout(1.second)(Future.successful(1)).futureValue should equal(1) } ...
timcharper/marathon
src/test/scala/mesosphere/marathon/util/TimeoutTest.scala
Scala
apache-2.0
2,390
package com.clackjones.connectivitymap.service case class Experiment ( var id : String, querySignatureId : String, randomSignatureCount : Int ) case class ExperimentResult( experimentId : String, scores: Iterable[ConnectionScoreResult] ) case class ConnectionScoreResult(referenceSetName: String, connection...
hiraethus/scala-connectivity-map
src/main/scala/com/clackjones/connectivitymap/service/Experiment.scala
Scala
gpl-3.0
517
package com.github.mdr.ascii.layout.drawing import com.github.mdr.ascii.util.Utils._ import com.github.mdr.ascii.common.Direction._ import com.github.mdr.ascii.common.Region import scala.annotation.tailrec /** * Raise edges if there are no conflicting diagram elements. For example: * * ╭───────╮ ╭──...
jlmauduy/ascii-graphs
src/main/scala/com/github/mdr/ascii/layout/drawing/EdgeElevator.scala
Scala
mit
3,152
package vk.scout.auth.oauth2.browser import javafx.application.Platform import javafx.embed.swing.JFXPanel import javafx.scene.Scene import javafx.scene.web.{WebEngine, WebView} import javax.swing._ import java.awt._ import java.net.{MalformedURLException, URL} import java.awt.event.{WindowAdapter, WindowEvent} import...
ipostanogov/vk-scout
src/main/scala/vk/scout/auth/oauth2/browser/WebBrowser.scala
Scala
mit
2,635
/* ASIB - A Scala IRC Bot Copyright (C) 2012 Iain Cambridge This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ...
icambridge-old/asib
src/main/scala/asib/command/user/Weather.scala
Scala
gpl-3.0
2,198
package de.markschaefer.lib.eventflow import java.io.BufferedReader import java.text.SimpleDateFormat import java.text.DateFormat import java.util.Calendar class EventFlow[T](val name: String, val flow: List[Event[T]]) { override def toString = name + "\\n" + flow.toString } abstract class Converter[T] { def fr...
mark--/eventflow
de.markschaefer.lib.eventflow/src/de/markschaefer/lib/eventflow/EventFlow.scala
Scala
gpl-2.0
2,543
package org.hello.common import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class WorldCommonSuite extends FunSuite { test("fooCommon") { new WorldCommon().fooCommon() } }
scoverage/gradle-scoverage
src/functionalTest/resources/projects/scala-multi-module/common/src/test/scala/org/hello/common/WorldCommonSuite.scala
Scala
apache-2.0
263
package com.bobwilsonsgarage.carrepair import akka.actor.SupervisorStrategy.{Restart, Stop} import akka.actor._ import com.bobwilsonsgarage.carrepair.CarRepairServiceEndpointInternalProtocol.InitializeCarRepairServiceEndpoint import common.protocol.CarRepairService import common.protocol.CarRepairServiceProtocol._ im...
dbolene/BobWilsonsGarage
carRepair/src/main/scala/com/bobwilsonsgarage/carrepair/CarRepairServiceEndpointOverseer.scala
Scala
apache-2.0
1,937
/* * Copyright (c) 2008-2009, Matthias Mann * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this...
Skunnyk/dbpedia-spotlight-model
core/src/main/scala/org/dbpedia/spotlight/util/Profiling.scala
Scala
apache-2.0
2,922
package org.dsa.iot.rx.core import org.dsa.iot.rx.RxTransformer import org.dsa.iot.scala.Having /** * Caches the items emitted by the source, so that future subscriptions can "replay" them from the * beginning. * * <img width="640" height="410" src="https://raw.githubusercontent.com/wiki/ReactiveX/RxJava/images/r...
IOT-DSA/dslink-scala-ignition
src/main/scala/org/dsa/iot/rx/core/Cache.scala
Scala
apache-2.0
1,130
/* Copyright 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 agreed to in writing, software distr...
tglstory/scalding
scalding-date/src/main/scala/com/twitter/scalding/DateOps.scala
Scala
apache-2.0
4,159
package com.ldaniels528.ricochet import java.awt.event.{MouseEvent, MouseMotionListener} import java.awt.{Cursor, Color, Dimension, Graphics2D} import javax.swing.{JFrame, JPanel} /** * Ricochet Application * @author "Lawrence Daniels" <lawrence.daniels@gmail.com> */ class RicochetApp() extends JFrame("Ricochet") ...
ldaniels528/ricochet
src/main/scala/com/ldaniels528/ricochet/RicochetApp.scala
Scala
apache-2.0
2,478
// // FreqMineData.scala -- Scala benchmark data classes for FreqMine // Project OrcTests // // Copyright (c) 2018 The University of Texas at Austin. All rights reserved. // // Use and redistribution of this file is governed by the license terms in // the LICENSE file found in the project's top-level directory and also...
orc-lang/orc
OrcTests/src/orc/test/item/scalabenchmarks/fpgrowth/FreqMineData.scala
Scala
bsd-3-clause
2,909
package paperdoll.core.layer import shapeless.{ Coproduct, :+:, CNil } import scalaz.Leibniz /** * Typeclass representing that the layer stack T is a subset of the layer stack S, and bridging between the * layer stack world and the effectful value world. * This probably duplicates some functionality that's present...
m50d/paperdoll
core/src/main/scala/paperdoll/core/layer/Subset.scala
Scala
apache-2.0
1,582
package java.io class PrintStream(_out: OutputStream, autoFlush: Boolean, ecoding: String) extends FilterOutputStream(_out) with Appendable { import java.util.Locale def this(out: OutputStream) = this(out, false, "") def this(out: OutputStream, autoFlush: Boolean) = this(out, autoFlush, "") override def ...
swhgoon/scala-js
javalib/source/src/java/io/PrintStream.scala
Scala
bsd-3-clause
2,177
package org.bidpulse.example import akka.actor.{Actor, ActorLogging, ActorRef} import org.bidpulse.pipeline.{Channel, Pipeline, Publisher} class DummyPublisher(pipeline: ActorRef) extends Actor with Publisher with ActorLogging { pipeline ! Pipeline.Subscribe override def receive: Receive = { case msg @ (_:...
EugenyLoy/BidPulse
src/main/scala/org/bidpulse/example/DummyPublisher.scala
Scala
mit
472
package com.twitter.finagle.netty4.http.handler import com.twitter.conversions.StorageUnitOps._ import com.twitter.util.StorageUnit.zero import io.netty.buffer.Unpooled import io.netty.channel.embedded.EmbeddedChannel import io.netty.handler.codec.http._ import org.scalatest.FunSuite class FixedLengthMessageAggregato...
luciferous/finagle
finagle-netty4-http/src/test/scala/com/twitter/finagle/netty4/http/handler/FixedLengthMessageAggregatorTest.scala
Scala
apache-2.0
6,727
package com.datastax.spark.connector.types import org.apache.commons.lang3.SerializationUtils import org.junit.Assert._ import org.junit.Test class TypeSerializationTest { private def testSerialization(t: ColumnType[_]) { assertEquals(t, SerializationUtils.roundtrip(t)) } @Test def testSerializationOfPr...
maasg/spark-cassandra-connector
spark-cassandra-connector/src/test/scala/com/datastax/spark/connector/types/TypeSerializationTest.scala
Scala
apache-2.0
1,170
package io.cumulus.models.sharing import akka.util.ByteString import io.cumulus.json.JsonFormat._ import io.cumulus.utils.Crypto import play.api.libs.json.{Format, Json} /** * TODO */ case class SharingSecurity( secretCodeHash: ByteString, salt1: ByteString, salt2: ByteString ) { /** * Test if the p...
Cumulus-Cloud/cumulus
server/cumulus-core/src/main/scala/io/cumulus/models/sharing/SharingSecurity.scala
Scala
mit
1,294
/* * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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 b...
hpe-cct/cct-core
src/main/scala/cogx/compiler/codegenerator/opencl/OpcodeToFunction.scala
Scala
apache-2.0
6,724
package athena.util import java.util.concurrent.atomic.AtomicReference import scala.annotation.tailrec //stolen from spray private[athena] trait ObjectRegistry[K, V <: AnyRef] { private[this] val _registry = new AtomicReference(Map.empty[K, V]) @tailrec protected final def register(key: K, obj: V): obj.type =...
vast-engineering/athena
src/main/scala/athena/util/ObjectRegistry.scala
Scala
apache-2.0
608
package org.jetbrains.plugins.scala package lang package completion package filters.definitions import com.intellij.psi._ import com.intellij.psi.filters.ElementFilter import org.jetbrains.annotations.NonNls import org.jetbrains.plugins.scala.lang.completion.ScalaCompletionUtil._ import org.jetbrains.plugins.scala.lan...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/lang/completion/filters/definitions/DefTypeFilter.scala
Scala
apache-2.0
2,139
/* * 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 ...
holdenk/spark
sql/core/src/test/scala/org/apache/spark/sql/CharVarcharTestSuite.scala
Scala
apache-2.0
35,623
/* * Copyright 2012 Jahziah Wagner <jahziah[dot]wagner[at]gmail[dot]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 * * Unle...
jahwag/OpenLobby
modules/Battle/src/main/scala/com/openlobby/battle/BattleModelObserver.scala
Scala
apache-2.0
700
package org.scalawiki.bots.stat import org.scalawiki.dto.filter.{AllRevisionsFilter, RevisionFilter} import org.scalawiki.dto.{Page, Revision} import org.xwiki.blame.AnnotatedElement class RevisionAnnotation(val page: Page, revFilter: RevisionFilter = AllRevisionsFilter) { val revisions = revFilter(page.revisions)...
intracer/scalawiki
scalawiki-bots/src/main/scala/org/scalawiki/bots/stat/RevisionAnnotation.scala
Scala
apache-2.0
955
package edu.depauw.util class Hello(thing: String) { def greet = "Hello, " + thing } object Main { def main(args: Array[String]) { val hw = new Hello("World") println(hw.greet) } }
bhoward/EscalatorOld
Prototype/src/main/scala/edu/depauw/util/Hello.scala
Scala
apache-2.0
197
package org.openmole.core.workflow.puzzle import org.openmole.core.context.Val import org.openmole.core.workflow.dsl._ import org.openmole.core.workflow.execution.LocalEnvironment import org.openmole.core.workflow.mole._ import org.openmole.core.workflow.task._ import org.openmole.core.workflow.test.TestHook import or...
openmole/openmole
openmole/core/org.openmole.core.workflow/src/test/scala/org/openmole/core/workflow/puzzle/PuzzleSpec.scala
Scala
agpl-3.0
3,093
package thurloe.service import akka.actor.{Actor, Props} import com.typesafe.config.{Config, ConfigFactory} import org.parboiled.common.FileUtils import spray.http.StatusCodes._ import spray.http._ import spray.routing.Route import thurloe.dataaccess.HttpSendGridDAO import thurloe.database.ThurloeDatabaseConnector im...
broadinstitute/thurloe
src/main/scala/thurloe/service/ThurloeServiceActor.scala
Scala
bsd-3-clause
3,035
/** * 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...
kss160992/kafka-latest
core/src/main/scala/kafka/tools/MirrorMaker.scala
Scala
apache-2.0
18,123
/* * 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/t-streams
src/test/scala/com/bwsw/tstreams/testutils/TestStorageServer.scala
Scala
apache-2.0
2,108
/* * Copyright 2015-2020 Noel Welsh * * 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...
underscoreio/doodle
core/shared/src/main/scala/doodle/examples/Polygons.scala
Scala
apache-2.0
1,370
/** * Licensed to the Minutemen Group under one or more contributor license * agreements. See the COPYRIGHT file distributed with this work for * additional information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in complian...
mohiva/silhouette
modules/provider-form/src/main/scala/silhouette/provider/form/EmailLoginProvider.scala
Scala
apache-2.0
1,592
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs // Licence: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.indexer import java.util.concurrent.Semaphore import scala.concurrent._ import scala.concurrent.duration._ import scala.util.{ Failure, Properties, Success } import akka...
mwielocha/ensime-server
core/src/main/scala/org/ensime/indexer/SearchService.scala
Scala
gpl-3.0
13,436
/* * 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...
svn2github/scalatest
src/main/scala/org/scalautils/AsAny.scala
Scala
apache-2.0
4,511
/* * DragAndDrop.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 impor...
Sciss/Mellite
core/src/main/scala/de/sciss/mellite/DragAndDrop.scala
Scala
agpl-3.0
2,620
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
sslavic/kafka
core/src/test/scala/unit/kafka/tools/MirrorMakerTest.scala
Scala
apache-2.0
3,257
/* * 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 ...
tophua/spark1.52
core/src/main/scala/org/apache/spark/serializer/JavaSerializer.scala
Scala
apache-2.0
5,262
/* * 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 ...
hdinsight/spark-eventhubs
core/src/test/scala/org/apache/spark/sql/eventhubs/EventHubsSourceSuite.scala
Scala
apache-2.0
42,283
package me.eax.examples.statsd.client import scala.util._ import scala.concurrent._ import me.eax.examples.statsd.client.utils._ import scala.concurrent.ExecutionContext.Implicits.global object StatsDClientExample extends App { val client = new MetricsClientImpl for(i <- 1 to 500) { val inc = (1 + Random.nex...
afiskon/scala-statsd-example
src/main/scala/me/eax/examples/statsd/client/StatsDClientExample.scala
Scala
mit
699
import io.simao.lobster.{FeedItem, Feed, BotTwitterStatus} import org.joda.time.DateTime import org.scalamock.scalatest.MockFactory import org.scalatest.FunSuite import twitter4j.Status import scala.concurrent.{Await, ExecutionContext, Future} import scala.concurrent.duration._ class BotTwitterStatusTest extends Fun...
simao/lobsters
src/test/scala/BotTwitterStatusTest.scala
Scala
mit
1,584
/** Open Bank Project - API Copyright (C) 2011, 2013, TESOBE / Music Pictures Ltd This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later...
OpenBankProject/Bank-account-data-storage
src/main/scala/com/tesobe/model/BankAccountDetails.scala
Scala
agpl-3.0
2,045
package com.faacets.qalg package impl import scala.{specialized => sp} import scala.annotation.tailrec import spire.algebra._ import spire.syntax.cfor._ import spire.syntax.field._ import algebra._ import indup.algebra._ object VecDense { val seed = 0xFAACE73 @inline def hash[@sp(Double, Long) A: Zero](v: math...
denisrosset/qalg
core/src/main/scala/qalg/impl/VecDense.scala
Scala
mit
4,279