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 2009-2016 EPFL, Lausanne */
package leon
package invariant.util
import purescala.Common._
import purescala.Types._
import scala.collection.mutable.{ Set => MutableSet, Map => MutableMap}
object TVarFactory {
type Context = Int
val temporaries = MutableMap[Context, MutableSet[Identifier]]()
privat... | epfl-lara/leon | src/main/scala/leon/invariant/util/TVarFactory.scala | Scala | gpl-3.0 | 988 |
package com.fsist.safepickle
import scala.reflect.runtime.universe._
case class Pickleable[T](t: T)(implicit val pickler: Pickler[T]) {
def write(writer: PickleWriter[_]): Unit = writer.write(t)(pickler)
}
object Pickleable {
implicit def pickler[T](implicit tag: TypeTag[Pickleable[T]]): Pickler[Pickleable[T]] = ... | fsist/safepickle | src/main/scala/com/fsist/safepickle/Pickleable.scala | Scala | apache-2.0 | 834 |
package io.youi
trait UpdateSupport extends TaskSupport {
private var lastUpdate: Double = 0.0
val timeStamp: Val[Double] = Var(0.0)
protected val updateFunction: Double => Unit = (highResTimeStamp: Double) => {
val delta = if (lastUpdate == 0.0) {
0.0
} else {
(highResTimeStamp - lastUpdat... | outr/youi | ui/js/src/main/scala/io/youi/UpdateSupport.scala | Scala | mit | 549 |
package mesosphere.marathon
package core.launcher.impl
import java.time.Clock
import mesosphere.UnitTest
import mesosphere.marathon.core.condition.Condition
import mesosphere.marathon.core.instance.Instance
import mesosphere.marathon.core.instance.Instance.AgentInfo
import mesosphere.marathon.core.pod.{MesosContainer... | mesosphere/marathon | src/test/scala/mesosphere/marathon/core/launcher/impl/InstanceOpFactoryImplTest.scala | Scala | apache-2.0 | 7,928 |
package com.autodesk.tct.challenger.cassandra
import java.util.UUID
import com.autodesk.tct.challenger.data.repositories.{IUserRepository, User}
import com.websudos.phantom.Implicits.{CassandraTable, _}
import org.joda.time.DateTime
import scala.concurrent.Future
/**
* User Table (Cassandra Table representation)
... | adsk-cp-tct/challenger-backend | challenger-cassandra/src/main/scala/com/autodesk/tct/challenger/cassandra/User.scala | Scala | gpl-3.0 | 5,443 |
package net.walend.disentangle.graph.semiring
import net.walend.disentangle.graph.SomeGraph
import net.walend.disentangle.graph.semiring.Brandes.BrandesSteps
import org.scalatest.{Matchers, FlatSpec}
/**
*
*
* @author dwalend
* @since v0.2.1
*/
class UndirectedGraphTest extends FlatSpec with Matchers {
i... | dwalend/Disentangle | graph/jvm/src/test/scala/net/walend/disentangle/graph/semiring/UndirectedGraphTest.scala | Scala | mit | 6,073 |
package controllers
import scala.concurrent._
import duration._
import org.specs2.mutable._
import play.api.libs.json._
import play.api.test._
import play.api.test.Helpers._
import java.util.concurrent.TimeUnit
/**
* You can mock out a whole application including requests, plugins etc.
* For more information, con... | danihegglin/renga | web/test/controllers/UsersIT.scala | Scala | apache-2.0 | 2,447 |
package sigmastate.serialization.transformers
import sigmastate.SType
import sigmastate.Values.{Value, SValue}
import sigmastate.lang.Terms._
import sigmastate.serialization.ValueSerializer
import sigmastate.utils.SigmaByteWriter.DataInfo
import sigmastate.utils.{SigmaByteReader, SigmaByteWriter}
import sigmastate.utx... | ScorexFoundation/sigmastate-interpreter | sigmastate/src/main/scala/sigmastate/serialization/transformers/SimpleTransformerSerializer.scala | Scala | mit | 801 |
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2014 Adobe Systems Incorporated. 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 ... | adobe-research/spindle | src/main/scala/QueryApp.scala | Scala | apache-2.0 | 1,238 |
package org.receiver2d.engine.geometry
import org.receiver2d.engine.math.Vec2
import scala.annotation.tailrec
/**
* Aids the physics engine in finding collisions between any
* two bodies.
*/
object CollisionDetection {
/**
* An axis-aligned minimum bounding box, where the axes are x, y
*/
type AABB = Re... | Prince781/Receiver2D | src/main/scala/org/receiver2d/engine/geometry/CollisionDetection.scala | Scala | gpl-2.0 | 2,532 |
package services
import java.time.{ Clock, Instant }
import javax.inject._
import play.api.Logger
import play.api.inject.ApplicationLifecycle
import scala.concurrent.Future
/**
* This class demonstrates how to run code when the
* application starts and stops. It starts a timer when the
* application starts. When t... | kbedel/play-swagger | example/app/services/ApplicationTimer.scala | Scala | apache-2.0 | 1,528 |
/*
* The Computer Language Shootout
* http://shootout.alioth.debian.org/
*
* contributed by Andrei Formiga
*/
object recursive
{
def ack(x:int, y:int): int = if (x == 0) y + 1
else if (y == 0) ack(x - 1, 1)
else ack(x - 1, ack(x, y - 1))
def fib(n:int): int = if (n < 2) 1 e... | kragen/shootout | bench/recursive/recursive.scala | Scala | bsd-3-clause | 1,164 |
package definiti.core.validation.helpers
import definiti.common.ast._
import definiti.common.control.{Control, ControlResult}
import definiti.common.validation.Alert
private[core] trait TopLevelParameterControlHelper {
self: Control[Root] =>
private val authorizedTypes: Seq[TypeReference] = Seq("Boolean", "Numbe... | definiti/definiti-core | src/main/scala/definiti/core/validation/helpers/TopLevelParameterControlHelper.scala | Scala | mit | 1,655 |
/**
* 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... | mihbor/kafka | core/src/main/scala/kafka/utils/ToolsUtils.scala | Scala | apache-2.0 | 2,466 |
import io.gatling.recorder.GatlingRecorder
import io.gatling.recorder.config.RecorderPropertiesBuilder
object Recorder extends App {
val props = new RecorderPropertiesBuilder
props.simulationOutputFolder(IDEPathHelper.recorderOutputDirectory.toString)
props.simulationPackage("org.bahmni.gatling.spec")
props.bodie... | Bhamni/experiment | bahmni-gatling/src/test/scala/Recorder.scala | Scala | apache-2.0 | 449 |
package kogu.spark.distribution
import java.util
import com.google.common.primitives.Ints
import com.twitter.algebird.{CMS, CMSMonoid, HyperLogLogMonoid}
import kogu.spark.JdbcDetails
import kogu.spark.distribution.utils._
import org.apache.spark.rdd.RDD
import org.apache.spark.sql.hive.HiveContext
import org.apache.... | kogupta/SparkPlayground | src/main/scala/kogu/spark/distribution/Distribution.scala | Scala | apache-2.0 | 5,997 |
package com.github.nzyuzin.assignments.ai.dtrees
import com.github.nzyuzin.assignments.ai.dtrees.Creditability.Creditability
import com.github.nzyuzin.assignments.ai.dtrees.Education.Education
import com.github.nzyuzin.assignments.ai.dtrees.LevelOfTrust.LevelOfTrust
class Record(edu: Education,
ag: Int,
... | nzyuzin/ai-assignments | src/main/scala/com/github/nzyuzin/assignments/ai/dtrees/Record.scala | Scala | gpl-3.0 | 1,535 |
package com.kakao.mango
import com.kakao.mango.concurrent.ConcurrentConverters
import com.kakao.mango.logging.Logging
import org.scalatest.{BeforeAndAfterAll, FunSuite, Matchers}
abstract class MangoFunSuite extends FunSuite with Matchers with BeforeAndAfterAll with Logging with ConcurrentConverters
| kakao/mango | mango-core/src/test/scala/com/kakao/mango/MangoFunSuite.scala | Scala | apache-2.0 | 303 |
package us.feliscat.m17n
import java.util.Locale
/**
* @author K. Sakamoto
* Created on 2017/08/09
*/
trait EnglishLocale extends MultiLingualLocale {
override lazy val locale: Locale = Locale.ENGLISH
}
| ktr-skmt/FelisCatusZero-multilingual | libraries/src/main/scala/us/feliscat/m17n/EnglishLocale.scala | Scala | apache-2.0 | 221 |
/*
* 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 ... | GJL/flink | flink-examples/flink-examples-table/src/main/scala/org/apache/flink/table/examples/scala/StreamSQLExample.scala | Scala | apache-2.0 | 3,790 |
/*
* Copyright (c) 2016-present, Total Location Test Paragraph.
* All rights reserved.
*
* This file is part of Where@. Where@ is free software:
* you can redistribute it and/or modify it under the terms of
* the GNU General Public License (GPL), either version 3
* of the License, or (at your option) any later v... | whereat/whereat-location-server | src/test/scala/io/whereat/integration/ClientIntegrationTest.scala | Scala | gpl-3.0 | 2,186 |
package Tutorial
import Chisel._
import Node._
import Literal._
import scala.collection.mutable.HashMap
class gBundle[inT <: Data, outT <: Data] (inData: => inT, outData: => outT) extends Bundle {
val in = (new FIFOIO()) {inData}.flip
val out = (new FIFOIO()) {outData}
}
class gComponent[inT <: Data, outT <: Da... | seyedmaysamlavasani/GorillaPP | chisel/KmeansAndMesh/backup/ChainUsingMetaDataClassNotWorking/Gorilla++.scala | Scala | bsd-3-clause | 1,804 |
package io.circe.async
import com.twitter.concurrent.{ Spool, SpoolSource }
import com.twitter.io.Buf
import com.twitter.util.Future
import io.circe.Json
import io.circe.jawn.CirceSupportParser
import jawn.AsyncParser
/**
* A rough sketch that needs a lot of fleshing out.
*/
class StreamingParser {
private[this] ... | groz/circe | async/src/main/scala/io/circe/async/StreamingParser.scala | Scala | apache-2.0 | 939 |
package mimir.optimizer.operator
import com.typesafe.scalalogging.LazyLogging
import mimir.algebra._
import mimir.optimizer.OperatorOptimization
object PullUpConstants extends OperatorOptimization with LazyLogging
{
def apply(o:Operator): Operator =
{
val (rewritten, constants) = extractConstants(o)
if(... | UBOdin/mimir | src/main/scala/mimir/optimizer/operator/PullUpConstants.scala | Scala | apache-2.0 | 4,590 |
/* 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.searchEngine.queries
import org.scalatest.FlatSpec
import org.scalatest.Matchers
import scaps.api._... | scala-search/scaps | core/src/test/scala/scaps/searchEngine/queries/ExpandedQuerySpecs.scala | Scala | mpl-2.0 | 2,072 |
/*******************************************************************************
* Copyright 2017 Capital One Services, LLC and Bitwise, Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the Licens... | capitalone/Hydrograph | hydrograph.engine/hydrograph.engine.spark/src/main/scala/hydrograph/engine/spark/executiontracking/plugin/ExecutionTrackingPlugin.scala | Scala | apache-2.0 | 12,463 |
package com.datawizards.dqm.rules.group
import com.datawizards.dqm.configuration.ValidationContext
import com.datawizards.dqm.result.{GroupByStatistics, InvalidGroup}
case class NotEmptyGroups(expectedGroups: Seq[String]) extends GroupRule {
override def name: String = "NotEmptyGroups"
override def validate(gro... | piotr-kalanski/data-quality-monitoring | src/main/scala/com/datawizards/dqm/rules/group/NotEmptyGroups.scala | Scala | apache-2.0 | 870 |
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2015-2021 Andre White.
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
... | adarro/ddo-calc | subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/enhancement/enhancements/MetaMagicEnhancement.scala | Scala | apache-2.0 | 964 |
package dotty.tools.dotc.core
import language.implicitConversions
object Flags {
/** A FlagSet represents a set of flags. Flags are encoded as follows:
* The first two bits indicate whether a flagset applies to terms,
* to types, or to both. Bits 2..63 are available for properties
* and can be doubly ... | folone/dotty | src/dotty/tools/dotc/core/Flags.scala | Scala | bsd-3-clause | 22,530 |
/*
* 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 ... | aokolnychyi/spark | streaming/src/main/scala/org/apache/spark/streaming/rdd/WriteAheadLogBackedBlockRDD.scala | Scala | apache-2.0 | 9,282 |
object SCL7901 {
class I
class J extends I
class A {
def foo(j: J) = 1
}
class B extends A {
def foo(i: I)(s: String) = 2
}
val b = new B
val i: Int = /*start*/b.foo(new J)/*end*/
}
//Int | ilinum/intellij-scala | testdata/typeInference/bugs5/SCL7901.scala | Scala | apache-2.0 | 213 |
package spark
import scalaz._
import Scalaz._
import scalaz.Validation
import scalaz.Validation.FlatMap._
import net.liftweb.json._
import net.liftweb.json.scalaz.JsonScalaz._
import controllers.Constants._
import java.nio.charset.Charset
import io.megam.auth.funnel._
import io.megam.auth.funnel.FunnelErrors._
import ... | meglytics/bidi | app/spark/SparkSubmitter.scala | Scala | mit | 1,667 |
package enumeratum.helpers
import play.api.mvc.{Action, ActionBuilder, AnyContent, AnyContentAsEmpty, BodyParsers, Result}
object ActionHelper {
import scala.concurrent.ExecutionContext.Implicits.global
def apply(block: => Result): Action[AnyContent] =
new ActionBuilder.IgnoringBody().apply(block)
}
| lloydmeta/enumeratum | enumeratum-play/compat/src/test/scala-2.13/enumeratum/helpers/ActionHelper.scala | Scala | mit | 313 |
// "MiniMap" demonstrates details of case classes and how Scala implements
// the literal syntax for its Maps: Map("one" -> 1, "two" -> 2)
class MiniMap1[K,V](val pairs: Tuple2[K,V]*) {
override def toString = pairs.mkString("MiniMap1(", ", ", ")")
}
val mm1a = new MiniMap1(("one", 1), ("two", 2))
println(mm1a)
//... | deanwampler/SeductionsOfScalaTutorial | code-examples/minimap.scala | Scala | apache-2.0 | 1,216 |
package truffletest
import com.oracle.truffle.api._
import com.oracle.truffle.api.frame._
import com.oracle.truffle.api.nodes._
import com.oracle.truffle.api.nodes.Node._
import scala.annotation.target.field
import org.scalatest._
class TruffleTestApi extends FunSuite {
/**
* <h3>Accessing the Truffle Runtime</h3>... | RomanTsegelskyi/lms-truffle | src/test/scala/truffletest/TruffleTestApi.scala | Scala | gpl-2.0 | 22,822 |
//import org.specs2.mutable._
//import org.specs2.runner._
//import org.junit.runner._
//
//import play.api.test._
//import play.api.test.Helpers._
//
///**
// * add your integration spec here.
// * An integration test will fire up a whole play application in a real (or headless) browser
// */
//@RunWith(cla... | chidakiyo/exdiff | test/IntegrationSpec.scala | Scala | apache-2.0 | 636 |
package im.mange.jetpac
trait HasAttributes {
var attributes = Map.empty[String, String]
//TODO: should probably support maps ...
def addAttribute(key: String, value: String): this.type = { attributes = attributes.updated(key, value); this }
}
| alltonp/jetboot | src/main/scala/im/mange/jetpac/HasAttributes.scala | Scala | apache-2.0 | 252 |
/*
* 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/Cast.scala | Scala | apache-2.0 | 49,582 |
package root.core.other.change.impl.case1
import root.core.other.change.impl.case1.ContextPredicate.CxtPredicate
/**
* User: Constantine Solovev
* Created: 04.06.17 6:50
*
* Change behavior of multilevel object with implicit wrapping on the fly.
*/
// Base final classes, witch should change functionality
sea... | RicoGit/scala-core | src/main/scala/root/core/other/change/impl/case1/ChangeBehaviorOnTheFly.scala | Scala | apache-2.0 | 3,912 |
package org.brijest.storm
package engine
package model
import components._
object Action {
implicit object ActionOrdering extends Ordering[Action] {
def compare(a1: Action, a2: Action) = 0
}
// higher order
def composite(actions: Action*) = CompositeAction(actions)
def nothing = NoAction
... | axel22/scala-2d-game-editor | src/main/scala/org/brijest/storm/engine/model/actions.scala | Scala | bsd-3-clause | 1,662 |
package controllers
import actors.RandomNumberActor
import play.api._
import play.api.mvc._
import play.api.Play.current
class Application extends Controller {
def index = Action {
Ok(views.html.index("Your new application is ready."))
}
def dummyload = Action {
Ok(views.html.viz())
}
def socket ... | rahulkumar-aws/play-websocket-work | app/controllers/Application.scala | Scala | apache-2.0 | 433 |
package org.jetbrains.plugins.scala
package lang.psi.api
import com.intellij.openapi.diagnostic.Logger
import com.intellij.psi.{PsiElement, PsiNamedElement, PsiTypeParameterListOwner}
import org.jetbrains.plugins.scala.extensions._
import org.jetbrains.plugins.scala.lang.macros.evaluator.{MacroContext, ScalaMacroEvalu... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/lang/psi/api/InferUtil.scala | Scala | apache-2.0 | 28,018 |
package net.debasishg.sw15.algebra
package domain.trade
package interpreter
trait ExecutionModel {this: RefModel =>
case class Execution(account: Account, instrument: Instrument, refNo: String, market: Market,
unitPrice: BigDecimal, quantity: BigDecimal)
}
| debasishg/scalaworld15 | src/main/scala/sw15/algebra/algebra/executionmodel.scala | Scala | apache-2.0 | 265 |
package com.datascience.education.tutorial.lecture4a
import cats.data.Xor
import cats.data.Xor.Left
import cats.data.Xor.Right
import cats.data.NonEmptyList
object XorErrors {
import XorHelpers._
type XorErrors[E, A] = Xor[NonEmptyList[E], A]
// use Right and Left instead
// def right[E,A](a: A): XorErro... | DS12/scala-class | tutorial/src/main/scala/com/datascience/education/tutorial/lecture4a/XorErrors.scala | Scala | cc0-1.0 | 2,523 |
package com.twitter.finagle.http
import com.twitter.finagle.Stack.Params
import com.twitter.finagle.client.Transporter
import com.twitter.finagle.{ServiceFactory, Service, Stack, Stackable, SimpleFilter}
import com.twitter.util.Future
/**
* Adds the host headers to for TLS-enabled requests.
*/
class TlsFilter(host:... | a-manumohan/finagle | finagle-http/src/main/scala/com/twitter/finagle/http/TlsFilter.scala | Scala | apache-2.0 | 1,096 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | pgandhi999/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/sources/TextSocketMicroBatchStream.scala | Scala | apache-2.0 | 6,158 |
package sgwlpr
import akka.event.LoggingAdapter
trait Logging {
def log: LoggingAdapter
}
| th0br0/sgwlpr | framework/src/main/scala/sgwlpr/Logging.scala | Scala | agpl-3.0 | 94 |
/*
* Copyright 2009-2014 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 ... | thesiddharth/norbert | network/src/test/scala/com/linkedin/norbert/network/partitioned/loadbalancer/DefaultClusteredLoadBalancerFactorySpec.scala | Scala | apache-2.0 | 9,126 |
/*
* 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 ... | hongyuhong/flink | flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/calls/ScalarOperators.scala | Scala | apache-2.0 | 38,801 |
/*
* 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... | jenniew/BigDL | spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/tf/ControlDependency.scala | Scala | apache-2.0 | 1,595 |
package cgta.oscala
package sjs.lang
import scala.scalajs.js
//////////////////////////////////////////////////////////////
// Created by bjackman @ 4/19/14 11:18 PM
//////////////////////////////////////////////////////////////
object JsConsole {
implicit class RichConsole(val c: JsConsole) extends AnyVal {
... | cgta/open | oscala/js/src/main/scala/cgta/oscala/sjs/lang/JsConsole.scala | Scala | mit | 843 |
/*
* 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 ... | aosagie/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/package.scala | Scala | apache-2.0 | 6,379 |
import scala.reflect.macros.blackbox.Context
object Impls {
def impl(c: Context) = { import c.universe._; c.Expr[Unit](q"()") }
}
| yusuke2255/dotty | tests/untried/neg/macro-invalidusage-presuper/Impls_1.scala | Scala | bsd-3-clause | 133 |
/*
* 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/pensions-lifetime-allowance-frontend | test/forms/PSODetailsFormSpec.scala | Scala | apache-2.0 | 7,649 |
/*
* ____ ____ _____ ____ ___ ____
* | _ \\ | _ \\ | ____| / ___| / _/ / ___| Precog (R)
* | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data
* | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, In... | precog/platform | accounts/src/test/scala/com/precog/accounts/InMemoryAccountManager.scala | Scala | agpl-3.0 | 3,929 |
package greetings {
object hello {
def speak = println("Hello!")
}
package hello {
object speak {
println("Hello!!!")
}
}
}
| grzegorzbalcerek/scala-book-examples | examples/PackageNameConflict13.scala | Scala | mit | 150 |
package com.criteo.dev.cluster.aws
import org.slf4j.Logger
import com.criteo.dev.cluster.{CliAction, Public}
import org.jclouds.compute.domain.NodeMetadata
import org.slf4j.LoggerFactory
/**
* Lists AWS clusters of this user.
*/
@Public
object ListAwsCliAction extends CliAction[List[AwsCluster]] {
override de... | szehonCriteo/berilia | src/main/scala/com/criteo/dev/cluster/aws/ListAwsCliAction.scala | Scala | apache-2.0 | 1,226 |
package com.sksamuel.elastic4s.search.aggs
import com.sksamuel.elastic4s.RefreshPolicy
import com.sksamuel.elastic4s.http.search.DateHistogramBucket
import com.sksamuel.elastic4s.searches.DateHistogramInterval
import com.sksamuel.elastic4s.searches.aggs.ExtendedBounds
import com.sksamuel.elastic4s.testkit.DockerTests
... | Tecsisa/elastic4s | elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/search/aggs/DateHistogramAggregationHttpTest.scala | Scala | apache-2.0 | 2,596 |
package org.jetbrains.plugins.scala
package lang
package psi
package stubs
import com.intellij.psi.stubs.StubElement
import org.jetbrains.plugins.scala.lang.psi.api.expr.ScAnnotations
/**
* User: Alexander Podkhalyuzin
* Date: 22.06.2009
*/
trait ScAnnotationsStub extends StubElement[ScAnnotations]
| ilinum/intellij-scala | src/org/jetbrains/plugins/scala/lang/psi/stubs/ScAnnotationsStub.scala | Scala | apache-2.0 | 308 |
/**
* Copyright 2015 Thomson Reuters
*
* 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... | nruppin/CM-Well | server/cmwell-tracking/src/main/scala/cmwell/tracking/ResurrectorActor.scala | Scala | apache-2.0 | 6,590 |
package daos.doobie
import doobie.imports.IOLite
import doobie.util.transactor.DataSourceTransactor
import play.api.db.Database
/** Utilitario para obtener el transactor para la conexion a BD */
object DoobieTransactor {
def transactor(db: Database) = DataSourceTransactor[IOLite](db.dataSource)
}
| kdoomsday/kaminalapp | app/daos/doobie/DoobieTransactor.scala | Scala | mit | 302 |
package mesosphere.marathon
package api
import javax.servlet.http.HttpServletRequest
import javax.ws.rs.core.Response
import mesosphere.UnitTest
import mesosphere.marathon.plugin.auth.{ Authenticator, Authorizer, Identity }
import mesosphere.marathon.plugin.http.{ HttpRequest, HttpResponse }
import scala.concurrent.... | guenter/marathon | src/test/scala/mesosphere/marathon/api/AuthResourceTest.scala | Scala | apache-2.0 | 2,776 |
package com.twitter.finagle.stats
import com.twitter.common.metrics.{Histogram, Metrics}
import com.twitter.common.stats.{Stats => CStats, Stat => CStat}
import com.twitter.finagle.benchmark.StdBenchAnnotations
import com.twitter.ostrich.stats.StatsSummary
import com.twitter.util.events.Sink
import java.util
import or... | adriancole/finagle | finagle-benchmark/src/main/scala/com/twitter/finagle/stats/StatsReceiverBenchmark.scala | Scala | apache-2.0 | 4,661 |
package com.avsystem.commons
package mongo
import java.time.Instant
import org.bson.types.ObjectId
import org.bson.{BsonArray, BsonBinary, BsonBoolean, BsonDateTime, BsonDocument, BsonDouble, BsonInt32, BsonInt64, BsonObjectId, BsonString, BsonValue}
import _root_.scala.collection.compat._
import _root_.scala.langua... | AVSystem/scala-commons | commons-mongo/jvm/src/main/scala/com/avsystem/commons/mongo/BsonCodec.scala | Scala | mit | 2,209 |
package com.github.j5ik2o.reactive.redis
import akka.routing.DefaultResizer
import cats.data.NonEmptyList
import monix.eval.Task
class RedisConnectionPoolSpec extends AbstractRedisConnectionPoolSpec("RedisConnectionPoolSpec") {
override protected def createConnectionPool(peerConfigs: NonEmptyList[PeerConfig]): Redi... | j5ik2o/reactive-redis | core/src/test/scala/com/github/j5ik2o/reactive/redis/RedisConnectionPoolSpec.scala | Scala | mit | 650 |
package org.jetbrains.plugins.scala
package lang
package refactoring
import com.intellij.openapi.util.TextRange
case class Association(path: dependency.Path,
var range: TextRange) | JetBrains/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/lang/refactoring/Association.scala | Scala | apache-2.0 | 204 |
/*
* Copyright 2021 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | hmrc/amls-frontend | test/models/businessdetails/VATRegisteredSpec.scala | Scala | apache-2.0 | 5,946 |
/**
* Copyright 2009 Google 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... | masterx2/noop | interpreter/src/main/scala/noop/types/IntegerFactory.scala | Scala | apache-2.0 | 795 |
package im.actor.server.activation.gate
import akka.http.scaladsl.unmarshalling._
import akka.stream.Materializer
import play.api.libs.json._
import play.api.libs.functional.syntax._
import akka.http.scaladsl.unmarshalling.PredefinedFromEntityUnmarshallers._
import im.actor.server.activation.Activation.{ EmailCode, ... | boneyao/actor-platform | actor-server/actor-activation/src/main/scala/im/actor/server/activation/gate/JsonImplicits.scala | Scala | mit | 1,903 |
package honor
import models.join.FleetGroupWithShip
import ranking.EvolutionBase
import collection.breakOut
/**
*
* @author ponkotuy
* Date: 15/03/22.
*/
object FleetGroup extends HonorCategory {
override def category: Int = 13
override def approved(memberId: Long, db: HonorCache): List[String] = {
val f... | nekoworkshop/MyFleetGirls | server/app/honor/FleetGroup.scala | Scala | mit | 738 |
package hstore
import com.github.tminglei.slickpg._
import org.scalatest.funsuite.AnyFunSuite
import org.scalatest.matchers.should.Matchers
import slick.lifted.ProvenShape
import java.time.YearMonth
import java.util.UUID
class SlickPgHstoreTests extends AnyFunSuite with Matchers {
import pl.iterators.kebs.Kebs
i... | theiterators/kebs | slick/src/test/scala/hstore/SlickPgHstoreTests.scala | Scala | mit | 5,263 |
// goseumdochi: experiments with incarnation
// Copyright 2016 John V. Sichi
//
// 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... | lingeringsocket/goseumdochi | watchdog/src/main/scala/org/goseumdochi/android/watchdog/WatchdogAboutActivity.scala | Scala | apache-2.0 | 1,675 |
package scala.virtualization.lms
package epfl
package test4
// unused code -- just a sanity check to make sure it compiles
trait FooA {
type Rep[T] = Option[T]
def decons[A](x: Rep[scala.::[A]]): Some[(Rep[A], Rep[List[A]])]
object Foo {
def unapply[A](x: Rep[scala.::[A]]): Some[(Rep[A], Rep[List[A]])] = ... | afernandez90/virtualization-lms-core | test-src/epfl/test4-functions/FooBar.scala | Scala | bsd-3-clause | 1,052 |
package ore.models.user.role
import scala.language.higherKinds
import ore.db.impl.common.Visitable
import ore.db.{Model, ModelService}
import ore.models.organization.Organization
import ore.permission.role.Role
import cats.MonadError
/**
* Represents a user's [[Role]] in something like a [[ore.models.project.Proj... | SpongePowered/Ore | models/src/main/scala/ore/models/user/role/UserRoleModel.scala | Scala | mit | 779 |
/*
* 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... | psyyz10/BigDL | spark/dl/src/test/scala/com/intel/analytics/bigdl/torch/SpatialConvolutionSpec.scala | Scala | apache-2.0 | 4,549 |
/***********************************************************************
* Copyright (c) 2013-2022 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and... | locationtech/geomesa | geomesa-spark/geomesa-spark-sql/src/main/scala/org/locationtech/geomesa/spark/sql/GeoJSONExtensions.scala | Scala | apache-2.0 | 1,712 |
package sparklyr
import org.apache.spark.rdd.RDD
import org.apache.spark.sql.DataFrame
import org.apache.spark.sql.Row
object StratifiedSamplingUtils {
def sampleWithoutReplacement(
df: DataFrame,
groupVars: Seq[String],
weightColumn: String,
k: Int,
seed: Long
): RDD[Row] = {
unsupportedO... | rstudio/sparklyr | java/spark-2.0.0/stratifiedsamplingutils.scala | Scala | apache-2.0 | 1,104 |
package net.sf.latexdraw.glib.models.impl
import java.awt.Color
import java.util.ArrayList
import java.util.List
import scala.collection.JavaConversions._
import org.malai.mapping.ActiveArrayList
import net.sf.latexdraw.glib.models.interfaces.IArc.ArcStyle
import net.sf.latexdraw.glib.models.interfaces.IArrow.Arrow... | arnobl/latexdraw-mutants | GUImutants/original/net.sf.latexdraw/src/main/net/sf/latexdraw/glib/models/impl/LGroup.scala | Scala | gpl-2.0 | 31,257 |
/*
* Copyright (C) 2016 Christopher Batey and Dogan Narinc
*
* 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... | mikefero/cpp-driver | gtests/src/integration/scassandra/server/server/src/test/scala/org/scassandra/server/actors/FatalHandlingBehaviors.scala | Scala | apache-2.0 | 1,354 |
/*
* Copyright (c) 2014-2021 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... | monixio/monix | monix-tail/shared/src/main/scala/monix/tail/internal/IterantTail.scala | Scala | apache-2.0 | 1,116 |
/*
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 not use this f... | mandar2812/DynaML | dynaml-core/src/main/scala/io/github/tailhq/dynaml/optimization/GradBasedGlobalOptimizer.scala | Scala | apache-2.0 | 3,783 |
import com.datastax.driver.core.Cluster
sealed trait Event
object Click extends Event
object Impression extends Event
object Event {
def apply(s: String) = s match {
case "impression" => Impression
case "click" => Click
case _ => throw new IllegalArgumentException("No such event: " + s)
}
}
trait Rep... | sergey-melnychuk/ecsde | src/main/scala/Repository.scala | Scala | mit | 1,684 |
package org.powlab.jeye.decode.pattern.cycle
import org.powlab.jeye.decode.expression.IfExpression
import org.powlab.jeye.decode.graph.OpcodeDetails.CycleOpcodeDetail
import org.powlab.jeye.decode.graph.OpcodeNode
import org.powlab.jeye.decode.graph.OpcodeNodes.before
import org.powlab.jeye.decode.graph.OpcodeTree
imp... | powlab/jeye | src/main/scala/org/powlab/jeye/decode/pattern/cycle/CycleWhilePattern.scala | Scala | apache-2.0 | 3,883 |
package org.phenoscape.owl
import org.apache.commons.codec.digest.DigestUtils
import org.apache.commons.lang3.StringUtils
import org.phenoscape.kb.ingest.util.{OBOUtil, PostCompositionParser}
import org.phenoscape.owl.Vocab._
import org.phenoscape.scowl._
import org.semanticweb.owlapi.apibinding.OWLManager
import org.... | phenoscape/phenoscape-owl-tools | src/main/scala/org/phenoscape/owl/HomologyTableWithTaxa.scala | Scala | mit | 5,171 |
/* Copyright 2009-2016 EPFL, Lausanne */
package leon
package synthesis
package strategies
import synthesis.graph._
import leon.utils.Interruptible
abstract class Strategy extends Interruptible {
// Nodes to consider next
private var openNodes = Set[Node]()
def init(root: RootNode): Unit = {
openNodes +... | regb/leon | src/main/scala/leon/synthesis/strategies/Strategy.scala | Scala | gpl-3.0 | 1,078 |
package http
import container.HttpRequest
import org.scalatest.{Matchers, FlatSpec}
import scala.concurrent.{Await, Future}
import com.typesafe.config.ConfigFactory
import scala.util.{Failure, Success}
import scala.concurrent.duration._
import sun.reflect.generics.reflectiveObjects.NotImplementedException
class Test... | anderssonfilip/tradeshift-external-api-scala | http.dispatch/src/test/scala/http/TestDispatchHttpDelegate.scala | Scala | mit | 1,628 |
package nl.ing.hackathon.p2plending
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.model._
import akka.stream.ActorMaterializer
import akka.stream.scaladsl._
import scala.concurrent.Future
class BlockchainApi(endpoint: String/*, implicit val system: ActorSystem, implicit val m... | merlijn/24hcoding | api/src/main/scala/nl/ing/hackathon/p2plending/BlockchainApi.scala | Scala | mit | 883 |
/*
* Copyright (c) 2016, Innoave.com
* All rights reserved.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN... | haraldmaida/AbacusSFX | src/main/scala/com/innoave/abacus/domain/model/DigitBead.scala | Scala | apache-2.0 | 1,146 |
/*
* Copyright 2019 Spotify AB.
*
* 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 ... | spotify/scio | scio-extra/src/main/scala/com/spotify/scio/extra/bigquery/ToTableRow.scala | Scala | apache-2.0 | 4,525 |
package org.scalacvx.conic
import breeze.linalg.{DenseMatrix, DenseVector}
import org.scalacvx.atoms.Expression
import org.scalacvx.constraints.{ComparisonConstraint, ConeConstraint, Constraint}
import org.scalacvx.dcp.{ConstantVexity, AffineVexity}
//import org.scalacvx.atoms.Expression._
import org.scalacvx.conic.Co... | lorenzolucido/ScalaCVX | src/main/scala/org/scalacvx/conic/ConicForm.scala | Scala | mit | 3,253 |
package skinny.controller.feature
import java.util.Locale
import org.json4s.JsonAST._
import skinny.I18n
import skinny.controller.implicits.ParamsPermitImplicits
import skinny.micro.context.SkinnyContext
import skinny.micro.response.ResponseStatus
import skinny.micro.{ Format, _ }
import skinny.filter.SkinnyFilterAc... | seratch/skinny-framework | framework/src/main/scala/skinny/controller/feature/SkinnyControllerCommonBase.scala | Scala | mit | 4,965 |
package collins.util.security
import java.io.{File => IoFile}
import scala.io.Source
import play.api.Logger
import com.google.common.cache.CacheLoader
import collins.models.UserImpl
import collins.validation.File
case class FileUserLoader(users: FileUserMap) extends CacheLoader[String,FileUserMap] {
private[t... | funzoneq/collins | app/collins/util/security/FileUserLoader.scala | Scala | apache-2.0 | 1,459 |
package org.schedoscope.lineage.parser
import java.io.ByteArrayInputStream
import org.apache.calcite.avatica.util.Casing
import org.apache.calcite.sql.{SqlCall, SqlKind, SqlSelect}
import org.scalatest.{FlatSpec, Matchers}
class HiveQlParserImplTest extends FlatSpec with Matchers {
"The HiveQlParserImpl" should "p... | utzwestermann/schedoscope | schedoscope-core/src/test/scala/org/schedoscope/lineage/parser/HiveQlParserImplTest.scala | Scala | apache-2.0 | 799 |
import ~>.Id
import KList.:^:
import HList.{::, :::}
import Select.KSelect
final class TypeSelect[Data <: HList](data: Data)
{
type select[S] = Select[Data, S]
type kselect[HL <: HList] = KList[select, HL]
val extract = new (select ~> Id) {
def apply[S](in: select[S]): S =
in(data)
}
def update[In <: H... | harrah/up | TypeSelect.scala | Scala | bsd-3-clause | 1,789 |
import org.scalatest.{FlatSpec, Matchers}
/**
* Created by fabio on 14/06/15.
*/
class P03Spec extends FlatSpec with Matchers {
"The Kth element method" should "return the Kth element of a list with K elements or more" in {
val list1 = List(1, 4, 5)
P03.nth(0, list1) should be(1)
P03.nth(1, list1) sho... | fbdo/s99 | src/test/scala/P03Spec.scala | Scala | apache-2.0 | 971 |
/*
* Scala (https://www.scala-lang.org)
*
* Copyright EPFL and Lightbend, Inc.
*
* Licensed under Apache License 2.0
* (http://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
package scala.util
/* TODO: b... | scala/scala-continuations | library/src/main/scala/scala/util/continuations/package.scala | Scala | apache-2.0 | 7,380 |
package com.emajliramokade
package email
package sender
import scala.concurrent.Future
trait EmailSender {
// def sendEmail(email: Email): Future[Odgovor]
}
| element-doo/ekade | code/scala/Email-Sender/src/main/scala/com/emajliramokade/email/sender/EmailSender.scala | Scala | bsd-3-clause | 160 |
/*
* Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com>
*/
package play.it.test
import okhttp3.{ Protocol, Response }
import play.api.mvc._
import play.api.mvc.request.RequestAttrKey
import play.api.test.PlaySpecification
/**
* Tests that the [[EndpointIntegrationSpecification]] works properly.
*... | Shenker93/playframework | framework/src/play-integration-test/src/test/scala/play/it/test/EndpointIntegrationSpecificationSpec.scala | Scala | apache-2.0 | 1,547 |
/*
* Copyright 2017 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/api-gateway | test/uk/gov/hmrc/apigateway/model/CacheControlSpec.scala | Scala | apache-2.0 | 4,160 |
/**
* Copyright (c) 2016, Yuriy Stul. All rights reserved
*/
package com.stulsoft.ysps.ptypes
/* ******************************************************
* Demonstrates usage of companion in Scala.
*
* Factories.
* *****************************************************/
/**
* Companion class.
*
* Declares a s... | ysden123/ysps | src/main/scala/com/stulsoft/ysps/ptypes/Companions.scala | Scala | mit | 2,026 |
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.