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 2017-2020 47 Degrees Open Source <https://www.47deg.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 ... | frees-io/freestyle-rpc | modules/testing/src/main/scala/higherkindness/mu/rpc/testing/interceptors.scala | Scala | apache-2.0 | 989 |
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
/** @author John Miller
* @version 1.2
* @date Mon Feb 2 16:43:07 EST 2015
* @see LICENSE (MIT style license file).
*/
// FIX - currently only works for Inverse
package scalation.analytics.par
import math.pow
import sca... | mvnural/scalation | src/main/scala/scalation/analytics/par/RidgeRegression.scala | Scala | mit | 16,101 |
// See LICENSE.txt for license details.
package examples
import chisel3._
import chisel3.util.Enum
class Parity extends Module {
val io = IO(new Bundle {
val in = Input(Bool())
val out = Output(Bool())
})
val s_even :: s_odd :: Nil = Enum(2)
val state = RegInit(s_even)
when (io.in) {
when (sta... | timtian090/Playground | chiselTutorial/src/main/scala/examples/Parity.scala | Scala | mit | 439 |
/*
* 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/example/loadmodel/ModelValidator.scala | Scala | apache-2.0 | 4,810 |
/*
* 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 ... | sclearn/sclearn | sc/src/main/scala/io/github/sclearn/dataset/spark/sql/types/UserDefinedType.scala | Scala | apache-2.0 | 4,251 |
package model
import collection.mutable.{HashMap, MultiMap,Set}
class RouteMap {
val map: MultiMap[Int,String]=new HashMap[Int, Set[String]] with MultiMap[Int, String]
def routes(port: Int): Set[String] = {
map.get(port).getOrElse(Set[String]())
}
} | brendanobra/haproxy-rest-config | app/model/RouteMap.scala | Scala | mit | 269 |
/***********************************************************************
* Copyright (c) 2013-2020 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... | aheyne/geomesa | geomesa-tools/src/main/scala/org/locationtech/geomesa/tools/status/GetSftConfigCommand.scala | Scala | apache-2.0 | 3,111 |
/*
* Copyright 2014 porter <https://github.com/eikek/porter>
*
* 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... | eikek/porter | api/src/main/scala/porter/model/Ident.scala | Scala | apache-2.0 | 2,715 |
package breeze.stats.distributions
import breeze.numerics.{exp, log}
/**
* http://en.wikipedia.org/wiki/Laplace_distribution
*
* @author dlwh
**/
case class Laplace(location: Double, scale: Double)(implicit rand: RandBasis = Rand) extends ContinuousDistr[Double] with Moments[Double, Double] with HasCdf {
def me... | dlwh/breeze | math/src/main/scala/breeze/stats/distributions/Laplace.scala | Scala | apache-2.0 | 1,184 |
package org.elasticmq
import org.elasticmq.actor.queue.InternalMessage
import org.elasticmq.util.NowProvider
import org.joda.time.DateTime
import org.scalatest.funsuite.AnyFunSuite
import org.scalatest.matchers.should.Matchers
import scala.collection.mutable
class FifoDeduplicationIdsHistoryTest extends AnyFunSuite ... | adamw/elasticmq | core/src/test/scala/org/elasticmq/FifoDeduplicationIdsHistoryTest.scala | Scala | apache-2.0 | 5,440 |
package chana.jpql
import akka.actor.ActorSystem
import akka.testkit.ImplicitSender
import akka.testkit.TestKit
import chana.jpql.JPQLReducer.AskReducedResult
import chana.jpql.nodes.JPQLParser
import chana.jpql.nodes.Statement
import chana.jpql.rats.JPQLGrammar
import chana.schema.SchemaBoard
import com.typesafe.conf... | matthewtt/chana | src/test/scala/chana/jpql/JPQLReducerEvaluatorSpec.scala | Scala | apache-2.0 | 9,605 |
package org.jetbrains.plugins.scala.actions
import java.lang.String
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.ScTypeDefinition
import com.intellij.openapi.project.Project
import com.intellij.openapi.project.DumbAware
import com.intellij.ide.actions.{CreateFileFromTemplateDialog, CreateTemplateIn... | consulo/consulo-scala | src/org/jetbrains/plugins/scala/actions/NewScalaTypeDefinitionAction.scala | Scala | apache-2.0 | 6,505 |
package test
import com.acerete.input.Input
import com.acerete.service.Customer
import com.acerete.service.ColorType
import com.acerete.service.Color
import com.acerete.output.Output
import com.acerete.input.InputReader
import com.acerete.output.StdOutputWriter
import com.acerete.output.OutputWriter
import com.acerete... | adriwankenobi/paint-shop-scala | src/test/SetupTest.scala | Scala | gpl-2.0 | 3,138 |
import scala.collection._
trait GenSeqView0[+A, +Coll]
trait GenSeqViewLike[+A,
+Coll,
+This <: GenSeqView0[A, Coll] with GenSeqViewLike[A, Coll, Nothing]]
extends GenSeq[A] {
self =>
trait Transformed[+B] {
def length: Int = 0
def apply(idx: Int): B = error("")
... | folone/dotty | tests/pending/pos/t4365/b_1.scala | Scala | bsd-3-clause | 529 |
package org.vlinderlang.vlinderc.parse
import scala.util.parsing.combinator.{Parsers, RegexParsers}
sealed abstract class Token
private[parse] case object EOF extends Token
case class Identifier(name: String) extends Token
case object False extends Token
case object Import extends Token
case object Struct extends ... | vlinder-lang/vlinderc | src/main/scala/org/vlinderlang/vlinderc/parse/lex.scala | Scala | bsd-3-clause | 1,948 |
package uk.gov.dvla.vehicles.presentation.common.controllers
import org.mockito.Mockito.when
import play.api.test.FakeRequest
import play.api.test.Helpers.{contentAsString, defaultAwaitTimeout}
import play.mvc.Http.Status.{OK, INTERNAL_SERVER_ERROR}
import uk.gov.dvla.vehicles.presentation.common.UnitSpec
import uk.go... | dvla/vehicles-presentation-common | test/uk/gov/dvla/vehicles/presentation/common/controllers/HealthCheckSpec.scala | Scala | mit | 1,389 |
/*
* 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 ... | brad-kaiser/spark | sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala | Scala | apache-2.0 | 29,228 |
package extruder.metrics
import extruder.core._
import extruder.metrics.data.MetricType
trait MetricSettings extends Settings {
val mapEncoderSettings: Settings = new Settings {
override val includeClassNameInPath: Boolean = false
override def pathToString(path: List[String]): String = path.mkString(".")
... | janstenpickle/extruder | metrics/core/src/main/scala/extruder/metrics/MetricSettings.scala | Scala | mit | 487 |
package fpinscala.errorhandling
import scala.{Option => _, Either => _, _} // hide std library `Option` and `Either`, since we are writing our own in this chapter
sealed trait Option[+A] {
def map[B](f: A => B): Option[B] = {
this match {
case None => None
case Some(a) => Some(f(a))
}
}
de... | fpinscala-muc/fpinscala-LithiumTD | exercises/src/main/scala/fpinscala/errorhandling/Option.scala | Scala | mit | 2,396 |
package assets.mustache.overseas
import uk.gov.gds.ier.transaction.overseas.lastUkAddress.LastUkAddressSelectMustache
import uk.gov.gds.ier.test._
import uk.gov.gds.ier.service.{AddressService, WithAddressService}
class LastUkAddressSelectTemplateTest
extends TemplateTestSuite
with WithMockOverseasControllers
w... | michaeldfallen/ier-frontend | test/assets/mustache/overseas/LastUkAddressSelectTemplateTest.scala | Scala | mit | 5,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 ... | bravo-zhang/spark | core/src/main/scala/org/apache/spark/ui/scope/RDDOperationGraph.scala | Scala | apache-2.0 | 10,192 |
/*
* Copyright (C) 2016-2017 Lightbend Inc. <https://www.lightbend.com>
*/
package com.lightbend.lagom.internal.javadsl.broker.kafka
import java.net.URI
import java.util.concurrent.CompletionStage
import java.util.concurrent.atomic.AtomicInteger
import akka.Done
import akka.actor.{ ActorSystem, SupervisorStrategy }... | edouardKaiser/lagom | service/javadsl/kafka/client/src/main/scala/com/lightbend/lagom/internal/javadsl/broker/kafka/JavadslKafkaSubscriber.scala | Scala | apache-2.0 | 6,244 |
package fgc.alias
import fgc.model.Transform
import fgc.model.VideoData
import fgc.levenshtein.EditDistance.editDist
import scala.collection.mutable
class AliasTracker(typoFixer: String => String) {
private case class AliasStat(key: String){
var displayName: String = "(n/a)"
var matches: Map[Str... | mpaulweeks/fgc-video | scala/alias.scala | Scala | mit | 2,702 |
/**
* 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... | flange/drift-dev | kafka/00-kafka_2.11-0.10.1.0/libs/tmp/kafka/consumer/TopicCount.scala | Scala | apache-2.0 | 5,980 |
/*
* 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 ... | likelyzhao/mxnet | scala-package/core/src/main/scala/ml/dmlc/mxnet/module/BaseModule.scala | Scala | apache-2.0 | 26,054 |
/**
* This code is generated using [[http://www.scala-sbt.org/contraband/ sbt-contraband]].
*/
// DO NOT EDIT MANUALLY
package sbt
final class CommandSource private (
val channelName: String) extends Serializable {
override def equals(o: Any): Boolean = o match {
case x: CommandSource => (this.chann... | Duhemm/sbt | main-command/src/main/contraband-scala/sbt/CommandSource.scala | Scala | bsd-3-clause | 879 |
package diameter.Coder
import diameter.ValueContainers.OctetString
/**
* Created by edzmbuh on 19/12/2016.
*/
trait AvpValueOctetString extends AvpValue{
def value:OctetString
def dataRaw = value.dataRaw
override def toString() = value.toString()
}
| dbuhryk/DiameterCoder | Diameter/src/main/scala/diameter/Coder/AvpValueOctetString.scala | Scala | mit | 261 |
/***********************************************************************
* Copyright (c) 2013-2016 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and is ... | tkunicki/geomesa | geomesa-kafka/geomesa-kafka-datastore/geomesa-kafka-09-datastore/src/test/scala/org/locationtech/geomesa/kafka09/ReplayConfigTest.scala | Scala | apache-2.0 | 3,918 |
package latis.ops
import scala.Option.option2Iterable
import scala.reflect.runtime.currentMirror
import latis.dm.Dataset
import latis.dm.Function
import latis.dm.Sample
import latis.dm.Scalar
import latis.dm.Tuple
import latis.dm.Variable
import latis.util.LatisProperties
import latis.util.iterator.MappingIterator
im... | dlindhol/LaTiS | src/main/scala/latis/ops/Operation2.scala | Scala | epl-1.0 | 3,390 |
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
*/
// DO NOT EDIT MANUALLY
package sbt.internal.bsp.codec
import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError }
trait InitializeBuildParamsFormats { self: sbt.internal.bsp.codec.BuildClientCapabilit... | sbt/sbt | protocol/src/main/contraband-scala/sbt/internal/bsp/codec/InitializeBuildParamsFormats.scala | Scala | apache-2.0 | 1,888 |
// class definitions
trait LorentzVector extends Serializable {
// abstract members; must be defined by subclasses
def px: Double
def py: Double
def pz: Double
def E: Double
// methods common to all LorentzVectors
def pt = Math.sqrt(px*px + py*py)
def p = Math.sqrt(px*px + py*py + pz*pz)
def mass = ... | histogrammar/histogrammar-docs | data/scala-cmsdata.scala | Scala | apache-2.0 | 4,338 |
package com.landoop.streamreactor.hive.it
import org.scalatest.concurrent.Eventually
import org.scalatest.matchers.should.Matchers
import org.scalatest.time.{Millis, Span}
import org.scalatest.wordspec.AnyWordSpec
import java.time.Duration
import java.util.concurrent.TimeUnit
import scala.io.Source
class HiveParquet... | datamountaineer/stream-reactor | kafka-connect-hive/it/src/test/scala/com/landoop/streamreactor/hive/it/HiveParquetTest.scala | Scala | apache-2.0 | 1,449 |
package test.roundeights.vfunk.filter
import org.specs2.mutable._
import scala.collection.immutable.HashSet
import com.roundeights.vfunk.filter._
class EncodingTests extends Specification {
"A Hex filter" should {
val filter = new Hex
"Leave a string with only hex characters unchanged" in {
... | Nycto/vFunk | src/test/scala/vfunk/filter/EncodingTests.scala | Scala | mit | 647 |
package com.pygmalios.reactiveinflux
import com.pygmalios.reactiveinflux.Point.{FieldKey, Measurement, TagKey, TagValue}
import com.pygmalios.reactiveinflux.impl.{EscapedString, EscapedStringWithEquals}
/**
* Common attributes of every point without a timestamp which will be assigned by Influx server.
*/
trait Po... | pygmalios/reactiveinflux | src/main/scala/com/pygmalios/reactiveinflux/Point.scala | Scala | apache-2.0 | 2,043 |
package eventstore
package akka
class ScavengeITest extends TestConnection {
sequential
"scavenge" should {
"scavenge database and fail if in progress" in new TestConnectionScope {
actor ! ScavengeDatabase
expectMsgType[ScavengeDatabaseResponse]
actor ! ScavengeDatabase
expectEsExcept... | EventStore/EventStore.JVM | client/src/test/scala/eventstore/akka/ScavengeITest.scala | Scala | bsd-3-clause | 380 |
/*
* 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/acceptance/src/test/scala/org/neo4j/internal/cypher/acceptance/NullAcceptanceTest.scala | Scala | apache-2.0 | 1,871 |
package com.typesafe.slick.docs
import java.sql.Blob
import org.reactivestreams.Publisher
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.{Future, Await}
import scala.concurrent.duration.Duration
import scala.concurrent.ExecutionContext.Implicits.global
import scala.language.higherKinds
import sl... | adamkozuch/slick | slick/src/sphinx/code/Connection.scala | Scala | bsd-2-clause | 3,096 |
package im.actor.server.dialog.group
import akka.actor.Status
import akka.pattern.pipe
import com.google.protobuf.ByteString
import im.actor.api.rpc.messaging.{ ApiMessage, UpdateMessageRead, UpdateMessageReadByMe, UpdateMessageReceived }
import im.actor.server.dialog.{ AuthIdRandomId, GroupDialogCommands, ReadFailed,... | liruqi/actor-platform | actor-server/actor-core/src/main/scala/im/actor/server/dialog/group/GroupDialogHandlers.scala | Scala | mit | 6,923 |
package controllers
import play.api.mvc._, Results._
import lila.api.Context
import lila.app._
import lila.common.LilaCookie
import lila.db.api.$find
import lila.security.Permission
import lila.user.tube.userTube
import lila.user.{ User => UserModel, UserRepo }
import views._
object Account extends LilaController {
... | JimmyMow/lila | app/controllers/Account.scala | Scala | mit | 4,993 |
package org.apache.flink.contrib.tensorflow.types
import java.nio.{ByteBuffer, ByteOrder}
import com.twitter.bijection.Conversion.asMethod
import com.twitter.bijection._
import org.apache.flink.contrib.tensorflow.util.TestData
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import org.scalatest... | cookieai/flink-tensorflow | flink-tensorflow/src/test/scala/org/apache/flink/contrib/tensorflow/types/TensorInjectionsTest.scala | Scala | apache-2.0 | 3,339 |
/*
* 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 | mllib/src/test/scala/org/apache/spark/ml/feature/StopWordsRemoverSuite.scala | Scala | apache-2.0 | 6,822 |
/*
* Copyright 2016 Actian Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | ActianCorp/spark-vector | src/main/scala/com/actian/spark_vector/colbuffer/package.scala | Scala | apache-2.0 | 1,016 |
package lila.puzzle
import play.api.data._
import play.api.data.Forms._
import lila.common.Form.{ numberIn, stringIn }
object PuzzleForm {
case class RoundData(
win: Boolean,
rated: Boolean,
replayDays: Option[Int],
streakId: Option[String],
streakScore: Option[Int]
) {
def res... | luanlv/lila | modules/puzzle/src/main/PuzzleForm.scala | Scala | mit | 1,501 |
package at.forsyte.apalache.tla.bmcmt.rules.aux
import at.forsyte.apalache.tla.bmcmt.{SymbState, SymbStateRewriter}
class OracleFactory(rewriter: SymbStateRewriter) {
/**
* Create a new oracle that can have a value in the range [0, nvalues).
* This oracle is created using the most efficient oracle implementa... | konnov/apalache | tla-bmcmt/src/main/scala/at/forsyte/apalache/tla/bmcmt/rules/aux/OracleFactory.scala | Scala | apache-2.0 | 2,211 |
package tanukkii.akkahttp.aws
import akka.http.scaladsl.model.HttpHeader.ParsingResult
import akka.http.scaladsl.model.Uri.Query
import akka.http.scaladsl.model._
import akka.stream.Materializer
import akka.stream.scaladsl.{Sink, Source, Flow}
import akka.util.ByteString
import com.amazonaws.util.SdkHttpUtils
import c... | TanUkkii007/akka-http-aws | akka-http-aws-core/src/main/scala/tanukkii/akkahttp/aws/AWSClientConversions.scala | Scala | mit | 4,302 |
package elevators.ui
import elevators._
import elevators.queue.RequestQueue
import elevators.util.first
import java.awt.Container
import java.awt.Dimension
import java.awt.Graphics
import java.awt.GridLayout
import java.awt.event.MouseEvent
import java.awt.event.MouseListener
import javax.swing.JComponent
import javax... | wohanley/elevators | src/main/scala/elevators/ui/MainPanel.scala | Scala | agpl-3.0 | 2,553 |
package controllers
import play.api._
import play.api.mvc._
import play.api.data._
import play.api.libs.json._
import play.api.libs.json.Reads._
import play.api.libs.functional.syntax._
import models.EpisodeId
import models.Watching
import models.User
object Episodes extends Controller {
implicit v... | PaulKeeble/TVTracker | app/controllers/Episodes.scala | Scala | gpl-2.0 | 1,234 |
package com.epicport
import java.io.File
import xitrum.Config.application
object Configuration {
import xitrum.Config.application
val data = new File(application.getString("epicport.data"))
val profile = new File(data, "profile")
if (!data.exists) {
throw new IllegalStateException(s"Folder ${da... | caiiiycuk/epicport | web/src/main/scala/com/epicport/Configuration.scala | Scala | gpl-2.0 | 456 |
package com.twitter.finagle.param
import com.twitter.finagle.service.StatsFilter
import com.twitter.finagle.util.DefaultTimer
import com.twitter.finagle.{Stack, stats, tracing, util}
import com.twitter.util.{JavaTimer, NullMonitor}
/**
* A class eligible for configuring a label used to identify finagle
* clients an... | mkhq/finagle | finagle-core/src/main/scala/com/twitter/finagle/param/Params.scala | Scala | apache-2.0 | 6,749 |
/* **************************************************************************
* *
* Copyright (C) 2011 Christian Krause *
* *
* Chri... | wookietreiber/org.anyzor | gatherer-feed/src/main/scala/FeedGatherer.scala | Scala | gpl-3.0 | 2,073 |
package services
import com.fasterxml.jackson.core.JsonParseException
import model.CurrencyConverter
import play.api.libs.functional.syntax._
import play.api.libs.json._
case class GogEntry(title: String, link : String, gogId: Long, price: Option[BigDecimal] = None, discounted: Option[BigDecimal] = None, genres : Str... | kongus99/Aggregator | app/services/GogEntry.scala | Scala | gpl-3.0 | 2,366 |
package com.ml
import com.util._
import com.util.Chart._
import com.graph._
import scala.util.Random
import scala.io.Source
abstract class DataSet extends FitnessEvalwShow {
val outputCount = 1
val data: Seq[(Seq[Double],Double)]
def apply(f: Seq[Double] => Seq[Double]): Double = {
val ms = (for(... | BrettAM/EvCompHW | src/main/scala/ml/DataSet.scala | Scala | apache-2.0 | 2,631 |
package edu.gemini.phase2.template.factory.impl.graces
import edu.gemini.phase2.template.factory.impl._
import edu.gemini.spModel.core.MagnitudeBand
import edu.gemini.spModel.gemini.graces.blueprint.SpGracesBlueprint
import edu.gemini.pot.sp.{SPComponentType, ISPGroup}
import edu.gemini.spModel.gemini.visitor.VisitorI... | spakzad/ocs | bundle/edu.gemini.phase2.skeleton.servlet/src/main/scala/edu/gemini/phase2/template/factory/impl/graces/Graces.scala | Scala | bsd-3-clause | 2,595 |
package scorex.app
import akka.actor.ActorRef
import scorex.consensus.ConsensusModule
import scorex.network.message.BasicMessagesRepo
import scorex.settings.Settings
import scorex.transaction.{BlockStorage, History, TransactionModule}
import scorex.wallet.Wallet
/**
* Pure interface to application
*/
trait Applic... | alexeykiselev/WavesScorex | scorex-basics/src/main/scala/scorex/app/Application.scala | Scala | cc0-1.0 | 771 |
package org.example1.usage
import org.example1.declaration.X
import org.example1.declaration.data.A
trait Usage_MergeToExisting_Imports_1_1 {
val a: A = ???
val x: X = ???
}
| JetBrains/intellij-scala | scala/scala-impl/testdata/move/allInOne/before/org/example1/usage/Usage_MergeToExisting_Imports_1_1.scala | Scala | apache-2.0 | 181 |
package paperdoll.cats
import paperdoll.core.effect.Effects
import paperdoll.core.layer.Layer
import CatsEffects.sendTUC
import cats.Functor
import cats.data.EitherT
import paperdoll.std.Either_
import cats.instances.either._
object EitherTLayer {
def sendEitherT[F[_]: Functor, A, B](et: EitherT[F, A, B]): Effects.... | m50d/paperdoll | cats/src/main/scala/paperdoll/cats/EitherTLayer.scala | Scala | apache-2.0 | 409 |
package im.tox.antox.activities
import android.app.Activity
import android.content.Intent
import android.graphics.Color
import android.os.{Build, Bundle}
import android.preference.PreferenceManager
import android.support.v7.app.AppCompatActivity
import android.view.{View, WindowManager}
import android.widget._
import ... | Ansa89/Antox | app/src/main/scala/im/tox/antox/activities/LoginActivity.scala | Scala | gpl-3.0 | 4,476 |
package im.mange.jetpac.input
import im.mange.jetboot.widget.form.FormInput
import im.mange.jetpac.{Event, Js}
import net.liftweb.http.SHtml
import net.liftweb.http.js.JsCmd
import net.liftweb.util.Helpers._
//TODO: should this really be in jetboot as it depends on external lib?
//TIP: this depends on - https://githu... | alltonp/jetboot | src/main/scala/im/mange/jetpac/input/MaskedBoxes.scala | Scala | apache-2.0 | 5,203 |
package sri.mobile.examples.uiexplorer.components
import org.scalajs.dom
import sri.core._
import sri.mobile.ReactNative
import sri.mobile.all._
import sri.universal.apis.{Layout, LayoutEvent}
import sri.mobile.examples.uiexplorer.{UIExample, UIExplorerPage}
import sri.universal.{ReactEvent, SyntheticEvent}
import sri... | chandu0101/sri | mobile-examples/src/main/scala/sri/mobile/examples/uiexplorer/components/LayoutEventsExample.scala | Scala | apache-2.0 | 4,371 |
package org.openurp.edu.base.ws
import org.beangle.commons.inject.bind.AbstractBindModule
import org.openurp.edu.base.ds.code.{ CourseCategoryWS, CourseTypeWS, ExamModeWS, ExamStatusWS, StdLabelTypeWS, StdLabelWS, StdStatusWS, StdTypeWS }
class DefaultModule extends AbstractBindModule {
protected override def bind... | openurp/edu-core | base/ws/src/main/scala/org/openurp/edu/base/ws/DefaultModule.scala | Scala | gpl-3.0 | 883 |
package net.kemuridama.kafcon.route
import akka.http.scaladsl.model.StatusCodes
import net.kemuridama.kafcon.model.APIResponse
import net.kemuridama.kafcon.service.{UsesBrokerService, MixinBrokerService}
import net.kemuridama.kafcon.protocol.BrokerJsonProtocol
trait BrokersAPIRoute
extends APIRoute
with UsesBrok... | kemuridama/kafcon | src/main/scala/net/kemuridama/kafcon/route/BrokersAPIRoute.scala | Scala | mit | 1,151 |
class Top[A] {
type AType = A
}
trait Node { outer =>
type T <: Node
def prepend = new Node { type T = outer.type }
}
class Main[NextType <: Node](value: Node { type T = NextType })
extends Top[Node { type T = NextType }] {
new Main[AType]( (value: AType).prepend )
}
/* we've... | lrytz/scala | test/files/neg/t0764.scala | Scala | apache-2.0 | 1,671 |
// Project: surf
// Module:
// Description:
// Copyright (c) 2015 Johannes Kastner <[email protected]>
// Distributed under the MIT license (see included LICENSE file)
package surf.rest.test
//import surf.ServiceRefFactory
//import surf.rest.{RESTRequest, RESTAction, RESTResource, RESTService... | jokade/surf | rest/shared/src/test/scala/surf/rest/test/RESTServiceTest.scala | Scala | mit | 694 |
/**
* The MIT License (MIT)
*
* Copyright (c) 2018 Israel Freitas([email protected])
*
* 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 with... | ifreitas/AimlToXml | src/main/scala/ifreitas/scalaaiml/elements/Sraix.scala | Scala | mit | 1,351 |
package com.monovore.example.coast
import com.monovore.coast
import coast.flow
import com.monovore.coast.flow.{Flow, Topic}
import com.monovore.coast.wire.Protocol
/**
* Based on the discussion in this thread:
*
* http://mail-archives.apache.org/mod_mbox/incubator-samza-dev/201411.mbox/%3CCAFhxiSQ4V3KTt2L4CcRVHrKD... | bkirwi/coast | core/src/main/scala/com/monovore/example/coast/CustomerTransactions.scala | Scala | apache-2.0 | 1,822 |
package vexriscv.plugin
import vexriscv.{plugin, _}
import vexriscv.ip._
import spinal.core._
import spinal.lib._
import scala.collection.mutable.ArrayBuffer
//class IBusCachedPlugin(config : InstructionCacheConfig, memoryTranslatorPortConfig : Any = null) extends Plugin[VexRiscv] {
// var iBus : InstructionCacheM... | SpinalHDL/VexRiscv | src/main/scala/vexriscv/plugin/IBusCachedPlugin.scala | Scala | mit | 10,881 |
/*
* Copyright 2011-2022 GatlingCorp (https://gatling.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | gatling/gatling | gatling-jms/src/test/scala/io/gatling/jms/check/JmsSimpleCheckSpec.scala | Scala | apache-2.0 | 1,526 |
package de.tobbra.syringe
import scala.collection.mutable
import scala.reflect.runtime.universe._
import de.tobbra.syringe.bindings._
import de.tobbra.syringe.modules._
import de.tobbra.syringe._
abstract class DefaultFactory[C <: Context](val modules: Module[C]*) extends Factory {
val context: C
private val... | TobBrandt/syringe | source/scala/de.tobbra.syringe/src/de/tobbra/syringe/DefaultFactory.scala | Scala | bsd-2-clause | 1,826 |
/*
* 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 ... | brad-kaiser/spark | external/kafka-0-10/src/main/scala/org/apache/spark/streaming/kafka010/CachedKafkaConsumer.scala | Scala | apache-2.0 | 7,844 |
/*
* Copyright 2017-2022 John Snow Labs
*
* 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... | JohnSnowLabs/spark-nlp | src/main/scala/com/johnsnowlabs/nlp/CanBeLazy.scala | Scala | apache-2.0 | 1,077 |
package entitytled.test.hooks.model
import entitytled.Entitytled
import scala.concurrent.ExecutionContext
trait PersonComponent {
self: Entitytled with PersonHooksCounterComponent =>
import driver.api._
case class Person(id: Option[Long], name: String) extends Entity[Person, Long]
object Person extends En... | RSSchermer/entitytled | test/src/test/scala/entitytled/test/hooks/model/PersonComponent.scala | Scala | mit | 4,036 |
package org.jetbrains.plugins.scala.lang.psi.impl.toplevel.typedef.simulacrum
import org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil
import org.jetbrains.plugins.scala.lang.psi.api.base.ScLiteral
import org.jetbrains.plugins.scala.lang.psi.api.base.types.{ScSimpleTypeElement, ScParameterizedTypeElement}
import org.j... | SergeevPavel/intellij-scala | src/org/jetbrains/plugins/scala/lang/psi/impl/toplevel/typedef/simulacrum/SimulacrumInjection.scala | Scala | apache-2.0 | 6,958 |
package im.tox.antox.activities
import java.util
import android.content.{Context, SharedPreferences}
import android.os.Bundle
import android.preference.PreferenceManager
import android.support.v7.app.{ActionBar, AppCompatActivity}
import android.text.InputFilter.LengthFilter
import android.text.{Editable, InputFilter... | mGhassen/Antox | app/src/main/scala/im/tox/antox/activities/GenericChatActivity.scala | Scala | gpl-3.0 | 7,719 |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org.abondar.scalabasic
class Rational(n: Int, d: Int) {
require(d!=0)
private val g = gcd(n.abs,d.abs)
val numer: Int= ... | Dr762/ScalaBase | src/main/scala/org/abondar/scalabasic/Rational.scala | Scala | apache-2.0 | 1,436 |
/*
* Copyright 2014 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in... | yeghishe/spark-kernel | client/src/test/scala/examples/ScalaSparkClientUsage.scala | Scala | apache-2.0 | 5,466 |
/*
* Copyright 2016 Actian Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | ActianCorp/spark-vector | src/main/scala/com/actian/spark_vector/colbuffer/util/TimeConversion.scala | Scala | apache-2.0 | 2,820 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 Algolia
* http://www.algolia.com/
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation... | algolia/algoliasearch-client-scala | src/main/scala/algolia/dsl/LogsDsl.scala | Scala | mit | 1,824 |
/*
* Copyright (C) 2015 Noorq, 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... | mailrest/mailrest | app/services/DomainService.scala | Scala | apache-2.0 | 2,095 |
/*
* 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 ... | openwhisk/openwhisk | common/scala/src/main/scala/org/apache/openwhisk/core/yarn/YARNContainerFactory.scala | Scala | apache-2.0 | 9,269 |
/*
* Copyright 2017 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/featran | core/src/main/scala/com/spotify/featran/transformers/MinMaxScaler.scala | Scala | apache-2.0 | 3,440 |
package org.jetbrains.plugins.scala.codeInsight
package hints
package methodChains
import java.awt.{Graphics, Insets, Rectangle}
import com.intellij.openapi.Disposable
import com.intellij.openapi.editor._
import com.intellij.openapi.editor.ex.EditorEx
import com.intellij.openapi.editor.impl.EditorImpl
import com.inte... | JetBrains/intellij-scala | scala/codeInsight/src/org/jetbrains/plugins/scala/codeInsight/hints/methodChains/AlignedInlayGroup.scala | Scala | apache-2.0 | 5,744 |
/*
* _ _
* _ __ ___ | |__ | | ___
* | '_ \\ / _ \\| '_ \\| |/ _ \\ 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/models/Blog.scala | Scala | apache-2.0 | 4,675 |
/*
* Scala.js (https://www.scala-js.org/)
*
* Copyright EPFL.
*
* Licensed under Apache License 2.0
* (https://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
package sbt.testing
/** Information in additi... | nicolasstucki/scala-js | test-interface/src/main/scala/sbt/testing/Selectors.scala | Scala | apache-2.0 | 6,045 |
package models.user
import models.ParamHelper
import play.api.libs.json._
import play.api.libs.functional.syntax._
import reactivemongo.bson._
import services.dao.UtilBson
case class ServiceArg (
name: String,
value: ParamHelper
)
object ServiceArg {
implicit val serviceArgReader: Reads[ServiceArg] = (
... | Froggies/Skimbo | app/models/user/ServiceArg.scala | Scala | agpl-3.0 | 865 |
/*
* ____ ____ _____ ____ ___ ____
* | _ \\ | _ \\ | ____| / ___| / _/ / ___| Precog (R)
* | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data
* | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, In... | precog/platform | mimir/src/main/scala/com/precog/mimir/TypeInferencer.scala | Scala | agpl-3.0 | 8,181 |
package com.twitter.finagle
import com.twitter.finagle.client.{StdStackClient, StackClient, Transporter}
import com.twitter.finagle.dispatch.{SerialClientDispatcher, SerialServerDispatcher}
import com.twitter.finagle.netty3.{Netty3Transporter, Netty3Listener}
import com.twitter.finagle.param.{Label, Stats, ProtocolLib... | travisbrown/finagle | finagle-thrift/src/main/scala/com/twitter/finagle/Thrift.scala | Scala | apache-2.0 | 9,392 |
package com.mz.training.domains.address
import com.mz.training.domains.EntityId
import spray.json.DefaultJsonProtocol._
/**
* Created by zemi on 10/08/16.
*/
case class Address(id: Long, street: String, zip: String, houseNumber: String, city: String) extends EntityId
object Address {
implicit val format = json... | michalzeman/angular2-training | akka-http-server/src/main/scala/com/mz/training/domains/address/Address.scala | Scala | mit | 345 |
package com.softwaremill.codebrag.repository
import org.eclipse.jgit.revwalk.RevCommit
import com.softwaremill.codebrag.domain.{PartialCommitInfo, CommitInfo}
import org.joda.time.DateTime
import com.typesafe.scalalogging.slf4j.Logging
trait RawCommitsConverter { self: Repository with Logging =>
def toPartialCommi... | softwaremill/codebrag | codebrag-service/src/main/scala/com/softwaremill/codebrag/repository/RawCommitsConverter.scala | Scala | agpl-3.0 | 1,566 |
/*
* Copyright 2012 Eike Kettner
*
* 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... | eikek/publet | auth/src/main/scala/org/eknet/publet/auth/UsersRealm.scala | Scala | apache-2.0 | 2,552 |
package org.scalaide.ui.internal.diagnostic
import org.eclipse.jface.dialogs.Dialog
import org.eclipse.jface.dialogs.IDialogConstants
import org.eclipse.swt.widgets.{ List => SWTList, _ }
import org.eclipse.swt.layout.RowLayout
import org.eclipse.swt.layout.GridLayout
import org.eclipse.swt.layout.GridData
import org.... | Kwestor/scala-ide | org.scala-ide.sdt.core/src/org/scalaide/ui/internal/diagnostic/ReportBugDialog.scala | Scala | bsd-3-clause | 3,739 |
package com.caibowen.prma.logger.jul
import java.util.logging.{LogRecord, Formatter, Handler}
import java.lang.StringBuilder
import com.caibowen.prma.api.EventAdaptor
/**
* Created by Bowen Cai on 1/9/2015.
*/
class JsonFormatter(adaptor: EventAdaptor[LogRecord]) extends Formatter {
override def getHead(h: Hand... | xkommando/PRMA | logger/src/main/scala/com/caibowen/prma/logger/jul/JsonFormatter.scala | Scala | lgpl-3.0 | 544 |
package me.snov.sns.api
import akka.actor.ActorRef
import akka.actor.Status.{Success, Failure}
import akka.http.scaladsl.model.HttpResponse
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.server.Route
import akka.pattern.ask
import akka.util.Timeout
import me.snov.sns.actor.SubscribeActor.{CmdL... | s12v/sns | src/main/scala/me/snov/sns/api/SubscribeApi.scala | Scala | apache-2.0 | 3,493 |
/*
* 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/airframe | airframe-di-macros/src/main/scala-2/wvlet/airframe/AirframeMacros.scala | Scala | apache-2.0 | 33,616 |
package org.jetbrains.plugins.scala.lang.psi.types.api
import org.jetbrains.plugins.scala.extensions.PsiClassExt
import org.jetbrains.plugins.scala.lang.psi.ElementScope
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.ScClass
import org.jetbrains.plugins.scala.lang.psi.types.recursiveUpdate.{AfterUpda... | jastice/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/types/api/JavaArrayType.scala | Scala | apache-2.0 | 2,333 |
import org.apache.spark.mllib.util.MLUtils
import org.apache.spark.mllib.stat.Statistics
import org.apache.spark.mllib.linalg.Vectors
import org.apache.spark.mllib.regression.LabeledPoint
val x = MLUtils.loadLibSVMFile (sc, "kaggle/stackoverflow-train-sample-replace-text-by-length-numeric.libsvm")
val summary = Statis... | robert-dodier/PDXScala-2015 | stackoverflow_mlpc.scala | Scala | gpl-2.0 | 1,254 |
package scredis.io
import java.util.concurrent.{CountDownLatch, TimeUnit}
import akka.actor._
import com.typesafe.scalalogging.LazyLogging
import scredis.protocol.{AuthConfig, Request}
import scredis.protocol.requests.ConnectionRequests.{Auth, Quit, Select}
import scredis.protocol.requests.ServerRequests.{ClientSetNa... | scredis/scredis | src/main/scala/scredis/io/AbstractAkkaConnection.scala | Scala | apache-2.0 | 2,939 |
package scala.reflect
package generic
trait Scopes { self: Universe =>
abstract class AbsScope extends Iterable[Symbol] {
def enter(sym: Symbol): Symbol
}
type Scope <: AbsScope
def newScope(): Scope
}
| cran/rkafkajars | java/scala/reflect/generic/Scopes.scala | Scala | apache-2.0 | 224 |
package com.softwaremill.clippy
import scala.reflect.internal.util.Position
import scala.tools.nsc.reporters.Reporter
class FailOnWarningsReporter(r: Reporter, warningMatcher: String => Option[Warning], colorsConfig: ColorsConfig)
extends Reporter {
override protected def info0(pos: Position, msg: String, sever... | softwaremill/scala-clippy | plugin/src/main/scala/com/softwaremill/clippy/FailOnWarningsReporter.scala | Scala | apache-2.0 | 2,351 |
/*
* (c) Copyright 2016 Hewlett Packard Enterprise Development LP
*
* 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 b... | hpe-cct/cct-core | src/test/scala/cogx/runtime/checkpoint/SimplePipelinedTestColorActuator.scala | Scala | apache-2.0 | 2,827 |
package org.sierra
import org.sierra.command.RedisCommand1d1
import redis.clients.jedis.Jedis
import shapeless.HList
import shapeless.HNil
case class Path(redisKey: String) {
def /(key: String): Path = Path(redisKey + ":" + key)
def on(keys: String*): Path = Path((redisKey +: keys).mkString(":"))
}
case class... | naoh87/sierra | src/main/scala/org/sierra/Path.scala | Scala | mit | 1,487 |
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.