code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
/* * Copyright 2014 Databricks * * 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 i...
capitalone/Hydrograph
hydrograph.engine/hydrograph.engine.spark/src/main/scala/hydrograph/engine/spark/datasource/xml/util/XmlFile.scala
Scala
apache-2.0
4,923
package io.buoyant.namerd package iface.mesh import com.twitter.finagle.{Addr, Dentry, Dtab, Name, NameTree, Namer, Path} import com.twitter.finagle.buoyant.h2 import com.twitter.finagle.naming.NameInterpreter import com.twitter.finagle.stats.StatsReceiver import com.twitter.io.Buf import com.twitter.util.{Activity, C...
linkerd/linkerd
namerd/iface/mesh/src/main/scala/io/buoyant/namerd/iface/mesh/DelegatorService.scala
Scala
apache-2.0
7,169
package io.hydrosphere.mist.core.logging sealed trait Level { def value: Int def name: String } object Level { def fromInt(i: Int): Level = i match { case 1 => Debug case 2 => Info case 3 => Warn case 4 => Error case x => throw new IllegalArgumentException(s"Unknown level $i") } object...
Hydrospheredata/mist
mist/core/src/main/scala/io/hydrosphere/mist/core/logging/Level.scala
Scala
apache-2.0
583
package org.jetbrains.plugins.scala.testingSupport.scalatest.staticStringTest import org.jetbrains.plugins.scala.testingSupport.IntegrationTest /** * @author Roman.Shein * @since 26.06.2015. */ trait WordSpecStaticStringTest extends IntegrationTest { val wordSpecClassName = "WordSpecStringTest" val wordSpecFil...
triggerNZ/intellij-scala
test/org/jetbrains/plugins/scala/testingSupport/scalatest/staticStringTest/WordSpecStaticStringTest.scala
Scala
apache-2.0
1,840
package lila.perfStat import org.joda.time.DateTime import reactivemongo.bson._ import scala.concurrent.duration._ import lila.db.dsl._ import lila.rating.PerfType final class PerfStatStorage(coll: Coll) { implicit val PerfTypeBSONHandler = new BSONHandler[BSONInteger, PerfType] { def read(b: BSONInteger) = P...
clarkerubber/lila
modules/perfStat/src/main/PerfStatStorage.scala
Scala
agpl-3.0
1,588
/* # Copyright 2016 Georges Lipka # # 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 wri...
glipka/Easy-React-With-ScalaJS
src/main/scala/com/glipka/easyReactJS/react/EventSimulator.scala
Scala
apache-2.0
1,226
/* * 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 ...
saltstar/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala
Scala
apache-2.0
23,054
package endpoints package documented package algebra import scala.language.higherKinds /** * Algebra interface for describing URL including documentation. * * This interface is modeled after [[endpoints.algebra.Urls]] but some methods * take additional parameters carrying the documentation part. */ trait Ur...
Krever/endpoints
openapi/openapi/src/main/scala/endpoints/documented/algebra/Urls.scala
Scala
mit
4,042
package metascala object OO { import HLists._ import Nats._ import Tuples._ trait MethodBase { type Object } trait MethodObj[Obj] extends MethodBase { type Object = Obj } trait Method0Base[Obj] extends MethodObj[Obj] { type Out def apply(obj : Obj) : Out } class Method0[...
svn2github/metascala
src/metascala/OO.scala
Scala
bsd-3-clause
2,423
package scala.meta.quasiquotes import org.jetbrains.plugins.scala.SlowTests import org.junit.experimental.categories.Category /** * @author mutcianm * @since 21.10.16. */ @Category(Array(classOf[SlowTests])) class StatApplyTest extends QuasiQuoteTypeInferenceTestBase { def testClass(): Unit = doTest( s""...
triplequote/intellij-scala
scala/scala-impl/test/scala/meta/quasiquotes/StatApplyTest.scala
Scala
apache-2.0
900
/* * 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
examples/src/test/scala/org/scalatest/examples/asyncpropspec/AddSpec.scala
Scala
apache-2.0
1,872
package com.arcusys.valamis.version240.certificate import com.arcusys.valamis.core.DbNameUtils._ import com.arcusys.valamis.core.SlickProfile import com.arcusys.valamis.model.PeriodTypes trait CourseGoalTableComponent extends CertificateTableComponent{ self: SlickProfile => import driver.simple._ type CourseGoal...
ViLPy/Valamis
valamis-slick-persistence/src/main/scala/com/arcusys/valamis/version240/certificate/CourseGoalTableComponent.scala
Scala
lgpl-3.0
1,262
package ohnosequencesBundles.statika import ohnosequences.statika._ case object cdevel extends Bundle() { def instructions: AnyInstructions = cmd("yum")("groupinstall", "-y", "Development Tools") }
ohnosequences-bundles/cdevel
src/main/scala/cdevel.scala
Scala
agpl-3.0
203
package com.github.j5ik2o.reactive.redis import java.net.InetSocketAddress import akka.actor.ActorSystem import akka.io.Inet.SO.{ ReceiveBufferSize, SendBufferSize } import akka.io.Tcp.SO.{ KeepAlive, TcpNoDelay } import akka.stream.OverflowStrategy import com.github.j5ik2o.reactive.redis.pool._ import monix.eval.Tas...
j5ik2o/reactive-redis
benchmark/src/main/scala/com/github/j5ik2o/reactive/redis/BenchmarkHelper.scala
Scala
mit
3,830
package lila.user import reactivemongo.api.bson._ import scala.concurrent.duration._ import lila.common.LightUser import lila.memo.CacheApi._ import lila.rating.{ Perf, PerfType } import lila.db.dsl._ import User.{ LightCount, LightPerf } final class Cached( userRepo: UserRepo, onlineUserIds: () => Set[User....
luanlv/lila
modules/user/src/main/Cached.scala
Scala
mit
2,929
package roshan import akka.actor.{ActorSystem, ActorRef} import roshan.protocols.MapProtocol.AreaMessage import roshan.db.dbCharacter import roshan.model.Direction object Useful { val tilesPerMap = 20 var TestActorSystem:Option[ActorSystem] = None var isTesting:Boolean = false def testing:ActorSystem = { ...
andychase/roshan
src/main/scala/roshan/Useful.scala
Scala
mit
2,158
package p trait NRoot[A] object FastComplex { final def sqrt(x: Double): Double = Math.sqrt(x) final def sqrt[A](a: A)(implicit ev: NRoot[A]): A = ??? object Inner { import java.lang.Math.sqrt // wrong message: // error: reference to sqrt is ambiguous; // it is both defined in object Fa...
som-snytt/dotty
tests/untried/neg/t8024b.scala
Scala
apache-2.0
378
package scoverage import java.io.File import java.util.concurrent.Executors import org.scalatest.{BeforeAndAfter, FunSuite} import scala.collection.breakOut import scala.concurrent._ import scala.concurrent.duration._ /** * Verify that [[Invoker.invoked()]] is thread-safe */ class InvokerConcurrencyTest extends F...
xudongzheng1225/scalac-scoverage-plugin
scalac-scoverage-runtime/src/test/scala/scoverage/InvokerConcurrencyTest.scala
Scala
apache-2.0
1,478
package ru.pavkin.todoist.api.core import ru.pavkin.todoist.api.core.decoder.SingleResponseDecoder import ru.pavkin.todoist.api.core.model.{AccessToken, TokenExchange} import ru.pavkin.todoist.api.core.query.SingleQueryRequestDefinition trait ExecutedOAuthAPI[F[_], L[_], P[_], Req, Base] extends OAuthAPI[F, P, Base...
vpavkin/todoist-api-scala
core/src/main/scala/ru/pavkin/todoist/api/core/ExecutedOAuthAPI.scala
Scala
mit
816
package org.bjean.sample.wordcount.processor import java.nio.file.{Files, Paths} import org.apache.spark.SparkContext import org.bjean.sample.support.SparkContextTrait import org.scalatest.{BeforeAndAfter, Matchers, WordSpec} import scala.io.Source class WordCountProcessorTest extends WordSpec with Matchers with Sp...
bjet007/word-count-spark-aws
processing/src/test/scala/org/bjean/sample/wordcount/processor/WordCountProcessorTest.scala
Scala
apache-2.0
1,410
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js Test Suite ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ ** ** /____/\\___/...
jmnarloch/scala-js
test-suite/src/test/scala/org/scalajs/testsuite/javalib/FormatterTest.scala
Scala
bsd-3-clause
9,510
package com.signalcollect.dcop.evaluation import scala.collection.mutable import scala.math.Ordering.Implicits._ import com.signalcollect.dcop.modules.UtilityConfig trait EavConfig[AgentId, Action, UtilityType, +Config <: EavConfig[AgentId, Action, UtilityType, Config]] extends UtilityConfig[AgentId, Action, ...
flueckiger/dcop-algorithms-evaluation
src/main/scala/com/signalcollect/dcop/evaluation/EavConfig.scala
Scala
apache-2.0
2,105
package samples import java.util.Properties import org.nats._ object SecurePub { def main(args: Array[String]){ var props = new Properties props.put("truststore", "./truststore") props.put("truststore_pass", "password") // KeyStore is used only when tlsverify is set on the server. props.put("k...
tyagihas/scala_nats
src/test/scala/samples/SecurePub.scala
Scala
mit
519
object Script { val loopInv = parseFormula("K() > 0 & e() > 0 & nx()^2 + ny()^2 = 1 & (qx() - px()) * nx() + (qy() - py()) * ny() >=0") val easybranchT = composelistT( hpalpha1T*, diffsolveT(RightP(0), Endpoint), hpalpha1T*, tryruleT(andRight)<( easiestT, alleasyT ) ) val cut...
keymaerad/KeYmaeraD
examples/medrobot/robot_generalized.dl.scala
Scala
bsd-3-clause
8,387
package im.tox.antox.activities import android.app.Activity import android.content.Intent import android.graphics.Color import android.os.{Build, Bundle} import android.preference.PreferenceManager import android.support.v7.app.AppCompatActivity import android.view.{View, WindowManager} import android.widget._ import ...
zetok/Antox
app/src/main/scala/im/tox/antox/activities/LoginActivity.scala
Scala
gpl-3.0
4,482
package com.twitter.finagle.stress import com.twitter.conversions.time._ import com.twitter.finagle.util.DefaultTimer import com.twitter.ostrich.stats.StatsCollection import com.twitter.util.Duration import java.net.{InetAddress, InetSocketAddress, SocketAddress} import java.util.concurrent.atomic.AtomicBoolean import...
Krasnyanskiy/finagle
finagle-stress/src/main/scala/com/twitter/finagle/stress/EmbeddedServer.scala
Scala
apache-2.0
5,040
package org.psliwa.idea.composerJson.intellij.codeAssist import com.intellij.psi.{PsiElement, PsiFileSystemItem} import org.junit.Assert.assertEquals import org.psliwa.idea.composerJson.ComposerJson abstract class FilePathReferences extends CompletionTest { def checkFileReference(file: String, s: String): Unit = {...
psliwa/idea-composer-plugin
src/test/scala/org/psliwa/idea/composerJson/intellij/codeAssist/FilePathReferences.scala
Scala
mit
1,300
package org.orbeon.dom abstract class VisitorSupport extends Visitor { def visit(node: Document) = () def visit(node: Element) = () def visit(node: Attribute) = () def visit(node: Comment) = () def visit(node: Namespace) = () def visit(node: ...
brunobuzzi/orbeon-forms
dom/src/main/scala/org/orbeon/dom/VisitorSupport.scala
Scala
lgpl-2.1
396
package org.goingok.services import java.util.UUID import org.goingok.data.models.{User, UserAuth} import org.goingok.data.persistence.db.DatabaseOps import scala.concurrent.Future import scala.util.{Failure, Success, Try} /** * Created by [email protected] on 12/4/17. */ object UserService { import ...
GoingOK/goingok-server
src/main/scala/org/goingok/services/UserService.scala
Scala
apache-2.0
1,030
/* * Copyright 2017-2022 John Snow Labs * * 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...
JohnSnowLabs/spark-nlp
src/main/scala/com/johnsnowlabs/nlp/annotators/pos/perceptron/PerceptronApproach.scala
Scala
apache-2.0
8,452
package model.dtos case class PlatformStats(totalConsultations:Int, medianAverageCommentsPerConsultations:Int, medianAverageDaysPerConsultation:Int, organizationsPerCategory:List[OrganizationStatsGrouped])
scify/DemocracIT-Web
app/model/dtos/PlatformStats.scala
Scala
apache-2.0
282
package com.wavesplatform.transaction.assets import com.wavesplatform.account.{AddressScheme, KeyPair, PrivateKey, PublicKey} import com.wavesplatform.common.state.ByteStr import com.wavesplatform.crypto import com.wavesplatform.lang.ValidationError import com.wavesplatform.transaction.Asset.IssuedAsset import com.wav...
wavesplatform/Waves
node/src/main/scala/com/wavesplatform/transaction/assets/UpdateAssetInfoTransaction.scala
Scala
mit
3,644
package org.pfcoperez.dailyalgorithm.datastructures import org.scalatest.{ FlatSpec, Matchers } class BitsSpec extends FlatSpec with Matchers { def bytes2seqbool(bytes: Seq[Byte]): Seq[Boolean] = for { b <- bytes bit <- b.toBinaryString } yield bit == '1' def text2seqbool(str: String): Seq[B...
pfcoperez/algorithmaday
src/test/scala/org/pfcoperez/dailyalgorithm/datastructures/BitsSpec.scala
Scala
gpl-3.0
1,751
package score.discord.canti.discord import net.dv8tion.jda.api.entities.{Message, MessageChannel, User} import score.discord.canti.wrappers.jda.ID case class BareMessage( messageId: ID[Message], chanId: ID[MessageChannel], senderId: ID[User], text: String )
ScoreUnder/canti-bot
src/main/scala/score/discord/canti/discord/BareMessage.scala
Scala
agpl-3.0
268
package com.softwaremill.bootzooka.api import com.softwaremill.bootzooka.common.StringJsonWrapper import com.softwaremill.bootzooka.service.PasswordRecoveryService import com.softwaremill.bootzooka.service.user.UserService import org.scalatra.swagger.{StringResponseMessage, Swagger, SwaggerSupport} import org.scalatra...
umitunal/bootzooka
backend/src/main/scala/com/softwaremill/bootzooka/api/PasswordRecoveryServlet.scala
Scala
apache-2.0
3,189
import slick.jdbc.H2Profile.api._ import scala.concurrent.ExecutionContext.Implicits.global trait Interpolation { this: PlainSQL.type => def createCoffees: DBIO[Int] = sqlu"""create table coffees( name varchar not null, sup_id int not null, price double not null, sales int not null, ...
nafg/slick
samples/slick-plainsql/src/main/scala/Interpolation.scala
Scala
bsd-2-clause
2,982
package io.gatling.amqp.data /** * Marker trait for AMQP Requests */ trait AmqpRequest
maiha/gatling-amqp
src/main/scala/io/gatling/amqp/data/AmqpRequest.scala
Scala
mit
90
/** * 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...
samklr/exhibitor-mesos-framework
src/main/scala/ly/stealth/mesos/exhibitor/Cli.scala
Scala
apache-2.0
22,525
package editors import play.api.mvc.{BodyParsers, AnyContentAsFormUrlEncoded, AnyContent, BodyParser} /** * Read data of type `A` as a `Map[String, Seq[String] ]` * @tparam A */ trait DataReader[A] { def read(a: A): Map[String, Seq[String]] def bodyParser: BodyParser[A] } object DataReader { implicit val a...
julienrf/editors
library/src/main/scala/editors/DataReader.scala
Scala
mit
522
object SqrtNewton{ def abs(x: Double) = if (x < 0) -x else x def sqrt(x: Double) = { def sqrtIter(guess: Double): Double = if (stopCond(guess)) x else sqrtIter(approx(guess)) def stopCond(guess: Double) = abs(guess * guess - x)/x < 0.001 def approx(guess: Double) = ...
Chasego/nie
proj/lang/Scala/SqrtNewton.scala
Scala
gpl-3.0
450
package com.twitter.util import java.{util => ju} import java.util.LinkedHashMap import scala.collection.JavaConverters._ import scala.collection.mutable.{Map, MapLike, SynchronizedMap} /** * A wrapper trait for java.util.Map implementations to make them behave as scala Maps. * This is useful if you want to have mo...
BuoyantIO/twitter-util
util-collection/src/main/scala/com/twitter/util/LruMap.scala
Scala
apache-2.0
2,348
/** * Copyright 2013 Netflix, 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...
zjrstar/RxScala
src/main/scala/rx/lang/scala/package.scala
Scala
apache-2.0
1,071
import com.amazonaws.services.{ dynamodbv2 => aws } package object dynamodbv2 { type TableStatus = aws.model.TableStatus type KeyType = aws.model.KeyType type AttributeAction = aws.model.AttributeAction type ProjectionType = aws.model.ProjectionType type ReturnConsumedCapacity = aws.model.ReturnConsumedCapa...
hirokikonishi/awscala
aws/dynamo/src/main/scala/package.scala
Scala
apache-2.0
452
package opencl.generator import ir.ast.{CheckedArrayAccess, Join, Zip, fun, _} import ir.{ArrayType, ArrayTypeWC, ArrayTypeWSWC, TypeChecker, _} import lift.arithmetic.{Cst, SizeVar} import opencl.executor.{Compile, Execute, Executor, TestWithExecutor} import opencl.ir._ import opencl.ir.pattern.{MapGlb, MapSeq, Reduc...
lift-project/lift
src/test/opencl/generator/TestArray.scala
Scala
mit
10,346
/* * This is a draft on an idea for an assertion module. * * An assertion provider should provide assert/require so * that we can use them whenever we assume that a condition should * always hold. Assertions are very useful concept for system with * complex state, such as games, because they let us clarify * ou...
regb/scala-game-library
core/src/main/scala/sgl/util/AssertionsProvider.scala
Scala
mit
1,451
package scalajsreact.template.components.items import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.html_<^._ object Item2Data { val component = ScalaComponent.builder.static("Item2")(<.div("This is Item2 Page ")).build def apply() = component().vdomElement }
chandu0101/scalajs-react-template
src/main/scala/scalajsreact/template/components/items/Item2Data.scala
Scala
apache-2.0
286
/* * 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 ...
pronix/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/json/JsonSuite.scala
Scala
apache-2.0
48,610
/* * 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 ...
tzulitai/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/rules/logical/FlinkAggregateRemoveRuleTest.scala
Scala
apache-2.0
7,986
package linkchecker.design import akka.actor.Actor import scala.concurrent.duration._ import akka.actor.ReceiveTimeout import akka.actor.ActorSystem import akka.actor.Props object MainActor { def props = Props[MainActor] } class MainActor extends Actor { import Receptionist._ val receptionist = context.actor...
fabiofumarola/akka-tutorial
src/main/scala/linkchecker/design/MainActor.scala
Scala
cc0-1.0
1,096
package com.monovore.decline import cats.syntax.all._ import com.monovore.decline.Usage._ private[decline] case class Usage(opts: Many[Options] = Prod(), args: Many[Args] = Prod()) { def show: List[String] = { val optStrings = showOptions(opts) val argStrings = showArgs(args) for { opt <- optStrin...
bkirwi/decline
core/shared/src/main/scala/com/monovore/decline/Usage.scala
Scala
apache-2.0
5,900
import akka.NotUsed import akka.actor.ActorSystem import akka.stream.ActorMaterializer import akka.stream.scaladsl.Tcp.OutgoingConnection import akka.stream.scaladsl.{Flow, Sink, Source, Tcp} import akka.util.ByteString import scala.concurrent.Future object MaterializedValues extends App { implicit val system = Ac...
callicles/akka-streams-intro
src/main/scala/MaterializedValues.scala
Scala
mit
875
package com.wacai.config.annotation import java.io.{File, PrintWriter} import com.typesafe.config.ConfigFactory import annotation.switch import concurrent.duration._ import reflect.macros.whitebox class Macro(val c: whitebox.Context) { import Macro._ import c.universe._ import Flag._ lazy val outputDir = ...
wacai/config-annotation
src/main/scala/com/wacai/config/annotation/Macro.scala
Scala
apache-2.0
8,197
package com.wordnik.swagger.client import akka.dispatch.{Future, Promise} import org.json4s.jackson.JsonMethods abstract class ApiClient(client: TransportClient, config: SwaggerConfig) extends JsonMethods { protected implicit val execContext = client.execContext protected val ser = config.dataFormat protected ...
casualjim/swagger-async-httpclient
src/main/scala_2.9/com/wordnik/swagger/client/ApiClient.scala
Scala
apache-2.0
685
package org.openapitools.server.model /** * @param create for example: ''null'' * @param read for example: ''null'' * @param start for example: ''null'' * @param stop for example: ''null'' * @param `class` for example: ''null'' */ final case class BranchImplpermissions ( create: Option[Boolean], read: O...
cliffano/swaggy-jenkins
clients/scala-akka-http-server/generated/src/main/scala/org/openapitools/server/model/BranchImplpermissions.scala
Scala
mit
416
/* * Copyright 2014 Adam Rosenberger * * 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...
arosenberger/nalloc_2.10
sandbox/src/main/scala/org/nalloc/bitb/kcits/sandbox/exists/MethodValue.scala
Scala
apache-2.0
1,151
/* * Copyright 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 applicable l...
whisklabs/reactiverogue
reactiverogue-core/src/main/scala/reactiverogue/record/field/BsonRecordField.scala
Scala
apache-2.0
1,704
package gapt.expr.formula.hol import gapt.expr._ import gapt.expr.ty.->: import gapt.expr.ty.TBase import gapt.expr.ty.Ty /** * Ordering for HOL Formulas (also for FOL) */ object HOLOrdering extends HOLOrdering class HOLOrdering extends Ordering[Expr] { override def compare( x: Expr, y: Expr ): Int = ( x, y ) mat...
gapt/gapt
core/src/main/scala/gapt/expr/formula/hol/orderings.scala
Scala
gpl-3.0
2,113
/* * Copyright (c) 2014-2020 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
alexandru/monifu
monix-reactive/shared/src/test/scala/monix/reactive/observers/ObserverFeedSuite.scala
Scala
apache-2.0
3,829
package org.openurp.edu.eams.classroom.service.wrapper import org.openurp.base.Room import org.openurp.base.code.RoomUsage import org.beangle.commons.lang.time.YearWeekTime class OccupyUnit( val rooms: Iterable[Room], val units: Array[YearWeekTime], protected val usage: RoomUsage, protected val useri...
openurp/edu-eams-webapp
core/src/main/scala/org/openurp/edu/eams/classroom/service/wrapper/OccupyUnit.scala
Scala
gpl-3.0
567
package com.lookout.borderpatrol.session import com.lookout.borderpatrol.Session import com.lookout.borderpatrol.session.id.{Marshaller, Generator => IdGenerator} import com.lookout.borderpatrol.session.secret.InMemorySecretStore import com.lookout.borderpatrol.session.store.InMemorySessionStore import org.jboss.netty...
rtyler/borderpatrol
borderpatrol-core/src/test/scala/com/lookout/borderpatrol/session/SessionSpec.scala
Scala
mit
1,264
import akka.actor.{ActorRef, Actor} import api.WeatherApi // we don't implement our route structure directly in the service actor because // we want to be able to test it independently, without having to spin up an actor class RestActor(val forecastRef: ActorRef) extends Actor with WeatherApi { // the HttpService...
sbondor/sunwatch
server/src/main/scala/RestActor.scala
Scala
mit
671
package models import java.sql.Connection import javax.inject.Inject import javax.inject.Singleton import play.api.db._ import anorm._ import anorm.SqlParser._ import scala.language.postfixOps case class Project(id: Option[Long], folder: String, name: String) @Singleton class ProjectService @Inject() (dbapi: DBA...
scoverage/scoverage-maven-samples
playframework/singlemodule/zentasks/zentasks-scala-2.11/app/models/Project.scala
Scala
apache-2.0
4,814
import _root_.io.gatling.core.scenario.Simulation import ch.qos.logback.classic.{Level, LoggerContext} import io.gatling.core.Predef._ import io.gatling.http.Predef._ import org.slf4j.LoggerFactory import scala.concurrent.duration._ /** * Performance test for the AuxFile entity. */ class AuxFileGatlingTest extends ...
CardiacAtlasProject/xpacs-web
src/test/gatling/simulations/AuxFileGatlingTest.scala
Scala
gpl-3.0
3,431
trait Functor[a] { type MyType[a] } object Functor { def listFunctor[a]: Functor[a] { type MyType[x] = List[x] } = new Functor[a] { type List[t] = List[t] } }
scala/scala
test/files/neg/t10003.scala
Scala
apache-2.0
165
package scala.meta import org.scalatest._ import scala.reflect.runtime.universe._ import scala.meta.internal.ast._ import scala.meta.dialects.Scala211 class QuasiSuite extends FunSuite { val XtensionQuasiquoteTerm = "shadow scala.metq quasiquotes" test("$x") { assert(Term.Quasi(0, q"x").show[Syntax] === "${x ...
smarter/scalameta
tests/src/test/scala/show/QuasiSuite.scala
Scala
bsd-3-clause
439
package com.avsystem.commons package serialization import com.avsystem.commons.annotation.AnnotationAggregate import com.avsystem.commons.meta.{AutoOptionalParams, MacroInstances} import com.avsystem.commons.misc.{AutoNamedEnum, NamedEnumCompanion, TypedKey} object CodecTestData { def col[T <: JCollection[Int]](col...
AVSystem/scala-commons
commons-core/src/test/scala/com/avsystem/commons/serialization/CodecTestData.scala
Scala
mit
13,780
package fpinscala.datastructures import java.util.concurrent.atomic.DoubleAccumulator sealed trait Tree[+A] case class Leaf[A](value: A) extends Tree[A] case class Branch[A](left: Tree[A], right: Tree[A]) extends Tree[A] object Tree { def size[A](t: Tree[A]): Int = { t match { case Leaf(_) => 1 ...
P3trur0/fpinscala
exercises/src/main/scala/fpinscala/datastructures/Tree.scala
Scala
mit
1,500
object Test { "\\u" "\\u " "\\uuuu" "\\uuuuu" "\\u123" "\\uu123" """\\u""" """\\u """ """\\uuuu""" """\\uuuuu""" """\\u123""" """\\uu123""" }
scala/scala
test/files/neg/t12294.scala
Scala
apache-2.0
157
package loom import play.api.{Mode, Play, Logger, Application} import loom.utils.Memcached /** * * @author chaosky */ object Global { // s -> scala val cacheNameSpace = Play.mode(play.api.Play.current) match { case Mode.Prod => "s/loom/" case m => m.toString + "/s/loom/" } var isDbMysql: Boolean =...
chaosky/loom
app/loom/Global.scala
Scala
mit
799
package com.github.sammyrulez import akka.actor.ActorSystem import com.github.sammyrulez.models.Example import com.mongodb.casbah.Imports._ import com.novus.salat.dao.SalatDAO import org.bson.types.ObjectId import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatra.test.scalatest._ impo...
sammyrulez/resting-scalable-hamster
src/test/scala/com/github/sammyrulez/ControllerTest.scala
Scala
mit
1,262
package org.jetbrains.plugins.scala package lang package psi package impl package base package types import com.intellij.lang.ASTNode import org.jetbrains.plugins.scala.lang.psi.api.base.types.ScQuotedType import org.jetbrains.plugins.scala.lang.psi.impl.expr.ScExpressionImplBase class ScQuotedTypeImpl(node: ASTNode)...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/base/types/ScQuotedTypeImpl.scala
Scala
apache-2.0
425
//: ---------------------------------------------------------------------------- //: Copyright (C) 2015 Verizon. 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 Licen...
neigor/funnel
zeromq/src/main/scala/Transported.scala
Scala
apache-2.0
3,999
package org.apache.spark.ml.bundle.ops import ml.combust.bundle.BundleContext import ml.combust.bundle.op.OpModel import ml.combust.bundle.serializer.GraphSerializer import ml.combust.bundle.dsl._ import org.apache.spark.ml.bundle.{ParamSpec, SimpleParamSpec, SimpleSparkOp, SparkBundleContext} import org.apache.spark....
combust/mleap
mleap-spark/src/main/scala/org/apache/spark/ml/bundle/ops/PipelineOp.scala
Scala
apache-2.0
1,819
package edu.rice.habanero.benchmarks.sieve import akka.actor.{ActorRef, Props} import edu.rice.habanero.actors.{AkkaActor, AkkaActorState} import edu.rice.habanero.benchmarks.{Benchmark, BenchmarkRunner} /** * * @author <a href="http://shams.web.rice.edu/">Shams Imam</a> ([email protected]) */ object SieveAkkaActorBe...
shamsmahmood/savina
src/main/scala/edu/rice/habanero/benchmarks/sieve/SieveAkkaActorBenchmark.scala
Scala
gpl-2.0
3,585
package uk.co.appministry.scathon.models.sse import java.nio.charset.StandardCharsets import java.util.Scanner object ServerSentEventParser { private val linePattern = """([^:]+): ?(.*)""".r def parse(bytes: Array[Byte]): Option[ServerSentEvent] = { parse(new String(bytes, StandardCharsets.UTF_8)) } de...
AppMinistry/scathon
scathon-models/src/main/scala/uk/co/appministry/scathon/models/sse/ServerSentEvent.scala
Scala
apache-2.0
1,789
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
intel-analytics/BigDL
scala/dllib/src/test/scala/com/intel/analytics/bigdl/dllib/nn/DiceCoefficientCriterionSpec.scala
Scala
apache-2.0
3,563
package com.signalcollect.graphproviders /** * Required for integration testing. Returns an undirected grid-structured graph. * Example Grid(2,2): Edges=(1,3), (3,1), (1,2), (2,1), (2,4), (4,2), (3,4), (4,3) * 1-2 * | | * 3-4 */ class Grid(val width: Int, height: Int) extends Traversable[(Int, Int)] with S...
Tjoene/thesis
Case_Programs/signal-collect/src/test/scala/com/signalcollect/graphproviders/SyntheticGraphProviders.scala
Scala
gpl-2.0
2,286
package mur import scala.collection.mutable import scala.util.parsing.input.{Position, Positional} // Intermediate representation for expressions sealed trait Expr extends Positional case class Literal(value: AnyVal) extends Expr // 10, 3.14 case class Brackets(expr: Expr) extends Expr // () case class Id(name: Str...
MaxGekk/mur
src/main/scala/mur/Expr.scala
Scala
bsd-2-clause
4,379
package play.api.cache.redis.configuration private[configuration] object Equals { // $COVERAGE-OFF$ @inline def check[T](a: T, b: T)(property: (T => Any)*): Boolean = { property.forall(property => property(a) == property(b)) } // $COVERAGE-ON$ }
KarelCemus/play-redis
src/main/scala/play/api/cache/redis/configuration/Equals.scala
Scala
mpl-2.0
262
/* * Copyright 2011-2012 The myBatis Team * * 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...
tempbottle/scala-1
mybatis-scala-core/src/main/scala/org/mybatis/scala/mapping/FQI.scala
Scala
apache-2.0
929
/* * DataTypes.scala is part of grado_informatica_tfg_naturallanguageprocessing (grado_informatica_TFG_NaturalLanguageProcessing). * * grado_informatica_TFG_NaturalLanguageProcessing is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as publish...
algui91/NLP_Dependency_Parsing
src/main/scala/com/elbauldelprogramador/nlp/utils/DataTypes.scala
Scala
gpl-3.0
1,193
package com.ing.baker.runtime.serialization.protomappings import com.ing.baker.runtime.akka.actor.protobuf import com.ing.baker.runtime.scaladsl.IngredientInstance import com.ing.baker.runtime.serialization.ProtoMap.{ctxFromProto, ctxToProto, versioned} import com.ing.baker.runtime.serialization.ProtoMap import scala...
ing-bank/baker
core/baker-interface/src/main/scala/com/ing/baker/runtime/serialization/protomappings/IngredientInstanceMapping.scala
Scala
mit
894
package models package product import javax.persistence.Entity import javax.persistence.MappedSuperclass import models.BaseEntity import javax.persistence.Basic import javax.persistence.Column import java.util.{Set => JSet} import java.util.LinkedHashSet import javax.persistence.OneToMany import javax.persistence.Casc...
Bhashit/play-commerce
app/models/product/Product.scala
Scala
mit
933
package distributer import java.io.{File, FileInputStream, RandomAccessFile} import java.nio.ByteBuffer import java.nio.channels.FileChannel import java.util.jar.{JarEntry, JarInputStream} /** * Created by #GrowinScala */ object JarFileHandler { private val ClassExtension = ".class" def getClassNames(file: ...
exocute/Toolkit
src/main/scala/distributer/JarFileHandler.scala
Scala
bsd-2-clause
1,989
package apdl.parser import scala.io.Source import scala.util.matching.Regex /* * Basically, all we are doing here is to replace the @include <file> by the content of the <file> itself... */ class IncludeProcessor { val include : Regex = "@include \\"(.*\\\\.apdl)\\"".r def process(code: String): String = { ...
SnipyJulmy/APDL
src/main/scala/apdl/parser/IncludeProcessor.scala
Scala
lgpl-3.0
404
package com.xhachi.gae4s.taskqueue import com.google.appengine.api.taskqueue.{TaskHandle, TaskOptions, TransactionalTaskException} import com.google.appengine.tools.development.testing.{LocalDatastoreServiceTestConfig, LocalTaskQueueTestConfig} import com.xhachi.gae4s.datastore.Datastore import com.xhachi.gae4s.tests....
thachi/gae4s
core/src/test/scala/com/xhachi/gae4s/taskqueue/TaskQueueTest.scala
Scala
apache-2.0
3,088
/* * 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/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/rules/logical/FlinkSemiAntiJoinFilterTransposeRuleTest.scala
Scala
apache-2.0
2,693
package org.joda.time trait ReadWritableInterval extends ReadableInterval { def setInterval(startInstant: Long, endInstant: Long): Unit def setInterval(interval: ReadableInterval): Unit def setInterval(startInstant: ReadableInstant, endInstant: ReadableInstant): Unit def setChronology(chr...
mdedetrich/soda-time
shared/src/main/scala/org/joda/time/ReadWritableInterval.scala
Scala
bsd-2-clause
773
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
travisbrown/scalatest
src/test/scala/org/scalatest/ShouldContainOnlyTypeCheckSpec.scala
Scala
apache-2.0
63,352
/* * Copyright (C) 2015 Noorq, 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...
mailrest/mailrest
app/controllers/action/DomainAction.scala
Scala
apache-2.0
2,567
/* * 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 ...
GJL/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/expressions/PlannerExpressionConverter.scala
Scala
apache-2.0
25,253
package controllers import play.api.mvc._ object LogoutController extends Controller { def logout = Action {implicit request => Redirect(routes.IndexController.index).withNewSession.flashing("level" -> "info", "msg" -> "You have been successfully logged out.") } }
semberal/homelibrary
app/controllers/LogoutController.scala
Scala
apache-2.0
279
/* * Copyright 2014 JHC Systems Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
DavidGregory084/sqlest
sqlest/src/main/scala/sqlest/sql/SQLServerStatementBuilder.scala
Scala
apache-2.0
775
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
fusepoolP3/p3-silk
silk-workspace/src/main/scala/de/fuberlin/wiwiss/silk/workspace/modules/linking/LinkingTask.scala
Scala
apache-2.0
1,724
package tmvault.util class Future[+T](private[util] val value:T) { def withFilter(p:T=>Boolean) : Future[T] = this def filter(p:T=>Boolean) : Future[T] = this def map[U](f:T=>U) : Future[U] = Future(f(value)) def flatMap[U](f:T=>Future[U]) : Future[U] = f(value) } object Future { def successful[T](value...
rklaehn/tmvault
tmvault/src/main/scala/tmvault/util/Future.scala
Scala
apache-2.0
701
/* * This file is part of AckCord, licensed under the MIT License (MIT). * * Copyright (c) 2019 Katrix * * 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 ...
Katrix-/AckCord
ackCord/src/main/scala/ackcord/ClientSettings.scala
Scala
mit
8,086
/*********************************************************************** * 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 ...
mdzimmerman/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/iterators/SamplingIterator.scala
Scala
apache-2.0
3,346
package cromwell.engine.backend.jes import java.nio.file.Paths import com.google.api.services.genomics.model.Disk import cromwell.engine.backend.runtimeattributes.DiskType import org.scalatest.prop.TableDrivenPropertyChecks._ import org.scalatest.prop.Tables.Table import org.scalatest.{FlatSpec, Matchers, TryValues} ...
cowmoo/cromwell
engine/src/test/scala/cromwell/engine/backend/jes/JesAttachedDiskSpec.scala
Scala
bsd-3-clause
1,666
/* 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...
stripe/scalding
scalding-core/src/main/scala/com/twitter/scalding/serialization/KryoHadoop.scala
Scala
apache-2.0
4,773
/* * 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/src/main/scala/org/scalatest/tools/RunDoneListener.scala
Scala
apache-2.0
803