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 { class Foo class SomeOps(x : Foo) { def foo(x: String) = 1 } class OtherOps(x : Foo) { def foo(x: Int) = 1 } implicit def mkSomeOps(x: Foo) : SomeOps = new SomeOps(x) implicit def mkOtherOps(x: Foo) : OtherOps = new OtherOps(x) (new Foo).foo(1) }
loskutov/intellij-scala
testdata/scalacTests/pos/t1693.scala
Scala
apache-2.0
272
package com.github.jeanadrien.evrythng.scala.rest import com.github.jeanadrien.evrythng.scala.json.EvtJsonProtocol._ import com.github.jeanadrien.evrythng.scala.json.{Application, Ref} import com.typesafe.scalalogging.LazyLogging /** * */ class ProjectContext(val apiKey : String, projectId : Ref) extends Envi...
jeanadrien/evrythng-scala-sdk
src/main/scala/com/github/jeanadrien/evrythng/scala/rest/ProjectContext.scala
Scala
apache-2.0
595
/* * Copyright (C) 2016 Nikos Katzouris * * 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 3 of the License, or * (at your option) any later version. * * This program is d...
nkatzz/OLED
src/main/scala/oled/weightlearn/Auxil.scala
Scala
gpl-3.0
5,336
package org.allenai.dqa.labeling import org.allenai.pnp.semparse.SemanticParser import org.allenai.pnp.PnpExample import org.allenai.pnp.Pnp import org.allenai.pnp.Env import org.allenai.pnp.PnpModel class LabelingP3Model(val parser: SemanticParser, val executor: LabelingExecutor, val answerSelector: AnswerSelect...
jayantk/pnp
src/main/scala/org/allenai/dqa/labeling/LabelingP3Model.scala
Scala
apache-2.0
1,543
package com.codacy.client.stash.service import com.codacy.client.stash.client.{PageRequest, Request, RequestResponse, StashClient} import com.codacy.client.stash.{Group, Repository, SshKeySimple, UserPermission} import play.api.libs.json.Json class RepositoryServices(client: StashClient) { val BASE: String = "/res...
codacy/stash-scala-client
src/main/scala/com/codacy/client/stash/service/RepositoryServices.scala
Scala
apache-2.0
6,657
// Generated by https://github.com/tanishiking/semanticdb-for-scala3 // Generated by the Scala Plugin for the Protocol Buffer Compiler. // Do not edit! // // Protofile syntax: PROTO3 package dotty.tools.dotc.semanticdb import dotty.tools.dotc.semanticdb.internal._ import scala.annotation.internal.sharable sealed abst...
dotty-staging/dotty
compiler/src/dotty/tools/dotc/semanticdb/generated/Language.scala
Scala
apache-2.0
1,936
def chebyshevDistance(p: List[Int], q: List[Int]): Int = p.zip(q).map { case (p, q) => (p - q).abs }.max
warreee/Algorithm-Implementations
Chebyshev_distance/Scala/jcla1/chebyshev_distance.scala
Scala
mit
108
package by.verkpavel.iofs object Main extends App{ val coder = HuffmanCode("abcde").buildCode().printCode().printCodedString() }
VerkhovtsovPavel/BSUIR_Labs
Labs/IOFS/IOFS-4/src/by/verkpavel/iofs/Main.scala
Scala
mit
132
package spire.random package rng import spire.util.Pack final class Serial(seed0: Long) extends LongBasedGenerator { private[this] var seed: Long = seed0 def copyInit: Serial = new Serial(seed) def getSeed: Long = seed def setSeed(n: Long): Unit = seed = n def getSeedBytes: Array[Byte] = Pack.longToBytes(se...
woparry/spire
core/src/main/scala/spire/random/rng/Serial.scala
Scala
mit
768
package org.vitrivr.adampro.utils.exception /** * adampro * * Ivan Giangreco * April 2016 */ case class QueryNotConformException(message : String = "Query does not correspond to entity.") extends GeneralAdamException(message)
dbisUnibas/ADAMpro
src/main/scala/org/vitrivr/adampro/utils/exception/QueryNotConformException.scala
Scala
mit
238
package codebook.runtime.server import akka.actor.{ActorRef, Props} import akka.testkit.TestProbe import codebook.runtime.packet.Packet import codebook.runtime.protocol.{Decoder, Request, Response} import codebook.runtime.test.AkkaTestkitSpecs2Support import codebook.runtime.util.ByteStringReader import org.specs2.mut...
RustyRaven/CodebookRuntime
scala/src/test/scala/codebook/runtime/server/LimitedIntervalFeederTest.scala
Scala
mit
2,167
package poly.collection.mut import poly.collection._ import poly.collection.factory._ import poly.collection.typeclass._ import scala.reflect._ /** * Constructs a mutable set given an implicit equivalence relation on the keys. * The type of the resulting set is determined from the following fallback relation: * <...
ctongfei/poly-collection
core/src/main/scala/poly/collection/mut/AutoSet.scala
Scala
mit
1,748
/* * 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 ...
starpit/openwhisk
tests/src/test/scala/org/apache/openwhisk/test/http/RESTProxy.scala
Scala
apache-2.0
4,743
package vault import org.scalacheck._, Arbitrary._ case class Person(name: String, age: Int) object Person { def table = "CREATE TABLE person (id IDENTITY, name VARCHAR(255), age INTEGER)" implicit def PersonArbitrary: Arbitrary[Person] = Arbitrary(for { n <- Gen.identifier; a <- Gen.choose(0, 120) } y...
markhibberd/vault
src/test/scala/vault/Person.scala
Scala
bsd-3-clause
481
package ammonite.session import ammonite.TestRepl import utest._ import scala.collection.{immutable => imm} object FailureTests extends TestSuite{ val tests = TestSuite{ println("FailureTests") val check = new TestRepl() 'compileFailure { check.session(""" @ doesnt_exist error: not...
coderabhishek/Ammonite
amm/src/test/scala/ammonite/session/FailureTests.scala
Scala
mit
1,675
package de.codecentric.dcos_intro import java.io.{ByteArrayInputStream, ObjectInputStream} import kafka.serializer.Decoder import kafka.utils.VerifiableProperties class TweetDecoder(props: VerifiableProperties) extends Decoder[Tweet]{ override def fromBytes(bytes: Array[Byte]): Tweet = { val ois = new ObjectI...
ftrossbach/intro-to-dcos
example/src/main/scala/de/codecentric/dcos_intro/TweetDecoder.scala
Scala
apache-2.0
412
package io.getquill.context.cassandra import io.getquill._ import io.getquill.idiom.StatementInterpolator._ import io.getquill.ast.{ Action => AstAction, Query => _, _ } import io.getquill.idiom.StringToken import io.getquill.Query import io.getquill.quat.Quat class CqlIdiomSpec extends Spec { import mirrorContext...
getquill/quill
quill-cassandra/src/test/scala/io/getquill/context/cassandra/CqlIdiomSpec.scala
Scala
apache-2.0
11,874
package test import org.specs2.mutable.Specification import java.io.File import org.apache.avro.generic._ import org.apache.avro.specific._ import org.apache.avro.Schema import org.apache.avro.Schema.{Type => AvroType} import org.apache.avro.file._ class AvroRecord28Test extends Specification { "A case class wi...
iulianu/avro-scala-macro-annotations
tests/src/test/scala/AvroRecordTests/datatypetests/AvroRecordNestedPrimitivesTest.scala
Scala
apache-2.0
12,457
package chapter08 import akka.actor._ import akka.pattern.ask import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration._ import scala.util.Success /* Implement the FailureDetector actor, which sends Identify messages to the specified actors every interval seconds. If an actor does n...
vsuharnikov/books-exercises
scala/learning-concurrent-programming-in-scala/src/main/scala/chapter08/Exercise05.scala
Scala
mit
2,431
package utils.monitor import com.codahale.metrics.{SharedMetricRegistries, Slf4jReporter} import org.slf4j.LoggerFactory import java.util.concurrent.TimeUnit import scala.concurrent.duration._ import play.api.libs.concurrent.Akka import play.api.Play.current import scala.concurrent.ExecutionContext import ExecutionCon...
Department-for-Work-and-Pensions/ClaimReceived
cr/app/utils/monitor/MonitorRegistration.scala
Scala
mit
1,558
/* * This file is part of the Linux Variability Modeling Tools (LVAT). * * Copyright (C) 2010 Steven She <shshe@gsd.uwaterloo.ca> * * LVAT 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 v...
leutheus/linux-variability-analysis-tools
src/test/scala/gsd/linux/HierarchyTest.scala
Scala
lgpl-3.0
1,907
package blended.akka import akka.actor.{Actor, ActorRef} import scala.collection.mutable.ListBuffer trait MemoryStash { this: Actor => val requests: ListBuffer[(ActorRef, Any)] = ListBuffer.empty[(ActorRef, Any)] def stashing: Receive = { case msg => requests.prepend((sender(), msg)) } def unsta...
woq-blended/blended
blended.akka/src/main/scala/blended/akka/MemoryStash.scala
Scala
apache-2.0
506
/*********************************************************************** * Copyright (c) 2013-2018 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
boundlessgeo/geomesa
geomesa-spark/geomesa-spark-sql/src/main/scala/org/apache/spark/sql/SQLTypes.scala
Scala
apache-2.0
681
package scavenger.categories /** 2015-03-08 * * Formal Cartesian Closed Category without type annotations. * * It does not distinguish between elements and functions, * but it throws some exceptions if one attempts to form * expressions that are guaranteed to never make sense, * like `(f,g)(x)` (2-Tuples...
jorro/scavenger
src/main/scala/scavenger/categories/formalccc/package.scala
Scala
gpl-3.0
582
package definiti.core.typing import definiti.common.ast._ import definiti.common.program.Program import definiti.common.validation.{Valid, Validated} import definiti.core._ private[core] class ProjectTyping(context: Context) { def addTypes(root: Root): Program[Root] = Program.validated { Validated.squash(root.n...
definiti/definiti-core
src/main/scala/definiti/core/typing/ProjectTyping.scala
Scala
mit
2,089
/* * This file is part of openisetl * * Copyright (c) Arnaud Le Blanc */ package openisetl.runtime._val import collection.mutable.ArrayBuffer import openisetl.runtime.ExecuteException object BaseVal { def maxParams = 10 def callMethod(n:Int) = { val c = classOf[BaseVal] val getMethod = classOf[Class[Ba...
arnaud-lb/OpenISETL
src/main/scala/openisetl/runtime/_val/GenericBaseVal.scala
Scala
mit
5,758
/** * 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-http/src/main/scala/io/gatling/http/ahc/package.scala
Scala
apache-2.0
1,190
package peregin.gpv.gui.gauge import peregin.gpv.model.{InputValue, MinMax, Sonda} import peregin.gpv.util.UnitConverter trait SvgElevationGauge extends SvgGauge { lazy val dummy = InputValue(689, MinMax(432, 1252)) override def defaultInput = dummy override def sample(sonda: Sonda): Unit = input = sonda.elev...
peregin/gps-overlay-on-video
src/main/scala/peregin/gpv/gui/gauge/SvgElevationGauge.scala
Scala
mit
494
/** * 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...
usakey/kafka
core/src/test/scala/unit/kafka/zk/ZKPathTest.scala
Scala
apache-2.0
5,980
package com.jackbeasley.wordFind import scala.io.Source object Main { def main(args: Array[String]) = { // Use 3x3 test grid val file = Source.fromURL(getClass.getResource("/three.txt")) val wg = WordGrid.gridFromFile(file) println(wg.getWords.mkString) } }
jackbeasley/wordFind
src/main/scala/Main.scala
Scala
mit
281
package com.mentatlabs.nsa package scalac package options /* -Ymacro-debug-lite * ================== * 2.10.0 - 2.12.0: Trace essential macro-related activities. */ case object ScalacYMacroDebugLite extends ScalacOptionBoolean("-Ymacro-debug-lite", ScalacVersions.`2.10.0`)
melezov/sbt-nsa
nsa-core/src/main/scala/com/mentatlabs/nsa/scalac/options/private/ScalacYMacroDebugLite.scala
Scala
bsd-3-clause
284
package rere.sasl.scram.parsers import org.parboiled2._ import rere.sasl._ import rere.sasl.gs2.ChannelBindingFlag._ import rere.sasl.scram.messages.ServerErrorType._ import rere.sasl.scram.messages._ import rere.sasl.util._ /** * 1. Maybe issue in rfc5802: * Section 5.1 of rfc5802 says: * All attribute n...
pbaun/rere
modules/sasl/src/main/scala/rere/sasl/scram/parsers/RFC5802Parser.scala
Scala
apache-2.0
8,280
/* * 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 ...
himanshudhami/PredictionIO
core/src/main/scala/org/apache/predictionio/controller/P2LAlgorithm.scala
Scala
apache-2.0
4,654
package com.signalcollect.triplerush import org.scalatest.FlatSpec import org.scalatest.ShouldMatchers import org.scalatest.prop.Checkers import com.signalcollect.triplerush.QueryParticle._ import org.scalacheck.Arbitrary._ import org.scalacheck.Arbitrary import org.scalacheck.Gen import org.scalacheck.Gen._ import co...
hicolour/triplerush
src/test/scala/com/signalcollect/triplerush/QueryParticleBindingSpec.scala
Scala
apache-2.0
3,007
package reswing import scala.swing.{Color, Dimension, Font, Label, Slider} import scala.swing.event.ValueChanged class ReSlider( val min: ReSwingValue[Int] = (), val max: ReSwingValue[Int] = (), val value: ReSwingValue[Int] = (), val extent: ReSwingValue[Int] = (), val paintLabels: ReSwingValue[Bo...
guidosalva/REScala
Code/Extensions/RESwing/src/main/scala/reswing/ReSlider.scala
Scala
apache-2.0
2,126
package org.me.PrivateSpark.api import scala.reflect.ClassTag trait Lap_PairRDD[K, V] extends Serializable { /** * Apply a mapping function to each value while leaving key mappings untouched. * * @param f Function to apply to all values in RDD. Must be pure. * @tparam T Output type of f * @return Pa...
alec-heif/MIT-Thesis
spark-wrapper/src/main/scala/org/me/PrivateSpark/api/Lap_PairRDD.scala
Scala
mit
3,051
/* --------------------------------------------------------------------- %% %% Copyright (c) 2007-2014 Basho Technologies, Inc. All Rights Reserved. %% %% This file is provided 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 ...
basho-labs/rinamo
tests/com.basho.dynamodb.integ/src/test/scala/acceptance/Definitions.scala
Scala
apache-2.0
9,407
/* * Copyright (C) 2016 Department for Business, Energy and Industrial Strategy * * 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 3 of the License, or * (at your option) an...
UKGovernmentBEIS/rifs-frontend-play
src/main/scala/controllers/manage/SummarySave.scala
Scala
gpl-3.0
2,895
/* * 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/declaration/release7/RoleWithinBusinessRelease7Spec.scala
Scala
apache-2.0
8,208
package org.apache.spark.sql.cassandra import scala.collection.mutable import org.apache.spark.Logging import org.apache.spark.sql.SaveMode._ import org.apache.spark.sql.cassandra.DefaultSource._ import org.apache.spark.sql.sources.{BaseRelation, CreatableRelationProvider, RelationProvider, SchemaRelationProvider} im...
maasg/spark-cassandra-connector
spark-cassandra-connector/src/main/scala/org/apache/spark/sql/cassandra/DefaultSource.scala
Scala
apache-2.0
6,702
object t10156 { trait A def x(implicit a: A) = a val z = x _ }
scala/scala
test/files/neg/t10156.scala
Scala
apache-2.0
69
package org.http4s import io.circe.Printer package object circe extends CirceInstances { protected def defaultPrinter: Printer = Printer.noSpaces }
m4dc4p/http4s
circe/src/main/scala/org/http4s/circe/package.scala
Scala
apache-2.0
156
/* Title: Pure/Tools/build.scala Author: Makarius Options: :folding=explicit:collapseFolds=1: Build and manage Isabelle sessions. */ package isabelle import java.io.{BufferedInputStream, FileInputStream, BufferedReader, InputStreamReader, IOException} import java.util.zip.GZIPInputStream imp...
wneuper/libisabelle
pide/2014/src/main/scala/Tools/build.scala
Scala
mit
35,393
package org.refptr.parsing.mathematica import java.io.File import scopt.{OptionParser,Read} object Main extends App { sealed trait Form { def toForm(expr: Expr): String } case object FullForm extends Form { def toForm(expr: Expr) = expr.toFullForm } case object LispForm extends For...
mattpap/mathematica-parser
src/main/scala/Main.scala
Scala
mit
2,085
package at.logic.gapt.examples import org.specs2.mutable._ class PigeonholeTest extends Specification { "pi2" in { Pi2Pigeonhole.ctx.check( Pi2Pigeonhole.proof ); ok } "pi3" in { Pi3Pigeonhole.ctx.check( Pi3Pigeonhole.proof ); ok } }
gebner/gapt
tests/src/test/scala/at/logic/gapt/examples/Pi2PigeonholeTest.scala
Scala
gpl-3.0
239
package com.sksamuel.elastic4s.streams import akka.actor._ import com.sksamuel.elastic4s.{BulkCompatibleDefinition, BulkDefinition, BulkItemResult, BulkResult, ElasticClient, ElasticDsl} import org.reactivestreams.{Subscriber, Subscription} import scala.collection.mutable.ArrayBuffer import scala.concurrent.duration....
sjoerdmulder/elastic4s
elastic4s-streams/src/main/scala/com/sksamuel/elastic4s/streams/BulkIndexingSubscriber.scala
Scala
apache-2.0
10,826
package com.codahale.jerkson.ser import org.codehaus.jackson.`type`.JavaType import com.codahale.jerkson.AST.JValue import org.codehaus.jackson.map._ class ScalaSerializers extends Serializers.Base { override def findSerializer(config: SerializationConfig, javaType: JavaType, beanDesc: BeanDescription, beanProp: Be...
cphylabs/jerkson-old
src/main/scala/com/codahale/jerkson/ser/ScalaSerializers.scala
Scala
mit
1,412
package es.weso.shacl import es.weso.utils.ProofTree package object ResultTree { type ErrorCondition type RTree = ProofTree[ValidationState,ErrorCondition] }
jorgeyp/ShExcala
src/main/scala/es/weso/shacl/ResultTree.scala
Scala
mit
171
package com.github.vonnagy.service.container.http.routing import akka.http.scaladsl.marshalling._ import akka.http.scaladsl.model.StatusCodes._ import akka.http.scaladsl.model._ import akka.http.scaladsl.server._ import akka.http.scaladsl.settings.RoutingSettings import com.github.vonnagy.service.container.http.routin...
vonnagy/service-container
service-container/src/main/scala/com/github/vonnagy/service/container/http/routing/RoutingHandler.scala
Scala
apache-2.0
3,213
package se.culvertsoft.mgen.jspack.generator import java.io.File import se.culvertsoft.mgen.api.exceptions.GenerationException import se.culvertsoft.mgen.api.model._ import scala.collection.JavaConversions._ object MkDefaultValue { def apply(v: DefaultValue): String = { if (v == null) return null ...
culvertsoft/mgen
mgen-javascriptgenerator/src/main/scala/se/culvertsoft/mgen/jspack/generator/MkDefaultValue.scala
Scala
mit
2,337
package com.twitter.finagle.mdns import com.twitter.finagle.{Announcer, Resolver, Addr} import com.twitter.util.{Await, Var} import java.net.{InetSocketAddress, InetAddress, Socket} import org.junit.runner.RunWith import org.scalatest.concurrent.{Eventually, IntegrationPatience} import org.scalatest.junit.JUnitRunner ...
liamstewart/finagle
finagle-mdns/src/test/scala/com/twitter/finagle/mdns/MDNSTest.scala
Scala
apache-2.0
2,966
/* * 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 ...
Quantiply/samza
samza-core/src/main/scala/org/apache/samza/coordinator/JobCoordinator.scala
Scala
apache-2.0
15,248
/* * Util.scala * * Updated: Oct 10, 2014 * * Copyright (c) 2014, CodeMettle */ package com.codemettle.akkasolr.util import java.io.{BufferedWriter, OutputStreamWriter} import org.apache.solr.client.solrj.request.UpdateRequest import org.apache.solr.common.{SolrInputDocument, SolrInputField} import com.codemet...
CodeMettle/akka-solr
src/main/scala/com/codemettle/akkasolr/util/Util.scala
Scala
apache-2.0
2,435
package typeDefinition trait ImplicitClass { implicit class ImplicitClass(val x: Int) }
JetBrains/intellij-scala
tasty/runtime/data/typeDefinition/ImplicitClass.scala
Scala
apache-2.0
90
package scales.component import scala.language.experimental.macros import org.scalajs.dom.Document import scales.component.internal.ComponentRegistryImpl object ComponentRegistry { @throws[MissingMetadataException]( "Thrown when the specified type does not have sufficient information to define a component.")...
greencatsoft/scales
core/src/main/scala/scales/component/ComponentRegistry.scala
Scala
apache-2.0
710
package org.jetbrains.plugins.scala package lang package psi package api package base package patterns /** * @author Alexander Podkhalyuzin */ trait ScParenthesisedPattern extends ScPattern { def subpattern = findChild(classOf[ScPattern]) } object ScParenthesisedPattern { def unapply(e: ScParenthesisedPattern):...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/api/base/patterns/ScParenthesisedPattern.scala
Scala
apache-2.0
355
package com.github.hebo.streamtrends import org.scalatra.test.specs2._ // For more on Specs2, see http://etorreborre.github.com/specs2/guide/org.specs2.guide.QuickStart.html class MyScalatraServletSpec extends ScalatraSpec { def is = "GET / on MyScalatraServlet" ^ "should return status 200" ...
Hebo/trending-streams
src/test/scala/com/github/hebo/streamtrends/MyScalatraServletSpec.scala
Scala
mit
505
package com.hyenawarrior.oldnorsedictionary.model.persister /** * Created by HyenaWarrior on 2017.11.16.. */ trait StringInterner { def apply(id: Int): String def indexOf(s: String): Option[Int] def store(s: String): Int def getOrStore(s: String): Int = indexOf(s) match { case Some(i) => i cas...
HyenaSoftware/IG-Dictionary
app/src/main/scala/com/hyenawarrior/oldnorsedictionary/model/persister/StringInterner.scala
Scala
lgpl-3.0
345
import sbt._ import sbt.Keys._ import bintray.Plugin._ import bintray.Keys._ object Build extends Build { val customBintraySettings = bintrayPublishSettings ++ Seq( packageLabels in bintray := Seq("json-pointer"), bintrayOrganization in bintray := Some("plasmaconduit"), repository in bintray ...
plasmaconduit/json-pointer
project/Build.scala
Scala
mit
1,207
package com.twitter.finagle.loadbalancer.aperture import com.twitter.finagle.loadbalancer.NodeT import com.twitter.finagle.util.Rng /** * A NodeT which also has an associated random integer (token). * This token persists through node updates and allows for load balancing * with stable ordering across distributor r...
twitter/finagle
finagle-core/src/main/scala/com/twitter/finagle/loadbalancer/aperture/ApertureNode.scala
Scala
apache-2.0
844
package com.matianl.explore /** * @author ${user.name} */ object App { def foo(x : Array[String]) = x.foldLeft("")((a,b) => a + b) def main(args : Array[String]) { println( "Hello World!" ) println("concat arguments = " + foo(args)) } }
matinalhope/explore
scala-base/src/main/scala/com/matianl/explore/App.scala
Scala
apache-2.0
261
/* * 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 ...
bwsw/sj-platform
core/sj-common/src/main/scala/com/bwsw/sj/common/si/ServiceSI.scala
Scala
apache-2.0
4,020
import reactivemongo.io.netty.buffer.Unpooled import reactivemongo.core.protocol.{ MessageHeader, Query, Reply, Response, ResponseInfo } import reactivemongo.bson.BSONDocument import org.specs2.specification.core.Fragments import org.specs2.concurrent.ExecutionEnv class ProtocolSpec(implicit ee: ExecutionE...
ornicar/ReactiveMongo
driver/src/test/scala/ProtocolSpec.scala
Scala
apache-2.0
4,776
object P { val x = 34 } object Y { val x = 44 { import P.x <ref>x } }
ilinum/intellij-scala
testdata/resolve/nonlocal/NoShadowing.scala
Scala
apache-2.0
87
package play.core.server.netty import java.net.InetAddress import org.specs2.matcher.DataTables import org.specs2.mutable.Specification class SubnetSpec extends Specification with DataTables { "Subnet" should { "check if ip is in range" in { "Subnet" || "IpAddress" | "is in range" | "127.0.0.1" !...
jyotikamboj/container
pf-framework/src/play-netty-server/src/test/scala/play/core/server/netty/SubnetSpec.scala
Scala
mit
829
trait B class D extends B object Test extends App { def foo[T](bar: T) = { bar match { case _: Array[Array[_]] => println("array 2d") case _: Array[_] => println("array 1d") case _ => println("something else") } } foo(Array.fill(10)(2)) foo(Array.fill(10, 10)(2)) foo(Array.fill(10, 1...
AlexSikia/dotty
tests/pos/t2425.scala
Scala
bsd-3-clause
354
package org.finra.datagenerator.scaffolding.random.randomizers import org.finra.datagenerator.scaffolding.config.{ConfigDefinition, ConfigName, Configurable} import org.finra.datagenerator.scaffolding.config._ import org.finra.datagenerator.scaffolding.random.predicate.RandomContext /** * Created by dkopel on 12/12...
FINRAOS/DataGenerator
rubber-scaffolding/rubber-random/src/main/scala/org/finra/datagenerator/scaffolding/random/randomizers/BigDecimalRandomizer.scala
Scala
apache-2.0
1,405
package modules.alertwatchernm import com.google.inject.AbstractModule import javax.inject.Singleton import services.alertwatchernm.{IAlertWatcherNMService, AlertWatcherNMService} import dao.alertwatchernm.{IAlertWatcherNMDao, AlertWatcherNMDao} class Module extends AbstractModule { override def configure() = { ...
tnddn/iv-web
portal/rest-portal/app/modules/alertwatchernm/Module.scala
Scala
apache-2.0
512
/* * 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 ...
h2oai/sparkling-water
core/src/main/scala/ai/h2o/sparkling/backend/external/K8sHeadlessService.scala
Scala
apache-2.0
2,232
package com.proinnovate.activityscheduler import java.io.InputStream import com.typesafe.scalalogging.LazyLogging import org.scalatest.{DiagrammedAssertions, FunSuite} class OverallPlanTest extends FunSuite with LazyLogging with DiagrammedAssertions { val randomStartPlan = { val activityPlaceSet = ActivityPla...
sroebuck/activity-scheduler
src/test/scala/com/proinnovate/activityscheduler/OverallPlanTest.scala
Scala
apache-2.0
1,696
package org.pico.disposal import java.io.Closeable import java.lang.ref.WeakReference import java.util.concurrent.atomic.{AtomicBoolean, AtomicInteger, AtomicLong, AtomicReference} import org.pico.atomic.syntax.std.atomicBoolean._ import org.pico.atomic.syntax.std.atomicInteger._ import org.pico.atomic.syntax.std.ato...
pico-works/pico-disposal
pico-disposal/src/test/scala/org/pico/disposal/DisposerSpec.scala
Scala
bsd-3-clause
4,872
package com.rasterfoundry.api.organization import com.rasterfoundry.akkautil.PaginationDirectives import com.rasterfoundry.akkautil.{ Authentication, CommonHandlers, UserErrorHandler } import com.rasterfoundry.api.utils.Config import com.rasterfoundry.database.OrganizationDao import com.rasterfoundry.database.fi...
raster-foundry/raster-foundry
app-backend/api/src/main/scala/organization/Routes.scala
Scala
apache-2.0
2,851
import annotation._ object Tail { def tcInFunc: Unit = { () => { @tailrec def foo: Int = foo + 1 } } def tcInBooleanExprFirstOp(x: Int, v: Int): Boolean = { { @tailrec def foo: Int = foo + 1 foo } == v && true } def tcInBooleanExprSecondOp(x: Int, v: Int): Boolean = { tr...
felixmulder/scala
test/files/neg/tailrec-4.scala
Scala
bsd-3-clause
705
/* * 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
core/src/main/scala/org/apache/spark/api/r/RBackendAuthHandler.scala
Scala
apache-2.0
2,003
/** * Copyright (c) 2002-2012 "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 Foundati...
dksaputra/community
cypher/src/test/scala/org/neo4j/cypher/internal/commands/SubtractTest.scala
Scala
gpl-3.0
1,751
import scala.reflect.Selectable.reflectiveSelectable trait Foo1 { val a: Int } trait Foo2 { def a: Int } trait Foo3 { var a: Int } object TestStructuralVar { type T0 = {var a: Int} // error object TestStructuralVar { type T = {val a: Int; def a_=(x: Int): Unit} def upcast1(v: Foo1): T = v // error def...
som-snytt/dotty
tests/neg/i4496b.scala
Scala
apache-2.0
666
/* * 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...
122689305/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/Reverse.scala
Scala
apache-2.0
3,726
package com.gxq.learn.akka.actor.demo import akka.actor.Props import akka.actor.AbstractActor.Receive import akka.actor.Actor import com.typesafe.config.Config import akka.actor.ActorSystem import akka.dispatch.UnboundedPriorityMailbox import akka.actor.PoisonPill import akka.dispatch.PriorityGenerator class Priority...
gong1989313/spark-bigdata
akkaLearning/src/main/scala/com/gxq/learn/akka/actor/demo/Wallet.scala
Scala
apache-2.0
1,943
import org.infinispan.Cache import org.infinispan.configuration.cache._ import org.infinispan.configuration.global.GlobalConfigurationBuilder import org.infinispan.manager.{DefaultCacheManager, EmbeddedCacheManager} import org.infinispan.transaction.{LockingMode, TransactionMode} import org.infinispan.transaction.looku...
kazuhira-r/infinispan-examples
infinispan-default-configuration/src/main/scala/InfinispanDefaultConfiguration.scala
Scala
mit
4,206
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.nscplugin.test import org...
scala-js/scala-js
compiler/src/test/scala/org/scalajs/nscplugin/test/EnumerationInteropTest.scala
Scala
apache-2.0
4,824
/* * 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 ...
dhruve/spark
core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala
Scala
apache-2.0
29,245
package object rillit
travisbrown/rillit
core/src/main/scala/package.scala
Scala
apache-2.0
23
/* Copyright 2013 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...
twitter/summingbird
summingbird-storm/src/main/scala/com/twitter/summingbird/storm/package.scala
Scala
apache-2.0
688
package org.jetbrains.plugins.scala package lang.refactoring.extractMethod import java.util import com.intellij.openapi.project.Project import com.intellij.openapi.util.text.StringUtil import com.intellij.psi.util.PsiTreeUtil import com.intellij.psi.{PsiElement, PsiNamedElement, ResolveState} import com.intellij.refa...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/refactoring/extractMethod/ScalaExtractMethodUtils.scala
Scala
apache-2.0
21,852
package org.quakelivedemoparser import java.nio.{ByteBuffer, ByteOrder} import java.nio.channels.ReadableByteChannel class DemoReader(channel: ReadableByteChannel) extends DemoStream { val logger = org.slf4j.LoggerFactory.getLogger(classOf[DemoReader].getSimpleName) var prev: Option[DemoEvent] = None var bit_re...
vincasmiliunas/Quake-Live-Demo-Parser
src/main/scala/org/quakelivedemoparser/DemoReader.scala
Scala
mit
5,187
package org.broadinstitute.clio.transfer.model import enumeratum._ import scala.collection.immutable object ApiConstants { def forceString: String = "force" def apiString: String = "api" def queryString: String = "query" def rawQueryString: String = "rawquery" def metadataString: String = "metadata" def ...
broadinstitute/clio
clio-transfer-model/src/main/scala/org/broadinstitute/clio/transfer/model/ApiConstants.scala
Scala
bsd-3-clause
675
/* 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...
iesl/fuse_ttl
src/factorie-factorie_2.11-1.1/src/test/scala/cc/factorie/app/nlp/TestDocumentAnnotatorMap.scala
Scala
apache-2.0
5,361
/** * Copyright (C) 2013 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 program i...
orbeon/orbeon-forms
form-builder/jvm/src/main/scala/org/orbeon/oxf/fb/AlertsAndConstraintsOps.scala
Scala
lgpl-2.1
26,426
package dotty.tools.dotc.util object Util { /** The index `i` in `candidates.indices` such that `candidates(i) <= x` and * `candidates(i)` is closest to `x`, determined by binary search, or -1 * if `x < candidates(0)`. * @param hint If between 0 and `candidates.length` use this * a...
som-snytt/dotty
compiler/src/dotty/tools/dotc/util/Util.scala
Scala
apache-2.0
936
package koncept.http.io import java.io.IOException import org.scalatest.FlatSpec class StreamUtilsTest extends FlatSpec { "Stream Utils" should "read lines in" in { val toStream = new StringInputStreamFactory val testString = "1\\n2\\n3 lines long" val counter = streamCounter new Strea...
nkrul/http-router
src/test/scala/koncept/http/io/StreamUtilsTest.scala
Scala
mit
551
/* * Copyright (c) 2014-2015 by its authors. Some rights reserved. * See the project homepage at: http://www.monifu.org * * 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://...
sergius/monifu
monifu/shared/src/main/scala/monifu/reactive/observables/RefCountObservable.scala
Scala
apache-2.0
3,245
package uk.gov.dvla.vehicles.retain.gatling import io.gatling.core.Predef._ import io.gatling.core.feeder.RecordSeqFeederBuilder import io.gatling.http.Predef._ import Headers.{headers_accept_html, headers_x_www_form_urlencoded} class Chains(data: RecordSeqFeederBuilder[String]) { private val beforeYouStartPageTit...
dvla/vrm-retention-online
gatling-tests/src/test/scala/uk/gov/dvla/vehicles/retain/gatling/Chains.scala
Scala
mit
15,988
package com.twitter.finagle.http import org.jboss.netty.handler.codec.http.DefaultHttpHeaders import scala.collection.JavaConverters._ class Netty3HeaderMapTest extends AbstractHeaderMapTest { def newHeaderMap(headers: (String, String)*): HeaderMap = { val result = Request().headerMap headers.foreach { cas...
koshelev/finagle
finagle-base-http/src/test/scala/com/twitter/finagle/http/Netty3HeaderMapTest.scala
Scala
apache-2.0
1,395
package com.eevolution.context.dictionary.domain.api.service import com.eevolution.context.dictionary._ import com.eevolution.context.dictionary.domain.model.ReplicationDocument /** * Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com * This program is free software: you can redist...
adempiere/ADReactiveSystem
dictionary-api/src/main/scala/com/eevolution/context/dictionary/domain/api/service/ReplicationDocumentService.scala
Scala
gpl-3.0
1,236
package pl.edu.agh.iet.akka_tracing.config import akka.actor.{ ActorRef, ActorSystem } import com.typesafe.config.{ Config, ConfigFactory } import pl.edu.agh.iet.akka_tracing.collector.CollectorConstructor import pl.edu.agh.iet.akka_tracing.config.ConfigUtils._ import pl.edu.agh.iet.akka_tracing.filtering._ import pl....
akka-tracing-tool/akka-tracing-core
src/main/scala/pl/edu/agh/iet/akka_tracing/config/ConfigurationReader.scala
Scala
gpl-2.0
3,961
package com.ggilmore.core import scala.annotation.tailrec /** * Contains methods that are using to "run" machines and test input to see if the input matches the regex that is * describing a particular machine */ object MachineRunner { /** * @param input the input that we are using to advance the machine's st...
ggilmore/RegexEngine
src/main/scala/com/ggilmore/core/MachineRunner.scala
Scala
mit
4,039
/** * Generated by Scrooge * version: ? * rev: ? * built at: ? */ package com.twitter.scrooge.test.gold.thriftscala import com.twitter.scrooge.{ LazyTProtocol, TFieldBlob, ThriftException, ThriftStruct, ThriftStructCodec3, ThriftStructFieldInfo, ThriftStructMetaData, ThriftUtil} import org.apache.thri...
thirstycrow/scrooge
scrooge-generator-tests/src/test/resources/gold_file_output_scala/com/twitter/scrooge/test/gold/thriftscala/Request.scala
Scala
apache-2.0
20,547
package org.hello import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class World2_12Suite extends FunSuite { test("foo") { new World2_12().foo() } }
scoverage/gradle-scoverage
src/crossScalaVersionTest/resources/projects/scala-multi-module-cross-version/2_12/src/test/scala/org/hello/World2_12Suite.scala
Scala
apache-2.0
240
/* * 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 ...
andrwng/kudu
java/kudu-spark/src/test/scala/org/apache/kudu/spark/kudu/DefaultSourceTest.scala
Scala
apache-2.0
28,395
package com.redis /** * Socket operations * */ import java.io._ import java.net.Socket trait SocketOperations { // Response codes from the Redis server // they tell you what's coming next from the server. val ERR = "-" val OK = "+OK" val SINGLE = "+" val BULK = "$" val MULTI = "*" val...
acrosa/scala-redis
src/main/scala/com/redis/SocketOperations.scala
Scala
mit
5,345