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
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js Test Suite ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ ** ** /____/\\___/...
jasonchaffee/scala-js
test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/net/URITest.scala
Scala
bsd-3-clause
15,055
// Demonstrate identities as used by the request-reply pattern. // // @author Giovanni Ruggiero // @email [email protected] import org.zeromq.ZMQ import ZHelpers._ object identity { def main(args : Array[String]) { val context = ZMQ.context(1) val sink = context.socket(ZMQ.DEALER) sink.bind("inproc://...
soscpd/bee
root/tests/zguide/examples/Scala/identity.scala
Scala
mit
729
package breeze.collection.mutable /* Copyright 2012 David Hall Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or...
wavelets/breeze
src/main/scala/breeze/collection/mutable/OpenAddressHashArray.scala
Scala
apache-2.0
6,755
package com.coreyoconnor.stoa trait Exprs[Rep] { type TypeRep val types: Types[TypeRep] def ref: Int => Rep def abs: TypeRep => Rep => Rep def app: Rep => Rep => Rep def int: Int => Rep def bool: Boolean => Rep }
coreyoconnor/simply-typed-object-algebra
src/main/scala/com/coreyoconnor/stoa/Exprs.scala
Scala
bsd-3-clause
229
package kidstravel.client.components import kidstravel.client.services.{GetCityCandidates, UpdateCityCandidates} import kidstravel.shared.geo.CityLabel /** * Created by nobby on 26.08.16. */ object CitySearchBox extends SearchBox { override type T = CityLabel override def getAction = GetCityCandidates(_) ...
devkat/kidstravel
client/src/main/scala/kidstravel/client/components/CitySearchBox.scala
Scala
apache-2.0
412
/* * Copyright 2013 Akiyoshi Sugiki, University of Tsukuba * * 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 a...
axi-sugiki/kumoi
src/kumoi/impl/aaa/ref/HotRoleImpl.scala
Scala
apache-2.0
1,525
/* * Copyright (c) 2021, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ package com.krux.hyperion.expression /** * All fields that the object */ trait RunnableO...
realstraw/hyperion
core/src/main/scala/com/krux/hyperion/expression/RunnableObject.scala
Scala
bsd-3-clause
3,606
package org.scalaide.core.sbtbuilder import org.junit.Test import org.scalaide.core.internal.project.ScalaInstallation.platformInstallation import org.scalaide.core.internal.ScalaPlugin import org.junit.Assert class CompilerBridgeStoreTest { @Test def platformCompilerBridgeWorks(): Unit = { val store = Scala...
scala-ide/scala-ide
org.scala-ide.sdt.core.tests/src/org/scalaide/core/sbtbuilder/CompilerBridgeStoreTest.scala
Scala
bsd-3-clause
1,026
// Copyright (C) 2014 Fehmi Can Saglam (@fehmicans) and contributors. // 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 Licen...
ReactiveMongo/ReactiveMongo-Extensions
bson/src/main/scala/fixtures/BsonFixtures.scala
Scala
apache-2.0
1,974
/* * 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 ...
pgandhi999/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/orc/OrcPartitionReaderFactory.scala
Scala
apache-2.0
6,904
package com.github.ligangty.scala.jsoup.parser import com.github.ligangty.scala.jsoup.Jsoup import com.github.ligangty.scala.jsoup.nodes.{Attributes, Element} import com.github.ligangty.scala.jsoup.select.Elements import org.scalatest.FunSuite /** * Test suite for attribute parser. */ class AttributeParseTest exten...
ligangty/scalajsoup
src/test/scala/com/github/ligangty/scala/jsoup/parser/AttributeParseTest.scala
Scala
mit
2,224
/* * FScape.scala * (FScape) * * Copyright (c) 2001-2022 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU Affero General Public License v3+ * * * For further information, please contact Hanns Holger Rutz at * [email protected] */ package de.sciss.proc import de.scis...
Sciss/FScape-next
lucre/shared/src/main/scala/de/sciss/proc/FScape.scala
Scala
agpl-3.0
16,503
package satisfaction package hadoop package hive import ms.MetaStore import ms.HiveTable import ms.HiveDataOutput import ms.HiveTablePartitionGroup import satisfaction._ import scala.io.Source import _root_.org.apache.hadoop.hive.conf.HiveConf /** * A Hive Goal executes a Hive Query * to produce either a Hi...
jeromebanks/satisfaction
modules/hive/src/main/scala/satisfaction/hadoop/hive/HiveGoal.scala
Scala
apache-2.0
1,559
package edu.gemini.mascot.gui.contour import edu.gemini.ags.gems.mascot.Strehl import breeze.linalg._ import breeze.util._ /** * Utility class to create a contour plot from a Strehl object. */ object StrehlContourPlot { // Create and return a contour plot for the given Strehl object. def create(s: Strehl, size...
fnussber/ocs
bundle/jsky.app.ot/src/main/scala/edu/gemini/mascot/gui/contour/StrehlContourPlot.scala
Scala
bsd-3-clause
622
package org.bfn.ninetynineprobs import org.scalatest._ class P73Spec extends UnitSpec { // TODO }
bfontaine/99Scala
src/test/scala/P73Spec.scala
Scala
mit
105
package org.embulk.input.dynamodb import com.amazonaws.services.securitytoken.model.AWSSecurityTokenServiceException import org.embulk.config.{ConfigException, ConfigSource} import org.embulk.input.dynamodb.aws.AwsCredentials import org.embulk.input.dynamodb.testutil.EmbulkTestBase import org.hamcrest.CoreMatchers._ i...
lulichn/embulk-input-dynamodb
src/test/scala/org/embulk/input/dynamodb/AwsCredentialsTest.scala
Scala
mit
6,011
package com.gu.mobile.content.notifications.metrics import com.amazonaws.services.cloudwatch.AmazonCloudWatch import com.amazonaws.services.cloudwatch.model.PutMetricDataRequest import org.mockito.Mockito._ import org.mockito.{ ArgumentCaptor, Matchers } import org.scalatest.mockito.MockitoSugar import org.scalatest.{...
guardian/mobile-notifications-content
src/test/scala/com/gu/mobile/content/notifications/metrics/MetricsActorSpec.scala
Scala
apache-2.0
5,010
/** * Copyright 2017 Interel * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
Interel-Group/core3
src/main/scala/core3/http/controllers/ServiceControllerBase.scala
Scala
apache-2.0
2,911
/** * Copyright 2012 Jeffrey Cameron * * 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...
picklesdoc/pickles-jvm
core/src/test/scala/org/pickles/crawler/RelevantFileDeterminerSpec.scala
Scala
apache-2.0
4,432
/** * Copyright (c) 2014-2016 Tim Bruijnzeels * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * - Redistributions of source code must retain the above copyright notice, * this list of...
timbru/rpki-ca
src/main/scala/nl/bruijnzeels/tim/rpki/app/web/controllers/ApplicationController.scala
Scala
bsd-3-clause
3,682
package slick.collection.heterogeneous import scala.language.higherKinds import scala.language.experimental.macros import scala.annotation.unchecked.{uncheckedVariance => uv} import scala.reflect.macros.whitebox.Context import slick.lifted.{MappedScalaProductShape, Shape, ShapeLevel} import scala.reflect.ClassTag /**...
AtkinsChang/slick
slick/src/main/scala/slick/collection/heterogeneous/HList.scala
Scala
bsd-2-clause
7,432
import sbt._ object Dependencies { object Versions { val scala = "2.11.8" val atlas = "1.5.0-rc.6" val iep = "0.4.2" } import Versions._ val atlasStandalone = "com.netflix.atlas_v1" % "atlas-standalone" % atlas val iepModAdmin = "com.netflix.iep" % "iep-module-jmxport" % iep ...
brharrington/atlas-pkg-example
project/Dependencies.scala
Scala
apache-2.0
642
/* * 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-blink/src/test/scala/org/apache/flink/table/planner/plan/hint/OptionsHintTest.scala
Scala
apache-2.0
6,573
/* * 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/test/scala/org/apache/spark/util/io/ByteArrayChunkOutputStreamSuite.scala
Scala
apache-2.0
3,531
/* * Copyright 2014-2022 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 agr...
Netflix-Skunkworks/iep-apps
atlas-persistence/src/main/scala/com/netflix/atlas/persistence/AppModule.scala
Scala
apache-2.0
1,059
package sand.gcs.util import com.typesafe.config.ConfigFactory import java.io.File /** Singleton object containing the parsed version of the configuration files. */ object Config { private val defaultConfig = ConfigFactory.parseURL(getClass.getResource("/reference.conf")) /** Parsed configuration file. * ...
snowland/scala-gcs
src/main/scala/sand/gcs/util/Config.scala
Scala
bsd-3-clause
765
package io.github.interestinglab.waterdrop.filter import io.github.interestinglab.waterdrop.config.{Config, ConfigException, ConfigFactory} import io.github.interestinglab.waterdrop.apis.BaseFilter import org.apache.spark.sql.catalyst.encoders.RowEncoder import org.apache.spark.sql.types._ import org.apache.spark.sql....
InterestingLab/waterdrop
waterdrop-core/src/main/scala/io/github/interestinglab/waterdrop/filter/Table.scala
Scala
apache-2.0
6,939
/* * ArchFriends.scala * (Poirot) * * Copyright (c) 2013-2018 Hanns Holger Rutz. All rights reserved. * Code is often based on or identical to the original JaCoP Scala wrappers by * Krzysztof Kuchcinski and Radoslaw Szymanek. * * This software is published under the GNU Affero General Public License v3+ ...
Sciss/Poirot
src/test/scala/de/sciss/poirot/examples/ArchFriends.scala
Scala
agpl-3.0
3,035
/******************************************************************************* Copyright (c) 2013-2014, S-Core. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. ****************************************************************...
darkrsw/safe
src/main/scala/kr/ac/kaist/jsaf/analysis/typing/models/Tizen/TIZENCalendarItem.scala
Scala
bsd-3-clause
3,545
import scala.io._ val in = Source.fromFile("rankedDocs").getLines zip Source.fromFile("translatedDocs").getLines println("COSSIM,ACCIONES,ACTIONS,SHARES") for((lf,lt) <- in) { println(lf.substring(0,lf.indexOf(" ")) + "," + (if(lf.contains("acciones")) { "1" } else { "0" }) + "," + (if(lt.contains("actio...
monnetproject/bliss
betalm/scripts/acciones.scala
Scala
bsd-3-clause
413
package pl.touk.nussknacker.ui.db import slick.dbio.{DBIOAction, NoStream} import slick.jdbc.{JdbcBackend, JdbcProfile} import scala.concurrent.Future case class DbConfig(db: JdbcBackend.Database, driver: JdbcProfile) { def run[R](a: DBIOAction[R, NoStream, Nothing]): Future[R] = db.run(a) }
TouK/nussknacker
ui/server/src/main/scala/pl/touk/nussknacker/ui/db/DbConfig.scala
Scala
apache-2.0
297
package polynomial import algebra.ring.CommutativeRing import core.InfixOps._ private [polynomial] trait PolynomialRingOps[A] { implicit def coefficientRing: CommutativeRing[A] implicit def param: FormalParameter def zero: Polynomial[A] = Polynomial[A](param, coefficientRing.zero) def one: Polynomial[A] =...
dkettlestrings/thunder
src/main/scala/polynomial/PolynomialRingOps.scala
Scala
gpl-3.0
1,619
/* * 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 ...
CodingCat/spark-eventhubs
core/src/main/scala/org/apache/spark/sql/streaming/eventhubs/checkpoint/StructuredStreamingProgressTracker.scala
Scala
apache-2.0
4,457
/* * 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 ...
andrewor14/iolap
core/src/main/scala/org/apache/spark/scheduler/StageInfo.scala
Scala
apache-2.0
2,875
package moe.pizza.setthemred import java.net.URLEncoder import com.fasterxml.jackson.databind.{JsonMappingException, ObjectMapper} import com.fasterxml.jackson.module.scala.DefaultScalaModule import moe.pizza.crestapi.CrestApi import moe.pizza.eveapi.generated.eve.CharacterID import moe.pizza.evewho.Evewho import moe...
xxpizzaxx/set.them.red
src/main/scala/moe/pizza/setthemred/Webapp.scala
Scala
mit
9,202
/*********************************************************************** * 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-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/index/IndexPackageObjectTest.scala
Scala
apache-2.0
1,735
/* * 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/test/scala/uk/gov/hmrc/ct/computations/LowEmissionCarsAcceptanceCriteriaSpec.scala
Scala
apache-2.0
13,002
/* * 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/pensions-lifetime-allowance-frontend
app/common/Display.scala
Scala
apache-2.0
1,816
/* * Copyright 2013 TeamNexus * * TeamNexus Licenses this file to you under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: * * http://opensource.org/licenses/mit-license.php * * Unless required by applicable law ...
crvidya/nexus-scala
src/main/scala/com/nexus/errorhandling/ErrorReportCategory.scala
Scala
mit
1,776
package controllers import models.Greeting import play.api.i18n.Langs import play.api.libs.json.Json import play.api.mvc.{Action, Controller} import play.twirl.api.Html import services.GreetingService class GreeterController(greetingService: GreetingService, langs: Langs) extends Controller { val greetingsList = S...
play2-maven-plugin/play2-maven-test-projects
play25/scala/macwire-di-example/app/controllers/GreeterController.scala
Scala
apache-2.0
748
import collection.immutable.Seq import org.scalatest.FunSuite import org.scalatest.OneInstancePerTest import org.scalamock.scalatest.MockFactory import se.ramn.bottfarmen.simulation.entity.Position import se.ramn.bottfarmen.simulation.TileMap import se.ramn.bottfarmen.simulation.Scenario import se.ramn.bottfarmen.simu...
ramn/bottfarmen
common/src/test/scala/GeographyTest.scala
Scala
gpl-3.0
871
package graphics import java.awt.Color import java.awt.Graphics import java.util.List import structures._ /** Holder class for drawing the gravitational resultant effect. * @author Sean Lewis */ object ResultantDrawer { /** Draws the gravitational resultant from the ball. * @param level the level in the gam...
splewis/GravityGolf
src/main/scala/graphics/ResultantDrawer.scala
Scala
mit
1,356
/* * 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 ...
rmetzger/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/nodes/datastream/StreamTableSourceScan.scala
Scala
apache-2.0
8,323
import org.eclipse.jetty.server.Server import org.eclipse.jetty.webapp.WebAppContext import org.scalatra.servlet.ScalatraListener import pl.edu.agh.mplt.web.MPLTServlet object JettyLauncher { def main(args: Array[String]) { val port = if(System.getenv("PORT") != null) System.getenv("PORT").toInt else 8080 ...
marek1840/MPLT
src/main/scala/JettyLauncher.scala
Scala
mit
655
package com.marcosgarciacasado.ssbatch /** * Value aggregation class of sum and count operations. * * @author Marcos García Casado * */ class AggregatedTempValue (sumc : Double, countc : Double) extends Equals{ override def toString() = ""+(sum/count) /** * Sum value. */ var sum : Double = sumc...
marcos-garcia/smartsantanderdataanalysis
ssbatch/src/main/scala/com/marcosgarciacasado/ssbatch/AggregatedTempValue.scala
Scala
gpl-2.0
1,005
package com.peterpotts.snake import com.peterpotts.snake.predicate.{And, Predicate} case class Query[T]( predicate: Option[Predicate[T]], ordering: Option[Ordering[T]], skip: Option[Int], limit: Option[Int]) extends Queryable[Query, T] { override def filter(predicate: Predicate[T]) = copy( predicate = S...
peterpotts/snake
src/main/scala/com/peterpotts/snake/Query.scala
Scala
mit
1,114
package model /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Message class - rps * * Author: * Ryan Needham * * Issues: * * Notes: * * A message consists of the ID of the sender, a move and an * MVar result to set by the referee and then b...
MyForteIsTimeTravel/RockPaperScissors
src/model/Message.scala
Scala
gpl-3.0
1,052
/** * MIT License * * Copyright (c) 2016-2018 James Sherwood-Jones <[email protected]> * * 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, includi...
jSherz/lsd-members
backend/src/main/scala/com/jsherz/luskydive/dao/CommitteeMemberDao.scala
Scala
mit
3,156
package org.apache.mesos.chronos.utils import org.apache.mesos.chronos.scheduler.config.SchedulerConfiguration import org.apache.mesos.chronos.scheduler.jobs.{BaseJob, DependencyBasedJob, DockerContainer, EnvironmentVariable, NetworkMode, ScheduleBasedJob, Volume, VolumeMode} import com.fasterxml.jackson.core.JsonPars...
nvoron23/chronos
src/main/scala/org/apache/mesos/chronos/utils/JobDeserializer.scala
Scala
apache-2.0
8,096
package com.criteo.vizatra.vizsql.js.json import com.criteo.vizatra.vizsql.{Column, INTEGER, Schema, Table} import org.scalatest.{FlatSpec, Matchers} class SchemaReaderSpec extends FlatSpec with Matchers { "apply()" should "return a schema" in { val res = SchemaReader( """ |{ | "name":"sch...
criteo/vizsql
js/src/test/scala/com/criteo/vizatra/vizsql/js/json/SchemaReaderSpec.scala
Scala
apache-2.0
680
package com.twitter.finagle.buoyant import com.twitter.conversions.time._ import com.twitter.finagle._ import com.twitter.finagle.factory.{NameTreeFactory, ServiceFactoryCache} import com.twitter.finagle.naming._ import com.twitter.finagle.stats.{DefaultStatsReceiver, StatsReceiver} import com.twitter.finagle.util.Def...
pawelprazak/linkerd
router/core/src/main/scala/com/twitter/finagle/buoyant/DstBindingFactory.scala
Scala
apache-2.0
8,719
/* * 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
mllib/src/test/scala/org/apache/spark/ml/feature/StopWordsRemoverSuite.scala
Scala
apache-2.0
4,111
/** * 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...
OpenPOWER-BigData/HDP-kafka
core/src/main/scala/kafka/log/Log.scala
Scala
apache-2.0
39,194
/* * 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 ...
gyfora/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/api/stream/StreamTableEnvironmentTest.scala
Scala
apache-2.0
8,018
package org.bitcoins.testkit.util import grizzled.slf4j.Logging import org.bitcoins.core.util.NetworkUtil.portIsBound import org.bitcoins.tor.TorParams import java.net.{InetAddress, InetSocketAddress} import scala.util.Properties object TorUtil extends Logging { val torEnabled: Boolean = Properties .envOrNone...
bitcoin-s/bitcoin-s
testkit/src/main/scala/org/bitcoins/testkit/util/TorUtil.scala
Scala
mit
1,034
/* * Copyright 2014 Frugal Mechanic (http://frugalmechanic.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
frugalmechanic/fm-lazyseq
src/main/scala/fm/lazyseq/MergeCorrespondingLazySeq.scala
Scala
apache-2.0
3,719
package delta.java import java.util.Optional import java.util.function.{ BiConsumer, BiFunction } import delta.{ Revision, EventStore } import delta.write.Metadata import scala.concurrent._ import scala.util.control.NonFatal import scuff.concurrent.Threads.PiggyBack class EntityRepository[ESID, EVT, S >: Null, ID,...
nilskp/delta
delta-java/src/main/scala/delta/java/EntityRepository.scala
Scala
mit
4,686
/* * The MIT License (MIT) * * Copyright (c) 2014 MineFormers * * 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 use, ...
MineFormers/MFCore
src/main/scala/de/mineformers/core/client/renderer/TileRenderer.scala
Scala
mit
2,071
package almond.interpreter import almond.interpreter.api.{DisplayData, OutputHandler} import scala.collection.mutable.ListBuffer final class TestOutputHandler extends OutputHandler { import TestOutputHandler._ private val output = new ListBuffer[Output] private val lock = new Object def stdout(s: String):...
alexarchambault/jupyter-scala
modules/shared/test/src/main/scala/almond/interpreter/TestOutputHandler.scala
Scala
apache-2.0
1,159
package io.getquill object iqContext extends MirrorContext[MirrorIdiom, Literal] with ImplicitQuery with TestEntities object Test extends Function1[String, Test] { def apply(a: String) = new Test(a) } class Test(val a: String) extends Product { def canEqual(that: Any) = ??? def productArity: Int = ??? def pr...
jcranky/quill
quill-core/src/test/scala/io/getquill/ImplicitQuerySpec.scala
Scala
apache-2.0
1,178
object Test { def foo = 0 scala.reflect.runtime.universe.reify { foo/*#*/ } identity { foo/*#*/ } }
felixmulder/scala
test/files/presentation/hyperlinks-macro/src/MacroCall.scala
Scala
bsd-3-clause
120
package challenge3 import core._, Syntax._ /* * A writer data type that represents the pair of some * writer content with the production of a value. */ case class Writer[W, A](log: W, value: A) { def run: (W, A) = (log, value) /* * Exercise 3.1: * * Implement map for Writer[W, A]. * * The ...
Kimply/scala-challenge
src/main/scala/challenge3/Writer.scala
Scala
mit
4,505
import sbt._ class TestProject(info: ProjectInfo) extends ParentProject(info) { val sub = project("sub", "Sub Project", new SubProject(_)) def ivyCacheDirectory = outputPath / "ivy-cache" override def updateOptions = CacheDirectory(ivyCacheDirectory) :: super.updateOptions.toList class SubProject(info: ProjectIn...
matheshar/simple-build-tool
src/sbt-test/dependency-management/inherit-repo/project/build/src/TestProject.scala
Scala
bsd-3-clause
658
package jp.cappuccino.tools.markdown.jfx import javafx.application.Platform import javafx.scene.layout.Pane import javafx.scene.control.ChoiceBox import javafx.scene.control.Label import javafx.scene.control.MenuBar import javafx.scene.control.MenuItem import javafx.scene.control.RadioMenuItem import javafx.scene.cont...
keisuken/caffemarkdown
src/jp/cappuccino/tools/markdown/jfx/InitializableController.scala
Scala
mit
1,670
package org.jetbrains.plugins.scala package project import com.intellij.openapi.options.Configurable /** * @author Pavel Fatin */ abstract class AbstractConfigurable(name: String) extends Configurable with Configurable.NoScroll { def getDisplayName: String = name }
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/project/AbstractConfigurable.scala
Scala
apache-2.0
272
package at.logic.gapt.utils.testing import java.io.File import java.nio.file.Files import java.nio.file.StandardCopyOption._ /** * Copy resources from the classpath as actual files into the temporary directory. */ trait ClasspathFileCopier { private val basenameExtRegex = """(?:^|.*/)([^/]+)\\.([^./]+)""".r /*...
gisellemnr/gapt
src/main/scala/at/logic/gapt/utils/testing/ClasspathFileCopier.scala
Scala
gpl-3.0
1,139
package com.datamountaineer.streamreactor.connect.source import javax.naming.NameNotFoundException import javax.jms.Session import com.datamountaineer.streamreactor.connect.TestBase import com.datamountaineer.streamreactor.connect.jms.JMSSessionProvider import com.datamountaineer.streamreactor.connect.jms.config.{De...
CodeSmell/stream-reactor
kafka-connect-jms/src/test/scala/com/datamountaineer/streamreactor/connect/source/JMSSessionProviderTest.scala
Scala
apache-2.0
3,818
/* * Odessa State environmental University * Copyright (C) 2013 */ package ua.edu.odeku.ceem.mapRadar.tools import javax.swing.JPanel /** * User: Aleo Bakalov * Date: 10.12.13 * Time: 17:00 */ trait PanelTool { def rootPanel : JPanel }
aleo72/ww-ceem-radar
src/main/scala/ua/edu/odeku/ceem/mapRadar/tools/PanelTool.scala
Scala
apache-2.0
250
/* * Copyright 2014 Commonwealth Computer Research, 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...
mmatz-ccri/geomesa
geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/geohash/GeomDistanceTest.scala
Scala
apache-2.0
2,820
/* * Copyright (C) 2005, The OpenURP Software. * * 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 3 of the License, or * (at your option) any later version. * * This...
openurp/api
prac/src/main/scala/org/openurp/prac/innovation/model/Batch.scala
Scala
lgpl-3.0
1,309
/******************************************************************************* * (C) Copyright 2015 ADP, 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.apach...
adplabs/unicorn
unibase/src/main/scala/unicorn/unibase/graph/Graph.scala
Scala
apache-2.0
21,362
package me.sgrouples.rogue.cc import io.fsq.rogue.codecs.{IntegerPrimitiveCodec, LongPrimitiveCodec} import org.bson.codecs.configuration.CodecRegistries import org.bson.types.ObjectId import org.mongodb.scala.MongoClient import java.time.Instant object CcMongo { def oidFromInstant(d: Instant): ObjectId = { v...
sgrouples/rogue-fsqio
cc/src/main/scala/me/sgrouples/rogue/cc/CcMongo.scala
Scala
apache-2.0
770
/* * 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 ...
JihongMA/incubator-carbondata
integration/spark/src/main/scala/org/apache/spark/sql/CarbonDictionaryDecoder.scala
Scala
apache-2.0
9,537
/* * 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/amls-frontend
test/views/tradingpremises/registering_agent_premisesSpec.scala
Scala
apache-2.0
2,266
package BIDMach.causal import BIDMat.{Mat,SBMat,CMat,DMat,FMat,IMat,HMat,GMat,GIMat,GSMat,SMat,SDMat} import BIDMat.MatFunctions._ import BIDMat.SciFunctions._ import edu.berkeley.bid.CUMACH import scala.concurrent.future import scala.concurrent.ExecutionContext.Implicits.global import java.util.concurrent.Cou...
jamesjia94/BIDMach
src/main/scala/BIDMach/causal/IPTW.scala
Scala
bsd-3-clause
6,830
package io.buoyant.namer.consul import com.twitter.finagle.stats.StatsReceiver import com.twitter.finagle.{Addr, Failure} import com.twitter.util._ import io.buoyant.consul.v1 private[consul] object DcServices { /** * We use a shared stats object so that counters/stats are not * created anew for each DC/serv...
hhtpcd/linkerd
namer/consul/src/main/scala/io/buoyant/namer/consul/DcServices.scala
Scala
apache-2.0
4,165
/* * Copyright 2014-2020 Rik van der Kleij * * 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...
rikvdkleij/intellij-haskell
src/main/scala/intellij/haskell/external/component/HaskellComponentsManager.scala
Scala
apache-2.0
11,920
/* * 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 ...
adrian-ionescu/apache-spark
core/src/main/scala/org/apache/spark/status/LiveEntity.scala
Scala
apache-2.0
19,409
package renderer import communication.PlayerClient import gamelogic.GameState import globalvariables.VariableStorage import scala.scalajs.js import scala.scalajs.js.JSApp import scala.scalajs.js.timers.setTimeout import globalvariables.VariableStorage.retrieveValue import gui.UIParent import org.scalajs.do...
sherpal/oh-hell-card-game
gameplaying/src/main/scala/renderer/Renderer.scala
Scala
mit
2,087
package com.github.eerohele.expek import java.math.BigInteger import javax.xml.transform.Source import net.sf.saxon.s9api.{XdmNode, XdmNodeKind, XdmValue} import org.hamcrest.StringDescription import org.specs2.matcher.{AnyMatchers, Expectable, MatchFailure, MatchResult, MatchResultCombinators, Matcher} import org.xm...
eerohele/expek
src/main/scala/com/github/eerohele/expek/XsltResultMatchers.scala
Scala
mit
7,163
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ import sbt.ScriptedPlugin._ import sbt._ import Keys.{version, _} import com.typesafe.tools.mima.core._ import com.typesafe.tools.mima.plugin.MimaKeys._ import com.typesafe.tools.mima.plugin.MimaPlugin._ import de.heikoseeberger.sbtheader.He...
zaneli/playframework
framework/project/BuildSettings.scala
Scala
apache-2.0
15,796
object Sample { var i = 1 def foo = { i = i + 1 i } def main(args: Array[String]) { "stop here" } }
consulo/consulo-scala
testdata/debugger/ScalaMethodEvaluation/changingFunction/src/Sample.scala
Scala
apache-2.0
121
package toguru.play import java.util.UUID import akka.util.Timeout import org.scalatest.OptionValues._ import org.scalatest.matchers.must.Matchers import org.scalatest.wordspec.AnyWordSpec import play.api.http.HttpVerbs import play.api.test.{FakeRequest, Helpers} import toguru.api._ import toguru.impl.RemoteActivatio...
AutoScout24/toguru-scala-client
play/src/test/scala/toguru/play/PlaySupportSpec.scala
Scala
mit
3,947
package sample.hello import akka.actor._ import java.io._ import collection.JavaConversions._ import edu.stanford.nlp.pipeline.Annotation import edu.stanford.nlp.pipeline.StanfordCoreNLP import java.util.Properties import edu.stanford.nlp.ling.CoreAnnotations.{TokenBeginAnnotation, LemmaAnnotation, TokensAnnotation, Se...
SteliosKats/Plagiarism_Detection_System_Using_Akka
src/main/scala/sample/hello/LineLemmaExtractor.scala
Scala
cc0-1.0
2,590
/* * Copyright 2010-2011 Vilius Normantas <[email protected]> * * This file is part of Crossbow library. * * Crossbow 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 ...
ViliusN/Crossbow
crossbow-core/src/lt/norma/crossbow/indicators/SumSet.scala
Scala
gpl-3.0
1,374
/** * Licensed to the Minutemen Group under one or more contributor license * agreements. See the COPYRIGHT file distributed with this work for * additional information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in complian...
mohiva/silhouette
modules/provider-social/src/main/scala/silhouette/provider/social/SocialStateException.scala
Scala
apache-2.0
1,072
package com.jd.common import scala.collection.mutable.ListBuffer import akka.actor.Actor import akka.actor.ActorRef import akka.actor.Props import akka.actor.actorRef2Scala import akka.routing.FromConfig sealed class Helper(count: Int, replyTo: ActorRef) extends Actor { val perfectNumbers = new ListBuffer[Int] v...
pengyanhong/demoAkka
src/com/jd/common/MasterActor.scala
Scala
apache-2.0
1,407
/* * Copyright 2017 Datamountaineer. * * 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...
datamountaineer/kafka-connect-common
src/main/scala/com/datamountaineer/streamreactor/connect/config/base/traits/SSLSettings.scala
Scala
apache-2.0
1,658
package com.wordtrellis.projecteuler /** * Problem 30 * * Surprisingly there are only three numbers that can be written as the sum of fourth powers * of their digits: * * 1634 = 1^(4) + 6^(4) + 3^(4) + 4^(4) * 8208 = 8^(4) + 2^(4) + 0^(4) + 8^(4) * 9474 = 9^(4) + 4^(4) + 7^(4) + 4^(4) * * As 1 ...
todd-cook/Effective-Scala-with-Project-Euler
src/main/scala/com/wordtrellis/projecteuler/problem_30.scala
Scala
mit
1,811
package com.github.agourlay.cornichon.http import cats.Show import cats.syntax.show._ import com.github.agourlay.cornichon.util.Printing._ import com.github.agourlay.cornichon.resolver.Resolvable import io.circe.Encoder import scala.concurrent.duration.FiniteDuration case class HttpMethod(name: String) object Htt...
agourlay/cornichon
cornichon-core/src/main/scala/com/github/agourlay/cornichon/http/HttpRequest.scala
Scala
apache-2.0
4,357
/* * Shadowsocks - A shadowsocks client for Android * Copyright (C) 2014 <[email protected]> * * 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 y...
ListFranz/shadowsocks-android
src/main/scala/com/github/shadowsocks/ShadowsocksVpnService.scala
Scala
gpl-3.0
12,713
package eventstore import eventstore.akka.Settings import eventstore.core.{settings => cs} import eventstore.{core => c} private[eventstore] trait CoreCompat { private lazy val RequireMaster: Boolean = Settings.Default.requireMaster private lazy val ResolveLinkTos: Boolean = Settings.Default.resolveLinkTos pr...
EventStore/EventStore.JVM
client/src/main/scala/eventstore/CoreCompat.scala
Scala
bsd-3-clause
6,813
package com.github.jeroenr.tepkin import akka.actor.ActorRef import akka.pattern.ask import akka.stream.scaladsl.{Sink, Source} import akka.util.Timeout import com.github.jeroenr.bson.{BsonDocument, BsonValueNumber, Bulk} import com.github.jeroenr.tepkin.protocol.WriteConcern import com.github.jeroenr.tepkin.protocol....
jeroenr/tepkin
tepkin/src/main/scala/com/github/jeroenr/tepkin/MongoCollection.scala
Scala
apache-2.0
16,357
/* * Copyright (C) 2005, The Beangle Software. * * 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 3 of the License, or * (at your option) any later version. * * This...
beangle/commons
csv/src/test/scala/org/beangle/commons/csv/CsvTest.scala
Scala
lgpl-3.0
1,342
package net.ceedubs.scrutinator package scalatra import scalaz._ import shapeless._ import org.scalatra.validation.{ FieldName, ValidationError, ValidationFail => ScalatraValidationFail } trait ScalatraSupport { def validator[L <: HList](fields: L)(implicit binder: FieldBinder[L, Request]): Kleisli[ValidationErrors...
ceedubs/scrutinator
scalatra/src/main/scala/net/ceedubs/scrutinator/scalatra/ScalatraSupport.scala
Scala
mit
1,002
package com.twitter.finagle.tunable import com.twitter.util.tunable.{NullTunableMap, JsonTunableMapper, ServiceLoadedTunableMap, TunableMap} import com.twitter.finagle.server.ServerInfo import java.util.concurrent.ConcurrentHashMap import java.util.function.{Function => JFunction} import scala.collection.JavaConverte...
koshelev/finagle
finagle-tunable/src/main/scala/com/twitter/finagle/tunable/StandardTunableMap.scala
Scala
apache-2.0
2,729
/*********************************************************************** * 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/geotools/GeoMesaDataStore.scala
Scala
apache-2.0
26,638
package mesosphere.marathon package core.task import mesosphere.UnitTest import mesosphere.marathon.test.SettableClock import mesosphere.marathon.core.condition.Condition import mesosphere.marathon.core.instance.TestTaskBuilder import mesosphere.marathon.core.task.bus.MesosTaskStatusTestHelper import mesosphere.marath...
Caerostris/marathon
src/test/scala/mesosphere/marathon/core/task/TaskStatusUpdateTest.scala
Scala
apache-2.0
2,384
package scuff.concurrent import scala.concurrent._, duration._ import scala.util.control.NonFatal import scala.util.Try object JavaFutureConverter { def apply( failureReporter: Throwable => Unit, sleep: FiniteDuration = 1.millisecond): JavaFutureConverter = { val conv = new JavaFutureConverter(failu...
nilskp/scuff
src/main/scala/scuff/concurrent/JavaFutureConverter.scala
Scala
mit
1,821
/* * 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/api-example-scala-client
app/controllers/HelloWorld.scala
Scala
apache-2.0
1,065