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 (C) 2011 Kaj Magnus Lindberg (born 1979) * * 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. ...
debiki/debiki-server-old
modules/debiki-core/src/main/scala/com/debiki/core/rules.scala
Scala
agpl-3.0
3,096
/******************************************************************************* Copyright (c) 2013, KAIST, S-Core. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. ***************************************************************...
daejunpark/jsaf
src/kr/ac/kaist/jsaf/analysis/typing/models/DOMHtml/HTMLBaseFontElement.scala
Scala
bsd-3-clause
4,357
package example import org.scalajs.dom import org.scalajs.dom.Event import org.scalajs.dom.html._ import example.ScalaJSCode._ import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.all._ import shared.SharedCode._ import shared.UltraRapidImage import scala.collection.mutable.ArrayBuffer import scala.scala...
MysterionRise/psycho-test-framework
psycho-test-client/src/main/scala/example/GlobalRecognitionTest.scala
Scala
mit
6,076
package dbtarzan.db.actor import dbtarzan.db._ import org.scalatest.flatspec.AnyFlatSpec class AdditionalForeignKeysIntersectionTest extends AnyFlatSpec { def foreignKeysByTable = Map( "Artist" -> ForeignKeys(List( ForeignKey("key1", FieldsOnTable("Album", List("ArtistId")), FieldsOnTable("Artist",...
aferrandi/dbtarzan
src/test/scala/dbtarzan/db/actor/AdditionalForeignKeysIntersectionTest.scala
Scala
apache-2.0
1,875
/* * Copyright 2012-2014 Joscha Feth, Steve Chaloner, Anton Fedchenko * * 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 re...
kompot/play2sec
app/com/github/kompot/play2sec/authentication/providers/password/UsernamePasswordAuthProvider.scala
Scala
apache-2.0
8,872
package com.twitter.finagle.postgres.codec /* * An error generated by Postgres. */ class ServerError(message : String) extends Exception(message) /* * An error caused on the client side (e.g., a badly-formed query). */ class ClientError(message : String) extends Exception(message) object Errors { def client(me...
evnm/finagle-postgres
src/main/scala/com/twitter/finagle/postgres/codec/Errors.scala
Scala
apache-2.0
422
/* * 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...
travisbrown/scalatest
src/test/scala/org/scalatest/ShouldContainInOrderTypeCheckSpec.scala
Scala
apache-2.0
65,998
/* * 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 ...
ueshin/apache-spark
sql/core/src/test/scala/org/apache/spark/sql/DataFrameWriterV2Suite.scala
Scala
apache-2.0
29,065
//=========================================================================== // Copyright 2014 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://ww...
delving/narthex
app/services/FileHandling.scala
Scala
apache-2.0
7,059
package hello.it import com.github.dnvriend.aws.lambda.handler.test.ServerlessTest import hello.Person class PersonOptionHandlerIntegrationTest extends ServerlessTest { def feature = Feature("Person Option Handler") { Scenario("Posting a Person Option") { When I post("/dev/personoption").withBody(Person("...
dnvriend/serverless-test
01-hello-scala/src/test/scala/hello/it/PersonOptionHandlerIntegrationTest.scala
Scala
apache-2.0
425
package frameless import frameless.CollectTests.{ prop, propArray } import org.apache.spark.sql.SparkSession import org.scalacheck.Prop import org.scalacheck.Prop._ import scala.reflect.ClassTag class CollectTests extends TypedDatasetSuite { test("collect()") { check(forAll(propArray[Int] _)) check(forAll(p...
imarios/frameless
dataset/src/test/scala/frameless/CollectTests.scala
Scala
apache-2.0
3,413
/** * 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...
YMCoding/kafka-0.11.0.0-src-with-comment
core/src/main/scala/kafka/log/LogValidator.scala
Scala
apache-2.0
17,834
// scalac: -Xlint:inaccessible -Xfatal-warnings // package outer package inner { private[inner] class A // the class is final: no warning private[outer] final class B { def doWork(a: A): A = a } // the trait is sealed and doWork is not // and cannot be overridden: no warning private[outer] seale...
scala/scala
test/files/pos/t8828.scala
Scala
apache-2.0
408
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.api.libs.ws import java.io.{ Closeable, IOException } /** * A Play specific WS client that can use Play specific classes in the request and response building. * * Typically, access this class through dependency injection, i.e...
hagl/playframework
framework/src/play-ws/src/main/scala/play/api/libs/ws/WSClient.scala
Scala
apache-2.0
1,124
import scala.reflect.runtime.universe._ object Test extends dotty.runtime.LegacyApp { val tree1 = reify(new collection.immutable.HashMap[String, String]) val tree2 = reify(new collection.mutable.HashMap[String, String]) println(showRaw(tree1.tree, printKinds = true)) println(showRaw(tree2.tree, printKinds = tr...
yusuke2255/dotty
tests/disabled/macro/run/showraw_tree_kinds.scala
Scala
bsd-3-clause
327
/*** * Copyright 2016 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/test/scala/com/rackspace/com/papi/components/checker/wadl/WADLCheckerCheckXSDEngineSuite.scala
Scala
apache-2.0
1,927
package tastytest import collection.mutable object TestTraitsWithSideEffects extends Suite("TestTraitsWithSideEffects") { import TraitsWithSideEffects._ def checkEntries(map: mutable.Map[String, Boolean]): Boolean = map.getOrElse("True", false) && !map.getOrElse("False", true) test("init map and mixin fie...
scala/scala
test/tasty/run/src-2/tastytest/TestTraitsWithSideEffects.scala
Scala
apache-2.0
633
package recTree import scalafx.scene.canvas._ import scalafx.scene.Node import scalafx.scene.paint.Color import scalafx.animation.AnimationTimer import scalafx.Includes._ import scalafx.scene.input.{MouseEvent, MouseButton} import scalafx.scene.layout.Pane import scala.math class TreeDisplay { val _container : Pa...
jfschaefer/recTree
src/main/scala/TreeDisplay.scala
Scala
cc0-1.0
5,587
package org.backuity.puppet import org.parboiled2._ import scala.util.{Success, Failure} case class Puppetfile(forge: Option[String] = None, modules : Map[String, Puppetfile.Module] = Map.empty) object Puppetfile { sealed abstract class Module case class GitModule(gitUri: String, ref: Opt...
backuity/puppet-module-installer
src/main/scala/org/backuity/puppet/Puppetfile.scala
Scala
apache-2.0
2,911
package slick.jdbc.meta import slick.dbio.Effect import slick.jdbc.{ResultSetAction, Invoker} import slick.profile.BasicStreamingAction /** A wrapper for a row in the ResultSet returned by DatabaseMetaData.getTables(). */ case class MTable( name: MQName, tableType: String, remarks: String, typeName: Option[MQName],...
jkutner/slick
slick/src/main/scala/slick/jdbc/meta/MTable.scala
Scala
bsd-2-clause
1,905
/* * 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/controller/test/BasicAuthenticateTests.scala
Scala
apache-2.0
6,358
/* * 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 ...
ueshin/apache-flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/descriptors/OldCsv.scala
Scala
apache-2.0
6,589
/** * 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 p...
brunobuzzi/orbeon-forms
xforms/shared/src/main/scala/org/orbeon/xforms/rpc/JsonSerializers.scala
Scala
lgpl-2.1
1,111
/* * Copyright (c) 2016. Fengguo (Hugo) Wei and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Detailed co...
arguslab/argus-cit-intellij
src/main/scala/org/argus/cit/intellij/jawa/highlighter/AnnotatorHighlighter.scala
Scala
epl-1.0
2,729
package modules import com.google.inject.AbstractModule import models.daos._ import models.services._ import net.codingwell.scalaguice.ScalaModule /** * The base Guice module. */ class BaseModule extends AbstractModule with ScalaModule { /** * Configures the module. */ def configure(): Unit = { bind[...
yoo-haemin/hufs-planner
project/app/modules/BaseModule.scala
Scala
agpl-3.0
1,398
package lore.compiler.transformation import lore.compiler.feedback.Reporter import lore.compiler.semantics.Registry import lore.compiler.semantics.expressions.Expression.{BinaryOperator, XaryOperator} import lore.compiler.semantics.expressions.{Expression, ExpressionIdentityVisitor} import lore.compiler.types.BasicTyp...
marcopennekamp/lore
compiler/src/lore/compiler/transformation/BuiltinsVisitor.scala
Scala
mit
1,882
package githubapi.github import gatling.blueprint.{ConfigurationTool, JsonResponseTool} import io.gatling.core.Predef._ import io.gatling.core.structure.ChainBuilder import io.gatling.http.Predef._ object GitHubApi { val home: ChainBuilder = exec(http("Home") .get("/") .check( bodyBytes.saveAs("lastR...
sgoeschl/gatling-blueprint-project
src/test/scala/githubapi/github/GitHubApi.scala
Scala
apache-2.0
1,410
/* * 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/system/basic/WskActionTests.scala
Scala
apache-2.0
21,657
package exercises import org.scalatest.FunSuite class p04ListSizeSuite extends FunSuite { test("listSize should return size of list") { assertResult(3) { new p04ListSize().listSize(List(1, 2, 3)) } } test("listSize should return 0 if list is empty") { assertResult(0) { new p04ListSize()...
damien75/99-scala-problems
src/test/scala/exercises/p04ListSizeSuite.scala
Scala
mit
354
package models /** * Created with IntelliJ IDEA. * @author <a href="mailto:wstarcev@gmail.com">Vasilii Startsev</a> * Date: 13.08.13 * Time: 4:42 */ object NeoStart { var count : Int = 0 def mainName : String = "Main name here " + count def increase() : Unit = { count = count + 1 } ...
animotron/panimo
app/models/NeoStart.scala
Scala
agpl-3.0
323
/* * Copyright (C) 2018 Lightbend Inc. <https://www.lightbend.com> * Copyright (C) 2017-2018 Alexis Seigneurin. * * 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 o...
sslavic/kafka
streams/streams-scala/src/main/scala/org/apache/kafka/streams/scala/kstream/KStream.scala
Scala
apache-2.0
35,376
/* Copyright 2009-2016 EPFL, Lausanne */ import leon.lang._ import leon.lang.xlang._ object Epsilon3 { def pos(): Int = { epsilon((y: Int) => y > 0) } ensuring(_ >= 0) }
regb/leon
src/test/resources/regression/verification/xlang/valid/Epsilon3.scala
Scala
gpl-3.0
182
package org.atnos.eff import cats.implicits._ import org.atnos.eff.all._ import org.atnos.eff.future._ import org.atnos.eff.syntax.all._ import org.atnos.eff.syntax.future._ import org.specs2._ import org.specs2.concurrent.ExecutionEnv import scala.collection.mutable.ListBuffer import scala.concurrent._ import durati...
etorreborre/eff-cats
jvm/src/test/scala/org/atnos/eff/FutureEffectSpec.scala
Scala
mit
7,669
package org.utad import org.apache.spark.SparkContext import org.apache.spark.rdd.RDD /** * Created by juanito on 9/02/15. */ object OlympicsHelper { var sc:SparkContext = null def getContext(): SparkContext = { if (sc == null) { sc = new SparkContext("local", "Ejercicio1z", "$SPARK_HOME"); } ...
misterarias/spark_olympicData
src/main/scala/org/utad/OlympicsHelper.scala
Scala
gpl-3.0
2,235
package aecor.example.common import java.time.Instant final case class Timestamp(value: Instant)
notxcain/aecor
modules/example/src/main/scala/aecor/example/common/Timestamp.scala
Scala
mit
98
/* * 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 ...
HuaweiBigData/carbondata
integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonScanPartitionRDD.scala
Scala
apache-2.0
11,751
package distrimon.minion import java.net.InetSocketAddress import distrimon.Client class MasterTunnel(val id: Int) extends Client { def getAddress: InetSocketAddress = { val addr = Masters.current Masters.switch() addr } object Masters { private var cur = firstMaster private var bac = backu...
ConnorDillon/distrimon
src/main/scala/distrimon/minion/MasterTunnel.scala
Scala
gpl-3.0
524
/* NSC -- new scala compiler * Copyright 2005-2013 LAMP/EPFL * @author Martin Odersky */ package scala package reflect package internal import scala.annotation.elidable import scala.collection.mutable import util._ import java.util.concurrent.TimeUnit import scala.reflect.internal.{TreeGen => InternalTreeGen} ab...
felixmulder/scala
src/reflect/scala/reflect/internal/SymbolTable.scala
Scala
bsd-3-clause
15,111
package com.tresata.ganitha.util import java.io.{ ByteArrayInputStream, ByteArrayOutputStream, ObjectInputStream, ObjectOutputStream } import org.apache.hadoop.conf.Configuration import org.scalatest.FunSpec object KryoVesselSpec { case class TestCase(name : String) def roundTrip[T](t : T) = { val vessel ...
tresata/ganitha
ganitha-util/src/test/scala/com/tresata/ganitha/util/KryoVesselSpec.scala
Scala
apache-2.0
1,050
package pages import org.scalatest.selenium.WebBrowser.{click, currentUrl, pageSource} import pages.vrm_assign.VehicleLookupPage.currentKeeperNo import pages.vrm_assign.VehicleLookupPage.currentKeeperYes import pages.vrm_assign.VehicleLookupPage.findVehicleDetails import pages.vrm_assign.VehicleLookupPage.replacementV...
dvla/vrm-assign-online
acceptance-tests/src/test/scala/pages/VehicleLookupPageSteps.scala
Scala
mit
2,695
package com.github.mijicd.waes.domain import java.util.Base64 trait Decoder { def decode(content: String) = { val decoder = Base64.getDecoder val decoded = decoder.decode(content) new String(decoded) } }
mijicd/spray-json-diff
src/main/scala/com/github/mijicd/waes/domain/Decoder.scala
Scala
mit
222
/* * 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 ...
WindCanDie/spark
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocatorBlacklistTracker.scala
Scala
apache-2.0
7,320
object Test { def res(x: quoted.Expr[Int])(using tasty.Reflection): quoted.Expr[Int] = x match { case '{ 1 + (${Bind(b)}: Int) } => ??? // error: Not found: Bind case _ => ??? } }
som-snytt/dotty
tests/neg/i6325.scala
Scala
apache-2.0
192
package com.itszuvalex.itszulib.core.traits.block import java.util.Random import com.itszuvalex.itszulib.util.InventoryUtils import net.minecraft.block.Block import net.minecraft.inventory.IInventory import net.minecraft.world.World /** * Created by Itszuvalex on 11/28/14. */ trait DroppableInventory extends Block...
BlockWorker/ItszuLib
src/main/scala/com/itszuvalex/itszulib/core/traits/block/DroppableInventory.scala
Scala
gpl-2.0
851
/* * Copyright 2017 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
danveloper/clouddriver
clouddriver-loadtest/src/main/scala/com/netflix/spinnaker/clouddriver/loadtest/ClouddriverSimulationEngine.scala
Scala
apache-2.0
1,035
package com.hyenawarrior.oldnorsedictionary.model.persister.database import java.io.{ByteArrayInputStream, DataInputStream} import com.hyenawarrior.oldnorsedictionary.model.persister.Serializer._ import com.hyenawarrior.oldnorsedictionary.model.persister.database.DBLayer.ColumnDefinition import com.hyenawarrior.oldno...
HyenaSoftware/IG-Dictionary
app/src/main/scala/com/hyenawarrior/oldnorsedictionary/model/persister/database/DatabasePersister.scala
Scala
lgpl-3.0
3,753
package com.wincom.dcim.domain import akka.actor.{ActorRef, Props} import akka.event.Logging import akka.persistence.PersistentActor import akka.util.Timeout import com.google.protobuf.timestamp.Timestamp import com.wincom.dcim.message.common._ import com.wincom.dcim.message.common.ResponseType._ import com.wincom.dci...
xtwxy/mysc
dcim-cluster/domain/src/main/scala/com/wincom/dcim/domain/Alarm.scala
Scala
apache-2.0
9,318
import akka.actor.{ActorLogging, Actor} class Person extends Actor with ActorLogging { def receive = { case FullPint(number) => log.info(s"I'll make short work of pint $number") Thread.sleep(1000) log.info(s"Done, here is the empty glass for pint $number") sender ! EmptyPint(number) ...
anavidad3/PoC-spark-scala-maven
src/main/scala/org/crashstars/akka/bar/complex/Person.scala
Scala
apache-2.0
323
package net.paploo.orbital.phys import net.paploo.orbital.planetarysystem.Planetoid trait OrbitalParameters { val state: State val t: Double = state.t val pos: PhysVec = state.pos val vel: PhysVec = state.vel val planetoid: Planetoid = state.planetoid lazy val specificMomentum: PhysVec = vel lazy val ...
paploo/orbital
src/main/scala/net/paploo/orbital/phys/OrbitalParameters.scala
Scala
bsd-3-clause
1,948
package com.twitter.finagle.thrift import com.google.common.base.Charsets import com.twitter.finagle.stats.{DefaultStatsReceiver, StatsReceiver} import com.twitter.logging.Logger import com.twitter.util.NonFatal import java.nio.{ByteBuffer, CharBuffer} import java.nio.charset.{CoderResult, CharsetEncoder} import java....
JustinTulloss/finagle
finagle-thrift/src/main/scala/com/twitter/finagle/thrift/Protocols.scala
Scala
apache-2.0
6,895
package at.forsyte.apalache.tla.typecheck.etc import at.forsyte.apalache.tla.typecheck._ import at.forsyte.apalache.tla.typecheck.etc.TypeUnifier.CycleDetected import scala.collection.immutable.SortedMap /** * <p>A unification solver for the TlaType1 system. Note that our subtyping relation unifies records * and...
konnov/dach
tla-types/src/main/scala/at/forsyte/apalache/tla/typecheck/etc/TypeUnifier.scala
Scala
apache-2.0
9,862
/* * Copyright © 2014 TU Berlin (emma@dima.tu-berlin.de) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
emmalanguage/emma
emma-examples/src/main/scala/org/emmalanguage/examples/text/WordCount.scala
Scala
apache-2.0
1,120
/** * @author Yuuto */ package yuuto.enhancedinventories.materials import java.awt.Color import java.util.HashMap import java.util.Iterator import java.util.Map import java.util.Map.Entry import net.minecraft.init.Items import net.minecraft.item.ItemStack import yuuto.yuutolib.utill.ItemIdentifire import yuuto.enhan...
AnimeniacYuuto/EnhancedInventories
src/main/scala/yuuto/enhancedinventories/materials/FrameMaterials.scala
Scala
gpl-2.0
3,481
/* * 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 ...
Swrrt/Samza
samza-kafka/src/main/scala/org/apache/samza/util/KafkaUtil.scala
Scala
apache-2.0
4,034
package net.spraycookies import org.scalacheck.Properties import org.scalacheck.Prop.forAll import org.scalacheck.Gen object CookiejarSpecification extends Properties("CookieHandling") { import spray.http.HttpRequest import spray.http.HttpResponse import spray.http.HttpCookie import spray.http.HttpH...
martijnhoekstra/spray-cookies
src/test/scala/cookiejarSpecification.scala
Scala
lgpl-3.0
3,216
/* * 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 ...
icexelloss/spark
sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala
Scala
apache-2.0
82,728
package com.twitter.finagle.thrift import com.twitter.conversions.DurationOps._ import com.twitter.finagle.Service import com.twitter.finagle.util.ByteArrays import com.twitter.util.{Await, Future} import java.nio.charset.StandardCharsets.UTF_8 import org.apache.thrift.protocol.{TMessage, TMessageType} import org.scal...
twitter/finagle
finagle-thrift/src/test/scala/com/twitter/finagle/thrift/TTwitterServerFilterTest.scala
Scala
apache-2.0
2,001
package com.twitter.finatra.kafkastreams.integration.window import com.twitter.conversions.DurationOps._ import com.twitter.finatra.kafka.serde.ScalaSerdes import com.twitter.finatra.kafkastreams.KafkaStreamsTwitterServer import com.twitter.finatra.kafkastreams.dsl.FinatraDslWindowedAggregations import com.twitter.fin...
twitter/finatra
kafka-streams/kafka-streams/src/test/scala/com/twitter/finatra/kafkastreams/integration/window/WindowedTweetWordCountServer.scala
Scala
apache-2.0
1,319
/* * 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 ...
prateekm/samza
samza-test/src/test/scala/org/apache/samza/test/integration/NonTransactionalStateShutdownIntegrationTest.scala
Scala
apache-2.0
5,060
package org.jetbrains.plugins.scala package lang package psi import com.intellij.extapi.psi.ASTWrapperPsiElement import com.intellij.lang.ASTNode import com.intellij.psi.impl.CheckUtil import com.intellij.psi.impl.source.tree.{LazyParseablePsiElement, SharedImplUtil} import com.intellij.psi.tree.{IElementType, TokenSe...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/ScalaPsiElementImpl.scala
Scala
apache-2.0
4,754
class TestArraySum (arrayCombo: Array[Int]){ def FindTotal: Int = { var i = 0 var sum = 0 for (i <- 0 to arrayCombo.length - 1){ sum += arrayCombo(i) } sum } def TestSubset(): Boolean = { if (arrayCombo(0) + arrayCombo(1) == 0) true else false ...
matt-bentley/SubsetSumProcessor
SubsetSumProcessor/Scala/src/main/scala/TestArray.scala
Scala
gpl-3.0
329
package weightedroundrobin import org.scalatest.prop.PropertyChecks import org.scalatest.{Matchers, PropSpec} import scala.collection.mutable import scala.collection.mutable.ListBuffer import RoundRobinUtils._ class RoundRobinForResourcePropertyTests extends PropSpec with PropertyChecks with Matchers { val expect...
TharinduDG/weightedroundrobin
src/test/scala/weightedroundrobin/RoundRobinForResourcePropertyTests.scala
Scala
apache-2.0
6,101
package com.peterpotts.snake package object coercion { type Coercer[+T] = Any => T }
peterpotts/snake
src/main/scala/com/peterpotts/snake/coercion/package.scala
Scala
mit
88
package com.aurelpaulovic.scala_kata.s_99.p10 import com.aurelpaulovic.scala_kata.s_99.UnitSpec import org.scalatest._ import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class P10 extends UnitSpec { val funcs: List[(String, List[Any] => List[(Any, Int)])] = List( //...
AurelPaulovic/scala-kata
src/test/scala/com/aurelpaulovic/scala_kata/s_99/p10/P10.scala
Scala
apache-2.0
1,727
/** * Copyright 2011 Google Inc. * Copyright 2014 Kangmo Kim * * 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...
Kangmo/bitcoinj
core/src/main/scala/com/nhnsoft/bitcoin/utils/TaggableObject.scala
Scala
apache-2.0
2,542
package config import org.mindrot.jbcrypt.BCrypt import org.pac4j.core.credentials.password.PasswordEncoder import com.github.t3hnar.bcrypt._ class BlowfishPasswordEncoder extends PasswordEncoder { override def encode(password: String): String = BCrypt.hashpw(password, BCrypt.gensalt) def encode(password: String,...
ygpark2/play-ain-board
app/config/BlowfishPasswordEncoder.scala
Scala
bsd-3-clause
492
package io.mth.foil import scala.collection.JavaConversions._ import javax.servlet.Servlet trait JettyConfig { def fold[T]( war: String => String => T, path: String => String => Boolean => T, servlet: String => String => Servlet => T, compound: List[JettyConfig] => T ): T } object JettyConfig ex...
markhibberd/foil
src/scala/io/mth/foil/JettyConfig.scala
Scala
bsd-3-clause
1,579
package lp.template.common import org.scalacheck.Prop._ import org.scalatest.FunSpec import org.scalatest.prop.Checkers class AppsSpec extends FunSpec with Checkers { describe("Common application behaviour") { it("should support exception details") { check { forAll { s: String => ...
leigh-perry/template-wizard
src/test/scala/lp/template/common/AppsSpec.scala
Scala
apache-2.0
697
package scala.virtualization.lms package epfl package test4 import common._ import test1._ import test2._ import test3._ /* TODO: +implement dfa_trans +automata +compile and run benchmark cleanup parsing / tree construction? http parser?? iteratee interface? */ // careful with @specialized blowup case class Autom...
afernandez90/virtualization-lms-core
test-src/epfl/test4-functions/Automata.scala
Scala
bsd-3-clause
13,825
package org.scalaide.refactoring.internal import scala.reflect.internal.util.SourceFile import scala.tools.refactoring.MultiStageRefactoring import scala.tools.refactoring.ParameterlessRefactoring import scala.tools.refactoring.common.Change import scala.tools.refactoring.common.InteractiveScalaCompiler import scala.t...
andrey-ilinykh/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/refactoring/internal/ScalaIdeRefactoring.scala
Scala
bsd-3-clause
8,825
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala.scalajs import scala.annotation...
scala-js/scala-js
library/src/main/scala/scala/scalajs/js/package.scala
Scala
apache-2.0
6,060
/* * Copyright 2017 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...
pncampbell/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v3/B295.scala
Scala
apache-2.0
961
package scalaSci.Search object SearchLibs { import java.util.jar.JarEntry import java.util.jar.JarFile import java.util.jar.JarInputStream import java.util.jar.JarOutputStream import java.lang.reflect.Method import java.lang.reflect.Modifier import scalaExec.Interpreter.GlobalValues import java.io....
scalalab/scalalab
source/src/main/scala/scalaSci/Search/SearchLibs.scala
Scala
mit
11,781
package blended.streams.jms.internal import akka.NotUsed import akka.actor.{ActorRef, ActorSystem} import akka.stream.scaladsl.{Flow, Keep, Sink, Source} import akka.stream.OverflowStrategy import blended.container.context.api.ContainerContext import blended.jms.utils.{BlendedSingleConnectionFactory, JmsDestination, P...
woq-blended/blended
blended.streams/src/main/scala/blended/streams/jms/internal/StreamKeepAliveProducerFactory.scala
Scala
apache-2.0
3,232
package com.blinkbox.books.auth.server.service import com.blinkbox.books.auth.server.services.MaxMindGeoIP import org.scalatest.{Matchers, FlatSpec} import spray.http.RemoteAddress class MaxMindGeoIPSpecs extends FlatSpec with Matchers { val geoIp = new MaxMindGeoIP() "The MaxMind GeoIP service" should "identif...
blinkboxbooks/auth-service.scala
src/test/scala/com/blinkbox/books/auth/server/service/MaxMindGeoIPSpecs.scala
Scala
mit
550
package com.sksamuel.elastic4s.admin import com.sksamuel.exts.OptionImplicits._ import org.elasticsearch.action.admin.cluster.health.ClusterHealthRequestBuilder import org.elasticsearch.cluster.health.ClusterHealthStatus import org.elasticsearch.common.Priority case class ClusterHealthDefinition(indices: Seq[String],...
ulric260/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/admin/ClusterHealthDefinition.scala
Scala
apache-2.0
1,632
package dotty.tools.scaladoc package diagram import dotty.tools.scaladoc.ScaladocTest import scala.jdk.CollectionConverters.{ListHasAsScala, SeqHasAsJava} import org.junit.Assert.{assertSame, assertTrue, assertEquals} class SealedHierarchyTest extends ScaladocTest("sealedClasses"): override def runTest = withModule...
lampepfl/dotty
scaladoc/test/dotty/tools/scaladoc/diagram/SealedHierarchyTest.scala
Scala
apache-2.0
948
package org.bowlerframework import model.RequestMapper /** * Choses a strategy for mapping Requests. */ trait RequestMappingStrategy { def getRequestMapper(request: Request): RequestMapper }
rkpandey/Bowler
core/src/main/scala/org/bowlerframework/RequestMappingStrategy.scala
Scala
bsd-3-clause
197
package uk.gov.gds.ier.transaction.ordinary.otherAddress import uk.gov.gds.ier.test._ import uk.gov.gds.ier.model.{OtherAddress} import uk.gov.gds.ier.model.OtherAddress._ import uk.gov.gds.ier.transaction.ordinary.InprogressOrdinary class OtherAddressMustacheTests extends MustacheTestSuite with OtherAddressForms...
michaeldfallen/ier-frontend
test/uk/gov/gds/ier/transaction/ordinary/otherAddress/OtherAddressMustacheTests.scala
Scala
mit
3,556
package ammonite.repl import scala.annotation.tailrec import ammonite.util.Util.newLine /** * Created by haoyi on 8/29/15. */ object FrontEndUtils { def width = ammonite.terminal.TTY.consoleDim("cols") def height = ammonite.terminal.TTY.consoleDim("lines") @tailrec def findPrefix(strings: Seq[String], i: Int ...
alexarchambault/ammonium
amm/repl/src/main/scala/ammonite/repl/FrontEndUtils.scala
Scala
mit
1,097
package wdl.examples import java.nio.file.Paths import wdl.AstTools import wdl.AstTools.EnhancedAstNode object ex8 { def main(args: Array[String]): Unit = { /* Create syntax tree from contents of file */ val ast = AstTools.getAst(Paths.get(args(0))) /* Second parameter is a descriptor about where the ...
ohsu-comp-bio/cromwell
wdl/src/main/scala/wdl/examples/ex8.scala
Scala
bsd-3-clause
797
package org.jetbrains.plugins.scala.util.matchers import org.hamcrest.Matcher import scala.math.Ordering.Implicits._ trait HamcrestMatchers { def hasSize(size: Int): Matcher[Iterable[_]] = new ScalaBaseMatcher[Iterable[_]] { override protected def valueMatches(actualValue: Iterable[_]): Boolean = actual...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/util/matchers/HamcrestMatchers.scala
Scala
apache-2.0
1,932
package org.jetbrains.plugins.scala package base import java.io.File import java.util import com.intellij.ide.startup.impl.StartupManagerImpl import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.module.Module import com.intellij.openapi.project.Project import com.intellij.openapi.pro...
JetBrains/intellij-scala-historical
test/org/jetbrains/plugins/scala/base/ScalaLibraryLoader.scala
Scala
apache-2.0
8,156
package chandu0101.scalajsreact.css import scalacss.Defaults._ object GlobalStyle extends StyleSheet.Inline { import dsl._ style(unsafeRoot("body")( margin.`0`, padding.`0`, fontSize(14.px), fontFamily := "Roboto, sans-serif" )) }
chandu0101/reactjs-to-scalajs
src/main/scala/chandu0101/scalajsreact/css/GlobalStyle.scala
Scala
apache-2.0
257
package pl.pej.trelloilaro.api.requestBuilder.builder.card import pl.pej.trelloilaro.api.requestBuilder.{AllRequestParam, RequestParam, RequestBuilder} trait CardAttachmentsBuilder[T] { this: RequestBuilder[T] => def attachmentsParamName: String = "card_attachments" def withCardAttachments(attachment: Boolean) ...
tomaszym/trelloilaro
src/main/scala/pl/pej/trelloilaro/api/requestBuilder/builder/card/CardAttachmentsBuilder.scala
Scala
mit
455
package opennlp.scalabha.tree import org.clapper.argot._ import opennlp.scalabha.model._ import opennlp.scalabha.log.SimpleLogger import io.BufferedSource import java.io._ object Merge { import ArgotConverters._ val parser = new ArgotParser(this.getClass().getName, preUsage = Some("Version 0.0")) val help = p...
utcompling/Scalabha
src/main/scala/opennlp/scalabha/tree/Merge.scala
Scala
apache-2.0
5,200
/****************************************************************************** * Copyright 2017 Capital One Services, LLC and Bitwise, 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 ...
capitalone/Hydrograph
hydrograph.engine/hydrograph.engine.spark/src/main/scala/hydrograph/engine/spark/components/InputFileAvroComponent.scala
Scala
apache-2.0
4,595
package com.codacy.client.bitbucket.client object WSWrapper { type WSClient = play.api.libs.ws.StandaloneWSClient type WSRequest = play.api.libs.ws.StandaloneWSRequest def withHttpHeaders(request: WSRequest, headers: (String, String)*): WSRequest = { request.withHttpHeaders(headers: _*) } def build(mat...
codacy/bitbucket-scala-client
src/main/scala/com/codacy/client/bitbucket/client/WSWrapper.scala
Scala
apache-2.0
441
package scalan.collections import java.io.File import java.lang.reflect.Method import scalan._ import scalan.compilation.{GraphVizConfig, GraphVizExport} class CollectionExamplesSuite extends BaseShouldTests { "when mixing trait" should "be constructed in Std context" in { val ctx = new ScalanDslStd with Col...
PCMNN/scalan-ce
collections/src/test/scala/scalan/collections/CollectionExamplesSuite.scala
Scala
apache-2.0
3,363
package japgolly.scalajs.benchmark.engine import scala.scalajs.LinkingInfo import scala.scalajs.runtime.linkingInfo object ScalaJsInfo { val version: String = { var ver = (linkingInfo.linkerVersion: Any) match { case o: Option[_] => o.fold("Unknown")("" + _) case s: String => s case _ ...
japgolly/scalajs-benchmark
benchmark/src/main/scala/japgolly/scalajs/benchmark/engine/ScalaJsInfo.scala
Scala
apache-2.0
424
/** * 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...
robort/kafka
core/src/main/scala/kafka/common/ZkNodeChangeNotificationListener.scala
Scala
apache-2.0
5,263
package tree trait Fixture { /** Test trees are built with minChildren = 2 * (so branchingFactor = 4) to provoke early node splitting */ def bPlusTree = DemonstrationBPlusTree[Int, String](2) /** Data with keys in forward sequence. * * This set deliberately builds with a lone child on an end ...
rcrowther/DemonstrationBPlusTree
test/Fixture.scala
Scala
gpl-3.0
1,860
package de.leanovate.dose.cart.util import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.module.scala.DefaultScalaModule object Json { val jsonMapper = { val m = new ObjectMapper() m.registerModule(DefaultScalaModule) } def readValue[T](json: String, clazz: Class[T]): T = jso...
leanovate/microzon-cart
src/main/scala/de/leanovate/dose/cart/util/Json.scala
Scala
mit
520
import scala.reflect.runtime.universe._ import scala.reflect.runtime.{universe => ru} import scala.reflect.runtime.{currentMirror => cm} import scala.tools.reflect.ToolBox object Test extends dotty.runtime.LegacyApp { var q = 0 def foo[T: TypeTag](ys: List[T]): Int => Int = { val z = 1 var y = 0 val fu...
yusuke2255/dotty
tests/disabled/macro/run/reify_closure6.scala
Scala
bsd-3-clause
774
package conf import org.apache.spark.sql.SQLContext /** * Created by Abilash George Thomas on 9/22/2016. */ object ASqlContext { val sqlContext = new SQLContext(ASparkContext.getSparkContext()) def getSqlContest(): SQLContext = { return sqlContext; } }
abilashgt/study_bigdata
spark/basic_spark/src/main/scala/conf/ASqlContext.scala
Scala
apache-2.0
281
/* * Copyright 2020 Precog Data * * 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 ...
mossprescott/slamengine-pathy
scalacheck/src/main/scala/pathy/scalacheck/PathyArbitrary.scala
Scala
agpl-3.0
1,472
/* * 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/test/scala/org/scalatest/ShouldEqualEqualitySpec.scala
Scala
apache-2.0
25,630
/* * Copyright 2001-2008 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
JimCallahan/Graphics
external/scalatest/src/test/scala/org/scalatest/WordSpecSpec.scala
Scala
apache-2.0
35,584
package feh.tec.util import java.io.{File => JFile, InputStream, FileOutputStream, FileInputStream} import scala.util.{Success, Try} import scala.collection.mutable import scala.annotation.tailrec import scala.collection.mutable.ListBuffer import scala.io.Source object FileUtils extends FileUtils trait FileUtils { ...
fehu/agent-tareas
agent/src/main/scala/feh/tec/util/FileUtils.scala
Scala
mit
13,304
package is.hail.utils.richUtils import scala.collection.mutable class RichMutableMap[K, V](val m: mutable.Map[K, V]) extends AnyVal { def updateValue(k: K, default: => V, f: (V) => V) { m += ((k, f(m.getOrElse(k, default)))) } }
hail-is/hail
hail/src/main/scala/is/hail/utils/richUtils/RichMutableMap.scala
Scala
mit
239