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 |
|---|---|---|---|---|---|
/*
* The MIT License
*
* Copyright (c) 2017 Fulcrum Genomics LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to us... | fulcrumgenomics/fgbio | src/main/scala/com/fulcrumgenomics/illumina/RunInfo.scala | Scala | mit | 4,911 |
package mesosphere.marathon
import scala.util.{ Failure, Try }
class MarathonConfTest extends MarathonSpec {
private[this] val principal = "foo"
private[this] val secretFile = "/bar/baz"
test("MesosAuthenticationIsOptional") {
val conf = makeConfig(
"--master", "127.0.0.1:5050"
)
assert(conf... | Kosta-Github/marathon | src/test/scala/mesosphere/marathon/MarathonConfTest.scala | Scala | apache-2.0 | 3,412 |
/*
* Copyright (C) 2015 Stratio (http://stratio.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 app... | miguel0afd/crossdata | common/src/main/scala/com/stratio/crossdata/common/serializers/StreamedSuccessfulSQLResultSerializer.scala | Scala | apache-2.0 | 2,092 |
package com.arcusys.valamis.slide.storage
import com.arcusys.valamis.model.SkipTake
import com.arcusys.valamis.slide.service.contentProvider.model.ContentProvider
/**
* Created By:
* User: zsoltberki
* Date: 27.9.2016
*/
trait ContentProviderRepository {
def getAll(skipTake: Option[SkipTake],
n... | arcusys/Valamis | valamis-slide/src/main/scala/com/arcusys/valamis/slide/storage/ContentProviderRepository.scala | Scala | gpl-3.0 | 599 |
package im.actor.server.commons
object KeyValueMappings {
val LocalNames = "LocalNames"
val Migrations = "Migrations"
val IntegrationTokens = "IntegrationTokens"
val ReverseHooks = "ReverseHooks"
} | winiceo/actor-platform | actor-server/actor-commons-base/src/main/scala/im/actor/server/commons/KeyValueMappings.scala | Scala | mit | 206 |
package edu.gemini.ags.client.impl
import org.specs2.mutable.Specification
class QueryUrlSpec extends Specification {
"The QueryUrl class" should {
"should guess the protocol from the port" in {
val queryUrl = new QueryUrl("localhost", 8080)
queryUrl.protocol must beEqualTo("http")
val secureQ... | fnussber/ocs | bundle/edu.gemini.ags.client.impl/src/test/scala/edu/gemini/ags/client/impl/QueryUrlSpec.scala | Scala | bsd-3-clause | 428 |
/*
* 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 ... | mahak/spark | sql/hive/src/main/scala/org/apache/spark/sql/hive/client/package.scala | Scala | apache-2.0 | 5,767 |
package com.twitter.finatra.http.tests.integration.tweetexample.main.domain
import com.twitter.finagle.http.MediaType
import com.twitter.finatra.http.marshalling.{MessageBodyWriter, WriterResponse}
import com.twitter.util.jackson.ScalaObjectMapper
import javax.inject.Inject
class CarMessageBodyWriter @Inject() (mappe... | twitter/finatra | http-server/src/test/scala/com/twitter/finatra/http/tests/integration/tweetexample/main/domain/CarMessageBodyWriter.scala | Scala | apache-2.0 | 646 |
package org.qirx.sbtWebjars
import java.io.File
/**
* Representation of a webjar. Note that the version is of the library
* inside of the webjar, not the webjar version itself.
*
* @param name The name of the webjar
* @param version The version of the library in the webjar
* @param path The path whe... | EECOLOR/sbt-webjar | src/main/scala/org/qirx/sbtWebjars/Webjar.scala | Scala | mit | 520 |
package scala.in.programming.class_and_object
/**
* Very simple example for me
*
* setAge and setName same return type(Unit)
*
* @author loustler
* @since 01/17/2017 02:05
*/
class User {
private var name: String = ""
private var age: Int = 0
def getAge(): Int = this.age
def setAge(age: Int) = ... | loustler/scala | src/main/scala/scala/in/programming/class_and_object/User.scala | Scala | mit | 538 |
package com.productfoundry.akka.cqrs
import akka.actor.{ActorRef, Props, Status}
import com.productfoundry.akka.PassivationConfig
import com.productfoundry.akka.cqrs.CommandRequest._
import com.productfoundry.akka.cqrs.DummyAggregate._
import com.productfoundry.support.AggregateTestSupport
class AggregateSpec extends... | odd/akka-cqrs | core/src/test/scala/com/productfoundry/akka/cqrs/AggregateSpec.scala | Scala | apache-2.0 | 9,128 |
package hr.element.beepo
package misc
import javax.mail.Message
trait ITransporter {
def send(msg: Message)
} | element-doo/beepo | code/scala/model-interfaces-plus/src/main/scala/hr/element/beepo/misc/ITransporter.scala | Scala | bsd-3-clause | 113 |
/*
* Copyright 2014 Frugal Mechanic (http://frugalmechanic.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... | frugalmechanic/fm-common | jvm/src/main/scala/fm/common/ScheduledTask.scala | Scala | apache-2.0 | 1,132 |
package houseprices.search
import org.scalatest.WordSpec
import org.scalatest.Matchers
import org.scalatest.prop.TableDrivenPropertyChecks
class PostcodeMatchersSpec extends WordSpec with Matchers with TableDrivenPropertyChecks {
val postcodes = Table(("postcode"),
("AB24 5HT"), ("B4 7ES"), ("PO31 8LD"), ("H... | ayubmalik/houseprices | houseprices-rest-api/src/test/scala/houseprices/search/PostcodeMatchersSpec.scala | Scala | mit | 2,107 |
/*
* Copyright 2014–2018 SlamData Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | jedesah/Quasar | frontend/src/main/scala/quasar/sst/StructuralMerge.scala | Scala | apache-2.0 | 6,202 |
package net.nightwhistler.nwcsc.rest
import akka.actor.ActorRef
import akka.http.scaladsl.model.{ContentTypes, HttpEntity}
import akka.http.scaladsl.testkit.ScalatestRouteTest
import akka.testkit.{TestActor, TestKitBase, TestProbe}
import com.typesafe.scalalogging.Logger
import net.nightwhistler.nwcsc.blockchain.Block... | NightWhistler/naivechain-scala | src/test/scala/net/nightwhistler/nwcsc/rest/RestInterfaceTest.scala | Scala | apache-2.0 | 2,964 |
package notebook.front.third
package wisp
import notebook._
import notebook.front._
import scala.xml.NodeSeq
import play.api.libs.json._
import com.quantifind.charts.repl.{IterableIterable, IterablePair, IterablePairLowerPriorityImplicits}
import com.quantifind.charts.highcharts.{Series=>HSeries, _ }
import com.qua... | bigdatagenomics/mango-notebook | modules/common/src/main/scala/notebook/front/third/WISP.scala | Scala | apache-2.0 | 1,906 |
package im.actor.server.group
import akka.actor.Status
import akka.pattern.pipe
import im.actor.api.rpc.PeersImplicits
import im.actor.server.dialog.DialogCommands._
import im.actor.server.group.GroupErrors.NotAMember
import im.actor.server.model.Peer
import scala.concurrent.Future
trait GroupPeerCommandHandlers ext... | ljshj/actor-platform | actor-server/actor-core/src/main/scala/im/actor/server/group/GroupPeerCommandHandlers.scala | Scala | mit | 4,853 |
package com.twitter.querulous.config
import com.twitter.querulous._
import com.twitter.util.Duration
import com.twitter.conversions.time._
import query._
object QueryTimeout {
def apply(timeout: Duration, cancelOnTimeout: Boolean) =
new QueryTimeout(timeout, cancelOnTimeout)
def apply(timeout: Duration) =
... | twitter/querulous | querulous-core/src/main/scala/com/twitter/querulous/config/Query.scala | Scala | apache-2.0 | 1,942 |
/**
* FILE: ResourceDAOTest.scala
* PERCORSO /Codice/sgad/servertier/src/test/scala/sgad/servertier/dataaccess/databaseaccess/shareddatadao
* DATA CREAZIONE: 20 Febbraio 2014
* AUTORE: ProTech
* EMAIL: protech.unipd@gmail.com
*
* Questo file è proprietà del gruppo ProTech, viene rilasciato sotto licenza Apache v... | protechunipd/SGAD | Codice/sgad/servertier/src/test/scala/sgad/servertier/dataaccess/databaseaccess/shareddatadao/ResourceDAOTest.scala | Scala | apache-2.0 | 1,726 |
package com.github.alexadewit.scala_oauth2
import scalaz._, scalaz.syntax.either._, scalaz.concurrent._
import org.http4s._
import org.http4s.Http4s._
import org.http4s.client._
import org.http4s.util._
import org.http4s.Status.NotFound
import org.http4s.Status.ResponseClass.Successful
import AccessTokenJson._
trai... | AlexaDeWit/scala-oauth2 | src/main/scala/requests/AccessTokenRequest.scala | Scala | bsd-3-clause | 892 |
/*
* 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 ... | tzulitai/flink | flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/batch/BatchExecExpand.scala | Scala | apache-2.0 | 3,894 |
import cats.Monad
import monix.eval.Task
import services.tagless._
class TaglessMonixApp {
def program[F[_]: Monad](
implicit
A: InteractionService[F],
D: DataOpService[F],
L: LogService[F]
): F[String] = {
import A._, D._, L._
import cats.syntax.functor._
import cats.syntax.flatMap.... | radusw/tagless-free-monix-sample | src/main/scala/TaglessMonixApp.scala | Scala | apache-2.0 | 958 |
package com.sksamuel.scrimage.filter
import java.awt.Color
import com.sksamuel.scrimage.{FontUtils, ImmutableImage}
import com.sksamuel.scrimage.nio.PngWriter
import org.scalatest.{Matchers, WordSpec}
class WatermarkTest extends WordSpec with Matchers {
implicit private val writer: PngWriter = PngWriter.MaxCompre... | sksamuel/scrimage | scrimage-filters/src/test/scala/com/sksamuel/scrimage/filter/WatermarkTest.scala | Scala | apache-2.0 | 1,499 |
package aia.persistence
import scala.concurrent.duration._
import scala.concurrent.Future
import scala.concurrent.Await
import akka.NotUsed
import akka.actor._
import akka.testkit._
import akka.stream._
import akka.stream.scaladsl._
import akka.persistence.query._
import akka.persistence.query.journal.leveldb.scalads... | gilbutITbook/006877 | chapter-persistence/src/test/scala/aia/persistence/BasketQuerySpec.scala | Scala | mit | 1,882 |
package com.twitter
import com.twitter.app.GlobalFlag
import com.twitter.finagle.serverset2.Zk2Resolver
import com.twitter.finagle.zookeeper.ZkResolver
import com.twitter.finagle.{Addr, Dtab, NameTree, Namer, Resolver, Path, WeightedInetSocketAddress, Name}
import com.twitter.util.Activity
import java.net.InetSocketAd... | yancl/finagle-6.22.0 | finagle-serversets/src/main/scala/com/twitter/serverset.scala | Scala | apache-2.0 | 2,625 |
/*
* 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... | wangyixiaohuihui/spark2-annotation | sql/core/src/main/scala/org/apache/spark/sql/execution/python/PythonUDF.scala | Scala | apache-2.0 | 1,432 |
package se.lu.nateko.cp.data.streams.geo
import Ordering.Double.TotalOrdering
import PointReducer._
import se.lu.nateko.cp.meta.core.data.GeoFeature
import se.lu.nateko.cp.meta.core.data.GeoTrack
import se.lu.nateko.cp.meta.core.data.Position
class PointReducer(nmax: Int, costFun: CostFunction) {
assert(nmax >= 4,... | ICOS-Carbon-Portal/data | src/main/scala/se/lu/nateko/cp/data/streams/geo/PointReducer.scala | Scala | gpl-3.0 | 4,956 |
package org.jetbrains.plugins.scala.extensions.implementation.iterator
import com.intellij.psi.PsiElement
/**
* Pavel.Fatin, 11.05.2010
*/
class ParentsIterator(element: PsiElement, strict: Boolean = true) extends Iterator[PsiElement] {
private var current = if (strict && element != null) element.getParent else ... | JetBrains/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/extensions/implementation/iterator/ParentsIterator.scala | Scala | apache-2.0 | 491 |
package com.krrrr38.halty.markdown
import com.krrrr38.halty._
import org.specs2.mutable.Specification
class MarkdownGeneratorTest extends Specification {
object MarkdownIdentityConfig extends DefaultMarkdownGeneratorConfig {
override val fetcher: Fetcher = new Fetcher {
override def fetchTitle(url: String... | krrrr38/halty | src/test/scala/com/krrrr38/halty/markdown/MarkdownGeneratorTest.scala | Scala | mit | 3,210 |
package actors
import models.JsonFormats._
import models.MongoCollections._
import models.{MachineEnv, Environment, Alert, Machine}
import play.Logger
import play.api.libs.concurrent.Execution.Implicits.defaultContext
import play.api.libs.json.Json
import play.modules.reactivemongo.json._
import reactivemongo.api.Curs... | marianafranco/machine-park | app/actors/MonitorUtils.scala | Scala | mit | 3,954 |
package nexus.diff.ops
import nexus.diff._
import nexus.diff.ops.mixin._
import nexus._
import nexus.syntax._
/**
* Sine function.
* @author Tongfei Chen
* @since 0.1.0
*/
object Sin extends PolyOp1 with RealElementwisePolyOp1Mixin {
def name = "Sin"
def forwardR[R](x: R)(implicit R: IsReal[R]) = R.sin(x)
d... | ctongfei/nexus | diff/src/main/scala/nexus/diff/ops/trigonometric.scala | Scala | mit | 2,888 |
/*
* 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 ... | hequn8128/flink | flink-examples/flink-examples-streaming/src/main/scala/org/apache/flink/streaming/scala/examples/windowing/SessionWindowing.scala | Scala | apache-2.0 | 3,295 |
enum View[-T]:
case Refl(f: T => T) // error: enum case Refl requires explicit declaration of type T
enum ExplicitView[-T]: // desugared version of View
case Refl[-T](f: T => T) extends ExplicitView[T] // error: contravariant type T occurs in covariant position
enum InvariantView[-T, +U] extends (T => U):
case ... | lampepfl/dotty | tests/neg-custom-args/fatal-warnings/enum-variance.scala | Scala | apache-2.0 | 444 |
package code.snippet
import net.liftweb._
import net.liftweb.http.PaginatorSnippet
import mapper._
import scala.xml.NodeSeq
import util.Helpers._
case class Measurement(ip: String, downloadSpeed: Double, uploadSpeed: Double)
object Measurement {
val values = for(i <- 1 to 100) yield {
Measurement("192.158.34.... | gruenewa/lift-testbox | src/main/scala/code/snippet/Pagination.scala | Scala | apache-2.0 | 734 |
package dbtarzan.gui
import scalafx.scene.control.{ ListView, ListCell, SplitPane, ContextMenu, MenuItem }
import scalafx.scene.Parent
import scalafx.collections.ObservableBuffer
import dbtarzan.gui.util.JFXUtil
import dbtarzan.messages.DatabaseIds
import dbtarzan.db.DatabaseId
import dbtarzan.localization.Localizati... | aferrandi/dbtarzan | src/main/scala/dbtarzan/gui/DatabaseList.scala | Scala | apache-2.0 | 1,700 |
package org.denigma.kappa.notebook.views.visual.rules
import org.denigma.kappa.notebook.graph._
import org.scalajs.dom.svg.SVG
object RulesVisualSettings
{
val DEFAULT_AGENT_FONT = 20
val DEFAULT_SITE_FONT = 14
val DEFAULT_STATE_FONT = 11
}
case class RulesVisualSettings(
canvas:... | antonkulaga/kappa-notebook | app/js/src/main/scala/org/denigma/kappa/notebook/views/visual/rules/RulesVisualSettings.scala | Scala | mpl-2.0 | 981 |
package com.gilt.aws.escalator
import com.amazonaws.services.kinesis.model.{HashKeyRange, SequenceNumberRange, Shard}
import org.scalatest.{FlatSpec, Matchers}
class RichShardSpec extends FlatSpec with Matchers {
"A shard" should "report openness" in {
val openShard = new Shard()
val openRange = new Sequenc... | ebowman/escalator | src/test/scala/com/gilt/aws/escalator/RichShardSpec.scala | Scala | mit | 1,710 |
/*
* Copyright 2009-2010 WorldWide Conferencing, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | geggo98/json4s | scalaz/src/main/scala/org/json4s/scalaz/JsonScalaz.scala | Scala | apache-2.0 | 2,946 |
package me.hawkweisman.alexandria
package test
import me.hawkweisman.alexandria.model.{LastNameOrdering, Person, FirstNameOrdering, Author}
import org.scalatest.{Matchers, WordSpec}
import scala.util.Sorting
/**
* Created by hawk on 6/29/15.
*/
class ModelSpec extends WordSpec
with Matchers{
"The Author mode... | alexandrialibrary/Alexandria | src/test/scala/me/hawkweisman/alexandria/test/ModelSpec.scala | Scala | mit | 2,463 |
package verizon.build
import sbt._, Keys._
import xerial.sbt.Sonatype.autoImport.sonatypeProfileName
object CentralRequirementsPlugin extends AutoPlugin {
override def trigger = allRequirements
override def requires = RigPlugin
override lazy val projectSettings = Seq(
sonatypeProfileName := "io.verizon",... | oncue/mesos-scheduler | project/CentralRequirementsPlugin.scala | Scala | apache-2.0 | 1,006 |
// @GENERATOR:play-routes-compiler
// @SOURCE:D:/git/trask/glowroot/agent-parent/plugins/play-plugin/tmp-router-files/conf/routes
// @DATE:Sat Apr 09 15:55:55 PDT 2016
import play.api.mvc.{ QueryStringBindable, PathBindable, Call, JavascriptLiteral }
import play.core.routing.{ HandlerDef, ReverseRouteContext, querySt... | glowroot/glowroot | agent/plugins/play-plugin/src/test/app-2.5.x-java/scala/controllers/ReverseRoutes.scala | Scala | apache-2.0 | 2,055 |
package org.scalamu.plugin.mutators
import org.scalamu.plugin.{MutatingTransformer, ScalamuScalacConfig}
import scala.tools.nsc.Global
case object ReplaceWithNone extends AbstractApplyMutator {
override def description: String = "Replaced Option.apply[T] with None"
override def mutatingTransformer(global: Globa... | sugakandrey/scalamu | scalac-plugin/src/main/scala/org/scalamu/plugin/mutators/ReplaceWithNone.scala | Scala | gpl-3.0 | 670 |
/**
* Copyright (C) 2012 Orbeon, Inc.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the Free Software Foundation; either version
* 2.1 of the License, or (at your option) any later version.
*
* This program i... | joansmith/orbeon-forms | src/main/scala/org/orbeon/oxf/portlet/liferay/LiferayURL.scala | Scala | lgpl-2.1 | 3,195 |
/*
Copyright 2014 Commonwealth Bank of Australia
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 ... | CommBank/six | src/test/scala/au/com/cba/omnia/six/EnsemblePrepSpec.scala | Scala | apache-2.0 | 3,469 |
/*
* 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 ... | zzcclp/carbondata | integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/dataload/TestDataLoadWithOverWrite.scala | Scala | apache-2.0 | 2,756 |
package com.twitter.util
import java.util.concurrent.atomic.AtomicBoolean
/**
* Defines a trait that makes the underlying object *cancellable*.
* Cancellable objects may be linked to each other (one way) in order
* to propagate cancellation.
*
* Note that the underlying object may or may not _respond_ to the
* ... | BuoyantIO/twitter-util | util-core/src/main/scala/com/twitter/util/Cancellable.scala | Scala | apache-2.0 | 1,359 |
/*
* 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 ... | ron8hu/spark | project/MimaBuild.scala | Scala | apache-2.0 | 3,966 |
class i0(var i1: Unit)
| som-snytt/dotty | tests/pos/AE-23b20eba14de058f02b69cb1093063fe12b639fb.scala | Scala | apache-2.0 | 23 |
package com.heluna.filter
import com.typesafe.scalalogging.slf4j.Logging
import com.heluna.cache.Redis
import java.net.InetAddress
import com.heluna.model.{Greylist, Continue}
import com.heluna.util.MailDropConfig
/**
* Created with IntelliJ IDEA.
* User: markbe
* Date: 5/10/13
* Time: 10:51 AM
*/
object Greyli... | ministryofjustice/maildrop | smtp/src/main/scala/com/heluna/filter/GreylistFilter.scala | Scala | mit | 1,412 |
/*
* Copyright 2018 Akamai Technologies, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required ... | akamai-open/edgegrid-auth-java | edgegrid-signer-gatling/src/test/scala/com/akamai/edgegrid/signer/gatling/EdgeGridSignerSimulation2.scala | Scala | apache-2.0 | 1,991 |
package org.coroutines
import java.util.concurrent.ForkJoinPool
import java.util.concurrent.atomic._
import org.scalameter.api._
import org.scalameter.japi.JBench
import scala.annotation.tailrec
import scala.collection._
import scala.concurrent._
import scala.concurrent.duration._
import scala.concurrent.ExecutionCo... | storm-enroute/coroutines | src/bench/scala/org/coroutines/DataflowVariableBench.scala | Scala | bsd-3-clause | 7,989 |
// #Sireum
/*
Copyright (c) 2017-2021, Robby, Kansas State University
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
... | sireum/v3-logika-runtime | library/shared/src/main/scala/org/sireum/CircularQueue.scala | Scala | bsd-2-clause | 14,811 |
package techex.cases
import techex._
import techex._
import org.http4s._
import org.http4s.dsl._
import _root_.argonaut._
import Argonaut._
import techex.data.{codecJson, Storage}
import techex.domain._
import scalaz._, Scalaz._
import scalaz.concurrent.Task
import org.http4s.argonaut._
object listPersonalQuests ... | kantega/tech-ex-2015 | backend/src/main/scala/techex/cases/listPersonalQuests.scala | Scala | mit | 1,357 |
/*
* 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 ... | ashokblend/incubator-carbondata | integration/spark-common/src/main/scala/org/apache/carbondata/spark/CarbonSparkFactory.scala | Scala | apache-2.0 | 1,881 |
package com.github.mdr.mash.completions
import java.nio.file.{ Files, Path, Paths }
import com.github.mdr.mash.evaluator.{ RetildeResult, TildeExpander }
import com.github.mdr.mash.ns.os.FileTypeClass
import com.github.mdr.mash.os.{ EnvironmentInteractions, FileSystem, PathSummary }
import com.github.mdr.mash.parser.... | mdr/mash | src/main/scala/com/github/mdr/mash/completions/PathCompleter.scala | Scala | mit | 5,749 |
package one.lockstep
import one.lockstep.util.internal.TimingModule._
import one.lockstep.util.internal._
package object util
extends ShowModule
with BytesModule // depends on ShowModule
with TimingModule
with LoggingModule
with BooleanModule
with FutureModule
with TryModule
with ... | lockstep-one/vault | vault-common/src/main/scala/one/lockstep/util/package.scala | Scala | agpl-3.0 | 1,225 |
object Solution {
def prefixCompression(x: String, y: String, p: String = ""): List[String] = {
if (x.isEmpty || y.isEmpty || x.head != y.head) {
List(p, x, y)
} else {
prefixCompression(x.tail, y.tail, p + x.head)
}
}
def main(args: Array[String]): Unit = {
val lines = io.Source.std... | yasserglez/programming-problems | hackerrank/functional-programming/prefix-compression.scala | Scala | mit | 456 |
package jk_5.nailed.plugins.internal.command
import jk_5.nailed.api.command._
import jk_5.nailed.api.command.sender.CommandSender
/**
* No description given
*
* @author jk-5
*/
object CommandExperience extends Command("xp") with TabExecutor {
override def execute(ctx: CommandContext, args: Arguments){
val ... | nailed/nailed | cmdplugin/internal/command/CommandExperience.scala | Scala | mit | 1,423 |
/**
* Copyright 2011-2017 GatlingCorp (http://gatling.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | MykolaB/gatling | gatling-http/src/main/scala/io/gatling/http/cache/HttpContentCacheSupport.scala | Scala | apache-2.0 | 2,816 |
package com.statigories.switchboard.exceptions
import com.statigories.switchboard.persistors.token.TokenType.TokenType
case class MissingTokenException(tokenType: TokenType, message: String) extends RuntimeException(message)
object MissingTokenException {
def apply(tokenType: TokenType): MissingTokenException = Mi... | statigories/switchboard | src/main/scala/com/statigories/switchboard/exceptions/MissingTokenException.scala | Scala | mit | 358 |
package com.microsoft.partnercatalyst.fortis.spark.sinks.cassandra.aggregators
import com.datastax.spark.connector._
import com.datastax.spark.connector.writer.SqlRowWriter
import com.microsoft.partnercatalyst.fortis.spark.dba.ConfigurationManager
import com.microsoft.partnercatalyst.fortis.spark.sinks.cassandra.Cassa... | CatalystCode/project-fortis-spark | src/main/scala/com/microsoft/partnercatalyst/fortis/spark/sinks/cassandra/aggregators/ConjunctiveTopicsOffineAggregator.scala | Scala | mit | 1,539 |
package models.sitedata
trait BaseModel {
def getId: Long
def setId(id: Long): Unit
}
| tnddn/iv-web | portal/rest-portal/app/models/sitedata/BaseModel.scala | Scala | apache-2.0 | 91 |
package club.diybio.bank.routes
import akka.http.extensions.security.LoginInfo
import akka.http.extensions.stubs._
import akka.http.scaladsl.server.Directives
class Router extends Directives {
val sessionController:SessionController = new InMemorySessionController
val loginController:InMemoryLoginController = new... | denigma/plasmid-bank | backend/src/main/scala/club/diybio/bank/routes/Router.scala | Scala | mpl-2.0 | 700 |
package spire
package random
import spire.random.rng._
import org.scalatest.FunSuite
class GeneratorTest extends FunSuite {
/**
* This is just a very basic sanity check.
*
* The idea is that for a large enough sample size (in this case
* 10M) we expect the results of nextInt(mod) to be distributed
... | tixxit/spire | tests/src/test/scala/spire/random/GeneratorTest.scala | Scala | mit | 2,878 |
/*
* 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... | adarro/ddo-calc | subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/feats/HumanFeat.scala | Scala | apache-2.0 | 1,365 |
package org.tejo.iza.rules.test.cirkulero
import org.joda.time.DateTime
import org.joda.time.format.{DateTimeFormatter, ISODateTimeFormat}
import org.tejo.iza.rules._
import org.tejo.iza.rules.facts._
import org.tejo.iza.rules.facts.control.{AlvokuCmd, MemoriguCmd}
import org.tejo.iza.rules.test.RuleTestData
object D... | tomaszym/izabela | rules/src/test/scala/org/tejo/iza/rules/test/cirkulero/DuaMemorigoTestData.scala | Scala | gpl-2.0 | 1,697 |
/**
* 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... | bryaakov/CM-Well | server/cmwell-fts/src/test/scala/cmwell/fts/FTSServiceEsSpec.scala | Scala | apache-2.0 | 24,156 |
package demo.impl.basket
import com.lightbend.lagom.scaladsl.api.ServiceLocator
import com.lightbend.lagom.scaladsl.api.ServiceLocator.NoServiceLocator
import com.lightbend.lagom.scaladsl.broker.kafka.LagomKafkaComponents
import com.lightbend.lagom.scaladsl.devmode.LagomDevModeComponents
import com.lightbend.lagom.sca... | tommpy/demo-lagom-checkout | exercise_070_validate_place_order/basket-impl/src/main/scala/demo/impl/basket/BasketApplication.scala | Scala | apache-2.0 | 2,161 |
/*
* Copyright 2011-2021 Asakusa Framework Team.
*
* 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 ... | asakusafw/asakusafw-spark | extensions/iterativebatch/compiler/core/src/main/scala/com/asakusafw/spark/extensions/iterativebatch/compiler/graph/DirectOutputCommitForIterativeCompiler.scala | Scala | apache-2.0 | 1,554 |
/*
* 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... | intel-analytics/BigDL | scala/orca/src/main/scala/com/intel/analytics/bigdl/orca/net/TorchOptim.scala | Scala | apache-2.0 | 8,776 |
package repositories.analysis.dao
import models.analysis.events.AnalysisResults.{AnalysisResult, DatingResult}
import models.analysis.events.{Analysis, AnalysisCollection}
import no.uio.musit.MusitResults.{MusitDbError, MusitResult, MusitSuccess}
import no.uio.musit.models.{EventId, ObjectUUID}
import no.uio.musit.tes... | kpmeen/musit | service_management/test/repositories/analysis/dao/AnalysisDaoSpec.scala | Scala | gpl-2.0 | 8,167 |
/*
* 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 ... | zimmermatt/flink | flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/rules/dataSet/DataSetAggregateRule.scala | Scala | apache-2.0 | 2,776 |
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
/** @author John Miller
* @version 1.3
* @date Sat Nov 21 15:05:06 EDT 2009
* @see LICENSE (MIT style license file).
*/
package scalation.process
import scala.collection.mutable.ListBuffer
import scalation.animation.Comm... | NBKlepp/fda | scalation_1.3/scalation_modeling/src/main/scala/scalation/process/Junction.scala | Scala | mit | 4,500 |
package org.scalaide.debug.internal.launching
import org.eclipse.debug.core.ILaunchConfiguration
import org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate
import org.eclipse.jdt.launching.IVMRunner
import org.eclipse.pde.internal.launching.launcher.VMHelper
trait ScalaDebuggerForLaunchDelegate extends ... | Kwestor/scala-ide | org.scala-ide.sdt.debug/src/org/scalaide/debug/internal/launching/ScalaDebuggerForLaunchDelegate.scala | Scala | bsd-3-clause | 548 |
package io.youi.form
import io.youi.net._
import scala.concurrent.duration._
case class Redirect(url: URL => URL, _push: Boolean = true, delay: Option[FiniteDuration] = None) {
def push: Redirect = copy(_push = true)
def set: Redirect = copy(_push = false)
def delay(delay: FiniteDuration): Redirect = copy(dela... | outr/youi | dom/src/main/scala/io/youi/form/Redirect.scala | Scala | mit | 493 |
package de.tototec.sbuild.addons
/**
* Addons to support unit testing with ScalaTest.
*/
package object scalatest {
} | SBuild-org/sbuild | de.tototec.sbuild.addons/src/main/scala/de/tototec/sbuild/addons/scalatest/package.scala | Scala | apache-2.0 | 121 |
package roomvalidationtest
import play.api.test.PlaySpecification
import validations.RoomValidation
/**
* Created by ka-son on 6/6/15.
*/
object CheckPrivacy extends PlaySpecification with RoomValidation {
"checkPrivacy(Some(\"public\")) mustEqual Right(\"public\")" in {
checkPrivacy(Some("public")) mustEqua... | KasonChan/play-chat-api | test/roomvalidationtest/CheckPrivacy.scala | Scala | mit | 761 |
package com.sfxcode.sapphire.extension.concurrent.akka
import javax.swing.SwingUtilities
object SwingExecutorService extends GUIExecutorService {
override def execute(command: Runnable) = SwingUtilities.invokeLater(command)
}
| sfxcode/sapphire-extension | src/main/scala/com/sfxcode/sapphire/extension/concurrent/akka/SwingExecutorService.scala | Scala | apache-2.0 | 230 |
/*
* Copyright 2016 rdbc contributors
*
* 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... | rdbc-io/rdbc-pgsql | rdbc-pgsql-core/src/main/scala/io/rdbc/pgsql/core/internal/fsm/DeallocatingStatement.scala | Scala | apache-2.0 | 1,194 |
package org.bitcoins.rpc
import akka.http.scaladsl.model.{HttpEntity, Uri}
import akka.stream.ActorMaterializer
import akka.util.ByteString
import org.bitcoins.core.config.{MainNet, RegTest}
import org.bitcoins.core.crypto.{DoubleSha256Digest, ECPrivateKey}
import org.bitcoins.core.currency.{Bitcoins, CurrencyUnit, Sa... | bitcoin-s/bitcoin-s-rpc-client | src/main/scala/org/bitcoins/rpc/RPCClient.scala | Scala | mit | 18,890 |
package com.github.spirom.sparkflights.experiments.common
import com.github.spirom.sparkflights.util.{SafeAccumulatorWrapper, PairAggregateCombiner, MapAccumulator}
import scala.reflect.ClassTag
//
// Accumulate a map of tail numbers with counts for use in aggregation
//
class ByTailNumberAccumulator() extends MapA... | spirom/SparkFlightExamples | src/main/scala/com/github/spirom/sparkflights/experiments/common/ByTailNumberAdderCombiner.scala | Scala | mit | 1,761 |
package circumflex
package diff
import collection.mutable.ListBuffer
/*! # Myers diff algorithm
`MyersDiff` computes the difference between two collections of arbitrary
typed elements. Elements are tested for equality using their `equals` method.
The result is reported as a collection of `Chunk`s
(see [[/diff/src/m... | inca/circumflex | diff/src/main/scala/myers.scala | Scala | bsd-2-clause | 3,927 |
package japgolly.scalajs.react
import scala.annotation.tailrec
import scala.collection.generic.CanBuildFrom
import japgolly.scalajs.react.internal.{OptionLike, identityFn}
import CallbackTo.MapGuard
// TODO Document CallbackOption
object CallbackOption {
private[CallbackOption] val someUnit: Option[Unit] = Some(()... | matthughes/scalajs-react | core/src/main/scala/japgolly/scalajs/react/CallbackOption.scala | Scala | apache-2.0 | 10,327 |
package org.abhijitsarkar.akka.k8s.watcher.model
import java.time.temporal.ChronoUnit
import java.util.LongSummaryStatistics
import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport
import spray.json.{DefaultJsonProtocol, JsArray, JsNumber, JsObject, JsString, JsValue, RootJsonFormat, _}
/**
* @author Abhi... | asarkar/akka | k8s-watcher/src/main/scala/org/abhijitsarkar/akka/k8s/watcher/model/StatsJsonProtocol.scala | Scala | gpl-3.0 | 1,468 |
package com.bryanjswift.lucene.store.gae
import java.io.File
import java.util.Calendar
import org.apache.lucene.store.{FSDirectory,IndexInput,IndexOutput}
import com.google.specs.DatastoreSpecification
class DatastoreIndexOutputSpecs extends DatastoreSpecification {
val filename = "1.fdx"
val rand = new scala.util.... | bryanjswift/gaelucene | src/test/scala/org/apache/lucene/store/gae/DatastoreIndexOutputSpecs.scala | Scala | mit | 1,111 |
/*
* Copyright 2001-2008 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... | hubertp/scalatest | src/main/scala/org/scalautils/LegacyEqualizer.scala | Scala | apache-2.0 | 7,214 |
package com.greencatsoft.angularjs.core
import com.greencatsoft.angularjs.injectable
import scala.scalajs.js
import scala.scalajs.js.UndefOr
@js.native
@injectable("$exceptionHandler")
trait ExceptionHandler extends js.Function2[js.Error, UndefOr[String], Unit] {
override def apply(exception: js.Error, cause: Und... | greencatsoft/scalajs-angular | src/main/scala/com/greencatsoft/angularjs/core/ExceptionHandler.scala | Scala | apache-2.0 | 354 |
/*
* Copyright 2014 The SIRIS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | simulator-x/core | src/simx/core/svaractor/semantictrait/base/Relation.scala | Scala | apache-2.0 | 1,805 |
/*
* 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 ... | maropu/hivemall-spark | src/test/scala/hivemall/tools/RegressionDatagenSuite.scala | Scala | apache-2.0 | 1,145 |
package com.norbitltd.spoiwo.model.enums
object Underline {
private[model] lazy val Undefined = Underline("Undefined")
lazy val Double = Underline("Double")
lazy val DoubleAccounting = Underline("DoubleAccounting")
lazy val None = Underline("None")
lazy val Single = Underline("Single")
lazy val SingleAcco... | intracer/spoiwo | src/main/scala/com/norbitltd/spoiwo/model/enums/Underline.scala | Scala | mit | 446 |
package controllers
import scala.Option.option2Iterable
import org.fusesource.scalate.TemplateEngine
import org.fusesource.scalate.util.FileResourceLoader
import play.api.Play
import play.api.Play.current
object ScalateTemplate {
import org.fusesource.scalate._
import org.fusesource.scalate.util._
lazy v... | philogb/es-browser | app/controllers/ScalateTemplate.scala | Scala | mit | 957 |
package scala.pickling.c.x.any.json
import org.scalatest.FunSuite
import scala.pickling._, scala.pickling.Defaults._, json._
case class C(x: Any)
class AnyInsideCaseClassJsonTest extends FunSuite {
test("main") {
val c = new C(2)
val pckl = c.pickle
assert(pckl.toString === """
|JSONPickle({
... | scala/pickling | core/src/test/scala/scala/pickling/runtime/AnyInsideCaseClassJsonTest.scala | Scala | bsd-3-clause | 526 |
import sbt._
import Defaults._
import sbtrelease._
import sbtrelease.ReleasePlugin._
import sbtrelease.ReleasePlugin.ReleaseKeys._
import com.typesafe.sbt.pgp.PgpKeys._
import sbtrelease.ReleaseStateTransformations._
object common {
lazy val signedReleaseSettings = releaseSettings ++ Seq(
releaseProcess ~= {
... | ltrzesniewski/bfg-repo-cleaner | project/common.scala | Scala | gpl-3.0 | 886 |
// The purpose of this file is to implement the workaround to an SBT issue
// It is decribed here: https://github.com/eligosource/eventsourced/wiki/Installation#native
import sbt._
import Keys._
object MyBuild extends Build {
lazy val myProject = Project(
id = "myProject",
base = file("."),
settings = ... | christopherwharrop/chiltepin | project/Build.scala | Scala | apache-2.0 | 1,137 |
/*
* Copyright ActionML, LLC under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* ActionML licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except... | actionml/harness | rest-server/core/src/main/scala/com/actionml/core/search/elasticsearch/WriteToEsSupport.scala | Scala | apache-2.0 | 1,086 |
package org.rebeam.boxes.core.op
//
//import org.rebeam.boxes.core._
//
//import scala.math.{min, max}
//import scala.collection.mutable.ListBuffer
//
//object ListOp {
//
// //TODO must be a better way to do this...
// def swap[T](list: Vector[T], firstI: Int, up: Boolean) = {
// val secondI = firstI + (if(up) -1... | trepidacious/boxes-core | src/main/scala/org/rebeam/boxes/core/op/ListOp.scala | Scala | gpl-2.0 | 3,767 |
package com.twitter.inject.app
import com.google.inject.{Module, Stage}
import com.twitter.app.Flag
import com.twitter.inject.Injector
import com.twitter.inject.app.internal.InstalledModules
object TestInjector {
/* Public */
def apply(modules: Module*): Injector = {
apply(modules = modules)
}
def appl... | syamantm/finatra | inject/inject-app/src/test/scala/com/twitter/inject/app/TestInjector.scala | Scala | apache-2.0 | 1,855 |
/*
* Copyright (c) 2011, The Broad Institute
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, pu... | iontorrent/Torrent-Variant-Caller-stable | public/scala/src/org/broadinstitute/sting/queue/engine/CommandLineJobManager.scala | Scala | mit | 1,440 |
/*
* 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 ... | chuckchen/spark | sql/core/src/main/scala/org/apache/spark/sql/jdbc/MySQLDialect.scala | Scala | apache-2.0 | 4,223 |
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.