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.twitter.diffy.analysis import javax.inject.Inject import com.twitter.util.Future import scala.math.abs object DifferencesFilterFactory { def apply(relative: Double, absolute: Double): JoinedField => Boolean = { (field: JoinedField) => field.raw.differences > field.noise.differences && ...
1c4r/diffy
src/main/scala/com/twitter/diffy/analysis/JoinedDifferences.scala
Scala
apache-2.0
1,941
/* * 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 ...
apache/kylin
kylin-spark-project/kylin-spark-common/src/main/spark24/org/apache/spark/monitor/MonitorExecutorExtension.scala
Scala
apache-2.0
2,261
package controllers import play.api.mvc._ import play.api.data._ import play.api.data.Forms._ import models._ import views.html.{user => view} import com.github.aselab.activerecord.dsl._ object Users extends Controller { def index = Action { Ok(view.index(User.all.toList)) } def show(id: Long) = Action {...
xdougx/scala-activerecord
play2Sbt/src/sbt-test/generator/simple/app/controllers/Users.scala
Scala
mit
1,631
package probability.continuous import au.id.cxd.math.probability.continuous.{ChiSquare, StudentT} import function.TestEvaluation import org.scalatest.{FlatSpec, Matchers} class TestChisq extends FlatSpec with Matchers with TestEvaluation { val quantiles = List[Double]( 0.1, 0.2, 0.3, 0.4, 0.5, ...
cxd/scala-au.id.cxd.math
math/src/test/scala/probability/continuous/TestChisq.scala
Scala
mit
1,362
/* * Copyright 2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicab...
CarloMicieli/first-steps-with-scala
src/test/scala/io/github/carlomicieli/scalakoans/AboutEmptyValues.scala
Scala
apache-2.0
2,636
package bifrost.transaction.serialization import bifrost.serialization.Serializer import bifrost.transaction.bifrostTransaction.AssetTransfer import bifrost.transaction.box.proposition.{Constants25519, PublicKey25519Proposition} import com.google.common.primitives.Ints import scala.util.Try object AssetTran...
Topl/Project-Bifrost
src/main/scala/bifrost/transaction/serialization/AssetTransferCompanion.scala
Scala
mpl-2.0
1,889
package net.revenj.server import java.util.Properties import javax.sql.DataSource import akka.actor.ActorSystem import akka.http.scaladsl.Http.ServerBinding import akka.http.scaladsl._ import akka.http.scaladsl.model._ import akka.stream.{ActorMaterializer, Materializer} import akka.http.scaladsl.model.Uri....
ngs-doo/revenj
scala/revenj-akka/src/main/scala/net/revenj/server/WebServer.scala
Scala
bsd-3-clause
3,627
package com.stovokor.editor.state import com.jme3.app.Application import com.jme3.app.state.AppStateManager import com.simsilica.lemur.Container import com.simsilica.lemur.input.FunctionId import com.simsilica.lemur.input.InputState import com.simsilica.lemur.input.StateFunctionListener import com.stovokor.editor.gui....
jcfandino/leveleditor
src/main/scala/com/stovokor/editor/state/SettingsEditorState.scala
Scala
bsd-3-clause
2,696
package org.jetbrains.plugins.scala.lang.controlFlow import com.intellij.openapi.editor.SelectionModel import com.intellij.psi.PsiElement import com.intellij.psi.util.PsiTreeUtil import com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase import org.jetbrains.plugins.scala.ScalaFileType import org....
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/controlFlow/ControlFlowTest.scala
Scala
apache-2.0
2,560
/* * 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
core/src/main/scala/org/apache/spark/internal/io/FileCommitProtocol.scala
Scala
apache-2.0
5,978
/* * Copyright 2010 LinkedIn * * 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...
quipo/kafka
core/src/main/scala/kafka/javaapi/consumer/SimpleConsumer.scala
Scala
apache-2.0
2,320
package models import java.net.URLDecoder import java.util.Date import com.hp.hpl.jena.query.QueryExecutionFactory import org.joda.time.LocalDate import utils.Implicits._ import utils.QueryHost import utils.semantic._ import scala.concurrent.{ Future, Promise } case class LabWork(course: Resource, semester: Resourc...
FHK-ADV/lwm
app/models/LabWorks.scala
Scala
mit
10,375
import scala.language.experimental.macros import scala.reflect.macros.blackbox.Context object Macros { def impl(c: Context) = { import c.universe._ val Expr(Block((cdef: ClassDef) :: Nil, _)) = reify { class C { def x = 2 } } val cdef1 = new Transformer { override def transform(tree: Tree):...
lrytz/scala
test/files/run/macro-duplicate/Impls_Macros_1.scala
Scala
apache-2.0
1,277
/* * 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 ...
guoxiaolongzte/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/TungstenAggregationIterator.scala
Scala
apache-2.0
20,213
package Tutorial import Chisel._ //object Tutorial extends NOCUtil{ object Tutorial { def main(args: Array[String]): Unit = { val tutArgs = args.slice(1, args.length) val res = args(0) match { // case "GCD" => // chiselMainTest(tutArgs, () => new GCD()){ // c => new GCDTests(c)}...
seyedmaysamlavasani/GorillaPP
chisel/Gorilla++/src/tutorial.scala
Scala
bsd-3-clause
4,824
package info.spielproject.spiel package ui import collection.JavaConversions._ import concurrent._ import ExecutionContext.Implicits.global import android.app._ import android.bluetooth._ import android.content._ import android.content.pm._ import android.database._ import android.net._ import android.os._ import and...
bramd/spiel
src/main/scala/ui.scala
Scala
apache-2.0
9,745
package com.geeksville.http import org.apache.http.client.methods.HttpGet import org.apache.http.client.methods.HttpPost import org.apache.http.util.EntityUtils import java.util.ArrayList import org.apache.http.NameValuePair import org.apache.http.message.BasicNameValuePair import org.apache.http.client.entity.UrlEnco...
dronekit/dronekit-server
src/main/scala/com/geeksville/http/HttpClient.scala
Scala
gpl-3.0
1,997
import language.higherKinds trait Travers[T[_]] extends Functor[T] with Foldable[T] { def traverse[F[_]:Applic,A,B](t: T[A])(f: A => F[B]): F[T[B]] override def map[A,B](functor: T[A])(g: A => B): T[B] = ??? override def foldMap[A,B:Monoid](foldable: T[A])(f: A => B): B = ??? } object Travers { def traverse[T[_...
grzegorzbalcerek/scala-exercises
Travers/Travers.scala
Scala
bsd-2-clause
495
package org.jetbrains.plugins.scala.util import scala.language.higherKinds import scala.reflect.ClassTag /** This trait is necessary for "opaque type" pattern, which allows to use EnumSet[E] * as a type-safe alternative to Int **/ trait EnumSetProvider { type EnumSet[E <: Enum[E]] <: Int def empty[E <: Enum[...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/util/EnumSet.scala
Scala
apache-2.0
2,736
package org.apache.spark.sql import scala.language.implicitConversions import com.datastax.spark.connector.util.{ConfigParameter, DeprecatedConfigParameter} import org.apache.spark.sql.streaming.DataStreamWriter package object cassandra { /** A data frame format used to access Cassandra through Connector */ val ...
datastax/spark-cassandra-connector
connector/src/main/scala/org/apache/spark/sql/cassandra/package.scala
Scala
apache-2.0
10,009
package com.twitter.io import com.twitter.util.StdBenchAnnotations import java.nio import org.openjdk.jmh.annotations._ import org.openjdk.jmh.infra.Blackhole import scala.util.Random // run via: // ./sbt 'project util-benchmark' 'jmh:run BufBenchmark' @State(Scope.Benchmark) class BufBenchmark extends StdBenchAnnota...
BuoyantIO/twitter-util
util-benchmark/src/main/scala/com/twitter/io/BufBenchmark.scala
Scala
apache-2.0
5,748
package api import play.api.libs.functional.syntax._ import play.api.libs.json.Reads.StringReads import play.api.libs.json.{JsPath, Reads} case class User(username: String, followersCount: Long, friendsCount: Long) object User { implicit val userReads: Reads[User] = ( (JsPath \\ "screen_name").read[String] and...
rtfpessoa/distributed-twitter-crawler
app/api/User.scala
Scala
mit
436
/* Copyright 2009-2016 EPFL, Lausanne */ import leon.lang._ import leon.lang.synthesis._ import leon.annotation._ object Numerals { sealed abstract class Num case object Z extends Num case class S(pred: Num) extends Num def value(n: Num): BigInt = { n match { case Z => 0 case S(p) => 1 + val...
epfl-lara/leon
src/test/resources/regression/performance/cegis/Add.scala
Scala
gpl-3.0
465
package gov.uk.dvla.vehicles.dispose.stepdefs import cucumber.api.java.en.{Then, When, Given} import org.openqa.selenium.WebDriver import org.scalatest.selenium.WebBrowser.pageTitle import org.scalatest.selenium.WebBrowser.click import org.scalatest.selenium.WebBrowser.go import pages.disposal_of_vehicle.BeforeYouStar...
dvla/vehicles-online
acceptance-tests/src/test/scala/gov/uk/dvla/vehicles/dispose/stepdefs/DemoTestSteps.scala
Scala
mit
3,620
package ru.maizy.ambient7.core.config.options /** * Copyright (c) Nikita Kovaliov, maizy.ru, 2017 * See LICENSE.txt for details. */ // TODO: should be only in webapp submodule case class WebAppSpecificOptions( port: Int = 22480 )
maizy/ambient7
core/src/main/scala/ru/maizy/ambient7/core/config/options/WebAppSpecificOptions.scala
Scala
apache-2.0
240
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-index-api/src/main/scala/org/locationtech/geomesa/index/view/RouteSelector.scala
Scala
apache-2.0
1,156
object Test { def main(args: Array[String]) { def fibs: Stream[Int] = Stream.cons(0, Stream.cons(1, fibs.zip(fibs.tail).map(p => p._1 + p._2))) println(fibs(2)) // stack overflow } }
felixmulder/scala
test/files/run/t2027.scala
Scala
bsd-3-clause
195
/* * 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 ...
indhub/mxnet
scala-package/infer/src/test/scala/org/apache/mxnet/infer/ImageClassifierSuite.scala
Scala
apache-2.0
5,781
/* * 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 ...
duynguyen/incubator-openwhisk
tests/src/test/scala/system/basic/WskCliUnicodePython3Tests.scala
Scala
apache-2.0
1,247
package com.github.shadowsocks import android.annotation.TargetApi import android.graphics.drawable.Icon import android.service.quicksettings.{Tile, TileService} import com.github.shadowsocks.aidl.IShadowsocksServiceCallback import com.github.shadowsocks.utils.{State, Utils} import com.github.shadowsocks.ShadowsocksAp...
otoil/shadowsocks-android
src/main/scala/com/github/shadowsocks/ShadowsocksTileService.scala
Scala
gpl-3.0
2,555
/** * Copyright 2014 Dropbox, 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...
aijiekj/djinni
src/source/syntax.scala
Scala
apache-2.0
1,039
/** * 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...
CiscoCloud/exhibitor-mesos-framework
src/main/scala/ly/stealth/mesos/exhibitor/Cluster.scala
Scala
apache-2.0
2,880
package com.github.j5ik2o.forseti.adaptor.handler.flow.`implicit` import java.net.URI import com.github.j5ik2o.forseti.adaptor.handler.model.AuthorizationResponse import com.github.j5ik2o.forseti.domain.exception.InvalidRequestException import com.github.j5ik2o.forseti.domain.{MessageBase, Scope} import scalaz.{Mayb...
j5ik2o/forseti
server/server-use-case-port/src/main/scala/com/github/j5ik2o/forseti/adaptor/handler/flow/implicit/AuthorizationImplicitResponse.scala
Scala
mit
1,931
package com.cloudray.scalapress.plugin.ecommerce.tags import org.joda.time.{DateTimeZone, DateTime} import com.cloudray.scalapress.theme.MarkupRenderer import com.cloudray.scalapress.theme.tag.{ScalapressTag, TagBuilder} import scala.collection.JavaConverters._ import com.cloudray.scalapress.plugin.ecommerce.ShoppingP...
vidyacraghav/scalapress
src/main/scala/com/cloudray/scalapress/plugin/ecommerce/tags/invoice.scala
Scala
apache-2.0
7,299
/* * 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 applicable law or agreed to in...
datamountaineer/stream-reactor
kafka-connect-aws-s3/src/main/scala/io/lenses/streamreactor/connect/aws/s3/formats/parquet/ParquetSeekableInputStream.scala
Scala
apache-2.0
3,105
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may n...
wangcy6/storm_app
frame/kafka-0.11.0/kafka-0.11.0.1-src/core/src/test/scala/unit/kafka/server/KafkaApisTest.scala
Scala
apache-2.0
19,824
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-kudu/geomesa-kudu-datastore/src/test/scala/org/locationtech/geomesa/kudu/data/KuduDataStoreIntegrationTest.scala
Scala
apache-2.0
10,072
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-tools/src/main/scala/org/locationtech/geomesa/tools/help/ClasspathCommand.scala
Scala
apache-2.0
1,128
import collection.mutable.ListBuffer import io.Source import java.io.{File, FileWriter, BufferedWriter} /* * Copyright 2001-2011 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 ...
hubertp/scalatest
project/GenMatchers.scala
Scala
apache-2.0
6,191
package fpinscala.examples // hide builtin scala Stream type import scala.{Stream => _} trait Stream[A] { def uncons: Option[(A, Stream[A])] } object Stream { def empty[A]: Stream[A] = new Stream[A] { def uncons = None } def cons[A](hd: => A, tl: => Stream[A]): Stream[A] = new Stream[A]...
ryo-murai/fpinscala-exercises
myanswers/src/main/scala/fpinscala/examples/laziness.scala
Scala
mit
478
/* * 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/controllers/responsiblepeople/ExperienceTrainingControllerSpec.scala
Scala
apache-2.0
11,642
/* * Copyright (C) 2005, The Beangle Software. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This...
beangle/commons
core/src/main/scala/org/beangle/commons/io/Jars.scala
Scala
lgpl-3.0
1,523
package org.jetbrains.plugins.scala package refactoring.changeSignature import com.intellij.psi.PsiMember import com.intellij.refactoring.changeSignature.{ChangeSignatureProcessorBase, ParameterInfo} import org.jetbrains.plugins.scala.lang.psi.api.base.ScMethodLike import org.jetbrains.plugins.scala.lang.psi.impl.Scal...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/refactoring/changeSignature/ChangeSignatureFromScalaTest.scala
Scala
apache-2.0
4,944
package ch.descabato.core.actors import java.util.Date import ch.descabato.core._ import ch.descabato.core.actors.MetadataStorageActor.{AllKnownStoredPartsMemory, BackupDescription, BackupMetaDataStored} import ch.descabato.core.commands.ProblemCounter import ch.descabato.core.model._ import ch.descabato.utils.Implic...
Stivo/DeScaBaTo
core/src/main/scala/ch/descabato/core/actors/MetadataStorageActor.scala
Scala
gpl-3.0
9,351
package org.jetbrains.plugins.scala package annotator package element import com.intellij.lang.ASTNode import com.intellij.lexer.StringLiteralLexer import com.intellij.openapi.util.TextRange import com.intellij.openapi.vfs.VirtualFile import com.intellij.psi.StringEscapesTokenTypes import com.intellij.psi.tree.TokenSe...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/annotator/element/ScStringLiteralAnnotator.scala
Scala
apache-2.0
6,105
/** * Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com> */ package akka.actor import language.implicitConversions import scala.annotation.tailrec import scala.collection.immutable import scala.concurrent.Future import scala.concurrent.Promise import scala.concurrent.duration._ import scala.util.Success...
jmnarloch/akka.js
akka-js-actor/shared/src/main/scala/akka/actor/ActorSelection.scala
Scala
bsd-3-clause
10,964
package com.github.eklavya.thrust import argonaut.Argonaut._ import argonaut._ object Actions { implicit def actionToJson(a: Action): (Json.JsonField, Json) = a.toJson sealed abstract class Action { def toJson: (Json.JsonField, Json) } case object CREATE extends Action { override def toJson: (Json....
eklavya/scala-thrust
src/main/scala/com/github/eklavya/thrust/Actions.scala
Scala
apache-2.0
501
/* * 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 ...
Panos-Bletsos/spark-cost-model-optimizer
yarn/src/test/scala/org/apache/spark/scheduler/cluster/StubApplicationId.scala
Scala
apache-2.0
1,434
package com.kubukoz.scala99 /** * P11 (*) Modified run-length encoding. * Modify the result of problem P10 in such a way that if an element has no duplicates it is simply copied into the result list. Only elements with duplicates are transferred as (N, E) terms. * Example: * * * scala> encodeModified(List('a...
kubukoz/scala-99
src/main/scala/com/kubukoz/scala99/P11.scala
Scala
apache-2.0
687
/* * 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 * distribut...
thenetcircle/event-bus
core/src/main/scala/com/thenetcircle/event_bus/event/extractor/EventExtractorFactory.scala
Scala
apache-2.0
2,434
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
intel-analytics/BigDL
scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/feature/image3d/ImageProcessing3D.scala
Scala
apache-2.0
2,896
import akka.actor.{ Props, ActorSystem } import db.UserDB import handler._ object Main extends App { val system = ActorSystem("server") val UserDB = system.actorOf(Props(classOf[UserDB]), "UserDBActor") val service = system.actorOf(Props(classOf[ApiHandler]), "ApiHandler") } /*object MainWithEchoHandler extend...
pahomovda/protectedchat-server
src/main/scala/Main.scala
Scala
mit
767
package com.datasift.dropwizard.scala import scala.reflect._ import org.skife.jdbi.v2._ import org.skife.jdbi.v2.sqlobject.mixins.Transactional import org.skife.jdbi.v2.tweak.HandleCallback /** Global definitions and implicits for JDBI. */ package object jdbi { implicit final def JDBIWrapper(db: DBI) = new JDBIWr...
datasift/dropwizard-scala
jdbi/src/main/scala/com/datasift/dropwizard/scala/jdbi/package.scala
Scala
apache-2.0
13,658
/* * 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 ...
caneGuy/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ordering.scala
Scala
apache-2.0
4,010
/* * Copyright (C) 2011 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/sawoko
src/Nio.scala
Scala
apache-2.0
12,515
package org.jetbrains.plugins.scala package codeInsight.intention.literal import com.intellij.application.options.CodeStyle import com.intellij.codeInsight.intention.PsiElementBaseIntentionAction import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.psi.PsiElement im...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/codeInsight/intention/literal/AddStripMarginToMLStringIntention.scala
Scala
apache-2.0
1,666
package scalaquantity import scalaquantity.Exponents._ import Units._ import org.scalatest.matchers.ShouldMatchers import org.scalatest.{FunSuite, FlatSpec} /** * If it compiles, it passed */ class TestUnits extends FunSuite with ShouldMatchers { test("An Exponent should support numerals") { assert(exponen...
zzorn/ScalaQuantity
src/test/scala/scalaquantity/TestUnits.scala
Scala
bsd-3-clause
1,584
import java.util.Calendar import java.util.concurrent.TimeUnit import com.sksamuel.elastic4s.ElasticDsl.{create, index, _} import com.sksamuel.elastic4s.mappings.FieldType.{DateType, IntegerType, StringType} import com.sksamuel.elastic4s.{ElasticClient, ElasticsearchClientUri} import org.elasticsearch.common.settings....
canademar/me_extractors
DWClient2/src/main/scala/DWNewsClient.scala
Scala
gpl-2.0
8,039
/* * Copyright 2013-2017 Tsukasa Kitachi * * 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...
kxbmap/configs
core/src/test/scala/configs/beans/IgnoredBeanPropertiesTest.scala
Scala
apache-2.0
1,942
/* * 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 ...
shaoxuan-wang/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/typeutils/TypeInfoCheckUtils.scala
Scala
apache-2.0
10,071
package org.dberg.hubot import org.dberg.hubot.brain.MapdbBackend import org.scalatest.{ BeforeAndAfterAll, Suites } class MasterTestSuite extends Suites(new BrainTestSuite, new HubotTestSuite, new ListenerTestSuite) with BeforeAndAfterAll { override def beforeAll(): Unit = { MapdbBackend.deleteAll() } ov...
denen99/hubot-scala
src/test/scala/org/dberg/hubot/MasterTestSuite.scala
Scala
apache-2.0
386
import java.io._ import scala.reflect.runtime.universe._ import scala.reflect.runtime.{universe => ru} class C(x: Int) { def this(x: String) = this(x.toInt) } object Test extends dotty.runtime.LegacyApp { def test(sym: ClassSymbol): Unit = { def fullyInitializeSymbol(sym: Symbol): Unit = { val internal ...
yusuke2255/dotty
tests/disabled/macro/run/t8192/Test_2.scala
Scala
bsd-3-clause
1,492
package com.github.pedrovgs.haveaniceday.smiles import javax.inject.Inject import com.github.pedrovgs.haveaniceday.smiles.model.SmilesExtractionResult import scala.concurrent.Future class ExtractSmiles @Inject()(smilesGenerator: SmilesGenerator) { def apply(): Future[SmilesExtractionResult] = smilesGenerator.ext...
pedrovgs/HaveANiceDay
src/main/scala/com/github/pedrovgs/haveaniceday/smiles/ExtractSmiles.scala
Scala
gpl-3.0
336
package com.rocketfuel.sdbc.postgresql.jdbc.implementation import java.time.OffsetTime import com.rocketfuel.sdbc.base.ToParameter import org.postgresql.util.PGobject private[sdbc] class PGTimeTz() extends PGobject() { setType("timetz") var offsetTime: Option[OffsetTime] = None override def getValue: String...
wdacom/sdbc
postgresql/src/main/scala/com/rocketfuel/sdbc/postgresql/jdbc/implementation/PGTimeTz.scala
Scala
bsd-3-clause
1,112
package aia.testdriven import scala.util.Random import akka.testkit.TestKit import akka.actor.{ Props, ActorRef, Actor, ActorSystem } import org.scalatest.{WordSpecLike, MustMatchers} class SendingActorTest extends TestKit(ActorSystem("testsystem")) with WordSpecLike with MustMatchers with StopSystemAfterAll { ...
RayRoestenburg/akka-in-action
chapter-testdriven/src/test/scala/aia/testdriven/SendingActorTest.scala
Scala
mit
1,434
/*********************************************************************** * Copyright (c) 2013-2016 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 ...
MutahirKazmi/geomesa
geomesa-accumulo/geomesa-accumulo-security/src/test/scala/org/locationtech/geomesa/accumulo/security/VisibilityFilterFunctionTest.scala
Scala
apache-2.0
3,063
package fpinscala.ch02gettingstarted // A comment! /* Another comment */ /** A documentation comment */ object MyModule { def abs(n: Int): Int = if (n < 0) -n else n private def formatAbs(x: Int) = { val msg = "The absolute value of %d is %d" msg.format(x, abs(x)) } def main(args: Array[Strin...
hugocf/fpinscala
src/main/scala/fpinscala/ch02gettingstarted/GettingStarted.scala
Scala
mit
7,476
package razie.diesel.samples import razie.{cout} import razie.diesel.dom._ import razie.diesel.engine._ import razie.diesel.ext.{EMsg, EVal} import razie.tconf.{DSpec, TextSpec} import scala.collection.mutable.ListBuffer import scala.concurrent.{Await, Future} import scala.concurrent.ExecutionContext.Implicits.global...
razie/wikireactor
diesel/src/main/scala/razie/diesel/samples/SimpleFlow.scala
Scala
apache-2.0
6,124
/* * Copyright 2014-15 Intelix Pty 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...
intelix/eventstreams
es-gauges/es-gauges-service/src/main/scala/eventstreams/gauges/GaugeMetricAccounting.scala
Scala
apache-2.0
1,341
package com.datawizards.dmg.examples import com.datawizards.dmg.examples.TestModel.PersonWithComments import com.datawizards.dmg.generator.HiveGenerator import com.datawizards.dmg.{DataModelGenerator, dialects} object TableColumnCommentsExample extends App { println(DataModelGenerator.generate[PersonWithComments](d...
mateuszboryn/data-model-generator
src/main/scala/com/datawizards/dmg/examples/TableColumnCommentsExample.scala
Scala
apache-2.0
507
package SecureSocialPlugins import play.api.data.Form import play.api.mvc.{Request, RequestHeader} import play.api.templates.{Html, Txt} import securesocial.controllers.PasswordChange.ChangeInfo import securesocial.controllers.Registration.RegistrationInfo import securesocial.controllers.TemplatesPlugin import secures...
antigenomics/vdjviz
app/SecureSocialPlugins/SecureSocialViews.scala
Scala
apache-2.0
3,938
package com.github.agourlay.cornichon.steps.check.checkModel import com.github.agourlay.cornichon.core.{ NoOpStep, NoValue, Step } // N equals 6 for now trait PropertyN[A, B, C, D, E, F] { val description: String val preCondition: Step val invariantN: (() => A, () => B, () => C, () => D, () => E, () => F) => St...
agourlay/cornichon
cornichon-core/src/main/scala/com/github/agourlay/cornichon/steps/check/checkModel/PropertyN.scala
Scala
apache-2.0
2,784
package io.getquill.context.spark.norm import io.getquill.Spec import QuestionMarkEscaper._ class QuestionMarkEscaperSpec extends Spec { "should escape strings with question marks and even ones with slashes already" in { escape("foo ? bar \\\\? baz \\\\\\\\?") must equal("foo \\\\? bar \\\\\\\\? baz \\\\\\\\\\...
getquill/quill
quill-spark/src/test/scala/io/getquill/context/spark/norm/QuestionMarkEscaperSpec.scala
Scala
apache-2.0
2,096
package it.mighe.ssbi import org.scalatest.{BeforeAndAfter, Matchers, FlatSpec} class TapeSpec extends FlatSpec with Matchers with BeforeAndAfter { var tape: Tape = _ before { tape = new Tape } it should "have cells initialized at zero" in { tape.at(0) should be(0) tape.at(29999) should be(0) ...
mighe/ssbi
src/test/scala/it/mighe/ssbi/TapeSpec.scala
Scala
mit
1,934
package views.html import play.twirl.api._ import play.twirl.api.TemplateMagic._ import play.api.templates.PlayMagic._ import models._ import controllers._ import play.api.i18n._ import play.api.mvc._ import play.api.data._ import views.html._ /**/ object download extends BaseScalaTemplate[play.twirl.api.HtmlFormat...
workingDog/trackersys
target/scala-2.11/twirl/main/views/html/download.template.scala
Scala
apache-2.0
4,009
/* * Copyright 2017-2018 47 Degrees, LLC. <http://www.47deg.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless require...
frees-io/freestyle
modules/effects/shared/src/main/scala/tagless/effects/writer.scala
Scala
apache-2.0
1,277
package com.ctask.http.server import akka.actor.{Actor, ActorRef, Props} import akka.http.scaladsl.model.{ContentTypes, HttpEntity, HttpMethods, HttpRequest, HttpResponse} import akka.http.scaladsl.testkit.ScalatestRouteTest import com.ctask.data.TaskList import com.ctask.messages.{Command, GetTaskList} import com.cta...
modsrm/ctask
http/src/test/scala/com/ctask/http/server/RoutesSpec.scala
Scala
gpl-3.0
1,901
/* * A real-time collaborative tool to develop files over the network. * Copyright (C) 2010 Mauro Ciancio and Leandro Gilioli * {maurociancio,legilioli} at gmail dot com * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Publi...
maurociancio/parallel-editor
src/parallel-editor-common/src/main/scala/ar/noxit/paralleleditor/common/BasicXFormStrategy.scala
Scala
gpl-3.0
5,547
/* * Copyright 2020 Precog Data * * 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 ...
quasar-analytics/quasar
frontend/src/test/scala/quasar/std/date.scala
Scala
apache-2.0
1,731
package org.hammerlab.guacamole.filters.somatic import org.apache.spark.rdd.RDD import org.hammerlab.guacamole.variants.CalledSomaticAllele object SomaticLogOddsFilter { def hasMinimumLOD(somaticGenotype: CalledSomaticAllele, minLogOdds: Int): Boolean = { somaticGenotype.somaticLogOdds > m...
hammerlab/guacamole
src/main/scala/org/hammerlab/guacamole/filters/somatic/SomaticLogOddsFilter.scala
Scala
apache-2.0
946
package deaktator.pops.msgs import java.io.{IOException, InputStream} import com.google.protobuf.Descriptors.Descriptor import com.google.protobuf._ import scala.annotation.implicitNotFound import scala.language.experimental.macros import scala.language.implicitConversions /** * A type class for static methods pr...
deaktator/pops
pops-2.4.1/src/main/scala/deaktator/pops/msgs/ProtoOps.scala
Scala
mit
2,395
/* * 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...
wangyixiaohuihui/spark2-annotation
mllib/src/main/scala/org/apache/spark/mllib/rdd/SlidingRDD.scala
Scala
apache-2.0
4,558
/** * Copyright 2015 Gianluca Amato <gamato@unich.it> * * This file is part of JANDOM: JVM-based Analyzer for Numerical DOMains * JANDOM 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 o...
francescaScozzari/Jandom
core/src/main/scala/it/unich/jandom/fixpoint/EquationSystem.scala
Scala
lgpl-3.0
1,403
package scala.collection import scala.language.higherKinds import scala.collection.mutable.Builder import scala.annotation.implicitNotFound import scala.reflect.ClassTag /** Builds a collection of type `C` from elements of type `A` when a source collection of type `From` is available. * Implicit instances of `Bui...
rorygraves/perf_tester
corpus/scala-library/src/main/scala/collection/BuildFrom.scala
Scala
apache-2.0
5,207
/* * 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 ...
jianran/spark
sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
Scala
apache-2.0
89,213
class FolderExistsException extends Exception class ValidationException extends Exception class FolderNotFoundException extends Exception class BookmarkExistsException extends Exception class BookmarkNotFoundException extends Exception
jeroanan/SunshineRecorder
src/sunshine/Exceptions.scala
Scala
gpl-3.0
240
package info.glennengstrand.news.dao import slick.jdbc.MySQLProfile.api._ object MySqlDao { lazy val db = Database.forConfig("mysql") }
gengstrand/clojure-news-feed
server/feed11/src/main/scala/info/glennengstrand/news/dao/MySqlDao.scala
Scala
epl-1.0
141
object Test { def main(args: Array[String]): Unit = { val t6: (Int,Int,Int,Int,Int,Int) = 1 *: (2, 3, 4, 5, 6) println(t6) } }
lampepfl/dotty
tests/run/tuple-cons-2.scala
Scala
apache-2.0
140
/* * Copyright 2017-2018 47 Degrees, LLC. <http://www.47deg.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless require...
frees-io/freestyle
modules/examples/todolist-lib/src/main/scala/todo/service/AppService.scala
Scala
apache-2.0
3,127
package io.react2.scalata.parsers import io.react2.scalata.plugins.Plugin import io.react2.scalata.translation.Field /** * @author dbalduini */ trait Parser extends Plugin { def parse(f: Field): Any }
React2/scalata
src/main/scala/io/react2/scalata/parsers/Parser.scala
Scala
apache-2.0
207
package com.shocktrade.server.dao.contest import com.shocktrade.common.forms.ContestSearchForm import com.shocktrade.common.models.contest.{ChatMessage, Participant} import io.scalajs.npm.mongodb._ import io.scalajs.util.ScalaJsHelper._ import scala.concurrent.{ExecutionContext, Future} import scala.scalajs.js /** ...
ldaniels528/shocktrade.js
app/server/dao/src/main/scala/com/shocktrade/server/dao/contest/ContestDAO.scala
Scala
apache-2.0
4,419
package ru.dgolubets.jsmoduleloader.api.amd import javax.script.ScriptEngineManager import jdk.nashorn.api.scripting.ScriptObjectMirror import org.scalatest.{AsyncWordSpec, Matchers} import ru.dgolubets.jsmoduleloader.api.ScriptModuleException import ru.dgolubets.jsmoduleloader.api.readers.FileModuleReader import ru.d...
DGolubets/js-module-loader
src/test/scala/ru/dgolubets/jsmoduleloader/api/amd/AmdLoaderSpec.scala
Scala
mit
4,830
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
andrewor14/iolap
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala
Scala
apache-2.0
32,071
/* * 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 ...
likithkailas/StreamingSystems
mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtils.scala
Scala
apache-2.0
20,677
package controllers import dao.{AnnotationDao, AuthorityDao} import database.{AnnotationDb, AnnotationTable} import models.AnnotationLike.{Annotation, AnnotationAtom} import models.{AnnotationLike, AnnotationProtocol, User} import org.joda.time.DateTime import play.api.libs.functional.syntax._ import play.api.libs.jso...
THK-ADV/lwm-reloaded
app/controllers/AnnotationController.scala
Scala
mit
5,092
/* * Copyright 2014–2017 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
drostron/quasar
foundation/src/test/scala/quasar/contrib/matryoshka/UnionWidth.scala
Scala
apache-2.0
1,273
/* * Copyright (c) 2015 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org...
snowplow/icebucket
3-query-engines/scala-query-engine/src/main/scala/com/snowplowanalytics/config/ActorServiceSystem.scala
Scala
apache-2.0
1,357
/* * 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 ...
iiisthu/sparkSdn
core/src/main/scala/org/apache/spark/rdd/OrderedRDDFunctions.scala
Scala
apache-2.0
2,240
package org.scalaide.debug.internal.model import org.eclipse.debug.core.model.IValue import org.scalaide.debug.internal.ScalaDebugger import org.scalaide.debug.internal.ScalaDebugPlugin import org.eclipse.debug.core.model.IVariable case class VirtualValue (refTypeName: String, valueString: String, fields: Seq[IVa...
romanowski/scala-ide
org.scala-ide.sdt.debug/src/org/scalaide/debug/internal/model/VirtualValue.scala
Scala
bsd-3-clause
1,516
/* * 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/fset-faststream
app/services/sift/ApplicationSiftService.scala
Scala
apache-2.0
22,945