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 org.broadinstitute.dsde.test.api.orch
import java.util.UUID
import org.broadinstitute.dsde.workbench.auth.AuthToken
import org.broadinstitute.dsde.workbench.config.{Credentials, UserPool}
import org.broadinstitute.dsde.workbench.fixture.{BillingFixtures, WorkspaceFixtures}
import org.broadinstitute.dsde.workbe... | broadinstitute/firecloud-orchestration | automation/src/test/scala/org/broadinstitute/dsde/test/api/orch/WorkspaceApiSpec.scala | Scala | bsd-3-clause | 3,315 |
/*
* 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 ... | guoxiaolongzte/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/GenerateOrdering.scala | Scala | apache-2.0 | 7,497 |
/*
* 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 ... | duynguyen/incubator-openwhisk | tests/src/test/scala/whisk/core/database/test/DbUtils.scala | Scala | apache-2.0 | 8,867 |
package services.core
import akka.actor.{Actor, Props}
import services.core.UtilityConversion._
/**
* Created by yabumoto on 2014/09/21.
*/
class ServiceActor(implicit val setting: ServiceSetting) extends Actor {
def receive = {
case action: ServiceAction => {
val result = action.execute block;
s... | czyabumoto/OpenAdsAPI_ | src/main/scala/services/core/ServiceActor.scala | Scala | cc0-1.0 | 463 |
/*
* Copyright (c) 2021, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
package com.krux.hyperion.common
import scala.language.implicitConversions
import com.kru... | realstraw/hyperion | core/src/main/scala/com/krux/hyperion/common/PipelineObject.scala | Scala | bsd-3-clause | 1,097 |
/**
* 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... | themarkypantz/kafka | core/src/test/scala/unit/kafka/log/BrokerCompressionTest.scala | Scala | apache-2.0 | 3,530 |
/*
* Copyright 2016 University of Basel, Graphics and Vision Research Group
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Un... | unibas-gravis/scalismo-faces | src/test/scala/scalismo/faces/color/ColorSpaceOperationsTest.scala | Scala | apache-2.0 | 3,378 |
/*
* 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 ... | greghogan/flink | flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/batch/table/TableSinkITCase.scala | Scala | apache-2.0 | 6,383 |
package SparqlSpark
import scala.collection.mutable._
import SparqlSpark._
import scala.collection.concurrent._
import Array._
import scala.io.Source
object SparqlPlan {
class Triple(val tp: String) extends java.io.Serializable {
var spo = tp.split("\\\\s+")
val s: String = spo(0)
val p: String = spo(1)
... | qiuhuiGithub/SQX | src/SparqlSpark/SparqlPlan.scala | Scala | apache-2.0 | 11,466 |
package doodle
package image
package examples
import doodle.core._
import doodle.syntax._
object ColorPaletteAgain {
val circleMinimum = 50.0
val circleIncrement = 10.0
def complement(c: Color): Color =
c.spin(180.degrees)
def nearComplement(c: Color): Color =
c.spin(170.degrees)
def analogous(c... | underscoreio/doodle | image/shared/src/main/scala/doodle/image/examples/ColorPaletteAgain.scala | Scala | apache-2.0 | 3,516 |
/**
* Copyright (c) 2013 Bernard Leach
*
* 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
* to use, copy, modify, merge, publ... | leachbj/hsm-emulator | hsmsim-akka/src/main/scala/org/leachbj/hsmsim/commands/GenerateMac.scala | Scala | mit | 2,604 |
/*
*
* * Copyright 2014 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
* *
* ... | jwkessi/geomesa | geomesa-plugin/src/test/scala/org/locationtech/geomesa/plugin/ui/GeoMesaDataStoresPageTest.scala | Scala | apache-2.0 | 3,674 |
/**
* Copyright (C) 2011 Orbeon, Inc.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the Free Software Foundation; either version
* 2.1 of the License, or (at your option) any later version.
*
* This program i... | evlist/orbeon-forms | src/main/scala/org/orbeon/oxf/xforms/processor/handlers/xhtml/XFormsRepeatHandler.scala | Scala | lgpl-2.1 | 9,113 |
/*
Collector is a tool for obtaining bioactivity data from the Open PHACTS platform.
Copyright (C) 2013 UPF
Contributed by Manuel Pastor(manuel.pastor@upf.edu) and Oriol López-Massaguer(oriol.lopez@upf.edu).
This file is part of Collector.
Collector is free software: you can redistribute i... | OriolLopezMassaguer/Collector | app/es/imim/phi/collector/compounds/CompoundFilter.scala | Scala | gpl-3.0 | 1,032 |
/*
* 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... | brharrington/atlas | atlas-module-akka/src/main/scala/com/netflix/atlas/akka/AkkaModule.scala | Scala | apache-2.0 | 3,056 |
/*
*
*/
package see.nodes
import see.EvalError
import see.ParamError
import see.Scope
import see.StableScope
import see.values.UserFunc
import see.values.Val
import see.values.Vector
private[see] object Fnode {
private var instanceCount = 0
private def next = {
instanceCount += 1; instanceCount
}
d... | acruise/see | src/main/scala/see/nodes/Funcs.scala | Scala | bsd-3-clause | 5,198 |
package akka.dumbdi
class FakeModule extends ActorModuleRuntime {
bind[Service](new FakeService)
}
| KadekM/akka-dumbdi | src/test/scala/akka/dumbdi/FakeModule.scala | Scala | apache-2.0 | 102 |
package arbiterJs
import com.highcharts.CleanJsObject
import com.highcharts.HighchartsUtils._
import com.highstock.HighstockAliases._
import com.highstock.config._
import scala.scalajs.js
import scala.scalajs.js.UndefOr
import scala.scalajs.js.annotation.ScalaJSDefined
import js.JSConverters._
/**
* Displays line m... | asciiu/halo | arbiterJs/src/main/scala/arbiterJs/BookLineChart.scala | Scala | mit | 2,471 |
package org.jetbrains.plugins.scala
package debugger.evaluation
import java.io.File
import com.intellij.debugger.DebuggerManagerEx
import com.intellij.debugger.impl.{DebuggerManagerAdapter, DebuggerManagerListener, DebuggerSession}
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi... | jastice/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/debugger/evaluation/ScalaEvaluatorCompileHelper.scala | Scala | apache-2.0 | 5,069 |
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
*/
// DO NOT EDIT MANUALLY
package sbt.internal.bsp
/**
* @param targets A sequence of build targets affected by the debugging action.
* @param dataKind The kind of data to expect in the `data` field.
* @param data A lang... | sbt/sbt | protocol/src/main/contraband-scala/sbt/internal/bsp/DebugSessionParams.scala | Scala | apache-2.0 | 2,451 |
/*
* 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/mongo-lock | src/test/scala/uk/gov/hmrc/lock/LockRepositorySpec.scala | Scala | apache-2.0 | 10,355 |
package uconfig.test
import uconfig.UConfigObject.MapConfigObject
import uconfig.{PathSeq, UConfigObject, UConfigValue}
import utest._
object MapConfigObjectTest extends UConfigObjectTests {
override def createEUT(pairs: Seq[Tuple2[PathSeq, UConfigValue]]) = UConfigObject(pairs)
}
| jokade/sconfig | shared/src/test/scala/uconfig/test/MapConfigObjectTest.scala | Scala | mit | 286 |
package endpoints.xhr
import endpoints.algebra.Codec
import org.scalajs.dom.XMLHttpRequest
/**
* Interpreter for [[endpoints.algebra.JsonEntitiesFromCodec]] that encodes JSON requests
* and decodes JSON responses.
*/
trait JsonEntitiesFromCodec extends Endpoints with endpoints.algebra.JsonEntitiesFromCodec {
... | Krever/endpoints | xhr/client/src/main/scala/endpoints/xhr/JsonEntitiesFromCodec.scala | Scala | mit | 598 |
package controllers
import play.api.libs.json._
import play.api.mvc._
import models.{City, Passenger, Taxi}
object Application extends Controller {
def addTaxi = Action(BodyParsers.parse.json) { implicit request =>
val p = request.body.validate[Taxi]
p.fold(
errors => {
BadRequest(Json.obj("... | riosgabriel/66Taxis | app/controllers/Application.scala | Scala | mit | 1,600 |
package ru.tolsi.matcher.util
import ru.tolsi.matcher.UnitSpec
class EitherUtilsSpec extends UnitSpec {
describe("splitEitherIterator method") {
it("should split either iterator to left and right iterators") {
val (lefts, rigths) = EitherUtils.splitEitherIterator(Iterator(Left(0), Right(3), Left(1), Left(... | Tolsi/matcher | src/test/scala/ru/tolsi/matcher/util/EitherUtilsSpec.scala | Scala | mit | 670 |
/*
* 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 | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala | Scala | apache-2.0 | 66,899 |
package org.scalacoin.marshallers
import org.scalacoin.protocol.{AssetAddress, Address, BitcoinAddress}
import spray.json._
/**
* Created by chris on 12/19/15.
*/
object BitcoinAddressProtocol extends DefaultJsonProtocol {
implicit val bitcoinAddressFormat = jsonFormat1(BitcoinAddress.apply _)
}
object AddressP... | scalacoin/scalacoin | src/main/scala/org/scalacoin/marshallers/BitcoinAddressProtocol.scala | Scala | mit | 1,036 |
package tests.rescala.fullmv.mirrors
import java.util.concurrent.atomic.{AtomicInteger, AtomicReference}
import org.scalatest.funsuite.AnyFunSuite
import rescala.fullmv.DistributedFullMVApi.{FullMVEngine, Var, Evt, Signal, Event, ReactiveLocalClone}
import tests.rescala.testtools.Spawn
import scala.annotation.tailre... | guidosalva/REScala | Code/Extensions/MultiversionDistributed/multiversion/src/test/scala/tests/rescala/fullmv/mirrors/XShapeMirrorTest.scala | Scala | apache-2.0 | 6,220 |
def f() = print("Hello World")
| clemus90/competitive-programming | hackerRank/FunctionalProgramming/HelloWorld.scala | Scala | mit | 31 |
package org.juitar.query.api
/**
* @author sha1n
* @since 6/12/14
*/
class ParserException(message: String, e: Exception)
extends RuntimeException(message, e) {
def this(e: Exception) = this(null, e)
def this(message: String) = this(message, null)
}
| sha1n/scala-rest | query-parser/src/main/scala/org/juitar/query/api/ParserException.scala | Scala | apache-2.0 | 263 |
package com.twitter.conversions.common
import com.twitter.common.quantity.Amount
import com.twitter.common.quantity.{Time => CommonTime}
import com.twitter.conversions.time._
import com.twitter.util.Duration
import java.util.concurrent.TimeUnit
object quantity {
val COMMON_FOREVER: Duration = 0.millis
class Comm... | mosesn/util | util-zk-common/src/main/scala/com/twitter/conversions/common/quantity.scala | Scala | apache-2.0 | 1,430 |
package com.twitter.finagle.httpx
import com.google.common.base.Charsets
import com.twitter.finagle.httpx.netty.{HttpResponseProxy, Bijections}
import com.twitter.io.Reader
import org.jboss.netty.buffer.{ChannelBuffer, ChannelBuffers}
import org.jboss.netty.handler.codec.embedder.{DecoderEmbedder, EncoderEmbedder}
imp... | Krasnyanskiy/finagle | finagle-httpx/src/main/scala/com/twitter/finagle/httpx/Response.scala | Scala | apache-2.0 | 2,891 |
package org.scaladebugger.api.profiles.java.requests.classes
import com.sun.jdi.event.ClassPrepareEvent
import org.scaladebugger.api.lowlevel.JDIArgument
import org.scaladebugger.api.lowlevel.classes._
import org.scaladebugger.api.lowlevel.events.EventManager
import org.scaladebugger.api.lowlevel.events.EventType._
i... | ensime/scala-debugger | scala-debugger-api/src/main/scala/org/scaladebugger/api/profiles/java/requests/classes/JavaClassPrepareRequest.scala | Scala | apache-2.0 | 5,637 |
package com.karasiq.bootstrap.context
import scala.language.postfixOps
import rx._
import com.karasiq.bootstrap.context.ReactiveBinds._
trait ReactiveRead[Element, Property] {
def bindRead(element: Element, property: Property): Unit
}
trait ReactiveWrite[Element, Property] {
def bindWrite(element: Element, pro... | Karasiq/scalajs-bootstrap | context/shared/src/main/scala/com/karasiq/bootstrap/context/ReactiveBinds.scala | Scala | mit | 1,688 |
package se.lu.nateko.cp.meta.instanceserver
import scala.util.Try
import org.eclipse.rdf4j.model.IRI
import org.eclipse.rdf4j.model.Statement
import org.eclipse.rdf4j.model.Value
class WriteNotifyingInstanceServer(val inner: InstanceServer) extends InstanceServer {
private[this] var cb: Function0[Unit] = () => ()
... | ICOS-Carbon-Portal/meta | src/main/scala/se/lu/nateko/cp/meta/instanceserver/WriteNotifyingInstanceServer.scala | Scala | gpl-3.0 | 1,150 |
/* 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 scaps.nucleus.querying
import scaps.nucleus.Type
import scaps.nucleus.TypeRef
import scaps.nucleus.TypePa... | scala-search/scaps | nucleus/src/main/scala/scaps/nucleus/querying/QueryExpansion.scala | Scala | mpl-2.0 | 2,582 |
//
// ExecutionExceptions.scala -- Scala subclasses of ExecutionException
// Project OrcScala
//
// $Id: ExecutionExceptions.scala 2933 2011-12-15 16:26:02Z jthywissen $
//
// Created by jthywiss on Aug 11, 2010.
//
// Copyright (c) 2011 The University of Texas at Austin. All rights reserved.
//
// Use and redistributi... | laurenyew/cOrcS | src/orc/error/runtime/ExecutionExceptions.scala | Scala | bsd-3-clause | 4,588 |
/** The System Under Test.
* We bail on the earlier round that generates the first error.
*/
class SUT extends J
| folone/dotty | tests/untried/neg/t6289/SUT_5.scala | Scala | bsd-3-clause | 117 |
/*
* 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 ... | vax11780/spark | core/src/main/scala/spark/rdd/SubtractedRDD.scala | Scala | apache-2.0 | 4,511 |
package processes.freeMonads.single
import play.api.mvc.Request
import scala.concurrent.Future
import play.api.mvc.AnyContent
import processes.Services
import processes.PatchAssignment
import processes.freeMonads.HttpResultImplementation
import scala.Right
trait HappyFlowOnlyProgramRunner { _:HttpResultImplementation... | EECOLOR/scala-clean-code-patterns | src/main/scala/processes/freeMonads/single/HappyFlowOnlyProgramRunner.scala | Scala | mit | 1,284 |
import org.scalatest._
import org.scalatest.junit._
import org.junit.runner.RunWith
import org.junit._
import com.tngtech.jgiven.junit._
class SimpleHelloTest extends SimpleScenarioTest[Steps] {
@Test
def my_first_JGiven_scenario_in_Scala = {
given.some_state
when.some_action
... | ahus1/JGiven | examples/scala/src/test/scala/SimpleHelloTest.scala | Scala | apache-2.0 | 356 |
package calculator.parser
import calculator.Main.memory
import calculator.Calculator
import calculator.lexer._
trait Parser extends Lexer {
self: Calculator =>
import Trees._
import calculator.lexer.Tokens._
def exprSource: ExprTree = { readToken; parseExpr }
def computeSource: Double = { readToken; pars... | ValentinMinder/scala-labs-HEIG | lab02/src/calculator/parser/Parser.scala | Scala | mit | 9,075 |
package com.tpersson.client.common.utils
import javafx.application.Platform
import scala.concurrent.ExecutionContext
class UiExecutionContext extends ExecutionContext {
override def execute(runnable: Runnable): Unit = {
Platform.runLater(runnable)
}
override def reportFailure(cause: Throwable): Unit = {
... | TommyPersson/scala-mvvm-example | src/main/scala/com/tpersson/client/common/utils/UiExecutionContext.scala | Scala | apache-2.0 | 325 |
/**
* Track the trackers
* Copyright (C) 2014 Sebastian Schelter, Felix Neutatz
*
* 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) a... | HungUnicorn/trackthetrackers | analysis/src/main/scala/io/ssc/trackthetrackers/analysis/algorithms/PowerLawExponentEstimation.scala | Scala | gpl-3.0 | 2,488 |
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
*/
package scalaguide.logging
import javax.inject.Inject
import org.junit.runner.RunWith
import org.specs2.mock.Mockito
import org.specs2.mutable.Specification
import org.specs2.runner.JUnitRunner
import scala.concurrent.ExecutionContext
import scala.c... | wegtam/playframework | documentation/manual/working/scalaGuide/main/logging/code/ScalaLoggingSpec.scala | Scala | apache-2.0 | 10,744 |
package audit.collector
import java.util.Date
import akka.actor.{Actor, Props}
import akka.http.scaladsl.model.StatusCodes.OK
import akka.http.scaladsl.testkit.ScalatestRouteTest
import audit.Api
import audit.collector.Collector.Event
import audit.collector.CollectorActor.Stored
import org.scalatest.WordSpec
class C... | grzesiekw/audit | src/test/scala/audit/collector/CollectorApiSpec.scala | Scala | mit | 847 |
/*
* Copyright (c) 2015-2017 Toby Weston
*
* 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... | tobyweston/learn-scala-java-devs | src/main/scala/s4j/scala/chapter18/ExtractorExample.scala | Scala | apache-2.0 | 1,593 |
package de.tu_berlin.dima.bdapro.cli.command
import java.lang.{System => Sys}
import java.nio.file.Paths
import net.sourceforge.argparse4j.inf.{Namespace, Subparser}
import org.peelframework.core.cli.command.Command
import org.peelframework.core.util.console.ConsoleColorise
import org.peelframework.core.util.shell
im... | cristiprg/BDAPRO.GlobalStateML | bdapro-ws1617-peelextensions/src/main/scala/de/tu_berlin/dima/bdapro/cli/command/MergeTask.scala | Scala | apache-2.0 | 5,708 |
/*
* Copyright (c) 2018. Fengguo Wei and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License v2.0
* which accompanies this distribution, and is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* Detailed contributors ar... | arguslab/Argus-SAF | jnsaf/src/main/scala/org/argus/jnsaf/analysis/JNISourceAndSinkManager.scala | Scala | apache-2.0 | 1,877 |
/*
* Copyright 2016 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | ahudspith-equalexperts/ct-calculations | src/test/scala/uk/gov/hmrc/ct/ct600/v2/calculations/MarginalRateReliefCalculatorSpec.scala | Scala | apache-2.0 | 14,089 |
/*
* 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 ... | aniketadnaik/carbondataStreamIngest | integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/DDLStrategy.scala | Scala | apache-2.0 | 7,506 |
/*
* 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/vat-registration-frontend | app/models/api/BankAccountDetailsStatus.scala | Scala | apache-2.0 | 1,424 |
/***
* Copyright 2018 Rackspace US, 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 applica... | wdschei/api-checker | core/src/test/scala/com/rackspace/com/papi/components/checker/step/TenantRoleStepSuite.scala | Scala | apache-2.0 | 29,548 |
import sbt._
import com.twitter.sbt._
import sbt.Keys._
import sbtassembly.Plugin._
import AssemblyKeys._
import java.io.File
object Zipkin extends Build {
val CASSIE_VERSION = "0.23.0"
val FINAGLE_VERSION = "5.3.20"
val OSTRICH_VERSION = "8.2.9"
val UTIL_VERSION = "5.3.13"
val proxyRepo = Option(Syste... | julio/zipkin | project/Project.scala | Scala | apache-2.0 | 13,502 |
/*
* Copyright (c) 2016 SnappyData, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. You
* may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | vjr/snappydata | core/src/main/scala/org/apache/spark/sql/sources/StatVarianceCounter.scala | Scala | apache-2.0 | 4,242 |
/*
* 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 ... | cloud-fan/spark | sql/core/src/test/scala/org/apache/spark/sql/streaming/FileStreamSinkSuite.scala | Scala | apache-2.0 | 25,831 |
/**
* Defines which nodes are considered as neighbours
*/
package uk.ac.cdrc.mintsearch.graph
import org.neo4j.graphdb.RelationshipType
import org.neo4j.graphdb.traversal.{Evaluators, TraversalDescription, Uniqueness}
import org.neo4j.kernel.impl.traversal.MonoDirectionalTraversalDescription
trait TraversalStrate... | spacelis/mint-search | neo4j-plugin/src/main/scala/uk/ac/cdrc/mintsearch/graph/TraversalStrategy.scala | Scala | apache-2.0 | 1,236 |
/*
* Copyright (c) 2014-2020 by The Monix Project Developers.
* See the project homepage at: https://monix.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... | alexandru/monifu | monix-eval/shared/src/main/scala/monix/eval/internal/TaskDeferAction.scala | Scala | apache-2.0 | 1,624 |
package monocle.function
import monocle.function.fields._
import monocle.{Iso, Lens}
import scala.annotation.implicitNotFound
/**
* Typeclass that defines an [[Iso]] between an `S` and its head `H` and tail `T`
* [[Cons1]] is like [[Cons]] but for types that have *always* an head and tail, e.g. a non empty list
*... | rperry/Monocle | core/shared/src/main/scala/monocle/function/Cons1.scala | Scala | mit | 5,003 |
package io.iohk.ethereum.jsonrpc
import akka.actor.ActorSystem
import akka.testkit.{TestKit, TestProbe}
import akka.util.ByteString
import io.iohk.ethereum.Mocks.MockValidatorsAlwaysSucceed
import io.iohk.ethereum.blockchain.sync.SyncProtocol.Status.Progress
import io.iohk.ethereum.blockchain.sync.{EphemBlockchainTest... | input-output-hk/etc-client | src/test/scala/io/iohk/ethereum/jsonrpc/EthServiceSpec.scala | Scala | mit | 59,050 |
object SyntheticNonSynthetic2 {
def foo[A >: Exception] (a : A) {}
}
| felixmulder/scala | test/files/positions/SyntheticNonSynthetic2.scala | Scala | bsd-3-clause | 71 |
package concrete.generator.cspompatterns
import cspom.compiler.ConstraintCompiler._
import cspom.compiler.{ConstraintCompilerNoData, Delta, Functions}
import cspom.extension.MDDRelation
import cspom.util.{Infinitable, IntInterval, RangeSet}
import cspom.variable.IntExpression
import cspom.variable.IntExpression.implic... | concrete-cp/concrete | src/main/scala/concrete/generator/cspompatterns/Pow.scala | Scala | lgpl-2.1 | 1,873 |
/*
* Copyright (c) 2002-2018 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundatio... | HuangLS/neo4j | community/cypher/cypher-compiler-2.3/src/main/scala/org/neo4j/cypher/internal/compiler/v2_3/helpers/LazyIterable.scala | Scala | apache-2.0 | 1,028 |
package to.gplus.rayracine.pack
import org.scalatest.Suite
class SimplePackTest extends Suite {
import java.io.{DataOutputStream, DataInputStream,
ByteArrayOutputStream, ByteArrayInputStream}
import PackKit._
implicit val optIntPack = optionPack[Int]
implicit val optStringPack = optionPa... | RayRacine/Pack | src/test/scala/to/gplus/rayracine/pack/SimpleTest.scala | Scala | mit | 1,264 |
/*
* Copyright (c) 2012-2018 Broad Institute, Inc.
*
* This file is part of Pilon.
*
* Pilon is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
*
* Pilon is distributed in the hope that it will... | B-UMMI/INNUca | src/pilon_v1.23/pilon/src/main/scala/org/broadinstitute/pilon/NormalDistribution.scala | Scala | gpl-3.0 | 2,099 |
/*
* Copyright (C) 2015 Romain Reuillon
*
* 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 Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This progra... | openmole/openmole | openmole/core/org.openmole.core.expansion/src/main/scala/org/openmole/core/expansion/ScalaCompilation.scala | Scala | agpl-3.0 | 9,492 |
package controllers.s_eligibility
import org.specs2.mutable._
import play.api.test.FakeRequest
import play.api.test.Helpers._
import models.domain._
import controllers.s_eligibility
import models.domain.Claim
import models.view.CachedClaim
import utils.WithApplication
class GApproveSpec extends Specification {
sect... | Department-for-Work-and-Pensions/ClaimCapture | c3/test/controllers/s_eligibility/GApproveSpec.scala | Scala | mit | 1,525 |
package com.yourtion.Pattern16
/**
* Created by Yourtion on 05/04/2017.
*/
object PartialExamples {
def addTwoInts(intOne: Int, intTwo: Int) = intOne + intTwo
def taxForState(amount: Double, state: Symbol) = state match {
// Simple tax logic, for example only!
case ('NY) => amount * 0.0645
case (... | yourtion/LearningFunctionalProgramming | Scala/src/com/yourtion/Pattern16/PartialExamples.scala | Scala | mit | 705 |
/*
* 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/ct-calculations | src/test/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/ACQ5032Spec.scala | Scala | apache-2.0 | 1,596 |
/*
* _ _
* _ __ ___ | |__ | | ___
* | '_ \\ / _ \\| '_ \\| |/ _ \\ noble :: norcane blog engine
* | | | | (_) | |_) | | __/ Copyright (c) 2016-2018 norcane
* |_| |_|\\___/|_.__/|_|\\___|
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file... | norcane/noble | sdk/noble-api/src/main/scala/com/norcane/noble/api/BlogStorage.scala | Scala | apache-2.0 | 5,725 |
package sttp.client3.okhttp
import java.io.{BufferedInputStream, ByteArrayInputStream, FileInputStream, InputStream}
import sttp.capabilities.Streams
import sttp.client3.internal.{BodyFromResponseAs, FileHelpers, SttpFile, toByteArray}
import sttp.client3.ws.{GotAWebSocketException, NotAWebSocketException}
import sttp... | softwaremill/sttp | okhttp-backend/src/main/scala/sttp/client3/okhttp/BodyFromOkHttp.scala | Scala | apache-2.0 | 3,441 |
package ldbc
import ingraph.bulkloader.csv.loader.LdbcUpdateStreamCsvLoader
import scala.collection.JavaConverters._
import scala.io.Source
class LdbcUpdateLoader(val csvDir: String,
val queryPrefix: String,
val queryPostfix: String) {
def load(): Iterable[LdbcUpdate]... | FTSRG/ingraph | tests/src/main/scala/ldbc/LdbcUpdateLoader.scala | Scala | epl-1.0 | 7,277 |
package lore.compiler.utils
import scala.concurrent.ExecutionContext
case object ExecutionContexts {
implicit val default: ExecutionContext = scala.concurrent.ExecutionContext.global
}
| marcopennekamp/lore | compiler/src/lore/compiler/utils/ExecutionContexts.scala | Scala | mit | 189 |
/*
* 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/hive/src/main/scala/org/apache/spark/sql/hive/client/IsolatedClientLoader.scala | Scala | apache-2.0 | 14,613 |
/*
* 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 ... | rekhajoshm/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/ShuffleExchangeExec.scala | Scala | apache-2.0 | 16,033 |
/*
* The MIT License (MIT)
* <p>
* Copyright (c) 2017-2019
* <p>
* 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
* to use,... | amannocci/streamy | core/src/test/scala/io/techcode/streamy/util/json/JsonImplicitSpec.scala | Scala | mit | 3,385 |
package mesosphere.marathon.tasks
import scala.collection._
import scala.collection.JavaConverters._
import org.apache.mesos.Protos.{TaskID, TaskStatus}
import javax.inject.Inject
import org.apache.mesos.state.State
import java.util.logging.{Level, Logger}
import mesosphere.marathon.Protos._
import mesosphere.marathon... | MiLk/marathon | src/main/scala/mesosphere/marathon/tasks/TaskTracker.scala | Scala | apache-2.0 | 6,861 |
package edu.gemini.phase2.skeleton.factory
import edu.gemini.spModel.gemini.obscomp.SPProgram.ProgramMode._
import edu.gemini.spModel.too.TooType
import edu.gemini.model.p1.immutable._
import edu.gemini.model.p1.immutable.ExchangePartner._
import edu.gemini.model.p1.immutable.NgoPartner._
import edu.gemini.model.p1.im... | arturog8m/ocs | bundle/edu.gemini.phase2.skeleton.servlet/src/main/scala/edu/gemini/phase2/skeleton/factory/SpProgramFactory.scala | Scala | bsd-3-clause | 9,508 |
/* Copyright 2009-2021 EPFL, Lausanne */
object NestedFunState1 {
def simpleSideEffect(n: BigInt): BigInt = {
require(n > 0)
var a = BigInt(0)
def incA(prevA: BigInt): Unit = {
require(prevA == a)
a += 1
} ensuring(_ => a == prevA + 1)
incA(a)
incA(a)
incA(a)
incA(a)
... | epfl-lara/stainless | frontends/benchmarks/imperative/invalid/NestedFunState1.scala | Scala | apache-2.0 | 349 |
/* __ *\\
** ________ ___ / / ___ __ ____ Scala.js Test Suite **
** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ **
** /____/\\___/... | xuwei-k/scala-js | test-suite/js/src/test/scala/org/scalajs/testsuite/jsinterop/DynamicTest.scala | Scala | bsd-3-clause | 10,830 |
package org.jetbrains.plugins.scala
package lang.rearranger
import java.util
import com.intellij.internal.statistic.UsageTrigger
import com.intellij.openapi.editor.Document
import com.intellij.openapi.util.{Pair, TextRange}
import com.intellij.psi.PsiElement
import com.intellij.psi.codeStyle.CodeStyleSettings
import ... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/lang/rearranger/ScalaRearranger.scala | Scala | apache-2.0 | 12,797 |
package scutil.lang.tc
object MonoidSyntax extends MonoidSyntax
trait MonoidSyntax {
implicit final class MonoidSyntaxExt[T](peer:T)(implicit T:Monoid[T]) {
def times(count:Int):T = T.times(peer, count)
}
implicit final class IterableMonoidSyntaxExt[T](peer:Iterable[T])(implicit T:Monoid[T]) {
def combineAll:... | ritschwumm/scutil | modules/core/src/main/scala/scutil/lang/tc/MonoidSyntax.scala | Scala | bsd-2-clause | 498 |
package stormlantern.consul.client.loadbalancers
import org.scalatest.{ Matchers, FlatSpecLike }
class RoundRobinLoadBalancerSpec extends FlatSpecLike with Matchers {
"The RoundRobinLoadBalancer" should "select a connection" in {
val sut = new RoundRobinLoadBalancer
sut.selectConnection shouldBe empty
... | derjust/reactive-consul | client/src/test/scala/stormlantern/consul/client/loadbalancers/RoundRobinLoadBalancerSpec.scala | Scala | mit | 863 |
package com.mnenmenth.camclient.core
import java.awt.event.{ActionEvent, ActionListener, WindowAdapter, WindowEvent}
import java.awt.image.BufferedImage
import java.awt.{Dimension, Graphics, GraphicsEnvironment}
import java.io._
import java.net.{Socket, SocketAddress}
import javax.imageio.ImageIO
import javax.swing.{J... | Mnenmenth/RobotCode | Pi/CamClient/src/main/scala/com/mnenmenth/camclient/core/CamClient.scala | Scala | apache-2.0 | 2,941 |
package actors
import akka.actor.{Props, ActorRef, Actor}
import utils.{StockQuote, FakeStockQuote}
import java.util.Random
import scala.collection.immutable.{HashSet, Queue}
import scala.collection.JavaConverters._
import scala.concurrent.duration._
import scala.concurrent.ExecutionContext.Implicits.global
import pla... | gkossakowski/vernier | ibeacon-server/app/actors/BeaconActor.scala | Scala | mit | 3,296 |
/***********************************************************************
* 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... | ddseapy/geomesa | geomesa-accumulo/geomesa-accumulo-raster/src/main/scala/org/locationtech/geomesa/raster/iterators/IndexedSpatioTemporalFilter.scala | Scala | apache-2.0 | 1,533 |
package com.karasiq.mailrucloud.api
import scala.concurrent.{ExecutionContext, Future}
import scala.language.postfixOps
import akka.actor.ActorSystem
import akka.http.scaladsl.model.{HttpRequest, HttpResponse}
import akka.stream.Materializer
import com.karasiq.mailrucloud.api.impl.DefaultMailCloudContext
trait Mail... | Karasiq/mailrucloud-api | library/src/main/scala/com/karasiq/mailrucloud/api/MailCloudContext.scala | Scala | apache-2.0 | 752 |
package ctlmc
import ctlmc.bddgraph._
class Model(
val parameters: Model.Parameters,
val states: Array[State],
val transitions: Graph
)
object Model {
type ParameterName = String
type Domain = Map[String, Int]
type Parameters = Map[ParameterName, (Domain, Int)]
}
| fpoli/ctlmc | src/main/scala/Model.scala | Scala | gpl-3.0 | 272 |
/*
* Copyright 2014 James Shade
*
* 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... | jamesshade/common | src/main/scala/org/shade/common/collection/MapDecorators.scala | Scala | apache-2.0 | 1,501 |
/*
* 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 | app/iht/controllers/registration/executor/ExecutorOverviewController.scala | Scala | apache-2.0 | 4,649 |
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
/** @author John Miller
* @version 1.2
* @date Sun Sep 16 22:35:14 EDT 2012
* @see LICENSE (MIT style license file).
* @see http://en.wikipedia.org/wiki/Gillespie_algorithm
*/
// U N D E R D E V E L O P M E N T
package... | scalation/fda | scalation_1.2/src/main/scala/scalation/dynamics/SSA.scala | Scala | mit | 3,935 |
package org.openmole.site
import scalatags.Text.all._
import tools._
/*
* Copyright (C) 01/04/16 // mathieu.leclaire@openmole.org
*
* 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 Foundation, ... | openmole/openmole | openmole/bin/org.openmole.site/jvm/src/main/scala/org/openmole/site/stylesheet.scala | Scala | agpl-3.0 | 3,596 |
package com.olvind
package sui
import ammonite.ops._
import scala.language.implicitConversions
case class SuiLibrary(base: Path) extends Library {
/* todo: make requiresjs clever enough to figure this out by itself */
override val locations =
Seq(
base
)
override val prefixOpt = Some("Sui")
... | chandu0101/scalajs-react-components | gen/src/main/scala/com/olvind/sui/SuiLibrary.scala | Scala | apache-2.0 | 8,135 |
package biology
import physical.GeoCoordinate
class Birthplace(val name: String, val reef : Int, val location: GeoCoordinate) {}
| shawes/zissou | src/main/scala/biology/Birthplace.scala | Scala | mit | 131 |
import sbt._
import sbt.Keys._
import play.Play.autoImport._
import com.typesafe.sbt.SbtNativePackager._
object PublicOnFileSystem {
val settings = Seq(
mappings in Universal <++= (baseDirectory in Compile) { _ / "public" } map { dir: File =>
val directoryLen = dir.getCanonicalPath.length
val pathFi... | pahomovda/scissis-prototype1 | project/PublicOnFileSystem.scala | Scala | mit | 502 |
package com.rklaehn.interval
import com.rklaehn.interval.IntervalTrieSampleCheck._
import org.scalacheck.Properties
import org.scalacheck.Prop._
import spire.math.Rational
import spire.syntax.all._
import spire.std.any._
object IntervalSeqSampleCheck extends Properties("IntervalSeq.Sample") {
// this will resolve ... | rklaehn/intervalset | src/test/scala/com/rklaehn/interval/IntervalSeqSampleCheck.scala | Scala | apache-2.0 | 4,705 |
package io.scalding.approximations.BloomFilter
import com.twitter.algebird._
import com.twitter.scalding._
import io.scalding.approximations.model.Wikipedia
/**
* Generate a BF per month - containing all the unique authors of Wikipedia that were active during that month
* There are roughly 5 Million authors in data... | scalding-io/social-media-analytics | src/main/scala/io/scalding/approximations/BloomFilter/WikipediaBF.scala | Scala | apache-2.0 | 5,709 |
/***********************************************************************
* 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-tools/src/test/scala/org/locationtech/geomesa/tools/utils/ParameterConvertersTest.scala | Scala | apache-2.0 | 1,375 |
/*
* 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... | AnSavvides/zipkin | zipkin-query-core/src/main/scala/com/twitter/zipkin/query/QueryService.scala | Scala | apache-2.0 | 16,447 |
/*
* 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/main/scala/org/mongodb/scala/MongoCredential.scala | Scala | apache-2.0 | 6,528 |
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.