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 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... | wzhongyuan/BigDL | spark/dl/src/main/scala/com/intel/analytics/bigdl/models/resnet/TrainImageNet.scala | Scala | apache-2.0 | 6,324 |
/*
* Copyright 2015 Kamil Gorlo
*
* 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 la... | syoummer/SpatialSpark | src/test/scala/spatialspark/join/GeometryFixtures.scala | Scala | apache-2.0 | 2,060 |
package qrhl.tactic
import qrhl._
import qrhl.isabellex.RichTerm
import qrhl.logic.Block
import de.unruh.isabelle.mlvalue.Implicits._
import de.unruh.isabelle.pure.Implicits._
import de.unruh.isabelle.pure.Term
import hashedcomputation.{Hash, HashTag, Hashable}
import hashedcomputation.Implicits._
/*@deprecated("Use ... | dominique-unruh/qrhl-tool | src/main/scala/qrhl/tactic/SeqTac.scala | Scala | mit | 2,536 |
package org.msgpack.value.holder
import org.msgpack.core.MessagePackSpec
/**
*
*/
class FloatHolderTest extends MessagePackSpec {
"FloatHolder" should {
"display value in an appropriate format" in {
val h = new FloatHolder
val f = 0.1341f
h.setFloat(f)
h.toString shouldBe java.lang.... | xerial/msgpack-java | msgpack-core/src/test/scala/org/msgpack/value/holder/FloatHolderTest.scala | Scala | apache-2.0 | 456 |
package circumflex
package core
import java.text.SimpleDateFormat
import java.util.Date
import java.io.Serializable
/*!# Key-value coercion
Trait `KeyValueCoercion` mixed into any key-value generic storage
(like `Map[String, Any]`) brings a bunch of methods for coercing
`Any`-typed values to common types.
The metho... | inca/circumflex | core/src/main/scala/kvc.scala | Scala | bsd-2-clause | 3,862 |
/*
* 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... | wzhongyuan/BigDL | spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/keras/Cropping2D.scala | Scala | apache-2.0 | 2,977 |
package me.jeffmay.neo4j.client
import scala.annotation.implicitNotFound
/**
* Defines how to print a given type.
*/
@implicitNotFound(
"No implicit Show[${T}] in scope. " +
"Please define a way to print this type as a string defining a Show instance.")
trait Show[T] {
/**
* Convert the value into a hu... | jeffmay/neo4j-scala-client | core/src/main/scala/me/jeffmay/neo4j/client/Show.scala | Scala | apache-2.0 | 1,274 |
package dotty.tools.dotc.transform
import dotty.tools.dotc.transform.TreeTransforms.{TransformerInfo, TreeTransform, TreeTransformer, MiniPhaseTransform}
import dotty.tools.dotc.ast.tpd
import dotty.tools.dotc.core.Contexts.Context
import scala.collection.mutable.ListBuffer
import dotty.tools.dotc.core.{Scopes, Flags}... | folone/dotty | src/dotty/tools/dotc/transform/CollectEntryPoints.scala | Scala | bsd-3-clause | 4,908 |
package com.twitter.finagle.zookeeper
import com.twitter.util.RandomSocket
import org.apache.zookeeper.server.{ NIOServerCnxnFactory, ZooKeeperServer }
import com.twitter.common.zookeeper.ZooKeeperClient
import org.apache.zookeeper.server.persistence.FileTxnSnapLog
import com.twitter.common.io.FileUtils.createTempDir
... | stevenrskelton/Blog | src/test/scala/com/twitter/finagle/zookeeper/ZkInstance.scala | Scala | apache-2.0 | 1,200 |
package com.datastax.spark.connector.sql
import java.util.TimeZone
import com.datastax.spark.connector.cluster.PSTCluster
import org.scalatest.FlatSpec
/**
* This should be executed in separate JVM, as Catalyst caches default time zone
*/
class CassandraDataFrameDatePSTSpec extends FlatSpec with CassandraDataFra... | datastax/spark-cassandra-connector | connector/src/it/scala/com/datastax/spark/connector/sql/CassandraDataFrameDatePSTSpec.scala | Scala | apache-2.0 | 488 |
/*
* La Trobe University - Distributed Deep Learning System
* Copyright 2014 Matthias Langer (t3l@threelights.de)
*
* 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.apa... | bashimao/ltudl | blaze/src/main/scala/edu/latrobe/blaze/Initializer.scala | Scala | apache-2.0 | 2,086 |
package scalaprops
import scalaz.std.tuple._
import scalaz.std.anyVal._
import ScalapropsScalaz._
object Tuple1Test extends Scalaprops {
val laws0 = Properties.list(
scalazlaws.order.all[Tuple1[Byte]],
scalazlaws.monoid.all[Tuple1[Byte]]
)
val laws1 = Properties.list(
scalazlaws.traverse.all[Tuple1... | scalaprops/scalaprops | scalaz/src/test/scala/scalaprops/Tuple1Test.scala | Scala | mit | 398 |
package com.overviewdocs.blobstorage
import com.amazonaws.AmazonClientException
import com.amazonaws.services.s3.AmazonS3
import com.amazonaws.services.s3.model.{AmazonS3Exception,DeleteObjectsRequest,GeneratePresignedUrlRequest,MultiObjectDeleteException,ObjectMetadata}
import com.amazonaws.services.s3.transfer.{Down... | overview/overview-server | common/src/test/scala/com/overviewdocs/blobstorage/S3StrategySpec.scala | Scala | agpl-3.0 | 10,924 |
/*
* 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 ... | jlopezmalla/spark | repl/scala-2.11/src/main/scala/org/apache/spark/repl/Main.scala | Scala | apache-2.0 | 4,651 |
package org.higherstate.jameson.extractors
import org.higherstate.jameson.parsers.Parser
import org.higherstate.jameson.Path
import org.higherstate.jameson.failures.Valid
trait Extractor[U,+T] extends Parser[T] {
def apply(value:U, path:Path):Valid[T]
}
| HigherState/jameson | src/main/scala/org/higherstate/jameson/extractors/Extractor.scala | Scala | apache-2.0 | 259 |
package functionalops
import scalaz._
import Scalaz._
trait Instances extends Classes {
// TODO Define default/package level typeclass instances here
}
| functionalops/procfs-scala | src/main/scala/functionalops/instances.scala | Scala | bsd-3-clause | 156 |
/**
* 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... | piavlo/operations-debs-kafka | core/src/test/scala/unit/kafka/message/CompressionUtilsTest.scala | Scala | apache-2.0 | 2,771 |
package com.spark
import org.apache.spark._
object WordCount {
def main(args: Array[String]) {
val master = args.length match {
case x: Int if x > 0 => args(0)
case _ => "local[2]"
}
val conf = new SparkConf().setAppName("WordCount").setMaster(master)
val sc = new SparkContext(conf)
... | bigcatpan/spark-project | src/main/scala/com/spark/WordCount.scala | Scala | gpl-2.0 | 804 |
/*
* 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 | compiler/src/main/scala/com/asakusafw/spark/compiler/serializer/BroadcastIdSerializerClassBuilder.scala | Scala | apache-2.0 | 3,457 |
/*
* Copyright (c) 2012-2018 Broad Institute, Inc.
*
* This file is part of Pilon.
*
* Pilon is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
*
* Pilon is distributed in the hope that it will... | B-UMMI/INNUca | src/pilon_v1.23/pilon/src/main/scala/org/broadinstitute/pilon/GapFiller.scala | Scala | gpl-3.0 | 15,963 |
/**
* Copyright (c) 2002-2012 "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 Foundati... | dksaputra/community | cypher/src/test/scala/org/neo4j/cypher/ErrorMessagesTest.scala | Scala | gpl-3.0 | 8,244 |
package com.nulabinc.backlog.r2b.redmine.service
import com.taskadapter.redmineapi.bean.News
/**
* @author uchida
*/
trait NewsService {
def allNews(): Seq[News]
}
| nulab/BacklogMigration-Redmine | redmine/src/main/scala/com/nulabinc/backlog/r2b/redmine/service/NewsService.scala | Scala | mit | 174 |
package com.criteo.vizatra.vizsql.hive
import com.criteo.vizatra.vizsql.{Column, Type}
case class HiveArray(elem: Type) extends Type {
val nullable = true
def withNullable(nullable: Boolean) = this
def canBeCastTo(other: Type) = this == other
def show = s"array<${elem.show}>"
}
case class HiveStruct(elems... | criteo/vizsql | shared/src/main/scala/com/criteo/vizatra/vizsql/dialects/hive/HiveTypes.scala | Scala | apache-2.0 | 1,031 |
package org.sparkpipe.test.util
import java.io.File
private[test] trait Base {
val RESOLVER = "path-resolver"
val / = File.separator
val `:` = File.pathSeparator
var path: String = ""
/** returns raw path of the folder where it finds resolver */
private def getRawPath(): String = {
i... | sadikovi/sparkpipe | src/test/scala/org/sparkpipe/test/util/Base.scala | Scala | mit | 1,219 |
/*
* 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-charts/src/main/scala/io/gatling/charts/template/ConsoleTemplate.scala | Scala | apache-2.0 | 3,288 |
package cmwell.analytics.main
import akka.actor.ActorSystem
import akka.stream.ActorMaterializer
import cmwell.analytics.data.{DataWriterFactory, IndexWithCompleteDocument}
import cmwell.analytics.downloader.PartitionedDownloader
import cmwell.analytics.util.{DiscoverEsTopology, FindContactPoints}
import org.apache.lo... | dudi3001/CM-Well | tools/dataConsistencyTool/extract-index-from-es/src/main/scala/cmwell/analytics/main/CopyIndex.scala | Scala | apache-2.0 | 2,674 |
package scala.reflect.quasiquotes
import org.scalacheck._, Prop._, Gen._, Arbitrary._
import scala.reflect.runtime.universe._
@annotation.nowarn("cat=deprecation")
object DeprecationProps extends QuasiquoteProperties("deprecation") {
val tname = TypeName("Foo")
val tpt = tq"Foo"
val tpe = typeOf[Int]
val sym ... | scala/scala | test/scalacheck/scala/reflect/quasiquotes/DeprecationProps.scala | Scala | apache-2.0 | 1,559 |
/*
* 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 ... | akopich/spark | core/src/main/scala/org/apache/spark/api/python/PythonUtils.scala | Scala | apache-2.0 | 2,565 |
/*
* 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 ... | SparklineData/spark-datetime | src/main/scala/org/sparklinedata/spark/dateTime/Utils.scala | Scala | apache-2.0 | 1,212 |
package org.randi3.edc.model.openClinica
case class EventOC (val oid: String, val forms: List[FormOC]){
} | dschrimpf/randi3-edc | src/main/scala/org/randi3/edc/model/openClinica/EventOC.scala | Scala | gpl-3.0 | 108 |
package com.shocktrade.server.dao.contest
import com.shocktrade.common.models.contest._
import io.scalajs.npm.mongodb.ObjectID
import scala.scalajs.js
/**
* Portfolio Data model for the Qualification Engine
* @author Lawrence Daniels <lawrence.daniels@gmail.com>
*/
class PortfolioData(var _id: js.UndefOr[Objec... | ldaniels528/shocktrade.js | app/server/dao/src/main/scala/com/shocktrade/server/dao/contest/PortfolioData.scala | Scala | apache-2.0 | 2,043 |
package intellij.haskell.navigation
import java.util
import com.intellij.codeInsight.TargetElementUtil
import com.intellij.psi.{PsiElement, PsiReference}
import intellij.haskell.external.component.NoInfoAvailable
import intellij.haskell.util.HaskellEditorUtil
import scala.collection.mutable.ListBuffer
import scala.j... | rikvdkleij/intellij-haskell | src/main/scala/intellij/haskell/navigation/HaskellTargetElementUtil.scala | Scala | apache-2.0 | 1,306 |
package slick.util
import scala.collection.mutable.ArrayBuffer
import LogUtil._
/** Utility methods for creating result set debug output. */
class TableDump(maxColumnWidth: Int = 20) {
protected[this] val box: IndexedSeq[String] =
(if(GlobalConfig.unicodeDump) "\\u2501\\u250f\\u2533\\u2513\\u2523\\u254b\\u252b\... | slick/slick | slick/src/main/scala/slick/util/TableDump.scala | Scala | bsd-2-clause | 2,747 |
package jp.t2v.lab.play2.auth.social.providers.github
import jp.t2v.lab.play2.auth.social.core.OAuth2Controller
import jp.t2v.lab.play2.auth.{ AuthConfig, Login, OptionalAuthElement }
trait GitHubController extends OAuth2Controller
with AuthConfig
with OptionalAuthElement
with Login {
val authenticator... | kuenzaa/play2-auth | social/src/main/scala/jp/t2v/lab/play2/auth/social/providers/github/GitHubController.scala | Scala | apache-2.0 | 349 |
package com.twitter.finagle.stats
import scala.collection.JavaConverters._
import org.scalatest.funsuite.AnyFunSuite
class StatsFormatterTest extends AnyFunSuite {
private[this] def newMetrics(): Metrics =
Metrics.createDetached(mkHistogram = ImmediateMetricsHistogram.apply _, separator = "/")
private val m... | twitter/finagle | finagle-stats-core/src/test/scala/com/twitter/finagle/stats/StatsFormatterTest.scala | Scala | apache-2.0 | 2,716 |
/* *\\
** Squants **
** **
** Scala Quantities and Units of Measure Library and DSL **
** (c) 2013-2015, G... | derekmorr/squants | shared/src/test/scala/squants/experimental/package.scala | Scala | apache-2.0 | 1,322 |
/*
* 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... | dotty-staging/scalatest | scalatest-test/src/test/scala/org/scalatest/concurrent/ScaledTimeSpansSpec.scala | Scala | apache-2.0 | 1,551 |
package controllers.admin
import actor.ActorUtils
import actor.salt._
import controllers.BaseController
import enums.{ModEnum, RoleEnum}
import exceptions.UniqueNameException
import models.conf.{Area, AreaEnvironmentRelHelper, AreaHelper, AreaInfo}
import play.api.data.Forms._
import play.api.data._
import play.api.li... | fengshao0907/bugatti | app/controllers/admin/AreaController.scala | Scala | bsd-2-clause | 2,961 |
/*
* 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... | bpburns/spark-kernel | kernel/src/test/scala/com/ibm/spark/magic/builtin/HtmlSpec.scala | Scala | apache-2.0 | 1,590 |
/**
* Copyright (C) 2010-2011 LShift 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.0
*
* Unless required by applicable law... | aprescott/diffa | kernel/src/test/scala/net/lshift/diffa/kernel/differencing/AbstractPolicyTest.scala | Scala | apache-2.0 | 18,148 |
package org.andemi.bibit
import scala.collection.mutable
import scala.math.pow
/**
* Bibit Algorithm
**/
trait BibitAlg {
type DataSeq = mutable.ArraySeq[Int]
val DataSeq = mutable.ArraySeq
case class Positions(p3: Int, p2: Int, p1: Int, p0: Int)
case class SubPyramid(number: Int, level: Int, position... | andemi/bibit | src/main/scala/org/andemi/bibit/BibitAlg.scala | Scala | mit | 9,233 |
package fpinscala.iomonad
import Future._
object FutureTest extends App {
val N = 100000
def worstCaseScenario1 =
(0 to N).map(i => Future(i)).foldLeft(Future(0)) {
(f1,f2) => for {
acc <- f1
i <- f2
} yield (acc + i)
}
def worstCaseScenario1a =
(0 to N).map(i => Throw.mo... | fpinscala-muc/fpinscala-LithiumTD | answers/src/main/scala/fpinscala/iomonad/FutureTest.scala | Scala | mit | 1,485 |
package thangiee.riotapi.stats
case class ChampionStats(id: Int = 0, stats: AggregatedStats = AggregatedStats()) | Thangiee/Riot-API-Scala | src/main/scala/thangiee/riotapi/stats/ChampionStats.scala | Scala | mit | 113 |
package se.stagehand.controls
import scala.swing.BorderPanel
import se.stagehand.swing.lib.ScriptGUI
import se.stagehand.swing.player.PlayerScriptNode
import scala.swing.FlowPanel
import scala.swing.CheckBox
import scala.swing.Label
import se.stagehand.swing.gui.PopupMenu
import scala.swing.MenuItem
import scala.swing... | evilcandybag/Stagehand-controls | src/main/scala/se/stagehand/controls/TargetGroupGUI.scala | Scala | gpl-2.0 | 3,706 |
package sorm.reflection
import reflect.runtime.universe._
import sext._, embrace._
import reflect.runtime.currentMirror
import ScalaApi._
object `package` {
implicit class AnyReflected
[ T : TypeTag ]
( any : T )
{
def reflected
= new Reflected( any, Reflection( typeTag[T] ) )
}
im... | sorm/sorm | src/main/scala/sorm/reflection/package.scala | Scala | mit | 1,130 |
/*
* Copyright (c) 2017 Snowplow Analytics Ltd. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache License Version 2.0.
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org... | Propertyfinder/snowplow | 4-storage/rdb-loader/project/Dependencies.scala | Scala | apache-2.0 | 3,088 |
/**
* Licensed to the Minutemen Group under one or more contributor license
* agreements. See the COPYRIGHT file distributed with this work for
* additional information regarding copyright ownership.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in complian... | datalek/silhouette | silhouette/src/main/scala/silhouette/crypto/Crypter.scala | Scala | apache-2.0 | 1,454 |
/**
* Orders
* Service for processing orders
*
* OpenAPI spec version:
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed under the Apache License, Version 2.0 (the "Lic... | Compositional/orders-aws | src/main/scala/works.weave.socks.aws.orders/presentation/value/OrderCard.scala | Scala | apache-2.0 | 963 |
package spinoco.protocol.mime
import scodec.bits.BitVector
import scodec.{Attempt, Codec, DecodeResult, Err}
import spinoco.protocol.mime.MediaType._
sealed trait MediaType { self =>
def mainType: String = self match {
case DefaultMediaType(mainType, _, _, _, _) => mainType
case _:MultipartMediaType => "... | Spinoco/protocol | mime/src/main/scala/spinoco/protocol/mime/MediaType.scala | Scala | mit | 25,622 |
/*
* 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... | pbrant/framework | persistence/mongodb-record/src/test/scala/net/liftweb/mongodb/record/CustomSerializersSpec.scala | Scala | apache-2.0 | 12,583 |
package com.stefansavev.randomprojections.evaluation
import com.stefansavev.similaritysearch.{SimilaritySearchQueryResults, SimilaritySearchResults}
import com.stefansavev.randomprojections.implementation.{OnlineVariance, KNNS}
import com.stefansavev.randomprojections.utils.Utils
object RecallEvaluator{
class Recal... | stefansavev/random-projections-at-berlinbuzzwords | src/main/scala/com/stefansavev/randomprojections/evaluation/Recall.scala | Scala | apache-2.0 | 4,266 |
package com.github.mdr.mash.evaluator
object Attributes {
val Alias = "alias"
val Private = "private"
val Flag = "flag"
val Lazy = "lazy"
val Args = "args"
val NamedArgs = "namedArgs"
val ShortFlag = "shortFlag"
val AtLeastOne = "atLeastOne"
val Flatten = "flatten"
val Safe = "safe"
}
| mdr/mash | src/main/scala/com/github/mdr/mash/evaluator/Attributes.scala | Scala | mit | 309 |
/*
* Copyright 2017 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | liquidarmour/ct-calculations | src/test/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/AC16Spec.scala | Scala | apache-2.0 | 1,058 |
/* __ *\\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\\___/_/... | rorygraves/perf_tester | corpus/scala-library/src/main/scala/collection/immutable/ListMap.scala | Scala | apache-2.0 | 5,946 |
/*
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... | sengt/summingbird-batch | summingbird-scalding/src/test/scala/com/twitter/summingbird/scalding/IteratorSumLaws.scala | Scala | apache-2.0 | 2,136 |
/**
* 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 prog... | martinluther/orbeon-forms | src/main/scala/org/orbeon/oxf/fb/DataModel.scala | Scala | lgpl-2.1 | 5,405 |
package statsfc.client.uri
import core.statsapi.Competition
trait CommonParamsStatsApiUri extends StatsApiUri {
def competition = Competition.PremierLeague
def year = "2013/2014"
uri = uri + s"&competition=$competition&year=$year"
}
| rajit/statsfc-pagerank | src/main/scala/statsfc/client/uri/CommonParamsStatsApiUri.scala | Scala | apache-2.0 | 241 |
/*
* Copyright 2016-2017 Chris de Vreeze
*
* 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... | dvreeze/tqa-workshop | src/test/scala/eu/cdevreeze/tqaworkshop/chapter5/TqaQueryApiUsageSpec.scala | Scala | apache-2.0 | 23,565 |
package jadecrawler.website
import org.slf4j.LoggerFactory
import org.slf4j.Logger
import org.scalatest.junit.JUnitRunner
import org.scalatest.FunSuite
import org.junit.runner.RunWith
import jadeutils.common.Logging
import java.util.Properties
@RunWith(classOf[JUnitRunner])
class OpenWeatherTest extends FunSuite w... | Jade-Shan/Jade-crawler | crawler-logic/src/test/scala/website/OpenWeatherTest.scala | Scala | gpl-3.0 | 623 |
package io.skysail.app.demo
import akka.actor.ActorRef
import io.skysail.core.resources.AsyncListResource
import io.skysail.core.resources.AsyncPostResource
import akka.actor.Props
import io.skysail.core.app.SkysailApplication
import io.skysail.core.server.actors.ApplicationActor
import akka.pattern.ask
import io.skys... | evandor/skysail-core | skysail.app.demo/src/io/skysail/app/demo/contactsResources.scala | Scala | apache-2.0 | 2,242 |
/*
* The MIT License (MIT)
* <p>
* Copyright (c) 2018
* <p>
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy... | amannocci/streamy | plugin-tcp/src/test/scala/io/techcode/streamy/tcp/component/TcpSinkSpec.scala | Scala | mit | 5,897 |
/*
* 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 ... | regadas/scio | scio-core/src/main/scala/com/spotify/scio/values/SCollectionWithHotKeyFanout.scala | Scala | apache-2.0 | 5,113 |
/*
* 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... | dotty-staging/scalatest | scalatest-test/src/test/scala/org/scalatest/events/LocationMethodSuiteProp.scala | Scala | apache-2.0 | 3,369 |
package nsmc.rdd
import com.mongodb.DBObject
import nsmc.Logging
import org.apache.spark.rdd.RDD
import org.apache.spark.{Partition, SparkContext, TaskContext}
import scala.language.existentials
// For use only in creating an RDD to return for SQL integration
class SQLMongoRDD private[nsmc] (@transient sc: SparkCont... | shotishu/spark-mongodb-connector | src/main/scala/nsmc/rdd/SQLMongoRDD.scala | Scala | apache-2.0 | 1,909 |
package dotty.tools
package dotc
package parsing
object showTree extends DeSugarTest {
import dotty.tools.dotc.ast.untpd._
def test(arg: String) = {
val tree: Tree = parse(arg)
println("result = " + tree.show)
println("desugared = " + DeSugar.transform(tree).show)
}
def main(args: Array[String... | dotty-staging/dotty | compiler/test/dotty/tools/dotc/parsing/showTree.scala | Scala | apache-2.0 | 421 |
package com.rikmuld.camping
import com.rikmuld.camping.CampingMod._
import net.minecraft.util.text.TextComponentString
import net.minecraftforge.fml.common.Mod
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent
import net.mine... | Rikmuld/MC-Camping | scala/com/rikmuld/camping/EventsClient.scala | Scala | gpl-3.0 | 922 |
/**
* Licensed to Big Data Genomics (BDG) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The BDG licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use ... | bikash/guacamole | src/main/scala/org/hammerlab/guacamole/reads/Read.scala | Scala | apache-2.0 | 15,414 |
package assigner.search
import assigner.model._
import org.coinor.opents._
import scala.collection.{SortedSet, SortedMap}
/**
* An assignment of students to groups that represents a valid solution.
* @param studentMap [[Map]] of [[Long]] -> [[Long]]
* @param groupMap [[Map]] of [[Long]] to students in that group... | joroKr21/IoS-Algorithm | src/main/scala/assigner/search/Assignment.scala | Scala | mit | 1,506 |
/***********************************************************************
* 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 ... | nagavallia/geomesa | geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/data/stats/StatsCombiner.scala | Scala | apache-2.0 | 2,787 |
/*
* 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 ... | wangyixiaohuihui/spark2-annotation | core/src/test/scala/org/apache/spark/deploy/history/FsHistoryProviderSuite.scala | Scala | apache-2.0 | 24,073 |
/*
* Copyright 2016 Carlo Micieli
*
* 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 t... | CarloMicieli/hascalator | core/src/main/scala/io/hascalator/data/PairingHeap.scala | Scala | apache-2.0 | 2,682 |
/*
* Copyright 2012 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/helper/TextureData.scala | Scala | apache-2.0 | 3,806 |
/* sbt -- Simple Build Tool
* Copyright 2010 Mark Harrah
*/
package xsbt.api
import xsbti.api.{Path => APath, _}
import Discovery._
class Discovery(baseClasses: Set[String], annotations: Set[String])
{
def apply(s: Seq[Definition]): Seq[(Definition, Discovered)] =
s.map { d => (d, apply(d)) }
def apply(d: Def... | olove/xsbt | compile/api/src/main/scala/xsbt/api/Discovery.scala | Scala | bsd-3-clause | 3,939 |
/**
* 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... | zzwlstarby/mykafka | core/src/main/scala/kafka/log/LogManager.scala | Scala | apache-2.0 | 29,727 |
package lila.team
import org.joda.time.DateTime
import scala.util.chaining._
import lila.user.User
import org.joda.time.Days
case class Team(
_id: Team.ID, // also the url slug
name: String,
password: Option[String],
description: String,
descPrivate: Option[String],
nbMembers: Int,
enable... | luanlv/lila | modules/team/src/main/Team.scala | Scala | mit | 2,916 |
/*
* 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 ... | wangyixiaohuihui/spark2-annotation | mllib/src/test/scala/org/apache/spark/ml/feature/StringIndexerSuite.scala | Scala | apache-2.0 | 10,841 |
/**
* Licensed to Big Data Genomics (BDG) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The BDG licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use ... | allenday/avocado | avocado-core/src/main/scala/org/bdgenomics/avocado/preprocessing/PreprocessingStage.scala | Scala | apache-2.0 | 1,510 |
/**
* This file is part of the TA Buddy project.
* Copyright (c) 2014 Alexey Aksenov ezh@ezh.msk.ru
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Global License version 3
* as published by the Free Software Foundation with the addition of t... | digimead/digi-TABuddy-desktop | part-logic/src/main/scala/org/digimead/tabuddy/desktop/logic/ui/support/signature/SimpleSignatureAdapter.scala | Scala | agpl-3.0 | 3,154 |
package rexstream
/**
* Created by GregRos on 04/06/2016.
*/
trait RexTypeInfo {
val rexType : String
val isLazy : Boolean
}
| GregRos/Rexstream | ScalaFBL/src/rexstream/RexTypeInfo.scala | Scala | mit | 138 |
/*
* Copyright (C) 2020 MapRoulette contributors (see CONTRIBUTORS.md).
* Licensed under the Apache License, Version 2.0 (see LICENSE).
*/
package org.maproulette.provider
import java.net.URLEncoder
import javax.inject.{Inject, Singleton}
import org.apache.commons.lang3.StringUtils
import org.joda.time.DateTime
im... | mgcuthbert/maproulette2 | app/org/maproulette/provider/KeepRightProvider.scala | Scala | apache-2.0 | 10,147 |
package bad.robot.temperature
import bad.robot.temperature.rrd._
import bad.robot.temperature.rrd.Seconds.now
import scala.concurrent.duration.Duration
case class XmlExport(period: Duration)(implicit hosts: List[Host]) extends Runnable {
def run(): Unit = {
val currentTime = now()
val xml = Xml(currentTime... | tobyweston/temperature-machine | src/main/scala/bad/robot/temperature/XmlExport.scala | Scala | apache-2.0 | 404 |
package org.bitcoins.core.protocol.ln
import java.nio.charset.Charset
import org.bitcoins.core.config.{MainNet, NetworkParameters}
import org.bitcoins.core.crypto.{Sha256Digest, Sha256Hash160Digest}
import org.bitcoins.core.number.{UInt32, UInt5, UInt8}
import org.bitcoins.core.protocol._
import org.bitcoins.core.pro... | bitcoin-s/bitcoin-s-core | core/src/main/scala/org/bitcoins/core/protocol/ln/LnTags.scala | Scala | mit | 8,441 |
package io.finch.endpoint
import cats.Id
import cats.data.NonEmptyList
import cats.effect.Sync
import io.finch._
import scala.reflect.ClassTag
private[finch] abstract class Param[F[_], G[_], A](name: String)(implicit
d: DecodeEntity[A],
tag: ClassTag[A],
protected val F: Sync[F]
) extends Endpoint[F, G[A]] { se... | ImLiar/finch | core/src/main/scala/io/finch/endpoint/param.scala | Scala | apache-2.0 | 3,131 |
package org.jetbrains.plugins.scala.lang.psi.types.api.presentation
import org.apache.commons.lang.StringEscapeUtils
trait TextEscaper {
def escape(text: String): String
}
object TextEscaper {
object Html extends TextEscaper {
override def escape(text: String): String = StringEscapeUtils.escapeHtml(text)
}... | JetBrains/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/types/api/presentation/TextEscaper.scala | Scala | apache-2.0 | 415 |
/***********************************************************************
* 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 ... | spandanagrawal/geomesa | geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/collection/CloseableIterator.scala | Scala | apache-2.0 | 6,361 |
package poxelcoll.geometry.convexccwpolygon
/* Copyright (C) 2012 Jens W.-Møller
* All rights reserved.
*
* This file is part of Poxelcoll.
*
* Poxelcoll is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation,... | Poxelcoll/Poxelcoll | Scala/src/main/scala/src/poxelcoll/geometry/convexccwpolygon/GeneralFunctions.scala | Scala | gpl-3.0 | 8,926 |
package scalagen.actor
import akka.actor.ActorSystem
import akka.testkit.{TestActorRef, ImplicitSender, TestKit}
import org.scalatest.WordSpecLike
import scalagen.message.{GenomeRead, ReadGenom}
import utils.StopSystemAfterAll
import utils.SampleActors.SampleGenome
class PhenotypeActorTest extends TestKit(ActorSystem... | ppiotrow/scalagen | scalagen-core/src/test/scala/scalagen/actor/PhenotypeActorTest.scala | Scala | apache-2.0 | 705 |
/*
* 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 ... | WindCanDie/spark | resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/BasicTestsSuite.scala | Scala | apache-2.0 | 4,283 |
package org.elihw.manager.actor
import akka.actor.{Props, Actor}
import org.elihw.manager.mail.{BrokerHeartMail, RegisterMail}
import akka.pattern.ask
import akka.actor.Status.Status
import akka.util.Timeout
import scala.concurrent.duration._
/**
* User: biandi
* Date: 13-11-22
* Time: 下午5:21
*/
class BrokerRoute... | netcomm/elihw | manager/src/main/scala/org/elihw/manager/actor/BrokerRouter.scala | Scala | apache-2.0 | 523 |
/*
This file is part of Overmind.
Overmind is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Overmind is distributed in the hope that it will... | martijnhoekstra/overmind | src/main/scala/overmind/GridRunner.scala | Scala | lgpl-3.0 | 1,368 |
/*
* 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 ... | lincoln-lil/flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/batch/BatchPhysicalSortAggregate.scala | Scala | apache-2.0 | 6,783 |
/*
* PerformanceTest.scala
* Tag for example tests.
*
* Created By: Avi Pfeffer (apfeffer@cra.com)
* Creation Date: Jan 1, 2009
*
* Copyright 2013 Avrom J. Pfeffer and Charles River Analytics, Inc.
* See http://www.cra.com or email figaro@cra.com for information.
*
* See http://www.github.com/p2t2/... | wkretschmer/figaro | Figaro/src/test/scala/com/cra/figaro/test/PerformanceTest.scala | Scala | bsd-3-clause | 477 |
/*
* ____ ____ _____ ____ ___ ____
* | _ \\ | _ \\ | ____| / ___| / _/ / ___| Precog (R)
* | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data
* | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, In... | precog/platform | mimir/src/test/scala/com/precog/mimir/JobQueryLoggerSpec.scala | Scala | agpl-3.0 | 3,208 |
package dtc.instances
import java.time._
import dtc._
object zonedDateTime {
/**
* This instance uses relaxed time value equality, as described in `ZonedDateTime#isEqual` method.
*
* Time values are equal when underlying instants are equal. Even if they have different time zones.
*/
implicit val... | vpavkin/dtc | core/jvm/src/main/scala/dtc/instances/zonedDateTime.scala | Scala | apache-2.0 | 1,595 |
package io.scalajs.npm.mongodb
import scala.scalajs.js
/**
* Text Search Options
* @author lawrence.daniels@gmail.com
*/
class TextSearchOptions(var $search: js.UndefOr[String] = js.undefined,
var $language: js.UndefOr[String] = js.undefined,
var $caseSensitive:... | scalajs-io/mongodb | src/main/scala/io/scalajs/npm/mongodb/TextSearchOptions.scala | Scala | apache-2.0 | 460 |
/*
* Copyright 2014 websudos 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.0
*
* Unless required by applicable law or agreed to i... | zarthross/reactiveneo | reactiveneo-dsl/src/main/scala/com/websudos/reactiveneo/dsl/DefaultImports.scala | Scala | gpl-2.0 | 1,044 |
package com.softwaremill.mqperf.mq
import java.net.InetSocketAddress
import java.util.UUID
import java.util.concurrent.ConcurrentLinkedQueue
import akka.actor.Status.Failure
import akka.actor.{Actor, ActorLogging, ActorRef, ActorSystem, FSM, Props, Terminated}
import com.softwaremill.mqperf.config.TestConfig
import e... | softwaremill/mqperf | src/main/scala/com/softwaremill/mqperf/mq/EventStoreMq.scala | Scala | apache-2.0 | 8,762 |
package org.scalatra
import org.scalatra.test.scalatest.ScalatraFunSuite
class RequestAttributesTest extends ScalatraFunSuite with AttributesTest {
addServlet(new AttributesServlet {
def attributesMap = request
}, "/*")
}
| xerial/skinny-micro | micro/src/test/scala/org/scalatra/RequestAttributesTest.scala | Scala | bsd-2-clause | 233 |
package intellij.haskell.module
import com.intellij.ide.actions.ImportModuleAction
import com.intellij.openapi.project.Project
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.projectImport.ProjectOpenProcessor
import com.intellij.util.ObjectUtils
import scala.jdk.CollectionConverters._
class StackPro... | rikvdkleij/intellij-haskell | src/main/scala/intellij/haskell/module/StackProjectOpenProcessor.scala | Scala | apache-2.0 | 1,306 |
package com.programmaticallyspeaking.ncd.nashorn
import com.programmaticallyspeaking.ncd.host.ScriptVersion
import com.sun.jdi.ReferenceType
import scala.util.Try
object VersionExtractor {
def extract(referenceType: ReferenceType): ScriptVersion =
extract(referenceType.name())
def extract(name: String): Scr... | provegard/ncdbg | src/main/scala/com/programmaticallyspeaking/ncd/nashorn/VersionExtractor.scala | Scala | bsd-3-clause | 931 |
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.