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 sample.persistence import scala.concurrent.duration._ import akka.actor._ import akka.persistence._ object ViewExample extends App { class ExamplePersistentActor extends PersistentActor { override def persistenceId = "sample-id-4" var count = 1 def receiveCommand: Receive = { case paylo...
writeonly/scalaservices
akka-sample/src/main/scala/sample/persistence/ViewExample.scala
Scala
unlicense
1,891
/** * Copyright 2011-2017 GatlingCorp (http://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
timve/gatling
gatling-recorder/src/main/scala/io/gatling/recorder/http/model/SafeHttpResponse.scala
Scala
apache-2.0
1,839
class Bippo { def length: Int = 123 class Tree } package object p1 { class A implicit class B(val s: String) { def bippy = s } val c: Bippo = new Bippo type D = String } package object p2 { class A implicit class B(val s: String) { def bippy = s } val c: Bippo = new Bippo type D = Int } trait NoWa...
som-snytt/dotty
tests/untried/neg/warn-unused-imports.scala
Scala
apache-2.0
1,841
/** * Copyright (C) 2009-2011 the original author or authors. * See the notice.md file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
scalate/scalate
scalate-jersey/src/test/scala/org/fusesource/scalate/console/SourceLineTest.scala
Scala
apache-2.0
1,335
package org.http4s package server package middleware import java.nio.charset.StandardCharsets import org.http4s.server.middleware.EntityLimiter.EntityTooLarge import org.specs2.mutable.Specification import scodec.bits.ByteVector import scalaz.stream.Process.emit import Method._ import Status._ class EntityLimiterSpe...
hvesalai/http4s
server/src/test/scala/org/http4s/server/middleware/EntityLimiterSpec.scala
Scala
apache-2.0
1,479
package com.overviewdocs.query import scala.collection.immutable /** A way of searching for documents using a search index. * * This is modeled after ElasticSearch's (JSON) Query DSL. See * http://www.elastic.co/guide/en/elasticsearch/reference/1.x/query-dsl.html */ sealed trait Query { /** Returns an equiv...
overview/overview-server
common/src/main/scala/com/overviewdocs/query/Query.scala
Scala
agpl-3.0
2,556
package org.vertx.scala.router import java.io.FileNotFoundException import java.net.URLEncoder import org.vertx.scala.FutureOps import org.vertx.scala.core._ import org.vertx.scala.core.file.FileProps import org.vertx.scala.core.http.{HttpServerRequest, HttpServerResponse} import FutureOps._ import org.vertx.scala.ro...
galderz/mod-lang-scala
src/main/scala/org/vertx/scala/router/Router.scala
Scala
apache-2.0
7,488
import akka.http.scaladsl.model.ContentTypes.`application/json` import akka.http.scaladsl.model.StatusCodes import akka.http.scaladsl.server.Route import com.delprks.productservicesprototype.domain.Offer import com.delprks.productservicesprototype.domain.response.{ErrorResponse, Responses} import util.AbstractOffersSpe...
delprks/product-services-prototype
src/it/scala/MultipleOffersSpec.scala
Scala
mit
1,282
package edu.mit.csail.cap.query package analysis /** Query a trace for a feature from a demo trace */ sealed trait CallQuery extends Ordered[CallQuery] { /** Identifying, descriptive methods */ def methods: Set[Method] /** * Returns a stream of seed events for matches. * The first event in a match is the ...
kyessenov/semeru
src/main/scala/analysis/CallQuery.scala
Scala
gpl-3.0
8,394
/** Copyright 2014 TappingStone, 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 ...
TheDataShed/PredictionIO
core/src/main/scala/controller/IPersistentModel.scala
Scala
apache-2.0
4,716
package org.typeclassopedia package std import scala.{Conversion, None, Option, Some, StringContext} import org.typeclassopedia.extras.Show import scala.Predef.implicitly import java.lang.{IllegalArgumentException, String} object Options { extension[T](t: T) { def some: Option[T] = Some(t) } def none[T]: ...
channingwalton/typeclassopedia
src/main/scala/org/typeclassopedia/std/Options.scala
Scala
mit
3,183
package domain.logic import domain.models.{LunchProvider, LunchOffer} import org.joda.money.Money import java.time.LocalDate import org.scalamock.scalatest.MockFactory import org.scalatest._ class LunchResolverSaltNPepperSpec extends FlatSpec with Matchers with MockFactory { it should "resolve offers for week of ...
rori-dev/lunchbox
backend-play-akka-scala/test/domain/logic/LunchResolverSaltNPepperSpec.scala
Scala
mit
7,278
package db.migration.postgres import db.migration.{V1_030__SpillStateToDisk => V1_030__SpillStateToDiskDefinition} import slick.jdbc.{JdbcProfile, PostgresProfile} class V1_030__SpillStateToDisk extends V1_030__SpillStateToDiskDefinition { override protected lazy val profile: JdbcProfile = PostgresProfile }
TouK/nussknacker
ui/server/src/main/scala/db/migration/postgres/V1_030__SpillStateToDisk.scala
Scala
apache-2.0
312
package com.twitter.finagle.filter import com.twitter.conversions.DurationOps._ import com.twitter.finagle.Filter.TypeAgnostic import com.twitter.finagle._ import com.twitter.finagle.context.Contexts import com.twitter.finagle.filter.ServerAdmissionControl.ServerParams import com.twitter.finagle.server.StackServer imp...
twitter/finagle
finagle-core/src/test/scala/com/twitter/finagle/filter/ServerAdmissionControlTest.scala
Scala
apache-2.0
3,623
package scorex.lagonaki.unit import org.scalatest.{Matchers, FunSuite} import scorex.crypto.encode.Base58 import scorex.wallet.Wallet import scala.util.Random class WalletSpecification extends FunSuite with Matchers { private val walletSize = 10 val w = new Wallet(None, "cookies", Base58.decode("FQgbSAm6swGbtqA...
B83YPoj/Waves
src/test/scala/scorex/lagonaki/unit/WalletSpecification.scala
Scala
apache-2.0
1,822
package org.jetbrains.plugins.scala package annotator.createFromUsage import com.intellij.codeInsight.navigation.NavigationUtil import com.intellij.codeInsight.template.{TemplateBuilder, TemplateBuilderImpl, TemplateManager} import com.intellij.codeInsight.{CodeInsightUtilCore, FileModificationService} import com.inte...
advancedxy/intellij-scala
src/org/jetbrains/plugins/scala/annotator/createFromUsage/CreateTypeDefinitionQuickFix.scala
Scala
apache-2.0
9,418
// Copyright (c) 2014 David Miguel Antunes <davidmiguel {at} antunes.net> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the right...
david04/liftutils
src/main/scala/com/github/david04/liftutils/elem/GenericElem.scala
Scala
mit
8,130
package models import java.sql.Timestamp import java.util.UUID import javax.inject.Inject import com.fang.GamePlayJson import com.fang.game.Step import play.api.db.slick.{DatabaseConfigProvider, HasDatabaseConfigProvider} import slick.driver.JdbcProfile import scala.concurrent.{ExecutionContext, Future} import scala...
TianhaoFang/online-go
app/models/GamePlayDAO.scala
Scala
mit
3,298
/* * 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 ...
matthewfranglen/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
Scala
mit
68,320
/* * Copyright (c) 2014-2018 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...
Wogan/monix
monix-catnap/shared/src/test/scala/monix/catnap/SemaphoreSuite.scala
Scala
apache-2.0
8,915
object ch8_10 { import ch8.Gen case class SGen[A](forSize: Int => Gen[A]) //should be case class SGen[+A](forSize: Int => Gen[A]) but ''<console>:79: error: covariant type A occurs in invariant position in type => Int => ch8.Gen[A] of value forSize' occurs def unsized[A](g: Gen[A]): SGen[A] = SGen(_ => g) } impor...
rucka/fpinscala
src/main/scala/fpinscala/ch8/Exercise10.scala
Scala
gpl-2.0
565
// Copyright (C) 2014 Fehmi Can Saglam (@fehmicans) and contributors. // See the LICENCE.txt file distributed with this work for additional // information regarding copyright ownership. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the Licen...
fehmicansaglam/reactivemongo-extensions
json/src/test/scala/dao/PersonJsonDao.scala
Scala
apache-2.0
1,202
package com.monsanto.arch.kamon.prometheus.metric import com.monsanto.arch.kamon.prometheus.util.strictlyIncreasing /** Generic trait for all possible metric values. */ sealed trait MetricValue object MetricValue { /** Counters are represented as doubles, despite being integral. They must be non-negative. */ ca...
MonsantoCo/kamon-prometheus
library/src/main/scala/com/monsanto/arch/kamon/prometheus/metric/MetricValue.scala
Scala
bsd-3-clause
3,535
package org.sireum.pilarform.lexer import org.sireum.pilarform.lexer.CharConstants.SU import org.sireum.pilarform.util.Utils._ object UnicodeEscapeDecoder { /** * Decode unicode escapes of the form "\\u0061" in the given text. * If forgiveErrors is true, then no exception will be thrown on malformed escapes....
fgwei/pilarform
pilarform/src/main/scala/org/sireum/pilarform/lexer/UnicodeEscapeReader.scala
Scala
epl-1.0
4,258
/* * 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 ...
ConeyLiu/spark
core/src/test/scala/org/apache/spark/ThreadAudit.scala
Scala
apache-2.0
4,730
package mountainrangepvp.core import com.badlogic.gdx.math.{MathUtils, Vector2} /** * Holds the point the camera is centred on. */ case class Camera(centre: Vector2) { val RunningLookAhead = 170 val AimingLookAhead = 70 val VerticalShift = +50 def centreOn(player: PlayerEntity) = { val target = player....
thorinii/MountainRangePvP
src/main/scala/mountainrangepvp/core/Camera.scala
Scala
mit
667
package se.lu.nateko.cp.meta.onto.reasoner import scala.jdk.CollectionConverters.IteratorHasAsScala import org.semanticweb.owlapi.model.OWLClass import org.semanticweb.owlapi.model.OWLProperty import org.semanticweb.owlapi.model.OWLClassExpression import org.semanticweb.owlapi.model.OWLOntology import org.semanticweb....
ICOS-Carbon-Portal/meta
src/main/scala/se/lu/nateko/cp/meta/onto/reasoner/HermitBasedReasoner.scala
Scala
gpl-3.0
1,563
/* * Copyright 2014–2018 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...
jedesah/Quasar
rdbms/src/main/scala/quasar/physical/rdbms/Rdbms.scala
Scala
apache-2.0
5,122
package org.dele.text.maen.matchers import org.dele.text.maen.AtomPropMatcherLib._ import org.dele.text.maen.TestHelper._ import SubMatchCheckerLib._ import TMatcher._ import org.dele.text.maen.TInput import org.dele.text.maen.test.TestAtom._ import org.dele.text.maen.test.TestInput._ import org.scalatest._ import org...
new2scala/text-util
maen/src/test/scala/org/dele/text/maen/matchers/ANOBMatcherTest.scala
Scala
apache-2.0
2,265
/* * 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
app/models/responsiblepeople/ApprovalFlags.scala
Scala
apache-2.0
1,747
/* * Copyright (c) <2015-2016>, see CONTRIBUTORS * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list...
amanjpro/languages-a-la-carte
oberon0/src/main/scala/symbols/SymbolUtils.scala
Scala
bsd-3-clause
3,066
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
cran/rkafkajars
java/scala/Product20.scala
Scala
apache-2.0
3,072
/* * 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 ...
sahilTakiar/spark
mllib/src/test/scala/org/apache/spark/ml/optim/aggregator/HingeAggregatorSuite.scala
Scala
apache-2.0
6,603
package fringe import chisel3._ import chisel3.util._ /** * Counter: 1-dimensional counter. Counts upto 'max', each time incrementing * by 'stride', beginning at zero. * @param w: Word width */ class Counter(val w: Int) extends Module { val io = IO(new Bundle { val max = Input(UInt(w.W)) val stride...
stanford-ppl/spatial-lang
spatial/core/resources/chiselgen/template-level/fringeHW/Counter.scala
Scala
mit
2,583
/* * 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/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregates.scala
Scala
apache-2.0
24,166
/** * Copyright 2015 NICTA * * 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, ...
NICTA/javallier
examples/privateSum/src/main/scala/PrivateSum.scala
Scala
apache-2.0
1,290
/* * Copyright (c) 2016 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/kinesis-tee
src/main/scala/com/snowplowanalytics/kinesistee/routing/PointToPointRoute.scala
Scala
apache-2.0
1,482
package com.theiterators.scalaspray import akka.actor.{ActorSystem, Props} import akka.io.IO import spray.can.Http import com.typesafe.config.ConfigFactory object Boot extends App { val config = ConfigFactory.load() implicit val system = ActorSystem("on-spray-can") val service = system.actorOf(Props[DemoServi...
pjagielski/microservices-jvm
scala-spray-rest/src/main/scala/com/theiterators/scalaspray/Boot.scala
Scala
mit
463
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
kevinyu98/spark
sql/core/src/test/scala/org/apache/spark/sql/DataFrameAggregateSuite.scala
Scala
apache-2.0
33,269
package org.nexbook.fix import org.nexbook.app.OrderHandlersModule import org.slf4j.LoggerFactory import quickfix._ import quickfix.fix44.{NewOrderSingle, OrderCancelRequest} class FixMessageHandler(orderHandlersModule: OrderHandlersModule, fixOrderConverter: FixOrderConverter) extends Application { val logger = L...
milczarekIT/nexbook
src/main/scala/org/nexbook/fix/FixMessageHandler.scala
Scala
apache-2.0
2,292
package de.kalass.batchmonads.base /** * A very simply operation that simply returns the given value when executed in a batch. */ case class Return[A](private[base] result: A) extends Operation[A]
kkalass/BatchMonads
src/de/kalass/batchmonads/base/Return.scala
Scala
lgpl-3.0
201
object SearchComments /** * SearchComments */ object Main { /*caret*/SearchComments } /* object NameAfterRename /** * NameAfterRename */ object Main { /*caret*/NameAfterRename } */
triggerNZ/intellij-scala
testdata/rename/class/SearchComments.scala
Scala
apache-2.0
190
package org.emailscript.api import java.net.{ConnectException, URL} import java.time.Instant import java.time.format.DateTimeFormatter import java.util.Date import com.google.gson.Gson import org.emailscript.helpers.{Exporter, Importer, LoggerFactory} import uk.co.bigbeeconsultants.http.HttpClient import uk.co.bigbee...
OdysseusLevy/emailscript
src/main/scala/org/emailscript/api/Indexer.scala
Scala
lgpl-3.0
4,029
package mypkg object Container { class StringExtras(val s: String) extends AnyVal { def op(item: Int): Int = ??? } } trait Container { import Container.* implicit def mkStringExtras(s: String): StringExtras = new StringExtras(s) }
lampepfl/dotty
tests/pos/i6989/Container_1.scala
Scala
apache-2.0
244
package com.fh import javax.servlet.annotation.WebServlet import com.vaadin.annotations.{Theme, Title, VaadinServletConfiguration} import com.vaadin.server.{VaadinRequest, VaadinServlet} import com.vaadin.ui._ import org.slf4j.LoggerFactory /** * Servlet definition with annotations, so that we can avoid ...
fh137/ScalaVaadin
src/main/scala/com/fh/App.scala
Scala
mit
1,248
/* * Copyright (C) 2014 Ivan Cukic <ivan at mi.sanu.ac.rs> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version...
ivan-cukic/litef-conductor
src/main/scala/dataapi/DataspaceActor.scala
Scala
apache-2.0
9,323
import org.apache.log4j.{Level, Logger} import org.apache.spark.SparkContext import org.apache.spark.graphx.{Edge, Graph} import org.apache.spark.rdd.RDD /** * Created by xinghao on 3/13/15. */ object AuxiliaryFunctions { def setZeroDegreeToCenter(graph: Graph[Int, Int], zeroDegreeID: Int, centerID: Int): Graph[I...
anadim/clusterWild
src/main/scala/AuxiliaryFunctions.scala
Scala
apache-2.0
3,342
package bad.robot.temperature import bad.robot.temperature.rrd.{Host, Seconds} import org.specs2.matcher.DisjunctionMatchers._ import org.specs2.matcher.MatchResult import org.specs2.mutable.Specification import org.specs2.specification.AfterAll import scala.Double._ import scalaz.{\\/, \\/-} class ErrorOnTemperatur...
tobyweston/temperature-machine
src/test/scala/bad/robot/temperature/ErrorOnTemperatureSpikeTest.scala
Scala
apache-2.0
11,069
package com.arcusys.valamis.slide.service import com.arcusys.learn.liferay.LiferayClasses.LAssetEntry import com.arcusys.learn.liferay.services.{AssetEntryLocalServiceHelper, CompanyHelper} import com.arcusys.valamis.liferay.AssetHelper import com.arcusys.valamis.slide.model.SlideSet import com.arcusys.valamis.tag.mod...
arcusys/Valamis
valamis-slide/src/main/scala/com/arcusys/valamis/slide/service/SlideSetAssetHelperImpl.scala
Scala
gpl-3.0
2,181
/* Copyright (c) 2008, 2009 Hanno Braun <[email protected]> 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...
hannobraun/Kong
src/main/scala/com/hannobraun/kong/util/PiccoUtil.scala
Scala
apache-2.0
812
package nak.classify import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import breeze.linalg._ /** * * @author dlwh */ @RunWith(classOf[JUnitRunner]) class SMOTrainerTest extends ClassifierTrainerTestHarness with ContinuousTestHarness { def trainer[L,T]:Classifier.Trainer[L,Counter[T,Double...
scalanlp/nak
src/test/scala/nak/classify/SVMTrainerTest.scala
Scala
apache-2.0
377
package io.rout /** * Allows the creation of reusable validation rules for [[ReqRead]]s. */ object ValidationRule { /** * Implicit conversion that allows the same [[ValidationRule]] to be used for required * and optional values. If the optional value is non-empty, it gets validated (and validation may fail, ...
teodimoff/rOut
core/src/io/rout/ValidationRule.scala
Scala
apache-2.0
2,873
trait T[T] { def apply(x: Int): T } class C(val x: Int) extends AnyVal { override def toString = s"$x" } object Test { def main(args: Array[String]): Unit = { { val t: A[String] = s => s assert((t: A[_]).apply("there") == "there") } { var u = 0 val t: T[Unit] = x => u = x t....
lrytz/scala
test/files/run/t10334b/Test.scala
Scala
apache-2.0
445
package models case class Inspectee(uri: String)
ukwa/interject
interject-webapp/app/models/Inspectee.scala
Scala
apache-2.0
51
package com.telegram.api /** * Sticker * * This object represents a sticker. * * @param fileId Unique identifier for this file * @param width Sticker width * @param height Sticker height * @param thumb Optional. Sticker thumbnail in .webp or .jpg format * @param fileSize Optional. File...
rub0/tbot
src/main/scala/com/telegram/api/Sticker.scala
Scala
gpl-3.0
589
package edu.gemini.spModel.core import scalaz.{Order, Monoid, Show} /** * Offset in P. */ case class OffsetP(toAngle: Angle) extends AnyVal object OffsetP { val Zero = OffsetP(Angle.zero) implicit val IsoAngleP = new IsoAngle[OffsetP] { override def toDegrees(p: OffsetP): Double = Angle.signedDegrees(p....
arturog8m/ocs
bundle/edu.gemini.spModel.core/src/main/scala/edu/gemini/spModel/core/OffsetP.scala
Scala
bsd-3-clause
782
package streaming import java.io.File import org.apache.spark.streaming._ import org.apache.spark.{SparkConf, SparkContext} import scala.util.Random // // A utility for creating a sequence of files of integers in the file system // so that Spark can treat them like a stream. // class FileMaker { private val roo...
IMCG/https-github.com-spirom-LearningSpark
src/main/scala/streaming/FileBased.scala
Scala
mit
2,030
package io.plasmap.model case class OsmProperties( osmId: OsmId, user: Option[OsmUser] = None, version: OsmVersion ) { override def toString = StringBuilder.newBuilder.++=(osmId.toString).++=(user.getOrElse("unkno...
plasmap/geow
src/main/scala/io/plasmap/model/OsmProperties.scala
Scala
apache-2.0
370
package com.signalcollect.dcop.test import com.signalcollect.dcop.termination.ConvergenceHistory object ConvergenceHistoryTest extends App { val h : ConvergenceHistory[Int] = new ConvergenceHistory(3) h.push(5) h.push(12) h.push(3) h.push(45) println(h) println(h.isFull) h.push(10) ...
gmazlami/dcop-maxsum
src/main/scala/com/signalcollect/dcop/test/ConvergenceHistoryTest.scala
Scala
apache-2.0
334
package scuff import java.util.concurrent.{ Callable, Executor, ScheduledExecutorService } import scala.concurrent._ import scala.concurrent.duration.{ DurationInt, FiniteDuration } import scala.util.Try import scala.util.control.NoStackTrace import java.util.concurrent.ScheduledFuture import java.util.concurrent.Ti...
nilskp/scuff
src/main/scala/scuff/concurrent/package.scala
Scala
mit
7,275
package model.estate import model.Url import model.Id import model.Identifiable /** * Data object for storing all the estate related data */ case class Estate[+Domain] (override val id: Option[Id] = None, url: Url, address: Option[EstateAddress] = None, fee: Option[EstateFee] = None, basicInfo: Option[Esta...
tiborbotos/domino
domino-crawler/src/main/scala/model/estate/Estate.scala
Scala
lgpl-3.0
532
package vultura.factor /** An instance of this class represents a sum-product operation on some factors with. The only thing that may change * are the values of the involved factors. Using this class to represents a sp-operation allows for very fast * operation. * @see sumProduct * * @param remainingVars *...
ziggystar/vultura-factor
src/main/scala/vultura/factor/SumProductTask.scala
Scala
mit
4,523
package com.mesosphere.cosmos.http case class Authorization(token: String) { val headerValue: String = token }
movicha/cosmos
cosmos-server/src/main/scala/com/mesosphere/cosmos/http/Authorization.scala
Scala
apache-2.0
114
/** * 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...
sebadiaz/kafka
core/src/main/scala/kafka/tools/ConsoleConsumer.scala
Scala
apache-2.0
29,081
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * ...
adarro/ddo-calc
subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/effect/features/HitPointPercentFeature.scala
Scala
apache-2.0
4,081
/** * Copyright 2014 www.alaraph.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 required by ap...
maumorelli/alaraph
sudoku/src/main/scala/com/alaraph/sudoku/Sudoku.scala
Scala
apache-2.0
3,105
/* * 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/utils/tf/loaders/Rank.scala
Scala
apache-2.0
1,295
package org.scaladebugger.tool.backend.functions import com.sun.jdi.ThreadReference import org.scaladebugger.api.lowlevel.wrappers.Implicits._ import org.scaladebugger.tool.backend.StateManager import scala.collection.JavaConverters._ import scala.util.Try /** * Represents a collection of functions for managing thr...
ensime/scala-debugger
scala-debugger-tool/src/main/scala/org/scaladebugger/tool/backend/functions/ThreadGroupFunctions.scala
Scala
apache-2.0
1,991
/* * 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 ...
vjagadish/samza-clone
samza-core/src/main/scala/org/apache/samza/coordinator/server/JobServlet.scala
Scala
apache-2.0
1,577
package sangria.validation.rules import sangria.renderer.{SchemaRenderer, QueryRenderer} import sangria.validation.ValidationContext.isValidLiteralValue import sangria.validation.{BadValueViolation, ValidationContext, ValidationRule} import sangria.ast import sangria.ast.AstVisitorCommand._ /** * Argument values of ...
narahari92/sangria
src/main/scala/sangria/validation/rules/ArgumentsOfCorrectType.scala
Scala
apache-2.0
1,122
package setup import com.datastax.driver.core._ import com.datastax.driver.core.Cluster import scala.collection.JavaConversions._ object Setup { def runThenClose(f: => Unit) { val csc = new CassandraDataSetup("localhost") csc.populateTable() csc.querySchema try f finally csc.close } } class...
mkew/sparkdemo
src/main/scala/setup/CassandraDataSetup.scala
Scala
gpl-2.0
2,792
import util.control.Breaks._ import scala.collection.parallel._ class DynamicFind (arrCombo: Array[Int]) { private val arrLen = arrCombo.length def FindSubset: Unit = { var a: Int = 0 var b: Int = 0 for (i <- 0 to arrLen - 1){ if(arrCombo(i)>0) b += arrCombo(i) else a += arrCombo(...
matt-bentley/SubsetSumProcessor
SubsetSumProcessor/Scala/src/main/scala/DynamicFind.scala
Scala
gpl-3.0
2,227
package im.actor.server.mtproto.codecs import im.actor.server.mtproto.protocol._ import scodec.codecs._ package object protocol { val EncryptedPackageCodec = (int64 :: bytes).as[EncryptedPackage] val EncryptionCBCPackageCodec = (bytes :: bytes).as[EncryptionCBCPackage] val MessageAckCodec = longs.as[MessageAck...
actorapp/actor-platform
actor-server/actor-codecs/src/main/scala/im/actor/server/mtproto/codecs/protocol/package.scala
Scala
agpl-3.0
1,452
/* * Copyright 2016-2017 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...
uts-cic/tap
project/LocalSbtSettings.scala
Scala
apache-2.0
924
import shapeless._ import shapeless.syntax.singleton._ /** * This addresses: * FR-01: Dev shall be able to define a style that requires a specific configuration of children such that the * compiler will enforce that the children are styled. * * The most sensible way of doing this is to have a composite style ...
beni55/scalacss
misc/experiment/named_children.scala
Scala
apache-2.0
4,216
package com.github.btmorr.harmonia.models /* The Vowpal Wabbit implementation of SEARN search requires input in a particular format. This can be submitted * to a stationary vw model (executing vw in a subprocess with a pretrained model and the test flag, to keep the * model stationary, equivalent to `echo '| <tag> <...
btmorr/ideal-spork
mastermind/src/main/scala/com/github/btmorr/harmonia/models/SearnPredictor.scala
Scala
gpl-3.0
626
package client.rootmodel import shared.dtos.Introduction /** * Created by mandar.k on 7/19/2016. */ case class IntroRootModel(introResponse:Seq[Introduction]) { def updated(newIntroRes: Introduction) = { introResponse.indexWhere(_.connection.target == newIntroRes.connection.target) match { case -1 =>...
LivelyGig/ProductWebUI
client/src/main/scala/client/rootmodel/IntroRootModel.scala
Scala
apache-2.0
475
package cl.asa.result class Result(line:String = null) { var chunks: Seq[Chunk] = Seq.empty[Chunk] //文中の文節 var surface: String = line //文の表層 def addChunk(chunk: Chunk) { chunks = chunks :+ chunk } }
Takeuchi-Lab-LM/scala_asa3
ASA/src/main/scala/cl/asa/result/Result.scala
Scala
mit
224
package mobile.stream import monix.execution.Ack.Stop import monix.execution.{Ack, Cancelable} import monix.reactive.observers.Subscriber import monix.reactive.{Observable, OverflowStrategy} import org.scalajs.dom.raw.MessageEvent import org.scalajs.dom.{CloseEvent, ErrorEvent, Event, WebSocket} import scala.concurre...
monifu/monix-ionic-sample
app-js/src/main/scala/mobile/stream/SimpleWebSocketClient.scala
Scala
gpl-2.0
4,026
/* * 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...
Chasego/kafka
core/src/test/scala/kafka/raft/KafkaMetadataLogTest.scala
Scala
apache-2.0
23,383
/* * 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 ...
zouzias/spark-lucenerdd
src/main/scala/org/zouzias/spark/lucenerdd/config/Configurable.scala
Scala
apache-2.0
1,011
/* * Copyright 2009-2010 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 appl...
akisaarinen/ccf
ccf/src/main/scala/ccf/transport/MalformedDataException.scala
Scala
apache-2.0
704
package org.rebeam.boxes.persistence import org.rebeam.boxes.core._ import org.rebeam.boxes.persistence.formats._ import org.rebeam.boxes.persistence.json.JsonPrettyIO import org.rebeam.boxes.persistence.buffers._ import org.scalacheck.Arbitrary import org.scalatest._ import org.scalatest.prop.PropertyChecks import s...
trepidacious/boxes-core
src/test/scala/org/rebeam/boxes/persistence/PersistenceSpec.scala
Scala
gpl-2.0
773
/* * Copyright (c) 2013-2014 Telefónica Investigación y Desarrollo S.A.U. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unles...
telefonicaid/fiware-cosmos-platform
infinity/server/src/main/scala/es/tid/cosmos/infinity/server/actions/CreateDirectory.scala
Scala
apache-2.0
1,460
package qrygraph.shared.pig import prickle.{CompositePickler, Pickler} import qrygraph.shared.pig.Primitives._ /** the typing of a result a node creates */ case class ResultType(name: String, fields: List[PField]) /** represents a typed field as a data type like (username:chararray) */ case class PField(var name: St...
Starofall/QryGraph
qrygraph/shared/src/main/scala/qrygraph/shared/pig/PigDataTypes.scala
Scala
mit
1,932
package de.unihamburg.vsis.sddf.test.reading import org.scalatest.FunSuite import de.unihamburg.vsis.sddf.reading.SymPair import de.unihamburg.vsis.sddf.reading.Tuple import de.unihamburg.vsis.sddf.reading.TupleArray import de.unihamburg.vsis.sddf.test.util.LocalSparkContext class SymPairTest extends FunSuite with L...
numbnut/sddf
src/test/scala/de/unihamburg/vsis/sddf/test/reading/SymPairTest.scala
Scala
gpl-3.0
1,856
package org.jetbrains.plugins.scala package codeInsight.intention.booleans import com.intellij.psi.util.PsiTreeUtil import com.intellij.openapi.util.TextRange import com.intellij.codeInsight.intention.PsiElementBaseIntentionAction import com.intellij.openapi.project.Project import com.intellij.openapi.editor.Editor im...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/codeInsight/intention/booleans/ReplaceEqualsOrEqualityInInfixExprIntention.scala
Scala
apache-2.0
2,540
package org.apache.spark.sql.cassandra import java.net.InetAddress import java.sql.Timestamp import java.util.{UUID, Date} import java.math.BigInteger import org.apache.spark.sql.types.UTF8String import org.apache.spark.sql.types.Decimal import com.datastax.driver.core.{Row, ProtocolVersion} import com.datastax.spar...
viirya/spark-cassandra-connector
spark-cassandra-connector/src/main/scala/org/apache/spark/sql/cassandra/CassandraSQLRow.scala
Scala
apache-2.0
3,228
package cssprocessor import java.net.InetSocketAddress import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit import org.specs2.mutable.Specification import cats.effect.IO import fs2._ import spinoco.fs2.http import http._ import http.websocket._ import spinoco.protocol.http.header._ import spinoco...
scalavision/scunicorn
cssProcessing/src/test/scala/cssprocessor/CssProcessorSpec.scala
Scala
apache-2.0
2,050
package model.json /** * @author Camilo Sampedro <[email protected]> */ case class LaboratoryJson(name: String, location: Option[String], administration: Option[String])
ProjectAton/AtonLab
app/model/json/LaboratoryJson.scala
Scala
gpl-3.0
237
package net.fehmicansaglam.pide.examples import java.util.UUID import akka.util.Timeout import net.fehmicansaglam.bson.BsonDocument import net.fehmicansaglam.bson.BsonDsl._ import net.fehmicansaglam.pide.{Dao, Entity, StringPide} import net.fehmicansaglam.tepkin.{MongoClient, MongoCollection} import scala.concurrent...
fehmicansaglam/tepkin
examples/src/main/scala/net/fehmicansaglam/pide/examples/Example2.scala
Scala
apache-2.0
1,727
package org.phenoscape.owl.build import com.bigdata.journal.Options import com.bigdata.rdf.sail.{BigdataSail, BigdataSailRepository} import org.openrdf.query.QueryLanguage import java.io.{File, FileReader} import java.util.Properties import scala.io.Source object RunSPARQLUpdate extends App { val BlazegraphProper...
phenoscape/phenoscape-owl-tools
src/main/scala/org/phenoscape/owl/build/RunSPARQLUpdate.scala
Scala
mit
956
object Test { def f[X, Y](x: X, y: Y): Int = ??? f[Int, String](1, "") f[X = Int, Y = String](1, "") f[X = Int](1, "") f[Y = String](1, "") }
som-snytt/dotty
tests/pos/namedTypeParams.scala
Scala
apache-2.0
156
package com.kifi.franz import play.api.libs.iteratee.Enumerator import scala.concurrent.{ExecutionContext, Future, Promise} import scala.concurrent.duration.{FiniteDuration, SECONDS} import scala.collection.JavaConverters._ import scala.language.implicitConversions import com.amazonaws.services.sqs.AmazonSQSAsync imp...
kifi/franz
src/main/scala/com/kifi/franz/SQSQueue.scala
Scala
mit
9,781
package app import service.{AccountService, SystemSettingsService} import SystemSettingsService._ import util.AdminAuthenticator import jp.sf.amateras.scalatra.forms._ class SystemSettingsController extends SystemSettingsControllerBase with SystemSettingsService with AccountService with AdminAuthenticator trait Sy...
wangsicong/gitbucket
src/main/scala/app/SystemSettingsController.scala
Scala
apache-2.0
2,795
/* * Copyright 2001-2014 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...
cheeseng/scalatest
scalatest/src/main/scala/org/scalatest/fixture/FreeSpecLike.scala
Scala
apache-2.0
698
package vexriscv.experimental import spinal.core._ import spinal.lib.eda.bench.{AlteraStdTargets, Bench, Rtl, XilinxStdTargets} import spinal.lib.eda.icestorm.IcestormStdTargets import vexriscv.demo.{GenSmallestNoCsr, Murax, MuraxConfig} import vexriscv.plugin._ import vexriscv.{VexRiscv, VexRiscvConfig, plugin} /** ...
SpinalHDL/VexRiscv
src/test/scala/vexriscv/experimental/GenMicro.scala
Scala
mit
5,617
/* * 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...
wzhongyuan/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/SpatialFullConvolution.scala
Scala
apache-2.0
29,702
package oauthorize.test import org.specs2.mutable._ import org.specs2.runner._ import org.junit.runner._ import play.api.test._ import play.api.test.Helpers._ import play.api.libs.json._ import oauth2.spec.AccessTokenErrors._ import oauth2.spec.Req._ import oauth2.spec.GrantTypes import oauthorize.model._ import org.a...
adaptorel/oauthorize
oauthorize-play-sample/test/ClientCredentialsApplicationSpec.scala
Scala
apache-2.0
4,829
/* * 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...
pncampbell/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600a/v3/A20.scala
Scala
apache-2.0
1,374