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
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. package com.azure.cosmos.spark import com.azure.cosmos.CosmosException import com.azure.cosmos.implementation.spark.OperationContextAndListenerTuple import com.azure.cosmos.models.FeedResponse import com.azure.cosmos.spark....
Azure/azure-sdk-for-java
sdk/cosmos/azure-cosmos-spark_3_2-12/src/main/scala/com/azure/cosmos/spark/TransientIOErrorsRetryingIterator.scala
Scala
mit
7,580
package com.monsanto.arch.kamon.prometheus.metric import com.monsanto.arch.kamon.prometheus.PrometheusGen import com.monsanto.arch.kamon.prometheus.metric.TextFormat.ParseHelper.MetricLine import kamon.util.MilliTimestamp import org.scalacheck.Gen import org.scalactic.Equality import org.scalatest.prop.GeneratorDriven...
MonsantoCo/kamon-prometheus
library/src/test/scala/com/monsanto/arch/kamon/prometheus/metric/TextFormatSpec.scala
Scala
bsd-3-clause
10,204
import scala.language.experimental.macros object Macros { object Shmacros { def foo(x: Int): Int = macro Impls.foo } def bar(x: Int): Int = macro Impls.bar } class Macros { def quux(x: Int): Int = macro Impls.quux } object Test extends App { import Macros.Shmacros._ println(foo(2) + Macros.bar(2) * ne...
lrytz/scala
test/files/run/macro-basic-mamd-mi/Macros_Test_2.scala
Scala
apache-2.0
342
package com.socrata.curator import java.io.Closeable import org.apache.curator.x.discovery.{strategies => providerStrategies, ServiceDiscovery} /** * Manages connections and requests to a service that's registered via Curator/ZK * @param discovery Service discovery object for querying Zookeeper * @param serviceNam...
socrata-platform/socrata-curator-utils
core/src/main/scala/com.socrata.curator/CuratorServiceBase.scala
Scala
apache-2.0
892
/* * 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 ...
actuaryzhang/spark
sql/hive/src/test/scala/org/apache/spark/sql/hive/StatisticsSuite.scala
Scala
apache-2.0
65,484
package com.ecfront.ez.framework.service.auth import com.ecfront.common.Resp import com.ecfront.ez.framework.core.EZServiceAdapter import com.ecfront.ez.framework.core.rpc.AutoBuildingProcessor import com.ecfront.ez.framework.core.rpc.apidoc.APIDocProcessor import com.fasterxml.jackson.databind.JsonNode import scala....
gudaoxuri/ez-framework
services/auth/src/main/scala/com/ecfront/ez/framework/service/auth/ServiceAdapter.scala
Scala
apache-2.0
2,571
/* * 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 ...
LantaoJin/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/MicroBatchExecution.scala
Scala
apache-2.0
26,920
package com.raquo.domtypes.generic.defs.styles.units import com.raquo.domtypes.generic.builders.DerivedStylePropBuilder trait CalcUnits[T[_]] extends DerivedStylePropBuilder[T] { /** Wrap the provided expression in CSS calc() function. * * @see https://developer.mozilla.org/en-US/docs/Web/CSS/calc() */...
raquo/scala-dom-types
shared/src/main/scala/com/raquo/domtypes/generic/defs/styles/units/CalcUnits.scala
Scala
mit
406
package com.github.pedrovgs.kuronometer.free.interpreter.api case class KuronometerApiClientConfig(scheme: String = "https", host: String = "kuronometer.io", port: Option[Int] = None) object KuronometerApiClientConfig { private[api] val hea...
pedrovgs/Kuronometer
kuronometer-core/src/main/scala/com/github/pedrovgs/kuronometer/free/interpreter/api/KuronometerApiClientConfig.scala
Scala
apache-2.0
427
package scavlink.settings import com.typesafe.config._ import scavlink.connection.{HeartbeatSettings, ConnectionConfig} import scala.collection.JavaConversions._ /** * MAVLink library settings. * An application must initialize the singleton with its config object before using the library. * Otherwise, it will loa...
nickolasrossi/scavlink
src/main/scala/scavlink/settings/ScavlinkConfig.scala
Scala
mit
735
/* * Copyright (C) 2005, The Beangle Software. * * 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 3 of the License, or * (at your option) any later version. * * This...
beangle/data
orm/src/main/scala/org/beangle/data/dao/AbstractQueryBuilder.scala
Scala
lgpl-3.0
6,701
package io.getquill.dsl import scala.language.implicitConversions import scala.language.experimental.macros import io.getquill.ast._ import scala.reflect.macros.whitebox.{ Context => MacroContext } import io.getquill.util.Messages._ import scala.annotation.tailrec import scala.util.DynamicVariable import scala.reflect...
mentegy/quill
quill-core/src/main/scala/io/getquill/dsl/DynamicQueryDSL.scala
Scala
apache-2.0
12,713
/* * This file is 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...
TresAmigosSD/SMV
src/main/scala/org/tresamigos/smv/SmvKeys.scala
Scala
apache-2.0
1,063
/** * Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com> */ package akka.actor.dungeon import akka.actor.PostRestartException import akka.actor.PreRestartException import akka.actor.{ InternalActorRef, ActorRef, ActorInterruptedException, ActorCell, Actor } import akka.dispatch._ import akka.dispatch.s...
Fincore/org.spark-project.akka
actor/src/main/scala/akka/actor/dungeon/FaultHandling.scala
Scala
mit
12,278
// Futures and Promises // New to Scala 2.10 (SIP-14) // https://docs.scala-lang.org/sips/pending/futures-promises.html import scala.concurrent.{future, Future} import scala.concurrent.ExecutionContext.Implicits.global import scala.util.{Success, Failure} def print_time(msg: String) { printf("%d: %s\\n", System.cu...
deanwampler/SeductionsOfScalaTutorial
code-examples/v2.10/futures-promises-sip14.scala
Scala
apache-2.0
1,698
/* * Copyright 2021 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
intel-analytics/BigDL
scala/ppml/src/main/scala/com/intel/analytics/bigdl/ppml/example/psi/PSIExample.scala
Scala
apache-2.0
2,264
/* Copyright 2012 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
twitter/scalding
scalding-core/src/main/scala/com/twitter/scalding/TupleSetter.scala
Scala
apache-2.0
3,306
package com.waltsu.wdht.storage import com.typesafe.config.ConfigFactory import com.waltsu.wdht.storage.models.StoredObject import com.waltsu.wdht.storage.tables.StoredObjectTable import slick.driver.PostgresDriver.api._ import scala.concurrent.Future import scala.concurrent.ExecutionContext.Implicits.global case cl...
waltsu/wdht
src/main/scala/com/waltsu/wdht/storage/StorageEngine.scala
Scala
mit
1,623
/** * Copyright (c) 2014-2016 Tim Bruijnzeels * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * - Redistributions of source code must retain the above copyright notice, * this list of...
timbru/rpki-ca
src/main/scala/nl/bruijnzeels/tim/rpki/common/cqrs/Command.scala
Scala
bsd-3-clause
1,732
package compiler sealed abstract class Ty case class IntTy() extends Ty case class BoolTy() extends Ty case class VoidTy() extends Ty sealed abstract class Stmt case class VrblDefStmt[T <: Ty](name : String, ty : T) extends Stmt case class AssgnStmt[T <: Ty](name : String, expr : Expr[T]) extends Stmt case class If(c...
JamesIry/SootPrototype
src/main/scala/compiler/AST.scala
Scala
apache-2.0
1,216
package com.github.mdr.mash.parser import com.github.mdr.mash.lexer.TokenType._ import com.github.mdr.mash.parser.ConcreteSyntax._ trait MishParse { self: MashParse ⇒ def mishExpr(): MishExpr = { val command = mishItem() val args = safeWhile(MISH_WORD || STRING_LITERAL || STRING_START || STRING_INTERPOLATI...
mdr/mash
src/main/scala/com/github/mdr/mash/parser/MishParse.scala
Scala
mit
1,336
/* * Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> */ /** * Contains ready to use built-in templates and template helpers. */ package object views package views { /** * Contains ready to use built-in templates and template helpers for html templates. */ package object html /** ...
jyotikamboj/container
pf-framework/src/play/src/main/scala/views/package.scala
Scala
mit
553
/** * Copyright (c) 2012 Alexey Aksenov ezh@ezh.msk.ru * * 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...
ezh/android-DigiLib
src/main/scala/org/digimead/digi/ctrl/lib/util/Android.scala
Scala
apache-2.0
13,787
/* * Copyright 2012 Alexander Bertram * * 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...
abertram/AntScout
src/main/scala/de.fhwedel.antscout/antnet/AntNode.scala
Scala
apache-2.0
20,547
package com.criteo.dev.cluster import com.criteo.dev.cluster.aws.AwsUtilities import com.criteo.dev.cluster.aws.AwsUtilities.NodeRole import com.criteo.dev.cluster.aws.AwsUtilities.NodeRole.NodeRole import com.criteo.dev.cluster.command.{ScpAction, SshAction} import org.slf4j.LoggerFactory /** * Start hadoop and oth...
criteo/berilia
src/main/scala/com/criteo/dev/cluster/StartServiceAction.scala
Scala
apache-2.0
887
/* ----------------- sse-breaker ----------------- *\\ * Licensed under the Apache License, Version 2.0. * * Author: Spiros Tzavellas * \\* ----------------------------------------------- */ package com.tzavellas.sse.breaker import java.lang.management.ManagementFactory import javax.management...
sptz45/sse-breaker
src/test/scala/com/tzavellas/sse/breaker/JmxIntegrationTest.scala
Scala
apache-2.0
1,816
package api import akka.event.{ NoLogging } import akka.http.testkit.RouteTest import com.typesafe.config.ConfigFactory import core.{DatabaseCfg, BootService} /** * */ trait TestBootService extends BootService { this: RouteTest => override val config = ConfigFactory.parseResources("test.conf") override val logg...
pnosko/staging.vita.infinita.api
src/test/scala/api/TestBootService.scala
Scala
cc0-1.0
365
// generated automatically by Taurus import io.gatling.core.Predef._ import io.gatling.http.Predef._ import scala.concurrent.duration._ class SIMNAME extends Simulation { val concurrency = Integer.getInteger("concurrency", 1).toInt val rampUpTime = Integer.getInteger("ramp-up", 0).toInt val holdForTime = Intege...
Blazemeter/taurus
tests/resources/gatling/generated_data_sources.scala
Scala
apache-2.0
1,498
val b = List(1,2,-1,3,-6,4).filter(_>0).reverse
grzegorzbalcerek/scala-exercises
Collections/stepCollectionsValB.scala
Scala
bsd-2-clause
48
/* * Copyright 2011-2021 Asakusa Framework Team. * * 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 ...
asakusafw/asakusafw-spark
extensions/iterativebatch/runtime/core/src/main/scala/com/asakusafw/spark/extensions/iterativebatch/runtime/graph/RoundAwareSource.scala
Scala
apache-2.0
2,181
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
intel-analytics/BigDL
scala/dllib/src/test/scala/com/intel/analytics/bigdl/dllib/utils/tf/loaders/DepthwiseConv2dNativeBackpropFilterSpec.scala
Scala
apache-2.0
2,611
package views.html package relay import play.api.libs.json.Json import lila.api.Context import lila.app.templating.Environment._ import lila.app.ui.ScalatagsTemplate._ import lila.common.String.html.safeJsonValue import controllers.routes object show { def apply( rt: lila.relay.RelayRound.WithTourAndStudy,...
luanlv/lila
app/views/relay/show.scala
Scala
mit
2,167
/* * 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
cluster/src/main/scala/com/linkedin/norbert/jmx/JMX.scala
Scala
apache-2.0
1,937
package com.github.jeffhanson.problem5 import scala.annotation.tailrec object SmallestDivisibleByRange { // create a list of divisors for convenience and clarity val divisors = Vector.range(2,21) /** * find the smallest multiple of numbers 1 thru 20. This function is * seeded by an initial...
Jeff-Hanson/scala-euler
src/main/scala/com/github/jeffhanson/problem5/SmallestDivisibleByRange.scala
Scala
apache-2.0
1,139
package lila.coach import org.joda.time.{ DateTime, Days } import lila.memo.PicfitImage case class Coach( _id: Coach.Id, // user ID listed: Coach.Listed, available: Coach.Available, profile: CoachProfile, picture: Option[PicfitImage.Id], nbReviews: Int, user: Coach.User, languages: Li...
luanlv/lila
modules/coach/src/main/Coach.scala
Scala
mit
1,368
/* * Copyright (c) 2011 by The Broad Institute of MIT and Harvard * All Rights Reserved. * * This software is licensed under the terms of the GNU Lesser General Public License (LGPL), Version 2.1 which * is available at http://www.opensource.org/licenses/lgpl-2.1.php. * * THE SOFTWARE IS PROVIDED "AS IS." THE BR...
AbeelLab/genometools
scala/abeel/genometools/bam2tdf/ConvertBAM2TDF.scala
Scala
gpl-3.0
4,767
package filodb.http import akka.actor.ActorRef import akka.http.scaladsl.model.{StatusCodes => Codes} import akka.http.scaladsl.server.Directives._ import com.typesafe.scalalogging.StrictLogging import de.heikoseeberger.akkahttpcirce.FailFastCirceSupport import filodb.coordinator.{CurrentShardSnapshot, NodeClusterAct...
filodb/FiloDB
http/src/main/scala/filodb/http/ClusterApiRoute.scala
Scala
apache-2.0
5,077
package org.jetbrains.plugins.scala.lang.completion.postfix.templates import java.util import com.intellij.codeInsight.template.postfix.templates._ import com.intellij.openapi.editor.Editor import com.intellij.psi.PsiFile import com.intellij.util.containers.ContainerUtil /** * @author Roman.Shein * @since 03.09.20...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/lang/completion/postfix/templates/ScalaPostfixTemplateProvider.scala
Scala
apache-2.0
1,840
package com.overviewdocs.background.filecleanup import akka.actor.{ Actor, ActorRef, Props} import akka.pattern.pipe import com.overviewdocs.util.Logger object FileCleanerProtocol { case class Clean(fileId: Long) case class CleanComplete(fileId: Long) } /** * Deletes the [[File]] with the specified `fileId`, ...
overview/overview-server
worker/src/main/scala/com/overviewdocs/background/filecleanup/FileCleaner.scala
Scala
agpl-3.0
1,606
/** * @author Yuuto */ package yuuto.enhancedinventories.compat.inventorytools import yuuto.inventorytools.api.dolly.handlers.defaults.tile.InventoryDollyTileHandler import yuuto.inventorytools.api.dolly.BlockData import net.minecraft.nbt.NBTTagList import net.minecraft.entity.player.EntityPlayer import net.minecraf...
AnimeniacYuuto/EnhancedInventories
src/main/scala/yuuto/enhancedinventories/compat/inventorytools/ConnectiveDollyTileHandler.scala
Scala
gpl-2.0
2,215
package aia.persistence import akka.actor._ import aia.persistence.rest.ShoppersServiceSupport object SingletonMain extends App with ShoppersServiceSupport { implicit val system = ActorSystem("shoppers") val shoppers = system.actorOf(ShoppersSingleton.props, ShoppersSingleton.name) startService(shoppers) }
gilbutITbook/006877
chapter-persistence/src/main/scala/aia/persistence/SingletonMain.scala
Scala
mit
320
/* * Copyright 2012 Twitter Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
dsias/zipkin
zipkin-hadoop/src/test/scala/com/twitter/zipkin/hadoop/PopularKeysSpec.scala
Scala
apache-2.0
2,401
trait SomeRestriction enum ADT { case A extends ADT case B extends ADT with SomeRestriction } object MinimalExample { val b: ADT & SomeRestriction = ADT.B b match { case ADT.B => ??? } }
dotty-staging/dotty
tests/patmat/i12546.scala
Scala
apache-2.0
204
package akka import akka.actor._ import akka.contrib.pattern.ClusterSingletonProxy import akka.util.Timeout import com.typesafe.config.ConfigFactory import scala.concurrent.duration._ import scala.language.postfixOps object QuizActors { implicit val timeout = Timeout(600 seconds) //val frontendActor = FrontE...
djoudjou/Quiz
app/akka/QuizActors.scala
Scala
cc0-1.0
680
package scalabpe.plugin.cache import java.util.concurrent.ArrayBlockingQueue import java.util.concurrent.RejectedExecutionException import java.util.concurrent.ThreadFactory import java.util.concurrent.ThreadPoolExecutor import java.util.concurrent.TimeUnit import scala.collection.mutable.ArrayBuffer import scala.xml...
bruceran/scalabpe
src/scalabpe/plugin/cache/actor_redis.scala
Scala
apache-2.0
6,125
package org.jetbrains.plugins.scala.actions import com.intellij.openapi.actionSystem._ import com.intellij.openapi.application.ModalityState import com.intellij.openapi.editor.EditorFactory import com.intellij.openapi.editor.ex.EditorEx import com.intellij.openapi.project.Project import com.intellij.util.FileContentUt...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/actions/ToggleTypeAwareHighlightingAction.scala
Scala
apache-2.0
1,744
package rocks.molarialessandro import rocks.molarialessandro.coordinates.Coordinates class Color(coordinates: Coordinates) { def asHSBA = coordinates.convertToHSBA def asRGBA = coordinates.convertToRGBA }
alem0lars/claps
src/main/scala/rocks/molarialessandro/Color.scala
Scala
apache-2.0
213
package net.shiroka.tools.ofx.conversions import java.io._ import scala.io.Source import scala.util.control.Exception.allCatch import com.github.tototoshi.csv._ import org.joda.time._ import org.joda.time.format._ import com.typesafe.config.Config import net.shiroka.tools.ofx._ import Transaction._ import implicits.Ta...
ikuo/ofx-tools
src/main/scala/net/shiroka/tools/ofx/conversions/ShinseiSpauth.scala
Scala
mit
2,210
/* * Copyright 2012 Pellucid and Zenexity * * 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 ag...
Enalmada/datomisca
core/src/main/scala/datomisca/Datom.scala
Scala
apache-2.0
1,100
import sbt._ import reaktor.scct.ScctProject import net.usersource.jettyembed.JettyEmbedWebProject class TwitterPipeline(info: ProjectInfo) extends JettyEmbedWebProject(info) with AkkaProject with ScctProject with IdeaProject { val remote = akkaModule("remote") val testit = akkaModule("testkit") val signpost =...
glenford/TwitterPipeline
project/build/TwitterPipeline.scala
Scala
apache-2.0
672
/* * Copyright 2009-2016 DigitalGlobe, 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 ag...
akarmas/mrgeo
mrgeo-mapalgebra/mrgeo-mapalgebra-rastermath/src/main/scala/org/mrgeo/mapalgebra/binarymath/DivMapOp.scala
Scala
apache-2.0
2,137
/* Copyright 2012 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
cchepelov/scalding
scalding-core/src/main/scala/com/twitter/scalding/mathematics/Matrix.scala
Scala
apache-2.0
44,642
/* * Copyright (c) 2015 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/schema-guru
src/main/scala/com.snowplowanalytics/schemaguru/schema/types/StringSchema.scala
Scala
apache-2.0
2,140
/* * 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 ...
goldmedal/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/finishAnalysis.scala
Scala
apache-2.0
4,119
package scray.querying.source.costs /** * result of the getCosts operation */ case class QueryCosts(estimatedAmount: Double, estimatedCardinality: Long)
scray/scray
scray-querying/modules/scray-querying/src/main/scala/scray/querying/source/costs/QueryCosts.scala
Scala
apache-2.0
155
package net.fwbrasil.radon.transaction import net.fwbrasil.radon.RetryLimitTransactionException import net.fwbrasil.radon.RadonContext import net.fwbrasil.radon.RequiredTransactionException import net.fwbrasil.radon.ConcurrentTransactionException import net.fwbrasil.radon.util.ExclusiveThreadLocal import scala....
fwbrasil/radon-stm
src/main/scala/net/fwbrasil/radon/transaction/TransactionManager.scala
Scala
lgpl-2.1
3,992
/* * 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 ...
witgo/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala
Scala
apache-2.0
24,031
package pl.touk.nussknacker.engine.spel.typer import pl.touk.nussknacker.engine.TypeDefinitionSet import pl.touk.nussknacker.engine.api.process.ClassExtractionSettings import pl.touk.nussknacker.engine.api.typed.typing._ import pl.touk.nussknacker.engine.definition.TypeInfos.{ClazzDefinition, MethodInfo} import pl.tou...
TouK/nussknacker
interpreter/src/main/scala/pl/touk/nussknacker/engine/spel/typer/TypeMethodReference.scala
Scala
apache-2.0
4,996
package sigmastate.serialization import sigmastate.Values.{ConcreteCollection, IntArrayConstant, IntConstant, IntValue} import sigmastate.serialization.ErgoTreeSerializer.DefaultSerializer import sigmastate.{EQ, SInt, SubstConstants} class SubstConstantsSerializerSpecification extends SerializationSpecification { ...
ScorexFoundation/sigmastate-interpreter
sigmastate/src/test/scala/sigmastate/serialization/SubstConstantsSerializerSpecification.scala
Scala
mit
730
package dotty.tools.dotc package transform import TreeTransforms._ import core._ import DenotTransformers._ import Symbols._ import SymDenotations._ import Contexts._ import Types._ import Flags._ import Decorators._ import SymUtils._ import util.Attachment import core.StdNames.nme import ast.Trees._ /** This phase e...
AlexSikia/dotty
src/dotty/tools/dotc/transform/ElimByName.scala
Scala
bsd-3-clause
5,197
import leon.lang._ import leon.math._ import leon.proof.check import leon.collection._ import leon.annotation._ import synthesis._ object MatrixDisplayer { def maxLength(a: List[String], init: BigInt): BigInt = a match { case Nil() => init case Cons(a, tail) => maxLength(tail, max(a.bigLength, init)) }...
epfl-lara/leon
testcases/stringrender/MatrixDisplayer.scala
Scala
gpl-3.0
2,545
package edu.stanford.nlp.tmt; package model; import llda.LabeledLDADocumentParams; package object plda { type PLDADocumentParams = LabeledLDADocumentParams; }
quhfus/DoSeR
Stanford Topic Model/src/main/scala/edu/stanford/nlp/tmt/model/plda/package.scala
Scala
gpl-2.0
166
package tryp import java.util.concurrent._ import fs2.Sink import cats.effect.Effect import cats.Monoid final class FWriterOps[F[_], W, O](self: Stream[F, Either[W, O]]) { def unifyEither[W2 >: W](e: Either[W, O])(implicit ev: O <:< W2): W2 = e match { case Left(w) => w case Right(o) => ev.apply(o...
tek/pulsar
main/src/lib_ext/fs2/stream.scala
Scala
mit
2,414
package de.sciss.fscape import de.sciss.kollflitz.Vec import scala.annotation.tailrec import scala.concurrent.Promise class WindowIndexWhereSpec extends UGenSpec { def mkExpected(in: Vec[Int]): Int = in.indexWhere(_ > 0) "The WindowIndexWhere UGen" should "work as intended" in { val p = Promise[Vec[Int]](...
Sciss/FScape-next
core/jvm/src/test/scala/de/sciss/fscape/WindowIndexWhereSpec.scala
Scala
agpl-3.0
1,475
package example import java.util.concurrent.TimeUnit import akka.actor.ActorRef import akka.http.javadsl.model.headers.SetCookie import akka.http.scaladsl.model.headers.HttpCookie import akka.http.scaladsl.model.{ContentTypes, DateTime, HttpResponse} import akka.pattern._ import akka.stream.ActorMaterializer import a...
Meduzz/Bitziness
src/test/scala/example/PingService.scala
Scala
apache-2.0
4,462
/* * Copyright 2015 Commonwealth Computer Research, 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 applicabl...
mmatz-ccri/geomesa
geomesa-feature/src/main/scala/org/locationtech/geomesa/feature/kryo/KryoGeometrySerializer.scala
Scala
apache-2.0
2,402
package com.wellfactored.restless.query import QueryAST._ /** * Provide functions to convert a Query to it's String representation */ object QueryPrinter { def print(q: Query): String = { q match { case All => "all" case SEQ(path, s) => s"""${print(path)} = "$s"""" case SNEQ(path, s) => s"...
WellFactored/restless
core/src/main/scala/com/wellfactored/restless/query/QueryPrinter.scala
Scala
mit
1,269
package controllers.c1 import play.api.http.HttpErrorHandler import play.api.mvc._ import play.api.mvc.Results._ import scala.concurrent._ /** * Created by trydofor on 7/3/15. * @see https://playframework.com/documentation/2.4.x/ScalaErrorHandling * @see https://github.com/playframework/playframework/blob/2.4.x/do...
moilioncircle/playframework-2.4.x-scala
app/controllers/c1/S8ScalaErrorHandling.scala
Scala
apache-2.0
2,416
package edu.arizona.sista.odin /** Represents the current state of the ExtractorEngine. * Contains all the mentions found in previous iterations. */ class State(val lookUpTable: MentionLUT = Map.empty) { import State._ /** Merges the current state with the provided mentions and returns a new State object. */ ...
VivianLuwenHuangfu/processors
src/main/scala/edu/arizona/sista/odin/State.scala
Scala
apache-2.0
2,610
package org.psesd.srx.shared.core.config import java.net.URI import org.psesd.srx.shared.core.io.AmazonS3Client import org.psesd.srx.shared.core.exceptions.{ArgumentInvalidException, ArgumentNullException, ArgumentNullOrEmptyOrWhitespaceException} import org.psesd.srx.shared.core.extensions.TypeExtensions._ import s...
PSESD/srx-shared-core
src/main/scala/org/psesd/srx/shared/core/config/SftpConfig.scala
Scala
mit
3,328
package nodescala import scala.language.postfixOps import scala.util.{Try, Success, Failure} import scala.collection._ import scala.concurrent._ import ExecutionContext.Implicits.global import scala.concurrent.duration._ import scala.async.Async.{async, await} import org.scalatest._ import NodeScala._ import org.junit...
tanderegg/reactive-class
week3/nodescala/src/test/scala/nodescala/tests.scala
Scala
mit
5,094
/** * Copyright (C) 2009-2012 the original author or authors. * See the notice.md file distributed with this work for additional * information regarding copyright ownership. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
chirino/amqp-benchmark
src/main/scala/org/fusesource/amqp/benchmark/ProtonScenario.scala
Scala
apache-2.0
11,280
package fr.univnantes.vroom.control.update import fr.univnantes.vroom.control.Command import fr.univnantes.vroom.core.Systeme import fr.univnantes.vroom.core.dto.materiel.MaterielFixeDTO import fr.univnantes.vroom.datacontroller.Mediator /** * Commande d'update de materiel fixe disponible * @param system Objet u...
Callidon/v-room
src/main/scala/fr/univnantes/vroom/control/update/UpdateMaterielFixeDisponibleCommande.scala
Scala
mit
1,104
package nl.codecentric.assumption.dsl.core.parser import nl.codecentric.assumption.dsl.api.model._ import scala.util.parsing.combinator.RegexParsers import scala.util.parsing.input.Positional /** * Created by hylke on 01/07/15. */ object ExperimentTextParser extends RegexParsers with Positional { private val eo...
craftsmenlabs/gareth-poc
dsl/core/src/main/scala/nl/codecentric/assumption/dsl/core/parser/ExperimentTextParser.scala
Scala
gpl-2.0
2,752
/* * 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 ...
zero323/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/RemoveRedundantSortsSuite.scala
Scala
apache-2.0
6,935
/* * Copyright 2017 Datamountaineer. * * 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...
datamountaineer/stream-reactor
kafka-connect-mongodb/src/test/scala/com/datamountaineer/streamreactor/connect/mongodb/Output.scala
Scala
apache-2.0
2,653
// Databricks notebook source // MAGIC %md // MAGIC ScaDaMaLe Course [site](https://lamastex.github.io/scalable-data-science/sds/3/x/) and [book](https://lamastex.github.io/ScaDaMaLe/index.html) // COMMAND ---------- // MAGIC %md // MAGIC # Utilities Needed for Mass Media Data // MAGIC // MAGIC Johannes Graner ([Lin...
lamastex/scalable-data-science
dbcArchives/2021/000_9-sds-3-x-trends/000b_gdelt_utils.scala
Scala
unlicense
1,647
package object pair { class C object O } package pair { } import /* */pair._ trait T { println(/* line: 3 */ O.getClass) println(classOf[ /* line: 2 */ C]) }
ilinum/intellij-scala
testdata/resolve2/import/source/PackageWithObject.scala
Scala
apache-2.0
168
/* * Copyright 2014 IBM Corp. * * 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...
yeghishe/spark-kernel
kernel/src/main/scala/com/ibm/spark/magic/builtin/AddJar.scala
Scala
apache-2.0
3,273
/* * 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 ...
yelshater/hadoop-2.3.0
spark-core_2.10-1.0.0-cdh5.1.0/src/main/scala/org/apache/spark/deploy/client/TestExecutor.scala
Scala
apache-2.0
997
/* * Copyright 2013 Stephane Godbillon (@sgodbillon) * * 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 applicabl...
mcveat/ReactiveMongo
bson/src/main/scala/bson.scala
Scala
apache-2.0
5,008
package com.artclod import org.joda.time.DateTime import scala.language.implicitConversions package object time { implicit def java2JodaDate(javaDate: java.util.Date) : DateTime = if(javaDate == null){null}else{new DateTime(javaDate)} implicit def java2JodaOptionDate(javaDate: Option[java.util.Date]) : Option[...
kristiankime/calc-tutor
app/com/artclod/time/package.scala
Scala
mit
366
package com.sksamuel.elastic4s import com.sksamuel.elastic4s.ElasticDsl._ import org.scalatest.FlatSpec import org.scalatest.mock.MockitoSugar import com.sksamuel.elastic4s.testkit.ElasticSugar /** @author Stephen Samuel */ class DeleteTest extends FlatSpec with MockitoSugar with ElasticSugar { client.execute( ...
beni55/elastic4s
elastic4s-core-tests/src/test/scala/com/sksamuel/elastic4s/DeleteTest.scala
Scala
apache-2.0
1,235
package org.zachary.aws_repl import com.amazonaws.ClientConfiguration import com.amazonaws.auth.AWSCredentialsProvider import com.amazonaws.regions.Region class Clients(provider: AWSCredentialsProvider, configuration: ClientConfiguration, region: Region) { val asg = new ExtendedASGClient(provider, configuration) ...
zacharyp/aws_repl
lib/src/main/scala/org/zachary/aws_repl/Clients.scala
Scala
mit
1,114
/** * Copyright (C) 2018 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...
brunobuzzi/orbeon-forms
form-runner/jvm/src/test/scala/org/orbeon/xbl/NumberSupportTest.scala
Scala
lgpl-2.1
5,802
/** * Created by 58 on 2015/4/11. */ import java.util.Calendar import common.mutil import malgo.{LR_LBFGS, LR_OWLQN} import org.apache.commons.cli._ import org.apache.hadoop.fs.{FileSystem, Path} import org.apache.spark.SparkContext import org.apache.spark.mllib.classification.{LogisticRegressionModel, LogisticRegr...
hu17889/mllib_subpackage
src/main/scala/mllib_lr.scala
Scala
apache-2.0
13,177
package io.getquill.context.cassandra import scala.concurrent.ExecutionContext.Implicits.global class QueryResultTypeCassandraAsyncSpec extends QueryResultTypeCassandraSpec { val context = testAsyncDB import context._ override def beforeAll = { await(context.run(deleteAll)) await(context.run(liftQuer...
jcranky/quill
quill-cassandra/src/test/scala/io/getquill/context/cassandra/QueryResultTypeCassandraAsyncSpec.scala
Scala
apache-2.0
1,165
package play.modules.gjson import gkit.Pickler import play.api.libs.json._ import org.joda.time.DateTime import scala.language.experimental.macros import scalaz.\\/ import scalaz.std.list._ import scalaz.syntax.either._ import scalaz.syntax.std.option._ import scalaz.syntax.traverse._ import shapeless._ import sh...
kindleit/gkit
play-gjson/src/main/scala/JSONPickler.scala
Scala
apache-2.0
6,520
package momijikawa.p2pscalaproto import org.specs2.mutable._ import com.typesafe.config.ConfigFactory class ChordSpec extends Specification { 1 === 1 }
windymelt/p2pScalaProto
src/test/scala/momijikawa/p2pscalaproto/ChordSpec.scala
Scala
bsd-3-clause
156
/* * Copyright 2014 Treode, 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...
Treode/store
demos/movies/server/src/movies/Main.scala
Scala
apache-2.0
2,284
/** Copyright 2016 - 2021 Martin Mauch (@nightscape) * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicab...
crealytics/spark-excel
src/main/3.2/scala/com/crealytics/spark/v2/excel/ExcelTable.scala
Scala
apache-2.0
4,379
/** * Copyright (C) 2016 Hurence (support@hurence.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
Hurence/log-island
logisland-core/logisland-engines/logisland-engine-spark_1_6/src/main/scala/com/hurence/logisland/util/kafka/KafkaOffsetUtils.scala
Scala
apache-2.0
2,207
import java.io.{File, PrintWriter} import scala.concurrent.Await import scala.util.{Try, Failure, Success} import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration._ /** * Created by pnagarjuna on 02/11/15. */ object Main { def main (args: Array[String]): Unit = { println("S...
pamu/bikes-pricing
src/main/scala/Main.scala
Scala
apache-2.0
2,673
package org.bitcoins.spvnode.block import org.bitcoins.core.consensus.Merkle import org.bitcoins.core.crypto.DoubleSha256Digest import org.bitcoins.core.number.{UInt32, UInt64} import org.bitcoins.core.protocol.CompactSizeUInt import org.bitcoins.core.protocol.blockchain.Block import org.bitcoins.core.util._ import s...
bitcoin-s/bitcoin-s-spv-node
src/main/scala/org/bitcoins/spvnode/block/PartialMerkleTree.scala
Scala
mit
16,681
package util import java.io.File import util.ControlUtil._ import org.apache.commons.io.FileUtils /** * Provides directories used by GitBucket. */ object Directory { val GitBucketHome = (System.getProperty("gitbucket.home") match { // -Dgitbucket.home=<path> case path if(path != null) => new File(path) ...
geeksville/gitbucket
src/main/scala/util/Directory.scala
Scala
apache-2.0
2,546
package com.twitter.algebird import scala.annotation.implicitNotFound /** * Creates an instance of `T` given an `Int`. We use this type class to generate input data of type `T` for CMS. */ @implicitNotFound("No member of type class FromIntLike in scope for ${T}") trait FromIntLike[T] { def fromInt(x: Int): T } ...
erikerlandson/algebird
algebird-test/src/test/scala/com/twitter/algebird/FromIntLike.scala
Scala
apache-2.0
1,166
package dotty.tools package dotc package typer import dotty.tools.dotc.ast.{Trees, tpd, untpd} import Trees._ import core._ import Flags._ import Symbols._ import Flags._ import Types._ import Decorators._ import StdNames.nme import Contexts._ import Names.{Name, TermName} import NameKinds.{InlineAccessorName, UniqueI...
dotty-staging/dotty
compiler/src/dotty/tools/dotc/typer/PrepareInlineable.scala
Scala
apache-2.0
14,268
/* * Copyright 2016 MongoDB, 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...
jCalamari/mongo-scala-driver
driver/src/test/scala/org/mongodb/scala/model/CollationSpec.scala
Scala
apache-2.0
2,801
/* * 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
connector/src/test/scala/quasar/fs/BackendDefSpec.scala
Scala
apache-2.0
2,283
package com.rabbitonweb.nnspc import scala.annotation.tailrec class P04[T] { final def length(list: List[T]): Int = { @tailrec def sum(acc: Int, lt: List[T]): Int = lt match { case Nil => acc case head :: tail => sum(acc + 1, tail) } sum(0, list) } }
rabbitonweb/99-scala-problems
src/main/scala/com/rabbitonweb/nnspc/P04.scala
Scala
gpl-2.0
286