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) 2014, Cloudera, Inc. All Rights Reserved. * * Cloudera, Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"). You may not use this file except in * compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICE...
jhlch/anomaly-detector
src/main/scala/com/cloudera/oryx/example/ExampleScalaBatchLayerUpdate.scala
Scala
apache-2.0
1,166
package net.liftmodules.cluster.kryo import com.twitter.chill._ import net.liftmodules.cluster.SessionMaster import net.liftweb.http.provider.HTTPSession import _root_.java.util.{ ResourceBundle, Locale } class LiftInstantiator extends ScalaKryoInstantiator { override def newKryo(): KryoBase = { val k = super.n...
joescii/lift-cluster
kryo/src/main/scala/net/liftmodules/cluster/kryo/LiftInstantiator.scala
Scala
apache-2.0
1,555
package org.mccandless.minotaur.utils /** * Memoizes functions for more efficient evaluation. * * Created by tdm on 12/3/17. */ class Memoizer[A, B] { import scala.collection.mutable val cache: mutable.Map[A, B] = mutable.Map.empty def memoize(f: A => B): A => B = { (a: A) => this.cache.getOrElseUpd...
tomnis/minotaur
src/main/scala/org/mccandless/minotaur/utils/Memoizer.scala
Scala
mit
339
/* * Copyright (c) 2014-2021 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...
monixio/monix
monix-execution/js/src/main/scala/monix/execution/atomic/AtomicBoolean.scala
Scala
apache-2.0
4,020
package org.bitcoins.spvnode.bloom import org.bitcoins.core.crypto.{DoubleSha256Digest, HashDigest, Sha256Hash160Digest} import org.bitcoins.core.number.{UInt32, UInt64} import org.bitcoins.core.protocol.script.{MultiSignatureScriptPubKey, P2PKHScriptPubKey, P2PKScriptPubKey, ScriptPubKey} import org.bitcoins.core.pro...
bitcoin-s/bitcoin-s-spv-node
src/main/scala/org/bitcoins/spvnode/bloom/BloomFilter.scala
Scala
mit
13,556
package deebee package sql package ast /** * Trait for a node in a SQL abstract syntax tree. * * @author Hawk Weisman * * Created by hawk on 11/21/14. */ trait Node { /** * Re-emit the SQL statement(s) corresponding to this node * @return */ def emitSQL: String override def toString = emitSQL }
hawkw/deebee
src/main/scala/deebee/sql/ast/Node.scala
Scala
mit
317
package org.jetbrains.plugins.scala package codeInsight package intention package types import com.intellij.codeInsight.intention.PsiElementBaseIntentionAction import com.intellij.openapi.command.undo.UndoUtil import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.psi...
katejim/intellij-scala
src/org/jetbrains/plugins/scala/codeInsight/intention/types/ConvertToInfixIntention.scala
Scala
apache-2.0
2,374
package io.github.loustler.abstractInternalControl /** * @author loustler * @since 07/21/2017 21:03 */ object ClientSimpleCode { def containsNeg(nums: List[Int]): Boolean = { for (num <- nums) if (num < 0) return true false } def containsNeg2(nums: List[Int]) = nums.exists(_ < 0) ...
loustler/sKaLa
src/main/scala/io/github/loustler/abstractInternalControl/ClientSimpleCode.scala
Scala
apache-2.0
513
/* * 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 ...
dbtsai/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/connection/MariaDBConnectionProvider.scala
Scala
apache-2.0
1,896
/* * 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 ...
h2oai/sparkling-water
core/src/main/scala_spark_others/org/apache/spark/h2o/ui/AppStatusListener.scala
Scala
apache-2.0
2,653
package w.tool import scala.io.Source import scala.util.Random import java.lang.Boolean import java.io.FileOutputStream import java.io.BufferedWriter import java.io.OutputStream import java.io.OutputStreamWriter import java.io.IOException import scala.concurrent.Future import scala.concurrent.ExecutionContext.Implicit...
wuv1982/ObjGuard
src/main/scala/w/tool/Obfuscation.scala
Scala
mit
2,354
/* * 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 n...
sebadiaz/kafka
core/src/main/scala/kafka/common/InterBrokerSendThread.scala
Scala
apache-2.0
7,083
package io.iohk.ethereum.network.handshaker import io.iohk.ethereum.network.EtcPeerManagerActor.{PeerInfo, RemoteStatus} import io.iohk.ethereum.network.ForkResolver import io.iohk.ethereum.network.handshaker.Handshaker.NextMessage import io.iohk.ethereum.network.p2p.messages.PV62.{BlockHeaders, GetBlockHeaders} impor...
input-output-hk/etc-client
src/main/scala/io/iohk/ethereum/network/handshaker/EtcForkBlockExchangeState.scala
Scala
mit
2,509
package org.rebeam.boxes.graph import java.awt.Image import org.rebeam.boxes.swing.ImageThirds //Draw a horizontal component made up of a left, middle and right portion. Portions are //taken from the thirds of an image, and middle is stretched horizontally to fit. class GraphThreePartPainter(image: Image) { val thi...
trepidacious/boxes-graph
src/main/scala/org/rebeam/boxes/graph/GraphThreePartPainter.scala
Scala
gpl-2.0
1,159
package be.objectify.deadbolt.scala.test.controllers.composed import be.objectify.deadbolt.scala.test.controllers.{AbstractControllerSpec, CompositionBased} import play.api.test.WithServer /** * @author Steve Chaloner ([email protected]) */ class CompositeSpec extends AbstractControllerSpec with CompositionBased...
schaloner/deadbolt-2-scala
test-app/test/be/objectify/deadbolt/scala/test/controllers/composed/CompositeSpec.scala
Scala
apache-2.0
2,407
package net.chwthewke.passman package cli import cats.instances.string._ import cats.syntax.either._ import cats.syntax.eq._ import java.nio.file.Path import mouse.boolean._ import scala.xml.XML import data.legacy._ import engine._ import model._ object PasswordEngine { val engine = PasswordDerivationEngine.Defau...
chwthewke/passman
passman-cli/src/main/scala/net/chwthewke/passman/cli/PasswordEngine.scala
Scala
bsd-3-clause
1,400
/* * Copyright 2017 WeightWatchers * * 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 ...
WW-Digital/reactive-kinesis
src/main/scala/com/weightwatchers/reactive/kinesis/consumer/KinesisConsumer.scala
Scala
apache-2.0
13,133
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala.collection pac...
scala/scala
src/library/scala/collection/generic/package.scala
Scala
apache-2.0
1,154
/////////////////////////////////////////////////////////////////////////////// // Hadoop.scala // // Copyright (C) 2011, 2012 Ben Wing, The University of Texas at Austin // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You...
utcompling/fieldspring
src/main/scala/opennlp/fieldspring/geolocate/Hadoop.scala
Scala
apache-2.0
17,869
/* Copyright 2013 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...
sengt/summingbird-batch
summingbird-client/src/main/scala/com/twitter/summingbird/store/SideEffectStore.scala
Scala
apache-2.0
1,382
/* * CirceBridgeProtocol.scala * * Updated: Feb 19, 2016 * * Copyright (c) 2016, CodeMettle */ package jsactor.bridge.protocol import java.util.UUID import io.circe._ import io.circe.parser._ import jsactor.bridge.protocol.CirceBridgeProtocol.{MessageRegistry, failureEntry, successEntry} import scala.annotatio...
CodeMettle/jsactor
jsactor-bridge-shared-circe/src/main/scala/jsactor/bridge/protocol/CirceBridgeProtocol.scala
Scala
apache-2.0
4,240
package io.github.mandar2812.dynaml.utils.sumac.types import collection.mutable.LinkedHashSet class SelectInput[T](var value: Option[T], val options: LinkedHashSet[T]) object SelectInput{ def apply[T](options: T*) = new SelectInput[T](value = None, options = (LinkedHashSet.empty ++ options)) def apply[T](value: ...
transcendent-ai-labs/DynaML
dynaml-core/src/main/scala/io/github/mandar2812/dynaml/utils/sumac/types/SelectInput.scala
Scala
apache-2.0
438
package com.lot.marketEvent.tests import com.lot.test.BaseTest import com.lot.generators.OrderFactory import com.lot.marketEvent.model.MarketEvent import com.lot.marketEvent.dao.MarketEventDao import scala.collection.mutable.ListBuffer import com.lot.generators.MarketEventFactory class MarketEventDaoTest extends Base...
thimmaiah/life_of_a_trade_scala
src/test/scala/com/lot/market_event/test/MarketEventDaoTest.scala
Scala
apache-2.0
3,952
package controllers import javax.inject.Inject import play.api.mvc.{Action, Controller} import scala.concurrent.{ExecutionContext, Future} /** * @author ponkotuy * Date: 15/03/10. */ class MyAssets @Inject()(implicit val ec: ExecutionContext) extends Controller { def at(path: String, file: String, aggressiveCa...
kxbmap/MyFleetGirls
server/app/controllers/MyAssets.scala
Scala
mit
870
import org.junit.Test import org.junit.Assert._ class Test1 { @Test def t1(): Unit = { assertEquals("I was compiled by Scala 3. :)", msg) } }
diegopacheco/scala-playground
scala-3-playground/scala-3-playground/src/test/scala/Test1.scala
Scala
unlicense
151
/* * 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 ...
aokolnychyi/spark
core/src/test/scala/org/apache/spark/scheduler/SparkListenerSuite.scala
Scala
apache-2.0
20,381
package com.ctask.storage import com.ctask.data.Task.Recurrence import com.ctask.data.{Task, TaskList} import org.scalatest.{FlatSpec, Matchers} import scala.util.{Failure, Success} /** * Common abstract class for the storage specs implementations. */ abstract class StorageSpec extends FlatSpec with Matchers { ...
modsrm/ctask
server/src/test/scala/com/ctask/storage/StorageSpec.scala
Scala
gpl-3.0
10,713
package uk.co.morleydev.zander.client.validator trait ValidatorFactory { def createValidateArtefactDetailsDoNotExist() : ValidateArtefactDetailsExistence def createValidateArtefactDetailsExist() : ValidateArtefactDetailsExistence }
MorleyDev/zander.client
src/main/scala/uk/co/morleydev/zander/client/validator/ValidatorFactory.scala
Scala
mit
239
package java.lang import scala.scalajs.js import java.util.Arrays @inline class Character(private val value: scala.Char) extends Comparable[Character] { def charValue(): scala.Char = value override def equals(that: Any): scala.Boolean = that.isInstanceOf[Character] && (value == that.asInstanceOf[Character]...
jmnarloch/scala-js
javalanglib/src/main/scala/java/lang/Character.scala
Scala
bsd-3-clause
47,167
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js Test Suite ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ ** ** /____/\\___/...
matthughes/scala-js
test-suite/src/test/scala/org/scalajs/testsuite/jsinterop/DictionaryTest.scala
Scala
bsd-3-clause
4,080
object G { trait Wizzle { type X <: Int with Singleton type Y <: Int with Singleton type Bar[A] = A match { case X => String case Y => Int } def left(fa: String): Bar[X] = fa def center[F[_]](fa: F[X]): F[Y] def right(fa: Bar[Y]): Int...
lampepfl/dotty
tests/neg/6314-4.scala
Scala
apache-2.0
682
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
wzhongyuan/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/utils/intermediate/ConversionUtils.scala
Scala
apache-2.0
3,447
package org.precompiler.scala101.ch13 import java.io.File import akka.actor.{Actor, ActorSystem, Props} import akka.routing.RoundRobinPool /** * * @author Richard Li */ object AkkaConcurrencyDemo extends App { val system = ActorSystem("FileCounter") val counter = system.actorOf(Props[FileCounter]) counte...
precompiler/scala-101
learning-scala/src/main/scala/org/precompiler/scala101/ch13/AkkaConcurrencyDemo.scala
Scala
apache-2.0
1,204
package endpoints.documented.openapi import endpoints.algebra.MuxRequest import endpoints.documented.algebra trait MuxEndpoints extends algebra.MuxEndpoints with Endpoints { type MuxEndpoint[Req <: MuxRequest, Resp, Transport] = DocumentedEndpoint def muxEndpoint[Req <: MuxRequest, Resp, Transport]( request...
Krever/endpoints
openapi/openapi/src/main/scala/endpoints/documented/openapi/MuxEndpoints.scala
Scala
mit
447
package es.weso.utils import com.hp.hpl.jena.rdf.model.LiteralRequiredException import com.hp.hpl.jena.rdf.model.Model import com.hp.hpl.jena.rdf.model.ModelFactory import com.hp.hpl.jena.rdf.model.Resource import com.hp.hpl.jena.rdf.model.ResourceRequiredException import com.hp.hpl.jena.rdf.model.Statement import jav...
weso/wiCompute
src/main/scala/es/weso/utils/JenaUtils.scala
Scala
mit
12,893
package com.mb.akkaremotechat.actors.client import com.mb.akkaremotechat.utils.GlobalMessages._ import com.mb.akkaremotechat.utils.ClientMessages import akka.actor._ class Supervisor extends Actor with ActorLogging { private val serverSupervisor = context.actorSelection("akka.tcp://[email protected]:5150/use...
maxbundscherer/akka-remote-scala-chat
src/main/scala/com/mb/akkaremotechat/actors/client/Supervisor.scala
Scala
apache-2.0
561
package com.wavesplatform import java.lang.reflect.Constructor import com.wavesplatform.account.{PrivateKey, PublicKey} import com.wavesplatform.common.state.ByteStr import com.wavesplatform.lang.ValidationError import com.wavesplatform.transaction.TxValidationError.GenericError import com.wavesplatform.utils._ impor...
wavesplatform/Waves
node/src/main/scala/com/wavesplatform/crypto/package.scala
Scala
mit
4,392
package services.sitedata import javax.inject._ import scala.concurrent.Future import utils.Awaits import models.sitedata.LineType import dao.sitedata.LineTypeDao import dao.sitedata.ILineTypeDao trait ILineTypeService extends BaseService[LineType]{ def insert(linetype: LineType): Future[Unit] def update(id: Long...
tnddn/iv-web
portal/rest-portal/app/services/sitedata/LineTypeService.scala
Scala
apache-2.0
1,737
/** * Practica de conjuntos funcionales */ object ConjuntoFuncional { /** * Un conjunto funcional se representa mediante una funcion * caracteristica, un predicado. De esta forma, se declara * el tipo conjunto como un predicado que recibe un entero * (elemento) como argumento y devuelve un valor ...
romanarranz/NTP
P3/src/ConjuntoFuncional.scala
Scala
mit
4,097
package dotty.tools package dotc.util /** A common class for lightweight mutable maps. */ abstract class MutableMap[Key, Value] extends ReadOnlyMap[Key, Value]: def update(k: Key, v: Value): Unit def remove(k: Key): Value | Null def -=(k: Key): this.type = remove(k) this def clear(): Unit def g...
dotty-staging/dotty
compiler/src/dotty/tools/dotc/util/MutableMap.scala
Scala
apache-2.0
369
package org.lolhens.minechanics.core.storageaccess.json import org.lolhens.minechanics.core.storageaccess._ import scala.collection.JavaConversions._ import scala.collection.mutable class JsonList(override val obj: java.util.List[_]) extends ValidJsonObject[java.util.List[_]](obj) { override def apply(i: Int) = if...
LolHens/Minechanics
src/main/scala/org/lolhens/minechanics/core/storageaccess/json/JsonList.scala
Scala
gpl-2.0
621
package de.kaufhof.hajobs import akka.actor.{ActorNotFound, ActorSystem} import com.datastax.driver.core.utils.UUIDs import de.kaufhof.hajobs import de.kaufhof.hajobs.JobManagerSpec._ import de.kaufhof.hajobs.testutils.MockInitializers import org.mockito.Matchers._ import org.mockito.Mockito._ import org.mockito.invoc...
bryanriddle/ha-jobs
ha-jobs-core/src/test/scala/de/kaufhof/hajobs/JobManagerSpec.scala
Scala
apache-2.0
6,850
package sttp.client3.httpclient import sttp.client3.testing.{ConvertToFuture, HttpTest} import sttp.client3.{Identity, SttpBackend} class HttpClientSyncHttpTest extends HttpTest[Identity] { override val backend: SttpBackend[Identity, Any] = HttpClientSyncBackend() override implicit val convertToFuture: ConvertToF...
softwaremill/sttp
httpclient-backend/src/test/scala/sttp/client3/httpclient/HttpClientSyncHttpTest.scala
Scala
apache-2.0
563
package scala.generator import org.scalatest.funspec.AnyFunSpec import org.scalatest.matchers.should.Matchers class TargetSpec extends AnyFunSpec with Matchers { private lazy val service = models.TestHelper.generatorApiService it("Has a field named target") { service.models.find(_.name == "generator").get.f...
gheine/apidoc-generator
scala-generator/src/test/scala/models/generator/TargetSpec.scala
Scala
mit
424
package org.genericConfig.admin.client.views.html /** * Copyright (C) 2016 Gennadi Heimann [email protected] * * Created by Gennadi Heimann 25.05.2018 */ object HtmlElementIds { def mainHtml = "main" def mainJQuery = "#main" def htmlConfigGraphNodeEdit = "configGraphNodeEdit" d...
gennadij/admin
client/src/main/scala/org/genericConfig/admin/client/views/html/HtmlElementIds.scala
Scala
apache-2.0
2,751
package com.github.vitalsoftware.util import com.github.vitalsoftware.macros.{ json, jsonDefaults } import org.specs2.mutable.Specification import play.api.libs.json._ @json case class Person(name: String, age: Int, gender: Option[String]) @jsonDefaults case class Person2(name: String, age: Int = 7, gender: Option[St...
vital-software/scala-redox
src/test/scala/com/github/vitalsoftware/util/RobustParsingTest.scala
Scala
mit
6,838
object Foo { // error def bar: Int = "LOL" }
som-snytt/dotty
tests/vulpix-tests/unit/negAnnotWrongLine.scala
Scala
apache-2.0
47
package com.github.tototoshi.play2.auth.social.providers.slack import com.github.tototoshi.play2.auth.social.core.OAuth2Controller import com.github.tototoshi.play2.auth.{ AuthConfig, Login, OptionalAuthElement } trait SlackController extends OAuth2Controller with AuthConfig with OptionalAuthElement with ...
tototoshi/play2-auth
social/src/main/scala/com/github/tototoshi/play2/auth/social/providers/slack/SlackController.scala
Scala
apache-2.0
376
package org.fedoraproject.mobile import Implicits._ import android.os.Bundle import android.preference.PreferenceFragment import scalaz._, Scalaz._ import scalaz.effect.IO class PreferencesFragment extends PreferenceFragment with TypedFragment { override def onCreate(savedInstanceState: Bundle): Unit = IO { s...
fedora-infra/mobile
src/main/scala/fragment/PreferencesFragment.scala
Scala
mpl-2.0
427
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
intel-analytics/BigDL
scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/utils/Crc32.scala
Scala
apache-2.0
1,373
package org.jetbrains.jps.incremental.scala.remote import java.io._ import java.net.{InetAddress, Socket} import com.intellij.util.Base64Converter import com.martiansoftware.nailgun.NGConstants import org.jetbrains.jps.incremental.messages.BuildMessage.Kind import org.jetbrains.jps.incremental.scala._ /** * @author...
triplequote/intellij-scala
scala/compiler-shared/src/org/jetbrains/jps/incremental/scala/remote/RemoteResourceOwner.scala
Scala
apache-2.0
3,441
package scala { package meta { package config { case class Version() trait Aliases { type Version = scala.meta.config.Version val Version = scala.meta.config.Version } } } package object meta extends scala.meta.config.Aliases }
som-snytt/dotty
tests/pos/i2551/library_1.scala
Scala
apache-2.0
278
/* *\\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2014, G...
non/squants
src/test/scala/squants/time/TimeDerivativeSpec.scala
Scala
apache-2.0
1,577
package org.scalatra package commands import mojolly.inflector.InflectorImports._ import org.scalatra.util.RicherString._ import org.scalatra.util.conversion._ import org.scalatra.validation._ import scalaz.Validation.FlatMap._ import scalaz._ import scalaz.syntax.std.option._ import scalaz.syntax.validation._ objec...
lightvector/scalatra
commands/src/main/scala/org/scalatra/commands/field.scala
Scala
bsd-2-clause
21,456
/* * Copyright (c) 2016 LIBBLE team supervised by Dr. Wu-Jun LI at Nanjing University. * All Rights Reserved. * 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/li...
syh6585/LIBBLE-Spark
src/main/scala/examples/testKMeans.scala
Scala
apache-2.0
2,131
package mr.merc.map.hex import mr.merc.map.hex.Direction._ private[hex] case class CubeHex(x: Int, y: Int, z: Int) { def toHex: Hex = { val q = x val r = z + (x - (x & 1)) / 2 new Hex(q, r) } def toAxialHex: AxialHex = AxialHex(x, z) private lazy val cubeDirections = Map(SE -> (+1, -1, 0), NE -...
RenualdMarch/merc
src/main/scala/mr/merc/map/hex/CubeHex.scala
Scala
gpl-3.0
589
class Foo0 extends (() => Double) { def apply() = 5.0d } class Foo1 extends (Double => Double) { def apply(x: Double) = x } object Test { def main(args: Array[String]): Unit = { println((new Foo0)()) println((new Foo1)(5.0d)) } }
lampepfl/dotty
tests/run/spec-self.scala
Scala
apache-2.0
248
package example import org.scalatest._ import skinny.jackson.JSONStringOps case class Samples(samples: Seq[Sample]) case class Sample(id: Long, firstName: String) case class SamplePerson(name: Option[String] = None, parent: SamplePerson, children: Seq[SamplePerson] = Nil) class JSONOperation2Spec extends FlatSpec wi...
xerial/skinny-micro
micro-jackson/src/test/scala/example/JSONOperation2Spec.scala
Scala
bsd-2-clause
3,951
package se.gigurra.leavu3.datamodel import com.github.gigurra.heisenberg.MapData._ import com.github.gigurra.heisenberg.{Schema, Parsed} case class FlightModel(source: SourceData = Map.empty) extends SafeParsed[FlightModel.type] { /*val pitch = parse(schema.pitch).toDegrees val roll = par...
GiGurra/leavu3
src/main/scala/se/gigurra/leavu3/datamodel/FlightModel.scala
Scala
mit
2,561
package com.twitter.streaming import com.twitter.finatra.http.HttpServer import com.twitter.finatra.http.filters.CommonFilters import com.twitter.finatra.http.routing.HttpRouter object StreamingServerMain extends StreamingServer class StreamingServer extends HttpServer { override def streamRequest = true overri...
syamantm/finatra
examples/streaming-example/src/main/scala/com/twitter/streaming/StreamingServer.scala
Scala
apache-2.0
441
package com.twitter.finagle.service import com.twitter.finagle._ import com.twitter.util.Future import java.util.concurrent.RejectedExecutionException import java.util.concurrent.atomic.AtomicInteger /** * A module which allows clients to limit the number of pending * requests per connection. */ object PendingRequ...
liamstewart/finagle
finagle-core/src/main/scala/com/twitter/finagle/service/PendingRequestFilter.scala
Scala
apache-2.0
2,356
package javaee6.web.rest import javax.ws.rs.ApplicationPath import javax.ws.rs.core.Application @ApplicationPath("/rest") class JaxrsApplication extends Application
kazuhira-r/javaee6-scala-examples
arquillian-remote/src/main/scala/javaee6/web/rest/JaxrsApplication.scala
Scala
mit
167
package AccurateML.nonLinearRegression import breeze.linalg.{DenseMatrix => BDM, DenseVector => BDV, _} import org.apache.spark.mllib.linalg.{DenseMatrix, Vector, Vectors} import org.apache.spark.rdd._ import AccurateML.blas.ZFBLAS import scala.collection.mutable.ArrayBuffer /** * @author Nodalpoint * I...
harryandlina/ARIM
project/nonLinearRegression/SumOfSquaresFunctionRDD.scala
Scala
apache-2.0
9,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...
kavink92/kafka-0.8.0-beta1-src
core/src/main/scala/kafka/api/FetchRequest.scala
Scala
apache-2.0
7,555
/* * 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 ...
clarkyzl/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/runtime/stream/table/CorrelateITCase.scala
Scala
apache-2.0
10,853
/* * 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...
slamdata/slamengine
impl/src/main/scala/quasar/impl/schema/Occurred.scala
Scala
apache-2.0
1,958
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
holdenk/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2ScanRelationPushDown.scala
Scala
apache-2.0
16,582
package lila.pool import scala.concurrent.duration._ object PoolList { import PoolConfig._ val all: List[PoolConfig] = List( PoolConfig(1 ++ 0, Wave(13 seconds, 20 players)), PoolConfig(2 ++ 1, Wave(18 seconds, 20 players)), PoolConfig(3 ++ 0, Wave(15 seconds, 30 players)), PoolConfig(3 ++ 2, Wa...
clarkerubber/lila
modules/pool/src/main/PoolList.scala
Scala
agpl-3.0
795
/* * 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 ...
bavardage/spark
core/src/test/scala/spark/io/CompressionCodecSuite.scala
Scala
apache-2.0
2,097
package com.awesomesauce.minecraft.forge.openautomation.common.tconstruct import com.awesomesauce.minecraft.forge.core.lib.util.ItemUtil import com.awesomesauce.minecraft.forge.openautomation.common.OAModule import com.awesomesauce.minecraft.forge.openautomation.common.tconstruct.te.TileEntityMelter import cpw.mods.fm...
AwesomeSauceMods/OpenAutomation
main/scala/com/awesomesauce/minecraft/forge/openautomation/common/tconstruct/OpenAutomationTConstruct.scala
Scala
mit
1,599
/** * this script is enetered with sc already defined */ import org.apache.spark.hbase.examples.graph.DemoGraphApp import scala.math._ import org.apache.spark.hbase._ import org.apache.spark.hbase.keyspace._ import org.apache.spark.hbase.examples.graph._ import org.apache.hadoop.hbase.util.Bytes import org.apache.s...
michal-harish/spark-on-hbase
scripts/demo-graph-init.scala
Scala
apache-2.0
569
package reactivemongo.play.json.compat import play.api.libs.json.{ JsFalse => F, JsTrue => T } import reactivemongo.api.bson.BSONBoolean private[compat] trait ExtendedJsonCompat { implicit final val toFalse: F.type => BSONBoolean = { val stable = BSONBoolean(false) _ => stable } implicit final val toT...
ReactiveMongo/Reactivemongo-Play-Json
compat/src/main/play-2.6+/ExtendedJsonCompat.scala
Scala
apache-2.0
408
package pl.newicom.dddd.view.sql import com.typesafe.config.{ConfigFactory, Config} import org.scalactic.Equality import org.scalatest._ import scala.slick.jdbc.JdbcBackend class ViewMetadataDaoSpec extends WordSpecLike with Matchers with SqlViewStoreTestSupport { def config: Config = ConfigFactory.load() impl...
ahjohannessen/akka-ddd
view-update-sql/src/test/scala/pl/newicom/dddd/view/sql/ViewMetadataDaoSpec.scala
Scala
mit
1,567
package dotty.communitybuild import java.nio.file._ import java.io.{PrintWriter, File} import java.nio.charset.StandardCharsets.UTF_8 import org.junit.{Ignore, Test} import org.junit.Assert.{assertEquals, fail} import org.junit.experimental.categories.Category import CommunityBuildRunner.run class TestCategory give...
lampepfl/dotty
community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala
Scala
apache-2.0
5,507
package org.broadinstitute.dsde.vault.services.analysis import com.wordnik.swagger.annotations._ import org.broadinstitute.dsde.vault.DmClientService import org.broadinstitute.dsde.vault.common.directives.VersioningDirectives._ import org.broadinstitute.dsde.vault.model.AnalysisJsonProtocol._ import org.broadinstitute...
broadinstitute/vault-api
src/main/scala/org/broadinstitute/dsde/vault/services/analysis/AnalysisIngestService.scala
Scala
bsd-3-clause
2,554
package io.eels.component.jdbc import java.sql.{ResultSet, ResultSetMetaData} import com.sksamuel.exts.Logging import io.eels.component.jdbc.dialect.JdbcDialect import io.eels.schema.{Field, StructType} /** * Generates an eel schema from the metadata in a resultset. */ object JdbcSchemaFns extends Logging { def...
sksamuel/hadoop-streams
eel-core/src/main/scala/io/eels/component/jdbc/JdbcSchemaFns.scala
Scala
apache-2.0
792
package scalax.collection package mutable import org.scalatest.Suite import org.scalatest.matchers.ShouldMatchers import GraphPredef._, GraphEdge._ import org.scalatest.junit.JUnitRunner import org.junit.runner.RunWith /** Tests [[ExtHashSet]]. */ @RunWith(classOf[JUnitRunner]) class TExtHashSetTest ...
Calavoow/scala-graph
core/src/test/scala/scalax/collection/mutable/TExtHashSet.scala
Scala
bsd-3-clause
1,860
/* * 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/main/scala/org/apache/flink/table/planner/plan/rules/physical/batch/BatchExecSortRule.scala
Scala
apache-2.0
3,599
package ajr.rundeck.telegram import java.net.InetSocketAddress import java.util.{Map => JMap} import com.dtolabs.rundeck.core.plugins.Plugin import com.dtolabs.rundeck.plugins.descriptions.PluginDescription import com.dtolabs.rundeck.plugins.descriptions.PluginProperty import com.dtolabs.rundeck.plugins.descriptions....
ajrnz/rundeck-telegram-plugin
plugin/src/ajr/rundeck/telegram/TelegramNotificationPlugin.scala
Scala
apache-2.0
10,799
object Test extends App { def foo1(x: AnyRef) = x match { case x: Function0[_] => x() } def foo2(x: AnyRef) = x match { case x: Function0[Any] => x() } }
yusuke2255/dotty
tests/pos/t2168.scala
Scala
bsd-3-clause
158
package org.bowlerframework.extractors import util.matching.Regex import org.bowlerframework.{HttpMethod, Request} class UriAndMethodMatches[T](item: T, method: HttpMethod, uri: Regex) extends UriMatches[T](item, uri) { override def unapply(request: Request): Option[T] = { if (request.getMethod == method) ...
rkpandey/Bowler
core/src/main/scala/org/bowlerframework/extractors/UriAndMethodMatches.scala
Scala
bsd-3-clause
378
package kata.prop import org.scalatest.prop._ import org.scalatest.{Matchers, PropSpec} import kata.ConvertArabicToRoman._ import org.scalacheck.Gen class ArabicToRomanPropCheckSpec extends PropSpec with GeneratorDrivenPropertyChecks with Matchers { //Generators val allInts = for (n <- Gen.choose(0, 1...
boseabhishek/scala_recursion
src/test/scala/kata/prop/ArabicToRomanPropCheckSpec.scala
Scala
mit
1,563
/* * 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/main/scala/org/scalatest/words/ResultOfAnWordToBePropertyMatcherApplication.scala
Scala
apache-2.0
1,104
/* * 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...
hubertp/scalatest
src/test/scala/org/scalatest/tools/RunnerSuite.scala
Scala
apache-2.0
55,265
package lila.streamer import lila.db.dsl._ import reactivemongo.api.bson._ private object BsonHandlers { implicit val StreamerIdBSONHandler = stringAnyValHandler[Streamer.Id](_.value, Streamer.Id.apply) implicit val StreamerListedBSONHandler = booleanAnyValHandler[Streamer.Listed](_.value, Streamer.Listed.ap...
luanlv/lila
modules/streamer/src/main/BsonHandlers.scala
Scala
mit
1,012
/* * Copyright 2017 Zhang Di * * 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 ...
statgenetics/seqspark
src/main/scala/org/dizhang/seqspark/stat/ScoreTest.scala
Scala
apache-2.0
3,704
import sbt._ import sbt.Keys._ object BuildSettings { val commonSettings = Defaults.coreDefaultSettings ++ Seq ( organization := "com.softwaremill.macwire", version := "2.2.1", scalaVersion := "2.11.7", // Sonatype OSS deployment publishTo <<= version { (v: String) => val nexus = "...
numesmat/macwire
project/Build.scala
Scala
apache-2.0
4,402
/** * Play HTML Compressor * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.md. * It is also available through the world-wide-web at this URL: * https://github.com/mohiva/play-html-compressor/blob/master/LICENSE.md */ package com.mohiva....
CapeSepias/play-html-compressor
app/com/mohiva/play/htmlcompressor/HTMLCompressorFilter.scala
Scala
bsd-3-clause
2,089
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
yiheng/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/keras/Cropping3DSpec.scala
Scala
apache-2.0
2,450
package mesosphere.marathon package integration.setup import com.typesafe.scalalogging.Logger import java.io.File import java.net.{ URLDecoder, URLEncoder } import java.nio.file.Files import java.util.UUID import java.util.concurrent.ConcurrentLinkedQueue import akka.Done import akka.actor.{ ActorSystem, Cancellable,...
janisz/marathon
src/test/scala/mesosphere/marathon/integration/setup/MarathonTest.scala
Scala
apache-2.0
35,193
package eventstore package core package operations import OperationError._ import Inspection.Decision._ private[eventstore] final case class TransactionWriteInspection(out: TransactionWrite) extends ErrorInspection[TransactionWriteCompleted, OperationError] { def decision(error: OperationError) = { error m...
EventStore/EventStore.JVM
core/src/main/scala/eventstore/core/operations/TransactionWriteInspection.scala
Scala
bsd-3-clause
686
import controllers.br.CustomQueries import formatters.AttendanceLogFormatter import models.AttendanceLog import org.joda.time.DateTime import org.specs2.mutable._ import org.specs2.runner._ import org.junit.runner._ import play.api.{GlobalSettings, Application, Logger} import play.api.http.HeaderNames import play.api.l...
ZKTecoEu/ZKRestApi
ZKRestServer/test/ApplicationSpec.scala
Scala
mit
3,498
/* * Copyright (c) 2014-2020 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...
alexandru/monifu
monix-tail/shared/src/main/scala/monix/tail/internal/IterantFromConsumer.scala
Scala
apache-2.0
1,826
/* * 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 ...
TiVo/samza
samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala
Scala
apache-2.0
40,036
/* * Copyright 2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
erenavsarogullari/spark-hazelcast-connector
src/main/scala/com/onlinetechvision/spark/hazelcast/connector/rdd/implicits/package.scala
Scala
apache-2.0
3,879
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
fusepoolP3/p3-silk
silk-core/src/test/scala/de/fuberlin/wiwiss/silk/plugins/transformer/RemoveSpecialCharsTransformerTest.scala
Scala
apache-2.0
1,213
package com.productfoundry.akka.cqrs.process /** * Exception indicating an internal problem with the process, probably caused by a programming error. */ case class ProcessManagerInternalException(message: String) extends ProcessManagerException(message)
odd/akka-cqrs
core/src/main/scala/com/productfoundry/akka/cqrs/process/ProcessManagerInternalException.scala
Scala
apache-2.0
259
/* * Copyright 2013-2014 IQ TECH <http://www.iqtech.pl> * * 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 appl...
iqtech/abyss
abyss-graph/src/test/scala/io/abyss/test/graph/PersistenceTestBase.scala
Scala
apache-2.0
1,367
import sbt._ import Keys._ import java.net.URL object ScalaWurfl extends Build { val project = (Project("scalawurfl", file(".")) settings( organization := "org.scalawurfl", name := "scala-wurfl", version := "1.0-SNAPSHOT", scalaVersion := "2.10.2", crossScalaVersions := Seq("2.10.0", "2...
filosganga/scala-wurfl
project/Build.scala
Scala
apache-2.0
2,304
package com.overviewdocs.blobstorage import akka.stream.scaladsl.{Sink,Source} import akka.util.ByteString import java.io.{ File, IOException, InputStream } import java.nio.charset.StandardCharsets import java.nio.file.{ Files, Path } import scala.concurrent.Future import com.overviewdocs.test.ActorSystemContext cla...
overview/overview-server
common/src/test/scala/com/overviewdocs/blobstorage/FileStrategySpec.scala
Scala
agpl-3.0
7,071