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
object Test { def add2(x:Long,y:Long): Long = x + y def add[Long](x: List[Long], y: List[Long]): List[Long] = if (x.isEmpty || y.isEmpty) Nil else add2(x.head, y.head) :: add(x.tail, y.tail) }
yusuke2255/dotty
tests/untried/neg/typeerror.scala
Scala
bsd-3-clause
206
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author Vishnu Gowda Harish, John Miller, * @version 1.3 * @date Thu Dec 22 17:00:46 EST 2016 * @see LICENSE (MIT style license file). */ package apps.analytics import scalation.analytics.BASE_DIR import scalation.lina...
NBKlepp/fda
scalation_1.3/scalation_models/src/main/scala/apps/analytics/Census.scala
Scala
mit
3,677
package example.akkawschat.cli import akka.stream.stage.{ InHandler, GraphStageLogic, GraphStage } import akka.stream._ import akka.stream.scaladsl.{ GraphDSL, Source, Flow } import scala.collection.immutable import scala.concurrent.ExecutionContext /** Infrastructure for a small DSL that allows to write stateful co...
yukihirai0505/tutorial-program
programming/scala/websocket/cli/src/main/scala/example/akkawschat/cli/ConsoleDSL.scala
Scala
mit
5,365
// Copyright (C) 2011-2012 the original author or authors. // 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 License. // You ...
dwango/scalastyle
src/test/scala/org/scalastyle/scalariform/ScalaDocCheckerTest.scala
Scala
apache-2.0
9,529
/* * 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/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala
Scala
apache-2.0
31,906
package lmxml package shortcuts.html trait HtmlShortcuts extends LmxmlParsers { def docContent = """([^\\n]+)""".r ^^ { s => s } def doctype: Parser[TopLevel] = "!" ~> docContent ^^ { case content => TextNode("<!DOCTYPE %s>\\n".format(content), true, _) } def js: Parser[TopLevel] = "js" ~> inlineParams ^...
philcali/lmxml
html/src/main/scala/shortcuts.scala
Scala
mit
1,220
package org.velocity4s.log import org.apache.velocity.runtime.log.LogChute import org.jboss.logging.Logger import org.jboss.logging.Logger.Level import org.scalatest.FunSpec import org.scalatest.Matchers._ import org.scalatest.mock.MockitoSugar import org.mockito.Mockito._ import org.mockito.internal.util.reflection....
kazuhira-r/velocity4s
velocity4s/src/test/scala/org/velocity4s/log/JBossLoggingLogChuteSpec.scala
Scala
apache-2.0
5,072
package im.actor.server.push import scala.concurrent._ import akka.actor.ActorSystem import com.google.android.gcm.server.Message import slick.driver.PostgresDriver.api._ import im.actor.api.rpc.peers.Peer import im.actor.server.{ models, persist } // FIXME: #perf pinned dispatcher private[push] class GooglePusher(...
zillachan/actor-platform
actor-server/actor-cqrs/src/main/scala/im/actor/server/push/GooglePusher.scala
Scala
mit
2,973
/* * 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...
guozhangwang/kafka
core/src/main/scala/kafka/coordinator/transaction/TransactionLog.scala
Scala
apache-2.0
8,323
package com.toscaruntime.it.openstack.standalone import com.toscaruntime.it.AbstractSpec import com.toscaruntime.it.TestConstant._ import com.toscaruntime.it.steps.AgentsSteps._ import com.toscaruntime.it.steps.CsarsSteps._ import com.toscaruntime.it.steps.DeploymentsSteps._ import com.toscaruntime.it.util.URLChecker....
vuminhkh/tosca-runtime
test/src/it/scala/com/toscaruntime/it/openstack/standalone/AlienSpec.scala
Scala
mit
1,925
package utils import org.apache.spark.{SparkConf, SparkContext} /** * Created by jyothi on 11/12/16. */ @deprecated trait CassandraSparkContext { /** * * @param host hostName (optional if default host is used) * @return */ def getCassandraSparkContext(host: String = "127.0.0.1"): SparkContext...
arajajyothibabu/MongoDB-Cassandra-Migration
app/utils/CassandraSparkContext.scala
Scala
mit
822
package com.cloudray.scalapress.folder.widget import javax.persistence._ import org.hibernate.annotations._ import com.cloudray.scalapress.widgets.Widget import javax.persistence.Table import javax.persistence.Entity import scala.beans.BeanProperty import com.cloudray.scalapress.folder.Folder import com.cloudray.scala...
vidyacraghav/scalapress
src/main/scala/com/cloudray/scalapress/folder/widget/FoldersWidget.scala
Scala
apache-2.0
2,602
// // OrcTuple.scala -- Scala class OrcTuple // Project OrcScala // // $Id: OrcTuple.scala 2933 2011-12-15 16:26:02Z jthywissen $ // // Created by dkitchin on Jul 10, 2010. // // Copyright (c) 2011 The University of Texas at Austin. All rights reserved. // // Use and redistribution of this file is governed by the licen...
laurenyew/cOrcS
src/orc/values/OrcTuple.scala
Scala
bsd-3-clause
1,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 ...
alvsanand/spark-generic-connector
sgc-ftp/src/main/scala/es/alvsanand/sgc/ftp/secure/SFTPSgcConnectorFactory.scala
Scala
apache-2.0
1,880
package io.getquill.context.async.postgres import scala.concurrent.Future import scala.concurrent.ExecutionContext.Implicits.global import io.getquill.context.sql.ProductSpec import io.getquill.context.sql.Id class ProductPostgresAsyncSpec extends ProductSpec { val context = testContext import testContext._ ...
getquill/quill
quill-async-postgres/src/test/scala/io/getquill/context/async/postgres/ProductPostgresAsyncSpec.scala
Scala
apache-2.0
3,351
package org.jetbrains.plugins.scala.lang.psi.api.expr.xml import org.jetbrains.plugins.scala.lang.psi.ScalaPsiElement /** * @author Alexander Podkhalyuzin * Date: 21.04.2008 */ trait ScXmlCDSect extends ScalaPsiElement { }
gtache/intellij-lsp
intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/psi/api/expr/xml/ScXmlCDSect.scala
Scala
apache-2.0
226
package cwe.scala.library.visitor /** * Marks a class as beeing visitable, which signals that it accepts Visitors */ trait Visitable { /** * A host which is visitable should implement this method * It accepts a visitor, goes through the visit and returns the last intention of the visitor * to the caller in or...
wwwigii-system/research
cwe-scala-library/src/cwe/scala/library/visitor/Visitable.scala
Scala
gpl-3.0
387
/* * 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 ...
ZxlAaron/mypros
sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
Scala
apache-2.0
94,807
/* Copyright (C) 2008-2016 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
strubell/factorie
src/main/scala/cc/factorie/tutorial/NLP1.scala
Scala
apache-2.0
1,172
/* * 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/StubReporter.scala
Scala
apache-2.0
732
package com.avsystem.commons package annotation /** * Marker trait for annotations which don't want to be inherited by subtypes * of a sealed trait or class that has this annotation applied. Intended for annotations that should apply * only to the sealed trait itself. */ trait NotInheritedFromSealedTypes exten...
AVSystem/scala-commons
commons-core/src/main/scala/com/avsystem/commons/annotation/NotInheritedFromSealedTypes.scala
Scala
mit
340
import sbt.{ State => _, Configuration => _, Show => _, File => _, _ } import Keys._ import scalaz._ import Scalaz.{ state => _, _} import sbt.complete.DefaultParsers._ import sbt.complete._ import edu.gemini.osgi.tools.idea.{ IdeaModule, IdeaProject, IdeaProjectTask } import edu.gemini.osgi.tools.app.{ Application, Co...
arturog8m/ocs
project/OcsBundleSettings.scala
Scala
bsd-3-clause
9,638
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala.tools.nsc.classp...
martijnhoekstra/scala
src/compiler/scala/tools/nsc/classpath/ClassPath.scala
Scala
apache-2.0
2,854
/* * Copyright 2021 LINE Corporation * * LINE Corporation licenses this file to you 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 * * Unless r...
line/armeria
sangria/sangria_2.13/src/test/scala/com/linecorp/armeria/server/sangria/ServerSuite.scala
Scala
apache-2.0
2,280
package com.sksamuel.elastic4s.indexes.admin import com.sksamuel.exts.OptionImplicits._ trait IndexRecoveryApi { def recoverIndex(first: String, rest: String*): IndexRecoveryRequest = recoverIndex(first +: rest) def recoverIndex(indexes: Iterable[String]): IndexRecoveryRequest = IndexRecoveryRequest(indexes.to...
Tecsisa/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/indexes/admin/IndexRecoveryApi.scala
Scala
apache-2.0
700
package stasiak.karol.fimpp sealed trait Expr { def eval(context:Context):RuntimeValue } case object EmptyExpr extends Expr { def eval(context:Context) = RuntimeNull } case class NumberValue(value: Long) extends Expr { def eval(context:Context) = RuntimeNumber(value) } case class StringValue(value: String) exte...
KarolS/fimpp
src/stasiak/karol/fimpp/Expr.scala
Scala
gpl-3.0
3,518
/* * Copyright (c) 2017 Richard Hull * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publis...
rm-hull/byok3
web/src/main/scala/byok3/web/RestAPI.scala
Scala
mit
3,438
package scalautils import better.files.File._ import org.scalatest.{BeforeAndAfter, FlatSpec, Matchers} import scalautils.StringUtils.ImplStringUtils import scalautils.r._ class ShellTest extends FlatSpec with Matchers with BeforeAndAfter { val wd = (home / ".scalautils_test" / "r").createIfNotExists(asDirectory...
holgerbrandl/scalautils
src/test/scala/scalautils/ShellTest.scala
Scala
bsd-2-clause
964
/* * Copyright 2016 Carlo Micieli * * 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...
CarloMicieli/hascalator
core/src/test/scala/io/hascalator/tests/arbitrary/ArbitraryList.scala
Scala
apache-2.0
1,973
package org.firedancer3d.scenegraph.geometry class Disk { }
cyberthinkers/FireDancer3D
firedancer3d_shared/src/main/scala/org/firedancer3d/scenegraph/geometry/Disk.scala
Scala
mit
65
package com.ubeeko.htalk.hbase import com.ubeeko.exceptions.NotImplementedOperation import com.ubeeko.htalk.bytesconv._ import java.util.Date import java.io.IOException import org.apache.hadoop.conf.Configuration import org.apache.hadoop.hbase._ import org.apache.hadoop.hbase.client._ import org.apache.hadoop.hbase...
eric-leblouch/htalk
src/test/scala/com/ubeeko/htalk/hbase/TestHBaseManager.scala
Scala
apache-2.0
33,266
/** * Copyright 2014 Getty Imges, 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...
Tecsisa/akka-http-swagger
src/test/scala/com/tecsisa/akka/http/swagger/samples/Models.scala
Scala
apache-2.0
4,703
package org.jetbrains.plugins.scala.lang.psi.impl.expr import com.intellij.lang.ASTNode import com.intellij.psi.{PsiElement, PsiElementVisitor} import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes import org.jetbrains.plugins.scala.lang.psi.ScalaPsiElementImpl import org.jetbrains.plugins.scala.lang.psi.api.S...
gtache/intellij-lsp
intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/psi/impl/expr/ScCatchBlockImpl.scala
Scala
apache-2.0
1,286
package com.avsystem.commons package macros.misc import com.avsystem.commons.macros.AbstractMacroCommons import scala.collection.mutable import scala.collection.mutable.ListBuffer import scala.reflect.macros.{blackbox, whitebox} import scala.util.control.NoStackTrace final class MiscMacros(ctx: blackbox.Context) ext...
AVSystem/scala-commons
commons-macros/src/main/scala/com/avsystem/commons/macros/misc/MiscMacros.scala
Scala
mit
30,786
package com.datawizards.sparklocal.impl.scala.parallel.dataset import com.datawizards.sparklocal.dataset.{DataSetAPI, KeyValueGroupedDataSetAPI} import com.datawizards.sparklocal.impl.scala.`lazy`.dataset.DataSetAPIScalaLazyImpl import com.datawizards.sparklocal.impl.scala.dataset.DataSetAPIScalaBase import com.datawi...
piotr-kalanski/spark-local
src/main/scala/com/datawizards/sparklocal/impl/scala/parallel/dataset/DataSetAPIScalaParallelImpl.scala
Scala
apache-2.0
1,953
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.api.mvc.request import play.api.libs.typedmap.TypedKey import play.api.mvc.{ Cookies, Flash, Session } /** * Keys to request attributes. */ object RequestAttrKey { /** * The key for the request attribute storing a reques...
Shruti9520/playframework
framework/src/play/src/main/scala/play/api/mvc/request/RequestAttrKey.scala
Scala
apache-2.0
1,189
/* * 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/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CTESubstitution.scala
Scala
apache-2.0
8,007
/* * Copyright 2014 Lars Edenbrandt * * 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...
slicebox/slicebox
src/main/scala/se/nimsa/sbx/user/UserDAO.scala
Scala
apache-2.0
5,186
package util import org.eclipse.jgit.api.Git import org.eclipse.jgit.revwalk.RevWalk import org.eclipse.jgit.treewalk.TreeWalk import org.eclipse.jgit.transport.RefSpec /** * Provides control facilities. */ object ControlUtil { def defining[A, B](value: A)(f: A => B): B = f(value) def using[A <% { def close()...
loveshell/gitbucket
src/main/scala/util/ControlUtil.scala
Scala
apache-2.0
1,502
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
shaoxuan-wang/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/nodes/physical/batch/BatchExecLocalSortAggregate.scala
Scala
apache-2.0
5,417
/* * Copyright 2011-2018 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 applic...
wiacekm/gatling
gatling-recorder/src/test/scala/io/gatling/recorder/scenario/template/ExtractedUrisSpec.scala
Scala
apache-2.0
3,727
package cgta.ojs package lang import scala.scalajs.js ////////////////////////////////////////////////////////////// // Created by bjackman @ 12/11/13 12:17 AM ////////////////////////////////////////////////////////////// trait JsConsole extends js.Object { def log(xs : Any*) def error(xs : Any*) }
benjaminjackman/cgta-scala-js
src/main/scala/cgta/ojs/lang/JsConsole.scala
Scala
mit
310
package org.bitcoins.core.protocol.ln.currency import org.bitcoins.core._ import org.bitcoins.core.currency.{CurrencyUnit, Satoshis} import org.bitcoins.core.number.{BasicArithmetic, UInt64} import org.bitcoins.crypto.NetworkElement import scodec.bits.ByteVector import scala.math.BigDecimal.RoundingMode /** The comm...
bitcoin-s/bitcoin-s
core/src/main/scala/org/bitcoins/core/protocol/ln/currency/MilliSatoshis.scala
Scala
mit
3,713
package com.nabijaczleweli.fancymagicks.element.caster.forward import com.nabijaczleweli.fancymagicks.element.caster.NoElementCaster import com.nabijaczleweli.fancymagicks.element.elements.Element import com.nabijaczleweli.fancymagicks.util.EntityUtil import net.minecraft.entity.Entity class NoElementForwardCaster(wh...
nabijaczleweli/Magicks
src/main/scala/com/nabijaczleweli/fancymagicks/element/caster/forward/NoElementForwardCaster.scala
Scala
mit
583
/* * 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-reactive/shared/src/test/scala/monix/reactive/internal/subscribers/ObservableForeachSuite.scala
Scala
apache-2.0
2,066
/* * 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-tail/shared/src/main/scala/monix/tail/batches/GenericCursor.scala
Scala
apache-2.0
3,639
package org.libss.lift.list import org.libss.util.reflection.{FieldPath, FieldPathHelpers} /** * Created by Kaa * on 29.06.2016 at 00:28. */ /** * Base trait for Filtering descriptors: filtering form fields generating and values handling * * @tparam E Type of filtering object, corresponding to implementi...
kanischev/libss
libss-web/src/main/scala/org/libss/lift/list/FilteringDescriptor.scala
Scala
apache-2.0
913
/* * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH * under one or more contributor license agreements. See the NOTICE file * distributed with this work for additional information regarding copyright * ownership. Camunda licenses this file to you under the Apache License, * Version 2.0; y...
camunda/feel-scala
src/test/scala/org/camunda/feel/impl/builtin/BuiltinStringFunctionsTest.scala
Scala
apache-2.0
5,191
/* * Copyright (c) 2014 -2015 Contributor. All rights reserved. */ package org.scalaide.debug.internal.expression package proxies.phases import scala.reflect.runtime.universe import scala.tools.reflect.ToolBox /** * Implement all mock lambdas created during `MockTypedLambda` phase * * Transforms: * {{{ * lis...
Kwestor/scala-ide
org.scala-ide.sdt.debug.expression/src/org/scalaide/debug/internal/expression/proxies/phases/ImplementTypedLambda.scala
Scala
bsd-3-clause
1,148
package org.velocity4s.context import org.apache.velocity.context.Context trait ScalaContext extends Context { def keys: Iterable[String] def +=(elem: (String, AnyRef), elems: (String, AnyRef)*): this.type def ++=(elems: Iterable[(String, AnyRef)]): this.type def -=(key: String, keys: String*): this.type ...
kazuhira-r/velocity4s
velocity4s/src/main/scala/org/velocity4s/context/ScalaContext.scala
Scala
apache-2.0
367
/** * 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...
piavlo/operations-debs-kafka
core/src/main/scala/kafka/network/SocketServerStats.scala
Scala
apache-2.0
3,506
/* * 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 ...
akopich/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/encoders/RowEncoderSuite.scala
Scala
apache-2.0
12,912
package com.twitter.finagle.redis.filter import com.twitter.finagle.{Service, SimpleFilter} import com.twitter.finagle.redis.protocol.{Command, Reply} import com.twitter.finagle.redis.util.BufToString import com.twitter.finagle.tracing.{Annotation, Trace} import com.twitter.util.Future private[redis] class RedisTraci...
luciferous/finagle
finagle-redis/src/main/scala/com/twitter/finagle/redis/filter/RedisTracingFilter.scala
Scala
apache-2.0
743
package org.locationtech.geomesa.core.process.tube import java.util.Date import com.typesafe.scalalogging.slf4j.Logging import com.vividsolutions.jts.geom._ import org.geotools.data.Query import org.geotools.data.simple.{SimpleFeatureCollection, SimpleFeatureSource} import org.geotools.data.store.{EmptyFeatureCollect...
jwkessi/geomesa
geomesa-core/src/main/scala/org/locationtech/geomesa/core/process/tube/TubeSelectProcess.scala
Scala
apache-2.0
7,397
package com.github.mauricio.async.db.mysql.message.client import io.netty.buffer.ByteBuf case class SendLongDataMessage( statementId: Array[Byte], value: ByteBuf, paramId: Int )
dripower/postgresql-async
mysql-async/src/main/scala/com/github/mauricio/async/db/mysql/message/client/SendLongDataMessage.scala
Scala
apache-2.0
186
package de.frosner.broccoli.websocket import scala.concurrent.duration.Duration /** * Configuration for Broccoli's websocket * * @param cacheTimeout The timeout for the websocket message cache */ final case class WebSocketConfiguration(cacheTimeout: Duration)
FRosner/cluster-broccoli
server/src/main/scala/de/frosner/broccoli/websocket/WebSocketConfiguration.scala
Scala
apache-2.0
270
def problem1(limit: Int, factors: List[Int]): Int = { def cond(n: Int): Boolean = { factors.exists(x => n % x == 0}) } def allInts: Stream[Int] = { 1.until(limit).toStream } def onlyMults: Stream[Int] = { allInts.filter(cond) } onlyMults.sum }
ptwales/Project-Euler
Scala/problem01.scala
Scala
mit
276
sealed abstract class Z object Z { object Z0 extends Z case class Z1() extends Z object Z2 extends Z case class Z3() extends Z object Z4 extends Z case class Z5() extends Z object Z6 extends Z case class Z7() extends Z object Z8 extends Z case class Z...
som-snytt/dotty
tests/patmat/t6582_exhaust_big.scala
Scala
apache-2.0
858
package scalismo.mesh import scalismo.ScalismoTestSuite import scalismo.common.PointId import scalismo.geometry.{_3D, Point, Point3D} import scalismo.mesh.boundingSpheres.BoundingSphereHelpers import scalismo.utils.Random import vtk.{vtkTetra, vtkTriangle} class BarycentricCoordinateTests extends ScalismoTestSuite { ...
unibas-gravis/scalismo
src/test/scala/scalismo/mesh/BarycentricCoordinateTests.scala
Scala
apache-2.0
8,093
import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ import org.apache.spark.SparkConf import org.apache.spark.rdd.RDD object kmeans_1000g_against_ddd { def main(args: Array[String]) { val conf = new SparkConf().setAppName("K-Means (1000G against DDD)") val sc = new SparkContext(conf) ...
neurodev-thesis/notebooks
script examples/kmeans_1000g_against_ddd/src/main/scala/kmeans_1000g_against_ddd.scala
Scala
apache-2.0
4,205
package app import org.scalatra.servlet.ScalatraAsyncSupport import util._ import ControlUtil._ import Implicits._ import service._ import jp.sf.amateras.scalatra.forms._ class SearchController extends SearchControllerBase with RepositoryService with AccountService with ActivityService with RepositorySearchServic...
mqshen/gitbucket
src/main/scala/app/SearchController.scala
Scala
apache-2.0
1,740
// diversity-maximization: Diversity maximization in Streaming and MapReduce // Copyright (C) 2016 Matteo Ceccarello <ceccarel@dei.unipd.it> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation...
Cecca/diversity-maximization
experiments/src/main/scala/it/unipd/dei/diversity/MainPoints.scala
Scala
gpl-3.0
7,861
/* * 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/main/scala/org/scalatest/matchers/BePropertyMatcher.scala
Scala
apache-2.0
6,995
package com.eevolution.context.dictionary.domain.model import ai.x.play.json.Jsonx import com.eevolution.context.dictionary.api.{ActiveEnabled, DomainModel, Identifiable, Traceable} import org.joda.time.DateTime /** * Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com * This progra...
adempiere/ADReactiveSystem
dictionary-api/src/main/scala/com/eevolution/context/dictionary/domain/model/DesktopTrl.scala
Scala
gpl-3.0
3,217
package io.kaitai.struct.languages import io.kaitai.struct.datatype.DataType._ import io.kaitai.struct.datatype._ import io.kaitai.struct.exprlang.Ast import io.kaitai.struct.format._ import io.kaitai.struct.languages.components._ import io.kaitai.struct.translators.NimTranslator import io.kaitai.struct.{ClassTypeProv...
kaitai-io/kaitai_struct_compiler
shared/src/main/scala/io/kaitai/struct/languages/NimCompiler.scala
Scala
gpl-3.0
21,476
/* * La Trobe University - Distributed Deep Learning System * Copyright 2015 Matthias Langer (t3l@threelights.de) * * 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.apa...
bashimao/ltudl
demos/src/test/scala/edu/latrobe/blaze/TestUtils.scala
Scala
apache-2.0
1,477
/* 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...
tdyas/scalding
scalding-core/src/main/scala/com/twitter/scalding/RichPipe.scala
Scala
apache-2.0
27,767
package core import java.util.Properties import akka.event.Logging import org.apache.kafka.clients.producer.{KafkaProducer, ProducerConfig} import akka.actor._ import org.apache.kafka.clients.producer.{ProducerRecord,Callback,RecordMetadata} import domain.Tweet class ProducerActor extends Actor { val log = Logging(...
cesleem/iot-demo
twitter/src/main/scala/core/ProducerActor.scala
Scala
apache-2.0
1,236
import sbt._ import sbt.Keys._ object Common { val akkaV = "2.3.9" val dependencies = Seq( // "com.typesafe.akka" %% "akka-actor" % akkaV, // "com.typesafe.akka" %% "akka-testkit" % akkaV % "test", "org.apache.spark" %% "spark-core" % "1.5.1" % "provided", "comm...
PapaCharlie/TetrisBot
tetris/project/Common.scala
Scala
mit
1,461
/* * 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 ...
BryanCutler/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/HashedRelation.scala
Scala
apache-2.0
35,671
package codechicken.microblock import net.minecraft.item.crafting.IRecipe import net.minecraft.world.World import net.minecraft.inventory.InventoryCrafting import net.minecraft.item.ItemStack import codechicken.microblock.handler.MicroblockProxy._ import net.minecraftforge.oredict.RecipeSorter object MicroRecipe exte...
Chicken-Bones/ForgeMultipart
src/codechicken/microblock/MicroRecipe.scala
Scala
lgpl-2.1
7,891
package com.github.novamage.svalidator.binding.binders.typed import com.github.novamage.svalidator.binding.binders.{JsonTypedBinder, TypedBinder} import com.github.novamage.svalidator.binding.{BindingConfig, BindingFailure, BindingPass} import io.circe.Json import testUtils.Observes class StringBinderSpecs extends Ob...
NovaMage/SValidator
src/test/scala/com/github/novamage/svalidator/binding/binders/typed/StringBinderSpecs.scala
Scala
mit
6,239
package circumflex package orm import core._ import java.io.File import java.lang.reflect.Modifier import java.net.URL /*!# Exporting Database Schema The `DDLUnit` class provides API for creating and dropping database schema. It features arranging database objects in correct order (preliminary auxiliary objects, tab...
inca/circumflex
orm/src/main/scala/ddl.scala
Scala
bsd-2-clause
8,053
package com.verizon.bda.trapezium.dal.solr import com.verizon.bda.trapezium.dal.exceptions.SolrOpsException import org.apache.spark.SparkContext import scala.collection.mutable.ListBuffer class SolrOpsLocalApi(solrMap: Map[String, String], sparkContext: SparkContext) extends SolrOpsLocal(solrMap: Map[String, Strin...
Verizon/trapezium
dal/src/main/scala/com/verizon/bda/trapezium/dal/solr/SolrOpsLocalApi.scala
Scala
apache-2.0
1,226
package monocle.function object all extends GenericOptics trait GenericOptics extends AtFunctions with ConsFunctions with Cons1Functions with CurryFunctions with EachFunctions with EmptyFunctions with Field1Functions with Field2Functions with Field3Functions with Field4F...
NightRa/Monocle
core/src/main/scala/monocle/function/All.scala
Scala
mit
512
import scala.tools.partest._ import java.io._ import scala.tools.nsc._ import scala.tools.cmd.CommandLineParser import scala.tools.nsc.doc.{Settings, DocFactory} import scala.tools.nsc.reporters.ConsoleReporter object Test extends DirectTest { override def extraSettings: String = "-usejavacp -Xprint:parser -Yrangep...
felixmulder/scala
test/scaladoc/run/t5527.scala
Scala
bsd-3-clause
3,842
package info.raack.sailingcruisechecker import java.time.LocalDate import javax.annotation.PostConstruct import javax.inject.Inject import javax.inject.Named import org.log4s.getLogger // mark a class with @Named to create an instance of it in the object graph @Named // use @Inject() followed by constructor argument...
dinoboy197/sailing-cruise-watcher
src/main/scala/info/raack/sailingcruisechecker/SailingCruiseChecker.scala
Scala
agpl-3.0
1,134
/* * Copyright 2012-2020 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 ap...
planet42/Laika
core/shared/src/main/scala/laika/directive/std/ControlFlowDirectives.scala
Scala
apache-2.0
5,224
/* Copyright (C) 2008-2016 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
Craigacp/factorie
src/main/scala/cc/factorie/optimize/ConjugateGradient.scala
Scala
apache-2.0
4,604
package org.jetbrains.plugins.scala package lang package completion package handlers import com.intellij.codeInsight.completion.{InsertHandler, InsertionContext} import com.intellij.codeInsight.lookup.LookupElement import com.intellij.psi.util.PsiTreeUtil.getParentOfType import com.intellij.psi.{PsiClass, PsiDocumentM...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/completion/handlers/ScalaConstructorInsertHandler.scala
Scala
apache-2.0
6,482
package ru.pavkin.todoist.api.core.dto import java.util.UUID case class RawTempIdCommand[A](`type`: String, uuid: UUID, args: A, temp_id: UUID)
vpavkin/todoist-api-scala
core/src/main/scala/ru/pavkin/todoist/api/core/dto/RawTempIdCommand.scala
Scala
mit
146
package com.databricks.spark.sql.perf.mllib.feature import org.apache.spark.ml import org.apache.spark.ml.PipelineStage import org.apache.spark.sql.DataFrame import org.apache.spark.sql.functions.{col, split} import com.databricks.spark.sql.perf.mllib.{BenchmarkAlgorithm, MLBenchContext, TestFromTraining} import com....
wayblink/Naive
spark/spark-sql-perf-2.2/src/main/scala/com/databricks/spark/sql/perf/mllib/feature/Word2Vec.scala
Scala
mit
997
/* * 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/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
Scala
apache-2.0
48,044
package controllers import play.api._ import play.api.mvc._ import java.io.File import scala.io.Source import org.clapper.markwrap.MarkWrap import org.clapper.markwrap.MarkupType import java.text.SimpleDateFormat import java.text.DateFormat import java.util.Locale import scala.xml.Elem object Notes extends Controller...
fsteeg/appd
app/controllers/Notes.scala
Scala
epl-1.0
2,280
package com.github.uchibori3.mfcloud.invoice import akka.actor.ActorSystem import akka.stream.scaladsl.Flow import akka.http.scaladsl.Http import akka.http.scaladsl.model.{ HttpRequest, HttpResponse } import scala.concurrent.duration._ trait HttpClient { def connection(scheme: String, host: String, port: Int, time...
Uchibori3/mfcloud-invoice-scala
src/main/scala/com/github/uchibori3/mfcloud/invoice/HttpClient.scala
Scala
apache-2.0
1,345
package com.sksamuel.elastic4s.searches import org.elasticsearch.script.mustache.SearchTemplateResponse case class RichSearchTemplateResponse(original: SearchTemplateResponse) { def status = original.status() def hasResponse = original.hasResponse def response = RichSearchResponse(original.getResponse) }
FabienPennequin/elastic4s
elastic4s-tcp/src/main/scala/com/sksamuel/elastic4s/searches/RichSearchTemplateResponse.scala
Scala
apache-2.0
314
package io.iohk.ethereum.nodebuilder import java.lang.ProcessBuilder.Redirect import akka.actor.ActorSystem import io.iohk.ethereum.extvm.{ExtVMInterface, VmServerApp} import io.iohk.ethereum.ledger.Ledger.VMImpl import io.iohk.ethereum.utils.{BlockchainConfig, Logger, VmConfig} import io.iohk.ethereum.utils.VmConfig...
input-output-hk/etc-client
src/main/scala/io/iohk/ethereum/nodebuilder/VmSetup.scala
Scala
mit
2,335
/* * 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 ...
MLnick/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala
Scala
apache-2.0
20,382
/* * Copyright (c) 2012-2022 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.apach...
snowplow/scala-maxmind-iplookups
src/main/scala/com.snowplowanalytics.maxmind.iplookups/IpAddressResolver.scala
Scala
apache-2.0
1,758
package controllers import play.api._ import play.api.mvc._ import play.api.libs._ import play.api.libs.iteratee._ import play.api.libs.concurrent.Akka import akka.actor.Props import utils.{ CleanUpActor, CleanUp } import java.text.DecimalFormat import java.io.File import models.Dump import javax.inject.In...
alexanderfloh/dmpster
app/controllers/Admin.scala
Scala
mit
1,989
/* * 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...
liquidarmour/ct-calculations
src/main/scala/uk/gov/hmrc/ct/CATO20.scala
Scala
apache-2.0
1,515
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.server.tcp import akka.actor._ import akka.actor.{ ActorRef, Props, ActorLogging, Actor } import akka.io.Tcp import akka.util.ByteString import org.ensime.api.{ RpcReques...
espinhogr/ensime-server
server/src/main/scala/org/ensime/server/tcp/TCPConnectionActor.scala
Scala
gpl-3.0
3,499
/* sbt -- Simple Build Tool * Copyright 2010 Mark Harrah */ package sbt import Incomplete.{ Error, Value => IValue } /** * Describes why a task did not complete. * * @param node the task that did not complete that is described by this Incomplete instance * @param tpe whether the task was incomplete because of a...
jaceklaskowski/sbt
tasks/src/main/scala/sbt/Incomplete.scala
Scala
bsd-3-clause
2,660
/** * Copyright 2015 Adrian Hurtado (adrianhurt) * * 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...
mkurz/play-bootstrap3
core-play24/app/views/bs/package.scala
Scala
apache-2.0
10,432
/* * 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 o...
idkwim/scouter
scouter.server/src/scouter/server/tagcnt/first/WorkDB.scala
Scala
apache-2.0
1,131
/* * 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...
lhfei/spark-in-action
spark-2.x/src/main/scala/org/apache/spark/examples/ml/IndexToStringExample.scala
Scala
apache-2.0
2,472
/** * Copyright 2011-2016 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...
ryez/gatling
gatling-recorder/src/main/scala/io/gatling/recorder/http/handler/user/SslHandlerSetter.scala
Scala
apache-2.0
1,592
package org.bruchez.olivier.dsstoreremover import java.io.File import scala.annotation.tailrec object Files { def filesInDirectory(directory: File, recursive: Boolean, includeDirectories: Boolean): Seq[File] = { val (directories, files) = Option(directory.list...
obruchez/ds-store-remover
src/main/scala/org/bruchez/olivier/dsstoreremover/Files.scala
Scala
apache-2.0
1,529
package org.jetbrains.plugins.scala.extensions.implementation.iterator import com.intellij.psi.PsiElement /** * Pavel.Fatin, 09.05.2010 */ final class DepthFirstIterator(element: PsiElement, predicate: PsiElement => Boolean) extends Iterator[PsiElement] { private var stack: List[PsiElement] = if (element == ...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/extensions/implementation/iterator/DepthFirstIterator.scala
Scala
apache-2.0
794
/* * Copyright 2015 springml * * 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 ...
springml/spark-salesforce
src/test/scala/com/springml/spark/salesforce/TestUtils.scala
Scala
apache-2.0
5,296