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 jp.ne.opt.redshiftfake.parse
import jp.ne.opt.redshiftfake._
class CopyCommandParser extends BaseParser {
case class TableAndSchemaName(schemaName: Option[String], tableName: String)
private[this] val tableNameParser = ((quotedIdentifierParser <~ ".").? ~ quotedIdentifierParser) ^^ {
case ~(schemaNa... | opt-tech/redshift-fake-driver | src/main/scala/jp/ne/opt/redshiftfake/parse/CopyCommandParser.scala | Scala | apache-2.0 | 4,052 |
/* Copyright 2009-2021 EPFL, Lausanne */
package stainless
package frontend
import extraction._
import xlang.{ trees => xt }
import stainless.utils.CheckFilter
class UserFiltering private(override val s: xt.type,
override val t: xt.type,
override val trees: xt... | epfl-lara/stainless | core/src/main/scala/stainless/frontend/UserFiltering.scala | Scala | apache-2.0 | 1,698 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | aosagie/spark | core/src/main/scala/org/apache/spark/rdd/RDD.scala | Scala | apache-2.0 | 83,891 |
/* __ *\\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2002-2013, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\\___/_/... | slothspot/scala | src/library/scala/Int.scala | Scala | bsd-3-clause | 16,413 |
package sbtassembly
import sbt._
import Keys._
import com.eed3si9n.jarjarabrams
trait AssemblyKeys {
lazy val assembly = taskKey[File]("Builds a deployable über JAR")
lazy val assembleArtifact = settingKey[Boolean]("Enables (true) or disables (false) assembling an artifact")
lazy val a... | sbt/sbt-assembly | src/main/scala/sbtassembly/AssemblyKeys.scala | Scala | mit | 2,386 |
/***********************************************************************
* Copyright (c) 2013-2022 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... | locationtech/geomesa | geomesa-convert/geomesa-convert-common/src/main/scala/org/locationtech/geomesa/convert2/validators/SimpleFeatureValidator.scala | Scala | apache-2.0 | 3,740 |
/*
* Copyright 2021 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | hmrc/gmp-frontend | test/controllers/auth/FakeAuthAction.scala | Scala | apache-2.0 | 1,618 |
package org.monkeynuthead.monkeybarrel.web
import akka.actor.ActorSystem
import akka.http.scaladsl.marshalling.Marshal
import akka.http.scaladsl.model.RequestEntity
import akka.http.scaladsl.unmarshalling.Unmarshal
import akka.stream.ActorMaterializer
import org.junit.runner.RunWith
import org.scalatest.junit.... | georgenicoll/monkey-barrel | web/src/test/scala/org/monkeynuthead/monkeybarrel/web/MicroPickleSupportSpec.scala | Scala | gpl-2.0 | 1,894 |
package models
import java.util.UUID
import play.api.db.slick.Config.driver.simple._
import org.joda.time.DateTime
import com.github.tototoshi.slick.HsqldbJodaSupport._
case class ClientGrantType(
clientId: String,
grantTypeId: Int
) extends Model
class ClientGrantTypes(tag: Tag) extends Table[ClientGrantTy... | maximx1/roma_quantum | app/models/ClientGrantType.scala | Scala | mit | 738 |
package demo.components.elementalui
import chandu0101.macros.tojs.GhPagesMacros
import chandu0101.scalajs.react.components.elementalui.{EuiGlyph, Octicons, _}
import demo.components.CodeExample
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.TagOf
import japgolly.scalajs.react.vdom.html_<^._
import ... | chandu0101/scalajs-react-components | demo/src/main/scala/demo/components/elementalui/EuiGlyphsDemo.scala | Scala | apache-2.0 | 2,939 |
/*
* Copyright 2017 PayPal
*
* 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 writi... | anilgursel/squbs | squbs-unicomplex/src/test/scala/org/squbs/unicomplex/ShutdownSpec.scala | Scala | apache-2.0 | 5,395 |
package org.broadinstitute.clio.server.model
case class ClioRequest(content: String)
case class ClioResponse(content: String)
| broadinstitute/clio | clio-server/src/main/scala/org/broadinstitute/clio/server/model/audit.scala | Scala | bsd-3-clause | 128 |
/*
* 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 ... | Intel-bigdata/OAP | oap-native-sql/core/src/test/scala/org/apache/spark/sql/streaming/DeprecatedStreamingAggregationSuite.scala | Scala | apache-2.0 | 3,355 |
package com.sksamuel.elastic4s
import java.util.concurrent.Executors
import java.util.{ Date, UUID }
import com.sksamuel.elastic4s.testkit.ElasticSugar
import org.scalatest.{ Matchers, FunSuite }
import scala.util.Random
class InsertBenchmark extends FunSuite with ElasticSugar with Matchers {
import scala.concur... | FabienPennequin/elastic4s | elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/InsertBenchmark.scala | Scala | apache-2.0 | 5,037 |
package redbot.bots
/**
* Discord bot top class.
*/
trait DiscordBot {
def client: redbot.discord.Client
} | JamesGallicchio/RedBot | src/main/scala/redbot/bots/DiscordBot.scala | Scala | mit | 113 |
package kipsigman.play.http
import play.api.http.Writeable
object Writeables {
} | kipsigman/play-extensions | src/main/scala/kipsigman/play/http/Writeables.scala | Scala | apache-2.0 | 85 |
package scala.c.engine
class EnumTest extends StandardTest {
"A simple enum" should "print the correct results" in {
val code =
"""
enum { TEST = 1 };
void main() {
printf("%d\\n", TEST);
}"""
checkResults(code)
}
"An advanced enum" should "print the correct results" ... | bdwashbu/cEngine | tests/scala/c/engine/EnumTest.scala | Scala | apache-2.0 | 970 |
package com.twitter.util
import scala.annotation.tailrec
import scala.collection.mutable.ArrayBuffer
object Throwables {
/**
* Traverse a nested `Throwable`, flattening all causes into a Seq of
* classname strings.
*/
def mkString(ex: Throwable): Seq[String] = {
@tailrec def rec(ex: Throwable, buf: A... | cogitate/twitter-util-uuid | util-core/src/main/scala/com/twitter/util/Throwables.scala | Scala | apache-2.0 | 602 |
package lila.game
import chess.{ Clock, Pos, CheckCount }
import Game.BSONFields._
import org.joda.time.DateTime
import reactivemongo.bson._
import lila.db.BSON.BSONJodaDateTimeHandler
import lila.db.ByteArray
private[game] object GameDiff {
type Set = (String, BSONValue)
type Unset = (String, BSONBoolean)
d... | danilovsergey/i-bur | modules/game/src/main/GameDiff.scala | Scala | mit | 2,763 |
package sandbox
import com.typesafe.config.ConfigFactory
object ConfigSandbox extends App {
val config = ConfigFactory.load()
println(config.getString("env"))
println(config.getString("topic"))
}
| jthompson-hiya/akka-streams-sandbox | src/main/scala/sandbox/ConfigSandbox.scala | Scala | mit | 206 |
import sbt._
import Keys._
object BuildSettings {
val paradiseVersion = "2.0.1"
val scalaBuildVersion = "2.11.2"
val buildSettings = Defaults.defaultSettings ++ Seq(
organization := "de.unimarburg",
scalacOptions ++= Seq(),
scalaVersion := scalaBuildVersion,
crossScalaVersions := Seq("2.10.2... | b-studios/MixinComposition | project/Build.scala | Scala | mit | 1,507 |
// Yet another type needs to be introduced.
// To read more about FunctionK (~>):
// typelevel.org/cats/datatypes/functionk.html
trait ~>[F[_], G[_]] {
def apply[B](fa: F[B]): G[B]
}
F ~> G | hmemcpy/milewski-ctfp-pdf | src/content/3.10/code/scala/snippet13.scala | Scala | gpl-3.0 | 192 |
/*
* 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/flink/src/test/scala/org/apache/carbon/flink/TestDeleteStageFiles.scala | Scala | apache-2.0 | 10,000 |
/*
* Copyright 2006-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... | lift/lift | framework/lift-base/lift-util/src/test/scala/net/liftweb/util/BasicTypesHelpersSpec.scala | Scala | apache-2.0 | 6,115 |
/*
* Copyright 2012-2014 Kieron Wilkinson.
*
* 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 o... | vyadh/viper | util/src/test/scala/viper/util/LogRecordGenerator.scala | Scala | apache-2.0 | 2,752 |
import org.scalatest._
import org.mdedetrich.utforsca.AsMap._
import spire.math._
object AsMapSpec {
case class Test1(a: List[String], b: Int)
case class TypeTest1[T](a: List[T], b: Option[T])
case class ExistentialTypeTest[T: Numeric](a: T, b: List[T])
}
class AsMapSpec extends FlatSpec {
"asMap" shoul... | mdedetrich/utforsca | src/test/scala/AsMapSpec.scala | Scala | bsd-2-clause | 988 |
package commons.models
trait WithName {
val name: String
}
| Dasiu/play-framework-test-project | app/commons/models/WithName.scala | Scala | mit | 62 |
package ch03
import org.specs2.mutable.Specification
class Ex315ListConcatenationSpec extends Specification {
"List concatenation" should {
"concatenate a list consists of a list and empty list" in {
List.concatenate(List(List(1, 2, 3, 4), Nil)) mustEqual List(1, 2, 3, 4)
}
"concatenate two non e... | IrfanAnsari/fpinscala | src/test/scala/ch03/Ex315ListConcatenationSpec.scala | Scala | mit | 447 |
package provingground
/**
* Combining various atomic solvers to give a solver, with one or many solutions.
*
* Should allow parallel and serial collections
*
* By convention, atoms return Option[Either[P,S]] with P being progress and S success
* The raw input should also be in P to allow recursion
*/
obj... | siddhartha-gadgil/ProvingGround | digressions/src/main/scala/provingground/RecSolver.scala | Scala | mit | 1,856 |
package example
import scala.annotation._
object Recitation3 {
val intLeq = (x: Int, y: Int) => x <= y
val emptyIntTree: Tree[Int] = new EmptyTree(intLeq)
}
abstract class Tree[T] {
def size: Int
def treeSize: Int = this match {
case EmptyTree(leq) => 0
case Node(left, elem, right, leq) => 1 + left.s... | rusucosmin/courses | fp/recitation/src/main/scala/example/recitation3.scala | Scala | mit | 1,441 |
/*
* Copyright 2017 PayPal
*
* 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 ... | akara/squbs | squbs-pattern/src/main/scala/org/squbs/pattern/stream/QueueConfig.scala | Scala | apache-2.0 | 3,202 |
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs
// License: http://www.gnu.org/licenses/gpl-3.0.en.html
/* NSC -- new Scala compiler
* Copyright 2005-2013 LAMP/EPFL
* @author Paul Phillips
*/
package scala.reflect
package io
import java.net.URL
import java.io.{ IOException, InputStream, B... | espinhogr/ensime-server | monkeys/src/main/scala-2.10/scala/reflect/io/ZipArchive.scala | Scala | gpl-3.0 | 9,012 |
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
*/
package play.core.server.akkahttp
import akka.http.scaladsl.model._
import akka.http.scaladsl.model.headers.RawHeader
import org.specs2.mutable.Specification
import play.api.http.HeaderNames
class AkkaHeadersWrapperTest extends Specification {
val ... | mkurz/playframework | transport/server/play-akka-http-server/src/test/scala/play/core/server/akkahttp/AkkaHeadersWrapperTest.scala | Scala | apache-2.0 | 2,846 |
/*
* 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 ... | witgo/spark | sql/hive/src/test/scala/org/apache/spark/sql/HiveCharVarcharTestSuite.scala | Scala | apache-2.0 | 2,800 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not u... | ArvinDevel/onlineAggregationOnSparkV2 | sql/core/src/main/scala/org/apache/spark/sql/execution/python.scala | Scala | apache-2.0 | 14,589 |
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package swave.core.util
import scala.collection.generic.CanBuildFrom
/**
* Enables fluent (inline) type br... | sirthias/swave | core/src/main/scala/swave/core/util/BreakOutTo.scala | Scala | mpl-2.0 | 813 |
package scommons.client.showcase.demo
import scommons.client.ui.ButtonImagesCss
import scommons.client.ui.list._
import scommons.react._
object ListDemo extends FunctionComponent[Unit] {
protected def render(props: Props): ReactElement = {
<.div()(
<.h2()("ListBox"),
<.p()("Demonstrates list box fu... | viktor-podzigun/scommons | showcase/src/main/scala/scommons/client/showcase/demo/ListDemo.scala | Scala | apache-2.0 | 1,249 |
package fly.play.s3
import fly.play.aws.SimpleAwsCredentials
import play.api.Configuration
import play.api.libs.ws.WSClient
class S3ConfigSpec extends S3SpecSetup {
sequential
val baseConfig = Map("aws.accessKeyId" -> "", "aws.secretKey" -> "")
implicit val application = fakeApplication()
"S3" should {
... | kaliber-scala/play-s3 | src/test/scala/fly/play/s3/S3ConfigSpec.scala | Scala | mit | 2,907 |
package example.rock.paper.scissors.acceptance
import example.rock.paper.scissors.RPSLSWeaponGenerator.{Lizard, Spock}
import example.rock.paper.scissors._
import org.scalatest.{FeatureSpec, GivenWhenThen}
/**
* A bonus acceptance test for rock-paper-scissors-lizard-spock, created with the purpose of proving current... | chavdarch/rock-paper-scissors | src/test/scala/example/rock/paper/scissors/acceptance/RPSLSAcceptanceSpec.scala | Scala | mit | 1,666 |
package breeze.linalg
/*
Copyright 2012 David Hall
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... | claydonkey/breeze | math/src/main/scala/breeze/linalg/SparseVector.scala | Scala | apache-2.0 | 14,255 |
package models
import java.io.{ByteArrayInputStream, ByteArrayOutputStream, FileInputStream, File}
import java.awt.image.BufferedImage
import javax.imageio.ImageIO
import java.awt.{RenderingHints, Rectangle}
import play.api._
import play.api.mvc._
import play.api.Play._
trait DBImage extends IdPK {
def master:Array... | maackle/bartera | app/models/ItemImage.scala | Scala | mit | 3,739 |
package com.metl.utils
object FunctionConverter {
implicit def scalaFunctionToJava[From, To](function: (From) => To): java.util.function.Function[From, To] = {
new java.util.function.Function[From, To] {
override def apply(input: From): To = function(input)
}
}
} | StackableRegiments/analyticalmetlx | src/main/scala/com/metl/utils/FunctionConverter.scala | Scala | apache-2.0 | 282 |
package models.admin.reports
import scalaz._
import Scalaz._
import scalaz.effect.IO
import scalaz.EitherT._
import scalaz.Validation
import scalaz.Validation.FlatMap._
import scalaz.NonEmptyList._
import scala.collection.immutable.ListMap
import models.tosca.KeyValueList
import net.liftweb.json._
import io.megam.uti... | indykish/verticegateway | app/models/admin/reports/Backups.scala | Scala | mit | 3,810 |
/*******************************************************************************/
/* */
/* Copyright (C) 2016 by Max Lv <max.c.lv@gmail.com> */
/* Copyright (C) 2016 by Mygod Studio <contact-shadowsocks-android@mygod.... | anyforever/shadowsocks-android | src/main/scala/be/mygod/preference/PreferenceGroupAdapter.scala | Scala | gpl-3.0 | 4,531 |
package is.hail.utils
import org.scalatest.testng.TestNGSuite
import org.testng.annotations.Test
class SemanticVersionSuite extends TestNGSuite {
@Test def testOrdering() {
val versions = Array(
SemanticVersion(1, 1, 0),
SemanticVersion(1, 1, 1),
SemanticVersion(1, 2, 2),
SemanticVersion... | hail-is/hail | hail/src/test/scala/is/hail/utils/SemanticVersionSuite.scala | Scala | mit | 688 |
package com.blinkbox.books.json
import java.net.{URI, URL}
import java.util.UUID
import org.joda.time.format.{DateTimeFormatter, DateTimeFormatterBuilder, ISODateTimeFormat}
import org.joda.time.{DateTime, DateTimeZone, LocalDate}
import org.json4s.JsonAST.{JNull, JString}
import org.json4s.{CustomSerializer, Mapping... | blinkboxbooks/common-json.scala | src/main/scala/com/blinkbox/books/json/Serializers.scala | Scala | mit | 2,675 |
package org.deeplearning4s.nn.conf
/*
org.deeplearning4s.nn.conf.ActivationFunction stands for each implemented class of org.nd4j.linalg.api.activation.ActivationFunction
@see http://nd4j.org/apidocs/org/nd4j/linalg/api/activation/ActivationFunction.html
*/
sealed class ActivationFunction(val name:String)
case ob... | everpeace/deeplearning4s | src/main/scala/org/deeplearning4s/nn/conf/ActivationFunction.scala | Scala | apache-2.0 | 899 |
package beam.router
import akka.actor.{Actor, ActorLogging, ActorRef, Props}
import akka.routing.FromConfig
import beam.router.r5.R5RoutingWorker
import com.typesafe.config.Config
class ClusterWorkerRouter(config: Config) extends Actor with ActorLogging {
// This router is used both with lookup and deploy of route... | colinsheppard/beam | src/main/scala/beam/router/ClusterWorkerRouter.scala | Scala | gpl-3.0 | 906 |
package Seyrek
import Chisel._
import TidbitsStreams._
// TODO expose hazard statistics?
// scheduler with in-order dispatch and completion
class InOrderScheduler(p: SeyrekParams) extends Scheduler(p) {
val dispatchOrdered = true
val completeOrdered = true
val hqType = new OperandWithID(p.valWidth, p.indWidt... | maltanar/seyrek | src/main/scala/scheduler/InOrderScheduler.scala | Scala | bsd-2-clause | 1,547 |
/*
* Copyright (c) 2014 Pwootage
*
* 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,
* publish, d... | Pwootage/sor1k | src/main/scala/com/pwootage/sor1k/cpu/FastOR1KInterpretedInstructions.scala | Scala | mit | 2,666 |
/*
* Copyright 2022 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | hmrc/fset-faststream | app/model/exchange/sift/SiftState.scala | Scala | apache-2.0 | 1,015 |
/**
* Copyright (C) 2009-2011 the original author or authors.
* See the notice.md 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.
* Yo... | scalate/scalate | scalate-core/src/test/scala/org/fusesource/scalate/ssp/WhitespaceTest.scala | Scala | apache-2.0 | 2,048 |
package monocle.law
import monocle.Iso
import monocle.internal.IsEq
import cats.data.Const
import cats.Id
case class IsoLaws[S, A](iso: Iso[S, A]) {
import IsEq.syntax
def roundTripOneWay(s: S): IsEq[S] =
(iso.reverseGet _ compose iso.get)(s) <==> s
def roundTripOtherWay(a: A): IsEq[A] =
(iso.get _ c... | aoiroaoino/Monocle | core/shared/src/main/scala/monocle/law/IsoLaws.scala | Scala | mit | 873 |
/*
* 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 ... | hdinsight/spark-eventhubs | core/src/test/scala/org/apache/spark/sql/eventhubs/EventHubsSourceOffsetSuite.scala | Scala | apache-2.0 | 4,136 |
/*
* 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 ... | sachintyagi22/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StreamExecution.scala | Scala | apache-2.0 | 28,375 |
package io.udash.web.guide.views.ext.demo.charts
import io.udash.wrappers.highcharts.config.HighchartsConfig
import io.udash.wrappers.highcharts.config.axis.{AxisPlotLine, AxisTitle, XAxis, YAxis}
import io.udash.wrappers.highcharts.config.credits.Credits
import io.udash.wrappers.highcharts.config.plot.PlotOptions
imp... | UdashFramework/udash-guide | guide/src/main/scala/io/udash/web/guide/views/ext/demo/charts/LineWithDataLabels.scala | Scala | gpl-3.0 | 1,748 |
/*
Copyright 2013 Twitter, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | twitter/summingbird | summingbird-storm/src/main/scala/com/twitter/summingbird/storm/StormPlatform.scala | Scala | apache-2.0 | 9,273 |
/*
* Scala (https://www.scala-lang.org)
*
* Copyright EPFL and Lightbend, Inc.
*
* Licensed under Apache License 2.0
* (http://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
package scala
package reflect
... | martijnhoekstra/scala | src/reflect/scala/reflect/internal/Names.scala | Scala | apache-2.0 | 23,369 |
package com.rabbitstewdio.build.ivyconverter
import java.io.File
import java.util.Properties
import com.typesafe.config.Config
import scala.collection.JavaConverters._
case class ParsedProject(dir: File,
config: Config,
properties: Map[String, String],
... | RabbitStewDio/ivy-project-converter | src/main/scala/com/rabbitstewdio/build/ivyconverter/ParsedProject.scala | Scala | apache-2.0 | 2,595 |
package reactivemongo.core.actors
import scala.collection.immutable.ListSet
import reactivemongo.api.ReadPreference
import reactivemongo.api.commands.{
AuthenticationResult,
Command,
CommandKind,
X509Authenticate
}
import reactivemongo.core.nodeset.{
Authenticate,
Connection,
X509Authenticating
}
imp... | ReactiveMongo/ReactiveMongo | driver/src/main/scala/core/actors/MongoX509Authentication.scala | Scala | apache-2.0 | 1,477 |
package org.bitcoins.core.script.flag
/**
* Created by chris on 4/6/16.
*/
trait ScriptFlagUtil {
/**
* Checks if the strict encoding is required in the set of flags
* given to us
* https://github.com/bitcoin/bips/blob/master/bip-0062.mediawiki#DER_encoding
* @param flags
* @return
*/
... | bitcoin-s/bitcoin-s-core | core/src/main/scala/org/bitcoins/core/script/flag/ScriptFlagUtil.scala | Scala | mit | 3,784 |
package breeze.optimize
/*
Copyright 2010 David Hall, Daniel Ramage
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable l... | tjhunter/scalanlp-core | learn/src/test/scala/breeze/optimize/OWLQNTest.scala | Scala | apache-2.0 | 2,641 |
/*
* 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 ... | fhueske/flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/StreamPlanner.scala | Scala | apache-2.0 | 19,856 |
/*
* Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com>
*/
package com.lightbend.lagom.scaladsl.persistence.slick
import com.lightbend.lagom.scaladsl.persistence.AbstractPersistentEntityActorSpec
import com.lightbend.lagom.scaladsl.persistence.TestEntitySerializerRegistry
import scala.concurrent.Ex... | rcavalcanti/lagom | persistence-jdbc/scaladsl/src/test/scala/com/lightbend/lagom/scaladsl/persistence/slick/SlickPersistentEntityActorSpec.scala | Scala | apache-2.0 | 479 |
package debop4s.data.slick.associations
import debop4s.data.slick.AbstractSlickFunSuite
import debop4s.data.slick.associations.model._
import debop4s.data.slick.associations.schema.AssociationDatabase._
import debop4s.data.slick.associations.schema.AssociationDatabase.driver.simple._
import scala.util.Try
/**
* Ban... | debop/debop4s | debop4s-data-slick/src/test/scala/debop4s/data/slick/associations/BankAccountFunSuite.scala | Scala | apache-2.0 | 2,792 |
package edu.chop.cbmi.dataExpress.dataModels.file
import edu.chop.cbmi.dataExpress.backends.file.FileBackend
import edu.chop.cbmi.dataExpress.dataModels.{DataRow, ColumnNameGenerator, DataTable}
import edu.chop.cbmi.dataExpress.exceptions.ColumnDoesNotExist
import scala.language.dynamics
import edu.chop.cbmi.dataExpre... | chop-dbhi/dataexpress | src/main/scala/edu/chop/cbmi/dataExpress/dataModels/file/FileTable.scala | Scala | bsd-2-clause | 1,322 |
package com.lunatic.mlx.cuisines
import com.lunatic.mlx.CustomLineInputFormat
import com.lunatic.mlx.cuisines.model.Recipe
import org.apache.hadoop.io.{LongWritable, Text}
import org.apache.spark.SparkContext
import org.apache.spark.rdd.RDD
import org.json4s._
import org.json4s.jackson.JsonMethods._
/**
* Import th... | tupol/sparx-mllib | src/main/scala/com/lunatic/mlx/cuisines/RecipesImporter.scala | Scala | apache-2.0 | 1,494 |
/*
* Copyright 2015 eleflow.com.br.
*
* 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 ... | eleflow/uberdata | iuberdata_core/src/main/scala/org/apache/spark/ml/param/shared/HasXGBoostParams.scala | Scala | apache-2.0 | 2,335 |
/*
* Copyright 2013 - 2020 Outworkers 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... | outworkers/phantom | phantom-dsl/src/test/scala/com/outworkers/phantom/builder/query/db/batch/BatchTest.scala | Scala | apache-2.0 | 9,785 |
/***********************************************************************
* 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 ... | mdzimmerman/geomesa | geomesa-kafka/geomesa-kafka-datastore/src/test/scala/org/locationtech/geomesa/kafka/consumer/offsets/OffsetManagerTest.scala | Scala | apache-2.0 | 8,731 |
package io.taig.android
package object soap {
type Bundle = android.os.Bundle
} | Taig/Soap | src/main/scala/io/taig/android/soap/package.scala | Scala | mit | 84 |
/*
* Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com>
*/
import com.typesafe.sbt.SbtScalariform._
import sbt.ScriptedPlugin._
import sbt._
import Keys._
import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings
import com.typesafe.tools.mima.plugin.MimaKeys.mimaPreviousArtifacts
import ... | wsargent/playframework | framework/project/BuildSettings.scala | Scala | apache-2.0 | 9,419 |
/**
* Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0
* See accompanying LICENSE file.
*/
package models.navigation
import play.api.mvc.Call
/**
* @author hiral
*/
object BreadCrumbs {
sealed trait BreadCrumb
final case class BCDynamicText(cn: String => String) extends BreadCrumb
... | evertrue/kafka-manager | app/models/navigation/BreadCrumbs.scala | Scala | apache-2.0 | 5,272 |
package diode
object ModelRWTestsModel {
case class Model(a: A, b: B)
case class ModelOpt(x: Float, c: Option[C])
case class A(i: Int, s: String)
case class B(fs: Seq[Float], max: Float)
case class C(i: Int, s: String, o: Option[A])
case class ComplexModel(a: A, b: B, c: C)
case class Partial(i: In... | ochrons/diode | diode-core/shared/src/test/scala/diode/ModelRWTestsModel.scala | Scala | mit | 566 |
/**
* Copyright 2014 Dropbox, 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... | jrogers/djinni | src/source/ObjcppGenerator.scala | Scala | apache-2.0 | 15,445 |
package org.jetbrains.plugins.scala.codeInspection.methodSignature
import org.jetbrains.plugins.scala.codeInspection.AbstractInspection
/**
* Pavel Fatin
*/
abstract class AbstractMethodSignatureInspection(id: String, name: String) extends AbstractInspection(id, name) {
} | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/codeInspection/methodSignature/AbstractMethodSignatureInspection.scala | Scala | apache-2.0 | 276 |
// test well-kindedness checks
class WellKinded[x] {
type t = x[x]
}
| yusuke2255/dotty | tests/untried/neg/wellkinded_app.scala | Scala | bsd-3-clause | 71 |
/***********************************************************************
* Copyright (c) 2013-2020 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and... | aheyne/geomesa | geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geotools/ImmutableFeatureId.scala | Scala | apache-2.0 | 715 |
package org.jetbrains.plugins.scala
package codeInspection
package valInTraitInspection
import com.intellij.codeInspection.{ProblemHighlightType, ProblemsHolder}
import com.intellij.psi.PsiElement
import org.jetbrains.plugins.scala.lang.psi.api.statements.{ScValueDeclaration, ScVariableDeclaration}
import org.jetbrain... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/codeInspection/valInTraitInspection/AbstractValueInTraitInspection.scala | Scala | apache-2.0 | 1,339 |
package router
import com.wordnik.swagger.annotations._
import spray.routing._
import model.User
// Trying to not pollute the code with annotations
@Api(value = "/users", description = "Operations for users.", consumes= "application/json", produces = "application/json")
trait UserRouterDoc {
@ApiOperation(value... | Gneotux/pfc | src/main/scala/router/UserRouterDoc.scala | Scala | apache-2.0 | 2,483 |
package chat.tox.antox.wrapper
import java.sql.Timestamp
import chat.tox.antox.utils.TimestampUtils
case class GroupInfo(key: ToxKey,
online: Boolean,
name: String,
topic: String,
blocked: Boolean,
ignored: Boole... | biaji/Antox | app/src/main/scala/chat/tox/antox/wrapper/GroupInfo.scala | Scala | gpl-3.0 | 962 |
/***********************************************************************
* 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 ... | mcharles/geomesa | geomesa-jobs/src/main/scala/org/locationtech/geomesa/jobs/scalding/taps/GeoMesaTap.scala | Scala | apache-2.0 | 5,588 |
package org.jetbrains.plugins.scala.lang.completion.postfix.templates
import com.intellij.codeInsight.template.postfix.templates.NotPostfixTemplate
import org.jetbrains.plugins.scala.lang.completion.postfix.templates.selector.{SelectorConditions, AncestorSelector, ScalaPostfixTemplatePsiInfo}
import org.jetbrains.plug... | whorbowicz/intellij-scala | src/org/jetbrains/plugins/scala/lang/completion/postfix/templates/ScalaNotPostfixTemplate.scala | Scala | apache-2.0 | 650 |
package ml.combust.mleap.runtime.transformer.classification
import ml.combust.mleap.core.classification.SupportVectorMachineModel
import ml.combust.mleap.core.types._
import ml.combust.mleap.runtime.function.UserDefinedFunction
import ml.combust.mleap.tensor.Tensor
import ml.combust.mleap.core.util.VectorConverters._
... | combust-ml/mleap | mleap-runtime/src/main/scala/ml/combust/mleap/runtime/transformer/classification/SupportVectorMachine.scala | Scala | apache-2.0 | 1,900 |
/*
* 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 ... | WangTaoTheTonic/flink | flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/ProcTimeUnboundedPartitionedOver.scala | Scala | apache-2.0 | 3,620 |
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/... | rorygraves/perf_tester | corpus/scala-library/src/main/scala/collection/Searching.scala | Scala | apache-2.0 | 1,419 |
package filodb.cassandra
import scala.concurrent.duration.FiniteDuration
import scala.util.Try
import com.datastax.driver.core._
import com.typesafe.config.Config
import net.ceedubs.ficus.Ficus._
trait FiloSessionProvider {
// It is recommended this be implemented via lazy val. Don't want to recreate a session ev... | velvia/FiloDB | cassandra/src/main/scala/filodb.cassandra/FiloSessionProvider.scala | Scala | apache-2.0 | 2,152 |
package models
import scala.language.postfixOps
import scala.xml._
import scala.util.control.Exception._
object BirdRace{
/*
val xmlParser = XML.withSAXParser(new org.ccil.cowan.tagsoup.jaxp.SAXFactoryImpl().newSAXParser())
def loadFile(filename: String) = xmlParser.loadFile(filename)
def maybeInt(s: Strin... | siddhartha-gadgil/AppyBirdDay | app/models/BirdRace.scala | Scala | mit | 733 |
/*
* ____ ____ _____ ____ ___ ____
* | _ \\ | _ \\ | ____| / ___| / _/ / ___| Precog (R)
* | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data
* | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, In... | precog/platform | common/src/main/scala/com/precog/common/security/Authorities.scala | Scala | agpl-3.0 | 2,898 |
/*
Copyright 2013 Twitter, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | twitter/summingbird | summingbird-storm-test/src/test/scala/com/twitter/summingbird/storm/TopologyTests.scala | Scala | apache-2.0 | 12,516 |
// Equites, a Scala chess playground
// Copyright © 2011, 2013-2014 Frank S. Thomas <frank@timepit.eu>
//
// This program 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
/... | equites-chess/equites-core | src/main/scala/eu/timepit/equites/util/PieceUtil.scala | Scala | gpl-3.0 | 3,575 |
package se.culvertsoft.mgen.cpppack.generator.impl.classcpp
import scala.collection.JavaConversions.asScalaBuffer
import se.culvertsoft.mgen.api.model.ClassType
import se.culvertsoft.mgen.api.model.Module
import se.culvertsoft.mgen.compiler.internal.BuiltInGeneratorUtil.endl
import se.culvertsoft.mgen.compiler.intern... | culvertsoft/mgen | mgen-cppgenerator/src/main/scala/se/culvertsoft/mgen/cpppack/generator/impl/classcpp/MkEqOperator.scala | Scala | mit | 1,417 |
package blended.streams.testsupport
import java.io.ByteArrayInputStream
import akka.util.ByteString
import blended.streams.message.FlowMessage.FlowMessageProps
import blended.streams.message.{FlowMessage, MsgProperty}
import blended.util.FileHelper
import blended.util.logging.Logger
import javax.xml.bind.DatatypeConv... | lefou/blended | blended.streams.testsupport/src/main/scala/blended/streams/testsupport/StreamsMessageFactory.scala | Scala | apache-2.0 | 2,633 |
package helpers
import java.io.FileInputStream
import java.util.Properties
/**
* Created by arthur on 17-4-10.
*/
object Configurations {
private var zookeeperIp = "192.168.18.230"
private var zookeeperPort = "2181"
def getZookeeperIp = zookeeperIp
def getZookeeperPort = zookeeperPort
def loadProperti... | tyhtao1990/BaymaxHome | jcBigData/KafkaConsumer/src/main/scala/helpers/Configurations.scala | Scala | apache-2.0 | 624 |
package dotty.tools.scaladoc
package tasty
import collection.JavaConverters._
import scala.quoted._
import NameNormalizer._
import SyntheticsSupport._
trait TypesSupport:
self: TastyParser =>
type SSignature = List[SignaturePart]
def getGivenInstance(method: qctx.reflect.DefDef): Option[SSignature] =
im... | dotty-staging/dotty | scaladoc/src/dotty/tools/scaladoc/tasty/TypesSupport.scala | Scala | apache-2.0 | 15,687 |
package edu.cmu.cs.oak.exceptions
import edu.cmu.cs.oak.value.OakValue
import edu.cmu.cs.oak.value.ArrayValue
class KeyNotInDomainException(name: String, av: ArrayValue, key: OakValue) extends OakException {
} | smba/oak | edu.cmu.cs.oak/src/main/scala/edu/cmu/cs/oak/exceptions/KeyNotInDomainException.scala | Scala | lgpl-3.0 | 214 |
package com.docurated.clustermc.actors
import com.docurated.clustermc.protocol.MasterWorkerProtocol.{WorkIsDone, WorkIsDoneFailed}
import com.docurated.clustermc.protocol.PolledMessage
import com.docurated.clustermc.util.ActorStack
import com.docurated.clustermc.workflow.Workflow
import org.joda.time.{DateTime, DateTi... | Docurated/clustermc | src/main/scala/com/docurated/clustermc/actors/WorkflowMasterSummary.scala | Scala | apache-2.0 | 1,391 |
package com.example
import android.app.Activity
import android.os.Bundle
class MainActivity extends Activity with TypedFindView {
lazy val textview = findView(TR.text)
/** Called when the activity is first created. */
override def onCreate(savedInstanceState: Bundle): Unit = {
super.onCreate(save... | pfn/android-sdk-plugin | sbt-test/no-travis/protify-compatibility/src/main/scala/com/example/sample.scala | Scala | bsd-3-clause | 431 |
/*
* 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/main/scala/uk/gov/hmrc/ct/accounts/AccountsPreviousPeriodValidation.scala | Scala | apache-2.0 | 1,015 |
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3
package com.komanov.serialization.domain.protos.site
@SerialVersionUID(0L)
final case class PageComponentPositionPb(
x: Int = 0,
y: Int = 0
) extends com.trueaccord.scalapb.GeneratedMessage ... | dkomanov/scala-serialization | scala-serialization/src/main/scala/com/komanov/serialization/domain/protos/site/PageComponentPositionPb.scala | Scala | mit | 4,391 |
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.