code stringlengths 5 1M | repo_name stringlengths 5 109 | path stringlengths 6 208 | language stringclasses 1
value | license stringclasses 15
values | size int64 5 1M |
|---|---|---|---|---|---|
package example
import java.sql.Timestamp
import org.apache.spark.sql.test._
import org.scalacheck.Arbitrary.arbitrary
import org.scalacheck.Gen._
import org.scalacheck.Prop.{exists, forAll}
import org.scalatest.FunSuite
import org.scalatest.prop.Checkers._
/**
* Created by jianshuang on 3/11/15.
*/
class ExampleT... | anand-singh/spark-sample-project | src/test/scala/ExampleTest.scala | Scala | apache-2.0 | 1,522 |
import com.amazonaws.services.{dynamodbv2 => aws}
import org.scalatest._
import org.slf4j._
import scala.util.Try
class DynamoDBV2Spec extends FlatSpec with Matchers {
behavior of "DynamoDB"
val log = LoggerFactory.getLogger(this.getClass)
val cond = DynamoDBCondition
it should "provide cool APIs for Hash ... | hirokikonishi/awscala | aws/dynamo/src/test/scala/DynamoDBV2Spec.scala | Scala | apache-2.0 | 24,800 |
package net.combinatory.rtm
import org.scalatest.FunSuite
class TaskTests extends FunSuite {
test("tasks") {
//pending
//Http runMethod (Methods.taskGetList, Nil)
}
}
| comb/rtm-scala | src/test/scala/TaskTests.scala | Scala | apache-2.0 | 182 |
/**
* This file is part of the TA Buddy project.
* Copyright (c) 2012-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... | digimead/digi-TABuddy-desktop | part-logic/src/main/scala/org/digimead/tabuddy/desktop/logic/operation/api/XOperationModifyElementTemplateList.scala | Scala | agpl-3.0 | 3,977 |
/* __ __ *\\
* / /____ ___ ____ ___ ___ _/ / lasius *
* / __/ -_) _ `/ _ \\/ _ \\/ _ `/ / contributed by tegonal *
* \\__/\\__/\\_, /\\___/_//_/\\_,_/_/ http://tegonal.com/ *
... | tegonal/lasius | app/controllers/LatestUserTimeBookingsController.scala | Scala | gpl-3.0 | 2,405 |
package org.example1_1.usage
import org.example1_1.declaration.{X, X4, X5, X6}
trait Usage3 {
val x: X = ???
val x4: X4 = ???
val x5: X5 = ???
val x6: X6 = ???
} | JetBrains/intellij-scala | scala/scala-impl/testdata/move/allInOne_1_MoveXYZ/before/org/example1_1/usage/Usage3.scala | Scala | apache-2.0 | 171 |
package io.neilord
import akka.actor.Props
import scala.reflect._
trait PropsProvider {
def getProps(args: Any*): Props
}
trait RealPropsProvider extends PropsProvider {
val ctag: ClassTag[_]
override def getProps(args: Any*) = {
Props(ctag.runtimeClass, args: _*)
}
} | NoOrdInaryGuy/akka-cereal | src/main/scala/io/neilord/PropsProvider.scala | Scala | apache-2.0 | 284 |
/*
* 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/typeclasses/Ordering.scala | Scala | apache-2.0 | 1,095 |
package frameless
import org.scalacheck.Prop
import org.scalacheck.Prop._
class AsTests extends TypedDatasetSuite {
test("as[X2[A, B]]") {
def prop[A, B](data: Vector[(A, B)])(
implicit
eab: TypedEncoder[(A, B)],
ex2: TypedEncoder[X2[A, B]]
): Prop = {
val dataset = TypedDataset.crea... | adelbertc/frameless | dataset/src/test/scala/frameless/AsTests.scala | Scala | apache-2.0 | 1,621 |
package org.jetbrains.plugins.scala
package lang
package psi
package api
package statements
import com.intellij.psi.PsiClass
import org.jetbrains.plugins.scala.lang.psi.api.base.types.ScTypeElement
import org.jetbrains.plugins.scala.lang.psi.api.statements.params.ScTypeParam
import org.jetbrains.plugins.scala.lang.psi... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/lang/psi/api/statements/ScTypeAliasDefinition.scala | Scala | apache-2.0 | 3,534 |
package com.malaska.spark.training.windowing.superbig
import org.apache.log4j.{Level, Logger}
import org.apache.spark.Partitioner
import org.apache.spark.sql.SparkSession
object SuperBigWindowing {
Logger.getLogger("org").setLevel(Level.OFF)
Logger.getLogger("akka").setLevel(Level.OFF)
def main(args: Array[St... | TedBear42/spark_training | src/main/scala/com/malaska/spark/training/windowing/superbig/SuperBigWindowing.scala | Scala | apache-2.0 | 1,475 |
package teststate.run
import japgolly.microlibs.name_fn._
import teststate.core.CoreExports._
import teststate.core.CoreExports2._
import teststate.core._
import teststate.data._
import teststate.typeclass._
sealed abstract class PlanLike[F[_], R, O, S, E, This] { self: This =>
type Self[FF[_], RR, OO, SS, EE]
/... | japgolly/test-state | core/shared/src/main/scala/teststate/run/Test.scala | Scala | apache-2.0 | 13,477 |
package com.themillhousegroup.arallon.traits
import com.themillhousegroup.arallon._
trait Serializing[TZ <: TimeZone] {
this: TimeInZone[TZ] =>
def serialize: String = TimeInZoneSerializing.serialize(this)
}
object TimeInZoneSerializing {
// There seems to be no way to express this just once: :-(
private va... | themillhousegroup/arallon | src/main/scala/com/themillhousegroup/arallon/traits/Serializing.scala | Scala | mit | 1,010 |
package auctionHouse
import akka.actor.ActorRef
sealed trait AuctionMessage
case class Start(var bidTimer: BidTimer) extends AuctionMessage
case class BidTimerExpired extends AuctionMessage
case class DeleteTimerExpired extends AuctionMessage
case class Bid(var bidAmount:Integer) extends AuctionMessage
case class Re... | s1mplex/AuctionHouse | src/main/scala/auctionHouse/Messages.scala | Scala | mit | 919 |
/*
* 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 | core/src/main/scala/org/apache/spark/util/collection/PrimitiveKeyOpenHashMap.scala | Scala | apache-2.0 | 4,081 |
package com.rasterfoundry.api.platform
import com.rasterfoundry.akkautil.PaginationDirectives
import com.rasterfoundry.akkautil.{
Authentication,
CommonHandlers,
UserErrorHandler
}
import com.rasterfoundry.api.utils.queryparams.QueryParametersCommon
import com.rasterfoundry.database.filter.Filterables._
import c... | raster-foundry/raster-foundry | app-backend/api/src/main/scala/platform/Routes.scala | Scala | apache-2.0 | 23,107 |
package scintuit.data.raw
import com.github.nscala_money.money.Imports._
import com.github.nscala_time.time.Imports._
/**
* Module for security info resources
*/
object security {
sealed trait SecurityInfo {
val assetClass: Option[String]
val fiAssetClass: Option[String]
val ticker: Option[String]
... | drbild/scintuit | data/src/main/scala/scintuit/data/raw/security.scala | Scala | apache-2.0 | 4,449 |
package slick.ast
import TypeUtil.typeToTypeUtil
import Util._
import slick.util.ConstArray
/** A SQL comprehension */
final case class Comprehension(sym: TermSymbol, from: Node, select: Node, where: Option[Node] = None,
groupBy: Option[Node] = None, orderBy: ConstArray[(Node, Ordering)... | bmclane/slick | slick/src/main/scala/slick/ast/Comprehension.scala | Scala | bsd-2-clause | 4,794 |
/*
* scala-bcp-rpc
* Copyright 2014 深圳岂凡网络有限公司 (Shenzhen QiFun Network Corp., 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... | qifun/scala-bcp-rpc | src/main/scala/com/qifun/bcp/rpc/IResponseHandler.scala | Scala | apache-2.0 | 1,067 |
/**
* 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... | prashantbh/kafka | core/src/main/scala/kafka/api/OffsetCommitRequest.scala | Scala | apache-2.0 | 7,380 |
package org.http4s
package headers
import org.http4s.parser.HttpHeaderParser
import org.http4s.util.{Renderer, Writer}
import scala.concurrent.duration.{FiniteDuration, _}
import scala.util.Try
object Age extends HeaderKey.Internal[Age] with HeaderKey.Singleton {
private class AgeImpl(age: Long) extends Age(age)
... | reactormonk/http4s | core/src/main/scala/org/http4s/headers/Age.scala | Scala | apache-2.0 | 1,369 |
/*
* 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 ... | rednaxelafx/apache-spark | core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala | Scala | apache-2.0 | 60,550 |
/*
Copyright (c) 2017, Qvantel
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following di... | qvantel/jsonapi-scala | akka/src/test/scala/com/qvantel/jsonapi/RelatedResponseAkkaSpec.scala | Scala | bsd-3-clause | 4,338 |
package org.jetbrains.plugins.scala
package codeInsight
package template
package impl
import org.jetbrains.plugins.scala.lang.psi.api.ScalaFile
/**
* @author Alefas
* @since 18/12/14.
*/
final class ScalaCodeContextType extends ScalaFileTemplateContextType.ElementContextType("CODE", ScalaCodeInsightBundle.messa... | JetBrains/intellij-scala | scala/codeInsight/src/org/jetbrains/plugins/scala/codeInsight/template/impl/ScalaCodeContextType.scala | Scala | apache-2.0 | 584 |
package com.wavesplatform.transaction.serialization.impl
import java.nio.ByteBuffer
import com.google.common.primitives.{Bytes, Longs}
import com.wavesplatform.serialization.{ByteBufferOps, Deser}
import com.wavesplatform.transaction.assets.IssueTransaction
import com.wavesplatform.transaction.{Proofs, TxVersion}
imp... | wavesplatform/Waves | node/src/main/scala/com/wavesplatform/transaction/serialization/impl/IssueTxSerializer.scala | Scala | mit | 3,474 |
package com.github.tminglei.slickpg
package array
import scala.reflect.ClassTag
import slick.ast.FieldSymbol
import slick.driver.{PostgresDriver, JdbcTypesComponent}
import slick.profile.RelationalProfile.ColumnOption.Length
import java.sql.{ResultSet, PreparedStatement}
trait PgArrayJdbcTypes extends JdbcTypesCompon... | frosforever/slick-pg | core/src/main/scala/com/github/tminglei/slickpg/array/PgArrayJdbcTypes.scala | Scala | bsd-2-clause | 5,888 |
package chandu0101.scalajs.react.components.demo.components.materialui.svgicons
import chandu0101.scalajs.react.components.materialui.MuiSvgIcon
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.all.svg._
import japgolly.scalajs.react.vdom.prefix_<^._
object ToggleStarBorder {
val component = Re... | coreyauger/scalajs-react-components | demo/src/main/scala/chandu0101/scalajs/react/components/demo/components/materialui/svgicons/ToggleStarBorder.scala | Scala | apache-2.0 | 681 |
package com.github.j5ik2o.forseti.domain.client
import com.github.j5ik2o.forseti.domain.support.EntityId
case class ClientSessionId(value: Long) extends EntityId
| j5ik2o/forseti | domain/src/main/scala/com/github/j5ik2o/forseti/domain/client/ClientSessionId.scala | Scala | mit | 164 |
package metal
package immutable
import scala.reflect.ClassTag
trait MapFactory extends generic.MapFactory {
type M[K, V] <: immutable.Map[K, V]
type MM[K, V] <: mutable.Map[K, V] { type Immutable <: M[K, V] }
def mutableFactory: mutable.MapFactory { type M[K, V] = MM[K, V]; type KExtra[K] = MapFactory.this.KE... | denisrosset/ptrcoll | library/src/main/scala/metal/immutable/MapFactory.scala | Scala | mit | 1,056 |
package org.sisioh.aws4s.sqs.model
import com.amazonaws.services.sqs.model._
import org.sisioh.aws4s.PimpedType
import scala.collection.JavaConverters._
object ChangeMessageVisibilityBatchRequestFactory {
def create(): ChangeMessageVisibilityBatchRequest = new ChangeMessageVisibilityBatchRequest()
def create(q... | everpeace/aws4s | aws4s-sqs/src/main/scala/org/sisioh/aws4s/sqs/model/RichChangeMessageVisibilityBatchRequest.scala | Scala | mit | 1,355 |
/**
* Copyright 2017 ZuInnoTe (Jörn Franke) <zuinnote@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless re... | ZuInnoTe/spark-hadoopcryptoledger-ds | src/it/scala/org/zuinnote/spark/bitcoin/block/SparkBitcoinBlockDSSparkMasterIntegrationSpec.scala | Scala | apache-2.0 | 52,301 |
package db.dao
import javax.inject.{Inject, Singleton}
import db.MyPostgresDriver
import db.Tables._
import play.api.db.slick.{DatabaseConfigProvider, HasDatabaseConfigProvider}
import scala.concurrent.{ExecutionContext, Future}
// TODO: Remove after beta
@Singleton
class PostgresBetaUserWhitelistDao @Inject() (pro... | trifectalabs/roadquality | api/app/db/dao/PostgresBetaUserWhitelistDao.scala | Scala | bsd-3-clause | 689 |
package com.twitter.finatra.test
import com.twitter.finagle.stats.InMemoryStatsReceiver
import org.scalatest.matchers.should.Matchers
object StatTestUtils extends Matchers {
def clear(statsReceiver: InMemoryStatsReceiver): Unit = {
statsReceiver.counters.clear()
statsReceiver.stats.clear()
statsReceive... | twitter/finatra | utils/src/test/scala/com/twitter/finatra/test/StatTestUtils.scala | Scala | apache-2.0 | 2,208 |
/* Copyright 2013 Nest 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 agreed to in writing... | mighdoll/sparkle | protocol/src/main/scala/nest/sparkle/time/server/Main.scala | Scala | apache-2.0 | 2,708 |
/*
* 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 ... | zohar-mizrahi/flink | flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/BatchTableEnvironment.scala | Scala | apache-2.0 | 14,409 |
package controllers
import models._
import scala.collection.mutable.ListBuffer
import util.control.Breaks._
/**
* Created by manuel on 31.05.2016.
*/
object PaperStats {
def getStats(papers: List[Papers], papersService: PapersService, paperResultService: PaperResultService,
answerService: Answ... | manuelroesch/PaperValidator | app/controllers/PaperStats.scala | Scala | mit | 2,851 |
package funsets
import org.scalatest.FunSuite
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
/**
* This class is a test suite for the methods in object FunSets. To run
* the test suite, you can either:
* - run the "test" command in the SBT console
* - right-click the file in eclipse an... | jeffreylloydbrown/classwork | FunctionalProgrammingWithScala/funsets/src/test/scala/funsets/FunSetSuite.scala | Scala | unlicense | 7,545 |
package com.lucidchart.open.cashy.controllers
import javax.inject.Inject
import com.lucidchart.open.cashy.request.AuthAction
import com.lucidchart.open.cashy.models.{AssetModel, Asset, FolderModel, Folder}
import com.lucidchart.open.cashy.views
import play.api.data._
import play.api.data.Forms._
import play.api.mvc.Ac... | lucidsoftware/cashy | app/com/lucidchart/open/cashy/controllers/SearchController.scala | Scala | apache-2.0 | 2,312 |
package io.buoyant.namerd.iface
import com.twitter.finagle.http.{MediaType, Request, Response}
import com.twitter.finagle.{Dtab, Service}
import com.twitter.util.Future
import io.buoyant.admin.names.DelegateApiHandler
import io.buoyant.namer.{Delegator, NamespacedInterpreterConfig, RichActivity}
case class DelegatorC... | denverwilliams/linkerd | interpreter/namerd/src/main/scala/io/buoyant/namerd/iface/NamerdHandler.scala | Scala | apache-2.0 | 1,636 |
package org.scalacheck.ops
import org.scalacheck.{Gen, Test}
import org.scalacheck.rng.Seed
import org.scalatest.freespec.AnyFreeSpec
class SeededGenSpec extends AnyFreeSpec {
private val it = classOf[SeededGen[_, _, _]].getSimpleName
private implicit val c: GenConfig = GenConfig(Seed(1))
private val p = Test... | jeffmay/scalacheck-ops | core/src/test/scala/org/scalacheck/ops/SeededGenSpec.scala | Scala | apache-2.0 | 4,206 |
package nestor
package api
import akka.actor._
import akka.pattern.ask
import akka.util.Timeout
import scala.concurrent.duration._
import scala.concurrent.Future
import org.eligosource.eventsourced.core._
import domain.Person, Person._
final class PersonApi(
coll: CollReadOnly[Person],
processor: ActorRef
)(... | ornicar/nestor | app/api/PersonApi.scala | Scala | mit | 2,241 |
package com.scalaAsm.x86
package Instructions
package General
// Description: Bit Test and Complement
// Category: general/bit
trait BTC extends InstructionDefinition {
val mnemonic = "BTC"
}
object BTC extends TwoOperands[BTC] with BTCImpl
trait BTCImpl extends BTC {
implicit object _0 extends TwoOp[rm16, imm8... | bdwashbu/scala-x86-inst | src/main/scala/com/scalaAsm/x86/Instructions/General/BTC.scala | Scala | apache-2.0 | 1,126 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | jiangxb1987/spark | sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperation.scala | Scala | apache-2.0 | 14,735 |
/******************************************************************************
Copyright (c) 2013-2014, KAIST.
All rights reserved.
Use is subject to license terms.
This distribution may include materials developed by third parties.
******************************************************************... | darkrsw/safe | src/main/scala/kr/ac/kaist/jsaf/widl/WIDLModel.scala | Scala | bsd-3-clause | 37,021 |
/**
* This file is part of the "eidolon" project.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the LICENSE is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* For the full copyright and license informati... | eidolon/eidolon-scala | project/Build.scala | Scala | mit | 1,784 |
/**
* 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... | Chasego/kafka | core/src/test/scala/unit/kafka/server/IsrExpirationTest.scala | Scala | apache-2.0 | 10,858 |
/*
* Copyright (c) 2014 koiroha.org.
* All sources and related resources are available under Apache License 2.0.
* http://www.apache.org/licenses/LICENSE-2.0.html
*/
package org.asterisque.netty
import java.util
import io.netty.bootstrap.ServerBootstrap
import io.netty.buffer.ByteBuf
import io.netty.channel.{Chann... | torao/asterisque | core-scala/src/test/scala/org/asterisque/netty/NettySample.scala | Scala | apache-2.0 | 1,615 |
package au.com.dius.pact.matchers
import au.com.dius.pact.model.{BodyMismatch, BodyMismatchFactory}
import org.junit.runner.RunWith
import org.specs2.mutable.Specification
import org.specs2.runner.JUnitRunner
@RunWith(classOf[JUnitRunner])
class MinimumMatcherTest extends Specification {
val matcherDef = Map("min"... | flaregames/pact-jvm | pact-jvm-matchers/src/test/scala/au/com/dius/pact/matchers/MinimumMatcherTest.scala | Scala | apache-2.0 | 1,352 |
package gitbucket.core.controller
import gitbucket.core.dashboard.html
import gitbucket.core.service._
import gitbucket.core.util.{Keys, UsersAuthenticator}
import gitbucket.core.util.Implicits._
import gitbucket.core.service.IssuesService._
class DashboardController
extends DashboardControllerBase
with Issue... | mann-ed/gitbucket | src/main/scala/gitbucket/core/controller/DashboardController.scala | Scala | apache-2.0 | 4,221 |
package model.form.data
/**
* @author Benjamin R. White <ben@delt.as>
*/
case class BlockUserFormData(username: String)
| ProjectAton/AtonLab | app/model/form/data/BlockUserFormData.scala | Scala | gpl-3.0 | 125 |
/*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free ... | bantonsson/sbt-jmh | src/sbt-test/sbt-jmh/run/src/main/scala/org/openjdk/jmh/samples/JMHSample_31_InfraParams.scala | Scala | apache-2.0 | 3,653 |
/*
* Copyright 2010-2011 Vilius Normantas <code@norma.lt>
*
* This file is part of Crossbow library.
*
* Crossbow 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 ... | ViliusN/Crossbow | crossbow-core/test/lt/norma/crossbow/indicators/SessionBarCountTest.scala | Scala | gpl-3.0 | 2,384 |
package net.rrm.ehour.timesheet.dto
import org.scalatest.{Matchers, WordSpec}
import net.rrm.ehour.domain.{TimesheetEntry, TimesheetEntryObjectMother, ProjectAssignmentObjectMother}
import java.{util => ju}
import org.joda.time.LocalDate
class WeekOverviewSpec extends WordSpec with Matchers {
"Week Overview" should... | momogentoo/ehour | eHour-common/src/test/scala/net/rrm/ehour/timesheet/dto/WeekOverviewSpec.scala | Scala | gpl-2.0 | 2,266 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | michalsenkyr/spark | mllib/src/main/scala/org/apache/spark/ml/clustering/GaussianMixture.scala | Scala | apache-2.0 | 26,178 |
package com.insweat.hssd.lib.essence
trait Interpreted {
def interpOut(ctx: Any, intVal: Any): Either[String, Any]
def interpIn(ctx: Any, extVal: Any): Either[String, Any]
}
| insweat/hssd | com.insweat.hssd.lib/src/com/insweat/hssd/lib/essence/Interpreted.scala | Scala | lgpl-3.0 | 183 |
package wvlet.airframe.http.okhttp
import java.nio.charset.StandardCharsets
import okhttp3.internal.http.HttpMethod
import okhttp3.{Protocol, Request, RequestBody, Response, ResponseBody}
import wvlet.airframe.http.{HttpMultiMap, HttpStatus}
import wvlet.airspec.AirSpec
class OkHttpTest extends AirSpec {
test("pr... | wvlet/airframe | airframe-http-okhttp/src/test/scala/wvlet/airframe/http/okhttp/OkHttpTest.scala | Scala | apache-2.0 | 2,089 |
/*
* 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... | pncampbell/ct-calculations | src/main/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/AC5058A.scala | Scala | apache-2.0 | 2,702 |
/*
* Copyright 2014 JHC Systems Limited
*
* 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... | DavidGregory084/sqlest | sqlest/src/main/scala/sqlest/ast/Union.scala | Scala | apache-2.0 | 697 |
/***********************************************************************
* Copyright (c) 2013-2015 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 ... | drackaer/geomesa | geomesa-jobs/src/main/scala/org/locationtech/geomesa/jobs/index/SortedIndexUpdateJob.scala | Scala | apache-2.0 | 5,311 |
import com.thesamet.proto.e2e.custom_types._
import com.thesamet.proto.e2e.custom_types.CustomMessage.Weather
import com.thesamet.proto.e2e.CustomTypes.{CustomMessage => CustomMessageJava}
import com.thesamet.proto.e2e.CustomTypes.CustomMessage.{Weather => WeatherJava}
import org.scalatest._
import com.thesamet.pb._
c... | dotty-staging/ScalaPB | e2e/src/test/scala/CustomTypesSpec.scala | Scala | apache-2.0 | 4,156 |
package edu.chop.cbmi.dataExpress.test.dataModels
import org.scalatest.{BeforeAndAfter, GivenWhenThen, FunSpec}
import org.scalatest.matchers.ShouldMatchers
import edu.chop.cbmi.dataExpress.backends.file._
import edu.chop.cbmi.dataExpress.dataModels.{DataRow, DataTable}
import java.io.File
import edu.chop.cbmi.dataExp... | chop-dbhi/dataexpress | src/test/scala/edu/chop/cbmi/dataExpress/test/dataModels/FileTableSpec.scala | Scala | bsd-2-clause | 4,177 |
package streams
import common._
/**
* This component implements a parser to define terrains from a
* graphical ASCII representation.
*
* When mixing in that component, a level can be defined by
* defining the field `level` in the following form:
*
* val level =
* """------
* |--ST--
* |--oo--
* ... | javierarilos/coursera-fp-design-scala | week2-streams/src/main/scala/streams/StringParserTerrain.scala | Scala | apache-2.0 | 2,630 |
package phenan.prj.exception
case class ClassFileNotFoundException (msg: String) extends Exception(msg)
case class InvalidClassFileException (msg: String) extends Exception(msg)
case class InvalidTypeException (msg: String, cause: Throwable) extends Exception(msg)
object InvalidTypeException {
def apply (msg: Str... | csg-tokyo/proteaj2 | src/main/scala/phenan/prj/exception/Exceptions.scala | Scala | mit | 739 |
/*
* Copyright (c) 2014-2018 by The Monix Project Developers.
* See the project homepage at: https://monix.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache... | Wogan/monix | monix-eval/shared/src/test/scala/monix/eval/TaskForkAndForgetSuite.scala | Scala | apache-2.0 | 2,181 |
package org.ensime
import scala.collection.immutable.ListMap
import org.ensime.sbt.util._
package object sbt {
type KeyMap = ListMap[KeywordAtom, SExp]
object KeyMap {
def apply(elems: (KeywordAtom, SExp)*) = ListMap[KeywordAtom, SExp]() ++ elems
}
implicit def tuples2TupleKeyMapOps(
tuples: List[(Ke... | todesking/ScaMS | src/main/scala/org.ensime.sbt/package.scala | Scala | mit | 1,311 |
package homepage.snippet
import scala.xml.NodeSeq
import net.liftweb.http.S._
import net.liftweb.http.SHtml._
import net.liftweb.http.RequestVar
import net.liftweb.util.Helpers._
import net.liftweb.common.Full
import homepage.model.Paper
import net.liftweb.mapper.OrderBy
import net.liftweb.mapper.Descending
/** Rende... | bbiletskyy/homepage | src/main/scala/homepage/snippet/Papers.scala | Scala | apache-2.0 | 889 |
/*
* 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 ... | jianran/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/command/AnalyzeColumnCommand.scala | Scala | apache-2.0 | 4,687 |
package scaffvis
/**
* Generic reusable computation which remembers the last value.
*
* @param f the function
* @tparam I input
* @tparam K key used to compare equality of inputs (simple case: I = K)
* @tparam O output
* @param extractKey how to extract K from I
* @param eq how to compare two K
*/
ca... | velkoborsky/scaffvis | shared/src/main/scala/scaffvis/ReusableComputation.scala | Scala | gpl-3.0 | 1,664 |
/*
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free ... | bantonsson/sbt-jmh | src/sbt-test/sbt-jmh/run/src/main/scala/org/openjdk/jmh/samples/JMHSample_09_Blackholes.scala | Scala | apache-2.0 | 2,809 |
package com.codelab27.cards9.services.settings
trait GameSettings {
/**
* Maximum level for card stats.
*/
def CARD_MAX_LEVEL: Int
/**
* Maximum number for cards in hand.
*/
def MAX_HAND_CARDS: Int
}
| Codelab27/cards9-server | app/com/codelab27/cards9/services/settings/GameSettings.scala | Scala | gpl-2.0 | 224 |
package example
object Lists {
/**
* This method computes the sum of all elements in the list xs. There are
* multiple techniques that can be used for implementing this method, and
* you will learn during the class.
*
* For this example assignment you can use the following methods in class
* `List`... | foomorrow/coursera-scala | example/src/main/scala/example/Lists.scala | Scala | gpl-2.0 | 1,682 |
package models.vimeo.video.util
import models.vimeo.video.Download
/**
* author: cvandrei
* since: 2016-02-02
*/
object DownloadHelper {
val quality = "hd"
val fileType = "video/mp4"
val width = 1280
val height = 720
val expires = "2016-01-22T15:13:33+00:00"
val link = "https://vimeo.com/api/file/d... | indarium/hbbTVPlugin | test/models/vimeo/video/util/DownloadHelper.scala | Scala | agpl-3.0 | 1,109 |
package com.taig.tmpltr.markup
import com.taig.tmpltr._
import play.api.mvc.Content
trait label
extends Tag.Body[label, Content]
{
val tag = "label"
} | Taig/Play-Tmpltr | app/com/taig/tmpltr/markup/label.scala | Scala | mit | 154 |
/**
* 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"); yo... | KevinLiLu/kafka | core/src/test/scala/kafka/tools/CustomDeserializerTest.scala | Scala | apache-2.0 | 1,694 |
/*
* Copyright (c) 2014-2021 by The Monix Project Developers.
* See the project homepage at: https://monix.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache... | monixio/monix | monix-catnap/shared/src/main/scala/monix/catnap/cancelables/AssignableCancelableF.scala | Scala | apache-2.0 | 2,810 |
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will... | ivan-cukic/litef-conductor | src/main/scala/dataapi/CustomFormats.scala | Scala | apache-2.0 | 3,555 |
import _root_.io.gatling.core.scenario.Simulation
import ch.qos.logback.classic.{Level, LoggerContext}
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import org.slf4j.LoggerFactory
import scala.concurrent.duration._
/**
* Performance test for the RestaurantOrder entity.
*/
class RestaurantOrderGatl... | goxhaj/gastronomee | src/test/gatling/simulations/RestaurantOrderGatlingTest.scala | Scala | apache-2.0 | 3,550 |
/** Copyright 2015 TappingStone, 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 ... | adamharish/PredictionIO | core/src/main/scala/io/prediction/controller/LFirstServing.scala | Scala | apache-2.0 | 1,384 |
/*
* Copyright (c) 2016. StulSoft, Yuriy Stul
*/
package com.stulsoft.ysps.ppromise
import com.typesafe.scalalogging.LazyLogging
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.{Future, Promise}
/**
* Created by Yuriy Stul on 10/29/2016.
*/
object PromiseExample3 extends App ... | ysden123/ysps | src/main/scala/com/stulsoft/ysps/ppromise/PromiseExample3.scala | Scala | mit | 913 |
/*
* 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 ... | apache/incubator-kylin | engine-spark/src/main/java/org/apache/kylin/engine/spark/SparkSqlOnLivyBatch.scala | Scala | apache-2.0 | 1,658 |
package com.signalcollect.dcop.test
import com.signalcollect.dcop.vertices.VariableVertex
import com.signalcollect.dcop.vertices.id.MaxSumId
import scala.collection.mutable.ArrayBuffer
object ReferenceTest extends App {
val vv = new VariableVertex(new MaxSumId(0,2), 1)
val array = ArrayBuffer(vv)
println(array... | gmazlami/dcop-maxsum | src/main/scala/com/signalcollect/dcop/test/ReferenceTest.scala | Scala | apache-2.0 | 360 |
package sp.server
import akka.{NotUsed, Done}
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.model._
import akka.http.scaladsl.server.Directives._
import akka.stream.{ActorMaterializer, Materializer, SourceShape}
import scala.concurrent.duration._
import scala.concurrent._
impo... | kristoferB/SP | spcore/src/main/scala/sp/server/LaunchGUI.scala | Scala | mit | 12,464 |
/*
* 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 ... | JerryLead/spark | sql/core/src/test/scala/org/apache/spark/sql/execution/QueryExecutionSuite.scala | Scala | apache-2.0 | 2,037 |
// Copyright (c) 2013, Johns Hopkins University. All rights reserved.
// This software is released under the 2-clause BSD license.
// See /LICENSE.txt
// Travis Wolfe, twolfe18@gmail.com, 30 July 2013
package edu.jhu.hlt.parma.types
object SVec {
def apply(i: Int, v: Double): SVec = {
val sv = new SVec(1)
sv.ad... | hltcoe/parma | src/main/scala/edu/jhu/hlt/parma/types/SVec.scala | Scala | bsd-2-clause | 4,696 |
/*
* Copyright (c) 2013-2016 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.apach... | bigdecisions/snowplow | 3-enrich/stream-enrich/project/Dependencies.scala | Scala | apache-2.0 | 4,620 |
/*
* Copyright 2015 the original author or authors.
* @https://github.com/scouter-project/scouter
*
* 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/... | yuyupapa/OpenSource | scouter.server/src/scouter/server/core/PerfCountCore.scala | Scala | apache-2.0 | 3,135 |
package org.moe.interpreter
import org.scalatest.FunSuite
import org.scalatest.matchers.ShouldMatchers
import org.moe.runtime._
import org.moe.ast._
import ClassMatchers._
class ClassNodeTestSuite
extends FunSuite
with InterpreterTestUtils
with ShouldMatchers
with ClassMatchers {
test("... basic test with... | MoeOrganization/moe | src/test/scala/org/moe/interpreter/ClassNodeTestSuite.scala | Scala | mit | 6,399 |
/*
* Copyright 2016 agido GmbH
*
* 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... | agido/pageobject | examples/src/test/scala/org/pageobject/examples/wikipedia/WikipediaEnPage.scala | Scala | apache-2.0 | 729 |
/***********************************************************************
* Copyright (c) 2013-2018 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and... | ddseapy/geomesa | geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/stats/EnumerationStat.scala | Scala | apache-2.0 | 2,820 |
// Copyright (C) 2011-2012 the original author or authors.
// See the LICENCE.txt 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 compliance with the License.
// You ... | scalastyle/scalastyle | src/test/scala/org/scalastyle/SourceFileParserTest.scala | Scala | apache-2.0 | 1,470 |
package org.jetbrains.plugins.scala
package lang
package psi
package impl
package base
package types
import org.jetbrains.plugins.scala.lang.psi.ScalaPsiElementImpl
import com.intellij.lang.ASTNode
import api.base.types._
import com.intellij.psi.{PsiElement, ResolveState}
import com.intellij.psi.scope.PsiScopeProcesso... | consulo/consulo-scala | src/org/jetbrains/plugins/scala/lang/psi/impl/base/types/ScRefinementImpl.scala | Scala | apache-2.0 | 1,085 |
package scalajsreact.template.components
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.html_<^._
object Footer {
val component = ScalaComponent.builder
.static("Footer")(
<.footer(
^.textAlign.center,
<.div(^.borderBottom := "1px solid grey", ^.padding := "0px"),
... | chandu0101/scalajs-react-template | src/main/scala/scalajsreact/template/components/Footer.scala | Scala | apache-2.0 | 417 |
/*
* 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 ... | jkbradley/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileSourceStrategy.scala | Scala | apache-2.0 | 9,312 |
/* Title: Pure/System/process_result.scala
Author: Makarius
Result of system process.
*/
package isabelle
final case class Process_Result(
rc: Int,
out_lines: List[String] = Nil,
err_lines: List[String] = Nil,
timeout: Boolean = false,
timing: Timing = Timing.zero)
{
def out: String = cat_l... | larsrh/libisabelle | modules/pide/2018/src/main/scala/System/process_result.scala | Scala | apache-2.0 | 1,331 |
/*
* Copyright 2015 MongoDB, 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 ... | anand-singh/mongo-scala-driver | driver/src/test/scala/org/mongodb/scala/internal/TestObservable.scala | Scala | apache-2.0 | 2,215 |
object Main {
def main(args: Array[String]) = {
println("Hi from aggregator!")
Main1.main(Array(""))
Main2.main(Array(""))
Main3.main(Array(""))
Main4.main(Array(""))
Main5.main(Array(""))
Main6.main(Array(""))
Main7.main(Array(""))
Main8.main(Array(""))
Main9.main(Array(""))
... | darkocerdic/sbt-multiproject-resolving | aggregator/src/main/scala/Main.scala | Scala | apache-2.0 | 487 |
import scala.compiletime.erasedValue
import scala.deriving.Mirror
object Test extends App {
inline def checkElems[A, T](using inline A: Mirror.SumOf[A]): Unit =
inline erasedValue[A.MirroredElemTypes] match {
case _: T => ()
}
sealed trait Base1 // Base1 MUST NOT have a companion here!
case class ... | dotty-staging/dotty | tests/run/deriving-constructor-order.scala | Scala | apache-2.0 | 689 |
/*
* 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 ... | zhzhan/shc | src/main/scala/org/apache/spark/sql/execution/datasources/hbase/HBaseRelation.scala | Scala | apache-2.0 | 8,541 |
package aio
package conduit
import buffer.ByteResult
/**
*
*/
trait ByteResultSourceConduit
extends SourceConduit[ByteResult]
/**
*
*/
trait ByteResultSinkConduit
extends SinkConduit[ByteResult]
| weltermann17/pleasant-scala | aio/src/main/scala/aio/conduit/ByteResultConduit.scala | Scala | apache-2.0 | 208 |
package com.sksamuel.elastic4s.requests.indexes
import com.sksamuel.elastic4s.ext.OptionImplicits._
import com.sksamuel.elastic4s.requests.searches.queries.Query
case class TemplateAlias(name: String, filter: Option[Query] = None, routing: Option[String] = None) {
def filter(filter: Query): TemplateAlias = copy(fil... | sksamuel/elastic4s | elastic4s-domain/src/main/scala/com/sksamuel/elastic4s/requests/indexes/TemplateAlias.scala | Scala | apache-2.0 | 418 |
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.