code stringlengths 5 1M | repo_name stringlengths 5 109 | path stringlengths 6 208 | language stringclasses 1
value | license stringclasses 15
values | size int64 5 1M |
|---|---|---|---|---|---|
package jp.pigumer.sbt.cloud.aws.cloudformation
import com.amazonaws.services.cloudformation.AmazonCloudFormation
import com.amazonaws.services.cloudformation.model.DescribeStacksRequest
import com.amazonaws.waiters.{Waiter, WaiterParameters}
class CloudFormationWaiter(cloudformation: AmazonCloudFormation,
... | PigumerGroup/sbt-aws-cloudformation | src/main/scala/jp/pigumer/sbt/cloud/aws/cloudformation/CloudFormationWaiter.scala | Scala | mit | 496 |
package controllers
import contexts.AuthorizationContext
import models.AccessToken
import play.api.Play.current
import play.api.data.Form
import play.api.libs.concurrent.Execution.Implicits.defaultContext
import play.api.libs.concurrent.Promise
import play.api.libs.json.JsValue
import play.api.mvc._
import utils.excep... | KIWIKIGMBH/kiwierp | kiwierp-backend/app/controllers/KiwiERPController.scala | Scala | mpl-2.0 | 3,438 |
/*
** Copyright [2013-2016] [Megam Systems]
**
** 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... | meglytics/bidi | app/Global.scala | Scala | mit | 3,999 |
package es.upm.oeg.epnoi.matching.metrics.domain.entity
import es.upm.oeg.epnoi.matching.metrics.feature.WordCounter
import org.apache.spark.mllib.linalg.{Vectors, Vector}
/**
* Relevant data to interpreting and preserving the results of scientific investigations (e.g. publications,
* source code, data artefacts, m... | cbadenes/epnoi-matching-metrics | src/main/scala/es/upm/oeg/epnoi/matching/metrics/domain/entity/RegularResource.scala | Scala | apache-2.0 | 1,338 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | dbtsai/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/ObjectHashAggregateExec.scala | Scala | apache-2.0 | 6,483 |
package TAPL
import TAPL.Lib._
object RcdSubBot {
trait Alg[E, T] extends Bot.Alg[E, T] with TypedRecord.Alg[E, T]
trait Print extends Alg[String, String] with Bot.Print with TypedRecord.Print
trait Parse[E, T] extends Bot.Parse[E, T] with TypedRecord.Parse[E, T] {
override val alg: Alg[E, T]
val p... | hy-zhang/parser | Scala/Parser/src/TAPL/RcdSubBot.scala | Scala | bsd-3-clause | 831 |
package org.http4s.server.staticcontent
import org.http4s._
import scalaz.concurrent.Task
/** Cache strategy that doesn't cache anything, ever. */
object NoopCacheStrategy extends CacheStrategy {
override def cache(uriPath: String, resp: Response): Task[Response] = Task.now(resp)
}
| hvesalai/http4s | server/src/main/scala/org/http4s/server/staticcontent/NoopCacheStrategy.scala | Scala | apache-2.0 | 288 |
/**
* Copyright (c) 2007-2011 Eric Torreborre <etorreborre@yahoo.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
* the rights ... | Muki-SkyWalker/specs | src/main/scala/org/specs/form/LineForm.scala | Scala | mit | 4,570 |
/* Copyright 2009-2021 EPFL, Lausanne */
package stainless
package extraction
package innerfuns
trait TransformerWithPC extends transformers.TransformerWithPC {
val s: Trees
val t: Trees
override def transform(e: s.Expr, env: Env): t.Expr = e match {
case s.LetRec(defs, body) =>
t.LetRec(
def... | epfl-lara/stainless | core/src/main/scala/stainless/extraction/innerfuns/TransformerWithPC.scala | Scala | apache-2.0 | 980 |
package sss.db
import javax.sql.DataSource
import sss.db.PagedView.ToIterator
import scala.util.{Failure, Success}
/**
* Created by alan on 6/21/16.
*/
trait Page {
val rows: Rows
val next: FutureTx[Option[Page]]
val prev: FutureTx[Option[Page]]
val hasNext: FutureTx[Boolean] = next.map(_.isDefined)
va... | mcsherrylabs/sss.db | src/main/scala/sss/db/PagedView.scala | Scala | gpl-3.0 | 3,710 |
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs
// License: http://www.gnu.org/licenses/gpl-3.0.en.html
package org.ensime.server
import scala.concurrent.{ Future, Promise }
import io.netty.bootstrap.ServerBootstrap
import io.netty.channel.nio.NioEventLoopGroup
import io.netty.channel.socket.... | VlachJosef/ensime-server | server/src/main/scala/org/ensime/server/WebServer.scala | Scala | gpl-3.0 | 2,735 |
package com.bwsw.tstreamstransactionserver.options
object ClientOptions {
/** The options are applied as filters on establishing connection to a server.
*
* @param connectionTimeoutMs the time to wait while trying to establish a connection to a server.
* @param retryDelayMs delays between retry at... | bwsw/tstreams-transaction-server | src/main/scala/com/bwsw/tstreamstransactionserver/options/ClientOptions.scala | Scala | apache-2.0 | 1,061 |
/*
* 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 ... | ddna1021/spark | sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala | Scala | apache-2.0 | 37,919 |
object Test {
object Foo
val f: Option[Foo.type] = Some(Foo)
}
| loskutov/intellij-scala | testdata/scalacTests/pos/t1208.scala | Scala | apache-2.0 | 67 |
// #2417
object Test {
def parallel(numThreads: Int)(block: => Unit) {
var failure: Throwable = null
val threads = Array.tabulate(numThreads)(i => new Thread {
override def run {
try {
block
} catch {
case x: Throwable => failure = x
}
}
}... | felixmulder/scala | test/files/run/t2417.scala | Scala | bsd-3-clause | 2,109 |
package io.ddf.flink.content
import org.rosuda.REngine.{REXP, RList}
case class FlinkRList(content: Array[REXP], names: Array[String])
object FlinkRList extends Serializable {
def apply(rList: RList, names: Array[String]): FlinkRList = {
val columnSize = names.length
val content: Array[REXP] = (0 to column... | ddf-project/ddf-flink | flink/src/main/scala/io/ddf/flink/content/FlinkRList.scala | Scala | apache-2.0 | 428 |
package au.com.feedbacker.controllers
import au.com.feedbacker.AllFixtures
import au.com.feedbacker.model.{CredentialStatus, Credentials, Person, PersonDao}
import play.api.test.Helpers._
import org.scalatest.mock.MockitoSugar
import org.mockito.Mockito._
import org.mockito.Matchers._
import org.scalatest.prop.Propert... | lachlang/feedbacker | test/au/com/feedbacker/controllers/AuthenticationSpec.scala | Scala | apache-2.0 | 7,501 |
package colossus
package protocols.http
import core._
import service._
import parsing._
import DataSize._
class BaseHttpServerCodec[T <: BaseHttpResponse](maxSize: DataSize = 1.MB) extends Codec.ServerCodec[HttpRequest, T] {
private var parser = HttpRequestParser(maxSize)
def encode(response: T): DataReader = ... | zhoucen/colossus | colossus/src/main/scala/colossus/protocols/http/HttpServerCodec.scala | Scala | apache-2.0 | 730 |
/**
* This file is part of the TA Buddy project.
* Copyright (c) 2013-2015 Alexey Aksenov ezh@ezh.msk.ru
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Global License version 3
* as published by the Free Software Foundation with the addition... | digimead/digi-TABuddy-desktop | part-model-editor/src/main/scala/org/digimead/tabuddy/desktop/model/editor/ui/view/editor/View.scala | Scala | agpl-3.0 | 7,763 |
/*
* Copyright 2017 by Simba Project
*
* 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 agree... | InitialDLab/Simba | src/test/scala/org/apache/spark/sql/simba/index/IntervalSuite.scala | Scala | apache-2.0 | 3,547 |
package spark
import spark._
import scala.io.Source
import scala.collection.mutable._
import scala.util.Random
import java.util.Date
object LRHelpers {
def parse(path: String, slices: Integer):Array[Array[Array[Double]]] = {
val source = Source.fromFile(path)
val lines = source.mkString.split... | jperla/spark-advancers | examples/src/main/scala/spark/examples/AsymUPConvex.scala | Scala | bsd-3-clause | 4,998 |
/* __ *\\
** ________ ___ / / ___ __ ____ Scala.js tools **
** / __/ __// _ | / / / _ | __ / // __/ (c) 2014, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ **
** /____/\\___/... | xuwei-k/scala-js | tools/shared/src/main/scala/org/scalajs/core/tools/javascript/Printers.scala | Scala | bsd-3-clause | 17,572 |
package me.snov.akka.sqs.shape
import akka.stream._
import akka.stream.stage.GraphStage
import com.amazonaws.services.sqs.model.Message
import me.snov.akka.sqs.client.{SqsClient, SqsSettings}
object SqsSourceShape {
def apply(settings: SqsSettings): SqsSourceShape = apply(SqsClient(settings))
def apply(client: S... | s12v/akka-stream-sqs | src/main/scala/me/snov/akka/sqs/shape/SqsSourceShape.scala | Scala | apache-2.0 | 900 |
/** Copyright 2015 TappingStone, 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 ... | alex9311/PredictionIO | core/src/test/scala/org/apache/predictionio/workflow/JsonExtractorSuite.scala | Scala | apache-2.0 | 13,327 |
package ru.mipt.acsl.decode.idea.plugin
import com.intellij.lexer.Lexer
import ru.mipt.acsl.decode.parser.DecodeLexerAdapter
import ru.mipt.acsl.decode.parser.psi.DecodeTypes
import com.intellij.openapi.editor.DefaultLanguageHighlighterColors
import com.intellij.openapi.editor.colors.TextAttributesKey
import com.intel... | acsl-mipt/decode-idea-plugin | src/main/scala/ru/mipt/acsl/decode/idea/plugin/DecodeSyntaxHighlighter.scala | Scala | mit | 3,268 |
object MainDef {
def main(args: Array[String]) {}
}
| ymasory/scala-grading | src/test/resources/defs/MainDef.scala | Scala | gpl-3.0 | 54 |
object Bug {
def bar(ev: Any) = {
trait X(val x: Int) {
def qux: () => x.type = { () => println(ev); x }
}
(new X(1) {}).qux()
}
}
| dotty-staging/dotty | tests/pos/t6231c.scala | Scala | apache-2.0 | 154 |
package com.ovoenergy.comms.helpers
import com.typesafe.config.{Config, ConfigObject, ConfigValue}
import pureconfig._
import pureconfig.syntax._
import pureconfig.error.ConfigReaderFailures
case class KafkaRootConfig(kafka: KafkaConfig)
case class StoreConfig(location: String, password: String)
case class SSLConfi... | ovotech/comms-kafka-serialisation | modules/helpers/src/main/scala/com/ovoenergy/comms/helpers/Config.scala | Scala | mit | 2,726 |
package org.jetbrains.plugins.scala.lang.psi.types
import org.jetbrains.plugins.scala.lang.psi.ScalaPsiElement
import org.jetbrains.plugins.scala.lang.psi.types.api.StdTypes
import org.jetbrains.plugins.scala.project.ProjectContext
package object result {
import scala.util.{Either, Left, Right}
type TypeResult ... | gtache/intellij-lsp | intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/psi/types/result/package.scala | Scala | apache-2.0 | 1,609 |
package com.romankagan.languages.classroomanalysis
/**
* Created by roman on 5/6/15.
*/
object AverageGrade extends App{
}
| kagan770/talentbuddy | src/com/romankagan/languages/classroomanalysis/AverageGrade.scala | Scala | apache-2.0 | 127 |
package org.bitcoins.core.wallet.utxo
import scala.annotation.tailrec
/** Represents the spending branch being taken in a ScriptPubKey's execution
*
* If you over-specify a path, such as giving a condition where none is needed,
* then the remaining over-specified path will be ignored.
*
* For example, if yo... | bitcoin-s/bitcoin-s | core/src/main/scala/org/bitcoins/core/wallet/utxo/ConditionalPath.scala | Scala | mit | 2,142 |
/*
* 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 | core/src/test/scala/org/apache/spark/rpc/RpcEnvSuite.scala | Scala | apache-2.0 | 32,491 |
class Yoink(info: sbt.ProjectInfo) extends sbt.DefaultProject(info)
with posterous.Publish with rsync.RsyncPublishing {
/**
* Publish the source as well as the class files.
*/
override def packageSrcJar= defaultJarPath("-sources.jar")
val sourceArtifact = sbt.Artifact(artifactID, "src", "jar", Some(... | codahale/yoink | project/build/Yoink.scala | Scala | mit | 2,354 |
package scala.models
import lib.generator.{CodeGenerator, GeneratorUtil}
import com.bryzek.apidoc.generator.v0.models.{File, InvocationForm}
import com.bryzek.apidoc.spec.v0.models._
import scala.generator.{ScalaDatatype, ScalaPrimitive, ScalaOperation, ScalaParameter, ScalaResource, ScalaService, ScalaUtil}
object P... | movio/movio-apidoc-generator | scala-generator/src/main/scala/models/Play2RouteGenerator.scala | Scala | mit | 4,998 |
package com.twitter.zipkin.storage.cassandra
/*
* 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
*
... | viktortnk/zipkin | zipkin-cassandra/src/test/scala/com/twitter/zipkin/storage/cassandra/CassandraIndexSpec.scala | Scala | apache-2.0 | 7,892 |
// See LICENSE.txt for license details.
package examples
import chisel3.iotesters.{PeekPokeTester, Driver, ChiselFlatSpec}
class ShiftRegisterTests(c: ShiftRegister) extends PeekPokeTester(c) {
val reg = Array.fill(4){ 0 }
for (t <- 0 until 64) {
val in = rnd.nextInt(2)
poke(c.io.in, in)
step(1)
f... | timtian090/Playground | chiselTutorial/src/test/scala/examples/ShiftRegisterTests.scala | Scala | mit | 733 |
/*
* Copyright (C) 2014-2015 by Nokia.
* 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 may obtain a copy o... | elyast/wookie | collector-api/src/main/scala/wookie/collector/cli/RealConfig.scala | Scala | apache-2.0 | 1,515 |
package system.cell.cluster
import java.io.File
import java.nio.file.Paths
import akka.actor.{ActorRef, ActorSystem, Props}
import akka.cluster.pubsub.DistributedPubSubMediator.{Subscribe, SubscribeAck}
import akka.testkit.{ImplicitSender, TestKit, TestProbe}
import com.actors.{ClusterMembersListener, CustomActor}
im... | albertogiunta/arianna | src/test/scala/system/cell/cluster/CellSubscriberTest.scala | Scala | gpl-3.0 | 6,913 |
/*
* Copyright 2011-2022 GatlingCorp (https://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... | gatling/gatling | gatling-http/src/main/scala/io/gatling/http/action/sse/Sse.scala | Scala | apache-2.0 | 1,648 |
import dotty.tools.dotc.core.Decorators._
import dotty.tools.dotc.core.NameOps._
object Test {
"JFunction".toTermName.specializedFor(Nil, ???, Nil, Nil)(???)
}
| som-snytt/dotty | tests/pos-with-compiler/A.scala | Scala | apache-2.0 | 163 |
package core.api
import com.lvxingpai.model.account.Favorite
import com.lvxingpai.model.marketplace.product.Commodity
import core.model.misc._
import org.bson.types.ObjectId
import org.mongodb.morphia.Datastore
import scala.collection.JavaConversions._
import scala.concurrent.ExecutionContext.Implicits.global
import ... | Lvxingpai/Hanse | app/core/api/MiscAPI.scala | Scala | apache-2.0 | 4,627 |
/*
* Copyright 2001-2013 Artima, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | travisbrown/scalatest | src/test/scala/org/scalatest/ParallelTestExecutionParallelSuiteExamples.scala | Scala | apache-2.0 | 15,728 |
/*
* 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 ... | neoremind/kraps-rpc | kraps-core/src/main/scala/com/neoremind/kraps/util/RpcUtils.scala | Scala | apache-2.0 | 2,668 |
package chandu0101.scalajs.rn.examples.uiexplorer.apis
import chandu0101.scalajs.rn
import chandu0101.scalajs.rn.ReactNativeComponentB
import chandu0101.scalajs.rn.apis.AlertButton
import chandu0101.scalajs.rn.components.{Text, TouchableHighlight, View}
import chandu0101.scalajs.rn.examples.uiexplorer.{UIExample, UIEx... | beni55/scalajs-react-native | examples/src/main/scala/chandu0101/scalajs/rn/examples/uiexplorer/apis/AlertIOSExample.scala | Scala | apache-2.0 | 3,113 |
/*
* 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... | dotty-staging/scalatest | scalatest/src/main/scala/org/scalatest/fixture/FixtureNodeFamily.scala | Scala | apache-2.0 | 4,553 |
package io.toolsplus.atlassian.connect.play.generators
import io.toolsplus.atlassian.connect.play.api.models.Predefined.ClientKey
import org.scalacheck.Gen
import org.scalacheck.Gen._
case class SecurityContext(key: String,
clientKey: ClientKey,
publicKey: String,... | toolsplus/atlassian-connect-play | modules/core/test/io/toolsplus/atlassian/connect/play/generators/SecurityContextGen.scala | Scala | apache-2.0 | 2,217 |
package com.electronwill.niol.network.tcp
import java.nio.channels.{SelectionKey, SocketChannel}
import java.util
import com.electronwill.niol.buffer.storage.{BytesStorage, StorageProvider}
import com.electronwill.niol.buffer.{CircularBuffer, NiolBuffer}
import scala.annotation.tailrec
/**
* An implementation of [... | TheElectronWill/Niol | main/src/com/electronwill/niol/network/tcp/HAttach.scala | Scala | lgpl-3.0 | 10,343 |
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs
// License: http://www.gnu.org/licenses/gpl-3.0.en.html
package org.ensime.indexer
import akka.actor._
import akka.event.slf4j.SLF4JLogging
import org.apache.commons.vfs2._
import org.ensime.api._
import org.ensime.config.richconfig._
import org... | VlachJosef/ensime-server | core/src/main/scala/org/ensime/indexer/SourceResolver.scala | Scala | gpl-3.0 | 3,972 |
/*
* Copyright (c) 2014 Paul Bernard
*
* 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... | quantintel/spectrum | financial/src/main/scala/org/quantintel/ql/instruments/util/StickyRatchet.scala | Scala | apache-2.0 | 787 |
/*
* 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 ... | foryou2030/incubator-carbondata | integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/directdictionary/TimestampDataTypeNullDataTest.scala | Scala | apache-2.0 | 3,522 |
package de.holisticon.dw.calendar.ical
import com.fasterxml.jackson.databind.ObjectMapper
import de.holisticon.dw.calendar.api.RemoteCalendar
import io.dropwizard.testing.FixtureHelpers
import org.scalatest.{FunSpec, GivenWhenThen}
class RemoteCalendarSpec extends FunSpec with GivenWhenThen {
val mapper = new Ob... | jangalinski/dw-calendar | api/src/test/scala/de/holisticon/dw/calendar/ical/RemoteCalendarTest.scala | Scala | apache-2.0 | 1,492 |
package com.peterpotts.interview
case class Node(left: Option[Node], value: Int, right: Option[Node])
object Node {
def apply(left: Node, value: Int, right: Node): Node = Node(Some(left), value, Some(right))
def apply(left: Node, value: Int): Node = Node(Some(left), value, None)
def apply(value: Int, right: N... | peterpotts/interview | src/main/scala/com/peterpotts/interview/Node.scala | Scala | mit | 423 |
package com.twitter.algebird.benchmark
import com.twitter.algebird.{ HyperLogLogMonoid, HLL, SparseHLL, DenseHLL }
import com.twitter.bijection._
import java.nio.ByteBuffer
import java.util.concurrent.TimeUnit
import org.openjdk.jmh.annotations._
import org.openjdk.jmh.infra.Blackhole
object HLLPresentBenchmark {
i... | lucaslanger/algebird | algebird-benchmark/src/main/scala/com/twitter/algebird/benchmark/HLLPresentBenchmark.scala | Scala | apache-2.0 | 1,450 |
/*
* Copyright 2011-2018 GatlingCorp (http://gatling.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... | wiacekm/gatling | gatling-core/src/main/scala/io/gatling/core/action/BlockExit.scala | Scala | apache-2.0 | 4,780 |
/***********************************************************************
* Copyright (c) 2013-2015 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 is ... | drackaer/geomesa | geomesa-tools/src/main/scala/org/locationtech/geomesa/tools/FeatureCreator.scala | Scala | apache-2.0 | 2,945 |
package org.jetbrains.plugins.scala.editor.documentationProvider
import com.intellij.testFramework.EditorTestUtil
import org.jetbrains.plugins.scala.base.ScalaLightCodeInsightFixtureTestAdapter
import org.jetbrains.plugins.scala.base.ScalaLightCodeInsightFixtureTestAdapter.findCaretOffset
import org.jetbrains.plugins.... | JetBrains/intellij-scala | scala/scala-impl/test/org/jetbrains/plugins/scala/editor/documentationProvider/CreateScalaDocStubActionTest.scala | Scala | apache-2.0 | 2,700 |
/**
* Copyright (C) 2015-2016 DANS - Data Archiving and Networked Services (info@dans.knaw.nl)
*
* 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/license... | vesaakerman/easy-sword2 | src/main/scala/nl/knaw/dans/api/sword2/servlets/ServiceInitializer.scala | Scala | apache-2.0 | 4,846 |
package org.akka.essentials.router.example2.custom
import org.akka.essentials.router.example.MsgEchoActor
import akka.actor.ActorRef
import akka.actor.ActorSystem
import akka.actor.Address
import akka.routing.RandomRouter
import akka.routing.RemoteRouterConfig
import akka.actor.Props
object Example2 {
def main(args... | rokumar7/trial | AkkaRouterExample/src/main/scala/org/akka/essentials/router/example2/custom/Example2.scala | Scala | unlicense | 785 |
package org.bjean.sample.wordcount.aws
import com.amazonaws.services.elasticmapreduce.AmazonElasticMapReduce
import com.amazonaws.services.elasticmapreduce.model._
import com.typesafe.config.Config
import EMRClusterService._
import scala.concurrent.{ExecutionContext, Future}
object EMRClusterService {
val CONFIG_A... | bjet007/word-count-spark-aws | aws-launcher/src/main/scala/org/bjean/sample/wordcount/aws/EMRClusterService.scala | Scala | apache-2.0 | 3,453 |
/*
* Copyright 2016 Coral realtime streaming analytics (http://coral-streaming.github.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... | coral-streaming/coral | src/main/scala/io/coral/actors/database/DatabaseStatements.scala | Scala | apache-2.0 | 2,404 |
//
// Copyright 2013, Martin Pokorny <martin@truffulatree.org>
//
// This Source Code Form is subject to the terms of the Mozilla Public License,
// v. 2.0. If a copy of the MPL was not distributed with this file, You can
// obtain one at http://mozilla.org/MPL/2.0/.
//
package org.truffulatree.scampi3
import org.brid... | mpokorny/scampi | src/main/scala/org/truffulatree/scampi3/NamedComponent.scala | Scala | mpl-2.0 | 770 |
/*
* Copyright 2008-present 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 ag... | rozza/mongo-scala-driver | driver/src/it/scala/org/mongodb/scala/DocumentationExampleSpec.scala | Scala | apache-2.0 | 21,337 |
/*
* 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 ... | ing-bank/scruid | src/main/scala/com/ing/wbaa/druid/dql/Operators.scala | Scala | apache-2.0 | 8,809 |
package sangria.validation.rules
import scala.collection.mutable
import scala.language.postfixOps
import sangria.ast
import sangria.ast.AstVisitorCommand
import sangria.renderer.{QueryRenderer, SchemaRenderer}
import sangria.schema._
import sangria.validation._
import scala.collection.mutable.{
LinkedHashSet,
Lis... | OlegIlyenko/sangria | modules/core/src/main/scala/sangria/validation/rules/OverlappingFieldsCanBeMerged.scala | Scala | apache-2.0 | 23,804 |
package bank
abstract class NetworElement extends Ordered[NetworElement] {
val id: ID;
def network : Network
def DoubleAttributes: collection.mutable.Map[String, Double] = Attribute.getDoubles(atts); ;
var atts: collection.mutable.Map[String, Any];
override def toString = id.toString()
def compare(that: Ne... | frohfroh/SPARCAS | src/main/scala/bank/NetworElement.scala | Scala | gpl-3.0 | 412 |
/*
* GNU GENERAL PUBLIC LICENSE
* Version 2, June 1991
*
* Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* Everyone is permitted to copy and distribute verbatim copies
* of this license document, ... | P1tt187/fhs-schedule-generator | app/logic/helpers/DirectoryHelper.scala | Scala | gpl-2.0 | 21,660 |
package com.btcontract.wallet.sqlite
import immortan.sqlite._
import android.database.sqlite._
import android.content.Context
class DBInterfaceSQLiteAndroidEssential(context: Context, name: String) extends SQLiteOpenHelper(context, name, null, 1) with DBInterfaceSQLiteAndroid {
val base: SQLiteDatabase = getWritab... | btcontract/wallet | app/src/main/java/com/btcontract/wallet/sqlite/DBInterfaceSQLiteAndroidEssential.scala | Scala | apache-2.0 | 647 |
/*
* Copyright 2007-2010 WorldWide Conferencing, LLC
*
* 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 applica... | jeppenejsum/liftweb | framework/lift-modules/lift-widgets/src/main/scala/net/liftweb/widgets/uploadprogress/UploadProgress.scala | Scala | apache-2.0 | 5,190 |
/*
* 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 | app/models/moneyservicebusiness/BranchesOrAgents.scala | Scala | apache-2.0 | 2,583 |
package ai.verta.repository
import ai.verta.swagger._public.modeldb.versioning.model._
/** Represent the diff between two commits. This should not be instantiated by user.
* Please use Commit's diffFrom method to get instances
*/
class Diff(private[repository] val blobDiffs: Option[List[VersioningBlobDiff]]) {}
| mitdbg/modeldb | client/scala/src/main/scala/ai/verta/repository/Diff.scala | Scala | mit | 318 |
import scala.collection.immutable.Stack
object Test {
def test = {
val s = new Stack[Int]
s.push(1)
s.push(1, 2)
s.push(1, 2, 3)
s.push(1, 2, 3, 4)
}
}
| yusuke2255/dotty | tests/pos/t1858.scala | Scala | bsd-3-clause | 179 |
/*
* 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 ... | ueshin/apache-flink | flink-mesos/src/test/scala/org/apache/flink/mesos/scheduler/LaunchCoordinatorTest.scala | Scala | apache-2.0 | 18,407 |
/***********************************************************************
* 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... | jahhulbert-ccri/geomesa | geomesa-filter/src/test/scala/org/locationtech/geomesa/filter/index/SpatialIndexSupportTest.scala | Scala | apache-2.0 | 2,200 |
/*
* Copyright (c) 2020-2022 Erik van Oosten
*
* 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 ... | erikvanoosten/metrics-scala | metrics-scala/src/main/scala/nl/grons/metrics4/scala/PushGaugeWithTimeout.scala | Scala | apache-2.0 | 1,881 |
/**
* Copyright (C) 2007 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 prog... | ajw625/orbeon-forms | src/main/scala/org/orbeon/oxf/xforms/analysis/controls/ViewTrait.scala | Scala | lgpl-2.1 | 1,657 |
package sri.relay.mobile.examples.starwars.components
import sri.core.React
import sri.relay.RelayElementFactory._
import sri.relay.container.{Fragments, RelayContainerSpec}
import sri.relay.query.RelayQL
import sri.relay.{RelayComponentProps, Relay, RelayComponent}
import sri.universal.components.{Text, View}
import... | hamazy/sri | relay-mobile-examples/src/main/scala/sri/relay/mobile/examples/starwars/components/StarWarsShip.scala | Scala | apache-2.0 | 1,239 |
package uk.gov.gds.ier.transaction.crown.nationality
import uk.gov.gds.ier.validation.{ErrorTransformForm, ErrorMessages, FormKeys}
import uk.gov.gds.ier.model.{PartialNationality, Contact}
import play.api.data.Forms._
import uk.gov.gds.ier.transaction.crown.InprogressCrown
import play.api.data.validation.{Valid, Inva... | alphagov/ier-frontend | app/uk/gov/gds/ier/transaction/crown/nationality/NationalityForms.scala | Scala | mit | 3,857 |
package com.alugarei.cielo
import com.alugarei.cielo.domain._
import org.scalatest._
import org.scalatest.MustMatchers._
import org.scalatest.concurrent.ScalaFutures
import org.scalatest.time.{Seconds, Span}
/**
* Teste para Cielo
*
* Created by Gustavo on 04/02/2016.
*/
class CieloSpec extends FlatSpec with Scal... | alugarei/cielo-scala | src/test/scala/com/alugarei/cielo/CieloSpec.scala | Scala | mit | 4,820 |
/*
* Copyright 2014–2017 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... | drostron/quasar | niflheim/src/main/scala/quasar/niflheim/VersionedSegmentFormat.scala | Scala | apache-2.0 | 2,658 |
package org.bitcoins.commons.util
import grizzled.slf4j.Logging
import java.io.File
import scala.concurrent.{ExecutionContext, Future}
import scala.sys.process.{Process, ProcessBuilder}
/** A trait that helps start bitcoind/eclair when it is started via bitcoin-s */
trait NativeProcessFactory extends Logging {
imp... | bitcoin-s/bitcoin-s | app-commons/src/main/scala/org/bitcoins/commons/util/NativeProcessFactory.scala | Scala | mit | 2,039 |
/* Copyright 2009-2016 EPFL, Lausanne */
package leon
package invariant.util
import purescala.Expressions._
import purescala.ExprOps._
import purescala.Extractors._
import scala.math.BigInt.int2bigInt
object RealValuedExprEvaluator {
/**
* Requires that the input expression is ground
*/
def evaluate(expr:... | epfl-lara/leon | src/main/scala/leon/invariant/util/RealValuedExprEvaluator.scala | Scala | gpl-3.0 | 4,120 |
/* NSC -- new Scala compiler
* Copyright 2005-2013 LAMP/EPFL
* @author Martin Odersky
*/
package dotty.tools
package dotc
import core.Contexts.Context
import reporting.Reporter
/* To do:
s * - Revise the way classes are inherited - when not followed by [...] or (...),
* assume the unparameterized type and ... | DarkDimius/dotty | src/dotty/tools/dotc/Main.scala | Scala | bsd-3-clause | 1,028 |
package riftwarp
import almhirt.common._
import almhirt.almvalidation.kit._
trait BlindWarpPacker extends HasWarpDescriptor {
def warpDescriptor: WarpDescriptor
def packBlind(what: Any)(implicit lookup: WarpPackers): AlmValidation[WarpPackage]
}
trait WarpPacker[T] extends BlindWarpPacker {
fin... | chridou/almhirt | riftwarp/src/main/scala/riftwarp/WarpPacker.scala | Scala | apache-2.0 | 895 |
package keemun.clients
import scala.util.matching.Regex
import com.netaporter.uri.Uri
import keemun.StringUtils.StringImplicitConverters
/**
* Copyright (c) Nikita Kovaliov, maizy.ru, 2014
* See LICENSE.txt for details.
*/
package object github {
case class HeaderLink(linkType: String, link: String, page: Opti... | maizy/keemun | app/keemun/clients/github/package.scala | Scala | mit | 1,402 |
/*
* Copyright 2022 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/iht-frontend | test/iht/views/application/ApplicationPageBehaviour.scala | Scala | apache-2.0 | 5,373 |
/*
* 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 ... | bravo-zhang/spark | mllib/src/main/scala/org/apache/spark/ml/evaluation/RegressionEvaluator.scala | Scala | apache-2.0 | 3,927 |
trait T1 {
def f {}
}
trait T2 extends T1 {
override def f {}
println(/* line: 6 */f)
println(super./* line: 2 */f)
} | ilinum/intellij-scala | testdata/resolve2/inheritance/super/single/ClashTrait.scala | Scala | apache-2.0 | 127 |
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 CSharp extends LanguageTest {
describe("The C# implementation") {
it("should be able to successfully compil... | eval-so/minibcs | src/test/scala/languages/CSharp.scala | Scala | apache-2.0 | 1,178 |
/*
* Copyright (c) 2015-2022 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.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.ap... | opencypher/openCypher | tools/tck-integrity-tests/src/main/scala/org/opencypher/tools/tck/NormalizeQueryStyle.scala | Scala | apache-2.0 | 3,607 |
package thangiee.riotapi.currentgame
case class Mastery(masteryId: Long = 0, rank: Int = 0)
| Thangiee/Riot-API-Scala | src/main/scala/thangiee/riotapi/currentgame/Mastery.scala | Scala | mit | 94 |
package testdata
import scala.annotation.nowarn
object nowarnSupport {
@deprecated("don't", "0.0")
def depreMethod(): String = ???
depreMethod()
depreMethod(): @nowarn("msg=unmatching")
depreMethod(): @nowarn
depreMethod(): @nowarn("msg=deprecated")
depreMethod(): @nowarn("cat=deprecation")
}
| ghik/silencer | silencer-plugin/testdata/nowarnSupport.scala | Scala | apache-2.0 | 312 |
/*
* Copyright (C) 2020 MapRoulette contributors (see CONTRIBUTORS.md).
* Licensed under the Apache License, Version 2.0 (see LICENSE).
*/
package org.maproulette.framework.mixins
import org.apache.commons.lang3.StringUtils
import org.maproulette.data._
import org.maproulette.exception.MPExceptionUtil
import org.ma... | mgcuthbert/maproulette2 | app/org/maproulette/framework/mixins/TagsControllerMixin.scala | Scala | apache-2.0 | 8,228 |
package quizleague.domain
case class Team (
id:String,
name:String,
shortName:String,
venue:Ref[Venue],
text:Ref[Text],
users:List[Ref[User]] = List(),
retired:Boolean = false) extends Entity {
def emailName = if(shortName == null) null else shortName.replace(' ', '.').toLowerCase
} | gumdrop/quizleague-maintain | shared/src/main/scala/quizleague/domain/Team.scala | Scala | mit | 317 |
package com.rklaehn.persistentsummary
import ichi.bench.Thyme
class Foo(val a: AnyRef, val b: AnyRef)
object ReflectiveAccessBench extends App {
val foo = new Foo("", "")
val accessor = classOf[Foo].getDeclaredField("a")
accessor.setAccessible(true)
val th = Thyme.warmed(warmth = Thyme.HowWarm.BenchOff, v... | rklaehn/persistentsummary | src/test/scala/com/rklaehn/persistentsummary/ReflectiveAccessBench.scala | Scala | apache-2.0 | 445 |
package com.dataember.stash.plugin
import java.io.IOException
import java.util.Properties
import org.junit.Test
import java.net.ConnectException
import org.junit.runner.RunWith
import org.nats._
import org.scalatest._
import org.scalatest.junit._
/**
* Created by chaospie on 04/07/15.
*/
@RunWith(classOf[JUnitRun... | wayofthepie/bitbucket-event-propagator | src/test/scala/com/dataember/stash/plugin/RepoCreateEventListenerSpec.scala | Scala | mit | 936 |
package sparkapps
import algorithms.BigDataAlgorithm
import org.apache.log4j.{Level, Logger}
import org.apache.spark.SparkConf
import org.apache.spark.streaming.twitter.TwitterUtils
import org.apache.spark.streaming.{Seconds, StreamingContext}
object TwitterStreaming {
def startTwitterStreamAlgorithm(algorithms: Se... | ktugan/SparklingFun | src/main/scala/sparkapps/TwitterStreaming.scala | Scala | mit | 1,444 |
package com.ticketfly.spreedly.fixtures
import cc.protea.spreedly.model._
import java.util.Random
object TestCreditCards {
private def setCardAttributes(card: SpreedlyCreditCard): SpreedlyCreditCard = {
card.setEmail("testEmail@test.com")
card.setData("testCardData")
card.setMonth(11)
card.setYear(2... | Ticketfly/spreedly-scala | src/test/scala/com/ticketfly/spreedly/fixtures/TestCreditCards.scala | Scala | mit | 2,116 |
/*
* Part of NDLA learningpath-api.
* Copyright (C) 2016 NDLA
*
* See LICENSE
*
*/
package no.ndla.learningpathapi.model.api
import no.ndla.learningpathapi.model.domain.LanguageField
import org.scalatra.swagger.annotations._
import org.scalatra.swagger.runtime.annotations.ApiModelProperty
import scala.annotati... | NDLANO/learningpath-api | src/main/scala/no/ndla/learningpathapi/model/api/Description.scala | Scala | gpl-3.0 | 749 |
package scala.scalanative.native
object InstanceOfSuite extends tests.Suite {
// asInstanceOf
// test("expects anyRef.asInstanceOf[String] fail") {
// shouldNotGetHere((new AnyRef).asInstanceOf[String])
// }
test("expects \\"\\".asInstanceOf[String] succeed") {
assertNotNull("".asInstanceOf[String])
... | cedricviaccoz/scala-native | unit-tests/src/main/scala/scala/scalanative/native/InstanceOfSuite.scala | Scala | bsd-3-clause | 1,848 |
package liferay
import liferay.processes._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._
/**
* Gatling 2.2.X Script generated for Liferay by the plugin
* "Load Test with Gatling"
*/
class DefaultSimulation extends Simulation {
val httpProtocol = http
.bas... | wikimix/gatling-liferay-scenarios | gatling-charts-highcharts-bundle-2.2.5/user-files/simulations/gatling-for-liferay/user-files/simulations/liferay/SimulationDefaultSimulation.scala | Scala | gpl-3.0 | 1,264 |
Subsets and Splits
Filtered Scala Code Snippets
The query filters and retrieves a sample of code snippets that meet specific criteria, providing a basic overview of the dataset's content without revealing deeper insights.