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
package com.mishiranu.instantimage.util import java.io.File import android.content.Context import android.webkit.MimeTypeMap object FileManager { def cleanup(context: Context): Unit = { val time = System.currentTimeMillis - 24 * 60 * 60 * 1000 Option(context.getFilesDir.listFiles).getOrElse(Array()) ...
Mishiranu/Instant-Image
src/com/mishiranu/instantimage/util/FileManager.scala
Scala
mit
1,998
package org.bitcoins.core import org.bitcoins.core.number.Int64 // We extend AnyVal to avoid runtime allocation of new // objects. See the Scala documentation on value classes // and universal traits for more: // https://docs.scala-lang.org/overviews/core/value-classes.html package object currency { /** Provides n...
bitcoin-s/bitcoin-s-core
core/src/main/scala/org/bitcoins/core/currency/package.scala
Scala
mit
1,339
package com.ubirch.backend.chain.model /** * author: cvandrei * since: 2016-07-28 */ object AnchorType { val ubirch = "ubirchBlockChain" val bitcoin = "Bitcoin" }
ubirch/ubirch-storage-service
model/src/main/scala/com/ubirch/backend/chain/model/AnchorType.scala
Scala
apache-2.0
177
/* * 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...
wsaccaco/lift
framework/lift-base/lift-webkit/src/main/scala/net/liftweb/http/SHtml.scala
Scala
apache-2.0
80,739
/* * 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 ...
manuzhang/incubator-gearpump
core/src/test/scala/org/apache/gearpump/cluster/master/AppMasterLauncherSpec.scala
Scala
apache-2.0
3,963
/* * Copyright 2017 PayPal * * 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 writin...
akara/squbs
squbs-unicomplex/src/test/scala/org/squbs/unicomplex/FailedFlow1Spec.scala
Scala
apache-2.0
2,214
/* * Copyright 2013 agwlvssainokuni * * 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...
agwlvssainokuni/lifelog
lifelog-batch/test/batches/AsyncTaskCleanerSpec.scala
Scala
apache-2.0
3,320
package logreceiver.routes import akka.actor.{ActorRefFactory, ActorSystem} import com.github.vonnagy.service.container.http.routing.RoutedEndpoints import com.github.vonnagy.service.container.log.LoggingAdapter import com.github.vonnagy.service.container.metrics.{Meter, Counter} import logreceiver.processor.LogBatch ...
vonnagy/log-receiver
src/main/scala/logreceiver/routes/LogEndpoints.scala
Scala
apache-2.0
2,108
// code-examples/TypeLessDoMore/package-example2.scala package com { package example { package pkg1 { class Class11 { def m = "m11" } class Class12 { def m = "m12" } } package pkg2 { class Class21 { def m = "m21" def makeClass11 = { ...
XClouded/t4f-core
scala/src/tmp/TypeLessDoMore/package-example2.scala
Scala
apache-2.0
534
/* * 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
sql/catalyst/src/test/scala/org/apache/spark/sql/types/DataTypeTestUtils.scala
Scala
apache-2.0
2,934
/* Copyright 2012 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
twitter/iago
src/test/scala/com/twitter/parrot/server/KestrelTransportSpec.scala
Scala
apache-2.0
6,073
package tuner.test.unit import org.scalatest._ import org.scalatest.Matchers._ import tuner.Table import tuner.gui.util.Histogram class GpModelSpec extends WordSpec { "estimating a point" when { "estimating at a sample point" must { "have an error of 0" in (pending) } "estimating away from a sam...
gabysbrain/tuner
src/test/scala/tuner/unit/GpModelSpec.scala
Scala
mit
433
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
WindCanDie/spark
mllib/src/main/scala/org/apache/spark/ml/feature/RFormula.scala
Scala
apache-2.0
24,544
package com.twitter.scrooge.backend /** * Copyright 2011 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 requ...
thirstycrow/scrooge
scrooge-generator/src/main/scala/com/twitter/scrooge/backend/ServiceTemplate.scala
Scala
apache-2.0
12,868
package model import play.api.libs.json._ /** * Represents the Swagger definition for PipelineBranchesitemlatestRun. * @param additionalProperties Any additional properties this model may have. */ @javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), da...
cliffano/swaggy-jenkins
clients/scala-play-server/generated/app/model/PipelineBranchesitemlatestRun.scala
Scala
mit
2,064
package models.rest import play.api.libs.json._ /** * author: cvandrei * since: 2016-02-03 */ case class WebjazzNotification(auth: String, vimeoId: Long, hmsId: Long, width: Int, height: I...
indarium/hbbTVPlugin
app/models/rest/WebjazzNotification.scala
Scala
agpl-3.0
1,187
package play.api.libs /** * OAuth integration helpers. */ package object oauth
michaelahlers/team-awesome-wedding
vendor/play-2.2.1/framework/src/play/src/main/scala/play/api/libs/oauth/package.scala
Scala
mit
81
/* * 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/play-ui
src/test/scala/uk/gov/hmrc/play/views/package.scala
Scala
apache-2.0
927
package collins.util import play.api.mvc.Headers import ApiVersion._ import org.specs2._ class VersionRouterSpec extends mutable.Specification { val map: PartialFunction[ApiVersion,String] = { case `1.1` => "A" case `1.2` => "B" } case class FakeHeaders(headers: Map[String, Seq[String]], val data: S...
byxorna/collins
test/collins/util/VersionRouterSpec.scala
Scala
apache-2.0
1,321
package io.github.mandar2812.dynaml.kernels import io.github.mandar2812.dynaml.pipes.{ProductReducer, Reducer, SumReducer} /** * Represents a kernel on a product space [[R]] × [[S]] * * @param firstK The first covariance * @param secondK The second covariance * @param reducer An implicit parameter ind...
transcendent-ai-labs/DynaML
dynaml-core/src/main/scala/io/github/mandar2812/dynaml/kernels/TensorCombinationKernel.scala
Scala
apache-2.0
3,704
package com.omis.client.services import com.omis.{EmpDetails, UserReg} import org.scalajs.dom.ext.Ajax import org.scalajs.dom.window import play.api.libs.json.Json import scala.concurrent.Future import org.scalajs.dom.window import scala.scalajs.concurrent.JSExecutionContext.Implicits.queue /** * Created by shubha...
iriddhi/mis
client/src/main/scala/com/omis/client/services/CoreApi.scala
Scala
apache-2.0
1,380
package com.twitter.scrooge import java.lang.reflect.Method import org.apache.thrift.protocol.{TField, TProtocol} import scala.collection.mutable.StringBuilder /** * A simple class for generic introspection on ThriftStruct classes. */ final class ThriftStructMetaData[T <: ThriftStruct](val codec: ThriftStructCodec[...
nshkrob/scrooge
scrooge-core/src/main/scala/com/twitter/scrooge/ThriftStructMetaData.scala
Scala
apache-2.0
3,649
import language.experimental.macros object Macros { def foo1: Nothing = macro ??? def foo2(x: Int): Nothing = macro ??? def foo3[T]: Nothing = macro ??? }
lrytz/scala
test/files/pos/macro-qmarkqmarkqmark.scala
Scala
apache-2.0
162
/** * Illustrates loading JSON data using Spark SQL */ package com.git.huanghaifeng.spark.load import org.apache.spark._ import org.apache.spark.sql.SQLContext object LoadFileJsonWithSparkSQL { def main(args: Array[String]) { if (args.length != 2) { println("Usage: [sparkmaster] [inputFile...
prucehuang/quickly-start-spark
src/main/scala/com/git/huanghaifeng/spark/load/LoadFileJsonWithSparkSQL.scala
Scala
apache-2.0
677
/* * Copyright 2010 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 t...
taihsun/Gitest
src/main/scala/com/twitter/naggati/test/TestCodec.scala
Scala
apache-2.0
3,306
package spray.can.server import akka.actor.ActorRef import akka.actor.Props import akka.io.Tcp import spray.can.Http import spray.can.HttpExt import spray.can.parsing.SSLSessionInfoSupport import spray.can.server.StatsSupport.StatsHolder import spray.io.BackPressureHandling import spray.io.ConnectionTimeouts import sp...
smootoo/simple-spray-websockets
src/main/scala/spray/can/server/UpgradableHttpListener.scala
Scala
unlicense
3,193
package edu.tum.cs.isabelle.api import scala.collection.mutable.ListBuffer import acyclic.file // FIXME code mostly copied from xml.scala and yxml.scala object XML { private val X = '\\u0005' private val Y = '\\u0006' private def prettyEscape(string: String) = string .replace("&", "&amp;") .replace(...
wneuper/libisabelle
pide-interface/src/main/scala/XML.scala
Scala
mit
3,564
package dotty.tools.scaladoc import java.nio.file.{Path, Paths} case class PathBased[T](entries: List[PathBased.Entry[T]], projectRoot: Path): def get(path: Path): Option[PathBased.Result[T]] = if path.isAbsolute && path.startsWith(projectRoot) then get(projectRoot.relativize(path)) else entries.filter(_.pa...
dotty-staging/dotty
scaladoc/src/dotty/tools/scaladoc/PathBased.scala
Scala
apache-2.0
1,364
import java.io.File import scala.jdk.CollectionConverters._ import scala.tools.asm.tree.{ClassNode, InvokeDynamicInsnNode} import scala.tools.asm.{Handle, Opcodes} import scala.tools.partest.BytecodeTest.modifyClassFile import scala.tools.partest._ object Test extends DirectTest { def code = ??? def compileCode(...
martijnhoekstra/scala
test/files/run/noInlineUnknownIndy/Test.scala
Scala
apache-2.0
1,353
package com.taig.tmpltr.engine.html import com.taig.tmpltr._ import com.taig.tmpltr.engine.{ html => element } import play.api.mvc.Content class boilerplate /*private*/( val attributes: Attributes, val content: Content ) extends Tag.Body[boilerplate, Content] { def this( attributes: Attributes, head: markup.head, b...
Taig/Play-Tmpltr
app/com/taig/tmpltr/engine/html/boilerplate.scala
Scala
mit
771
package com.inocybe.pfm.template import akka.actor.{ActorIdentity, Identify, RootActorPath, AddressFromURIString, Props, PoisonPill, ActorPath, ActorSystem} import akka.pattern.ask import akka.cluster.client.ClusterClient import akka.cluster.client.ClusterClientSettings import akka.cluster.singleton.ClusterSingletonMa...
botekchristophe/akka-http-cluster-remote
src/main/scala/com/inocybe/pfm/template/Boot.scala
Scala
mit
4,143
package apdl.parser import apdl.ApdlParserException import cats.implicits._ import scala.Function.tupled import scala.util.matching.Regex class MainParsers extends DefineParsers { override protected val whiteSpace: Regex = "[ \t\r\f\n]+".r override def skipWhitespace: Boolean = true val ws: Regex = whiteSp...
SnipyJulmy/APDL
src/main/scala/apdl/parser/MainParsers.scala
Scala
lgpl-3.0
6,000
// ticket #3432 object Test { trait B[@specialized(Int) T] { def value: T } class A[@specialized(Int) T](x: T) { def foo: B[T] = new B[T] { def value = x } } def main(args: Array[String]) { println((new A("abc")).foo.value) println((new A(10)).foo.value) // before fixing SI-734...
felixmulder/scala
test/files/specialized/spec-ame.scala
Scala
bsd-3-clause
558
package com.google.protobuf import scala.collection.SpecificIterableFactory abstract class ByteStringCompanionParent extends SpecificIterableFactory[Byte, ByteString] { self: ByteString.type => override def fromSpecific(it: IterableOnce[Byte]): ByteString = { val builder = newBuilder builder ++= it b...
trueaccord/protobuf-scala-runtime
shared/src/main/scala-2.13+/com/google/protobuf/ByteStringCompanionParent.scala
Scala
apache-2.0
341
package rip.hansolo.wrapper import rx.Ctx /** * Created by Giymo11 on 14.02.2016. */ case class ImplicitOauth(mobile: Boolean, clientId: String, redirectUri: String, scope: Seq[String]) class RedditBase(userAgent: String, oauth: ImplicitOauth)(implicit ctx: Ctx.Owner) { }
Giymo11/http4s-hansolo.rip
hansolo/js/src/main/scala/rip/hansolo/wrapper/RedditBase.scala
Scala
mit
283
package org.scanamo import scala.reflect.runtime.universe._ import software.amazon.awssdk.services.dynamodb.model._ import software.amazon.awssdk.services.dynamodb.model.ScalarAttributeType._ import org.scalacheck._ import org.scalatest.funspec.AnyFunSpec import org.scalatest.matchers.should.Matchers import org.scala...
scanamo/scanamo
scanamo/src/test/scala-2.x/org/scanamo/DynamoFormatTest.scala
Scala
apache-2.0
2,634
package dk.bayes.clustergraph.infer import dk.bayes.clustergraph.Cluster /** * Specifies order of clusters in which messages are sent for a single iteration of Belief Propagation. * * @author Daniel Korzekwa */ trait MessageOrder { /** * Returns order of clusters in which messages are sent for a single ite...
danielkorzekwa/bayes-scala
src/main/scala/dk/bayes/clustergraph/infer/MessageOrder.scala
Scala
bsd-2-clause
407
/* * 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
service-manager/src/main/scala/es/tid/cosmos/servicemanager/configuration/DynamicPropertiesFactory.scala
Scala
apache-2.0
1,436
package opennlp.scalabha.ngram import scala.annotation.tailrec import scala.collection.generic.CanBuildFrom import opennlp.scalabha.tag.support.CondCountsTransformer import opennlp.scalabha.tag.support.CondFreqDist import opennlp.scalabha.tag.support.MultinomialFreqDist import opennlp.scalabha.util.CollectionUtils._ i...
eponvert/Scalabha
src/main/scala/opennlp/scalabha/ngram/Ngram.scala
Scala
apache-2.0
3,107
package provingground.interface import provingground._ import provingground.{FiniteDistribution => FD, ProbabilityDistribution => PD} import learning._ // import breeze.linalg.{Vector => _, _} // import breeze.stats.distributions._ // import breeze.plot._ import scala.concurrent._ import scala.util.{Try, Random} ...
siddhartha-gadgil/ProvingGround
mantle/src/main/scala/provingground/interface/Sampler.scala
Scala
mit
11,455
/* * PaintIcon.scala * (Mellite) * * Copyright (c) 2012-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.mellite.impl.com...
Sciss/Mellite
app/src/main/scala/de/sciss/mellite/impl/component/PaintIcon.scala
Scala
agpl-3.0
748
package com.abien.xray.roller import java.util.HashMap import org.junit._ import Assert._ import org.mockito.Mockito._ import org.scalatest.mock.MockitoSugar import org.scalatest.junit.JUnitSuite import org.scalatest.junit.ShouldMatchersForJUnit class XRayModelTest extends JUnitSuite with MockitoSugar with ShouldMat...
abhijitsarkar/legacy
adam-bien/x-ray/x-ray-roller-adapter/src/test/java/com/abien/xray/roller/XRayModelTest.scala
Scala
gpl-3.0
1,563
package net.fyrie.redis import org.specs2._ class SetSpec extends mutable.Specification with TestClient { "sadd" >> { "should add a non-existent value to the set" ! client { r ⇒ r.sync.sadd("set-1", "foo") === true r.sync.sadd("set-1", "bar") === true } "should not add an existing value to ...
Tjoene/thesis
Case_Programs/fyrie-redis-master/src/test/scala/net/fyrie/redis/SetSpec.scala
Scala
gpl-2.0
9,413
package example object Traits { trait MiscTrait { val anotherParam: String } trait BaseTrait { val param0: MiscTrait def showAnotherParam: String = param0.anotherParam } }
Alex-At-Home/ammonite-failure-case
src/main/scala/example/Traits.scala
Scala
apache-2.0
214
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package scalaguide.forms.scalaforms { import javax.inject.Inject import java.net.URL import play.api.{Configuration, Environment} import play.api.i18n._ import scalaguide.forms.scalaforms.controllers.routes import play.api.mvc._ import pla...
wsargent/playframework
documentation/manual/working/scalaGuide/main/forms/code/ScalaForms.scala
Scala
apache-2.0
17,412
package endpoints package documented package algebra import scala.language.higherKinds /** * Algebra interface for describing endpoints including documentation * (such as human readable descriptions of things). * * This interface is modeled after [[endpoints.algebra.Endpoints]] but some methods * take addit...
Krever/endpoints
openapi/openapi/src/main/scala/endpoints/documented/algebra/Endpoints.scala
Scala
mit
801
package controllers import java.io._ import javax.inject.Inject import play.api._ import play.api.mvc._ import scala.concurrent.ExecutionContext /** * Controller that serves static resources from an external folder. * It useful in development mode if you want to serve static assets that shouldn't be part of the...
amollenkopf/dcos-iot-demo
map-webapp/app/controllers/ProxyExternalAssets.scala
Scala
apache-2.0
2,020
class Foo[T <: java.io.Serializable, U >: java.lang.Cloneable] object Test { def main(args: Array[String]): Unit = { val tParams = classOf[Foo[_, _]].getTypeParameters tParams.foreach { tp => println(tp.getName + " <: " + tp.getBounds.map(_.getTypeName).mkString(", ")) } } }
som-snytt/dotty
tests/generic-java-signatures/boundsInterfaces.scala
Scala
apache-2.0
297
package io.flow.lint import io.apibuilder.spec.v0.models.Service import io.flow.build.{BuildType, DownloadCache} case class Controller() extends io.flow.build.Controller { override val name = "Linter" override val command = "lint" def run( buildType: BuildType, downloadCache: DownloadCache, servic...
flowcommerce/api-lint
src/main/scala/io/flow/lint/Controller.scala
Scala
mit
885
package dk.gp.hgpc.util import dk.gp.hgpc.HgpcModel import breeze.linalg.DenseMatrix import breeze.linalg.DenseVector import dk.bayes.dsl.factor.DoubleFactor import dk.bayes.math.gaussian.canonical.CanonicalGaussian import dk.bayes.math.gaussian.canonical.DenseCanonicalGaussian import dk.bayes.math.gaussian.canonical....
danielkorzekwa/bayes-scala-gp
src/main/scala/dk/gp/hgpc/util/calcHGPCAcc.scala
Scala
bsd-2-clause
1,604
/******************************************************************************* * Copyright (C) 2012 Łukasz Szpakowski. * * 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 ver...
luckboy/LiftChess
src/pl/luckboy/liftchess/engine/Castling.scala
Scala
lgpl-3.0
1,871
package cn.gridx.scala.spray.request.get import spray.http.{ContentTypes, HttpEntity, HttpResponse, StatusCodes} import spray.routing.{HttpService, Route} import scala.concurrent.Future import scala.concurrent.ExecutionContext.Implicits.global /** * Created by tao on 11/29/16. */ trait RouteService extends HttpS...
TaoXiao/Scala
spray/src/main/scala/cn/gridx/scala/spray/request/get/RouteService.scala
Scala
apache-2.0
754
/* * 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 ...
1haodian/spark
sql/core/src/main/scala/org/apache/spark/sql/RelationalGroupedDataset.scala
Scala
apache-2.0
20,131
import scala.tools.partest._ object Test extends DirectTest { def code = ??? def macros_1 = """ import scala.reflect.macros.blackbox.Context object Impls { def impl(c: Context) = { import c.universe._; c.Expr[Unit](q"()") } } object Macros { //import Impls._ def impl(c: Context...
martijnhoekstra/scala
test/files/run/t5940.scala
Scala
apache-2.0
1,170
package com.sksamuel.elastic4s import com.sksamuel.elastic4s.ElasticDsl._ import com.sksamuel.elastic4s.analyzers.KeywordAnalyzer import com.sksamuel.elastic4s.mappings.FieldType.StringType import com.sksamuel.elastic4s.testkit.ElasticSugar import org.elasticsearch.search.aggregations.bucket.histogram.Histogram import...
muuki88/elastic4s
elastic4s-core-tests/src/test/scala/com/sksamuel/elastic4s/AggregationsTest.scala
Scala
apache-2.0
10,136
object Testo { trait A { type Z <: U class U class O { def foo(x: Z) = 1 } } class H extends A { class Z extends U class I extends O { override def <caret>foo(x: Z) = 2 } } }
ilinum/intellij-scala
testdata/supers/class/ClassAliasDependent.scala
Scala
apache-2.0
225
package com.nulabinc.backlog.r2b.mapping.collector.actor import java.util.concurrent.CountDownLatch import akka.actor.SupervisorStrategy.Restart import akka.actor.{Actor, ActorRef, OneForOneStrategy, Props} import akka.routing.SmallestMailboxPool import com.nulabinc.backlog.migration.common.conf.BacklogConfiguration ...
nulab/BacklogMigration-Redmine
src/main/scala/com/nulabinc/backlog/r2b/mapping/collector/actor/IssuesActor.scala
Scala
mit
3,379
/* * 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 ...
Mega-DatA-Lab/mxnet
scala-package/examples/src/main/scala/ml/dmlc/mxnetexamples/neuralstyle/end2end/Basic.scala
Scala
apache-2.0
5,055
/* scala-stm - (c) 2009-2012, Stanford University, PPL */ package scala.concurrent.stm import org.scalatest.FunSuite import java.util.concurrent.CountDownLatch class UnrecordedTxnSuite extends FunSuite { test("fixed unrecorded txn") { val z = atomic.unrecorded { implicit txn => "foo" } assert(z === "foo"...
nbronson/scala-stm
src/test/scala/scala/concurrent/stm/UnrecordedTxnSuite.scala
Scala
bsd-3-clause
3,290
package scala.virtualization.lms package epfl package test2 import common._ import test1._ import reflect.SourceContext import java.io.PrintWriter import org.scalatest._ trait FFT { this: Arith with Trig => def omega(k: Int, N: Int): Complex = { val kth = -2.0 * k * math.Pi / N Complex(cos(kth), sin(k...
afernandez90/virtualization-lms-core
test-src/epfl/test2-fft/TestFFT.scala
Scala
bsd-3-clause
5,125
package filodb.prom.downsample import scala.concurrent.Await import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration._ import akka.actor.{ActorSystem, CoordinatedShutdown} import akka.http.scaladsl.Http import akka.http.scaladsl.model.{HttpRequest, Uri} import akka.http.scaladsl.mod...
velvia/FiloDB
http/src/test/scala/filodb/prom/downsample/GaugeDownsampleValidator.scala
Scala
apache-2.0
5,727
/* * 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 ...
starpit/openwhisk
tests/src/test/scala/org/apache/openwhisk/core/database/test/AttachmentSupportTests.scala
Scala
apache-2.0
2,452
package org.jetbrains.plugins.scala package highlighter import _root_.org.jetbrains.plugins.scala.lang.psi.api.toplevel.{ScEarlyDefinitions, ScModifierListOwner} import com.intellij.internal.statistic.UsageTrigger import com.intellij.lang.annotation.AnnotationHolder import com.intellij.openapi.editor.colors.TextAttrib...
LPTK/intellij-scala
src/org/jetbrains/plugins/scala/highlighter/AnnotatorHighlighter.scala
Scala
apache-2.0
18,571
/* Copyright 2012 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
sriramkrishnan/scalding
scalding-core/src/test/scala/com/twitter/scalding/SourceSpec.scala
Scala
apache-2.0
3,450
package au.id.cxd.math.probability.discrete import scala.math._ import au.id.cxd.math.count.Choose /** * ##import MathJax * * Created by cd on 7/09/2014. * * The Negative Binomial Distribution (class name NegativeBinomial) provides the probability of the $nth$ success or potentially $nth$ failure of a berno...
cxd/scala-au.id.cxd.math
math/src/main/scala/au/id/cxd/math/probability/discrete/NegativeBinomial.scala
Scala
mit
1,345
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j 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 Foundatio...
HuangLS/neo4j
community/cypher/frontend-2.3/src/main/scala/org/neo4j/cypher/internal/frontend/v2_3/ast/functions/Str.scala
Scala
apache-2.0
1,181
package eventstore package cluster import java.net.InetSocketAddress import com.typesafe.config.Config import eventstore.util.ToCoarsest import scala.collection.JavaConverters._ import scala.concurrent.duration._ /** * Contains settings relating to a connection to a cluster. * * @param gossipSeedsOrDns Gossip seed...
pawelkaczor/EventStore.JVM
src/main/scala/eventstore/cluster/ClusterSettings.scala
Scala
bsd-3-clause
4,097
/* * * * Copyright 2020 Lenses.io. * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by app...
datamountaineer/stream-reactor
kafka-connect-jms/src/main/scala/com/datamountaineer/streamreactor/connect/jms/source/JMSSourceConnector.scala
Scala
apache-2.0
3,383
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs // Licence: http://www.gnu.org/licenses/gpl-3.0.en.html /** * To keep interaction with Lucene really simple, we make the * following assumptions about the entities that we index: * * 1. all entities are flat (no nested objects). * * 2. all v...
d6y/ensime-server
core/src/main/scala/org/ensime/indexer/lucene/package.scala
Scala
gpl-3.0
1,322
import leon.lang._ object MergeSort { sealed abstract class List case class Cons(head:Int,tail:List) extends List case class Nil() extends List case class Pair(fst:List,snd:List) def contents(l: List): Set[Int] = l match { case Nil() => Set.empty case Cons(x,xs) => contents(xs) ++ Set(x) } def...
ericpony/scala-examples
testcases/verification/list-algorithms/MergeSort.scala
Scala
mit
1,761
// Copyright 2014 Commonwealth Bank of Australia // // 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 ap...
CommBank/piped
src/test/scala/com/cba/omnia/piped/aggregators/LimitedSizeHistogramSpec.scala
Scala
apache-2.0
2,643
package edu.nus.systemtesting.hipsleek.app import java.io.File import java.io.PrintWriter import java.nio.file.Paths import scala.io.Source import edu.nus.systemtesting.ConstructTestCase import edu.nus.systemtesting.ExpectsOutput import edu.nus.systemtesting.PreparedSystem import edu.nus.systemtesting.TestCase impor...
rgoulter/system-testing
src/main/scala/edu/nus/systemtesting/hipsleek/app/RunFast.scala
Scala
mit
8,508
package com.twitter.finagle.redis.integration import com.twitter.finagle.redis.naggati.RedisClientTest import com.twitter.finagle.redis.tags.{RedisTest, ClientTest} import com.twitter.util.Await import com.twitter.finagle.redis.util.{CBToString, StringToChannelBuffer} import org.junit.Ignore import org.junit.runner.Ru...
liamstewart/finagle
finagle-redis/src/test/scala/com/twitter/finagle/redis/commands/key/KeyClientIntegrationSuite.scala
Scala
apache-2.0
4,866
/*********************************************************************** * Copyright (c) 2013-2020 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...
aheyne/geomesa
geomesa-gt/geomesa-gt-tools/src/main/scala/org/locationtech/geomesa/geotools/tools/GeoToolsRunner.scala
Scala
apache-2.0
1,581
/** * The MIT License (MIT) * * Copyright (c) 2013 Israel Freitas(israel.araujo.freitas@gmail.com) * * 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 with...
ifreitas/brain
src/test/scala/brain/models/TeachingToCategoryAdapterTest.scala
Scala
apache-2.0
22,412
package org.ferrit.core.crawler import akka.actor.{Actor, ActorRef, Props, Terminated} import akka.actor.OneForOneStrategy import akka.actor.SupervisorStrategy.Stop import akka.pattern.ask import akka.pattern.pipe import akka.event.Logging import akka.routing.Listen import akka.util.Timeout import scala.concurrent.Fut...
reggoodwin/ferrit
src/main/scala/org/ferrit/core/crawler/CrawlerManager.scala
Scala
mit
4,465
import stainless.lang._ import stainless.annotation._ import stainless.proof._ object LawTypeArgsElim { abstract class Structure[A] { def doSomething(x: A, y: A): A @law def someLaw(x: A, y: A): Boolean = { doSomething(x, y) == doSomething(y, x) } } case class BigIntStructure() extends St...
epfl-lara/stainless
frontends/benchmarks/verification/valid/LawTypeArgsElim.scala
Scala
apache-2.0
1,652
package com.twitter.finagle.example.kestrel import com.twitter.conversions.time._ import com.twitter.finagle.builder.ClientBuilder import com.twitter.finagle.kestrel.protocol.Kestrel import com.twitter.finagle.kestrel.{ReadHandle, Client} import com.twitter.util.JavaTimer import com.twitter.finagle.service.Backoff imp...
firebase/finagle
finagle-example/src/main/scala/com/twitter/finagle/example/kestrel/KestrelClient.scala
Scala
apache-2.0
2,339
package edu.arizona.sista.learning import edu.arizona.sista.struct.Counter /** * Trait for ML datums. L indicates the type of the label; F indicates the type of the feature * User: mihais * Date: 4/23/13 */ trait Datum[L, F] { val label:L def features:Iterable[F] def featuresCounter:Counter[F] override...
capdevc/processors
src/main/scala/edu/arizona/sista/learning/Datum.scala
Scala
apache-2.0
2,299
// // Taranos Cloud Sonification Framework: Service Core // Copyright (C) 2018 David Hinson, Netrogen Blue LLC (dhinson@netrogenblue.com) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software F...
taranos/taranoscsf-core
src/test/scala/org/taranos/mc/test/TrunkSpec.scala
Scala
agpl-3.0
157,995
/* * Copyright 2022 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
app/controllers/SubmissionInProgressController.scala
Scala
apache-2.0
2,819
/* * Copyright 2011-2018 GatlingCorp (http://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applic...
wiacekm/gatling
gatling-core/src/test/scala/io/gatling/core/stats/message/StatusSpec.scala
Scala
apache-2.0
1,209
package com.thetestpeople.trt.jenkins.trigger import java.net.URI object JenkinsUrlHelper { def getServerUrl(jobUrl: URI) = { val jobUrlString = jobUrl.toString jobUrlString.lastIndexOf("/job/") match { case -1 ⇒ throw new RuntimeException(s"Rerun URL is not a Jenkins job: $jobUrlString") case ...
thetestpeople/trt
app/com/thetestpeople/trt/jenkins/trigger/JenkinsUrlHelper.scala
Scala
mit
379
package com.anakiou.modbus.msg import java.io.DataInput import java.io.DataOutput import com.anakiou.modbus.Modbus import com.anakiou.modbus.ModbusCoupler import com.anakiou.modbus.procimg.IllegalAddressException import com.anakiou.modbus.procimg.InputRegister class ReadInputRegistersRequest extends ModbusRequest() ...
anakiou/scamod
src/com/anakiou/modbus/msg/ReadInputRegistersRequest.scala
Scala
apache-2.0
1,824
package org.apress.prospark import org.apache.spark.SparkContext import org.apache.spark.SparkConf import org.apache.spark.streaming.{ Milliseconds, Seconds, StreamingContext } import org.apache.hadoop.io.{ Text, LongWritable, IntWritable } import org.apache.hadoop.fs.Path import org.apache.hadoop.mapreduce.lib.input....
ZubairNabi/prosparkstreaming
Chap3/src/main/scala/org/apress/prospark/L3-DStreamKeyValue.scala
Scala
apache-2.0
3,851
package io.finch import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.{Future => ScalaFuture} import cats.Id import cats.effect.IO import com.twitter.finagle.http.Response import com.twitter.util.{Future => TwitterFuture} import org.scalacheck.Arbitrary import org.scalatestplus.scalacheck...
finagle/finch
core/src/test/scala/io/finch/MethodSpec.scala
Scala
apache-2.0
6,365
package gov.uk.dvla.vehicles.keeper.stepdefs import cucumber.api.java.en.{Then, When, Given} import gov.uk.dvla.vehicles.keeper.helpers.AcceptanceTestHelper import org.openqa.selenium.WebDriver import org.scalatest.selenium.WebBrowser.{click, go, pageTitle, pageSource} import pages.changekeeper.DateOfSalePage import p...
dvla/vehicles-change-keeper-online
acceptance-tests/src/test/scala/gov/uk/dvla/vehicles/keeper/stepdefs/KeeperToKeeperAddressFieldsSteps.scala
Scala
mit
6,678
/* * 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 ...
xccui/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/calls/MethodCallGen.scala
Scala
apache-2.0
3,116
/* * Copyright 2016 rdbc contributors * * 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...
rdbc-io/rdbc
rdbc-tck/src/main/scala/io/rdbc/tck/SyntaxErrorSpec.scala
Scala
apache-2.0
3,222
package cn.commercial.model import cn.changhong.orm.Tables.Tables.{AccessTokenRow, UserRow} import cn.changhong.finagle.http.MyAuth2Server._ import cn.changhong.orm.Tables.Tables._ import scala.slick. /** * Created by yangguo on 14-11-3. */ object AuthDao{ def login(username:String,password:String,clientId:String,...
guoyang2011/myfinagle
Server/src/main/scala/cn/commercial/model/Dao.scala
Scala
apache-2.0
476
/* * Copyright 2015 Foundational Development * * 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 ...
rssvihla/datastax_work
spark_commons/benchmarks/spark_throughput/src/main/scala/pro/foundev/benchmarks/spark_throughput/launchers/CacheBenchmarkLauncher.scala
Scala
apache-2.0
1,609
/* * 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 ...
lvdongr/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/continuous/EpochCoordinator.scala
Scala
apache-2.0
9,896
package dotty.tools package dotc package typer import core._ import ast._ import Trees._, Constants._, StdNames._, Scopes._, Denotations._ import Contexts._, Symbols._, Types._, SymDenotations._, Names._, NameOps._, Flags._, Decorators._ import ast.desugar, ast.desugar._ import ProtoTypes._ import util.Positions._ imp...
AlexSikia/dotty
src/dotty/tools/dotc/typer/Namer.scala
Scala
bsd-3-clause
28,939
/* * 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...
dotty-staging/scalatest
scalatest-test/src/test/scala/org/scalatest/fixture/AsyncFeatureSpecSpec2.scala
Scala
apache-2.0
31,759
package scala.meta.contrib.implicits import scala.meta._ import scala.meta.contrib._ import scala.meta.contrib.equality.{Structurally, Syntactically} trait SetExtensions { implicit class SetEnrichments[A <: Tree](set: Set[A]) { def structurally: Set[Structurally[A]] = set.map(Structurally(_)) def syn...
scalameta/scalameta
scalameta/contrib/shared/src/main/scala/scala/meta/contrib/implicits/SetExtensions.scala
Scala
bsd-3-clause
438
/* * 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 ...
spark0001/spark2.1.1
core/src/test/scala/org/apache/spark/network/netty/NettyBlockTransferServiceSuite.scala
Scala
apache-2.0
3,320
object `inline-match-gadt` { class Exactly[T] erased def exactType[T]: Exactly[T] = compiletime.erasedValue inline def foo[T](t: T): T = inline exactType[T] match { case _: Exactly[Int] => 23 case _ => t } }
dotty-staging/dotty
tests/pos-custom-args/inline-match-gadt.scala
Scala
apache-2.0
235
/*********************************************************************** * Copyright (c) 2013-2015 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 is ...
setumaven/geomesa
geomesa-process/src/main/scala/org/locationtech/geomesa/process/Point2PointProcess.scala
Scala
apache-2.0
4,697
package spark.deploy.worker import spark.util.IntParam import spark.util.MemoryParam import spark.Utils import java.lang.management.ManagementFactory /** * Command-line parser for the master. */ class WorkerArguments(args: Array[String]) { var ip = Utils.localIpAddress() var port = 0 var webUiPort = 8081 va...
ankurdave/arthur
core/src/main/scala/spark/deploy/worker/WorkerArguments.scala
Scala
bsd-3-clause
3,050
package ooyala.common.akka import akka.actor.{ActorSystem, ActorRef} import akka.pattern.gracefulStop import scala.concurrent.Await object AkkaTestUtils { import scala.concurrent.duration._ // This is a var for now because we need to let people change it, and we can't pass this in as a param // because then we...
nachiketa-shukla/spark-jobserver
akka-app/src/ooyala.common.akka/AkkaTestUtils.scala
Scala
apache-2.0
785