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 example.project.main trait ClearingHouse case object LchScm extends ClearingHouse case object LchFcm extends ClearingHouse
agmenc/doc-jockey
src/test/scala/example/project/main/ClearingHouse.scala
Scala
mit
132
/** * Created by faganp on 3/19/15. */ import java.util.Calendar import com.typesafe.config.ConfigFactory //import org.apache.spark.sql.catalyst.types.{StringType, StructField, StructType} // spark 1.2 codeline //import java.util.Properties //import _root_.kafka.producer.Producer //import org.apache.spark.storag...
faganpe/KafkaStreamingPOC
src/main/scala/RandomNetflowGenBowen.scala
Scala
apache-2.0
20,572
package org.jetbrains.sbt.language.utils import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.project.Project import com.intellij.openapi.util.{Key, ModificationTracker} import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.codeInspection.collections.isSeq import org.j...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/sbt/language/utils/SbtScalacOptionUtils.scala
Scala
apache-2.0
9,282
package com.temportalist.href.client.gui import com.temportalist.href.common.inventory.ContainerTransmitter import com.temportalist.href.common.tile.TETransmitter import com.temportalist.origin.wrapper.client.gui.GuiContainerWrapper import net.minecraft.entity.player.EntityPlayer /** * * * @author TheTemportalist ...
TheTemportalist/href
src/main/scala/com/temportalist/href/client/gui/GuiTransmitter.scala
Scala
apache-2.0
460
package com.twitter.finagle import com.twitter.util.Var import java.net.InetSocketAddress import org.junit.runner.RunWith import org.scalatest.junit.{AssertionsForJUnit, JUnitRunner} import org.scalatest.FunSuite import scala.language.implicitConversions @RunWith(classOf[JUnitRunner]) class ServersetNamerTest exten...
liamstewart/finagle
finagle-serversets/src/test/scala/com/twitter/finagle/ServersetNamerTest.scala
Scala
apache-2.0
1,714
package core import ch.qos.logback.classic.Logger import com.martiansoftware.nailgun.NGContext import core.config._ import core.execution.{ExecutionHelper, Task, TaskExecutor} import core.execution.tasks._ import util.LazyNailLogging object Fsbt extends LazyNailLogging { def main(args: Array[String]): Unit = { ...
Humblehound/fsbt
server/src/main/scala/core/Fsbt.scala
Scala
mit
1,348
/** * Copyright (C) 2012-2013 Vadim Bartko ([email protected]). * * 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; either version 2 of the License, or * (at your option) any later ve...
hudvin/nomad
src/main/scala/com/nevilon/nomad/storage/graph/APIFacade.scala
Scala
gpl-2.0
2,839
package mesosphere.marathon.plugin /** * A [[https://mesosphere.github.io/marathon/docs/application-groups.html Marathon Application Group]] */ trait Group { def id: PathId def apps: Iterable[(PathId, RunSpec)] def groupsById: Iterable[(PathId, Group)] def dependencies: Iterable[PathId] }
timcharper/marathon
plugin-interface/src/main/scala/mesosphere/marathon/plugin/Group.scala
Scala
apache-2.0
303
package com.yahoo.scalops.dsl.actions /* * Copyright (c) 2012 Yahoo! Inc. All rights reserved. Licensed under the * Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 Un...
markusweimer/ScalOps
src/main/scala/com/yahoo/scalops/dsl/actions/CountAction.scala
Scala
apache-2.0
836
package org.automanlang.core.logging.tables import java.util.UUID import org.automanlang.core.scheduler.SchedulerState import org.automanlang.core.scheduler.SchedulerState.SchedulerState import scala.slick.driver.H2Driver.simple._ import java.util.Date object DBTaskHistory { val javaUtilDateMapper = MappedColum...
dbarowy/AutoMan
libautoman/src/main/scala/org/automanlang/core/logging/tables/DBTaskHistory.scala
Scala
gpl-2.0
1,041
/* Title: Pure/Tools/bibtex.scala Author: Makarius BibTeX support. */ package isabelle import scala.collection.mutable import scala.util.parsing.input.{Reader, CharSequenceReader} import scala.util.parsing.combinator.RegexParsers object Bibtex { /** content **/ private val months = List( "j...
wneuper/libisabelle
pide/2015/src/main/scala/Tools/bibtex.scala
Scala
mit
13,069
package ore.models.project import scala.collection.immutable import enumeratum.values._ sealed abstract class ReviewState(val value: Int, val apiName: String) extends IntEnumEntry { def isChecked: Boolean = this == ReviewState.Reviewed || this == ReviewState.PartiallyReviewed } object ReviewState extends IntEnum[...
SpongePowered/Ore
models/src/main/scala/ore/models/project/ReviewState.scala
Scala
mit
678
package net.usersource.twitpipe import org.apache.http.client.methods.HttpPost import org.apache.http.params.HttpConnectionParams import org.apache.http.impl.client.DefaultHttpClient import java.io.{InputStreamReader, BufferedReader} class TwitterEndpoint extends Endpoint with OAuth { def uri = "http://stream.twit...
glenford/TwitterPipeline
src/main/scala/net/usersource/twitpipe/TwitterEndpoint.scala
Scala
apache-2.0
1,073
package com.yannick_cw.elastic_indexer4s.elasticsearch.index_ops import cats.data.EitherT import cats.implicits._ import com.yannick_cw.elastic_indexer4s.Index_results.{IndexError, StageSucceeded} import com.yannick_cw.elastic_indexer4s.specs.AsyncSpec import scala.concurrent.Future class IndexDeletionSpec extends A...
yannick-cw/elastic-indexer4s
src/test/scala/com/yannick_cw/elastic_indexer4s/elasticsearch/index_ops/IndexDeletionSpec.scala
Scala
mit
3,915
package play.api.templates case class Html(string: String) { override def toString = string }
mslinn/PFView
src/test/scala/play/api/templates/Mocks.scala
Scala
mit
104
package com.github.alexanderscott.twitterstream.auth import javax.crypto import java.nio.charset.Charset import spray.http.{HttpEntity, MediaTypes, ContentType, HttpRequest} import spray.http.HttpHeaders.RawHeader import org.parboiled.common.Base64 import scala.collection.immutable.TreeMap import java.net.URLEncoder ...
alexanderscott/akka-twitter-streaming-cluster
src/main/scala/com/crunchdevelopment/twitterstreaming/auth/OAuth.scala
Scala
apache-2.0
3,016
trait Base { def getID: String } abstract class X extends Base { override def getID: String = "" private[this] def bar = { def foo = /*start*/true/*end*/ "" } } () //expected: <none>
triggerNZ/intellij-scala
testdata/typeInference/bugs4/SCL3178.scala
Scala
apache-2.0
200
import edu.uta.diql._ import org.apache.spark._ import org.apache.spark.rdd._ import org.apache.log4j._ import scala.util.Random object KMeans { def main ( args: Array[String] ) { val repeats = args(0).toInt val length = args(1).toLong val num_steps = 1 val conf = new SparkConf().setAppName("KMean...
fegaras/DIQL
benchmarks/diablo/kmeans.scala
Scala
apache-2.0
3,213
package net.spals.appbuilder.mapstore.mongodb import java.util.Optional import io.opentracing.mock.{MockSpan, MockTracer} import net.spals.appbuilder.mapstore.core.model.MapQueryOptions.defaultOptions import net.spals.appbuilder.mapstore.core.model.MultiValueMapRangeKey.in import net.spals.appbuilder.mapstore.core.mo...
spals/appbuilder
mapstore-mongodb-test/src/test/scala/net/spals/appbuilder/mapstore/mongodb/MongoDBMapStorePluginIT.scala
Scala
bsd-3-clause
11,893
/*********************************************************************** * Copyright (c) 2013-2017 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...
ronq/geomesa
geomesa-web/geomesa-web-data/src/main/scala/org/locationtech/geomesa/web/data/DataEndpoint.scala
Scala
apache-2.0
1,370
// UseALibrary.scala import com.yoururl.libraryname._ new X
P7h/ScalaPlayground
Atomic Scala/atomic-scala-examples/examples/17_Summary2/UseALibrary.scala
Scala
apache-2.0
60
package com.tysonjh import org.scalatest.FunSpec /** * Created by tysonjh on 2/7/2014. */ class TuplerSpec extends FunSpec { describe("a Tupler macro should") { it("make a tuple from a case class") { case class Cat(name: String, colour: String, age: Int) implicit val writes: Writes[Cat] = Tupler.t...
tysonjh/tupler
src/test/scala/com/tysonjh/TuplerSpec.scala
Scala
apache-2.0
524
/* 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/app/strings/PorterStemmer.scala
Scala
apache-2.0
5,964
package com.mesosphere.cosmos.model case class ListRequest( packageName: Option[String] = None, appId: Option[AppId] = None )
movicha/cosmos
cosmos-model/src/main/scala/com/mesosphere/cosmos/model/ListRequest.scala
Scala
apache-2.0
131
package com.themillhousegroup.edn.test import org.specs2.mutable.Specification trait StreamChecking { this: Specification => def valueStreamMustHave[T](stream: Stream[T], items: T*) = { val s = stream.toSeq s must haveSize(items.size) s must containTheSameElementsAs(items) } def keyStreamMustHa...
themillhousegroup/edn-scala
src/test/scala/com/themillhousegroup/edn/test/StreamChecking.scala
Scala
gpl-2.0
701
/* * slibexif - Scala library to parse JPEG EXIF data. * Copyright (C) Niklas Grossmann * * This file is part of libexif. * * slibexif is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser Public License as published by * the Free Software Foundation, either version 3 ...
ngrossmann/slibexif
src/main/scala/net/n12n/exif/TypedTag.scala
Scala
gpl-3.0
2,615
/* Copyright (C) 2008-2014 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...
hlin117/factorie
src/main/scala/cc/factorie/infer/Summary.scala
Scala
apache-2.0
8,721
package dotty.tools.dotc.config import PathResolver.Defaults class ScalaSettings extends Settings.SettingGroup { protected def defaultClasspath = sys.env.getOrElse("CLASSPATH", ".") /** Path related settings. */ val bootclasspath = PathSetting("-bootclasspath", "Override location of bootstrap class files."...
AlexSikia/dotty
src/dotty/tools/dotc/config/ScalaSettings.scala
Scala
bsd-3-clause
17,225
package scodec package codecs import scalaz.\\/ import scodec.bits.BitVector class FloatCodecTest extends CodecSuite { "the float codec" should { "roundtrip" in { forAll { (n: Float) => roundtrip(float, n) } } } "the floatL codec" should { "roundtrip" in { forAll { (n: Float) => roundtrip(floatL, n) } } } "th...
danielwegener/scodec
src/test/scala/scodec/codecs/FloatCodecTest.scala
Scala
bsd-3-clause
747
package mvp.volvo.tlv.tlv import java.nio.ByteBuffer import scala.collection.mutable.ArrayBuffer import TlvParser._ case class TlvParser(tag: Int, length: Int, value: Array[Byte], children: ArrayBuffer[TlvParser] = ArrayBuffer[TlvParser](), config: TlvConfig = TlvConfig()) {...
vaaction/tlv-parser
src/main/scala/mvp/volvo/tlv/tlv/TlvParser.scala
Scala
gpl-3.0
2,697
package com.textteaser.summarizer import opennlp.tools.sentdetect._ import com.google.inject.Inject import com.google.common.base.{CharMatcher, Splitter} import scala.collection.JavaConverters class Parser @Inject() (sentenceDetector: SentenceDetectorME, stopWordList: StopWords, config: Config) { val ideal = confi...
ahmadassaf/Text-Teaser
src/main/scala/com/textteaser/summarizer/Parser.scala
Scala
mit
2,210
/* * Copyright (C) 2015 Holmes Team at HUAWEI Noah's Ark Lab. * * 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...
gosubpl/akka-online
src/main/scala/org/apache/spark/streamdm/core/Model.scala
Scala
apache-2.0
1,065
package es.uvigo.ei.sing.sds package controller import play.api.libs.json.Json import play.api.libs.concurrent.Execution.Implicits.defaultContext import play.api.mvc._ import entity._ import database._ object KeywordsController extends Controller { lazy val keywordsDAO = new KeywordsDAO def get(id: Keyword.ID)...
agjacome/smart-drug-search
src/main/scala/controller/KeywordsController.scala
Scala
mit
493
/** * Copyright (C) 2019 Orbeon, Inc. * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. * * This p...
orbeon/orbeon-forms
common/shared/src/main/scala/org/orbeon/oxf/util/Modifier.scala
Scala
lgpl-2.1
1,500
/* * ProbEvidenceBeliefPropagation.scala * A belief propagation algorithm. * * Created By: Brian Ruttenberg ([email protected]) * Creation Date: Jan 15, 2015 * * Copyright 2013 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email [email protected] for information. * ...
jyuhuan/figaro
Figaro/src/main/scala/com/cra/figaro/algorithm/factored/beliefpropagation/ProbEvidenceBeliefPropagation.scala
Scala
bsd-3-clause
5,640
trait A { def p: Int def getP = p } trait B extends A { def p: Int = 22 } class C extends B { private def p: Int = 23 // error } @main def Test = C().getP // would crash with a duplicate method error if the private C#p was permitted
som-snytt/dotty
tests/neg/i7926c.scala
Scala
apache-2.0
246
package com.github.kczulko.isc.dhcp.model trait Item
kczulko/isc-dhcp-leases-parser
src/main/scala/com/github/kczulko/isc/dhcp/model/Item.scala
Scala
apache-2.0
54
package little_server object Main { def main(args:Array[String]){ AsyncServer().start(8091) //SyncServer().startHttpServer(8091) } }
deathnik/little_server
src/main/scala/little_server/Main.scala
Scala
gpl-3.0
147
package maliki.interface import upickle.default._ object Encode { def apply(n: Node): String = { write(List(n)) } def apply(c: Command): String = { write(List(c)) } def apply(cms: List[Command]): String = { write(cms) } } object DecodeCommands { def apply(s: String): List[Command] = { read[List[C...
jamesreinke/Lola-Beta
src/main/scala/interface/Pickle.scala
Scala
mit
422
package org.jetbrains.plugins.scala.lang.transformation package general import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.lang.psi.api.expr.ScTuple import org.jetbrains.plugins.scala.lang.psi.impl.ScalaCode._ import org.jetbrains.plugins.scala.project.ProjectContext /** * @author Pavel Fatin *...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/transformation/general/ExpandTupleInstantiation.scala
Scala
apache-2.0
591
package com.socrata.soql.brita @deprecated("Use AsciiIdentifierFilter instead", "1.1.0") object LegacyBrita { def apply(xs: Iterable[String]) = AsciiIdentifierFilter(xs) def apply(x: String) = AsciiIdentifierFilter(x) }
socrata-platform/soql-brita
src/main/scala/com/socrata/soql/brita/LegacyBrita.scala
Scala
apache-2.0
225
/* * sFOparserTest.scala * */ package at.logic.gapt.proofs.shlk import java.io.InputStreamReader import at.logic.gapt.formats.shlk_parsing.sFOParser import at.logic.gapt.expr._ import at.logic.gapt.expr.schema._ import at.logic.gapt.proofs.lk._ import org.specs2.execute.Success import org.specs2.mutable._ class ...
loewenheim/gapt
src/test/scala/at/logic/gapt/proofs/shlk/sFOparserTest.scala
Scala
gpl-3.0
3,001
package com.twitter.finagle.thrift import org.jboss.netty.buffer.ChannelBuffer import org.junit.runner.RunWith import org.mockito.Mockito._ import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner import org.scalatest.mock.MockitoSugar @RunWith(classOf[JUnitRunner]) class DuplexChannelBufferTransportTest ...
sveinnfannar/finagle
finagle-thrift/src/test/scala/com/twitter/finagle/thrift/DuplexChannelBufferTransportTest.scala
Scala
apache-2.0
1,207
// // $Id$ // // Wiggle - a 2D game development library - http://code.google.com/p/wiggle/ // Copyright 2008-2010 Michael Bayne // Distributed under the "Simplified BSD License" in LICENSE.txt package wiggle.gfx import org.lwjgl.opengl.GL11 import wiggle.util.Mutator /** * A visual element, something rendered to t...
zdevzee/wiggle
src/main/scala/wiggle/gfx/Element.scala
Scala
bsd-3-clause
2,863
// See LICENSE for license details. package sifive.blocks.devices.chiplink import Chisel.{defaultCompileOptions => _, _} import freechips.rocketchip.util.CompileOptions.NotStrictInferReset import freechips.rocketchip.tilelink._ class SinkE(info: ChipLinkInfo) extends Module { val io = new Bundle { val e = Decou...
sifive/sifive-blocks
src/main/scala/devices/chiplink/SinkE.scala
Scala
apache-2.0
955
/** * 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...
archieco/kafka
core/src/main/scala/kafka/tools/DumpLogSegments.scala
Scala
apache-2.0
8,207
package monocle.function import monocle.{Iso, Lens} import scala.annotation.implicitNotFound /** * Typeclass that defines a [[Lens]] from an `S` to its fourth element of type `A` * @tparam S source of [[Lens]] * @tparam A target of [[Lens]], `A` is supposed to be unique for a given `S` */ @implicitNotFound("Coul...
rperry/Monocle
core/shared/src/main/scala/monocle/function/Field4.scala
Scala
mit
1,814
/* * 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 ...
eBay/Eagle
eagle-core/eagle-data-process/eagle-stream-process-base/src/main/scala/org/apache/eagle/datastream/StormStreamExecutor.scala
Scala
apache-2.0
2,436
package stdlib /* If this is taking too much time, then it should be replaced * by a compile time map. */ import byteR._ import exceptions.ICE import frontend.ASTType object StandardLibraries { val packages: List[LibraryPackage] = List( STDMath, STDReal, STDTime, STDTimer) def apply(names: List[St...
j-c-w/mlc
src/main/scala/stdlib/StandardLibraries.scala
Scala
gpl-3.0
1,523
package lila.round import akka.actor._ import lila.hub.actorApi.game.ChangeFeatured import lila.hub.actorApi.round.MoveEvent import lila.socket.Socket.makeMessage import play.api.libs.iteratee._ import play.api.libs.json._ private final class TvBroadcast extends Actor { context.system.lilaBus.subscribe(self, 'move...
bjhaid/lila
modules/round/src/main/TvBroadcast.scala
Scala
mit
979
/* * Twitter Korean Text - Scala library to process Korean text * * Copyright 2015 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/...
nlpenguin/twitter-korean-text
src/main/scala/com/twitter/penguin/korean/tokenizer/ParsedChunk.scala
Scala
apache-2.0
3,726
/* ************************************************************************************* * Copyright 2013 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
Kegeruneku/rudder
rudder-core/src/main/scala/com/normation/rudder/batch/AbstractScheduler.scala
Scala
agpl-3.0
8,864
package org.hibernate.cache.rediscala.utils import java.util.Properties import org.hibernate.SessionFactory import org.hibernate.cache.rediscala.client.HibernateRedisCache import org.hibernate.cfg.AvailableSettings import org.hibernate.internal.SessionFactoryImpl import org.slf4j.LoggerFactory import redis.RedisClient...
debop/hibernate-rediscala
src/main/scala/org/hibernate/cache/rediscala/utils/HibernateRedisUtil.scala
Scala
apache-2.0
3,739
/* * 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 ...
Mega-DatA-Lab/mxnet
scala-package/core/src/main/scala/ml/dmlc/mxnet/Context.scala
Scala
apache-2.0
2,463
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j 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 Foundatio...
HuangLS/neo4j
community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/spi/v2_3/TransactionBoundTokenContext.scala
Scala
apache-2.0
3,127
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ // this is copy/pasted from https://github.com/akka/akka/blob/5576c233d063b3ee4cfc05d8e73c614a3dea478d/project/CrossJava.scalas package playbuild import java.io.File import scala.annotation.tailrec import scala.collection.immutable.ListMap import s...
marcospereira/playframework
documentation/project/CrossJava.scala
Scala
apache-2.0
6,913
/* * ScalaRay - Ray tracer based on pbrt (see http://pbrt.org) written in Scala * Copyright (C) 2009, 2010, 2011 Jesper de Jong * * 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, either ve...
jesperdj/scalaray
src/main/scala/org/jesperdj/scalaray/scene/TransformedPrimitive.scala
Scala
gpl-3.0
1,932
/* Copyright 2009-2016 EPFL, Lausanne */ import leon.annotation._ import leon.lang._ object Heaps { /*~~~~~~~~~~~~~~~~~~~~~~~*/ /* Data type definitions */ /*~~~~~~~~~~~~~~~~~~~~~~~*/ private case class Node(rank : BigInt, elem : Int, nodes : Heap) sealed abstract class Heap private case class Nodes(h...
epfl-lara/leon
src/test/resources/regression/verification/purescala/valid/Heaps.scala
Scala
gpl-3.0
4,215
package looty package model ////////////////////////////////////////////////////////////// // Copyright (c) 2013 Ben Jackman, Jeff Gomberg // All Rights Reserved // please contact [email protected] or [email protected] // for licensing inquiries // Created by bjackman @ 12/14/13 1:04 PM /////////////////////////////...
benjaminjackman/looty
looty/src/main/scala/looty/model/Elements.scala
Scala
gpl-2.0
2,326
import scala.tools.nsc._ import scala.tools.nsc.interpreter.shell.ReplReporterImpl import scala.tools.partest.ReplTest object Test extends ReplTest { override def extraSettings = "-deprecation" def code = """ // basics 3+4 def gcd(x: Int, y: Int): Int = { if (x == 0) y else if (y == 0) x ...
lrytz/scala
test/files/jvm/interpreter.scala
Scala
apache-2.0
3,034
/* * 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 ...
chenc10/Spark-PAF
streaming/src/main/scala/org/apache/spark/streaming/dstream/UnionDStream.scala
Scala
apache-2.0
2,045
/* * Copyright (c) 2014 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...
TimothyKlim/snowplow
3-enrich/scala-common-enrich/src/main/scala/com.snowplowanalytics.snowplow.enrich/common/enrichments/registry/RefererParserEnrichment.scala
Scala
apache-2.0
3,527
/* * 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
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcDeserializer.scala
Scala
apache-2.0
10,439
// Generated by <a href="http://scalaxb.org/">scalaxb</a>. package eveapi.xml.account.char.Skills import scala.concurrent.Future /** usage: val obj = scalaxb.fromXML[eveapi.xml.account.char.Skills.Foo](node) val document = scalaxb.toXML[eveapi.xml.account.char.Skills.Foo](obj, "foo", eveapi.xml.account.char.Skills.d...
scala-eveapi/eveapi
xml/src/main/scala/eveapi/xml/char/Skills/xmlprotocol.scala
Scala
mit
8,732
package fpinscala.laziness import org.scalatest.{FunSpec, MustMatchers} class StreamTest extends FunSpec with MustMatchers { describe("toList") { it("returns non-empty list") { Stream(1, 2, 3, 4).toList mustBe List(1, 2, 3, 4) } it("returns empty list") { Stream().toList mustBe Nil } ...
Unisay/fpinscala
exercises/src/test/scala/fpinscala/laziness/StreamTest.scala
Scala
mit
7,734
/* * Copyright 2018 Analytics Zoo 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...
intel-analytics/analytics-zoo
zoo/src/main/scala/com/intel/analytics/zoo/pipeline/inference/FloatModel.scala
Scala
apache-2.0
3,083
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.indexer.lucene import org.apache.lucene.document.{ Document, StringField } import org.apache.lucene.document.Field.Store import org.apache.lucene.index.Term import org.apa...
VlachJosef/ensime-server
core/src/main/scala/org/ensime/indexer/lucene/Serializer.scala
Scala
gpl-3.0
1,346
package scryetek import org.scalacheck.Arbitrary._ import org.scalacheck.Arbitrary import org.scalacheck.Gen /** * Created by Matt on 01/11/2015. */ package object vecmath { implicit val arbitraryVec3 = Arbitrary(for { x <- Gen.choose(-100f, 100f) y <- Gen.choose(-100f, 100f) z <- Gen.choose(-100f, 100...
mseddon/vecmath
shared/src/test/scala/scryetek/vecmath/package.scala
Scala
bsd-3-clause
3,002
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/amls-frontend
test/models/responsiblepeople/PositionInBusinessSpec.scala
Scala
apache-2.0
7,484
package de.lenabrueder.rfc6902 import de.lenabrueder.UnitSpec import play.api.libs.json._ class JsonPatchOverlayOpSpec extends UnitSpec { val overlayOp = "overlay" val json = Json.parse("""{"a":"b", "b":{"c":"d"}, "c":1}""") "JsPatchOverlayOp" should { "correctly add flat elements to a sub-path" in { ...
lenalebt/play-rfc6902
src/test/scala/de/lenabrueder/rfc6902/JsonPatchOverlayOpSpec.scala
Scala
lgpl-3.0
2,282
package infrastructure.view import scala.slick.driver.JdbcProfile trait Profile { val profile: JdbcProfile }
pawelkaczor/ddd-leaven-akka
src/main/scala/infrastructure/view/Profile.scala
Scala
mit
113
package scdbpf import scala.collection.immutable._ import Sc4Path._ import DbpfUtil._ trait Sc4Path extends DbpfType { def terrainVariance: Boolean def paths: Seq[Path] def stopPaths: Seq[StopPath] def copy( terrainVariance: Boolean = terrainVariance, paths: Seq[Path] = paths, stopPaths: Seq[Stop...
memo33/scdbpf
src/main/scala/scdbpf/Sc4Path.scala
Scala
mit
8,540
/* * SelectionTruncationImpl.scala * (Muta) * * Copyright (c) 2013-2014 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU Lesser General Public License v3+ * * * For further information, please contact Hanns Holger Rutz at * [email protected] */ package de.sciss.muta pac...
Sciss/Muta
src/main/scala/de/sciss/muta/impl/SelectionTruncationImpl.scala
Scala
lgpl-3.0
721
package com.wavesplatform.transaction.serialization.impl import java.nio.ByteBuffer import com.google.common.primitives.{Bytes, Longs} import com.wavesplatform.account.AddressScheme import com.wavesplatform.serialization.{ByteBufferOps, Deser} import com.wavesplatform.transaction.TxVersion import com.wavesplatform.tr...
wavesplatform/Waves
node/src/main/scala/com/wavesplatform/transaction/serialization/impl/SetAssetScriptTxSerializer.scala
Scala
mit
2,205
package org.jetbrains.plugins.scala package lang package psi package impl package statements import com.intellij.lang.ASTNode import com.intellij.psi.PsiElementVisitor import org.jetbrains.plugins.scala.lang.parser.ScalaElementTypes import org.jetbrains.plugins.scala.lang.psi.api.ScalaElementVisitor import org.jetbrai...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/statements/ScVariableDeclarationImpl.scala
Scala
apache-2.0
1,802
package org.scaladebugger.api.profiles.java.info.events import com.sun.jdi.event._ import com.sun.jdi.{ReferenceType, ThreadReference, VirtualMachine} import org.scaladebugger.api.lowlevel.events.JDIEventArgument import org.scaladebugger.api.lowlevel.requests.JDIRequestArgument import org.scaladebugger.api.profiles.tr...
ensime/scala-debugger
scala-debugger-api/src/test/scala/org/scaladebugger/api/profiles/java/info/events/JavaVMDisconnectEventInfoSpec.scala
Scala
apache-2.0
2,819
package slick.compiler import slick.util.{ConstArrayOp, ConstArray} import slick.{SlickTreeException, SlickException} import slick.ast._ import Util._ import TypeUtil._ import scala.collection.mutable /** Expand sum types and their catamorphisms to equivalent product type operations. */ class ExpandSums extends Phas...
slick/slick
slick/src/main/scala/slick/compiler/ExpandSums.scala
Scala
bsd-2-clause
15,523
package ch.uzh.cl.slmlib.ngrams.statistics import ch.uzh.cl.slmlib.ngrams.{NGram, NGramFilter} import org.apache.spark.rdd.RDD import org.apache.spark.SparkContext._ import scala.collection.mutable.HashMap import scala.reflect.ClassTag /** * N-Gram collections with corresponding statistics (frequencies or probabilit...
michtek/SLMLib
src/main/scala/ch/uzh/cl/slmlib/ngrams/statistics/RangeOrderStatistics.scala
Scala
apache-2.0
3,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 ...
style95/openwhisk
core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerPool.scala
Scala
apache-2.0
32,684
package org.dama.datasynth.lang import net.liftweb.json._ import org.dama.datasynth.LoadPropertyTables import org.dama.datasynth.executionplan.ExecutionPlan._ import org.dama.datasynth.schema.Schema import scala.reflect.runtime.universe._ import scala.collection.mutable /** * Created by joangui on 13/04/2017. * R...
DAMA-UPC/DataSynth
src/main/scala/org/dama/datasynth/lang/ReadExecutionPlan.scala
Scala
gpl-3.0
2,211
/* * 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 ...
ArvinDevel/onlineAggregationOnSparkV2
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/ConcurrentHiveSuite.scala
Scala
apache-2.0
1,488
package org.rz.akkagraphite.actors import java.net.InetSocketAddress import akka.actor.{ActorLogging, ActorRef, ActorSystem, FSM, Props, RootActorPath} import akka.cluster.ClusterEvent.{CurrentClusterState, MemberUp} import akka.cluster.{Cluster, Member, MemberStatus} import akka.io.{IO, Tcp} import akka.util.ByteStr...
rozasdev/AkkaGraphite
src/main/scala/org/rz/akkagraphite/actors/GraphiteRelayer.scala
Scala
apache-2.0
5,145
package concurrent_programming.monitors.semaphores import io.threadcso.locks.Lock import io.threadcso.semaphore.{BooleanSemaphore, Flag} class FCFSLock extends Lock{ private var locked = false private val mutex = new BooleanSemaphore(available = true) private val queue = scala.collection.mutable.Queue[Flag]() ...
AlexandruValeanu/Concurrent-Programming-in-Scala
src/concurrent_programming/monitors/semaphores/FCFSLock.scala
Scala
gpl-3.0
780
/* * 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 ...
chayapan/montecarlorisk
src/main/scala/com/cloudera/datascience/montecarlorisk/KernelDensity.scala
Scala
apache-2.0
2,298
package com.thangiee.lolhangouts.ui.profile import android.content.Context import android.support.v4.view.ViewPager.SimpleOnPageChangeListener import android.support.v4.view.{PagerAdapter, ViewPager} import android.view._ import android.widget.FrameLayout import com.afollestad.materialdialogs.MaterialDialog import com...
Thangiee/LoL-Hangouts
src/com/thangiee/lolhangouts/ui/profile/ProfileContainer.scala
Scala
apache-2.0
5,091
/* NSC -- new Scala compiler * Copyright 2005-2013 LAMP/EPFL * @author Martin Odersky */ package dotty.tools package dotc import core.Contexts.Context import reporting.Reporter /* To do: * - simplify hk types * - have a second look at normalization (leave at method types if pt is method type?) * - Don't ...
magarciaEPFL/dotty
src/dotty/tools/dotc/Bench.scala
Scala
bsd-3-clause
2,013
package agilesitesng.wem.model //package com.github.marklister.base64 import scala.collection.immutable.HashMap /** * Base64 encoder * @author Mark Lister * This software is distributed under the 2-Clause BSD license. See the * LICENSE file in the root of the repository. * * Copyright (c) 2014 - 2015 Mark Liste...
agilesites/agilesites2-build
src/main/scala/agilesitesng/wem/model/Base64.scala
Scala
mit
2,301
/* * 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...
yiheng/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/Identity.scala
Scala
apache-2.0
1,480
package com.typesafe.sbt package packager import sbt._ /** * General purpose keys for the native packager */ trait NativePackagerKeys { val packageName = SettingKey[String]("packageName", "Name of the created output package. Used for dirs/scripts.") val packageSummary = SettingKey[String]("package-summary", ...
kodemaniak/sbt-native-packager
src/main/scala/com/typesafe/sbt/packager/Keys.scala
Scala
bsd-2-clause
1,558
package scala_pastebin import scala.reflect.runtime.universe._ import scala.reflect.runtime.currentMirror /** * @author humberto * http://stackoverflow.com/questions/12797300/in-scala-how-to-turn-objects-values-into-mapstring-string */ object ObjectToMap { def apply(obj: AnyRef) = { val r = currentMirror.ref...
humbhenri/scala_pastebin
src/main/scala/scala_pastebin/ObjectToMap.scala
Scala
unlicense
529
package scwebapp import java.nio.charset.Charset import scutil.core.implicits.* import scutil.lang.* import scutil.codec.* import scwebapp.factory.mimeType import scwebapp.header.* import scwebapp.data.* import scwebapp.format.* trait HttpRequest { //----------------------------------------------------------------...
ritschwumm/scwebapp
modules/core/src/main/scala/scwebapp/HttpRequest.scala
Scala
bsd-2-clause
3,476
/* * 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 ...
ueshin/apache-spark
sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/GenerateColumnAccessor.scala
Scala
apache-2.0
10,108
/* * 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/main/scala/uk/gov/hmrc/ct/ct600a/v2/LPQ06.scala
Scala
apache-2.0
874
/* * La Trobe University - Distributed Deep Learning System * Copyright 2016 Matthias Langer ([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.apa...
bashimao/ltudl
blaze/src/main/scala/edu/latrobe/blaze/modules/jvm/MeanPooling_JVM.scala
Scala
apache-2.0
3,902
package com.microsoft.awt.data import org.scalajs.nodejs.mongodb.{Db, _} import scala.concurrent.ExecutionContext import scala.scalajs.js /** * Session DAO * @author [email protected] */ @js.native trait SessionDAO extends Collection /** * Session DAO Companion * @author [email protected]...
ldaniels528/awt
app-nodejs/src/main/scala/com/microsoft/awt/data/SessionDAO.scala
Scala
apache-2.0
1,106
package sttp.client3.testing.streaming import org.scalatest.BeforeAndAfterAll import org.scalatest.freespec.AsyncFreeSpec import org.scalatest.matchers.should.Matchers import sttp.capabilities.Streams import sttp.client3._ import sttp.client3.internal.Utf8 import sttp.client3.testing.HttpTest.endpoint import sttp.clie...
softwaremill/sttp
core/src/test/scala/sttp/client3/testing/streaming/StreamingTest.scala
Scala
apache-2.0
6,811
package com.wallace.demo.app.common import com.wallace.demo.app.utils.FuncRuntimeDur import scala.util.control.NonFatal trait Using extends FuncRuntimeDur { protected def usingWithErrMsg[A <: {def close() : Unit}, B](param: A, errMsg: String)(f: A => B): Unit = { try { f(param) } catch { case N...
BiyuHuang/CodePrototypesDemo
demo/ScalaDemo/src/main/scala/com/wallace/demo/app/common/Using.scala
Scala
apache-2.0
666
package org.vipervm.fp class REPL { val console = new jline.ConsoleReader val prompt = "vvm> " repl def repl:Unit = { val s = console.readLine(prompt) val idx = s.indexOf(" ",0) val (cmd,args) = if (idx > 0) s.splitAt(idx) else (s,"") cmd match { case ":quit" => case ":parse" => ...
hsyl20/Scala_ViperVM
src/main/scala/org/vipervm/_old/fp/REPL.scala
Scala
gpl-3.0
1,004
import shapeless._ import shapeless.ops.nat._ trait NumFields[A] { type Out <: Nat def value(implicit toInt: ToInt[Out]): Int = toInt.apply() } object NumFields extends NumFieldsInstances trait NumFieldsFunctions { type Aux[A, N <: Nat] = NumFields[A] { type Out = N } def apply[A](implicit numFields: Nu...
mikkka/shapeless-guide-code
numfields/src/main/scala/numfields.scala
Scala
apache-2.0
2,146
package cz.jenda.pidifrky.logic.http import java.util.concurrent._ import cz.jenda.pidifrky.logic.DebugReporter import scala.util.control.NonFatal /** * @author Jenda Kolena, [email protected] */ object RequestTimeouter { private val executor = Executors.newSingleThreadScheduledExecutor() private val requ...
jendakol/pidifrky
client/src/main/scala/cz/jenda/pidifrky/logic/http/RequestTimeouter.scala
Scala
apache-2.0
1,479