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 breeze.stats.distributions
/*
Copyright 2009 David Hall, Daniel Ramage
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by a... | wavelets/breeze | src/main/scala/breeze/stats/distributions/Rand.scala | Scala | apache-2.0 | 7,348 |
/*
Copyright 2012 Twitter, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distr... | danosipov/scalding | scalding-core/src/test/scala/com/twitter/scalding/TypedPipeTest.scala | Scala | apache-2.0 | 37,670 |
/*
* DARWIN Genetic Algorithms Framework Project.
* Copyright (c) 2003, 2005, 2007, 2009, 2011, 2016, 2017. Phasmid Software
*
* Originally, developed in Java by Rubecula Software, LLC and hosted by SourceForge.
* Converted to Scala by Phasmid Software and hosted by github at https://github.com/rchillyard/Darwin
... | rchillyard/Darwin | src/main/scala/com/phasmid/darwin/eco/package.scala | Scala | gpl-3.0 | 2,224 |
package lambda_lift
import toplev.Pass
import tir._
object LambdaLift extends Pass[TProgram, TProgram]("lambda_lift") {
def run(tree: TProgram) = {
val walk = new LambdaLiftWalk(tree)
walk(tree.typeEnv, tree)
walk.newTopLevelFunctions.foreach{
case TFun(name, pats) =>
pats.foreach {
... | j-c-w/mlc | src/main/scala/lambda_lift/LambdaLift.scala | Scala | gpl-3.0 | 539 |
/*
* Copyright (c) 2014-2018 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... | Wogan/monix | monix-tail/shared/src/main/scala/monix/tail/batches/ArrayCursor.scala | Scala | apache-2.0 | 4,480 |
package com.twitter.finagle.dispatch
import com.twitter.finagle.context.Contexts
import com.twitter.finagle.transport.Transport
import com.twitter.finagle.{Service, NoStacktrace, CancelledRequestException}
import com.twitter.util._
import java.util.concurrent.atomic.AtomicReference
object GenSerialServerDispatcher {
... | latur19318/finagle | finagle-core/src/main/scala/com/twitter/finagle/dispatch/ServerDispatcher.scala | Scala | apache-2.0 | 3,587 |
package com.arcusys.valamis.certificate.model
import org.joda.time.DateTime
case class CertificateState(
userId: Long,
status: CertificateStatus.Value,
statusAcquiredDate: DateTime,
userJoinedDate: DateTime,
certificateId: Long
) | ViLPy/Valamis | valamis-certificate/src/main/scala/com/arcusys/valamis/certificate/model/CertificateState.scala | Scala | lgpl-3.0 | 241 |
package com.twitter.zipkin.conversions
import com.twitter.zipkin.common.json._
import com.twitter.zipkin.common.{AnnotationType, BinaryAnnotation}
import java.nio.ByteBuffer
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
@RunWith(classOf[JUnitRunner])
class JsonTe... | pteichman/zipkin | zipkin-web/src/test/scala/com/twitter/zipkin/conversions/JsonTest.scala | Scala | apache-2.0 | 1,882 |
package analysis
import example.AttSchema
import org.apache.spark.ml.Pipeline
import org.apache.spark.ml.feature.{SQLTransformer, VectorAssembler, VectorSlicer}
import org.apache.spark.ml.regression.{LinearRegression, LinearRegressionModel}
import org.apache.spark.sql.types.{LongType, StructField, StructType}
import o... | johnhainline/spark-conditional-linear-regression | src/main/scala/analysis/RegressionApp.scala | Scala | mit | 3,316 |
/*
* 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/main/scala/com/intel/analytics/bigdl/visualization/tensorboard/FileReader.scala | Scala | apache-2.0 | 3,532 |
/**
* Copyright 2016 ZuInnoTe (Jörn Franke) <zuinnote@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | ZuInnoTe/hadoopcryptoledger | examples/scala-spark-bitcoinblock/src/main/scala/org/zuinnote/spark/bitcoin/example/SparkScalaBitcoinBlockCounter.scala | Scala | apache-2.0 | 2,307 |
/*
* 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 | project/SoccoIndex.scala | Scala | apache-2.0 | 3,679 |
/*
Copyright 2013 Twitter, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | twitter/summingbird | summingbird-scalding/src/main/scala/com/twitter/summingbird/scalding/Service.scala | Scala | apache-2.0 | 10,708 |
/*
* Licensed to Cloudera, Inc. under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Cloudera, Inc. licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use thi... | vmanoria/bluemix-hue-filebrowser | hue-3.8.1-bluemix/apps/spark/java/livy-repl/src/main/scala/com/cloudera/hue/livy/repl/Session.scala | Scala | gpl-2.0 | 1,467 |
/*
* TryConstant.scala
* (FScape)
*
* Copyright (c) 2001-2022 Hanns Holger Rutz. All rights reserved.
*
* This software is published under the GNU Affero General Public License v3+
*
*
* For further information, please contact Hanns Holger Rutz at
* contact@sciss.de
*/
package de.sciss.fscape
package ... | Sciss/FScape-next | lucre/shared/src/main/scala/de/sciss/fscape/lucre/stream/TryConstant.scala | Scala | agpl-3.0 | 1,924 |
package com.github.sheliaklyr.ebnf
case class Rule(rhs: Expr, referredBy: Set[String]) {
lazy val references: Set[String] = rhs.references
}
case class Grammar(rules: Map[String, Expr]) {
lazy val rulesSortedByDependencies: Seq[(String, Rule)] = {
val tr = rules.transform {
case (n, e) => Rule(e, rules.... | SheliakLyr/syntax-diagrams | src/main/scala/com/github/sheliaklyr/ebnf/Grammar.scala | Scala | mit | 1,222 |
package scala.collection
package object generic {
@deprecated("Clearable was moved from collection.generic to collection.mutable", "2.13.0")
type Clearable = scala.collection.mutable.Clearable
@deprecated("Use scala.collection.BuildFrom instead", "2.13.0")
type CanBuildFrom[-From, -A, +C] = scala.collection.B... | rorygraves/perf_tester | corpus/scala-library/src/main/scala/collection/generic/package.scala | Scala | apache-2.0 | 343 |
package ml.wolfe.model
import java.io.File
import ml.wolfe.model.LinearClassifier.{Modes, Objective}
import ml.wolfe.term.TermImplicits._
import ml.wolfe.term.{DefaultIndexer, AdaGradParameters, Argmaxer, LearningObjective}
import ml.wolfe.{SimpleIndex, Vect}
import scala.util.Random
/**
* Simple wrapper around li... | wolfe-pack/wolfe | wolfe-examples/src/main/scala/ml/wolfe/model/LinearClassifier.scala | Scala | apache-2.0 | 4,353 |
package mesosphere.marathon.state
import mesosphere.marathon.MarathonSpec
import mesosphere.marathon.Protos
import mesosphere.marathon.state.PathId._
import mesosphere.mesos.protos.Implicits.slaveIDToProto
import mesosphere.mesos.protos.SlaveID
import org.scalatest.Matchers
import org.apache.mesos.{ Protos => mesos }
... | ramitsurana/marathon | src/test/scala/mesosphere/marathon/state/TaskFailureTest.scala | Scala | apache-2.0 | 3,103 |
package model
import play.api.libs.json._
/**
* Represents the Swagger definition for DefaultCrumbIssuer.
* @param additionalProperties Any additional properties this model may have.
*/
@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2022-... | cliffano/swaggy-jenkins | clients/scala-play-server/generated/app/model/DefaultCrumbIssuer.scala | Scala | mit | 1,512 |
package info.spielproject
import android.content._
import android.util.Log
import android.view.accessibility._
package object spiel {
implicit def accessibilityEvent2RichEvent(e:AccessibilityEvent) =
new RichEvent(e)
implicit def accessibilityNodeInfo2RichNode(n:AccessibilityNodeInfo) =
RichNode(n)
i... | bramd/spiel | src/main/scala/spiel.scala | Scala | apache-2.0 | 630 |
/**
* 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-controller/src/main/scala/cmwell/ctrl/ddata/DData.scala | Scala | apache-2.0 | 2,253 |
/* Copyright (C) 2008-2014 University of Massachusetts Amherst.
This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible)
http://factorie.cs.umass.edu, http://github.com/factorie
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with... | zxsted/factorie | src/main/scala/cc/factorie/app/classify/backend/DecisionTree.scala | Scala | apache-2.0 | 31,542 |
package lila
import reactivemongo.api.ReadPreference
package object study extends PackageObject {
private[study] val logger = lila.log("study")
private[study] type ChapterMap = Map[lila.study.Chapter.Id, lila.study.Chapter]
private[study] val readPref = ReadPreference.primary
}
| luanlv/lila | modules/study/src/main/package.scala | Scala | mit | 290 |
// scalac: -Xfatal-warnings
//
class A {
def f1(x: Int) = x match {
case _ if false => x // unreachable
case 5 => x
}
def f2(x: Int) = x match {
case _ if false => x // unreachable
case 5 if true => x
}
def f3(x: Int) = x match {
case _ => x
case 5 if true => x // unreacha... | martijnhoekstra/scala | test/files/neg/t6048.scala | Scala | apache-2.0 | 442 |
package be.objectify.deadbolt.scala.test.controllers.builder
import javax.inject.Inject
import be.objectify.deadbolt.scala.ActionBuilders
import be.objectify.deadbolt.scala.models.PatternType
import be.objectify.deadbolt.scala.test.controllers.AbstractPattern
import play.api.mvc.{AbstractController, ControllerCompone... | schaloner/deadbolt-2-scala | test-app/app/be/objectify/deadbolt/scala/test/controllers/builder/Pattern.scala | Scala | apache-2.0 | 3,371 |
package WorkingWithLists.P22
object P22 {
def range(i: Int, j: Int): List[Int] = (i to j).toList
def range_TailRecursion(i: Int, j: Int): List[Int] = {
def _range(k: Int, prev: List[Int]): List[Int] =
if (k > j) prev.reverse
else _range(k+1, k::prev)
_range(i, Nil)
}
}
| ihac/Ninety-Nine-Scala-Problems | src/main/scala/WorkingWithLists/P22/P22.scala | Scala | gpl-3.0 | 298 |
package es.weso.rbe.interval
import org.scalatest._
import org.scalatest.prop._
import org.scalacheck._
import org.scalacheck.Prop._
import org.scalacheck.Gen._
import es.weso.collection._
import es.weso.rbe._
import IntOrUnbounded.int2LimitInt
import es.weso.rbe.deriv._
class IntervalCheckerSpec
extends IntervalSp... | labra/rbe | src/prop/scala/es/weso/rbe/interval/IntervalSpec.scala | Scala | mit | 1,040 |
package suggestions
package observablex
import scala.concurrent.{Future, ExecutionContext}
import scala.util._
import scala.util.Success
import scala.util.Failure
import java.lang.Throwable
import rx.lang.scala.{Subject, Observable, Scheduler}
import rx.lang.scala.subjects.ReplaySubject
object ObservableEx {
/** R... | kailuowang/PrinciplesOfReactiveProgramming | suggestions/src/main/scala/suggestions/observablex/ObservableEx.scala | Scala | mit | 906 |
package space.spacelift.mq.proxy.serializers
import org.xerial.snappy.Snappy
import akka.serialization.Serializer
/**
* adds snappy compression/decompression to an existing serializer
* @param serializer original serializer.
*/
abstract class SnappySerializer(serializer: Serializer) extends Serializer {
// scal... | Spacelift/akka-mq-proxies | akka-mq-proxies/src/main/scala/space/spacelift/mq/proxy/serializers/SnappySerializer.scala | Scala | mit | 977 |
package ru.smslv.akka.dns
import akka.io.{AsyncDnsResolver, Dns, DnsProvider, SimpleDnsCache, SimpleDnsManager}
final class AsyncDnsProvider extends DnsProvider {
override def cache: Dns = new SimpleDnsCache()
override def actorClass = classOf[AsyncDnsResolver]
override def managerClass = classOf[SimpleDnsMan... | ilya-epifanov/akka-dns | src/main/scala/ru/smslv/akka/dns/AsyncDnsProvider.scala | Scala | apache-2.0 | 328 |
import stainless.annotation._
import stainless.collection._
object Opaque {
@opaque
def size[A](list: List[A]): BigInt = (list match {
case x :: xs => 1 + size(xs)
case _ => BigInt(0)
}) ensuring (_ >= BigInt(0))
}
| epfl-lara/stainless | frontends/benchmarks/verification/valid/MicroTests/Opaque.scala | Scala | apache-2.0 | 232 |
package io.mesosphere.mesosaurus
import org.apache.mesos.{ Scheduler, SchedulerDriver }
import org.apache.mesos.Protos._
import scala.collection.JavaConversions._
/**
* Mesos scheduler for the Mesosaurus framework.
*
* Delegates to a task source to generate (task info) descriptions of tasks to run.
*/
class M... | mesosphere/mesosaurus | src/main/scala/io/mesosphere/mesosaurus/MesosaurusScheduler.scala | Scala | apache-2.0 | 2,516 |
package com.socialthingy.plusf.tape
import java.time.Duration
import org.scalatest.prop.TableDrivenPropertyChecks
import org.scalatest.{FlatSpec, Matchers}
import scala.collection.JavaConverters._
class PureDataBlockSpec extends FlatSpec with TapeMatchers with Matchers with TableDrivenPropertyChecks {
val initia... | alangibson27/plus-f | plus-f/src/test/scala/com/socialthingy/plusf/tape/PureDataBlockSpec.scala | Scala | mit | 9,459 |
import java.lang._
<ref>Math.abs(34) | ilinum/intellij-scala | testdata/resolve/nonlocal/MathImported.scala | Scala | apache-2.0 | 37 |
/*
Author: uberset
Date: 2015-12-20
Licence: GPL v2
*/
package uberset.l1_compiler
import java.io.{PrintWriter, StringReader, BufferedReader}
object TestCompiler {
def main(args: Array[String]): Unit = {
println(this.getClass.getSimpleName)
val results = Seq(
test("int1"),
... | uberset/L1-compiler | src/test/scala/uberset/l1_compiler/TestCompiler.scala | Scala | gpl-2.0 | 1,682 |
package polystyrene.core
import scala.collection.mutable.{HashMap, LinkedHashSet}
import scala.collection.Set
import peersim.core.Node
object DataMapping{
var map = HashMap[DataPoint, LinkedHashSet[Node]]()
// var map = HashMap[DataPoint, Set[Node]]()
var homogeneity : Double = 0.0
var redundancy : Int = 0
va... | HKervadec/Polystyrene | src/polystyrene/core/DataMapping.scala | Scala | gpl-2.0 | 663 |
package iot.pood.base.http.base.internal
import akka.actor.ActorSystem
import akka.http.javadsl.server.{Rejection, Rejections}
import akka.http.scaladsl.model.{HttpResponse, StatusCodes}
import akka.http.scaladsl.server.Directives.{complete, _}
import akka.http.scaladsl.server._
import iot.pood.base.config.HttpConfig.... | rafajpet/iot-pood | iot-pood-base/src/main/scala/iot/pood/base/http/base/internal/HttpServiceCollector.scala | Scala | mit | 3,529 |
package controllers
import play.api.libs.json.Json
import play.api.mvc._
import services.EventRecorderService
import scala.concurrent.ExecutionContext.Implicits.global
/**
* EventRecorderController.
* @author xelita
*/
class EventRecorderController extends Controller {
/**
* Check the application status
... | xelita/events-recorder | impl/play-framework/app/controllers/EventRecorderController.scala | Scala | mit | 485 |
/***********************************************************************
* 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-spark/geomesa-spark-jts/src/test/scala/org/locationtech/geomesa/spark/jts/docs/JTSDocsTest.scala | Scala | apache-2.0 | 2,935 |
/**
* Created by peter_v on 11/03/15.
*/
package base
import java.util.UUID
import common.AMD_Subject
case class Context(context: Option[AMD_Subject]) {
override def toString: String =
context match {
case None => ""
case Some(uuid: AMD_Subject) => uuid.toString
}
}
object Context {
def... | petervandenabeele/AllMyData | src/main/scala/base/Context.scala | Scala | mit | 476 |
package enumeratum
import org.scalatest.funspec.AnyFunSpec
import org.scalatest.matchers.should.Matchers
import play.api.data.Form
import org.scalatest.OptionValues._
/** Created by Lloyd on 2/3/15.
*/
class FormSpec extends AnyFunSpec with Matchers {
import Forms._
describe(".enum") {
val subject = Form... | lloydmeta/enumeratum | enumeratum-play/src/test/scala/enumeratum/FormSpec.scala | Scala | mit | 4,874 |
package fr.hmil.roshttp.response
import java.nio.ByteBuffer
import fr.hmil.roshttp.BackendConfig
import fr.hmil.roshttp.util.HeaderMap
import monix.execution.Scheduler
import monix.reactive.Observable
import scala.concurrent.Future
class StreamHttpResponse(
val statusCode: Int,
val headers: HeaderMap[Strin... | hmil/RosHTTP | shared/src/main/scala/fr/hmil/roshttp/response/StreamHttpResponse.scala | Scala | mit | 750 |
package com.sksamuel.elastic4s.delete
import com.sksamuel.elastic4s.searches.queries.Query
import com.sksamuel.elastic4s.{Index, IndexAndType, IndexesAndTypes}
import scala.language.implicitConversions
trait DeleteApi {
// the non type variants of these will be preferered over delete(id) and deleteIn(indextype) i... | Tecsisa/elastic4s | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/delete/DeleteApi.scala | Scala | apache-2.0 | 1,071 |
package com.arcusys.learn.liferay.update.version250
import com.arcusys.learn.liferay.LiferayClasses.LUpgradeProcess
import com.arcusys.learn.liferay.update.SQLRunner
class DBUpdater2406 extends LUpgradeProcess with SQLRunner
{
override def getThreshold = 2406
override def doUpgrade(): Unit = {
//Add host col... | igor-borisov/valamis | learn-portlet/src/main/scala/com/arcusys/learn/liferay/update/version250/DBUpdater2406.scala | Scala | gpl-3.0 | 455 |
/***********************************************************************
* Copyright (c) 2013-2017 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... | ronq/geomesa | geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/audit/AccumuloAuditService.scala | Scala | apache-2.0 | 2,410 |
package filodb.query.exec.rangefn
import scala.collection.mutable.ArrayBuffer
import scala.util.Random
import com.typesafe.config.ConfigFactory
import org.scalatest.{BeforeAndAfter, BeforeAndAfterAll}
import filodb.core.{MetricsTestData, QueryTimeoutException, TestData, MachineMetricsData => MMD}
import filodb.core.... | tuplejump/FiloDB | query/src/test/scala/filodb/query/exec/rangefn/AggrOverTimeFunctionsSpec.scala | Scala | apache-2.0 | 33,254 |
package ch.descabato.it
import java.io.File
import java.util.{List => JList}
import org.scalatest.Matchers._
import org.scalatest._
import org.scalatest.prop.GeneratorDrivenPropertyChecks
import scala.util.Random
class IntegrationTest extends IntegrationTestBase with BeforeAndAfter with BeforeAndAfterAll with Gener... | Stivo/DeScaBaTo | integrationtest/src/test/scala/ch/descabato/it/IntegrationTest.scala | Scala | gpl-3.0 | 4,987 |
/*
* 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 viper.silver.ast.utility
import scala.reflect.ClassTag
import viper.silver.ast._
import viper.silver.... | sccblom/vercors | viper/silver/src/main/scala/viper/silver/ast/utility/Expressions.scala | Scala | mpl-2.0 | 9,681 |
/*
* 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 u... | andrewor14/iolap | sql/core/src/test/scala/org/apache/spark/sql/sources/TableScanSuite.scala | Scala | apache-2.0 | 11,906 |
package model
import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport
import spray.json.DefaultJsonProtocol
object StockRequest extends DefaultJsonProtocol with SprayJsonSupport {
case class DailyStockRequest(function: String, symbol: String)
implicit val dailyStockRequestFormat = jsonFormat2(DailyStockR... | jiancoding/stock-data | app/model/StockRequest.scala | Scala | apache-2.0 | 330 |
/*
* 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 u... | hengyicai/OnlineAggregationUCAS | sql/core/src/test/scala/org/apache/spark/sql/sources/ResolvedDataSourceSuite.scala | Scala | apache-2.0 | 1,293 |
package im.actor.server.api.rpc.service.auth
import java.time.{ LocalDateTime, ZoneOffset }
import scala.concurrent.Future
import scala.concurrent.duration._
import scala.concurrent.forkjoin.ThreadLocalRandom
import scalaz.{ -\\/, \\/, \\/- }
import akka.actor.ActorSystem
import akka.pattern.ask
import akka.util.Tim... | v2tmobile/actor-platform | actor-server/actor-rpc-api/src/main/scala/im/actor/server/api/rpc/service/auth/AuthHelpers.scala | Scala | mit | 9,629 |
/**
* ====
* This file is part of SensApp [ http://sensapp.modelbased.net ]
*
* Copyright (C) 2011- SINTEF ICT
* Contact: SINTEF ICT <nicolas.ferry@sintef.no>
*
* Module: net.modelbased.sensapp
*
* SensApp is free software: you can redistribute it and/or modify
* it under the terms of... | SINTEF-9012/sensapp | net.modelbased.sensapp.backyard.gatling.ws/src/main/scala/net/modelbased/sensapp/backyard/gatling/ws/Helpers.scala | Scala | lgpl-3.0 | 2,769 |
package org.jetbrains.plugins.scala
package worksheet.actions
import javax.swing.{Icon, JPanel}
import com.intellij.openapi.actionSystem._
import com.intellij.openapi.actionSystem.impl.ActionButton
import com.intellij.openapi.application.{ApplicationManager, ModalityState}
import com.intellij.openapi.keymap.{KeymapMa... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/worksheet/actions/TopComponentAction.scala | Scala | apache-2.0 | 1,824 |
package com.yiguang.mqtt
import akka.actor.ActorRef
import com.twitter.finagle.Service
import com.twitter.finagle.dispatch.GenSerialServerDispatcher
import com.twitter.finagle.transport.Transport
import com.twitter.util.{Future, Promise, Throw}
import com.yiguang.mqtt.MqttServer.ServerManager.CreateSession
import com.... | liyiguang/finagle-mqtt | src/main/scala/com/yiguang/mqtt/MqttServerDispatcher.scala | Scala | apache-2.0 | 2,903 |
// source: https://contributors.scala-lang.org/t/contest-scala-lang-org-frontpage-code-snippet/1141/22?u=masseguillaume
trait Feature
case class ObjectOriented(description: String) extends Feature
case class Functional(description: String) extends Feature
case class StaticallyTyped(description: String) extends Featu... | OlegYch/scastie | demo/color-full.scala | Scala | apache-2.0 | 1,163 |
/*
* 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 ... | michalsenkyr/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Min.scala | Scala | apache-2.0 | 2,128 |
package com.lunatic.mlx.kddcup99.ml
import org.apache.spark.ml.Transformer
import org.apache.spark.ml.feature.VectorAssembler
import org.apache.spark.ml.param.{Param, ParamMap, ParamPair, Params}
import scala.util.{Success, Try}
import scala.xml.Elem
/**
*
*/
object TestXML extends App {
implicit class XPar... | tupol/sparx-mllib | src/main/scala/com/lunatic/mlx/kddcup99/ml/TestXML.scala | Scala | apache-2.0 | 3,651 |
package com.example.http4s.blaze.demo.server.endpoints
import cats.effect.Sync
import org.http4s.{ApiVersion => _, _}
import org.http4s.dsl.Http4sDsl
class HexNameHttpEndpoint[F[_]: Sync] extends Http4sDsl[F] {
object NameQueryParamMatcher extends QueryParamDecoderMatcher[String]("name")
val service: HttpRoutes... | ChristopherDavenport/http4s | examples/blaze/src/main/scala/com/example/http4s/blaze/demo/server/endpoints/HexNameHttpEndpoint.scala | Scala | apache-2.0 | 489 |
package util
object EclipseUtils {
def workspaceRunnableIn/*ref*/(s: String, t: Any = null)(f: Any => Unit): Unit = ()
} | Kwestor/scala-ide | org.scala-ide.sdt.core.tests/test-workspace/find-references/bug1001146_1/src/util/EclipseUtils.scala | Scala | bsd-3-clause | 123 |
package eu.ace_design.island.map
import eu.ace_design.island.map.resources.{Biome, Soils, Conditions}
import eu.ace_design.island.stdlib.Biomes
/**
* A property bound a value to an immutable key. The trait is sealed, and cannot be implemented outside of this file.
* @tparam T the type of value
*/
sealed trait Pro... | ace-design/island | engine/src/main/scala/eu/ace_design/island/map/Properties.scala | Scala | lgpl-3.0 | 2,585 |
/*
* 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 ... | style95/openwhisk | common/scala/src/main/scala/org/apache/openwhisk/common/Logging.scala | Scala | apache-2.0 | 26,449 |
/*
* Copyright 2013 深圳市葡萄藤网络科技有限公司 (Shenzhen Putaoteng Network Technology Co., Ltd.)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.... | Atry/memcontinuationed | src/test/scala/com/dongxiguo/memcontinuationed/GetTest.scala | Scala | apache-2.0 | 3,134 |
package com.github.mpilquist.locals
import org.scalatest.{ WordSpec, Matchers }
class LocalImplicitsTest extends WordSpec with Matchers {
"the local method" should {
"evaluate the second parameter list with each value in the first parameter list declared implicitly" in {
val result = imply(42) { implicit... | mpilquist/local-implicits | src/test/scala/com/github/mpilquist/locals/LocalImplicitsTest.scala | Scala | bsd-3-clause | 1,350 |
package scalaz.stream.mongodb.update
import com.mongodb.DBObject
import scalaz.stream.mongodb.query.{QueryPair, BasicQuery}
trait UpdateSyntax {
/** implicit for findAndModify */
implicit class UpdatePairBuilderSyntax(val self: String) extends UpdatePairOps
/** santax creating update action from pairs */
... | Spinoco/scalaz-stream-mongodb | core/src/main/scala/scalaz/stream/mongodb/update/UpdateSyntax.scala | Scala | mit | 996 |
/*
* 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... | monix/monix | monix-eval/shared/src/test/scala/monix/eval/TaskExecutionModelSuite.scala | Scala | apache-2.0 | 3,246 |
package org.bitcoins.core.util
import org.bitcoins.core.crypto.ECPrivateKeyUtil
import org.bitcoins.core.protocol.blockchain._
import org.bitcoins.crypto.CryptoUtil
import scodec.bits.ByteVector
import scala.annotation.tailrec
import scala.util.{Failure, Success, Try}
/** Created by chris on 5/16/16.
* source of v... | bitcoin-s/bitcoin-s | core/src/main/scala/org/bitcoins/core/util/Base58.scala | Scala | mit | 6,185 |
package com.karasiq.shadowcloud.serialization
object SerializationModules extends AkkaSerializationModules
sealed trait AkkaSerializationModules {
import akka.actor.ActorSystem
import akka.serialization.{SerializationExtension ⇒ AkkaSerializationExtension, Serializer ⇒ AkkaSerializer}
import com.karasiq.shadow... | Karasiq/shadowcloud | utils/.jvm/src/main/scala/com/karasiq/shadowcloud/serialization/SerializationModules.scala | Scala | apache-2.0 | 676 |
package com.ergodicity.marketdb
import com.ergodicity.marketdb.core.{MarketDb, MarketService}
import com.ergodicity.marketdb.model.{OrderPayload, TradePayload, TradeProtocol}
import com.twitter.conversions.time._
import com.twitter.finagle.builder.ClientBuilder
import com.twitter.finagle.kestrel.protocol.Kestrel
impor... | ezhulenev/marketdb | marketdb-app/src/main/scala/com/ergodicity/marketdb/MarketLoader.scala | Scala | mit | 7,174 |
package com.zinnia.ml.spark.ex2_logistic_regression
import org.apache.spark.SparkContext
import com.zinnia.ml.spark.util.RegressionUtil
import org.apache.spark.mllib.regression.LabeledPoint
import org.apache.spark.SparkContext.rddToPairRDDFunctions
import org.apache.spark.rdd.RDD
/**
* Created with IntelliJ IDEA.
*... | DonHilborn/ML-With-Spark | src/main/java/com/dhilborn/ml/spark/ex2_logistic_regression/Examples.scala | Scala | apache-2.0 | 4,059 |
/*
* 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 ... | michalsenkyr/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/ui/SparkPlanGraph.scala | Scala | apache-2.0 | 7,411 |
package de.unihamburg.vsis.sddf.reading
import scala.reflect.ClassTag
import org.apache.spark.rdd.RDD
import de.unihamburg.vsis.sddf.pipe.PipeElement
import de.unihamburg.vsis.sddf.pipe.context.AbstractPipeContext
import de.unihamburg.vsis.sddf.visualisation.model.BasicAnalysable
/**
* TODO improve performance by ... | numbnut/sddf | src/main/scala/de/unihamburg/vsis/sddf/reading/PipeReaderOmitHead.scala | Scala | gpl-3.0 | 928 |
/*
* Copyright 2014 Christos KK Loverdos
*
* 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... | loverdos/topsort | src/main/scala/com/ckkloverdos/topsort/event/TopSortListeners.scala | Scala | apache-2.0 | 2,042 |
/*
* 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 ... | esi-mineset/spark | sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/FileStreamSinkLogSuite.scala | Scala | apache-2.0 | 11,536 |
/*
* Copyright 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 applicable l... | lift/lift | framework/lift-persistence/lift-mongodb/src/main/scala/net/liftweb/mongodb/JObjectParser.scala | Scala | apache-2.0 | 4,636 |
class A { def m() { var x = (; } }
object Main { def main(args: Array[String]) { } }
| tobast/compil-petitscala | tests/syntax/bad/testfile-expr1-1.scala | Scala | gpl-3.0 | 85 |
package tutorial
import geotrellis.raster._
import geotrellis.raster.io.geotiff._
import geotrellis.raster.render._
import com.typesafe.config.ConfigFactory
/**
* Created by FroehlingGallier on 10/13/16.
*/
object CreateNDWIPng {
val maskedPath = "data/r-g-nir.tif"
val ndwiPath = "data/ndwi.png"
def main... | geotrellis/geotrellis-landsat-tutorial | src/main/scala/tutorial/CreateNDWIPng.scala | Scala | apache-2.0 | 1,347 |
package scalan.graphs
import scalan.collections.CollectionsDsl
import scalan.Owner
trait Edges extends CollectionsDsl { self: GraphsDsl =>
/**
* Created by afilippov on 2/16/15.
*/
trait Edge[V, E] extends Def[Edge[V,E]]{
implicit def eV: Elem[V]
implicit def eE: Elem[E]
@Owner
implicit d... | PCMNN/scalan-ce | graphs/src/main/scala/scalan/graphs/Edges.scala | Scala | apache-2.0 | 2,361 |
/*
* 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 n... | KevinLiLu/kafka | core/src/main/scala/kafka/log/TransactionIndex.scala | Scala | apache-2.0 | 9,470 |
package com.github.sbt.aboutplugins
import sbt._
import collection.Seq
import sbt.Load.BuildStructure
object AboutPluginsPlugin extends Plugin {
override lazy val settings = Seq(
Keys.commands += aboutPluginsCommand
)
private lazy val aboutPluginsCommand = Command.command("about-plugins")(doCommand)
def... | jozic/sbt-about-plugins | src/main/scala/com/github/sbt/aboutplugins/AboutPluginsPlugin.scala | Scala | bsd-3-clause | 2,188 |
/*
* Copyright (c) 2013-2014 Telefónica Investigación y Desarrollo S.A.U.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unles... | telefonicaid/fiware-cosmos-platform | cosmos-admin/src/test/scala/es/tid/cosmos/admin/profile/ListProfilesCommandTest.scala | Scala | apache-2.0 | 1,461 |
package sbt.complete
import org.specs2.mutable.Specification
import org.specs2.specification.Scope
import sbt.IO.withTemporaryDirectory
import java.io.File
import sbt.IO._
class FileExamplesTest extends Specification {
"listing all files in an absolute base directory" should {
"produce the entire base director... | pdalpra/sbt | util/complete/src/test/scala/sbt/complete/FileExamplesTest.scala | Scala | bsd-3-clause | 3,341 |
/*
* 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/fset-faststream | test/model/exchange/passmarksettings/Phase3PassMarkSettingsExamples.scala | Scala | apache-2.0 | 1,290 |
/*
* Copyright 2001-2013 Artima, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | scalatest/scalatest | jvm/scalatest-test/src/test/scala/org/scalatest/AlerterSpec.scala | Scala | apache-2.0 | 1,856 |
package ru.org.codingteam.cttalk.services
import java.util.concurrent.ConcurrentHashMap
import javax.inject.Inject
import com.google.inject.{ImplementedBy, Singleton}
import play.api.libs.concurrent.Execution.Implicits._
import ru.org.codingteam.cttalk.model.{Message, Token}
import ru.org.codingteam.cttalk.services.m... | hagane/cttalk | server/app/ru/org/codingteam/cttalk/services/MessagesService.scala | Scala | mit | 1,783 |
package com.twitter.finagle.httpx.service
import com.twitter.finagle.httpx.{Request, Status}
import com.twitter.finagle.httpx.path._
import com.twitter.finagle.httpx.path.{Path => FPath}
import com.twitter.util.Await
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
... | yancl/finagle-6.22.0 | finagle-httpx/src/test/scala/com/twitter/finagle/httpx/service/RoutingServiceTest.scala | Scala | apache-2.0 | 995 |
package com.blinkbox.books.elasticsearch.client.api
import com.blinkbox.books.elasticsearch.client._
import com.sksamuel.elastic4s.{CreateIndexDefinition, DeleteIndexDefinition}
import spray.client.pipelining._
import spray.http.{HttpEntity, HttpRequest, MediaRanges}
import spray.httpx.PipelineException
import spray.h... | blinkboxbooks/elastic-http | src/main/scala/com/blinkbox/books/elasticsearch/client/api/index.scala | Scala | mit | 2,136 |
package filters
import javax.inject._
import play.api.mvc._
import scala.concurrent.{ExecutionContext, Future}
import models._
import akka.stream.Materializer
@Singleton
class LoginFilter @Inject()(
loginSessionRepo: LoginSessionRepo,
implicit val ec: ExecutionContext,
implicit val mat: Materializer
) extends F... | ruimo/store2 | app/filters/LoginFilter.scala | Scala | apache-2.0 | 749 |
package mesosphere.marathon
package core.launchqueue
import org.rogach.scallop.ScallopConf
import scala.concurrent.duration._
trait LaunchQueueConfig extends ScallopConf {
lazy val minimumViableTaskExecutionDurationMillis = opt[Long](
"minimum_viable_task_execution_duration",
descr = "Delay (in ms) after ... | natemurthy/marathon | src/main/scala/mesosphere/marathon/core/launchqueue/LaunchQueueConfig.scala | Scala | apache-2.0 | 984 |
/*
* 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 ... | gyfora/flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/calcite/RelTimeIndicatorConverter.scala | Scala | apache-2.0 | 20,913 |
/**
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed ... | richhaase/kafka | core/src/test/scala/integration/kafka/api/CustomQuotaCallbackTest.scala | Scala | apache-2.0 | 21,043 |
/*
* Copyright 2015 Magnus Madsen.
*
* 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 ... | magnus-madsen/umonitor | src/dk/umonitor/runtime/connector/ImapConnector.scala | Scala | apache-2.0 | 1,144 |
trait Foo { type T }
trait Bar extends Foo { val x : Foo { type T <: Bar.this.T } = this : this.type }
| yusuke2255/dotty | tests/pending/pos/t762.scala | Scala | bsd-3-clause | 103 |
package slinky.web
import slinky.core.SyntheticEvent
import scala.scalajs.js
import org.scalajs.dom.{ClipboardEvent, DataTransfer}
// https://reactjs.org/docs/events.html#clipboard-events
@js.native
trait SyntheticClipboardEvent[+TargetType] extends SyntheticEvent[TargetType, ClipboardEvent] {
val clipboardData: D... | shadaj/slinky | web/src/main/scala/slinky/web/SyntheticClipboardEvent.scala | Scala | mit | 346 |
/*
* This software is licensed under the GNU Affero General Public License, quoted below.
*
* This file is a part of PowerAPI.
*
* Copyright (C) 2011-2016 Inria, University of Lille 1.
*
* PowerAPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public Lice... | Spirals-Team/powerapi | powerapi-cli/src/main/scala/org/powerapi/app/PowerAPI.scala | Scala | agpl-3.0 | 13,420 |
package org.apache.datacommons.protectr.rdds
import java.math.BigInteger
import com.n1analytics.paillier.{PaillierPrivateKey, EncryptedNumber}
import org.apache.datacommons.protectr.encryptors.EncryptionKeyPair
import org.apache.datacommons.protectr.types.FileType
import org.apache.spark.annotation.DeveloperApi
impor... | data-commons/protectr | src/main/scala/org/apache/datacommons/protectr/rdds/HomomorphicallyEncryptedRDD.scala | Scala | apache-2.0 | 2,129 |
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distribute... | wvlet/log | wvlet-log/jvm/src/main/scala/wvlet/log/io/Resource.scala | Scala | apache-2.0 | 11,725 |
/*
* 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 ... | minixalpha/spark | external/kafka-0-8/src/main/scala/org/apache/spark/streaming/kafka/KafkaRDD.scala | Scala | apache-2.0 | 10,417 |
package Tutorial
import Chisel._
import Node._
import Literal._
import scala.collection.mutable.HashMap
import scala.collection.mutable.ArrayBuffer
class tag_t extends Bundle {
val tagValue = UFix(width = 24)
val dirty = Bool()
val valid = Bool()
val tainted = Bool()
val lockId = UFix(width = 16)
}
class memReqCach... | seyedmaysamlavasani/GorillaPP | apps/pageRank/build/cacheHeader.scala | Scala | bsd-3-clause | 579 |
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.