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
/* * 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 ...
Panos-Bletsos/spark-cost-model-optimizer
mllib/src/test/scala/org/apache/spark/ml/feature/StandardScalerSuite.scala
Scala
apache-2.0
5,204
package org.jetbrains.plugins.scala.testingSupport.utest.scala2_12.utest_0_7_4 class UTestBeforeAfterTest_2_12_0_7_4 extends UTestTestBase_2_12_0_7_4 { val beforeAfterTestName = "BeforeAfterTest" val beforeAfterFileName = beforeAfterTestName + ".scala" addSourceFile(beforeAfterFileName, s""" |import...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/testingSupport/utest/scala2_12/utest_0_7_4/UTestBeforeAfterTest_2_12_0_7_4.scala
Scala
apache-2.0
1,243
/* * This file is part of pelam-scala-csv * * Copyright © Peter Lamberg 2015 (pelam-scala-csv@pelam.fi) * * 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/...
pelamfi/pelam-scala-csv
src/main/scala/fi/pelam/csv/cell/RowKey.scala
Scala
apache-2.0
1,320
// // Taranos Cloud Sonification Framework: Service Core // Copyright (C) 2018 David Hinson, Netrogen Blue LLC (dhinson@netrogenblue.com) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software F...
taranos/taranoscsf-core
src/main/scala/org/taranos/mc/trunk/intraprocess/SignalInterfacePlant.scala
Scala
agpl-3.0
4,952
package com.socrata.thirdparty.typesafeconfig import java.util import com.typesafe.config.{Config, ConfigValue, ConfigValueType} import scala.jdk.CollectionConverters._ /** Converts a Config object into a Properties object. This is * designed to be used with Log4j's `PropertyConfigurator`. * Since log4j freque...
socrata-platform/socrata-thirdparty-utils
core/src/main/scala/com/socrata/thirdparty/typesafeconfig/Propertizer.scala
Scala
apache-2.0
2,752
package com.kjetland.jackson.jsonSchema.testDataScala import com.kjetland.jackson.jsonSchema.annotations.JsonSchemaDefault case class PojoWithParentScala ( pojoValue:Boolean, child:ParentScala, @JsonSchemaDefault("x") stringWithDefault:String, @JsonSchemaDefault("12") intWithDefault:Int, @JsonSchemaDef...
mbknor/mbknor-jackson-jsonSchema
src/test/scala/com/kjetland/jackson/jsonSchema/testDataScala/PojoWithParentScala.scala
Scala
mit
364
package at.logic.gapt.proofs.resolution import at.logic.gapt.examples.{ BussTautology, CountingEquivalence } import at.logic.gapt.expr._ import at.logic.gapt.expr.fol.{ naive, thresholds } import at.logic.gapt.proofs.lk._ import at.logic.gapt.proofs._ import at.logic.gapt.provers.escargot.Escargot import at.logic.gapt...
gebner/gapt
tests/src/test/scala/at/logic/gapt/proofs/resolution/ResolutionToLKTest.scala
Scala
gpl-3.0
7,503
package org.scalafmt.cli import java.nio.file.{Files, Path, Paths} import metaconfig.Configured.NotOk import metaconfig.Configured.Ok import org.scalafmt.config.{Config, ScalafmtConfig} import org.scalatest.FunSuite import FileTestOps._ import org.scalafmt.Versions class CliOptionsTest extends FunSuite { test("st...
olafurpg/scalafmt
scalafmt-tests/src/test/scala/org/scalafmt/cli/CliOptionsTest.scala
Scala
apache-2.0
3,668
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
jedesah/Quasar
datagen/src/main/scala/quasar/datagen/codec.scala
Scala
apache-2.0
1,712
package com.github.mdr.mash.ns.core.objectClass import com.github.mdr.mash.functions._ import com.github.mdr.mash.ns.collections.FlatMapFunction.zipWithMashIndex import com.github.mdr.mash.ns.core.ObjectClass import com.github.mdr.mash.runtime._ object MapMethod extends MashMethod("map") { object Params { val ...
mdr/mash
src/main/scala/com/github/mdr/mash/ns/core/objectClass/MapMethod.scala
Scala
mit
2,488
/* * 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/frontend-2.3/src/main/scala/org/neo4j/cypher/internal/frontend/v2_3/perty/format/PageDocFormatter.scala
Scala
apache-2.0
3,000
/* * 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 java.nio private[nio] object GenHeapB...
SebsLittleHelpers/scala-js
javalib/src/main/scala/java/nio/GenHeapBufferView.scala
Scala
apache-2.0
3,258
package org.phenoscape.kb.util import akka.NotUsed import akka.http.scaladsl.Http import akka.http.scaladsl.marshalling.{Marshal, Marshaller, ToEntityMarshaller} import akka.http.scaladsl.model.{headers, HttpMethods, HttpRequest, RequestEntity} import akka.stream.alpakka.xml._ import akka.stream.alpakka.xml.scaladsl.X...
phenoscape/phenoscape-kb-services
src/main/scala/org/phenoscape/kb/util/StreamingSPARQLResults.scala
Scala
mit
4,778
package basic object AnonFuncFail { { (x: Int) => { "asd" x.toString } } }
mkubala/scalac-guardedblocks-plugin
tests/basic/src/test/resources/basic/AnonFuncFail.scala
Scala
gpl-3.0
105
/* * Copyright 2014-2021 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
copperlight/atlas
atlas-core/src/main/scala/com/netflix/atlas/core/db/AggregateCollector.scala
Scala
apache-2.0
8,267
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-index-api/src/main/scala/org/locationtech/geomesa/index/filters/AbstractFilter.scala
Scala
apache-2.0
1,183
import java.util.concurrent.Executors import rx.lang.scala._ import scala.concurrent.Future case class SomeDataItem(id: Int, buff: Array[Int] = new Array[Int](1)) object LargeSource extends scala.App { implicit val ec = scala.concurrent.ExecutionContext.fromExecutor(Executors.newFixedThreadPool(200)) ...
ScottWeinstein/rxissue
src/main/scala/LargeSource.scala
Scala
mit
1,120
/* * Copyright 2009-2010 LinkedIn, 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 ...
rhavyn/norbert
network/src/main/scala/com/linkedin/norbert/network/partitioned/loadbalancer/PartitionedLoadBalancerFactory.scala
Scala
apache-2.0
2,164
/** * Created by eva on 27/02/2017. */ import org.apache.spark.ml.Pipeline import org.apache.spark.ml.classification.NaiveBayes import org.apache.spark.ml.evaluation.BinaryClassificationEvaluator import org.apache.spark.ml.feature.{HashingTF, Tokenizer} import org.apache.spark.sql.SparkSession object movies { cas...
evaliotiri/NaiveBayes
naiveBayes_Evaluation.scala
Scala
gpl-3.0
3,477
import scala.quoted._ import scala.quoted.staging._ import scala.quoted.autolift object Test { implicit val toolbox: scala.quoted.staging.Toolbox = scala.quoted.staging.Toolbox.make(getClass.getClassLoader) def main(args: Array[String]): Unit = run { '{ def p[T](arr: IArray[T]): Unit = { println(...
som-snytt/dotty
tests/run-staging/quote-lift-IArray.scala
Scala
apache-2.0
989
package org.jetbrains.plugins.scala package lang package completion package filters.expression import java.util.regex.{Matcher, Pattern} import com.intellij.psi._ import com.intellij.psi.filters.ElementFilter import org.jetbrains.annotations.NonNls import org.jetbrains.plugins.scala.lang.completion.ScalaCompletionUti...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/completion/filters/expression/ElseFilter.scala
Scala
apache-2.0
1,987
package vultura.util.graph.graphviz import java.io.{File, FileOutputStream, PrintStream} import vultura.util.SIIndex import vultura.util.graph.{BiSet, IsDirectedGraph, IsUndirectedGraph} import scala.sys.process._ case class DotGraph[N,E](nodes: Iterable[N], edges: Iterable[E], ...
ziggystar/vultura-factor
util/src/main/scala/vultura/util/graph/graphviz/DotDigraph.scala
Scala
mit
3,825
package models.jnlp /** * Created with IntelliJ IDEA. * User: jason * Date: 6/21/13 * Time: 5:43 PM */ case class GenerationContext(thisServerCodebaseURL: String, loggingURL: String)
NetLogo/SimServer
app/models/jnlp/GenerationContext.scala
Scala
gpl-2.0
190
package scala.reflect.internal package object util { type Position = scala.tools.nsc.util.Position type SourceFile = scala.tools.nsc.util.SourceFile type BatchSourceFile = scala.tools.nsc.util.BatchSourceFile }
spray/twirl
twirl-compiler/src/main/scala-2.9.2/scala/reflect/internal/util/package.scala
Scala
apache-2.0
218
/* ************************************************************************************* * Copyright 2011 Normation SAS ************************************************************************************* * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Ge...
VinceMacBuche/cf-clerk
src/main/scala/com/normation/cfclerk/domain/HashAlgoConstraint.scala
Scala
agpl-3.0
6,530
/* * _____ _ __ _ * | __ | ___ ___ _| || | ___ ___ |_| ___ * | -|| -_|| .'|| . || |__ | . || . || || _| * |__|__||___||__,||___||_____||___||_ ||_||___| * |___| * ReadLogic * * Copyright 2015 Anastasios Skarlatidis * * ...
anskarl/ReadLogic
src/main/scala/readlogic/prolog/PrologParser.scala
Scala
apache-2.0
14,793
package com.karasiq.shadowcloud.exceptions import akka.util.ByteString import com.karasiq.common.encoding.HexString sealed abstract class CryptoException(message: String = null, cause: Throwable = null) extends SCException(message, cause) object CryptoException { final case class ChecksumError(expected: ByteStrin...
Karasiq/shadowcloud
model/src/main/scala/com/karasiq/shadowcloud/exceptions/CryptoException.scala
Scala
apache-2.0
1,018
/* * 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 ...
pgandhi999/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/ContinuousRecordEndpoint.scala
Scala
apache-2.0
2,714
package reaktor.scct import org.specs2.mutable._ import reflect.internal.Flags class DebugFlagsSpec extends Specification { "what are these" in { println("Flags: "+Flags.flagsToString(131136)) } }
mtkopone/scct
src/test/scala/reaktor/scct/DebugFlagsSpec.scala
Scala
apache-2.0
206
/* * Copyright 2015 Dennis Vriend * * 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...
dnvriend/akka-stream-xml-test
src/test/scala/com/github/dnvriend/ProcessingLargeXmlStreamingUsingActorTest.scala
Scala
apache-2.0
3,036
/*********************************************************************** * Copyright (c) 2013-2019 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...
elahrvivaz/geomesa
geomesa-bigtable/geomesa-bigtable-tools/src/main/scala/org/locationtech/geomesa/bigtable/tools/BigtableRunner.scala
Scala
apache-2.0
3,164
/* * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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 b...
hpe-cct/cct-core
src/main/scala/cogx/compiler/codegenerator/opencl/hyperkernels/fastfouriertransform/ClFFTKernelInfo.scala
Scala
apache-2.0
1,940
package org.crudible.lift.inline import scala.xml.NodeSeq import org.crudible.lift.util.EasyJS import net.liftweb.util.Helpers case class ViewUpdate( protected val renderFunc: () => NodeSeq, val container: String = Helpers.nextFuncName) { def render(): NodeSeq = { <div id={ container }> { rende...
rehei/crudible
crudible-lift-inline/src/main/scala/org/crudible/lift/inline/ViewUpdate.scala
Scala
apache-2.0
473
package com.spann import com.spann.models.{Speed, Station} import com.spann.utils.RacerStatus import scala.collection.mutable class StatsHandler { var statusOfRacers: mutable.HashMap[Int, RacerStatus] = new mutable.HashMap() def initializeRacer(racerId: Int, source: Station, destination: Station, speed: Speed)...
sunil-123/SpannRace
src/main/scala/com/spann/StatsHandler.scala
Scala
mit
1,923
/* * Accio is a platform to launch computer science experiments. * Copyright (C) 2016-2018 Vincent Primault <v.primault@ucl.ac.uk> * * Accio 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...
privamov/accio
accio/java/fr/cnrs/liris/lumos/gateway/GatewayModule.scala
Scala
gpl-3.0
2,008
/* * Copyright 2017 Guy Van den Broeck <guyvdb@cs.ucla.edu> * * 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 ...
UCLA-StarAI/ScalaDD
src/main/scala/edu/ucla/cs/starai/util/Caching.scala
Scala
apache-2.0
1,068
package com.blinkbox.books.elasticsearch.client import akka.actor.ActorRefFactory import com.blinkbox.books.elasticsearch.client.api._ import spray.client.pipelining._ import spray.http.HttpHeaders.Host import spray.http.{HttpCredentials, HttpRequest, HttpResponse} import spray.httpx.UnsuccessfulResponseException impo...
blinkboxbooks/elastic-http
src/main/scala/com/blinkbox/books/elasticsearch/client/ElasticClient.scala
Scala
mit
2,351
/* * Copyright (c) 2013-2014 Telefónica Investigación y Desarrollo S.A.U. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unles...
telefonicaid/fiware-cosmos-platform
ial/src/test/scala/es/tid/cosmos/platform/ial/libvirt/LibVirtInfrastructureProviderTest.scala
Scala
apache-2.0
7,078
package io.taig.gandalf.predef trait all extends generic with numeric with option with string object all extends all
Taig/BetterSafeThanSorry
predef/src/main/scala/io/taig/gandalf/predef/all.scala
Scala
mit
134
package mesosphere.marathon package core.instance.update import mesosphere.marathon.core.condition.Condition import mesosphere.marathon.core.instance.Instance import mesosphere.marathon.core.task.{ TaskCondition, Task } import mesosphere.marathon.state.Timestamp import org.apache.mesos import scala.collection.immutab...
Caerostris/marathon
src/main/scala/mesosphere/marathon/core/instance/update/InstanceUpdateOperation.scala
Scala
apache-2.0
2,659
/* * 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...
scalatest/scalatest
jvm/scalatest-test/src/test/scala/org/scalatest/BeforeAndAfterEachSuite.scala
Scala
apache-2.0
9,350
package com.sksamuel.elastic4s.requests.searches.queries.span import com.sksamuel.elastic4s.handlers.searches.queries.span.SpanFirstQueryBodyFn import com.sksamuel.elastic4s.requests.searches.span.{SpanFirstQuery, SpanTermQuery} import org.scalatest.funsuite.AnyFunSuite import org.scalatest.matchers.should.Matchers c...
sksamuel/elastic4s
elastic4s-core/src/test/scala/com/sksamuel/elastic4s/requests/searches/queries/span/SpanFirstQueryBodyFnTest.scala
Scala
apache-2.0
792
package pimpathon import org.junit.Test import org.junit.Assert._ import scala.math.Numeric._ import pimpathon.numeric._ import pimpathon.util._ class NumericTest { @Test def xmap(): Unit = { val numericString = implicitly[Numeric[Int]].xmap[String](_.toString, Integer.parseInt) numericString.plus(...
raymanoz/pimpathon
src/test/scala/pimpathon/numeric.scala
Scala
apache-2.0
1,421
/******************************************************************************* * Copyright 2017 Capital One Services, LLC and Bitwise, 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...
capitalone/Hydrograph
hydrograph.engine/hydrograph.engine.spark/src/main/scala/hydrograph/engine/spark/components/adapter/InputRedshiftAdapter.scala
Scala
apache-2.0
1,953
/* Copyright 2015 White Label Personal Clouds Pty Ltd * * 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 a...
welcomer/framework
welcomer-link/src/main/scala/me/welcomer/link/RawJsonApi.scala
Scala
apache-2.0
1,558
/* * Copyright (c) 2018 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org...
snowplow/iglu
0-common/schema-ddl/src/test/scala/com/snowplowanalytics/iglu/schemaddl/bigquery/RowSpec.scala
Scala
apache-2.0
6,350
package util import play.api.mvc.QueryStringBindable import ore.data.project.Category import ore.models.project.ProjectSortingStrategy import ore.permission.NamedPermission object APIBinders { implicit val categoryQueryStringBindable: QueryStringBindable[Category] = new QueryStringBindable[Category] { overrid...
SpongePowered/Ore
apiV2/app/util/APIBinders.scala
Scala
mit
1,736
package org.jetbrains.plugins.scala.failed.resolve import org.jetbrains.plugins.scala.PerfCycleTests import org.jetbrains.plugins.scala.lang.psi.api.base.ScReferenceElement import org.junit.Assert._ import org.junit.experimental.categories.Category /** * Created by kate on 3/30/16. */ @Category(Array(classOf[Per...
loskutov/intellij-scala
test/org/jetbrains/plugins/scala/failed/resolve/MissingParamterClass.scala
Scala
apache-2.0
762
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
ptkool/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala
Scala
apache-2.0
17,074
package com.github.chengpohi.dsl import org.elasticsearch.client.{ Client, ClusterAdminClient, IndicesAdminClient, RestClient } /** * ElasticBase function * Created by chengpohi on 6/28/15. */ trait ElasticBase { implicit val eqlClient: EQLClient val client: Client = eqlClient.client val clusterCl...
chengpohi/elasticshell
modules/core/src/main/scala/com/github/chengpohi/dsl/ElasticBase.scala
Scala
apache-2.0
1,158
/* * 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.linker.backend.closure im...
SebsLittleHelpers/scala-js
linker/jvm/src/main/scala/org/scalajs/linker/backend/closure/ClosureAstTransformer.scala
Scala
apache-2.0
20,173
package io.mca.twitter.rest import scala.concurrent.duration._ import scala.concurrent._ import akka.io.IO import akka.util.Timeout import akka.actor._ import akka.pattern.{ ask, pipe } import akka.actor.Status.Failure import spray.can.Http import spray.http._ import spray.httpx.SprayJsonSupport._ import spray.httpx...
mmacaulay/scala-twitter-api
src/main/scala/io/mca/twitter/rest/RESTClient.scala
Scala
mit
4,106
/* * 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 ...
chuckchen/spark
core/src/main/scala/org/apache/spark/Dependency.scala
Scala
apache-2.0
7,591
package scutil.math.extension import scala.annotation.tailrec object OrderingImplicits extends OrderingImplicits trait OrderingImplicits { implicit final class OrderingCompanionExt(peer:Ordering.type) { /** treats everything as equal, forms a Monoid with OrderingExt#orElse */ def trivial[T]:Ordering[T] = ...
ritschwumm/scutil
modules/core/src/main/scala/scutil/math/extension/OrderingImplicits.scala
Scala
bsd-2-clause
2,201
/* * 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...
wangyixiaohuihui/spark2-annotation
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/collect.scala
Scala
apache-2.0
5,014
package org.jetbrains.plugins.scala.lang.typeInference import com.intellij.openapi.extensions.Extensions import org.jetbrains.plugins.scala.lang.psi.impl.base.InterpolatedStringMacroTypeProvider import org.jetbrains.plugins.scala.lang.typeInference.testInjectors.SCL12987Injector import scala.annotation.nowarn /** ...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/typeInference/InterpolatedStringMacroTypeProviderTest.scala
Scala
apache-2.0
1,849
package models import javax.inject.Inject import play.api.db.slick.DatabaseConfigProvider import slick.driver.JdbcProfile import scala.concurrent.Future case class Task(id: Long, color: String, status: TaskStatus.Value, project: Long) { def patch(color: Option[String], status: Option[TaskStatus....
hluu/todos
app/models/Task.scala
Scala
mit
2,702
/* * Copyright 2016 Dennis Vriend * * 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...
dnvriend/akka-camel-test
src/main/scala/com/github/dnvriend/camel/rx/CamelOps.scala
Scala
apache-2.0
938
import akka.actor.{ActorRef, Actor, Status} import akka.camel.{Producer, CamelMessage, Consumer} import akka.util.Timeout import org.apache.camel.converter.stream.InputStreamCache import scala.concurrent.duration._ import scala.concurrent.ExecutionContext import scala.util.{Failure, Success} import akka.pattern.{Circui...
parwen68/soap-circuit-breaker-akka
src/main/scala/ProxyActor.scala
Scala
apache-2.0
1,599
package com.felixmilea.vorbit.actors import java.util.Date import akka.actor.Props import akka.actor.Actor import akka.actor.ActorRef import com.felixmilea.vorbit.utils.Loggable import com.felixmilea.vorbit.utils.AppUtils abstract class ActorManager extends Actor with Loggable { import ActorManager._ protected[t...
felixmc/Felix-Milea-Ciobanu-Vorbit
code/com/felixmilea/vorbit/actors/ActorManager.scala
Scala
mit
1,894
// code-examples/TypeLessDoMore/import-example1.scala import java.awt._ import java.io.File import java.io.File._ import java.util.{Map, HashMap}
XClouded/t4f-core
scala/src/tmp/TypeLessDoMore/import-example1.scala
Scala
apache-2.0
146
package io.ptx.fpinscala.laziness import io.ptx.fpinscala._ object Boot { type exercise = () => Unit def main(args: Array[String]): Unit = { println("This is Chapter 5, Strictness and Laziness") runExercise("Exercise 5.1", exercise51) } private def exercise51(): Unit = { println("YOLO") } ...
penland365/fpinscala
laziness/src/main/scala/io/penland365/fpinscala/Boot.scala
Scala
bsd-3-clause
415
// 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 ...
carstendev/Functional-Programming-in-Scala-Course
recfun/src/test/scala/recfun/PascalSuite.scala
Scala
apache-2.0
1,215
package scroll.internal.support.impl import scroll.internal.errors.SCROLLErrors.TypeError import scroll.internal.errors.SCROLLErrors.TypeNotFound import scroll.internal.graph.RoleGraphProxyApi import scroll.internal.support.RoleQueriesApi import scala.reflect.ClassTag import scala.reflect.classTag class RoleQueries(...
max-leuthaeuser/SCROLL
core/src/main/scala/scroll/internal/support/impl/RoleQueries.scala
Scala
lgpl-3.0
1,486
package tests import so.eval.{ EvaluationRequest, Router } import so.eval.SandboxedLanguage.Result import akka.pattern.ask import scala.concurrent.Await import scala.util.{ Failure, Try, Success } class SML extends LanguageTest { describe("The SML implementation") { it("should be able to successfully evaluate...
eval-so/minibcs
src/test/scala/languages/SML.scala
Scala
apache-2.0
1,011
package com.github.rosmith.nlp.service import com.github.rosmith.nlp.service.logic.GietClient import com.github.rosmith.nlp.query.model.AnnotatedSentence import com.github.rosmith.nlp.query.solution.IQuerySolution import com.github.rosmith.nlp.query.Query object Service { private var logic: GietClient = null de...
rosmith/giet
src/main/scala/com/github/rosmith/nlp/service/Service.scala
Scala
mit
539
package com.github.roberveral.mesosgocd.spec import mesosphere.mesos.protos.Resource import org.apache.mesos.Protos import org.scalatest.{FlatSpec, Matchers} import scala.collection.JavaConverters._ /** * Test for [[Implicits]] * * @author Rober Veral */ class ImplicitsSpec extends FlatSpec with Matchers { ...
roberveral/mesos-gocd
src/test/scala/com/github/roberveral/mesosgocd/spec/ImplicitsSpec.scala
Scala
apache-2.0
3,616
import java.awt.image.{BufferedImage, RenderedImage} import java.io.File import color.RGB import org.specs2.Specification import org.specs2.mock.Mockito import org.specs2.specification.core.SpecStructure import support.Image import org.hamcrest.CoreMatchers class ImageSpec extends Specification with Mockito { over...
wookenny/scalarty
src/test/scala/ImageSpec.scala
Scala
mit
4,075
/** * Created by glcohen on 12/26/15. */ import java.util.{Calendar, Date} import twitter4j._ import scala.collection.mutable.ListBuffer object DataIngest { private final val rateLimit = 450 // # search queries per 15 min interval // takes list of dates, returns Map of form [frequency, MM/DD/YYYY] def date...
glcohen/glcBot
src/main/scala/DataIngest.scala
Scala
mit
3,593
/* * 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 ...
yu-iskw/gihyo-spark-book-example
src/main/scala/jp/gihyo/spark/ch03/pairrdd_transformation/AggregateByKeyExample.scala
Scala
apache-2.0
1,763
package io.github.pauljamescleary.petstore.validation import cats.data.EitherT import io.github.pauljamescleary.petstore.model.Pet import scala.language.higherKinds sealed trait ValidationError extends Product with Serializable final case class PetAlreadyExistsError(pet: Pet) extends ValidationError final case objec...
jastice/intellij-scala
scala/scala-impl/testdata/localProjects/scala-pet-store/src/main/scala/io/github/pauljamescleary/petstore/validation/PetValidationAlgebra.scala
Scala
apache-2.0
663
package ru.wordmetrix.webcrawler import java.net.URI import akka.actor.ActorSystem import akka.testkit.{DefaultTimeout, ImplicitSender, TestKit, TestProbe} import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpecLike} import ru.wordmetrix.utils.CFG import ru.wordmetrix.vector.Vector import ru.wordmetrix.webcrawler...
electricmind/webcrawler
src/test/scala/ru/wordmetrix/webcrawler/TestSampleHierarchy2Priority.scala
Scala
apache-2.0
1,342
package com.lambtors.poker_api.module.poker.infrastructure.stub import scala.util.Random import com.lambtors.poker_api.module.poker.domain.model.CardSuit object CardSuitStub { def random(): CardSuit = Random.shuffle(CardSuit.all).head }
lambtors/poker-api
src/test/scala/com/lambtors/poker_api/module/poker/infrastructure/stub/CardSuitStub.scala
Scala
mit
242
package feh.tec.util import scala.collection.immutable.NumericRange import scala.math.Numeric.DoubleAsIfIntegral import scala.collection.{mutable, immutable} class UnitInterval(step: Double) extends NumericRange.Inclusive[Double](0, 1, step)(DoubleAsIfIntegral) object UnitInterval{ def inUnitInterval(d: Double) =...
fehu/agent-tareas
agent/src/main/scala/feh/tec/util/UnitInterval.scala
Scala
mit
3,243
package com.allaboutscala.learn.spark.sql import com.allaboutscala.learn.spark.utils.Context /** * Created by Nadim Bahadoor on 28/06/2016. * * Tutorial: Learn How To Use Apache Spark * * [[http://allaboutscala.com/big-data/spark/]] * * Copyright 2016 Nadim Bahadoor (http://allaboutscala.com) * * L...
nadimbahadoor/learn-spark
source-code/learn-spark/src/main/scala/com/allaboutscala/learn/spark/sql/SparkSQL_Tutorial.scala
Scala
apache-2.0
5,780
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2006-2010, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
cran/rkafkajars
java/scala/util/parsing/combinator/syntactical/StdTokenParsers.scala
Scala
apache-2.0
1,870
/* * 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 ...
yuyupapa/OpenSource
scouter.server/src/scouter/server/netio/service/handle/SummaryService.scala
Scala
apache-2.0
13,900
package net.fyrie.redis import org.specs2._ import akka.dispatch.Future import akka.testkit.{ filterEvents, EventFilter } class KeysSpec extends mutable.Specification with TestClient { "keys" >> { "should fetch keys" ! client { r ⇒ r.set("anshin-1", "debasish") r.set("anshin-2", "maulindu") ...
Tjoene/thesis
Case_Programs/fyrie-redis-master/src/test/scala/net/fyrie/redis/DBSpec.scala
Scala
gpl-2.0
8,926
/* * Copyright (c) 2015 Kevin Horlick * * 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...
beefyhalo/dense
src/main/scala/denses.scala
Scala
apache-2.0
1,693
/* * 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 ...
hhbyyh/spark
sql/core/src/test/scala/org/apache/spark/sql/DatasetCacheSuite.scala
Scala
apache-2.0
8,336
package test.billing import org.specs2.mutable._ import org.specs2.Specification import java.net.URL import org.specs2.matcher.MatchResult import org.specs2.execute.{ Result => SpecsResult } import com.stackmob.newman.response.{ HttpResponse, HttpResponseCode } import com.stackmob.newman._ import com.stackmob.newman.d...
indykish/vertice_gateway
test/billing/BilledhistoriesSpec.scala
Scala
mit
3,697
/* * Copyright 2001-2011 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...
JimCallahan/Graphics
external/scalatest/src/test/scala/org/scalatest/concurrent/TestThreadsStartingCounterSpec.scala
Scala
apache-2.0
2,126
package hu.ebratanki /** * @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)) } }
gergelyfabian/akka-test
src/main/scala/hu/ebratanki/App.scala
Scala
mit
254
// Copyright: 2010 - 2018 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/lgpl-3.0.en.html package org.ensime.sexp.formats import collection.{ immutable => im } import org.ensime.sexp._ // http://docs.scala-lang.org/overviews/collections/overview.html class CollectionFormatsSpec...
yyadavalli/ensime-server
s-express/src/test/scala/org/ensime/sexp/formats/CollectionFormatsSpec.scala
Scala
gpl-3.0
5,787
package prynt.test import prynt.util.DataLoader /* * Copyright (C) 2013 <mathieu.leclaire at free.fr> * * 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 * (...
mathieuleclaire/prynt
src/main/scala/prynt/test/Test.scala
Scala
lgpl-3.0
1,037
package com.nabijaczleweli.fancymagicks.reference import java.io.File import com.nabijaczleweli.fancymagicks.element.ElementalDamageSource import com.nabijaczleweli.fancymagicks.element.caster.aoe.{ElementShieldAOECaster, ElementEarthAOECaster} import com.nabijaczleweli.fancymagicks.entity.EntityAOEIceSpike import co...
nabijaczleweli/Magicks
src/main/scala/com/nabijaczleweli/fancymagicks/reference/Configuration.scala
Scala
mit
1,504
package uk.ac.ncl.openlab.intake24.services.systemdb.uxEvents import java.time.ZonedDateTime import java.util.UUID import uk.ac.ncl.openlab.intake24.errors.{CreateError, UnexpectedDatabaseError} /** * Created by Tim Osadchiy on 08/11/2017. */ case class UxEventIn(eventCategories: Seq[String], eventType: String,...
digitalinteraction/intake24
SystemDataServices/src/main/scala/uk/ac/ncl/openlab/intake24/services/systemdb/uxEvents/UxEventsDataService.scala
Scala
apache-2.0
735
package com.emotioncity.soriento import java.util.Date import com.emotioncity.soriento.annotations.{Embedded, EmbeddedSet, Linked} import org.scalatest.{BeforeAndAfter, FunSuite, Matchers} /** * Created by stream on 13.05.15. */ case class Owner(name: String) case class Address(location: String) case class Even...
b0c1/Soriento
src/test/scala/com/emotioncity/soriento/UseCaseTest.scala
Scala
apache-2.0
1,647
object B { type T[x] = C } class B { // not public, so this shouldn't be tracked as an inherited dependency private[this] class X extends D with E[Int] def x(i: Int): Unit = { // not public, not an inherited dependency trait Y extends D } def y(j: Int): Unit = { // not public val w: D { def length: Int...
mdedetrich/sbt
sbt/src/sbt-test/source-dependencies/inherited-dependencies/B.scala
Scala
bsd-3-clause
339
package blended.akka.http import domino.DominoActivator abstract class WebBundleActivator extends DominoActivator { val contentDir : String val contextName : String whenBundleActive { val uiRoute = new UiRoute(contentDir, getClass().getClassLoader()) // In an OSGi container this will be picked by the ...
woq-blended/blended
blended.akka.http/src/main/scala/blended/akka/http/WebBundleActivator.scala
Scala
apache-2.0
452
package com.highperformancespark.examples.transformations import org.apache.spark.rdd.RDD object NarrowAndWide { //toDO: Probably should write some sort of test for this. //this is used in chapter 4 for the stage diagram def sillySparkProgram(rdd1 : RDD[Int]) = { //tag::narrowWide[] //Narrow depend...
mahmoudhanafy/high-performance-spark-examples
src/main/scala/com/high-performance-spark-examples/transformations/NarrowAndWide.scala
Scala
apache-2.0
855
package com.twitter.finagle.kestrel.integration import com.twitter.conversions.time._ import com.twitter.finagle.Service import com.twitter.finagle.builder.ClientBuilder import com.twitter.finagle.kestrel.Server import com.twitter.finagle.kestrel.protocol._ import com.twitter.io.Buf import com.twitter.util.{Await, Tim...
travisbrown/finagle
finagle-kestrel/src/test/scala/com/twitter/finagle/kestrel/integration/InterpreterServiceTest.scala
Scala
apache-2.0
1,816
package io.peregrine import java.io.{File, FileNotFoundException, FileOutputStream} import java.lang.management.ManagementFactory import java.net.SocketAddress import com.twitter.finagle._ import com.twitter.finagle.http.codec.HttpServerDispatcher import com.twitter.finagle.http.{HttpMuxer, Request => FinagleRequest,...
pairi/pairi
src/main/scala/io/peregrine/PeregrineServer.scala
Scala
apache-2.0
5,806
package akashic.storage import java.io.StringWriter import java.nio.file.Files import akashic.storage.backend.Streams import org.apache.commons.io.{IOUtils, FileUtils} import org.scalatest.FunSuite class StreamsTest extends FunSuite { test("InputStream from Chunks") { val data = Stream( Some("akira".getB...
akiradeveloper/fss3
src/test/scala/akashic/storage/StreamsTest.scala
Scala
apache-2.0
549
package org.opendronecontrol package apps package leapController import platforms.ardrone._ import com.fishuyo._ import graphics._ import dynamic._ import java.awt.image.BufferedImage import java.nio.ByteBuffer import java.nio.ByteOrder import java.nio.FloatBuffer object Main extends App with GLAnimatable{ Simp...
IDMNYU/Creative-Coding-UG-Fall-2014
Class25/dronestuff/odc-master/apps/leapController/Main.scala
Scala
gpl-2.0
2,043
/* * 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 agreed to in writ...
scalatest/scalatest
jvm/scalatest-test/src/test/scala/org/scalatest/EveryShouldContainAllOfLogicalOrSpec.scala
Scala
apache-2.0
43,236
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/bin/BinaryEncodeCallbackTest.scala
Scala
apache-2.0
5,080
/* * Copyright (C) 2017 Belgrade Center for Digital Humanities * * 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. ...
BCDH/exist-algolia-index
src/main/scala/org/humanistika/exist/index/algolia/backend/IndexLocalStoreManagerActor.scala
Scala
gpl-3.0
21,155
def p(t) = (t, (-2) * t)
hmemcpy/milewski-ctfp-pdf
src/content/2.2/code/scala/snippet08.scala
Scala
gpl-3.0
24
package im.actor.server.api.rpc.service.auth import java.time.{ LocalDateTime, ZoneOffset } import akka.actor.ActorSystem import akka.event.Logging import akka.stream.ActorMaterializer import akka.util.Timeout import cats.data.Xor import im.actor.api.rpc._ import im.actor.api.rpc.auth.ApiEmailActivationType._ import ...
ufosky-server/actor-platform
actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/auth/AuthServiceImpl.scala
Scala
agpl-3.0
19,198