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 org.adridadou.ethereum.propeller.converters.e2e import java.math.BigInteger import org.scalacheck.Arbitrary._ import org.scalacheck.Prop._ import org.scalatest.check.Checkers import org.scalatest.{FlatSpec, Matchers} import scala.util.Try /** * Created by davidroon on 26.03.17. * This code is released u...
adridadou/eth-propeller-core
src/test/scala/org/adridadou/ethereum/propeller/converters/e2e/NumberTest.scala
Scala
apache-2.0
2,680
package breeze.linalg.operators /* Copyright 2012 Daniel Ramage 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...
ktakagaki/breeze
src/main/scala/breeze/linalg/operators/OpType.scala
Scala
apache-2.0
3,720
/* * 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 ...
minixalpha/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/events.scala
Scala
apache-2.0
4,432
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
bigdatagenomics/gnocchi
gnocchi-cli/src/main/scala/net/fnothaft/gnocchi/cli/ConstructGnocchiModel.scala
Scala
apache-2.0
6,337
package colossus package core import java.nio.ByteBuffer import java.nio.channels.{CancelledKeyException, ClosedChannelException, SelectionKey, SocketChannel} sealed trait WriteStatus object WriteStatus { //connection is busted case object Failed extends WriteStatus //data was partially written and the rest is ...
zgagnon/colossus
colossus/src/main/scala/colossus/core/WriteBuffer.scala
Scala
apache-2.0
8,235
package com.getbootstrap.savage.util import scala.util.Try object IntFromStr { def unapply(str: String): Option[Int] = Try{ Integer.parseInt(str) }.toOption }
twbs/savage
src/main/scala/com/getbootstrap/savage/util/IntFromStr.scala
Scala
mit
163
package net.scalax.hf.test import slick.collection.heterogeneous.HNil import slick.jdbc.H2Profile.api._ /** * Created by djx314 on 15-6-22. */ case class SmallModel( id: Option[Long], a1: Int, a2: Option[Int], a3: String, a4: Int, a5: Int ) class SmallTable(tag: Tag) extends Table[SmallModel](tag, "aab...
scalax/slick-summer
src/test/scala/net/scalax/hf/Models.scala
Scala
mit
2,584
import com.hypertino.binders.json.JsonBinders import com.hypertino.binders.value._ import org.scalatest.{FlatSpec, Matchers} case class Mixed(a: Int, b: String, extra: Value) class TestMixJsonSerializer extends FlatSpec with Matchers { import JsonBinders._ "Json " should " serialize Mixed" in { val t = Mix...
hypertino/json-binders
jsonBinders/shared/src/test/scala/TestMixJsonSerializer.scala
Scala
bsd-3-clause
985
package lila.slack import org.joda.time.DateTime import lila.common.LightUser import lila.hub.actorApi.slack._ import lila.user.User final class SlackApi( client: SlackClient, isProd: Boolean, implicit val lightUser: LightUser.Getter) { import SlackApi._ object charge { import lila.hub.actorAp...
clarkerubber/lila
modules/slack/src/main/SlackApi.scala
Scala
agpl-3.0
3,959
package shield.config import scala.concurrent.duration.FiniteDuration sealed trait KVStoreConfig case class BreakerStoreConfig(backer: String, maxFailures: Int, callTimeout: FiniteDuration, resetTimeout: FiniteDuration) extends KVStoreConfig case class MemoryStoreConfig(hashCapacity: Int, keyCapacity: Int, limitCapa...
RetailMeNot/shield
src/main/scala/shield/config/KVStoreConfig.scala
Scala
mit
416
/*********************************************************************** * 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-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/index/AccumuloQueryPlan.scala
Scala
apache-2.0
7,513
package org.jetbrains.plugins.scala package lang package psi package stubs package impl import com.intellij.psi.PsiElement import com.intellij.psi.stubs.{IStubElementType, StubElement} import com.intellij.util.io.StringRef import org.jetbrains.plugins.scala.lang.psi.api.base.patterns.ScReferencePattern /** * User: ...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/stubs/impl/ScReferencePatternStubImpl.scala
Scala
apache-2.0
712
package dc.json import spray.json.{JsonFormat, DefaultJsonProtocol} case class CouchViewResult[T](total_rows: Int, offset: Int, rows: List[T]) object CouchViewResult extends DefaultJsonProtocol { implicit def couchViewResultFormat[T: JsonFormat] = jsonFormat3(CouchViewResult.apply[T]) }
MagnusAk78/dynamic-checklist-server
tools/src/main/scala/dc/json/CouchViewResult.scala
Scala
gpl-3.0
292
package com.seadowg.milo.test.events import org.specs2.mutable._ import org.specs2.mock._ import com.seadowg.milo.events._ class EventStreamSpec extends Specification with Mockito { "EventStream".title "when created" should { "always have an event" in { val stream1 = new EventStream(new Event[Int]) ...
seadowg/milo
src/test/scala/com/seadowg/milo/test/events/EventStreamSpec.scala
Scala
mit
1,778
/* * 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 ...
zhangminglei/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/rules/logical/LogicalUnnestRule.scala
Scala
apache-2.0
5,391
package com.twitter.finagle.mysql.protocol import com.twitter.logging.Logger import org.jboss.netty.buffer.{ChannelBuffer, ChannelBuffers} object Command { val COM_SLEEP = 0x00.toByte // internal thread state val COM_QUIT = 0x01.toByte // mysql_close val COM_INIT_DB = 0x...
foursquare/finagle
finagle-mysql/src/main/scala/com/twitter/finagle/mysql/protocol/Request.scala
Scala
apache-2.0
7,764
package spark import java.io.EOFException import java.util.NoSuchElementException import org.apache.hadoop.io.LongWritable import org.apache.hadoop.io.NullWritable import org.apache.hadoop.io.Text import org.apache.hadoop.mapred.FileInputFormat import org.apache.hadoop.mapred.InputFormat import org.apache.hadoop.mapr...
ankurdave/arthur
core/src/main/scala/spark/HadoopRDD.scala
Scala
bsd-3-clause
3,214
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
YMCoding/kafka-0.11.0.0-src-with-comment
core/src/main/scala/kafka/log/LogSegment.scala
Scala
apache-2.0
25,057
package mesosphere import com.wix.accord.Descriptions.{Generic, Path} import com.wix.accord._ import mesosphere.marathon.Normalization import mesosphere.marathon.ValidationFailedException import mesosphere.marathon.api.v2.Validation import mesosphere.marathon.api.v2.Validation.ConstraintViolation import org.scalatest....
gsantovena/marathon
src/test/scala/mesosphere/ValidationTestLike.scala
Scala
apache-2.0
4,310
package uber.nosurge.constants import shared.Location object Endpoints { def estimate(startLocation: Location, endLocation: Location): String = { s"/estimates?startLatitude=${startLocation.latitude}&startLongitude=${startLocation.longitude}&endLatitude=${endLocation.latitude}&endLongitude=${endLocation.longitu...
allantl/uber-nosurge-notifications
frontend/src/main/scala/uber/nosurge/constants/Endpoints.scala
Scala
apache-2.0
465
package uk.ac.ncl.openlab.intake24.foodsql.admin import javax.sql.DataSource import anorm.{AnormUtil, BatchSql, Macro, NamedParameter, SQL, SqlParser, sqlToSimple} import com.google.inject.name.Named import com.google.inject.{Inject, Singleton} import org.apache.commons.lang3.StringUtils import uk.ac.ncl.openlab.inta...
digitalinteraction/intake24
FoodDataSQL/src/main/scala/uk/ac/ncl/openlab/intake24/foodsql/admin/NutrientTablesAdminImpl.scala
Scala
apache-2.0
11,503
package com.rasterfoundry.datamodel import cats.implicits._ import io.circe._ sealed abstract class TaskType(val repr: String) { override def toString = repr } object TaskType { case object Label extends TaskType("LABEL") case object Review extends TaskType("REVIEW") def fromString(s: String): TaskType = s....
raster-foundry/raster-foundry
app-backend/datamodel/src/main/scala/TaskType.scala
Scala
apache-2.0
847
package sbt.testing /** * A way to identify test classes and/or modules that should * be discovered when the client performs discovery. * * Scala.js: Implementations may not rely on the identity of Fingerprints, * since they are serialized between JS / JVM. */ trait Fingerprint /** * Indicates that classes or ...
colinrgodsey/scala-js
test-interface/src/main/scala/sbt/testing/Fingerprints.scala
Scala
bsd-3-clause
2,380
def fmap[A, B](f: A => B)(ca: Const[C, A]): Const[C, B]
hmemcpy/milewski-ctfp-pdf
src/content/1.7/code/scala/snippet27.scala
Scala
gpl-3.0
55
/* active-learning-scala: Active Learning library for Scala Copyright (c) 2014 Davi Pereira dos Santos 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 ...
active-learning/active-learning-scala
src/main/scala/al/strategies/Margin.scala
Scala
gpl-2.0
1,179
import sbt._ import Keys._ object BuildSettings { // Basic settings for our app lazy val basicSettings = Seq[Setting[_]]( //format: OFF organization := "org.scalario", mainClass := Some("org.scalario.Boot"), version := "1.1", description := "a s...
ferrlin/scalario
project/BuildSettings.scala
Scala
mit
1,482
package com.rarebooks.library class CatalogSpec extends BaseSpec { import Catalog._ import RareBooksProtocol._ "books" should { "contain theEpicOfGilgamesh, phaedrus and theHistories" in { books.values.toSet should === (Set[BookCard](theEpicOfGilgamesh, phaedrus, theHistories)) } } "findBook...
ironfish/reactive-application-development-scala
chapter4_004_resilience/src/test/scala/com/rarebooks/library/CatalogSpec.scala
Scala
apache-2.0
2,969
object Test { class A { object foo { } def foo(x: String) = 1 } val a = new A a./* line: 7 */foo("") }
ilinum/intellij-scala
testdata/resolve2/overloading/hardOverloadings/FunctionObject.scala
Scala
apache-2.0
126
package mr.merc.image import scalafx.scene.image.Image class LazyMImage private [image] (path:String, xOffset:Int, yOffset:Int, alpha:Float) extends MImage(xOffset, yOffset, alpha){ @volatile lazy val image: Image = MImageCache.get(path) def imagePath: Some[String] = Some(path) override def changeAlpha(new...
RenualdMarch/merc
src/main/scala/mr/merc/image/LazyMImage.scala
Scala
gpl-3.0
386
/** Copyright 2009 Steve Jenson under the Apache 2.0 License */ package com.saladwithsteve.mailslot import com.twitter.commons.Stats.Counter import com.twitter.commons.Stats.Timing import java.util.concurrent.atomic.AtomicInteger object MailStats { val bytesWritten = new Counter val totalSessions = new AtomicInte...
stevej/mailslot
src/main/scala/com/saladwithsteve/mailslot/MailStats.scala
Scala
apache-2.0
435
package de.sciss.fscape package tests import de.sciss.file._ import de.sciss.filecache.Limit import de.sciss.fscape.Ops._ import de.sciss.fscape.lucre.Cache import de.sciss.lucre.DoubleObj import de.sciss.lucre.synth.InMemory import de.sciss.proc.FScape.Output import de.sciss.proc.{FScape, GenView, Universe} import s...
Sciss/FScape-next
lucre/jvm/src/test/scala/de/sciss/fscape/tests/DoubleOutputTest.scala
Scala
agpl-3.0
2,063
package models import org.opencompare.api.java.PCMContainer /** * Created by gbecan on 12/12/14. */ class DatabasePCM(val id : Option[String], var pcmContainer : Option[PCMContainer]) { }
OpenCompare/OpenCompare
org.opencompare/play-app/app/models/DatabasePCM.scala
Scala
apache-2.0
193
/* * Copyright 2015 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 ...
keshin/squbs
squbs-pattern/src/test/scala/org/squbs/pattern/timeoutpolicy/TimeoutRuleConversionsSpec.scala
Scala
apache-2.0
1,244
/** * Copyright (C) 2015 DANS - Data Archiving and Networked Services (info@dans.knaw.nl) * * 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...
DANS-KNAW/easy-pid-generator
src/test/scala/nl/knaw/dans/easy/pid/ReadmeSpec.scala
Scala
apache-2.0
2,268
package service import api.{LoginRequest, LoginResponse} import org.slf4j.LoggerFactory import play.api.libs.json.{JsError, JsSuccess, Json} import utils.TokenManager import scala.concurrent.Future /** * Created by rois on 10/02/2017. */ object LoginService extends Service[LoginRequest, LoginResponse] { ...
roischmidt/OOOServer
src/main/scala-2.12/service/LoginService.scala
Scala
gpl-3.0
1,464
/* SCALA Implementation of Selection 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 ShellSort { def incSeq(len: Int) = new Iterator[Int] { private[this] var x: Int = l...
aayushKumarJarvis/Code-Snippets-JAVA-SCALA
src/main/scala/ShellSort.scala
Scala
mit
862
/** * Copyright 2014 Marco Vermeulen * * 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...
sdkman/sdkman-release-api
src/main/scala/io/sdkman/release/ExceptionHandlerAdvice.scala
Scala
apache-2.0
1,362
package com.fsist.stream import com.fsist.util.concurrent.{Func, AsyncFunc} import org.scalatest.FunSuite import org.scalatest.concurrent.PatienceConfiguration.Timeout import scala.collection.immutable import scala.collection.immutable.BitSet import scala.concurrent.Promise import scala.util.Random import scala.concu...
fsist/future-streams
src/test/scala/com/fsist/stream/ConnectorTest.scala
Scala
apache-2.0
6,951
package org.dsa.iot.rx.core import org.dsa.iot.rx.RxMergerN import rx.lang.scala.Observable /** * Combines multiple Observables into a single Observable of lists, emitting a new list each time any * of the sources emits a new item. * * @see <a href="http://reactivex.io/documentation/operators/combinelatest.html...
IOT-DSA/dslink-scala-ignition
src/main/scala/org/dsa/iot/rx/core/CombineLatest.scala
Scala
apache-2.0
670
/* Copyright 2017-18, Emmanouil Antonios Platanios. 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/licenses/LICENSE-2.0 * * Unless ...
eaplatanios/tensorflow
tensorflow/scala/api/src/main/scala/org/platanios/tensorflow/api/learn/Model.scala
Scala
apache-2.0
21,221
package net.shiroka.tools.ofx.conversions import java.io._ import scala.io.Source import scala.util.control.Exception.allCatch import scala.collection._ import scala.collection.mutable.ArrayBuffer import com.github.tototoshi.csv._ import org.joda.time._ import org.joda.time.format._ import net.ceedubs.ficus.Ficus._ im...
ikuo/ofx-tools
src/main/scala/net/shiroka/tools/ofx/conversions/FreeeTransfers.scala
Scala
mit
3,003
/* * 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-reactive/shared/src/test/scala/monix/reactive/internal/operators/DoOnEarlyStopSuite.scala
Scala
apache-2.0
4,588
/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* Copyright (c) 2007-2016, Rickard Nilsson All rights reserved. Redistribution and use in source and binar...
sirthias/swave
core/src/test/scala/org/scalacheck/Platform.scala
Scala
mpl-2.0
3,936
/* * 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/logical/LogicalUnnestRule.scala
Scala
apache-2.0
7,372
package ioinformatics.neo4j.rdf.plugin import java.io.InputStream import java.net.URLEncoder import javax.ws.rs.core.{HttpHeaders, MediaType} import org.apache.commons.io.IOUtils import org.codehaus.jackson.node.ArrayNode import org.neo4j.harness.{ServerControls, TestServerBuilders} import org.neo4j.test.server.HTTP ...
io-informatics/neo4j-rdf-plugin
src/test/scala/ioinformatics/neo4j/rdf/plugin/RdfPluginTest.scala
Scala
gpl-3.0
5,279
package jp.co.bizreach.elasticsearch4s.retry import scala.concurrent.duration.FiniteDuration case class RetryConfig( maxAttempts: Int, retryDuration: FiniteDuration, backOff: BackOff )
bizreach/elastic-scala-httpclient
elastic-scala-httpclient/src/main/scala/jp/co/bizreach/elasticsearch4s/retry/RetryConfig.scala
Scala
apache-2.0
192
/*** * Excerpted from "Seven Concurrency Models in Seven Weeks", * published by The Pragmatic Bookshelf. * Copyrights apply to this code. It may not be used to create training material, * courses, books, articles, and the like. Contact us if you are in doubt. * We make no guarantees that this code is fit for any ...
XBOOS/concurrency
code/ActorsScala/WordCount/src/main/scala/com/paulbutcher/Parser.scala
Scala
gpl-2.0
787
/* * Copyright 2009 Mark Tye * * 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, * so...
mtye/lift-appengine
lift-appengine/src/main/scala/net/liftweb/ext_api/appengine/Entity.scala
Scala
apache-2.0
5,732
package com.twitter.server.view import com.twitter.finagle.{Service, SimpleFilter} import com.twitter.finagle.http.{Request, Response} import com.twitter.io.Buf import com.twitter.server.util.HttpUtils.{expectsHtml, newResponse} import com.twitter.util.Future class TextBlockView extends SimpleFilter[Request, Response...
twitter/twitter-server
server/src/main/scala/com/twitter/server/view/TextBlockView.scala
Scala
apache-2.0
713
/*********************************************************************** * Copyright (c) 2013-2019 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
elahrvivaz/geomesa
geomesa-kudu/geomesa-kudu-datastore/src/test/scala/org/locationtech/geomesa/kudu/schema/KuduColumnAdapterTest.scala
Scala
apache-2.0
8,309
/* Title: Pure/General/file.scala Author: Makarius File-system operations. */ package isabelle import java.io.{BufferedWriter, OutputStreamWriter, FileOutputStream, BufferedOutputStream, OutputStream, InputStream, FileInputStream, BufferedInputStream, BufferedReader, InputStreamReader, File => JFi...
larsrh/libisabelle
modules/pide/2019-RC4/src/main/scala/General/file.scala
Scala
apache-2.0
11,070
/* * 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 ...
kevinyu98/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceUtils.scala
Scala
apache-2.0
3,243
/** * Generated by Scrooge * version: 4.7.0 * rev: d9d56174937f524a1981b38ebd6280eef7eeda4a * built at: 20160427-121531 */ package com.komanov.serialization.domain.thriftscala import com.twitter.scrooge.{ LazyTProtocol, TFieldBlob, ThriftException, ThriftStruct, ThriftStructCodec3, ThriftStructFieldInfo...
dkomanov/scala-serialization
scala-serialization/src/main/scala/com/komanov/serialization/domain/thriftscala/DomainRemovedPb.scala
Scala
mit
13,233
object Fibonacci { def fib(n: Int): Int = { @annotation.tailrec def calc(n: Int, pr: Int, nx: Int): Int = { if (0 == n) pr else calc(n-1, nx, pr+nx) } // using tail-recursive local fn: // pr=prior, nx=next fibonacci numbers calc(n, 0, 1) } def main(args: Array[String]): Unit ...
dpapathanasiou/fp-in-scala
2-Getting-Started/Fibonacci.scala
Scala
mit
362
package hoecoga.actor.scheduler import akka.actor.Props import akka.persistence.{PersistentActor, RecoveryCompleted, RecoveryFailure, SnapshotOffer} import hoecoga.actor.scheduler.JobPersistentActor._ import hoecoga.scheduler.JobData import hoecoga.slack.SlackChannel /** * A persistent actor for [[JobData]]. */ cla...
hoecoga/hoecoga-bot
src/main/scala/hoecoga/actor/scheduler/JobPersistentActor.scala
Scala
mit
2,513
package com.heromq.play import grizzled.slf4j.Logging import java.nio.charset.Charset import play.api.libs.iteratee._ import play.api.mvc._ import scala.concurrent.ExecutionContext.Implicits.global import scala.language.reflectiveCalls case class Chunk(topic: String, payload: String) object API extends Controller wi...
imikushin/heromq-play
app/com/heromq/play/API.scala
Scala
mit
1,072
package repositories.loan.dao import com.google.inject.{Inject, Singleton} import models.loan.LoanEventTypes.{ObjectLentType, ObjectReturnedType} import models.loan.LoanType import models.loan.event.{LoanEvent, ObjectsLent, ObjectsReturned} import no.uio.musit.MusitResults.{MusitResult, MusitSuccess} import no.uio.mus...
MUSIT-Norway/musit
service_backend/app/repositories/loan/dao/LoanDao.scala
Scala
gpl-2.0
4,394
package scala.reflect.internal import org.openjdk.jmh.annotations._ import org.openjdk.jmh.infra._ import org.openjdk.jmh.runner.IterationType import benchmark._ import java.util.concurrent.TimeUnit import scala.reflect.internal.util.BatchSourceFile @BenchmarkMode(Array(org.openjdk.jmh.annotations.Mode.SampleTime)) ...
scala/scala
test/benchmarks/src/main/scala/scala/reflect/internal/LubBenchmark.scala
Scala
apache-2.0
1,554
package com.blinkbox.books.catalogue.searchv1 import com.blinkbox.books.catalogue.common.{ BookFixtures, Contributor, OtherText, Subject, Events } import com.blinkbox.books.catalogue.searchv1.V1SearchService.{BookSimilarResponse, Book} import org.scalatest.{ FlatSpec, Matchers } import spray.http.StatusCodes import sc...
blinkboxbooks/catalogue-v2.scala
catalogue2-search-public/src/test/scala/com/blinkbox/books/catalogue/searchv1/SimilarBooksSpecs.scala
Scala
mit
3,791
package org.lolhens.renderengine.vector final case class Vector2d private(override val x: Double, override val y: Double) extends Vector2[Double](x, y) { override type Self = Vector2d override def Vector2(x: Double, y: Double): Vector2d = if (x == this.x && y == this.y) this ...
LolHens/LibRenderEngine
src/main/scala/org/lolhens/renderengine/vector/Vector2d.scala
Scala
gpl-2.0
1,354
/* * Copyright (C) 2010 Mikhail Vorozhtsov * * 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...
mvv/layson
src/main/scala/com/github/mvv/layson/json/Values.scala
Scala
apache-2.0
8,608
package space.spacelift.mq.proxy.impl.amqp import java.util.concurrent.TimeUnit import akka.actor.{Actor, ActorSystem, Props} import akka.pattern.ask import akka.testkit.{ImplicitSender, TestKit} import com.rabbitmq.client.ConnectionFactory import org.junit.runner.RunWith import org.scalatest.{Matchers, WordSpecLike}...
Spacelift/akka-mq-proxies
akka-mq-proxies-amqp/src/test/scala/space/spacelift/mq/proxy/impl/amqp/RemoteGpbCallTest.scala
Scala
mit
3,013
/* * IndexTest.scala * Variable elimination tests. * * Created By: Brian Ruttenberg (bruttenberg@cra.com) * Creation Date: Jan 1, 2009 * * Copyright 2013 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email figaro@cra.com for information. * * See http://www.github.c...
agarbuno/figaro
Figaro/src/test/scala/com/cra/figaro/test/algorithm/decision/index/IndexTest.scala
Scala
bsd-3-clause
2,533
package com.faacets.qalg package algebra package converted import scala.{specialized => sp} trait ConvertedVec[V, @sp(Double, Long) A, J] extends Any with Converted[A, J] with Vec[V, A] { def source: Vec[V, J] override def sameShape(x: V, y: V): Boolean = source.sameShape(x, y) override def linearLengt...
denisrosset/qalg
core/src/main/scala/qalg/algebra/converted/ConvertedVec.scala
Scala
mit
659
package ru.pavlenov.handler /** * ⓭ + 16 * Какой сам? by Pavlenov Semen 24.07.14. * ${TITLE} * ${URL} * * ${GIVEN} * ${RETURN} */ import java.util.Date import akka.actor.Actor import org.mashupbots.socko.events.HttpRequestEvent /** * Hello processor writes a greeting and stops. */ class HelloHandler exten...
laser13/Akka-plus
src/main/scala/ru/pavlenov/handler/HelloHandler.scala
Scala
mit
503
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package play.it.test import okhttp3.Protocol import okhttp3.Response import play.api.mvc._ import play.api.mvc.request.RequestAttrKey import play.api.test.PlaySpecification /** * Tests that the [[EndpointIntegrationSpecification]] works properly. *...
wegtam/playframework
core/play-integration-test/src/it/scala/play/it/test/EndpointIntegrationSpecificationSpec.scala
Scala
apache-2.0
1,552
/* * Copyright ActionML, LLC under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * ActionML licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except...
actionml/harness
rest-server/server/src/main/scala/com/actionml/authserver/services/ClientAuthorizationService.scala
Scala
apache-2.0
3,032
/* * Copyright 2012 OneCalendar * * 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 w...
OneCalendar/OneCalendar
app/api/eventbrite/EventBriteParser.scala
Scala
apache-2.0
2,021
/* * 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 ...
kimihe/Swallow
swallow-benchmark/HiBench-master/sparkbench/graph/src/main/scala/com/intel/hibench/sparkbench/graph/nweight/Utils.scala
Scala
apache-2.0
2,304
package com.datawizards.splot.mapper import com.datawizards.splot.model.PlotAxisValues._ import com.datawizards.splot.model.{Plot, PlotType, PlotsGrid} import org.knowm.xchart.XYSeries.XYSeriesRenderStyle import org.knowm.xchart.internal.Series import org.knowm.xchart._ import org.knowm.xchart.internal.chartpart.Chart...
piotr-kalanski/SPlot
src/main/scala/com/datawizards/splot/mapper/SPlotToXChartMapper.scala
Scala
apache-2.0
5,958
package mesosphere.marathon package api.v2 import java.net.URI import javax.inject.Inject import javax.servlet.http.HttpServletRequest import javax.ws.rs._ import javax.ws.rs.core.{ Context, Response } import akka.stream.Materializer import mesosphere.marathon.api.v2.InfoEmbedResolver._ import mesosphere.marathon.api...
Caerostris/marathon
src/main/scala/mesosphere/marathon/api/v2/GroupsResource.scala
Scala
apache-2.0
13,888
package spatial.lang import control._ import FringeTransfers._ import argon.core._ import forge._ import virtualized._ import spatial.metadata._ import spatial.utils._ // object ShiftInternal { // target = spatialConfig.target // @internal def expandLsh // } object DRAMTransfersInternal { @stateful def target...
stanford-ppl/spatial-lang
spatial/core/src/spatial/lang/DRAMTransfersInternal.scala
Scala
mit
18,439
package models.join import models.db._ import scalikejdbc._ import scala.collection.breakOut /** * * @author ponkotuy * Date: 15/02/14. */ case class MasterRemodelWithName( master: MasterRemodel, slotitem: MasterSlotItem, use: Option[MasterSlotItem], to: Option[RemodelWithName], secondShip: M...
ttdoda/MyFleetGirls
server/app/models/join/MasterRemodelWithName.scala
Scala
mit
1,724
import scala.quoted.* def f(sc: quoted.Expr[StringContext]): Unit = { sc match { case '{ StringContext(${Varargs(parts)}*) } => // error val ps: Seq[Expr[String]] = parts // error } }
dotty-staging/dotty
tests/neg-macros/i6436.scala
Scala
apache-2.0
198
/* * 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 * distribute...
wvlet/airframe
airframe-codec/src/main/scala/wvlet/airframe/codec/ULIDCodec.scala
Scala
apache-2.0
1,221
package com.twitter.finagle.server import com.twitter.finagle.filter.{MaskCancelFilter, RequestSemaphoreFilter} import com.twitter.finagle.service.TimeoutFilter import com.twitter.finagle.stats.{StatsReceiver, ServerStatsReceiver} import com.twitter.finagle.tracing._ import com.twitter.finagle.transport.Transport impo...
yancl/finagle-6.22.0
finagle-core/src/main/scala/com/twitter/finagle/server/DefaultServer.scala
Scala
apache-2.0
3,974
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
chuckchen/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/connector/catalog/InMemoryTable.scala
Scala
apache-2.0
23,184
package org.aprsdroid.app import _root_.android.content.Context import _root_.android.location._ import _root_.android.util.Log import _root_.android.os.{Build, Bundle, Handler, Looper} import _root_.java.io.{BufferedReader, InputStream, InputStreamReader, OutputStream, OutputStreamWriter} import _root_.net.ab0oo.apr...
ge0rg/aprsdroid
src/tncproto/KenwoodProto.scala
Scala
gpl-2.0
4,523
/* Copyright 2009-2016 EPFL, Lausanne */ object LiteralMaps { def test(): Map[Int, Int] = { Map(1 -> 2, 3 -> 4, (5, 6)) } def test2(): (Int, Int) = { 1 -> 2 } def test3(): Map[Int, Int] = { Map[Int, Int]() } def test4(): Map[Int, Int] = { Map.empty[Int, Int] } def test5(): Map[In...
regb/leon
src/test/resources/regression/verification/newsolvers/valid/LiteralMaps.scala
Scala
gpl-3.0
362
/** * The MIT License (MIT) * * Copyright (c) 2018 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/AimlToXml
src/main/scala/ifreitas/scalaaiml/elements/IntervalFrom.scala
Scala
mit
1,358
package com.sksamuel.elastic4s.requests.searches.queries.matches import com.sksamuel.elastic4s.requests.analyzers.Analyzer import com.sksamuel.elastic4s.requests.common.Operator import com.sksamuel.elastic4s.requests.searches.queries.Query import com.sksamuel.exts.OptionImplicits._ case class MatchBoolPrefix(field: S...
stringbean/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/queries/matches/MatchBoolPrefix.scala
Scala
apache-2.0
2,031
/* * Copyright 2017 Mediative * * 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...
mediative/sangria-codegen
sangria-codegen/src/test/scala/com.mediative.sangria.codegen.starwars/StarWarsAnnotationSpec.scala
Scala
apache-2.0
1,345
package com.edinhodzic.client.domain class Resource(data: String)
edinhodzic/jersey-rest-client
src/test/scala/com/edinhodzic/client/domain/Resource.scala
Scala
apache-2.0
67
package net.categoricaldata.category.functor.withSmallSource import net.categoricaldata.category._ trait withFinitelyGeneratedTarget extends functor.withSmallSource.withLocallyFinitelyGeneratedTarget with Functor.withFinitelyGeneratedTarget
JasonGross/categoricaldata
src/main/scala/net/categoricaldata/category/functor/withSmallSource/withFinitelyGeneratedTarget.scala
Scala
mit
241
package edu.usc.irds.sparkler.util import edu.usc.irds.sparkler.model.SparklerJob import collection.JavaConverters._ object HealthChecks { def checkFailureRate(job: SparklerJob): Boolean ={ if(job.getConfiguration.containsKey("fetcher.kill.failure.percent")) { import org.apache.solr.common.params.MapSolrP...
USCDataScience/sparkler
sparkler-app/src/main/scala/edu/usc/irds/sparkler/util/HealthChecks.scala
Scala
apache-2.0
1,216
import org.scalatestplus.play._ import play.api.test._ import play.api.test.Helpers._ import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner /** * Add your integration spec here. * An integration test will fire up a whole play application in a real (or headless) browser. */ @RunWith(classOf[JUnitRu...
play2-maven-plugin/play2-maven-test-projects
play25/scala/starter-example/test/IntegrationSpec.scala
Scala
apache-2.0
619
package mr.merc.music import java.io.File import scala.util.Random import mr.merc.sound.Sound import mr.merc.conf.Conf import scalafx.scene.media.MediaPlayer.Status object MusicPlayer { private val pathPrefix = "/music/" val trackList: List[String] = List("Spring_Mvt_1_Allegro.mp3", "Summer_Mvt_3_Presto.mp3", ...
RenualdMarch/merc
src/main/scala/mr/merc/music/MusicPlayer.scala
Scala
gpl-3.0
596
package com.gettyimages.akka.swagger import scala.reflect.runtime.universe._ import org.json4s._ import org.json4s.jackson.JsonMethods._ import org.scalatest.Matchers import org.scalatest.WordSpec import com.gettyimages.akka.swagger.samples._ import akka.actor.ActorSystem import akka.http._ import akka.http.scalad...
rleibman/akka-http-swagger
src/test/scala/com/gettyimages/akka/swagger/SwaggerHttpServiceSpec.scala
Scala
apache-2.0
2,244
package mesosphere.marathon.core.appinfo.impl import mesosphere.marathon.Protos.MarathonTask import mesosphere.marathon.core.appinfo.{ TaskStatsByVersion, TaskStats, AppInfo, EnrichedTask, TaskCounts } import mesosphere.marathon.core.base.ConstantClock import mesosphere.marathon.health.{ Health, HealthCheckManager } i...
Yhgenomics/marathon
src/test/scala/mesosphere/marathon/core/appinfo/impl/AppInfoBaseDataTest.scala
Scala
apache-2.0
12,365
package com.github.yuiskw import org.scalatest.FunSuite class EventLogSuite extends FunSuite { test("generate dummy") { val eventLog = EventLog.getDummy() assert(eventLog.userId.isInstanceOf[Int]) assert(EventLog.EVENT_TYPES.contains(eventLog.eventId)) assert(eventLog.timestamp.isInstanceOf[Long]) ...
yu-iskw/spark-streaming-with-google-cloud-example
src/test/scala/com/github/yuiskw/EventLogSuite.scala
Scala
apache-2.0
543
package scalautils /** * Document me! * * @author Holger Brandl */ /** implicit string utilities. To use them import de.mpicbg.rink.plantx.StringUtils._ */ //https://www.safaribooksonline.com/library/view/scala-cookbook/9781449340292/ch01s11.html object StringUtils { implicit class ImplStringUtils(s: Str...
holgerbrandl/scalautils
src/main/scala/scalautils/StringUtils.scala
Scala
bsd-2-clause
1,158
/* * The MIT License (MIT) * * Copyright (c) 2015 Lookout, Inc * * 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,...
jamescway/borderpatrol
example/src/main/scala/com/lookout/borderpatrol/example/model.scala
Scala
mit
1,205
/* * 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...
122689305/BigDL
spark/dl/src/main/scala/org/apache/spark/ml/DLEstimator.scala
Scala
apache-2.0
6,103
/** * Copyright 2015, deepsense.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 applicable law or agreed ...
deepsense-io/seahorse-workflow-executor
deeplang/src/main/scala/io/deepsense/deeplang/doperables/spark/wrappers/estimators/Word2VecEstimator.scala
Scala
apache-2.0
1,436
package mesosphere.marathon package core.launcher.impl import mesosphere.marathon.core.instance.Instance import mesosphere.marathon.core.instance.update.InstanceUpdateOperation import mesosphere.marathon.core.launcher.{ InstanceOp, InstanceOpFactory } import mesosphere.marathon.core.matcher.base.util.OfferOperationFac...
janisz/marathon
src/main/scala/mesosphere/marathon/core/launcher/impl/InstanceOpFactoryHelper.scala
Scala
apache-2.0
3,258
package reactivemongo.api.commands import reactivemongo.api.{ PackSupport, SerializationPack, Session, WriteConcern } /** * Implements the [[https://docs.mongodb.com/manual/reference/command/insert/ insert]] command. */ private[reactivemongo] trait InsertCommand[P <: SerializationPack] { self: PackSupport[P...
ReactiveMongo/ReactiveMongo
driver/src/main/scala/api/commands/InsertCommand.scala
Scala
apache-2.0
2,918
package sexybash case class StringBlockAstFunctionBuilder(indentation: String, content: String, partialIndentation: String = "") extends AstFunctionBuilder { import AstFunctionBuilder._ // TODO mmm I don't have state here override def build = StringBlockAstFunction(content) def process(c: Char, state: State)...
MarianoGappa/sexybash
src/main/scala/sexybash/StringBlockAstFunctionBuilder.scala
Scala
mit
2,716
package io.udash.web.guide.markdown import com.avsystem.commons.misc.{AbstractValueEnum, AbstractValueEnumCompanion, EnumCtx} final class MarkdownPage(val file: String)(implicit val ctx: EnumCtx) extends AbstractValueEnum object MarkdownPage extends AbstractValueEnumCompanion[MarkdownPage] { final val Intro: Value ...
UdashFramework/udash-guide
shared/src/main/scala/io/udash/web/guide/markdown/MarkdownPage.scala
Scala
gpl-3.0
510
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
hequn8128/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/stream/table/stringexpr/AggregateStringExpressionTest.scala
Scala
apache-2.0
7,437
package benchmarks import java.io.FileWriter import scala.io.Source object JMHtoCSV { val BENCHMARK = "^# Benchmark: (.*)$".r val THREADS = "^# Threads: (\\d+) thread.*$".r val PARAMETERS = "^# Parameters: \\((.*)\\)$".r val MODE = "^# Benchmark mode: (.*)$".r val MEASUREMENT = "^Iteration .*...
guidosalva/REScala
Code/Microbenchmarks/src/main/scala/benchmarks/JMHtoCSV.scala
Scala
apache-2.0
1,946