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 2015 Mohiva Organisation (license at mohiva 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 * * Unless req...
mohiva/play-silhouette
silhouette/test/com/mohiva/play/silhouette/api/actions/SecuredActionSpec.scala
Scala
apache-2.0
34,087
/* * Copyright 2019 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-schemas/src/main/scala/com/spotify/scio/avro/AvroUtils.scala
Scala
apache-2.0
2,167
package com.programmaticallyspeaking.ncd.nashorn import com.programmaticallyspeaking.ncd.host.{Script, ScriptLocation} import com.sun.jdi.Location import com.sun.jdi.request.{BreakpointRequest, EventRequest, EventRequestManager} object BreakableLocation { private def scriptLocationFromScriptAndLocation(script: Scri...
provegard/ncdbg
src/main/scala/com/programmaticallyspeaking/ncd/nashorn/BreakableLocation.scala
Scala
bsd-3-clause
1,388
package com.datamountaineer.streamreactor.connect.cassandra.source import java.net.InetAddress import java.nio.ByteBuffer import java.util.UUID import com.datamountaineer.streamreactor.connect.cassandra.TestConfig import com.datamountaineer.streamreactor.connect.cassandra.config.{CassandraConfigConstants, CassandraCo...
datamountaineer/stream-reactor
kafka-connect-cassandra/src/test/scala/com/datamountaineer/streamreactor/connect/cassandra/source/TestCassandraTypeConverter.scala
Scala
apache-2.0
12,192
package no.netcompany.testdatagen.aggreg // Copyright (C) 2014 Lars Reed -- GNU GPL 2.0 -- see LICENSE.txt import no.netcompany.testdatagen.{GeneratorImpl, Generator} import no.netcompany.testdatagen.generators.FromList /** * This generator takes one generator and a generator function as input; it draws values from...
lre-mesan/testdata
src/main/scala/no/netcompany/testdatagen/aggreg/TwoFromFunction.scala
Scala
gpl-2.0
1,729
package ru.maizy.ambient7.mt8057agent /** * Copyright (c) Nikita Kovaliov, maizy.ru, 2015-2017 * See LICENSE.txt for details. */ import scala.util.{ Failure, Success, Try } import scalaj.http.{ BaseHttp, HttpOptions, HttpRequest, HttpResponse } import com.typesafe.scalalogging.LazyLogging import ru.maizy.ambient7....
maizy/ambient7
mt8057-agent/src/main/scala/ru/maizy/ambient7/mt8057agent/InfluxDbWriter.scala
Scala
apache-2.0
3,211
package org.ensime.client import akka.actor.ActorSystem import ammonite.ops._ import org.ensime.api.SourceFileInfo import org.slf4j.LoggerFactory object EnsimeClientTestMain { val logger = LoggerFactory.getLogger("EnsimeClientTestMain") import EnsimeClientHelper._ def main(args: Array[String]): Unit = { ...
rorygraves/ensime-client
src/main/scala/org/ensime/client/EnsimeClientTestMain.scala
Scala
apache-2.0
1,687
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.core.server.common import java.net.{ Inet4Address, Inet6Address, InetAddress } import com.google.common.net.InetAddresses import play.core.server.common.ForwardedHeaderHandler.{ ForwardedHeaderVersion, Rfc7239, Xforwarded } impo...
Shruti9520/playframework
framework/src/play-server/src/main/scala/play/core/server/common/NodeIdentifierParser.scala
Scala
apache-2.0
2,894
//A fatal error or Scala compiler // Scala compiler version 2.7.1-final -- (c) 2002-2011 LAMP/EPFL // Carlos Loria [email protected] // 7/10/2008 class A { var name:String = compiletime.uninitialized def getName() = name def this(name:String, age:Int) = {this(); this.name = name} } class B(name:String) ext...
dotty-staging/dotty
tests/pos/t1035.scala
Scala
apache-2.0
583
package scala.meta.converter import scala.meta.TreeConverterTestBaseNoLibrary import scala.meta._ class TreeConverterDeclTest extends TreeConverterTestBaseNoLibrary { def testVal(): Unit = { doTest( "val x,y: Int", Decl.Val(Nil, List(Pat.Var(Term.Name("x")), Pat.Var(Term.Name("y"))), Type.Name("In...
JetBrains/intellij-scala
scala/scala-impl/test/scala/meta/converter/TreeConverterDeclTest.scala
Scala
apache-2.0
4,913
package ca.uwo.eng.sel.cepsim.gen import scala.concurrent.duration.Duration /** UniformIncreaseGenerator companion object. */ object UniformIncreaseGenerator { def apply(increaseDuration: Duration, maxRate: Double) = new UniformIncreaseGenerator(increaseDuration, maxRate) } /** * Event generator in which the gene...
virsox/cepsim
cepsim-core/src/main/scala/ca/uwo/eng/sel/cepsim/gen/UniformIncreaseGenerator.scala
Scala
mit
3,877
package argonaut /** * Utility for building the argonaut API over * various types. This is used to implement * StringWrap, and it is expected that it would * be used by integrations with other toolkits * to provide an argonaut API on their types. */ class ParseWrap[A](value: A, parser: Parse[A]) { /** * Par...
jedws/argonaut
argonaut/src/main/scala/argonaut/ParseWrap.scala
Scala
bsd-3-clause
3,721
/* * 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 ...
wgpshashank/spark
core/src/hadoop2/scala/org/apache/hadoop/mapreduce/HadoopMapReduceUtil.scala
Scala
apache-2.0
1,384
package org.littlewings.infinispan.distiterator import java.util.Map import org.infinispan.Cache import org.infinispan.commons.util.CloseableIterator import org.infinispan.manager.DefaultCacheManager import org.infinispan.util.function.{SerializableConsumer, SerializableFunction} import org.scalatest.{FunSuite, Match...
kazuhira-r/infinispan-getting-started
embedded-distributed-iterator/src/test/scala/org/littlewings/infinispan/distiterator/DistributedIteratorSuite.scala
Scala
mit
3,621
class Constructor { def <caret>this(i: Int) { this() } val c = new Constructor(1) } class ConstructorChild extends Constructor(0)
ilinum/intellij-scala
testdata/changeSignature/fromScala/SecConstructor.scala
Scala
apache-2.0
142
/** * Copyright 2011-2012 @WalmartLabs, a division of Wal-Mart Stores, 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 * * Unl...
walmartlabs/mupd8
src/test/scala/com/walmartlabs/mupd8/AppInfoTest.scala
Scala
apache-2.0
1,428
/* * 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 ...
ZxlAaron/mypros
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveExplainSuite.scala
Scala
apache-2.0
4,622
package com.typesafe.slick.testkit.tests import com.typesafe.slick.testkit.util.{RelationalTestDB, AsyncTest} class CountTest extends AsyncTest[RelationalTestDB] { import tdb.profile.api._ def testSimple = { class TestTable(tag: Tag) extends Table[Int](tag, "TEST") { def id = column[Int]("ID") de...
jkutner/slick
slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/CountTest.scala
Scala
bsd-2-clause
3,506
import play.api.http.HttpFilters import play.filters.csrf.CSRFFilter import javax.inject.Inject class Filters @Inject() (csrfFilter: CSRFFilter) extends HttpFilters { def filters = Seq(csrfFilter) }
adrianhurt/play-bootstrap3
play26-bootstrap4/sample/app/Filters.scala
Scala
apache-2.0
201
package gov.wicourts.json.formlet import argonaut.Json import argonaut.ArgonautScalaz._ import scalaz.{Equal, Monoid} import scalaz.std.list._ import scalaz.std.string._ import scalaz.std.tuple._ import scalaz.syntax.equal._ sealed trait JsonBuilder { def toJson: Json } class JsonArrayBuilder private [formlet] (p...
ccap/json-formlets
src/main/scala/gov/wicourts/json/formlet/JsonBuilder.scala
Scala
mit
1,729
package com.andy import javax.ws.rs.{GET, Path, Produces} import javax.ws.rs.core.MediaType @Path("/bonjour") class BonjourResource { @GET @Produces(Array[String](MediaType.TEXT_PLAIN)) def hello() = "Hello RESTEasy" }
quarkusio/quarkus
independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/QuarkusCodestartGenerationTest/generateRESTEasyScalaCustom/src_main_scala_com_andy_BonjourResource.scala
Scala
apache-2.0
233
/* * ****************************************************************************** * Copyright 2012-2013 SpotRight * * 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 * * ...
SpotRight/Polidoro
src/main/scala/com/spotright/polidoro/modelish/ColumnPathish.scala
Scala
apache-2.0
940
/* * 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 ...
sgururajshetty/carbondata
integration/spark2/src/main/scala/org/apache/carbondata/spark/rdd/AggregateDataMapCompactor.scala
Scala
apache-2.0
7,253
package project_euler /* * Problem 1 * If we list all the natural numbers below 10 that are multiples of 3 or 5, * we get 3, 5, 6 and 9. * The sum of these multiples is 23. * Find the sum of all the multiples of 3 or 5 below 1000. * */ object Problem_1 {;import org.scalaide.worksheet.runtime.library.WorksheetS...
firephil/scala-math-problems
.worksheet/src/project_euler.Problem_1.scala
Scala
mit
1,528
/* * Copyright (c) 2014-2015 by its authors. Some rights reserved. * See the project homepage at: http://www.monifu.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://...
virtualirfan/monifu
monifu/shared/src/test/scala/monifu/reactive/observers/BufferClearBufferThenSignalSuite.scala
Scala
apache-2.0
8,378
package com.linkedin.norbert /* * Copyright 2009-2010 LinkedIn, 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 require...
linkedin/norbert
cluster/src/main/scala/com/linkedin/norbert/norbertutils/package.scala
Scala
apache-2.0
3,172
package ipfix.actors import akka.actor.{ActorRef, Terminated} import akka.routing.Router trait BaseRouter extends BaseActor { var router: Router def terminate: Receive = { case Terminated(a) => remRoutee(a) } def addRoutee(a: ActorRef): Unit = { log.info(s"adding routee: $a") router = router.add...
ConnorDillon/ipfix
src/main/scala/ipfix/actors/BaseRouter.scala
Scala
gpl-3.0
473
/* sbt -- Simple Build Tool * Copyright 2010 Mark Harrah */ package sbt import Relation._ object Relation { /** Constructs a new immutable, finite relation that is initially empty. */ def empty[A,B]: Relation[A,B] = make(Map.empty, Map.empty) def make[A,B](forward: Map[A,Set[B]], reverse: Map[B, Set[A]]): Rela...
jamesward/xsbt
util/relation/Relation.scala
Scala
bsd-3-clause
4,581
package spark.storage import java.nio.ByteBuffer import scala.collection.mutable.StringBuilder import scala.collection.mutable.ArrayBuffer import spark._ import spark.network._ private[spark] class BlockMessageArray(var blockMessages: Seq[BlockMessage]) extends Seq[BlockMessage] with Logging { def this(bm: Blo...
koeninger/spark
core/src/main/scala/spark/storage/BlockMessageArray.scala
Scala
bsd-3-clause
4,222
/* * Ported from https://github.com/hamcrest/JavaHamcrest/ */ package org.hamcrest.core import org.hamcrest.BaseMatcher import org.hamcrest.Description import org.hamcrest.Matcher import org.hamcrest.core.IsEqual.equalTo class IsNot[T](matcher: Matcher[T]) extends BaseMatcher[T] { override def matches(arg: AnyRe...
nicolasstucki/scala-js-junit
runtime/src/main/scala/org/hamcrest/core/IsNot.scala
Scala
bsd-3-clause
641
/* * Copyright (c) 2014-2018 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
Wogan/monix
monix-reactive/shared/src/test/scala/monix/reactive/subjects/BaseSubjectSuite.scala
Scala
apache-2.0
6,508
package linguistic import scala.annotation.tailrec import scala.collection.JavaConverters._ import scala.collection.mutable import scala.collection.mutable.ListBuffer //https://github.com/mauricio/scala-sandbox/blob/master/src/main/scala/trie/Trie.scala package object trie { object Trie { def apply(): Trie = n...
haghard/linguistic
server/src/main/scala/linguistic/trie/package.scala
Scala
apache-2.0
4,263
/* * Copyright 2015 Webtrends (http://www.webtrends.com) * * See the LICENCE.txt 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 compliance with the License. * Yo...
mjwallin1/wookiee-zookeeper
src/main/scala/com/webtrends/harness/component/zookeeper/Zookeeper.scala
Scala
apache-2.0
1,624
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
chuckchen/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCTable.scala
Scala
apache-2.0
2,194
package atto import Atto._ import scala.util.Random import org.scalacheck._ import scalaz.\\/._ object CharacterTest extends Properties("Character") { import Prop._ import Parser._ property("satisfy") = forAll { (w: Char, s: String) => satisfy(_ <= w).parse(w +: s).option == Some(w) } property("oneOf...
coltfred/atto
core/src/test/scala/atto/CharacterTest.scala
Scala
mit
1,734
package com.twitter.finagle.http.netty4 import com.twitter.conversions.DurationOps._ import com.twitter.finagle.http.Cookie import com.twitter.finagle.http.CookieCodec import com.twitter.finagle.http.CookieMap import com.twitter.finagle.http.cookie.SameSiteCodec import io.netty.handler.codec.http.cookie.{ClientCookieD...
twitter/finagle
finagle-base-http/src/main/scala/com/twitter/finagle/http/netty4/Netty4CookieCodec.scala
Scala
apache-2.0
3,655
package pcf.pcl import scala.collection.mutable.ListBuffer import pcf.pcl._ import org.slf4j.LoggerFactory import org.scalatest.FunSuite class PCLParserTestSpec extends FunSuite { val logger = LoggerFactory.getLogger(getClass()) test("test1") { val input = "constraint test1\\n" + "context t1:Task1, t2...
shasha-amy-liu/process-constraint-framework
pcf/src/test/scala/pcf/pcl/PCLParserTest.scala
Scala
mit
7,397
/** * Copyright (C) 2017 Orbeon, Inc. * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. * * This program i...
brunobuzzi/orbeon-forms
form-builder/js/src/main/scala/org/orbeon/builder/Position.scala
Scala
lgpl-2.1
6,115
package lila.lobby import chess.{ Mode, Clock, Speed } import org.joda.time.DateTime import ornicar.scalalib.Random import play.api.libs.json._ import actorApi.LobbyUser import lila.game.PerfPicker import lila.rating.RatingRange import lila.user.{ User, Perfs } // correspondence chess, persistent case class Seek( ...
Happy0/lila
modules/lobby/src/main/Seek.scala
Scala
mit
2,837
package pl.newicom.dddd.aggregate import pl.newicom.dddd.aggregate.error.DomainException import pl.newicom.dddd.office.{LocalOfficeId, OfficeListener} import pl.newicom.dddd.utils.ImplicitUtils._ import scala.concurrent.duration.FiniteDuration object AggregateRootSupport { sealed trait AbstractReaction[+R] sea...
pawelkaczor/akka-ddd
akka-ddd-core/src/main/scala/pl/newicom/dddd/aggregate/AggregateRootSupport.scala
Scala
mit
3,327
/* * 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 ...
minixalpha/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/LocalTableScanExec.scala
Scala
apache-2.0
2,460
object HelloWorld{ /* Impure program */ def hello(): Unit = println("Hello, world!") /* Functional solution */ object Fun{ // Effect language type IOProgram = Write case class Write(msg: String) // Program def pureHello(): IOProgram = Write("Hello, world!") // Inte...
jserranohidalgo/hellomonad
src/main/scala/proposal1/Step1-HelloWorld.scala
Scala
apache-2.0
508
/** * Various functions we will test. */ package object props { /** Advanced encryption function. */ def rot13(s: String): String = s map { case c if 'a' <= c.toLower && c.toLower <= 'm' => c + 13 toChar case c if 'n' <= c.toLower && c.toLower <= 'z' => c - 13 toChar case c => c } /** Just the l...
jastice/proptests
src/main/scala/props/package.scala
Scala
bsd-2-clause
3,863
package maliki import upickle.default._ import org.scalajs.jquery.{jQuery, JQuery} object Parse { def jsToScala(ns: List[js.Node]): List[interface.Node] = { (for(n <- ns) yield Parse(n)) toList } def scalaToJs(ns: List[interface.Node]): List[js.Node] = { (for(n <- ns) yield Parse(n)) toList } /* Java...
jamesreinke/Lola-Beta
src/main/scala/Parser.scala
Scala
mit
2,485
/* Copyright 2013 Stephen K Samuel 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...
carlosFattor/scrimage
scrimage-filters/src/main/scala/com/sksamuel/scrimage/filter/SepiaFilter.scala
Scala
apache-2.0
778
/* * 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 ...
goldmedal/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/stat/FrequentItems.scala
Scala
apache-2.0
4,611
import sounder.Sounder._ import sounder.Util._ import scala.math.sin import scala.math.min import scala.math.max import scala.math.floor import scala.math.ceil import scala.math.Pi print("Plug in the multiplier circuit and press ENTER") System.in.read println("Playing signal for 2 seconds and recording input") val f...
robbymckilliam/testablelinearsystems
tests/multiplier/multiplier.scala
Scala
agpl-3.0
1,662
/* * Copyright 2014–2017 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
drostron/quasar
core/src/test/scala/quasar/fs/mount/MountingsConfigArbitrary.scala
Scala
apache-2.0
1,449
package de.choffmeister.microserviceutils.auth import java.time.Instant import akka.http.scaladsl.model._ import akka.http.scaladsl.model.headers._ import akka.http.scaladsl.server.Directives._ import akka.http.scaladsl.server.{Directive1, Route, StandardRoute} import akka.http.scaladsl.testkit.ScalatestRouteTest imp...
choffmeister/microservice-utils
microservice-utils-auth/src/test/scala/de/choffmeister/microserviceutils/auth/CookieAuthProviderTest.scala
Scala
mit
15,677
/* * 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 ...
rjpower/spark
bagel/src/main/scala/spark/bagel/Bagel.scala
Scala
apache-2.0
10,855
package com.twitter.concurrent import com.twitter.conversions.time._ import com.twitter.io.{Buf, Reader} import com.twitter.util._ import org.junit.runner.RunWith import org.scalacheck.{Arbitrary, Gen} import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import org.scalatest.prop.GeneratorDrivenPropert...
folone/util
util-core/src/test/scala/com/twitter/concurrent/AsyncStreamTest.scala
Scala
apache-2.0
21,811
/* 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 versio...
icambridge-old/asib
src/test/scala/asib/mocks/util/connector/MockIrcConnector.scala
Scala
gpl-3.0
1,015
package index.annotations import com.spatial4j.core.distance.DistanceUtils import com.spatial4j.core.shape.Rectangle import com.spatial4j.core.shape.impl.RectangleImpl import com.vividsolutions.jts.geom.Coordinate import global.Global import index.{ Heatmap, Index, IndexBase, IndexFields, SearchParameters } import ind...
pelagios/peripleo
app/index/annotations/AnnotationReader.scala
Scala
gpl-3.0
8,593
package java package lang import scala.scalajs.js object Math { final val E = 2.718281828459045 final val PI = 3.141592653589793 @inline def abs(a: scala.Int): scala.Int = if (a < 0) -a else a @inline def abs(a: scala.Long): scala.Long = if (a < 0) -a else a @inline def abs(a: scala.Float): scala.Float = ...
CapeSepias/scala-js
javalanglib/src/main/scala/java/lang/Math.scala
Scala
bsd-3-clause
7,041
/* * 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 ...
witgo/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Corr.scala
Scala
apache-2.0
4,771
package net.room271 object ScalaSchool extends App { println("Welcome to Scala School!") }
nicl/scala-school
src/main/scala/net/room271/ScalaSchool.scala
Scala
gpl-3.0
94
package monocle.law import monocle.Prism import org.scalacheck.Prop._ import org.scalacheck.{Arbitrary, Properties} import scalaz.Equal import scalaz.Id._ import scalaz.std.option._ import scalaz.syntax.equal._ object PrismLaws { def apply[S: Arbitrary: Equal, A: Arbitrary: Equal](prism: Prism[S, A]) = new Proper...
CapeSepias/Monocle
law/src/main/scala/monocle/law/PrismLaws.scala
Scala
mit
1,332
package peschke.console.progressbar import java.io.PrintStream import java.util.concurrent.{ConcurrentHashMap, LinkedBlockingQueue} import peschke.{Complete => CompletedUpdate} import peschke.console.progressbar.Command._ import scala.annotation.tailrec import scala.concurrent.{ExecutionContext, Future, Promise} imp...
morgen-peschke/scala-progress-bar
src/main/scala/peschke/console/progressbar/ProgressBar.scala
Scala
mit
5,750
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
hequn8128/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/api/stream/table/CalcTest.scala
Scala
apache-2.0
8,354
/* * Copyright 2014 Databricks * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
tresata-opensource/spark-avro
src/test/scala/com/databricks/spark/avro/TestUtils.scala
Scala
apache-2.0
4,641
package eu.shiftforward.J1 class j1cpu(program: Seq[Short], ramSize: Int = 65536, stackSize: Int = 32) { def this(program: Seq[Microcode]) = this(program.map(_.encode)) // Memory Structures val ram = program.toArray ++ Array.fill(ramSize - program.length)(0.toShort) val dstack = Array.fill(stackSize)(0.toShor...
hugoferreira/from-zero-to-computer
src/main/scala/eu/shiftforward/J1/cpu.scala
Scala
mit
2,517
package com.twitter.finagle.tracing.opencensus import com.twitter.finagle.{Http, ThriftMux} import org.scalatest.FunSuite class StackClientOpsTest extends FunSuite { test("Http.withOpenCensusTracing") { import StackClientOps._ val client = Http.client assert(!client.stack.contains(ClientTraceContextFi...
luciferous/finagle
finagle-opencensus-tracing/src/test/scala/com/twitter/finagle/tracing/opencensus/StackClientOpsTest.scala
Scala
apache-2.0
926
package com.twitter.finagle.httpx.codec import com.twitter.finagle.Service import com.twitter.finagle.dispatch.GenSerialServerDispatcher import com.twitter.finagle.httpx._ import com.twitter.finagle.httpx.netty.Bijections._ import com.twitter.finagle.netty3.ChannelBufferBuf import com.twitter.finagle.stats.{StatsRecei...
nkhuyu/finagle
finagle-httpx/src/main/scala/com/twitter/finagle/httpx/codec/HttpServerDispatcher.scala
Scala
apache-2.0
4,976
package com.rrdinsights.scalabrine.models private[rrdinsights] trait RawResponse { def resource: String def resultSets: Array[ResultSetResponse] } private[rrdinsights] case class ResultSetResponse(name: String, headers: Array[String], ...
rd11490/Scalabrine
src/main/scala/com/rrdinsights/scalabrine/models/RawResponse.scala
Scala
mit
1,307
/* Deduction Tactics Copyright (C) 2012-2015 Raymond Dodge 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. This progra...
rayrobdod/boardGame
View/src/test/scala/NilTilesheetTest.scala
Scala
gpl-3.0
1,376
package org.jetbrains.plugins.scala package debugger import com.intellij.concurrency.ConcurrentCollectionFactory import java.{util => ju} import com.intellij.debugger.engine._ import com.intellij.debugger.impl.DebuggerUtilsEx import com.intellij.debugger.jdi.VirtualMachineProxyImpl import com.intellij.debugger.reques...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/debugger/ScalaPositionManager.scala
Scala
apache-2.0
40,870
/******************************************************************************* * Copyright (c) 2019. Carl Minden * * 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 ...
carlminden/anathema-roguelike
src/com/anathema_roguelike/entities/characters/player/perks/abilities/potions/FleetFootedElixir.scala
Scala
gpl-3.0
994
import sbt._ import Keys._ import play.twirl.sbt.SbtTwirl import play.twirl.sbt.Import.TwirlKeys object Resolvers { val typesafe = "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/" } object Dependencies { // for autodoc-sbt val playPlugin = "com.typesafe.play" %% "sbt-plugin" % System.getPr...
krrrr38/play-autodoc
project/Build.scala
Scala
mit
4,428
// Copyright (C) 2015, codejitsu. package net.codejitsu.tasks import java.net.URL import net.codejitsu.tasks.dsl._ /** * Download url. * * @param hosts hosts. * @param url url to download. * @param destinationPath destination path on hosts. * @param usingSudo true, if sudo needed. * @param usingPar true, if ...
codejitsu/tasks
tasks-dsl/src/main/scala/net/codejitsu/tasks/Download.scala
Scala
apache-2.0
1,662
package com.sksamuel.avro4s import java.io.{ByteArrayOutputStream, File} import org.scalatest.{Matchers, WordSpec} case class Version1(string: String) case class Version2(string: String, int: Int = 3) class AvroBinaryTest extends WordSpec with Matchers { val tgtbtu = Score("The good, the bad and the ugly", "enni...
YuvalItzchakov/avro4s
avro4s-core/src/test/scala/com/sksamuel/avro4s/AvroBinaryTest.scala
Scala
mit
1,643
/** * 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...
geeag/kafka
core/src/main/scala/kafka/server/ReplicaManager.scala
Scala
apache-2.0
50,179
import sbt._, Keys._ import de.johoop.jacoco4sbt.JacocoPlugin._ object TestCoverage { val settings = jacoco.settings }
longcao/framian
project/TestCoverage.scala
Scala
apache-2.0
123
package com.guidewire.tools.chronos.client.api.v2 import scalaz._ import scala.concurrent.{ExecutionContext, Future} import play.api.libs.json._ import com.guidewire.tools.chronos.client._ import com.guidewire.tools.chronos.client.api._ /** * */ object Debug { import JsonUtils._ import HttpUtils._ /** *...
Guidewire/chronos-client
src/main/scala/com/guidewire/tools/chronos/client/api/v2/Debug.scala
Scala
apache-2.0
1,725
/* * 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 ...
cin/spark
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala
Scala
apache-2.0
8,719
object Test extends App { (new PlaceboAssorted).combo (new placeboannot.klass.PlaceboClass).combo (new placeboannot.objekt.PlaceboClass).combo (new PlaceboParameters).combo }
scala/scala
test/macro-annot/run/placebo/test_2.scala
Scala
apache-2.0
183
/** * Copyright 2012-2013 StackMob * * 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...
stackmob/lucid
project/Build.scala
Scala
apache-2.0
3,073
package hintsAll import common.CommonTest import de.ust.skill.common.scala.api.Create import de.ust.skill.common.scala.api.Read import de.ust.skill.common.scala.api.Write import hintsAll.api.SkillFile /** * Tests interface API. */ class BasicTest extends CommonTest { test("create a node with distributed fields an...
skill-lang/skillScalaTestSuite
src/test/scala/hintsAll/BasicTest.scala
Scala
bsd-3-clause
874
/*** * 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...
wdschei/api-checker
core/src/main/scala/com/rackspace/com/papi/components/checker/step/XSD.scala
Scala
apache-2.0
3,039
/* 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...
soundcloud/scalding
scalding-json/src/main/scala/com/twitter/scalding/JsonLine.scala
Scala
apache-2.0
3,778
/*********************************************************************** * Copyright (c) 2013-2019 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...
elahrvivaz/geomesa
geomesa-index-api/src/main/scala/org/locationtech/geomesa/index/filters/Z2Filter.scala
Scala
apache-2.0
2,770
/* * Copyright 2011-2022 GatlingCorp (https://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...
gatling/gatling
gatling-jms/src/test/scala/io/gatling/jms/jndi/DummyContextFactory.scala
Scala
apache-2.0
1,763
package com.azavea.opentransit.database import com.azavea.opentransit._ import com.azavea.gtfs._ import geotrellis.slick._ import geotrellis.vector._ import scala.slick.driver.{JdbcDriver, JdbcProfile, PostgresDriver} import scala.slick.jdbc.JdbcBackend.DatabaseDef // The performance characteristics of postgres en...
flibbertigibbet/open-transit-indicators
scala/opentransit/src/main/scala/com/azavea/opentransit/database/GTFSDeltaTables.scala
Scala
gpl-3.0
4,871
/* * Copyright 2010-2014 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...
lzpfmh/framework-2
web/webkit/src/test/scala/net/liftweb/http/CometActorSpec.scala
Scala
apache-2.0
2,525
package org.codeswarm.aksync import akka.testkit.{TestActorRef, TestKit} import akka.actor.{Actor, Props, ActorSystem, ActorRef, ActorContext}, akka.event.Logging import org.scalatest._ import scala.concurrent.duration.{Duration, DurationDouble, FiniteDuration} import com.typesafe.config.ConfigFactory import collectio...
chris-martin/aksync
src/test/scala/ServerSpec.scala
Scala
apache-2.0
9,345
// code-examples/ObjectSystem/linearization/linearization2-script.scala var clist = List[String]() class C1 { clist ::= "C1" } trait T1 extends C1 { clist ::= "T1" } trait T2 extends C1 { clist ::= "T2" } trait T3 extends C1 { clist ::= "T3" } class C2 extends T1 with T2 with T3 { clist ::= "C2" } val ...
XClouded/t4f-core
scala/src/tmp/ObjectSystem/linearization/linearization2-script.scala
Scala
apache-2.0
355
package com.nidkil.downloader.validator import org.scalatest.Matchers import org.scalatest.FunSpec import java.io.File import org.scalatest.Tag class FileSizeValidatorTest extends FunSpec with Matchers { def curDir = new java.io.File(".").getCanonicalPath def testFile = new File(curDir, "LICENSE") describe("A...
nidkil/scala-downloader
src/test/scala/com/nidkil/downloader/validator/FileSizeValidatorTest.scala
Scala
apache-2.0
1,448
package geek.lawsof.physics.init import geek.lawsof.physics.lib.util.helpers.Log /** * Created by anshuman on 26-05-2014. */ object ModRecipies { def init() = { Log.info("Adding Recipes") } }
GeckoTheGeek42/TheLawsOfPhysics
src/main/scala/geek/lawsof/physics/init/ModRecipies.scala
Scala
mit
204
package gloving import java.net.URI import java.io.{File, FileInputStream, BufferedInputStream, DataInputStream, InputStream} import java.nio.file.Paths import java.nio.charset.StandardCharsets import java.nio.{ByteBuffer,ByteOrder} import java.util.zip.GZIPInputStream import scala.collection.mutable.ArrayBuffer imp...
anelson/gloving
src/main/scala/Word2VecWordVectorLoader.scala
Scala
apache-2.0
5,145
package me.shengmin.graph import org.scalatest._ class FlowNetworkSpec extends FlatSpec with Matchers{ it should "have maximum network flow value of 3" in { val x = NodeReference("x") val y = NodeReference("y") val a = NodeReference("a") val b = NodeReference("b") val c = NodeReference("c") ...
shengmin/coding-problem
common/src/test/scala/me/shengmin/graph/FlowNetworkSpec.scala
Scala
mit
1,135
/* * 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 ...
bhoppi/zen
ml/src/main/scala/com/github/cloudml/zen/ml/semiSupervised/GLDA.scala
Scala
apache-2.0
15,488
package scala.models import io.apibuilder.generator.v0.models.InvocationForm import org.scalatest.funspec.AnyFunSpec import org.scalatest.matchers.should.Matchers class ExampleUnionTypesWithDiscriminatorSpec extends AnyFunSpec with Matchers { private lazy val service = models.TestHelper.parseFile(s"/examples/apido...
gheine/apidoc-generator
scala-generator/src/test/scala/models/ExampleUnionTypesWithDiscriminatorSpec.scala
Scala
mit
1,156
package org.jetbrains.plugins.scala package lang package resolve package processor import com.intellij.openapi.progress.ProgressManager import com.intellij.openapi.util.Key import com.intellij.psi._ import com.intellij.psi.scope._ import org.jetbrains.plugins.scala.extensions._ import org.jetbrains.plugins.scala.lang....
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/lang/resolve/processor/BaseProcessor.scala
Scala
apache-2.0
15,799
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
jedesah/Quasar
core/src/main/scala/quasar/metastore/UnexpectedValueException.scala
Scala
apache-2.0
871
/* * Copyright 2009 Twitter, Inc. * Copyright 2009 Robey Pointer <[email protected]> * * 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/LICENS...
kmiku7/gizzard
src/main/scala/net/lag/kestrel/JournalPacker.scala
Scala
apache-2.0
3,539
/* * Copyright © 2016 - 2019 Schlichtherle IT Services * * 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-2.0 * * Unless required by appl...
christian-schlichtherle/neuron-di
guice/src/test/scala/global/namespace/neuron/di/guice/java/BinderLikeSpec.scala
Scala
apache-2.0
7,551
package gui import java.awt.{BorderLayout, Insets} import java.io.{BufferedReader, InputStreamReader} import javax.swing._ import connections.usb.Adb class Console extends JFrame { private val consoleTextField: JTextArea = new JTextArea() { this.setTitle("Output") this.setBounds(100, 100, 40...
LorenK96/slide-desktop
src/main/scala/gui/Console.scala
Scala
gpl-2.0
2,909
package com.thangiee.lolhangouts.ui.utils.thirdpartylibsugar import android.view.View import com.afollestad.materialdialogs.MaterialDialog import com.afollestad.materialdialogs.MaterialDialog.{ButtonCallback, InputCallback, ListCallbackMultiChoice, ListCallbackSingleChoice} import scala.language.implicitConversions ...
Thangiee/LoL-Hangouts
src/com/thangiee/lolhangouts/ui/utils/thirdpartylibsugar/MaterialDialogSugar.scala
Scala
apache-2.0
2,577
package org.http4s package servlet import java.util.EnumSet import javax.servlet.{DispatcherType, Filter} import javax.servlet.http.HttpServlet import org.http4s.server.{AsyncTimeoutSupport, ServerBuilder} trait ServletContainer extends ServerBuilder with AsyncTimeoutSupport { type Self <: ServletContainer ...
ZizhengTai/http4s
servlet/src/main/scala/org/http4s/servlet/ServletContainer.scala
Scala
apache-2.0
1,989
import reflect.runtime.universe class C { private val yyy: Any = 1 @inline def foo = yyy } object Test extends dotty.runtime.LegacyApp { import universe._ val access = typeOf[C].decls .toList .filter(_.name.toString.endsWith("yyy")) .map(x => (x.name, x.isPrivate)) println(access.head) }
yusuke2255/dotty
tests/pending/run/t6608.scala
Scala
bsd-3-clause
314
package com.raquo.domtypes.jsdom.defs.events import org.scalajs.dom import scala.scalajs.js @js.native trait TypedTargetPointerEvent[+T <: dom.EventTarget] extends dom.PointerEvent with TypedTargetEvent[T]
raquo/scala-dom-types
js/src/main/scala/com/raquo/domtypes/jsdom/defs/events/TypedTargetPointerEvent.scala
Scala
mit
213