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 wiro import scala.language.experimental.macros import scala.reflect.macros.blackbox.Context import wiro.annotation.path trait TypePathMacro { def typePath[A]: Seq[String] = macro TypePathMacro.typePathImpl[A] } object TypePathMacro extends TypePathMacro { def typePathImpl[A: c.WeakTypeTag](c: Context): ...
federico-pellegatta/wiro
core/src/main/scala/TypePathMacro.scala
Scala
mit
476
package io.vamp.http_api import akka.http.scaladsl.model.StatusCodes.OK import akka.util.Timeout import io.vamp.common.Namespace import io.vamp.common.http.HttpApiDirectives import io.vamp.operation.controller.StatsController trait StatsRoute extends AbstractRoute with StatsController { this: HttpApiDirectives ⇒ ...
magneticio/vamp
http_api/src/main/scala/io/vamp/http_api/StatsRoute.scala
Scala
apache-2.0
569
import sbt._ import Keys._ import org.scalatra.sbt._ import org.scalatra.sbt.PluginKeys._ import com.mojolly.scalate.ScalatePlugin._ import ScalateKeys._ object TestingScalatraBuild extends Build { val Organization = "com.github.okaram" val Name = "Testing Scalatra" val Version = "0.1.0-SNAPSHOT" val ScalaVers...
okaram/scala
testing-scalatra/project/build.scala
Scala
unlicense
1,752
/* * Copyright 2015 LG CNS. * * 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...
sncap/scouter
scouter.server/src/scouter/server/core/TextCacheReset.scala
Scala
apache-2.0
1,969
import sbt._ import sbt.Keys._ import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._ object Dependencies { object Ver { // Externally observable val cats = "2.6.1" val microlibs = "4.0.0" val monocle = "3.1.0" val scala2 = "2.13.6" va...
japgolly/nyaya
project/Dependencies.scala
Scala
lgpl-2.1
1,403
/* Title: Pure/Tools/build.scala Author: Makarius Options: :folding=explicit: Build and manage Isabelle sessions. */ package isabelle import java.io.{BufferedInputStream, FileInputStream, BufferedReader, InputStreamReader, IOException} import java.util.zip.GZIPInputStream import scala.collec...
MerelyAPseudonym/isabelle
src/Pure/Tools/build.scala
Scala
bsd-3-clause
35,299
/* * Copyright 2015 * * 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, ...
TouK/influxdb-reporter
core/src/test/scala/influxdbreporter/core/PullingGaugeTests.scala
Scala
apache-2.0
2,460
package com.twitter.finagle.buoyant import com.twitter.finagle.{Path => FPath, _} import com.twitter.finagle.naming.{DefaultInterpreter, NameInterpreter} import com.twitter.finagle.util.Showable import com.twitter.util.Var sealed trait Dst { def path: FPath } object Dst { case class Path(path: FPath, baseDtab: ...
hhtpcd/linkerd
router/core/src/main/scala/com/twitter/finagle/buoyant/Dst.scala
Scala
apache-2.0
2,293
/* Title: Pure/General/properties.scala Author: Makarius Property lists. */ package isabelle object Properties { /* entries */ type Entry = (java.lang.String, java.lang.String) type T = List[Entry] def defined(props: T, name: java.lang.String): java.lang.Boolean = props.exists({ case (x,...
larsrh/libisabelle
modules/pide/2017/src/main/scala/General/properties.scala
Scala
apache-2.0
3,468
package cc.factorie.app.nlp import cc.factorie.app.nlp.segment.{DeterministicNormalizingTokenizer, DeterministicSentenceSegmenter} import org.scalatest.{FlatSpec, Matchers} /** * @author John Sullivan */ class TestCompoundDocumentAnnotator extends FlatSpec with Matchers { def fix = new { val doc = new Documen...
patverga/factorie
src/test/scala/cc/factorie/app/nlp/TestCompoundDocumentAnnotator.scala
Scala
apache-2.0
779
/* * 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 ...
wwjiang007/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/common/AggregateReduceGroupingTestBase.scala
Scala
apache-2.0
10,531
package org.squeryl.test.mutablerelations import org.squeryl.PrimitiveTypeMode._ import org.squeryl._ import org.squeryl.dsl.CompositeKey2 trait SchoolDb2Object extends KeyedEntity[Long] { val id: Long = 0 } class Professor(val lastName: String) extends SchoolDb2Object { lazy val courses = SchoolDb2...
takezoux2/squeryl-experimental
src/test/scala/org/squeryl/test/mutablerelations/SchoolDbMutableRelations.scala
Scala
apache-2.0
7,901
import leon.annotation.extern object UnsupportedAliasing { case class A(var x: Int) case class B(a: A, y: Int) def updateB(b1: B, b2: B): Unit = { b1.a.x = 42 b2.a.x = 41 } def update(a1: A, a2: A, y: Int): Unit = { updateB(B(a2, y), B(a1, y)) } ensuring(_ => a2.x == 42 && a1.x == 41) de...
mantognini/GenC
3 master thesis project report/examples/UnsupportedAliasing.scala
Scala
mit
507
package org.cddcore.example import org.cddcore.engine.Engine import org.junit.runner.RunWith import org.cddcore.engine.tests.CddJunitRunner @RunWith(classOf[CddJunitRunner]) object HelloWorld { val engine = Engine[Int, String](). useCase("Returns hello world the requested number of times"). scenario(1, "Jus...
phil-rice/cddexamples
src/main/scala/org/cddcore/example/HelloWorld.scala
Scala
bsd-2-clause
736
/* * 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 t...
coursera/zipkin
zipkin-common/src/main/scala/com/twitter/zipkin/query/Trace.scala
Scala
apache-2.0
6,248
package com.olegych.scastie package client package components import japgolly.scalajs.react._, vdom.all._, extra._ final case class WorksheetButton( hasWorksheetMode: Boolean, isWorksheetMode: Boolean, toggleWorksheetMode: Reusable[Callback], view: View ) { @inline def render: VdomElement = Workshee...
scalacenter/scastie
client/src/main/scala/com.olegych.scastie.client/components/WorksheetButton.scala
Scala
apache-2.0
1,554
package com.sksamuel.scrimage import scala.collection.mutable.ArrayBuffer import scala.concurrent.duration.FiniteDuration import scala.concurrent.duration._ class Stopwatch { private val instants = new ArrayBuffer[FiniteDuration] def start(): Unit = { reset() lap } def stop(): FiniteDuration = lap ...
carlosFattor/scrimage
scrimage-core/src/test/scala/com/sksamuel/scrimage/Stopwatch.scala
Scala
apache-2.0
1,574
/* ,i::, :;;;;;;; ;:,,::;. 1ft1;::;1tL t1;::;1, :;::; _____ __ ___ __ fCLff ;:: tfLLC / ___/ / |/ /____ _ _____ / /_ CLft11 :,, i1tffLi \\__ \\ ____ / /|_/ ...
S-Mach/s_mach.i18n
src/test/scala/s_mach/i18n/test/I18NTest.scala
Scala
mit
5,675
import scala.concurrent.{Await, ExecutionContext, Future} import scala.concurrent.duration.DurationInt /** * Asynchronous application support. */ trait AsyncApp extends App { protected[this] implicit val executionContext = ExecutionContext.global /** * The default timeout period for the asynchronous appli...
tintoy/slick-db-demo
src/main/scala/AsyncApp.scala
Scala
mit
1,339
package net.maffoo.jsonquote.json4s import org.json4s._ import org.json4s.native.JsonMethods._ object Compat { def compactRender(json: JValue): String = compact(render(json)) }
maffoo/jsonquote
json4s/src/main/scala/net/maffoo/jsonquote/json4s/Compat.scala
Scala
mit
181
/* * 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 ...
jkbradley/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/ReduceNumShufflePartitionsSuite.scala
Scala
apache-2.0
22,862
sealed trait Base { def str: String } case class One(str: String) extends Base case class Two(str: String) extends Base case class Three(str: String) extends Base case class Item(_id: String) private def doWithItem[T <: (One | Two | Three)] (item: Item, value: T, action: (T) => Item) = doWithItemId(item._id, value,...
lampepfl/dotty
tests/pos/i12286.scala
Scala
apache-2.0
470
package com.rklaehn.radixtree import org.github.jamm.MemoryMeter import cats.kernel.Hash import scala.collection.immutable.SortedSet import scala.io.Source object SizeTest extends App { implicit object eqHash extends Hash[Unit] { override def hash(x: Unit): Int = 0 override def eqv(x: Unit, y: Unit) = tr...
rklaehn/radixtree
instrumentedTest/src/test/scala/com/rklaehn/radixtree/SizeTest.scala
Scala
apache-2.0
2,133
/* * 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 ...
dbtsai/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/WholeStageCodegenSuite.scala
Scala
apache-2.0
18,671
/** * Copyright (C) 2013 Carnegie Mellon University * * 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 appl...
twmarshall/tdb
core/src/main/scala/tdb/worker/Task.scala
Scala
apache-2.0
4,568
import scala.io._ import scala.util.{ Try, Success, Failure } import edu.luc.cs.ui._ object SumFile2 { def main(args: Array[String]) { val filename = promptLine("Enter a file of integers: ") val result = CalcSum(filename) val succeeded = result._1 val sum = result._2 if (succeeded) { printl...
LoyolaChicagoBooks/introcs-scala-examples
sum_file2/sum_file2.scala
Scala
gpl-3.0
670
object test { enum SUB[T, U] { case Refl[S]() extends SUB[S, S] } // injective(G) & f[S] <: G[S] =X=> \forall t. f[t] <: Option[t] def foo[F[_]](fi: F[Int], sub: F[String] SUB Option[String]): Option[Int] = sub match { case SUB.Refl() => fi // error } // injective(G) & f[x] <: G[...
som-snytt/dotty
tests/neg/gadt-variant-hkt.scala
Scala
apache-2.0
958
package com.itszuvalex.itszulib.gui /** * Created by Christopher Harris (Itszuvalex) on 9/4/15. */ object GuiFlowLayout { object FlowDirection extends Enumeration { type FlowDirection = Value val Vertical, Horizontal = Value } /** * Reserved for later refinement. */ object FlowVertical extend...
Itszuvalex/ItszuLib
src/main/scala/com/itszuvalex/itszulib/gui/GuiFlowLayout.scala
Scala
gpl-2.0
5,189
package scala.collection.scalatest import org.scalatest._ import java.lang.UnsupportedOperationException trait BagBucketBehaviours { this: FlatSpec => def emptyBagBucketBehaviour[A](bagBucket: => scala.collection.BagBucket[A], bagBuckets: => Seq[scala.collection.BagBucket[A]]) { it should "be empty" in { ...
sageserpent-open/multisets
src/test/scala/scala/collection/scalatest/BagBucketBehaviours.scala
Scala
bsd-3-clause
5,738
package mypipe import mypipe.api.event.{ DeleteMutation, Mutation, UpdateMutation, InsertMutation } import mypipe.mysql.{ BinaryLogFilePosition, MySQLBinaryLogConsumer } import mypipe.pipe.Pipe import scala.concurrent.Await import scala.concurrent.duration._ import mypipe.producer.QueueProducer import java.util.concur...
Asana/mypipe
mypipe-api/src/test/scala/mypipe/MySQLSpec.scala
Scala
apache-2.0
3,666
package redis.bench import redis.protocol.RedisProtocolRequest import akka.util.ByteString import org.scalameter.api._ object RedisBenchProtocol extends PerformanceTest.Regression { override def reporter: Reporter = Reporter.Composite( new RegressionReporter( RegressionReporter.Tester.Accepter(), R...
mspielberg/rediscala
src/benchmark/scala/redis/bench/RedisBenchProtocol.scala
Scala
apache-2.0
2,443
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
WindCanDie/spark
core/src/main/scala/org/apache/spark/api/r/RBackend.scala
Scala
apache-2.0
7,217
package org.talkingpuffin.ui.util import swing.{Label, BorderPanel} import org.talkingpuffin.ui.Thumbnail import java.awt.{Color, Dimension} /** * Centers pictures of different shapes. */ class CenteredPicture(picLabel: Label) extends BorderPanel { val s = new Dimension(Thumbnail.MEDIUM_SIZE, Thumbnail.MEDIUM_SIZ...
dcbriccetti/talking-puffin
desktop/src/main/scala/org/talkingpuffin/ui/util/CenteredPicture.scala
Scala
mit
454
/* * Copyright 2014-2021 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 agr...
brharrington/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/norm/RollingValueFunctionSuite.scala
Scala
apache-2.0
1,840
package pirc.kpi.impl import com.typesafe.config.ConfigFactory import akka.actor.{Actor, ActorRef, ActorSelection, ActorSystem, Props} import akka.pattern.ask import akka.util._ import scala.concurrent.Await import scala.concurrent.duration._ import scala.concurrent.ExecutionContext.Implicits.global class TrackerRea...
Pirc/kpi
src/main/scala/TrackerReader.scala
Scala
apache-2.0
1,018
import scala.io.Source object Solution extends App { val lines = Source.stdin.getLines().toList val points = lines.tail.head.split(" ").map(_.toInt) var mostPoints = points.head var leastPoints = points.head var mostPointsBreak = 0 var leastPointsBreak = 0 points.foreach(point => { if(point > mostPo...
PaulNoth/hackerrank
practice/algorithms/implementation/breaking_the_records/BreakingTheRecords.scala
Scala
mit
535
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/api-gateway
test/uk/gov/hmrc/apigateway/cache/CacheMetricsSpec.scala
Scala
apache-2.0
2,003
package unfiltered.netty import unfiltered.util.{ HttpPortBindingShim, PlanServer, Port, RunnableServer } import io.netty.bootstrap.ServerBootstrap import io.netty.channel.{ ChannelHandler, ChannelInitializer, ChannelOption, ChannelPipeline, EventLoopGroup } import io.netty.channel.group.{ ChannelGroup, Def...
jarin/unfiltered
netty-server/src/main/scala/http.scala
Scala
mit
7,163
/* * 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...
lresende/incubator-toree
sql-interpreter/src/main/scala/org/apache/toree/kernel/interpreter/sql/SqlService.scala
Scala
apache-2.0
2,584
package debop4s.data.slick3.associations import debop4s.data.slick3.{AbstractSlickFunSuite, _} import debop4s.data.slick3.associations.AssociationDatabase._ import debop4s.data.slick3.associations.AssociationDatabase.driver.api._ /** * BankAccountFunSuite * @author sunghyouk.bae@gmail.com */ class BankAccountFunSu...
debop/debop4s
debop4s-data-slick3/src/test/scala/debop4s/data/slick3/associations/BankAccountFunSuite.scala
Scala
apache-2.0
3,480
package com.sksamuel.elastic4s import org.scalatest.{Matchers, WordSpec} class MultiSearchShowTest extends WordSpec with Matchers with ElasticSugar { import ElasticDsl._ "MultiSearch" should { "have a show typeclass implementation" in { val request = { multi( search in "gameofthrones...
ExNexu/elastic4s
elastic4s-core/src/test/scala/com/sksamuel/elastic4s/MultiSearchShowTest.scala
Scala
apache-2.0
1,474
package me.archdev.api.internal /** * All internal commands and events must be mixed with this traits. * This is not necessary, but marking of classes with stuff like this will do code more clear and typesafe. */ trait Command case class ShowErrorMessage(userId: String, message: String) extends Command trait E...
ArchDev/unidirectional-akka-redux
backend/src/main/scala/me/archdev/api/internal/Protocol.scala
Scala
mit
385
/* Copyright 2014-2015 - Big Data Technologies S.R.L. All Rights Reserved. */ package supler import scala.scalajs.js case class Validation[T](required:Boolean=false, gt:Option[T]=None, gte:Option[T]=None, lt:Option[T]=None, lte:Option[T]=None) object Validation { d...
aparo/scalajs-supler
supler/js/src/main/supler/Validation.scala
Scala
apache-2.0
930
package utils import utils.Config.dbConfig._ import slick.driver.{ H2Driver, JdbcProfile, PostgresDriver } import slick.jdbc.JdbcBackend._ //Based on play-slick driver loader object DatabaseConfig { lazy val db: Database = Database.forURL(url, user, password, driver = driver) lazy val profile: JdbcProfile = drive...
Gneotux/spray-swagger-slick-seed
src/main/scala/utils/DatabaseConfig.scala
Scala
apache-2.0
424
/* * 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...
monifu/monifu
monix-tail/shared/src/main/scala/monix/tail/internal/IterantMapEval.scala
Scala
apache-2.0
2,882
package org.fayalite.ui.j2d import java.awt._ import java.awt.event._ import java.awt.image.BufferedImage import java.io.File import javax.imageio.ImageIO import javax.swing.{JButton, JFrame, JPanel} import scala.collection.mutable /** * Same as regular frame but with irritating * init methods wrapped up and a...
ryleg/fayalite
core/src/main/scala/org/fayalite/ui/j2d/FFrame.scala
Scala
mit
2,136
package filterAccess.tools /** * Created by Claudio Marxer <marxer@claudio.li> * * Custom Exceptions for access control and filtering. * */ object Exceptions { /** * Throw this kind of exception if the service invocation should not return any answer. * Examples: Permission denied, Invalid access level.....
cn-uofbasel/nfn-scala
src/main/scala/filterAccess/tools/Exceptions.scala
Scala
isc
679
package org.life import org.life.MatrixBoardFactory.toroid import org.scalatest._ class ToroidalBoardSpec extends FlatSpec with Matchers { "Board" should "maintain an empty board" in { assert( emptyBoard.nextBoard( ) == emptyBoard ) } it should "maintain box layouts in the center and the corners"...
squid314/scala-game-of-life
src/test/scala/org/life/ToroidalBoardSpec.scala
Scala
gpl-3.0
1,209
package io.finch.petstore import com.twitter.util.{Await, Future} import scala.collection.mutable /** * Provides a great majority of the service methods that allow Users to interact with the Pets in the * store and to get information about them. */ class PetstoreDb { private[this] val pets = mutable.Map.empty[L...
peel/finch
petstore/src/main/scala/io/finch/petstore/petstoreDb.scala
Scala
apache-2.0
10,904
package frdomain.ch3 package repository import java.util.Date import util.{ Try, Success, Failure } import collection.mutable.{ Map => MMap } trait AccountRepository extends Repository[Account, String] { def query(no: String): Try[Option[Account]] def store(a: Account): Try[Account] def balance(no: String): Try...
debasishg/frdomain
src/main/scala/frdomain/ch3/repository/AccountRepository.scala
Scala
apache-2.0
1,024
/* * 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
core/src/test/scala/org/apache/spark/storage/BlockManagerSuite.scala
Scala
apache-2.0
61,925
/* * 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 ...
wangmiao1981/spark
core/src/main/scala/org/apache/spark/util/ClosureCleaner.scala
Scala
apache-2.0
40,821
package reswing import java.awt.event.{HierarchyEvent, HierarchyListener} import scala.collection.mutable.{ListBuffer, Map} import scala.language.implicitConversions import scala.swing.{Publisher, Reactor, Swing, UIElement} import scala.swing.event.Event /** * Introduces methods to connect a ''Reactive Swing'' valu...
volkc/REScala
Extensions/RESwing/src/main/scala/reswing/ReSwingValueConnection.scala
Scala
apache-2.0
7,332
// // Not.scala -- Scala object Not // Project OrcScala // // $Id: Not.scala 2933 2011-12-15 16:26:02Z jthywissen $ // // Copyright (c) 2011 The University of Texas at Austin. All rights reserved. // // Use and redistribution of this file is governed by the license terms in // the LICENSE file found in the project's to...
laurenyew/cOrcS
src/orc/lib/bool/Not.scala
Scala
bsd-3-clause
1,173
/******************************************************************************* Copyright (c) 2013, KAIST. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. **********************************************************************...
darkrsw/safe
src/main/scala/kr/ac/kaist/jsaf/analysis/typing/debug/commands/CmdMove.scala
Scala
bsd-3-clause
2,019
package info.mukel.telegrambot4s.models /** This object represents one result of an inline query. * Telegram clients currently support results of the following 19 types: * * InlineQueryResultCachedAudio * InlineQueryResultCachedDocument * InlineQueryResultCachedGif * InlineQueryResultCachedMpeg4Gif...
hugemane/telegrambot4s
src/main/scala/info/mukel/telegrambot4s/models/InlineQueryResult.scala
Scala
apache-2.0
37,940
package debop4s.timeperiod.calendars import debop4s.core.ToStringHelper import debop4s.core.conversions.jodatime._ import debop4s.core.utils.Hashs import debop4s.timeperiod.TimeSpec._ import debop4s.timeperiod._ import debop4s.timeperiod.utils.Times import org.joda.time.{DateTime, Duration} import org.slf4j.LoggerFact...
debop/debop4s
debop4s-timeperiod/src/main/scala/debop4s/timeperiod/calendars/DateDiff.scala
Scala
apache-2.0
5,416
/** * 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...
kavink92/kafka-0.8.0-beta1-src
core/src/main/scala/kafka/consumer/FetchRequestAndResponseStats.scala
Scala
apache-2.0
2,589
/* * Copyright 2001-2008 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...
epishkin/scalatest-google-code
src/test/scala/org/scalatest/matchers/ShouldIncludeRegexSpec.scala
Scala
apache-2.0
42,349
/* * Copyright 2014–2020 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...
slamdata/quasar
ejson/src/main/scala/quasar/ejson/DecodeEJson.scala
Scala
apache-2.0
6,121
package org.crudible.core.binding.traits import org.crudible.core.util.Decoratable trait HasRequiredLabel extends Decoratable { case class HasRequiredLabelDecorator(label: String) def label(label: String): this.type = { this.decorateWith(HasRequiredLabelDecorator(label)) } def label() = { this.getD...
rehei/crudible
crudible-core/src/main/scala/org/crudible/core/binding/traits/HasRequiredLabel.scala
Scala
apache-2.0
431
/* * Copyright 2017 Ahmad Mozafarnia * * 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...
ahmadmo/bama-api-demo
app/ir/bama/services/SellerService.scala
Scala
apache-2.0
2,386
package pgep abstract class GenotypeSelector { def select(genotypes: Array[Genotype]): List[List[Genotype]] }
khernyo/PGEP
src/pgep/GenotypeSelector.scala
Scala
gpl-3.0
113
package com.mesosphere.cosmos.model.thirdparty.marathon case class MarathonAppsResponse(apps: List[MarathonApp])
movicha/cosmos
cosmos-model/src/main/scala/com/mesosphere/cosmos/model/thirdparty/marathon/MarathonAppsResponse.scala
Scala
apache-2.0
114
package spark.streaming import util.{ManualClock, RecurringTimer, Clock} import spark.SparkEnv import spark.Logging private[streaming] class Scheduler(ssc: StreamingContext) extends Logging { initLogging() val concurrentJobs = System.getProperty("spark.streaming.concurrentJobs", "1").toInt val jobManager = ne...
koeninger/spark
streaming/src/main/scala/spark/streaming/Scheduler.scala
Scala
bsd-3-clause
3,896
import scala.tools.nsc.doc.base._ import scala.tools.nsc.doc.base.comment._ import scala.tools.nsc.doc.model._ import scala.tools.partest.ScaladocModelTest object Test extends ScaladocModelTest { override def code = """ package org.foo class MyException extends Exception class MyOtherException extends Exception ...
scala/scala
test/scaladoc/run/t6626.scala
Scala
apache-2.0
1,218
/** * 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"); yo...
zzwlstarby/mykafka
core/src/test/scala/other/kafka/ReplicationQuotasTestRig.scala
Scala
apache-2.0
12,937
import java.io.{FileReader, InputStreamReader, BufferedReader} import java.util.StringTokenizer import util.Sorting /** * @author @shengmin */ object Solution { val reader = new BufferedReader(new InputStreamReader(System.in)) val tokenizer = new StringTokenizer(reader.readLine()) val N = tokenizer.nextToken...
shengmin/coding-problem
hackerrank/difficult-printer/Solution.scala
Scala
mit
1,719
package common.protocol /** * Cluster Node Registration Protocol. * * @author dbolene */ object ClusterNodeRegistrationProtocol { case object BackendRegistration }
dbolene/BobWilsonsGarage
common/src/main/scala/common/protocol/ClusterNodeRegistrationProtocol.scala
Scala
apache-2.0
171
object Basis { final case class X[T](t: T) val x = Seq(X(32)) val y = Seq(X(true)) val x1 = Seq(X("asdf")) val x2 = Seq(X('d')) } import Basis.* object DoesWork { // Doesn'tWork // def f1 = x ++ y ++ x1 ++ x2 def f2 = List(x, y, x1, x2).flatten } // Testing the not giving of explicit Booper[M] argu...
dotty-staging/dotty
tests/pos-scala2/hk-infer.scala
Scala
apache-2.0
855
/* Copyright 2012 Denis Bardadym 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 ...
Khalith-Basha/demo
src/main/scala/bootstrap/liftweb/Boot.scala
Scala
apache-2.0
5,323
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
WindCanDie/spark
core/src/main/scala/org/apache/spark/scheduler/BarrierJobAllocationFailed.scala
Scala
apache-2.0
3,329
package im.actor.server.group import java.time.{ LocalDateTime, ZoneOffset } import akka.actor.Status import akka.pattern.pipe import com.google.protobuf.ByteString import im.actor.api.rpc.Update import im.actor.api.rpc.groups._ import im.actor.api.rpc.messaging.ApiServiceMessage import im.actor.api.rpc.misc.ApiExten...
zwensoft/actor-platform
actor-server/actor-core/src/main/scala/im/actor/server/group/GroupCommandHandlers.scala
Scala
mit
19,586
package japgolly.scalajs.react.test import scala.util.Try import scala.util.control.NonFatal import scalajs.js.Dynamic.global import Console._ object JsEnvUtils { /** Sample (real) values are: * - Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.1.1 Safari/538.1 * - Moz...
matthughes/scalajs-react
test/src/test/scala/japgolly/scalajs/react/test/JsEnvUtils.scala
Scala
apache-2.0
1,086
package com.jsuereth.pgp package cli /** Helper for printing key info to console. */ object Display { def printFileHeader(f: java.io.File) = { val path = f.getAbsolutePath val line = Stream.continually('-').take(path.length).mkString("") path + "\\n" + line + "\\n" } def printKey(k: PublicKey) ...
voetha/sbt-pgp
pgp-plugin/src/main/scala/com/jsuereth/pgp/cli/Display.scala
Scala
bsd-3-clause
1,588
/** * 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...
wangcy6/storm_app
frame/kafka-0.11.0/kafka-0.11.0.1-src/core/src/main/scala/kafka/consumer/ZookeeperTopicEventWatcher.scala
Scala
apache-2.0
3,398
package edu.colorado.plv.cuanto /** * @author Nicholas V. Lewchenko */ package abstracting.tc { /** A domain of partially ordered values with a ''least element'' * ([[Semilattice.bot]]) and a [[Semilattice.join]] operation * * The partial ordering in this case is [[Semilattice.implies]]. * *...
cuplv/cuanto
src/main/scala/edu/colorado/plv/cuanto/abstracting/tc/package.scala
Scala
apache-2.0
2,647
package com.shocktrade.daycycle import scala.language.implicitConversions /** * daemons package object * @author Lawrence Daniels <lawrence.daniels@gmail.com> */ package object daemons { }
ldaniels528/shocktrade.js
app/server/daycycle/src/main/scala/com/shocktrade/daycycle/daemons/package.scala
Scala
apache-2.0
198
package com.github.wartman4404.gldraw import android.graphics.Bitmap import android.os.Message import android.view.MotionEvent class CopyShader private (private val nativePtr: Int) extends AnyVal { def isDefault() = nativePtr == 0 } class PointShader private (private val nativePtr: Int) extends AnyVal { def isDefa...
wartman4404/everybody-draw
src/main/scala/Shaders.scala
Scala
apache-2.0
4,316
package org.scalatra import java.lang.{Integer => JInteger} import scala.util.control.{NoStackTrace, ControlThrowable} /** * A collection of methods that affect the control flow of routes. */ trait Control { /** * Immediately halts processing of a request. Can be called from either a * before filter or a r...
etorreborre/scalatra
core/src/main/scala/org/scalatra/control.scala
Scala
bsd-2-clause
1,464
/* * Copyright 2012-2014 Comcast Cable Communications Management, 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 * * Unl...
Comcast/sirius
src/test/scala/com/comcast/xfinity/sirius/api/impl/paxos/LeaderPingerTest.scala
Scala
apache-2.0
4,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 ...
practice-vishnoi/dev-spark-1
core/src/main/scala/org/apache/spark/shuffle/FileShuffleBlockResolver.scala
Scala
apache-2.0
12,464
/** * Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> */ package akka.crdt.convergent import play.api.libs.json._ import java.util.UUID import ConvergentReplicatedDataType._ import akka.actor.ActorSystem /** * Implements a ConvergentReplicatedDataType 'Increment/Decrement Counter' also called a 'P...
jboner/akka-crdt
src/main/scala/akka/crdt/convergent/PNCounter.scala
Scala
apache-2.0
3,226
/* * Copyright 2016 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...
ahudspith-equalexperts/ct-calculations
src/test/scala/uk/gov/hmrc/ct/box/retriever/BoxRetrieverSpec.scala
Scala
apache-2.0
1,840
package com.ajjpj.adiagram_.ui.fw import javafx.beans.property.Property import javafx.event.{EventHandler, Event} import scala.language.implicitConversions import javafx.beans.value.{ObservableValue, ChangeListener} /** * All (UI related) application code should be executed as a callback through this class, either ...
arnohaase/a-diagram
src/main/scala-old/com/ajjpj/adiagram_/ui/fw/Digest.scala
Scala
apache-2.0
5,235
package org.biancama.algorithms.sort import scala.annotation.tailrec /** * Created by massimo on 30/04/16. */ object BubbleSort { /** * bubbleIter :: Ord a => [a] -> [a] * bubble la while la isn NOT ordered then bubble la * * @return ordered list */ def sort[A](unsortedList: List[A])(implicit or...
biancama/data-structures-scala
src/main/scala/org/biancama/algorithms/sort/BubbleSort.scala
Scala
gpl-3.0
1,323
package org.jetbrains.plugins.scala package codeInspection.cast import com.intellij.codeInspection.ex.ProblemDescriptorImpl import com.intellij.codeInspection.{ProblemHighlightType, ProblemsHolder} import com.intellij.openapi.project.Project import com.intellij.openapi.util.TextRange import com.intellij.psi.PsiElement...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/codeInspection/cast/ScalaRedundantCastInspection.scala
Scala
apache-2.0
2,165
package com.danielasfregola.twitter4s.entities.v2 import java.time.Instant // https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/poll final case class Poll(id: String, options: Seq[PollOption], duration_minutes: Option[Int], ...
DanielaSfregola/twitter4s
src/main/scala/com/danielasfregola/twitter4s/entities/v2/Poll.scala
Scala
apache-2.0
476
package com.twitter.cache import com.twitter.util.{Promise, Future} import java.util.concurrent.ConcurrentHashMap import org.junit.runner.RunWith import org.mockito.Mockito.{verify, never} import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import org.scalatest.mock.MockitoSugar @RunWith(classOf[JUni...
BuoyantIO/twitter-util
util-cache/src/test/scala/com/twitter/cache/EvictingCacheTest.scala
Scala
apache-2.0
1,807
package scalafiddle.server.utils.auth import scalafiddle.shared.LoginProvider object AllLoginProviders { val providers: Map[String, LoginProvider] = Map( "github" -> LoginProvider("github", "GitHub", "/assets/images/providers/github.png") ) }
scalafiddle/scalafiddle-editor
server/src/main/scala/scalafiddle/server/utils/auth/AllLoginProviders.scala
Scala
apache-2.0
253
/* * Copyright 2015 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...
keithhall/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600j/v3/J5.scala
Scala
apache-2.0
1,080
package forms import models.{DestId, DestState, Destination} import play.api.data.Form import play.api.data.Forms._ import scalikejdbc.DBSession case class UpdateDestination( id: DestId, money: Option[Int], state: DestState, url: Option[String], message: Option[String]) { def update()(implicit s...
ponkotuy/ponkotuy-travel
app/forms/UpdateDestination.scala
Scala
apache-2.0
1,157
/* * 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 ...
ptkool/spark
mllib/src/test/scala/org/apache/spark/ml/feature/StringIndexerSuite.scala
Scala
apache-2.0
16,929
// Databricks notebook source // MAGIC %md // MAGIC ScaDaMaLe Course [site](https://lamastex.github.io/scalable-data-science/sds/3/x/) and [book](https://lamastex.github.io/ScaDaMaLe/index.html) // COMMAND ---------- // MAGIC %md // MAGIC # Interactive Exploration in Twitter as Graph, Network and Timeline // MAGIC /...
lamastex/scalable-data-science
_sds/3/x/db/000_3-sds-3-x-st/029_Viz_1_GraphNetworkTimeline.scala
Scala
unlicense
5,225
package com.blogspot.ramannanda.scala.algorithms.ds.balanced import scala.annotation.tailrec case class RedBlackTreeImpl[K](key: K)(implicit ev: Ordering[K]) { val nil: RBNode[K] = RBNode[K](null.asInstanceOf[K], false, nil, nil, nil) var rootNode: RBNode[K] = new RBNode[K](key, false, nil, nil, nil) def left...
ramannanda9/algorithms-in-scala
src/main/scala/com/blogspot/ramannanda/scala/algorithms/ds/balanced/RedBlackTree.scala
Scala
gpl-3.0
6,183
/*********************************************************************** * 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-process/geomesa-process-vector/src/main/scala/org/locationtech/geomesa/process/analytic/UniqueProcess.scala
Scala
apache-2.0
11,500
package TAPL2.FullError import TAPL2.Lib._ import TAPL2.FullSimple.TypeVar import TAPL2.Bot.Bot import TAPL2.TyArith.TypedBool case class TyVar(i: String) extends Ty case object TyTop extends Ty case object TyBot extends Ty case class TyArr(t1: Ty, t2: Ty) extends Ty case object TyBool extends Ty case class TmV...
hy-zhang/parser
Scala/Parser/src/TAPL2/FullError/FullError.scala
Scala
bsd-3-clause
1,461
/*********************************************************************** * 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-convert/geomesa-convert-text/src/main/scala/org/locationtech/geomesa/convert/text/DelimitedTextConverterFactory.scala
Scala
apache-2.0
7,615
import sbt._ import sbt.Keys._ import sbtrelease.ReleasePlugin.autoImport._ import sbtrelease.ReleaseStateTransformations._ object Release { val noPublishSettings: Seq[Def.Setting[_]] = Seq( crossScalaVersions := Nil, releaseProcess := Nil, publish / skip := true ) val publishSettings: Seq[Def.Setti...
allenai/datastore
project/Release.scala
Scala
apache-2.0
1,181
package org.ferrit.core.filter import org.scalatest.FlatSpec import org.scalatest.matchers.ShouldMatchers import org.ferrit.core.filter.FirstMatchUriFilter._ class TestFirstMatchUriFilter extends FlatSpec with ShouldMatchers { import UriFilter.implicitConvertStringToCrawlUri it should "disallow on empty rules ...
reggoodwin/ferrit
src/test/scala/org/ferrit/core/filter/TestFirstMatchUriFilter.scala
Scala
mit
5,770