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
/* * ____ ____ _____ ____ ___ ____ * | _ \\ | _ \\ | ____| / ___| / _/ / ___| Precog (R) * | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data * | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, In...
precog/platform
yggdrasil/src/main/scala/com/precog/yggdrasil/actor/BatchHandler.scala
Scala
agpl-3.0
4,557
package pt.tecnico.dsi import org.joda.time.DateTime package object kadmin { implicit def dateTime2AbsoluteDateTime(dateTime: DateTime): AbsoluteDateTime = AbsoluteDateTime(dateTime) }
ist-dsi/kadmin
src/main/scala/pt/tecnico/dsi/kadmin/package.scala
Scala
mit
189
package com.twitter.finagle.http.service import org.specs.SpecificationWithJUnit import com.twitter.finagle.http.{Request, Status} import com.twitter.finagle.http.path._ import com.twitter.finagle.http.path.{Path => FPath} import com.twitter.util.Await class RoutingServiceSpec extends SpecificationWithJUnit { "Ro...
firebase/finagle
finagle-http/src/test/scala/com/twitter/finagle/http/service/RoutingServiceSpec.scala
Scala
apache-2.0
958
/* * Copyright 2007-2011 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
pbrant/framework
core/util/src/main/scala/net/liftweb/util/SoftReferenceCache.scala
Scala
apache-2.0
4,188
package scalafiddle.shared case class FiddleId(id: String, version: Int) { override def toString: String = s"$id/$version" } case class Library( name: String, organization: String, artifact: String, version: String, compileTimeOnly: Boolean, scalaVersions: Seq[String], scalaJSVersions: S...
scalafiddle/scalafiddle-editor
shared/src/main/scala/scalafiddle/shared/FiddleData.scala
Scala
apache-2.0
907
/* * 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/models/renewal/RenewalSpec.scala
Scala
apache-2.0
5,496
import sbt._ class Plugins(info: ProjectInfo) extends PluginDefinition(info) { val sbtIdeaRepo = "sbt-idea-repo" at "http://mpeltonen.github.com/maven/" val sbtIdea = "com.github.mpeltonen" % "sbt-idea-plugin" % "0.1-SNAPSHOT" }
egervari/scaladbtest
project/plugins/Plugins.scala
Scala
apache-2.0
238
package com.outr.stripe.support import com.outr.stripe._ import com.outr.stripe.price.{Price, Recurring, Tier, TransformQuantity} import scala.concurrent.Future class PricesSupport(stripe: Stripe) extends Implicits { def create(currency: String, active: Option[Boolean] = None, billingSche...
outr/scala-stripe
core/jvm/src/main/scala/com/outr/stripe/support/PricesSupport.scala
Scala
mit
3,205
/** * Copyright (C) 2012 Orbeon, Inc. * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. * * This program i...
brunobuzzi/orbeon-forms
src/main/scala/org/orbeon/oxf/webapp/RunMode.scala
Scala
lgpl-2.1
1,044
package examples.actors object seq extends App { import scala.actors.Actor._ val a = actor { { react { case 'A => println("received 1st message") }; () } andThen react { case 'A => println("received 2nd message") } } a ! 'A a ! 'A }
chenc10/Spark-PAF
build/scala-2.10.5/examples/actors/seq.scala
Scala
apache-2.0
276
package org.akka.essentials.zeromq.example1 import akka.actor.Actor import akka.actor.ActorLogging import akka.zeromq.Connect import akka.zeromq.Listener import akka.zeromq.SocketType import akka.zeromq.Subscribe import akka.zeromq.ZMQMessage import akka.zeromq.ZeroMQExtension class WorkerTaskB extends Actor with Acto...
rokumar7/trial
AkkaWithZeroMQ/src/main/scala/org/akka/essentials/zeromq/example1/WorkerTaskB.scala
Scala
unlicense
623
package wallet import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.SpringApplicationConfiguration; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.spri...
shreedhar22/Restful-Digital-Wallet
src/main/scala/wallet/ApplicationTests.scala
Scala
mit
1,381
package windows import gui._ /** * Window class. */ abstract class Window(windowTitle: String) extends Frame(UIParent) { setAllPoints() setFrameStrata(Fullscreen) protected val actualWindow: Frame = new Frame(this) actualWindow.setPoint(Center) actualWindow.setSize(300) actualWindow.regis...
sherpal/holomorphic-maps
src/main/scala/windows/Window.scala
Scala
mit
2,257
package demo import org.apache.spark.SparkConf import org.apache.spark.SparkContext import org.apache.spark.sql.Row import org.apache.spark.sql.SparkSession import org.apache.spark.sql.types.DataTypes import org.apache.spark.sql.types.StructField import org.apache.spark.sql.types.StructType object MotcDataSql { ...
kekemonster/iisi-spark
src/main/scala/demo/MotcDataSql.scala
Scala
mit
3,815
/* * The MIT License * * Copyright (c) 2016 Fulcrum Genomics * * 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, c...
fulcrumgenomics/fgbio
src/main/scala/com/fulcrumgenomics/umi/ExtractUmisFromBam.scala
Scala
mit
14,722
package mr.merc.ai import mr.merc.map.hex.TerrainHex import mr.merc.unit.Soldier import mr.merc.unit.Attack object AttackSelectionHelper { def selectBestAttack(attacker: Soldier, defender: Soldier, attackerHex: TerrainHex, defenderHex: TerrainHex): Int = { // arguments are attacks with index def selectBest...
RenualdMarch/merc
src/main/scala/mr/merc/ai/AttackSelectionHelper.scala
Scala
gpl-3.0
1,266
package io.github.loustler.kase.simple /** * @author loustler * @since 10/20/2018 */ object Matcher { def deeplySize(x: List[_]): Int = x match { case Nil => 0 case List(a: List[_], b: List[_]) => x.size + a.size + b.size case List(_*) => x.size } def shallowSize(x: List[_]): Int = x match { ...
loustler/sKaLa
src/main/scala/io/github/loustler/kase/simple/Matcher.scala
Scala
apache-2.0
397
/* SCALA Implementation of Insertion Sort. Though the corner cases are covered. But still if you find any additions to it, please do add a test for it. Any improvements/tests in the code is highly appreciated. */ class InsertionSort { def insertionSort(listToBeSorted: List[Int]): List[Int] = { listTo...
warreee/Algorithm-Implementations
Insertion_Sort/Scala/aayushKumarJarvis/InsertionSort.scala
Scala
mit
610
package main import org.scalatest.FlatSpec import org.mockito.Mockito._ import org.scalatestplus.mockito.MockitoSugar import org.scalatest.{FlatSpec, PrivateMethodTester} import maths.integration.RungeKuttaIntegration import io.config.Configuration class BiologicalModelTest extends FlatSpec with MockitoSugar with Pri...
shawes/zissou
src/test/scala/main/BiologicalModelTest.scala
Scala
mit
691
import scala.tools.partest._ object Test extends DirectTest { override def extraSettings: String = "-usejavacp -Yrangepos -Vprint:patmat -Vprint-pos -d " + testOutput.path override def code = """ abstract class A[T] { val foo: Set[_ <: T] = null val bar: Set[_ <: T] }""".trim override def show(): Unit = Co...
martijnhoekstra/scala
test/files/run/existential-rangepos.scala
Scala
apache-2.0
359
/* * 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...
hmrc/vat-registration-frontend
it/controllers/registration/business/PartnershipNameControllerISpec.scala
Scala
apache-2.0
2,771
/* * 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...
saurabharora80/hmrc-email-renderer
app/uk/gov/hmrc/hmrcemailrenderer/templates/amls/AmlsTemplates.scala
Scala
apache-2.0
1,257
/* * Copyright 2013 David Savage * * 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...
davemssavage/modula
api/src/main/scala/org/chronologicalthought/modula/reflect/GarbageCollector.scala
Scala
apache-2.0
1,364
/* * Copyright (c) 2016, Team Mion * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIM...
teammion/tm-morefood
src/main/scala/io/teammion/morefood/recipes/SmeltingRecipes.scala
Scala
isc
2,064
package org.jetbrains.plugins.scala.lang.refactoring.mock import com.intellij.openapi.editor.impl.DocumentImpl import com.intellij.openapi.editor._ /** * Pavel Fatin */ class EditorMock(text: String, offset: Int) extends EditorStub { private val selection = new SelectionModelStub() override def offsetToLogica...
LPTK/intellij-scala
test/org/jetbrains/plugins/scala/lang/refactoring/mock/EditorMock.scala
Scala
apache-2.0
993
trait B extends A { type F = S[Int] }
jamesward/xsbt
sbt/src/sbt-test/source-dependencies/abstract-type/B.scala
Scala
bsd-3-clause
39
/******************************************************************************* * Copyright (c) 2019. Carl Minden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the ...
carlminden/anathema-roguelike
src/com/anathema_roguelike/environment/features/Brazier.scala
Scala
gpl-3.0
1,574
package latis.reader.tsml.ml import scala.xml.Node import latis.util.StringUtils import scala.xml.UnprefixedAttribute import scala.xml.Null import scala.xml.transform.RewriteRule import scala.xml.Elem import scala.xml.transform.RuleTransformer import scala.xml.ProcInstr /** * Wrapper for TSML that defines a Dataset....
dlindhol/LaTiS
src/main/scala/latis/reader/tsml/ml/DatasetMl.scala
Scala
epl-1.0
3,025
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE...
adarro/ddo-calc
subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/feats/RuneArmUse.scala
Scala
apache-2.0
1,876
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
goldmedal/spark
core/src/test/scala/org/apache/spark/serializer/KryoSerializerBenchmark.scala
Scala
apache-2.0
3,256
/** * Created by alec on 2/6/17. */ package scalation.plot import javafx.application.Application import javafx.scene.Scene import javafx.scene.chart.NumberAxis import javafx.scene.chart.LineChart import javafx.scene.chart.XYChart import javafx.scene.chart.Axis import javafx.scene.paint.Color import javafx.stage.S...
scalation/fda
scalation_1.3/scalation_mathstat/src/main/scala/scalation/plot/PlotFX.scala
Scala
mit
4,691
package edu.uw.at.iroberts.wirefugue.analyze.ip.defragment import akka.actor.{Actor, ActorRef} import akka.stream.{Attributes, FlowShape, Inlet, Outlet} import akka.stream.stage.{GraphStage, GraphStageLogic} import akka.util.{ByteString, ByteStringBuilder} import edu.uw.at.iroberts.wirefugue.pcap.{IPAddress, InternetC...
robertson-tech/wirefugue
sensor/src/main/scala/edu/uw/at/iroberts/wirefugue/analyze/ip/defragment/Defragment.scala
Scala
gpl-3.0
3,356
package eu.phisikus.plotka.examples.scala case class TextMessage(text : String)
phisikus/plotka
examples/scala-docker-example/src/main/scala/eu/phisikus/plotka/examples/scala/TextMessage.scala
Scala
bsd-3-clause
80
/* Copyright 2011-2013 Spiral Arm Ltd 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...
d6y/liftmodules-imap-idle
src/main/scala/net/liftmodules/imapidle/EmailReceiver.scala
Scala
apache-2.0
7,548
/* * Copyright (c) 2013-2014 Telefónica Investigación y Desarrollo S.A.U. * * 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 * * Unles...
telefonicaid/fiware-cosmos-platform
cosmos-api/app/es/tid/cosmos/api/controllers/admin/MaintenanceResource.scala
Scala
apache-2.0
2,932
package scife.enumeration package lzy import combinators._ import scala.collection.mutable import scife.util._ object ConcatInfinite { def apply[T](s1: Infinite[T], s2: Infinite[T]) = new ConcatInfinite( Array(s1, s2) ) def apply[T](streams: Array[Infinite[T]]) = new ConcatInfinite(streams) } class ...
kaptoxic/SciFe
src/main/scala/scife/enumeration/lzy/ConcatInfinite.scala
Scala
gpl-2.0
803
package edu.umass.ciir.kbbridge.nlp import collection.mutable.ListBuffer import scala.collection.JavaConversions._ import edu.umass.ciir.kbbridge.nlp.NlpData.NlpXmlMention import edu.umass.ciir.models.StopWordList import edu.umass.ciir.kbbridge.data.EntityMention class NlpQueryContextBuilder { val normalizeText = T...
daltonj/KbBridge
src/main/scala/edu/umass/ciir/kbbridge/nlp/NlpQueryContextBuilder.scala
Scala
apache-2.0
8,906
package chapter07 import java.util.Scanner object MatchImplementation { def main(args: Array[String]): Unit = { val scanner = new Scanner(System.in) println("Enter the choice (salt, chips, eggs) : ") val userinput = scanner.next() userinput match { case "salt" => println("pepper") case "...
aakashmathai/ScalaTutorial
src/main/scala/chapter07/MatchImplementation.scala
Scala
apache-2.0
622
import akka.actor.ActorSystem import component.chat.actor.Chat import api.actor.SprayServiceActor import scaldi.Module import scaldi.akka.AkkaInjectable import spray.can.server.ServerSettings package object api { object url { object static { private[api] val root = "/" private[api] val signIn = "/s...
onurzdg/spray-app
src/main/scala/api/package.scala
Scala
apache-2.0
885
package play.api.libs.iteratee import play.api.libs.iteratee.Execution.Implicits.{ defaultExecutionContext => dec } import play.api.libs.iteratee.internal.{ eagerFuture, executeFuture } import scala.concurrent.{ ExecutionContext, Future, Promise } import scala.util.{ Try, Success, Failure } import scala.language.refle...
michaelahlers/team-awesome-wedding
vendor/play-2.2.1/framework/src/iteratees/src/main/scala/play/api/libs/iteratee/Enumerator.scala
Scala
mit
24,302
package collins.util import collins.util.config.Feature import collins.models.Asset import collins.models.AssetMeta import collins.models.AssetMetaValue import collins.models.IpAddresses import collins.models.IpmiInfo import collins.models.State import collins.models.Status import collins.models.conversions.dateToTim...
box/collins
app/collins/util/StateMachines.scala
Scala
apache-2.0
2,043
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * ...
adarro/ddo-calc
subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/support/requisite/DefaultRequirementSort.scala
Scala
apache-2.0
750
package PaperCode.Sec4OA import PaperCode.Common object Code30 extends Common { //BEGIN_BASE_OA_PARSER_BAD trait ExprOAParser[E] { lexical.delimiters += "+" val pLit: ExprAlg[E] => Parser[E] = alg => numericLit ^^ { x => alg.lit(x.toInt) } val pAdd: ExprAlg[E] => Parser[E] = alg => { val p = pExpr(alg) ...
hy-zhang/parser
Scala/Parser/src/PaperCode/Sec4OA/Code3.scala
Scala
bsd-3-clause
1,339
/* * 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/test/scala/com/intel/analytics/bigdl/dllib/keras/layers/ConvLSTM3DSpec.scala
Scala
apache-2.0
3,420
/* * 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 ...
spark-test/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/UnivocityParser.scala
Scala
apache-2.0
14,217
package rescala.extra.lattices.delta.crdt.reactive import kofre.decompose.interfaces.GMapInterface import kofre.decompose.interfaces.GMapInterface.{GMapCompanion, State} import kofre.decompose.{Delta, UIJDLattice} /** [[ReactiveCRDT Reacitve]] implementation of [[rescala.extra.lattices.delta.interfaces.GMapInterface ...
guidosalva/REScala
Code/Extensions/Replication/src/main/scala/rescala/extra/lattices/delta/crdt/reactive/GMap.scala
Scala
apache-2.0
1,314
package org.http4s import cats.effect.Async package object servlet { protected[servlet] type BodyWriter[F[_]] = Response[F] => F[Unit] protected[servlet] def NullBodyWriter[F[_]](implicit F: Async[F]): BodyWriter[F] = _ => F.unit protected[servlet] val DefaultChunkSize = 4096 }
ChristopherDavenport/http4s
servlet/src/main/scala/org/http4s/servlet/package.scala
Scala
apache-2.0
293
/* * Copyright (c) 2014 Contributor. All rights reserved. */ package dotty.tools.dotc.classpath import dotty.tools.io.ClassPath.RootPackage /** * Common methods related to package names represented as String */ object PackageNameUtils { /** * @param fullClassName full class name with package * @return (p...
dotty-staging/dotty
compiler/src/dotty/tools/dotc/classpath/PackageNameUtils.scala
Scala
apache-2.0
1,218
package com.github.chaabaj.openid.oauth trait OpenIDConnectStandardClaims { def sub: String def name: Option[String] def givenName: Option[String] def familyName: Option[String] def middleName: Option[String] def nickName: Option[String] def preferredUserName: Option[String] def profile: Option[String]...
chaabaj/openid-scala
src/main/scala/com/github/chaabaj/openid/oauth/OpenIDConnectStandardClaims.scala
Scala
mit
724
package com.twitter.zipkin.storage.anormdb /* * 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 * * ...
AnSavvides/zipkin
zipkin-anormdb/src/test/scala/com/twitter/zipkin/storage/anormdb/AnormDBSpec.scala
Scala
apache-2.0
2,764
package au.com.dius.pact.consumer.dispatch import java.nio.charset.Charset import java.util import java.util.concurrent.CompletableFuture import au.com.dius.pact.model.{OptionalBody, Request, Response} import org.apache.commons.lang3.StringUtils import org.asynchttpclient.{DefaultAsyncHttpClient, RequestBuilder} obj...
algra/pact-jvm
pact-jvm-consumer-specs2/src/main/scala/au/com/dius/pact/consumer/dispatch/HttpClient.scala
Scala
apache-2.0
1,494
package org.rebeam.boxes.core.demo //import org.rebeam.boxes.core.{BoxNow, ShelfDefault} // //object BoxDemo { // // def main(args: Array[String]): Unit = { // implicit val s = ShelfDefault() // // val a = BoxNow(1) // val b = BoxNow(0) // b.now << {implicit txn => a() * 2} // // println(b.now()) // ...
trepidacious/boxes-core
src/main/scala/org/rebeam/boxes/core/demo/BoxDemo.scala
Scala
gpl-2.0
368
package semighini.tdc.servico import akka.actor.ActorRef import akka.util.Timeout import semighini.tdc.JsonFormatter import semighini.tdc.atores.MensagensUsuario.{GetUser, DelUser, SetUser} import semighini.tdc.modelo.Usuario import scala.concurrent.ExecutionContext import scala.concurrent.duration._ import akka.pat...
dirceusemighini/tdc2014
src/main/scala/semighini/tdc/servico/ServicoUsuario.scala
Scala
apache-2.0
2,272
/* * Copyright 2014 JHC Systems Limited * * 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 ag...
DavidGregory084/sqlest
sqlest/src/main/scala/sqlest/sql/PostgresStatementBuilder.scala
Scala
apache-2.0
772
package org.bitcoins.protocol import org.bitcoinj.core.{VersionedChecksummedBytes, Base58, Utils} import org.bitcoins.config.{RegTest, TestNet3, MainNet} import org.bitcoins.util.{Factory, BitcoinSUtil} import scala.util.{Failure, Success, Try} case class AddressInfo(bitcoinAddress: BitcoinAddress, n_tx: Long, total...
Christewart/scalacoin
src/main/scala/org/bitcoins/protocol/Address.scala
Scala
mit
4,824
// timber -- Copyright 2012-2021 -- Justin Patterson // // 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 l...
scalawag/timber
timber-backend/src/main/scala/org/scalawag/timber/backend/receiver/formatter/package.scala
Scala
apache-2.0
745
// Project: scalajs-rxjs // Module: rxjs/Subscription.ts // Description: Façade trait for RxJS5 Subscriptions // Copyright (c) 2016. Distributed under the MIT License (see included LICENSE file). package rxjs.core import rxjs.core.Subscription.TeardownLogic import scala.scalajs.js @js.native trait Anonymou...
jokade/scalajs-rxjs
src/main/scala/rxjs/core/Subscription.scala
Scala
mit
702
/* * 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 ...
bravo-zhang/spark
mllib/src/main/scala/org/apache/spark/mllib/stat/correlation/PearsonCorrelation.scala
Scala
apache-2.0
3,464
/* * 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
app/services/AuthEnrolmentsService.scala
Scala
apache-2.0
3,601
/* * RotateFlipMatrix.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 * contact@sciss.de */ package de.sciss.fscape pac...
Sciss/FScape-next
core/shared/src/main/scala/de/sciss/fscape/stream/RotateFlipMatrix.scala
Scala
agpl-3.0
7,450
// Copyright 2017 Foursquare Labs Inc. All Rights Reserved. package io.fsq.spindle.common.thrift.serde import org.apache.thrift.{TBase, TByteArrayOutputStream, TFieldIdEnum} import org.apache.thrift.protocol.TCompactProtocol import org.apache.thrift.transport.TIOStreamTransport /** * Custom serializer that reuses ...
foursquare/fsqio
src/jvm/io/fsq/spindle/common/thrift/serde/ThriftReusingSerializer.scala
Scala
apache-2.0
1,092
object Test extends App { test.Test.test } package test { object Test { def test = { Macros.foo } } }
scala/scala
test/files/run/macro-enclosures/Test_2.scala
Scala
apache-2.0
123
package fpinscala.localeffects import fpinscala.monads._ object Mutable { def quicksort(xs: List[Int]): List[Int] = if (xs.isEmpty) xs else { val arr = xs.toArray def swap(x: Int, y: Int) = { val tmp = arr(x) arr(x) = arr(y) arr(y) = tmp } def partition(l: Int, r: Int, pivot: Int) ...
fpinscala-muc/fpinscala-mhofsche
exercises/src/main/scala/fpinscala/localeffects/LocalEffects.scala
Scala
mit
3,752
/** * 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...
Chasego/kafka
core/src/test/scala/unit/kafka/admin/TopicCommandTest.scala
Scala
apache-2.0
4,781
/* * This file is part of eCobertura. * * Copyright (c) 2009, 2010 Joachim Hofer * 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/le...
jmhofer/eCobertura
ecobertura.ui/src/main/scala/ecobertura/ui/editors/LineCoverageFinder.scala
Scala
epl-1.0
1,542
package org.http4s.dsl.impl import org.http4s.{AuthedRequest, Request} trait Auth { object as { def unapply[F[_], A](ar: AuthedRequest[F, A]): Option[(Request[F], A)] = Some(ar.req -> ar.context) } }
ChristopherDavenport/http4s
dsl/src/main/scala/org/http4s/dsl/impl/Auth.scala
Scala
apache-2.0
216
package com.tritondigital.counters import com.typesafe.config.ConfigFactory import scala.util.Random object Benchmark extends App with CustomMatchers { val Loops = 100000 // val TagCardinality = 100 val TagCardinality = 2 val config = ConfigFactory .load() usingActorSystem(config) { system => val ...
tritondigital/tritondigital-counters
src/test/scala/com/tritondigital/counters/Benchmark.scala
Scala
apache-2.0
1,273
/* * Copyright 2014 Treode, 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...
Treode/store
cluster/src/com/treode/cluster/RequestDescriptor.scala
Scala
apache-2.0
2,190
package frameless package functions import frameless.functions.aggregate._ import org.scalacheck.Prop import org.scalacheck.Prop._ class AggregateFunctionsTests extends TypedDatasetSuite { def approximatelyEqual[A](a: A, b: A)(implicit numeric: Numeric[A]): Prop = { val da = numeric.toDouble(a) val db = nu...
OlivierBlanvillain/frameless
dataset/src/test/scala/frameless/functions/AggregateFunctionsTests.scala
Scala
apache-2.0
7,950
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
hequn8128/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/functions/aggfunctions/MaxAggFunctionWithRetract.scala
Scala
apache-2.0
7,947
package slick.util import java.util /** A simplified copy of `java.util.concurrent.ArrayBlockingQueue` with additional logic for * temporarily rejecting elements based on the current size. All features of the original * ArrayBlockingQueue have been ported, except the mutation methods of the iterator. See * `jav...
nafg/slick
slick/src/main/scala/slick/util/InternalArrayQueue.scala
Scala
bsd-2-clause
4,294
/** Copyright 2015 TappingStone, 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 ...
ch33hau/PredictionIO
e2/src/main/scala/io/prediction/e2/engine/MarkovChain.scala
Scala
apache-2.0
2,640
package com.scalableminds.webknossos.tracingstore.tracings.volume import com.scalableminds.util.geometry.{BoundingBox, Vec3Int} import com.scalableminds.util.tools.Fox import com.scalableminds.webknossos.datastore.dataformats.{BucketProvider, MappingProvider} import com.scalableminds.webknossos.datastore.models.dataso...
scalableminds/webknossos
webknossos-tracingstore/app/com/scalableminds/webknossos/tracingstore/tracings/volume/FallbackLayerAdapter.scala
Scala
agpl-3.0
2,429
package com.eevolution.context.dictionary.infrastructure.repository import java.util.UUID import com.eevolution.context.dictionary.domain._ import com.eevolution.context.dictionary.domain.model.ModelValidator import com.eevolution.context.dictionary.infrastructure.db.DbContext._ import com.eevolution.utils.PaginatedS...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/repository/ModelValidatorRepository.scala
Scala
gpl-3.0
2,838
/*********************************************************************** * Copyright (c) 2013-2018 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...
ddseapy/geomesa
geomesa-kudu/geomesa-kudu-spark/src/test/scala/org/locationtech/geomesa/kudu/spark/GeoMesaKuduInputFormatTest.scala
Scala
apache-2.0
1,957
package bitcoin import java.time.Instant import bitcoin.JsonProtocol._ import org.scalatest.concurrent.ScalaFutures import org.scalatest.{FlatSpec, Matchers} import streams.AkkaStreamsTest import spray.json._ class JsonProtocolSpec extends FlatSpec with AkkaStreamsTest with Matchers with ScalaFutures { "format" ...
linearregression/akka-streams-http-intro
src/test/scala/bitcoin/JsonProtocolSpec.scala
Scala
apache-2.0
494
/* NSC -- new Scala compiler * Copyright 2005-2012 LAMP/EPFL * @author Martin Odersky */ package dotty.tools.dotc package backend.jvm import dotty.tools.backend.jvm.GenBCodePipeline import dotty.tools.dotc.ast.Trees.Select import dotty.tools.dotc.ast.tpd._ import dotty.tools.dotc.core.Names.TermName import dotty....
AlexSikia/dotty
src/dotty/tools/backend/jvm/scalaPrimitives.scala
Scala
bsd-3-clause
15,369
package com.yetu.play.authenticator.utils import com.mohiva.play.silhouette.impl.authenticators.SessionAuthenticator import org.scalatest.{BeforeAndAfter, BeforeAndAfterAll} import org.scalatest.concurrent.{AsyncAssertions, ScalaFutures} import org.scalatestplus.play.{OneAppPerSuite, PlaySpec} import play.api.libs.jso...
yetu/yetu-play-authenticator
test/com/yetu/play/authenticator/utils/BaseSpec.scala
Scala
apache-2.0
2,383
package com.esri import com.esri.hex.HexGrid import com.esri.webmercator._ import com.vividsolutions.jts.geom.{GeometryFactory, PrecisionModel} import com.vividsolutions.jts.io.WKTReader import org.apache.spark.sql.SparkSession import org.apache.spark.sql.catalyst.ScalaReflection import org.apache.spark.sql.catalyst.u...
mraad/arcgis-alluxio
src/main/scala/com/esri/HexApp.scala
Scala
apache-2.0
2,325
package com.webtrends.harness.utils import scala.concurrent.{ExecutionContext, Future, Promise} import scala.util.Try object FutureExtensions { implicit class FutureExtensions[T](f: Future[T]) { // Allows you to map over futures and handle both Success and Failure scenarios in a partial function. // ...
Webtrends/wookiee
wookiee-core/src/main/scala/com/webtrends/harness/utils/FutureExtensions.scala
Scala
apache-2.0
1,414
/* * 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 ...
jatin9896/incubator-carbondata
integration/spark2/src/main/scala/org/apache/spark/CarbonInputMetrics.scala
Scala
apache-2.0
3,169
package akka.persistence.hazelcast.journal import akka.persistence.CapabilityFlag import akka.persistence.journal.JournalSpec import com.typesafe.config.ConfigFactory class HazelcastJournalSpec extends JournalSpec(ConfigFactory.load()) { override protected def supportsRejectingNonSerializableObjects: CapabilityFlag...
dlisin/akka-persistence-hazelcast
src/test/scala/akka/persistence/hazelcast/journal/HazelcastJournalSpec.scala
Scala
apache-2.0
330
package spire package algebra trait EuclideanRing[@sp(Byte, Short, Int, Long, Float, Double) A] extends Any with CRing[A] { def quot(a: A, b: A): A def mod(a: A, b: A): A def quotmod(a: A, b: A): (A, A) = (quot(a, b), mod(a, b)) def gcd(a: A, b: A): A def lcm(a: A, b: A): A = times(quot(a, gcd(a, b)), b) ...
rklaehn/spire
core/shared/src/main/scala/spire/algebra/EuclideanRing.scala
Scala
mit
562
/* * La Trobe University - Distributed Deep Learning System * Copyright 2016 Matthias Langer (t3l@threelights.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.apa...
bashimao/ltudl
base/src/main/scala/edu/latrobe/io/showoff/Notebook.scala
Scala
apache-2.0
4,866
package com.codesimples.jpa import javax.sql.DataSource import com.typesafe.config.Config import org.springframework.jdbc.datasource.DriverManagerDataSource object DataSourceBuilder { def buildDataSourceWith(config:Config): DataSource = { val dataSourceOrigin: DriverManagerDataSource = new DriverManagerDataSo...
agnaldo4j/estudos_arquitetura_limpa_scala
planner-jpa/src/main/scala/com/codesimples/jpa/DataSourceBuilder.scala
Scala
mit
613
/* * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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...
hpe-cct/cct-nn
src/main/scala/toolkit/neuralnetwork/function/SpatialConvolution.scala
Scala
apache-2.0
7,184
/** * Copyright (c) 2013 Mark S. Kolich * http://mark.koli.ch * * 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, ...
markkolich/spray-servlet-webapp
src/main/scala/com/kolich/spray/protocols/HtmlSafeSprayJsonSupport.scala
Scala
mit
2,076
/** * 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...
Chasego/kafka
core/src/test/scala/unit/kafka/server/FetchRequestDownConversionConfigTest.scala
Scala
apache-2.0
8,019
package org.ninjatasks.spi import java.util.UUID /** * A work object is a container for multiple job objects. * The logic and data included in this object are: * 1. A JobCreator object, which is responsible for the lazy initialization of * processable job objects. * 2. A combine function, which reduces the resul...
giladber/ninja-tasks
src/main/scala/org/ninjatasks/spi/Work.scala
Scala
apache-2.0
6,705
package com.sksamuel.elastic4s.searches.queries.funcscorer import com.sksamuel.elastic4s.script.ScriptDefinition import org.elasticsearch.index.query.functionscore.{ScoreFunctionBuilders, ScriptScoreFunctionBuilder} import com.sksamuel.exts.OptionImplicits._ case class ScriptScoreDefinition(script: ScriptDefinition, ...
ulric260/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/searches/queries/funcscorer/ScriptScoreDefinition.scala
Scala
apache-2.0
711
/* * */ package see.nodes import java.lang.reflect.Constructor import see.EvalError import see.Scope import see.values._ private[see] class ReflectP(methName: String, args: Node) extends Proto { override def precedence = PREC.Deref override def finish(n: Node) = Some(new MethReflector(n, methName, args)) } ...
acruise/see
src/main/scala/see/nodes/Reflect.scala
Scala
bsd-3-clause
5,887
package mesosphere.marathon.core.appinfo.impl import mesosphere.marathon.MarathonSchedulerService import mesosphere.marathon.Protos.MarathonTask import mesosphere.marathon.core.appinfo.{ AppInfo, EnrichedTask, TaskCounts, TaskStatsByVersion } import mesosphere.marathon.core.base.Clock import mesosphere.marathon.health...
Yhgenomics/marathon
src/main/scala/mesosphere/marathon/core/appinfo/impl/AppInfoBaseData.scala
Scala
apache-2.0
5,850
package com.duffmanstudios.memory import org.scalatest.{Matchers, FlatSpec} /** * Contains unit tests for the functionality in Card * * @author Iain Duff */ class CardTest extends ProjectTest { "Two cards with matching IDs" must "be identified as having matching IDs" in { val cardOne = new Card(1) val ...
iainduff91/memory-backend
src/test/java/com/duffmanstudios/memory/CardTest.scala
Scala
gpl-2.0
1,169
package com.mycompany.scalcium.langmodel import java.io.File import org.apache.commons.math3.random.MersenneTwister import org.deeplearning4j.datasets.iterator.CSVDataSetIterator import org.deeplearning4j.distributions.Distributions import org.deeplearning4j.eval.Evaluation import org.deeplearning4j.models.classifier...
sujitpal/scalcium
src/main/scala/com/mycompany/scalcium/langmodel/DL4jNNEval.scala
Scala
apache-2.0
2,317
/* sbt -- Simple Build Tool * Copyright 2011 Mark Harrah */ package sbt import Keys._ import complete.{DefaultParsers, Parser} import DefaultParsers._ import Project.{ScopedKey, Setting} import Scope.GlobalScope object Cross { final val Switch = "++" final val Cross = "+" def switchParser(state: State): Pa...
kuochaoyi/xsbt
main/Cross.scala
Scala
bsd-3-clause
2,207
package org.bitcoins.core.script import org.bitcoins.core.script.arithmetic.OP_1ADD import org.bitcoins.core.script.bitwise.OP_EQUAL import org.bitcoins.core.script.constant._ import org.bitcoins.core.script.control.OP_IF import org.bitcoins.core.script.crypto.OP_RIPEMD160 import org.bitcoins.core.script.locktime.OP_C...
bitcoin-s/bitcoin-s
core-test/src/test/scala/org/bitcoins/core/script/ScriptOperationFactoryTest.scala
Scala
mit
2,286
/* * Wire * Copyright (C) 2016 Wire Swiss GmbH * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This progr...
wireapp/wire-android-sync-engine
zmessaging/src/main/scala/com/waz/service/assets2/UriHelper.scala
Scala
gpl-3.0
1,024
package com.socrata.soql.typechecker import com.socrata.soql.environment.TypeName import com.socrata.soql.collection.OrderedSet import com.socrata.soql.typed.CoreExpr import scala.util.parsing.input.Position trait TypeInfo[Type] { def booleanLiteralExpr(b: Boolean, pos: Position): Seq[CoreExpr[Nothing, Type]] de...
socrata-platform/soql-reference
soql-analyzer/src/main/scala/com/socrata/soql/typechecker/TypeInfo.scala
Scala
apache-2.0
1,004
package lila.slack import play.api.libs.json._ import play.api.libs.ws.WS import play.api.Play.current import lila.common.PimpedJson._ private final class SlackClient(url: String, defaultChannel: String) { def apply(msg: SlackMessage): Funit = url.nonEmpty ?? WS.url(url) .post(Json.obj( "usernam...
clarkerubber/lila
modules/slack/src/main/SlackClient.scala
Scala
agpl-3.0
669
import org.scalatest._ import scala.collection.mutable.Stack import scala.collection.mutable import org.scalatest.events._ import scala.util.Random import scala.reflect.NameTransformer class UnitedStates extends Suite { import UnitedStates.allStates import UnitedStates.nestedSuiteCount override def nestedSuite...
epishkin/scalatest-google-code
src/us/US.scala
Scala
apache-2.0
26,490