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 co.blocke.scalajack package dynamodb import org.json4s.JsonAST.{ JNothing, JObject, JValue } object JsonDiff { def compare( left: JValue, right: JValue, leftLabel: String = "left", rightLabel: String = "right"): Seq[JsonDiff] = { (left, right) match { case (JOb...
gzoller/ScalaJack
dynamodb/src/test/scala/co.blocke.scalajack/dynamodb/JsonDiff.scala
Scala
mit
2,050
package at.bhuemer.scala.playground.github.monad /** * The millionth definition of a monad in Scala (no need to use scalaz in this example - less than 50 lines in total). */ trait Monad[M[_]] { def unit[A](a: => A): M[A] def map[A, B](ma: M[A])(f: A => B): M[B] def flatMap[A, B](ma: M[A])(f: A => M[B]): M[B] }
bhuemer/scala-playground
github-future-monad/src/main/scala/at/bhuemer/scala/playground/github/monad/Monad.scala
Scala
apache-2.0
320
package com.twitter.finagle.http.filter import com.twitter.conversions.time._ import com.twitter.finagle.{Deadline, Service} import com.twitter.finagle.context.Contexts import com.twitter.finagle.http.{Status, Response, Request} import com.twitter.finagle.http.codec.HttpContext import com.twitter.util.{Await, Future} ...
lukiano/finagle
finagle-http/src/test/scala/com/twitter/finagle/http/filter/ContextFilterTest.scala
Scala
apache-2.0
1,773
/* * Copyright 2011 Delving B.V. * * 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...
delving/culture-hub
modules/dos/app/processors/TIFFNormalizationProcessor.scala
Scala
apache-2.0
2,407
package com.intenthq.icicle import java.util import com.intenthq.icicle.redis.RoundRobinRedisPool import org.specs2.mutable._ object JedisIcicleIntegrationSpec extends Specification { "constructor" should { "sets the correct host and port if a valid host and port is passed" in { val underTest = new Jedis...
intenthq/icicle
icicle-jedis/src/it/scala/com/intenthq/icicle/JedisIcicleIntegrationSpec.scala
Scala
mit
1,463
/* * Copyright 2017 PayPal * * 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 writin...
akara/squbs
squbs-ext/src/main/scala/org/squbs/streams/DemandSupplyMetrics.scala
Scala
apache-2.0
2,669
package finatra.filters import com.twitter.finagle.http.filter.AddResponseHeadersFilter object CorsFilter { def apply(origin: String = "*", methods: String = "GET", headers: String = "x-requested-with") = new AddResponseHeadersFilter( Map("Access-Control-Allow-Origin" -> origin, "Access-Control...
pedrovgs/HaveANiceDay
src/main/scala/finatra/filters/CorsFilter.scala
Scala
gpl-3.0
404
package com.github.mrpowers.spark.daria.sql import org.apache.spark.sql.DataFrame case class MissingDataFrameColumnsException(smth: String) extends Exception(smth) private[sql] class DataFrameColumnsChecker(df: DataFrame, requiredColNames: Seq[String]) { val missingColumns = requiredColNames.diff(df.columns.toSeq...
MrPowers/spark-daria
src/main/scala/com/github/mrpowers/spark/daria/sql/DataFrameColumnsChecker.scala
Scala
mit
758
package docs.scaladsl.services.headerfilters package compose { import com.lightbend.lagom.scaladsl.api.transport.{HeaderFilter, RequestHeader, ResponseHeader} import com.lightbend.lagom.scaladsl.api.{Service, ServiceCall} import org.slf4j.LoggerFactory //#verbose-filter class VerboseFilter(name: String) ex...
edouardKaiser/lagom
docs/manual/scala/guide/services/code/HeaderFilters.scala
Scala
apache-2.0
1,433
package net.nomadicalien.ch2 import java.util.Date /** * The Account abstraction (product type) */ object Listing2_8 { sealed trait Account { def number: String def name: String } case class CheckingAccount(number: String, name: String, dateOfOpening: Date) extends Account case class SavingsAccoun...
BusyByte/functional-n-reactive-domain-modeling
chapter2/src/main/scala/Listing2_8.scala
Scala
apache-2.0
425
package com.twitter.util import java.util.concurrent.atomic.AtomicInteger import java.util.concurrent.{CancellationException, ExecutorService} import org.junit.runner.RunWith import org.mockito.ArgumentCaptor import org.mockito.Matchers.any import org.mockito.Mockito.{never, verify, when} import org.scalatest.FunSuit...
tdyas/util
util-core/src/test/scala/com/twitter/util/TimerTest.scala
Scala
apache-2.0
7,756
object PascalTriangle { val lookup_table = new collection.mutable.HashMap[(Int, Int), Int] def compute(row: Int, col: Int): Int = { require(col >= 0 && row >= 0, "row and col arguemnts must be >= 0") require(col <= row, "col must be <= row") if (col == 0 || col == row) { 1 } else { val r1c: Int = this....
dansok/algos
PascalTriangle.scala
Scala
gpl-3.0
638
import argonaut._ import argonaut.Argonaut._ import cats.Show import cats.syntax.all._ import treelog._ final case class Thing(id: Int, name: String) object Thing { implicit def ThingCodecJson: CodecJson[Thing] = CodecJson( (t: Thing) => ("id" := t.id) ->: ("name" := t.name) ->: ...
lancewalton/treelog
src/test/scala/SerializationExample.scala
Scala
mit
6,202
package mesosphere.marathon.state import mesosphere.marathon.metrics.Metrics import scala.concurrent.Future /** * This responsibility is in transit: * * Current state: * - all applications are stored as part of the root group in the group repository for every user intended change * - all applications are st...
vivekjuneja/marathon
src/main/scala/mesosphere/marathon/state/AppRepository.scala
Scala
apache-2.0
2,000
import play.api.libs.json._ import play.api.libs.json.Reads._ import play.api.libs.functional.syntax._ val json: JsValue = Json.parse(""" { "name" : "Watership Down", "location" : { "lat" : 51.235685, "long" : -1.309197 }, "residents" : [ { "name" : "Fiver", "age" : 4, "role" : null }, { ...
PeterPerhac/cheat-sheets
scala-scratches/json-working-with-json-in-play.scala
Scala
unlicense
1,311
/* * 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/util/collection/WritablePartitionedPairCollection.scala
Scala
apache-2.0
4,374
package io.github.binaryfoo.lagotto.mmap import java.nio.ByteBuffer import scala.collection.immutable.StringLike /** * Odd (and probably failed) attempt at processing records faster by using a memory mapped buffer. */ case class LiteString(buf: ByteBuffer, start: Int = 0, override val length: Int) extends CharSequ...
binaryfoo/lagotto
src/main/scala/io/github/binaryfoo/lagotto/mmap/LiteString.scala
Scala
mit
2,798
package concrete package constraint package semantic import bitvectors.BitVector import concrete.util.IntIntMap import scala.collection.mutable import scala.collection.mutable.ArrayBuffer object Element { def apply(result: Variable, index: Variable, varsIdx: Seq[(Int, Variable)]): Seq[Constraint] = { val last...
concrete-cp/concrete
src/main/scala/concrete/constraint/semantic/Element.scala
Scala
lgpl-2.1
7,471
package com.mesosphere.universe.v3.model import com.twitter.util.Return import com.twitter.util.Throw import com.twitter.util.Try import org.scalatest.Assertion import org.scalatest.FreeSpec class DcosReleaseVersionParserSpec extends FreeSpec { private[this] val regex = DcosReleaseVersionParser.fullRegex.toString ...
dcos/cosmos
cosmos-test-common/src/test/scala/com/mesosphere/universe/v3/model/DcosReleaseVersionParserSpec.scala
Scala
apache-2.0
3,718
package com.lyrx.text import java.io.File import com.lyrx.latex.LTXPDFProcessor /** * Created by extawe on 10/13/16. */ trait Processor { def output():Either[File,String] def process(fileName:String): Processor }
lyrx/lyrxgenerator
src/main/scala/com/lyrx/text/Processor.scala
Scala
gpl-3.0
227
/* * ============= Ryft-Customized BSD License ============ * Copyright (c) 2015, Ryft Systems, Inc. * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must...
getryft/spark-ryft-connector
spark-ryft-connector/src/main/scala/com/ryft/spark/connector/query/value/EditValue.scala
Scala
bsd-3-clause
2,288
package com.paypal.genio import org.json4s.JsonAST.{JString, JObject, JValue} /** * Created by akgoel on 03/07/15. */ trait Service { def serviceName(): String def servicePath(): String def serviceRoot(): String def schemas(): Map[String, Schema] def resources(): Map[String, Resource] } class Servic...
prannamalai/genio-scala
src/main/scala/Parser.scala
Scala
apache-2.0
1,204
package barneshut import java.util.concurrent._ import scala.collection._ import org.scalatest.FunSuite import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import common._ import scala.math._ import scala.collection.parallel._ import barneshut.conctrees.ConcBuffer @RunWith(classOf[JUnitRunner]) cla...
yurii-khomenko/fpScalaSpec
c3w4barneshut/src/test/scala/barneshut/BarnesHutSuite.scala
Scala
gpl-3.0
5,041
/* * 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 applicab...
vert-x/mod-lang-scala
src/test/scala/org/vertx/scala/tests/lang/VerticleClass.scala
Scala
apache-2.0
956
package spark.deploy.client /** * Callbacks invoked by deploy client when various events happen. There are currently four events: * connecting to the cluster, disconnecting, being given an executor, and having an executor * removed (either due to failure or due to revocation). * * Users of this API should *not* b...
joeywen/spark_cpp_api
core/src/main/scala/spark/deploy/client/ClientListener.scala
Scala
bsd-3-clause
617
package security import javax.inject.{Inject, Singleton} @Singleton class SurveyActionBuilder @Inject()(builder: Intake24RestrictedActionBuilder) { }
digitalinteraction/intake24
ApiPlayServer/app/security/SurveyActionBuilder.scala
Scala
apache-2.0
155
package eventstore package akka package examples import _root_.akka.actor._ import scala.concurrent.duration._ import eventstore.akka.tcp.ConnectionActor object CountAll extends App { val system = ActorSystem() val connection = system.actorOf(ConnectionActor.props(), "connection") val countAll = system.actorOf(...
EventStore/EventStore.JVM
examples/src/main/scala/eventstore/akka/examples/CountAll.scala
Scala
bsd-3-clause
891
package com.rocketfuel.sdbc.cassandra.datastax.implementation import com.datastax.driver.core.{Row => CRow} private[sdbc] trait RowMethods { self: ParameterValues with IndexImplicits => implicit class Row(underlying: CRow) { def get[T](ix: Index)(implicit getter: RowGetter[T]): Option[T] = { getter(un...
wdacom/sdbc
cassandra/src/main/scala/com/rocketfuel/sdbc/cassandra/datastax/implementation/RowMethods.scala
Scala
bsd-3-clause
883
package scala.models import scala.generator._ import com.bryzek.apidoc.generator.v0.models.{File, InvocationForm} import org.scalatest.{ ShouldMatchers, FunSpec } class Kafka10ConsumerSpec extends FunSpec with ShouldMatchers { import KafkaUtil._ import CaseClassUtil._ val json = models.TestHelper.buildJson(""...
movio/movio-apidoc-generator
scala-generator/src/test/scala/models/Kafka10ConsumerSpec.scala
Scala
mit
2,373
package io.aos.spark.mllib.scaling import org.apache.spark.SparkContext import org.apache.spark.SparkConf import org.apache.spark.SparkContext._ import org.apache.spark.rdd.RDD // used for computing meand and standard deviation import org.apache.spark.rdd.DoubleRDDFunctions import Scaling._ object SelectVariables ...
echalkpad/t4f-data
spark/mllib/src/main/scala/io/aos/spark/mllib/scaling/SelectVariables.scala
Scala
apache-2.0
2,823
package com.twitter.finagle.service import com.twitter.finagle.stats.StatsReceiver import com.twitter.finagle.{BackupRequestLost, SourcedException, Service, SimpleFilter} import com.twitter.util.{Future, Stopwatch, Throw, Return} import java.util.concurrent.atomic.AtomicInteger class StatsFilter[Req, Rep](statsReceiv...
joshbedo/finagle
finagle-core/src/main/scala/com/twitter/finagle/service/StatsFilter.scala
Scala
apache-2.0
2,045
package slamdata.engine import slamdata.Predef._ import scala.reflect.ClassTag import org.specs2.matcher._ import scalaz._ trait TreeMatchers { def beTree[A](expected: A)(implicit RA: RenderTree[A]): Matcher[A] = new Matcher[A] { def apply[S <: A](s: Expectable[S]) = { val v = s.value def diff = ...
wemrysi/quasar
core/src/test/scala/slamdata/engine/matchers.scala
Scala
apache-2.0
1,318
package chat.tox.antox.wrapper import chat.tox.antox.tox.ToxSingleton import scala.collection.JavaConversions._ class Group(val key: GroupKey, val groupNumber: Int, var name: String, var alias: String, var topic: String, val peers: PeerList) { var connec...
subliun/Antox
app/src/main/scala/chat/tox/antox/wrapper/Group.scala
Scala
gpl-3.0
1,019
package pl.touk.nussknacker.engine.api import pl.touk.nussknacker.engine.api.component.Component import pl.touk.nussknacker.engine.api.process.ComponentUseCase import pl.touk.nussknacker.engine.api.test.InvocationCollectors import pl.touk.nussknacker.engine.api.typed.typing.TypingResult import scala.concurrent.{Execu...
TouK/nussknacker
components-api/src/main/scala/pl/touk/nussknacker/engine/api/Service.scala
Scala
apache-2.0
2,054
// Project: angulate2-examples // Module: 06 AngelloLite // Description: Component for editing StoryS // Copyright (c) 2016. Distributed under the MIT License (see included LICENSE file). package angellolite import angulate2._ import scala.scalajs.js @Component( selector = "story-form", templateUrl = "...
jokade/angulate2-examples
archive/06_angelloLite/js/src/main/scala/angellolite/StoryFormComponent.scala
Scala
mit
726
package models import akka.stream.{KillSwitches, SharedKillSwitch} import play.api.libs.json.{Format, JsPath, Json, Reads} import scala.language.postfixOps /** * Copyright (c) 2017 A. Roberto Fischer * * @author A. Roberto Fischer <a.robertofischer@gmail.com> on 3/14/2017 */ final case class TwitterAuthCrede...
Queendimimi/twitter_extractor
app/models/TwitterAuthCredentials.scala
Scala
apache-2.0
1,096
package org.bitcoins.util import org.bitcoinj.core.DumpedPrivateKey import org.bitcoins.config.TestNet3 import org.bitcoins.crypto.ECFactory /** * Created by chris on 3/7/16. */ trait CryptoTestUtil { def privateKeyBase58 = "cVLwRLTvz3BxDAWkvS3yzT9pUcTCup7kQnfT2smRjvmmm1wAP6QT" def privateKeyBytes = BitcoinSUt...
Christewart/scalacoin
src/test/scala/org/bitcoins/util/CryptoTestUtil.scala
Scala
mit
699
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
erictu/adam
adam-core/src/main/scala/org/bdgenomics/adam/converters/SAMRecordConverter.scala
Scala
apache-2.0
7,029
// Copyright (c) 2013, Johns Hopkins University. All rights reserved. // This software is released under the 2-clause BSD license. // See /LICENSE.txt // Travis Wolfe, twolfe18@gmail.com, 30 July 2013 package edu.jhu.hlt.parma.util import collection.JavaConversions._ class Alphabet[T] extends Serializable { pri...
hltcoe/parma
src/main/scala/edu/jhu/hlt/parma/util/Alphabet.scala
Scala
bsd-2-clause
1,664
/* * Copyright © 2015 Reactific Software LLC. All Rights Reserved. * * 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...
reactific/RxMongo
messages/src/main/scala/rxmongo/messages/cmds/AuthenticationCommands.scala
Scala
mit
2,584
// Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). // Licensed under the Apache License, Version 2.0 (see LICENSE). package com.twitter.intellij.pants.testFramework.performance import java.io.File import com.intellij.ProjectTopics import com.intellij.ide.plugins.PluginManagerCore import com.intellij...
pantsbuild/intellij-pants-plugin
testFramework/src/main/scala/com/twitter/intellij/pants/testFramework/performance/PantsPerformanceBenchmark.scala
Scala
apache-2.0
4,085
/** * sbt-osgi-manager - OSGi development bridge based on Bnd and Tycho. * * Copyright (c) 2013-2014 Alexey Aksenov ezh@ezh.msk.ru * * 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 * *...
digimead/sbt-osgi-manager
src/main/scala/sbt/osgi/manager/tycho/Logger.scala
Scala
apache-2.0
4,613
/* * 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 ...
lxsmnv/spark
mllib/src/main/scala/org/apache/spark/ml/tuning/CrossValidator.scala
Scala
apache-2.0
16,802
/* * 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 ...
bharathkk/samza
samza-core/src/main/scala/org/apache/samza/job/local/ProcessJobFactory.scala
Scala
apache-2.0
4,152
package com.sksamuel.elastic4s.searches.queries.term import com.sksamuel.elastic4s.DocumentRef import com.sksamuel.elastic4s.searches.queries.Query import com.sksamuel.exts.OptionImplicits._ case class TermsQuery[T](field: String, values: Iterable[T], boost: Option[Do...
Tecsisa/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/searches/queries/term/TermsQuery.scala
Scala
apache-2.0
1,289
package pl.suder.scala.auctionHouse import akka.actor._ import akka.testkit.{ TestProbe, ImplicitSender, TestActorRef, TestKit } import org.scalatest.{ Matchers, OneInstancePerTest, WordSpecLike } import pl.suder.scala.auctionHouse._ import pl.suder.scala.auctionHouse.Message._ import scala.concurrent.duration.`packag...
Materix/Sem7-Scala
src/main/test/pl/suder/scala/auctionHouse/AuctionTest.scala
Scala
mit
2,581
/* * 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 ...
jasonpet/openwhisk
tests/src/test/scala/org/apache/openwhisk/core/entity/test/ExecManifestTests.scala
Scala
apache-2.0
15,639
package org.jetbrains.plugins.scala package codeInspection.collections import java.awt.{Component, GridLayout} import java.util import com.intellij.codeInspection.{ProblemHighlightType, ProblemsHolder} import com.intellij.openapi.ui.{InputValidator, Messages} import com.intellij.openapi.wm.IdeFocusManager import com....
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/codeInspection/collections/OperationOnCollectionInspectionBase.scala
Scala
apache-2.0
7,563
package com.twitter.finagle.mux.transport import io.netty.channel.{ChannelHandler, ChannelPipeline} import io.netty.handler.codec.{LengthFieldBasedFrameDecoder, LengthFieldPrepender} private[transport] object Netty4Framer { val MaxFrameLength = 0x7FFFFFFF val LengthFieldOffset = 0 val LengthFieldLength = 4 va...
luciferous/finagle
finagle-mux/src/main/scala/com/twitter/finagle/mux/transport/Netty4Framer.scala
Scala
apache-2.0
1,092
/*********************************************************************** * 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...
ccri/geomesa
geomesa-index-api/src/main/scala/org/locationtech/geomesa/index/conf/ColumnGroups.scala
Scala
apache-2.0
6,304
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/ct-calculations
src/main/scala/uk/gov/hmrc/ct/computations/CP671.scala
Scala
apache-2.0
909
package controllers import io.apibuilder.api.v0.models.json._ import io.apibuilder.api.v0.models.Domain import db.{MembershipsDao, OrganizationDomainsDao, OrganizationsDao} import javax.inject.{Inject, Singleton} import lib.Validation import play.api.mvc._ import play.api.libs.json._ @Singleton class Domains @Inject...
gheine/apidoc
api/app/controllers/Domains.scala
Scala
mit
1,721
package org.dsa.iot.rx.core import org.dsa.iot.rx.RxMerger2 /** * First emits the items emitted by the first source, and then the items emitted by the second. * * <img width="640" height="380" src="https://raw.githubusercontent.com/wiki/ReactiveX/RxJava/images/rx-operators/concat.png" alt="" /> */ class Concat[T...
IOT-DSA/dslink-scala-ignition
src/main/scala/org/dsa/iot/rx/core/Concat.scala
Scala
apache-2.0
560
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-fs/geomesa-fs-storage/geomesa-fs-storage-parquet/src/main/scala/org/locationtech/geomesa/parquet/package.scala
Scala
apache-2.0
3,700
package scalamachine.core.tests import org.specs2._ import mock._ import org.mockito.{Matchers => MM} import scalamachine.core._ import Resource._ import v3.WebmachineDecisions import HTTPHeaders._ import HTTPMethods._ class V3ColGSpecs extends Specification with Mockito with SpecsHelper with WebmachineDecisions { d...
stackmob/scalamachine
core/src/test/scala/scalamachine/core/tests/V3ColGSpecs.scala
Scala
apache-2.0
15,062
package org.scalatra import test.scalatest.ScalatraFunSuite class GetResponseStatusSupportTestServlet extends ScalatraServlet { before() { session // Establish a session before we commit the response } after() { session("status") = status.toString } get("/status/:status") { response.setStatus(...
louk/scalatra
core/src/test/scala/org/scalatra/GetResponseStatusSupportTest.scala
Scala
bsd-2-clause
1,458
/*********************************************************************** * Copyright (c) 2013-2017 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...
ronq/geomesa
geomesa-web/geomesa-web-core/src/main/scala/org/locationtech/geomesa/web/core/PathHandlingServletRequest.scala
Scala
apache-2.0
1,374
/* * Copyright 2006 - 2013 * Stefan Balev <stefan.balev@graphstream-project.org> * Julien Baudry <julien.baudry@graphstream-project.org> * Antoine Dutot <antoine.dutot@graphstream-project.org> * Yoann Pigné <yoann.pigne@graphstream-project.org> * Guilhelm Savin <guilhelm.savin...
prismsoul/gedgraph
sources/prismsoul.genealogy.gedgraph/gs-ui/org/graphstream/ui/j2dviewer/renderer/test/TestSpeed.scala
Scala
gpl-2.0
2,709
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * 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 * * https://www.apache.org/licenses/LICENSE...
adarro/ddo-calc
subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/feats/SmallSizeBonus.scala
Scala
apache-2.0
1,261
/* * Distributed as part of the Stanford Topic Modeling Toolbox. * Copyright (c) 2009- The Board of Trustees of the Leland * Stanford Junior University. * * 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 Softw...
quhfus/DoSeR
Stanford Topic Model/src/main/scala/edu/stanford/nlp/tmt/learn/Sharded.scala
Scala
gpl-2.0
6,560
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/play-async
src/main/scala/uk/gov/hmrc/play/asyncmvc/async/SessionHandler.scala
Scala
apache-2.0
2,096
package com.hashmapinc.tempus import org.specs._ import org.specs.runner.{ConsoleRunner, JUnit4} // //class MySpecTest extends JUnit4(MySpec) ////class MySpecSuite extends ScalaTestSuite(MySpec) //object MySpecRunner extends ConsoleRunner(MySpec) // //object MySpec extends Specification { // "This wonderful system" s...
hashmapinc/witsml-client
src/examples/scala/src/test/scala/com/hashmapinc/tempus/MySpec.scala
Scala
apache-2.0
423
/* * 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 ...
tzulitai/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/utils/ColumnIntervalUtilTest.scala
Scala
apache-2.0
7,276
package edu.umass.ciir.kbbridge.data import collection.mutable.HashMap import edu.umass.ciir.kbbridge.util.ConfInfo /** * */ object TacId2WikiTitleMap { private val f = io.Source.fromFile(ConfInfo.idmap) private val wikiId2TacId = new HashMap[Int, String]() private val tacId2wikiId = new HashMap[ String, In...
daltonj/KbBridge
src/main/scala/edu/umass/ciir/kbbridge/data/TacId2WikiTitleMap.scala
Scala
apache-2.0
1,628
object ReturnWithMutation { case class Counter(var x: BigInt) def increment(c: Counter): BigInt = { if (c.x == 100) { c.x += 1 return c.x c.x += 1 0 } else { c.x += 1 c.x += 2 c.x } } def test: Unit = { val c = Counter(100) val x1 = increment(c) ...
epfl-lara/stainless
frontends/benchmarks/imperative/valid/ReturnWithMutation.scala
Scala
apache-2.0
417
import ingredients.caseenum._ import org.scalatest.{ Matchers, WordSpec } class CaseEnumSpec extends WordSpec with Matchers { sealed trait Planet extends CaseEnum object Planet { case object Mercury extends Planet case object Venus extends Planet case object Earth extends Planet } "CaseEnumMacro"...
buildo/ingredients
caseenum/src/test/scala/CaseEnumSpec.scala
Scala
mit
1,743
/* * Copyright 2016 Nikolay Smelik * * 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 ...
kerzok/ScalaBot
Examples/src/main/scala/scalabot/examples/teamnotification/conversations/SickConversationProvider.scala
Scala
apache-2.0
3,021
/** * 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...
timve/gatling
gatling-core/src/main/scala/io/gatling/core/body/Pebble.scala
Scala
apache-2.0
3,097
/** * * HttpClient * Ledger wallet * * Created by Pierre Pollastri on 27/01/15. * * The MIT License (MIT) * * Copyright (c) 2015 Ledger * * 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 S...
Morveus/ledger-wallet-android
app/src/main/scala/com/ledger/ledgerwallet/remote/HttpClient.scala
Scala
mit
13,203
package org.jetbrains.plugins.scala package lang package actions package editor package enter import com.intellij.openapi.project.Project import org.jetbrains.plugins.scala.lang.actions.editor.enter.ChainedMethodCallEnterTest.DATA_PATH import org.junit.runner.RunWith import org.junit.runners.AllTests @RunWith(classOf...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/actions/editor/enter/ChainedMethodCallEnterTest.scala
Scala
apache-2.0
811
package fs2 object concurrent { /** * Nondeterministically merges a stream of streams (`outer`) in to a single stream, * opening at most `maxOpen` streams at any point in time. * * The outer stream is evaluated and each resulting inner stream is run concurrently, * up to `maxOpen` stream. Once ...
japgolly/scalaz-stream
core/src/main/scala/fs2/concurrent.scala
Scala
mit
3,836
package riftwarp.serialization.common import scalaz._, Scalaz._ import scalaz.Validation.FlatMap._ import almhirt.common._ import almhirt.tracking.CommandStatusChanged import riftwarp._ import riftwarp.std.kit._ import riftwarp.std.WarpObjectLookUp object CommandStatusChangedWarpPackaging extends EventWarpPackagingTe...
chridou/almhirt
riftwarp/src/main/scala/riftwarp/serialization/common/CommandStatusChangedWarpPackaging.scala
Scala
apache-2.0
1,206
package com.theseventhsense.datetime import cats.implicits._ import com.theseventhsense.utils.types.SSDateTime.{Instant, TimeZone} /** * Created by erik on 6/15/16. */ class MomentRichTimeZone(timeZone: TimeZone) extends AbstractRichTimeZone(timeZone) { override def valid: Boolean = false override def of...
7thsense/utils-datetime
js/src/main/scala/com/theseventhsense/datetime/MomentRichTimeZone.scala
Scala
mit
557
import sbt._ import Keys._ import PlayProject._ object ApplicationBuild extends Build { val appName = "Cima" val appVersion = "1.0" val appDependencies = Seq( // Add your project dependencies here, "net.databinder" %% "dispatch-http" % "0.8.8" withSources, "com.google.code....
niklassaers/Cima
project/Build.scala
Scala
apache-2.0
584
/* * Copyright (C) 2013 Alcatel-Lucent. * * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * Licensed to you 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 cop...
molecule-labs/molecule
molecule-benchmarks/src/main/scala/molecule/benchmarks/comparison/molecule/executors/TrampolineFJExecutorLog.scala
Scala
apache-2.0
4,115
/** * Copyright (C) 2011 Orbeon, Inc. * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. * * This program i...
orbeon/orbeon-forms
xforms/jvm/src/test/scala/org/orbeon/oxf/xforms/analysis/ItemsetDependenciesTest.scala
Scala
lgpl-2.1
2,978
import sbt._ import Keys._ object BuildSettings { val paradiseVersion = "2.0.0" val buildSettings = Defaults.defaultSettings ++ Seq( organization := "us.insolit", version := "0.1-SNAPSHOT", scalacOptions ++= Seq("-feature", "-unchecked", "-deprecation"), //, "-Ymacro-debug-lite"), scalaVersion := "...
jmgao/freeze
project/Build.scala
Scala
mit
1,644
package chandu0101.scalajs.react.components package materialui import chandu0101.macros.tojs.JSMacro import japgolly.scalajs.react._ import japgolly.scalajs.react.raw.React import japgolly.scalajs.react.vdom.VdomNode import org.scalajs.dom import scala.scalajs.js import scala.scalajs.js.`|` /** * This file is gene...
rleibman/scalajs-react-components
core/src/main/scala/chandu0101/scalajs/react/components/materialui/MuiStep.scala
Scala
apache-2.0
1,612
package controllers import play.api.Logger import play.api.data.Form import play.api.data.Forms._ import play.api.i18n.Messages import play.api.mvc._ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import scala.util.control.NonFatal class PasswordReset extends AbstractCaveCon...
gilt/cave
www/app/controllers/PasswordReset.scala
Scala
mit
2,543
package model import skinny.orm._, feature._ import scalikejdbc._ import org.joda.time._ case class LoginUserAppendix( loginUserInfoId: Long, sortNum: Long ) object LoginUserAppendix extends SkinnyCRUDMapper[LoginUserAppendix] { override lazy val tableName = "login_user_appendix" override lazy val defaultAli...
nemuzuka/vss-kanban
src/main/scala/model/LoginUserAppendix.scala
Scala
mit
1,564
package actors case class ChatMessage(name:String,text: String) case class Stats(users:Set[String]) object JoinChatRoom object Tick object GetStats
tnddn/iv-web
portal/rest-portal/app/actors/ChatProtocol.scala
Scala
apache-2.0
150
/* * Copyright (c) 2017 Magomed Abdurakhmanov, Hypertino * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * */ package com.hypertino.hyperbus.util trait IdGenerat...
hypertino/hyperbus
hyperbus/src/main/scala/com/hypertino/hyperbus/util/IdGeneratorBase.scala
Scala
mpl-2.0
734
package scalaxy.json.json4s.base import scalaxy.json.base._ import scala.util.control.NonFatal import scala.language.experimental.macros import scala.reflect.macros.blackbox.Context trait JSONStringInterpolationMacros extends JsonDriverMacros { def parse(str: String, useBigDecimalForDouble: Boolean = false): JSONV...
nativelibs4java/Scalaxy
JSON/Json4s/Core/src/main/scala/scalaxy/json/base/implementation/JSONStringInterpolationMacros.scala
Scala
bsd-3-clause
1,834
/* * 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 ...
steveloughran/spark-timeline-integration
yarn-timeline-history/src/test/scala/org/apache/spark/deploy/history/yarn/failures/WebsiteDiagnosticsSuite.scala
Scala
apache-2.0
3,943
/* * 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 ...
sh-cho/cshSpark
partial/GroupedCountEvaluator.scala
Scala
apache-2.0
2,011
/* * 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 ...
tillrohrmann/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/api/TableEnvironmentITCase.scala
Scala
apache-2.0
34,162
/* * Copyright 2016 David Russell * * 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...
onetapbeyond/lambda-spark-executor
examples/scala/rest-integration/src/main/scala/io/onetapbeyond/lambda/spark/executor/examples/RESTIntegration.scala
Scala
apache-2.0
2,853
package org.cakesolutions.akkapatterns.main import akka.actor.{Props, ActorSystem} import com.aphelia.amqp.{ChannelOwner, ConnectionOwner} import com.aphelia.amqp.Amqp._ import akka.util.Timeout import com.rabbitmq.client.{DefaultConsumer, Channel, Envelope, ConnectionFactory} import com.rabbitmq.client.AMQP.BasicProp...
anand-singh/akka-patterns
sbt/src/main/scala/org/cakesolutions/akkapatterns/main/ClientDemo.scala
Scala
apache-2.0
3,747
object test4 { abstract class SeqFactory[CC[X]] { def unapplySeq[A](x : Seq[A]) : scala.Some[Seq[A]] = null } object SeqExtractor extends SeqFactory[Seq] val ss: Seq[String] = null ss match { case SeqExtractor(a) => /*start*/a/*end*/ } } //String
LPTK/intellij-scala
testdata/typeInference/bugs4/SCL2731D.scala
Scala
apache-2.0
266
package org.scalatra package test package specs2 import javax.servlet.http.{HttpServlet, HttpServletRequest, HttpServletResponse} class ScalatraSpecSpec extends ScalatraSpec { def is = s2""" get / should return 'Hello, world.' $e1 """ // scalatra-specs2 does not depend on Scalatra, so we'll create our own // s...
etorreborre/scalatra
specs2/src/test/scala/org/scalatra/test/specs2/ScalatraSpecSpec.scala
Scala
bsd-2-clause
582
/* * 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 ...
pronix/spark
streaming/src/main/scala/org/apache/spark/streaming/api/java/JavaPairInputDStream.scala
Scala
apache-2.0
1,694
/* * 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/Communication/src/main/scala/com/openlobby/communication/CommunicationServiceImpl.scala
Scala
apache-2.0
3,879
import org.junit.runner.RunWith import org.specs2._ @RunWith(classOf[org.specs2.runner.JUnitRunner]) class B extends Specification { // sequential=true is necessary to get junit in the call stack // otherwise, junit calls specs, which then runs tests on separate threads def is = args(sequential=true) ^ s2""" ...
pdalpra/sbt
sbt/src/sbt-test/tests/one-class-multi-framework/src/test/scala/Test.scala
Scala
bsd-3-clause
830
package com.boxpizza.actors import akka.actor.{Actor, ActorLogging, ActorRef, Props} import spray.json.DefaultJsonProtocol._ object WaiterActor { case class Cost(pizza: String, cost: Double, client: ActorRef) case class Bill(pizza: String, bill: Double) object Bill { implicit val goJson = jsonFormat2(Bill...
codepr/boxpizza
src/main/scala/com/boxpizza/actors/WaiterActor.scala
Scala
mit
695
package mesosphere.marathon package core.appinfo import mesosphere.marathon.raml.PodStatus import mesosphere.marathon.state.PathId import scala.concurrent.Future trait PodStatusService { /** * @return the status of the pod at the given path, if such a pod exists */ def selectPodStatus(id: PathId, select...
gsantovena/marathon
src/main/scala/mesosphere/marathon/core/appinfo/PodStatusService.scala
Scala
apache-2.0
576
package au.com.nicta package postmark package sending import org.scalacheck.{Choose, Gen, Arbitrary}, Arbitrary.arbitrary, Gen._ import scalaz._, std.option._, syntax.show._, syntax.apply._, scalacheck.ScalaCheckBinding._ import org.joda.time.DateTime import au.com.nicta.test.BasicArbitraries import au.com.nicta.postm...
NICTA/postmarkapp-client
src/test/scala/au/com/nicta/postmark/sending/PostmarkArbitraries.scala
Scala
bsd-3-clause
2,151
package at.forsyte.apalache.tla.pp.passes import at.forsyte.apalache.infra.passes.{Pass, TlaModuleMixin} /** * An optimization pass that applies to KerA+. * * @author Igor Konnov */ trait OptPass extends Pass with TlaModuleMixin
konnov/dach
tla-pp/src/main/scala/at/forsyte/apalache/tla/pp/passes/OptPass.scala
Scala
apache-2.0
239
/* * 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 ...
apache-spark-on-k8s/spark
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/submitsteps/hadoopsteps/HadoopStepsOrchestrator.scala
Scala
apache-2.0
4,316
/* * 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 ...
Dax1n/spark-core
core/src/test/scala/org/apache/spark/ImplicitOrderingSuite.scala
Scala
apache-2.0
3,959
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala.reflect.reify pa...
lrytz/scala
src/compiler/scala/reflect/reify/codegen/GenNames.scala
Scala
apache-2.0
557