repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
santhoshkumarvs/spark | mllib/src/test/scala/org/apache/spark/ml/regression/LinearRegressionSuite.scala | /*
* 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 ... |
santhoshkumarvs/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/FileDataSourceV2.scala | /*
* 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 ... |
santhoshkumarvs/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/arrow/ArrowConverters.scala | /*
* 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 ... |
santhoshkumarvs/spark | core/src/test/scala/org/apache/spark/scheduler/CoarseGrainedSchedulerBackendSuite.scala | /*
* 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 ... |
santhoshkumarvs/spark | resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/BasicDriverFeatureStep.scala | /*
* 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 ... |
santhoshkumarvs/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/sources/TextSocketSourceProvider.scala | <filename>sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/sources/TextSocketSourceProvider.scala
/*
* 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 ... |
santhoshkumarvs/spark | streaming/src/test/scala/org/apache/spark/streaming/UISeleniumSuite.scala | /*
* 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 ... |
santhoshkumarvs/spark | resource-managers/yarn/src/test/scala/org/apache/spark/network/yarn/YarnShuffleServiceSuite.scala | <filename>resource-managers/yarn/src/test/scala/org/apache/spark/network/yarn/YarnShuffleServiceSuite.scala
/*
* 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 owners... |
santhoshkumarvs/spark | sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/ProcessingTimeExecutorSuite.scala | /*
* 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 ... |
santhoshkumarvs/spark | sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkGetTablesOperation.scala | <gh_stars>10-100
/*
* 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 "Li... |
santhoshkumarvs/spark | core/src/test/scala/org/apache/spark/util/ClosureCleanerSuite.scala | /*
* 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 ... |
santhoshkumarvs/spark | external/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/MsSqlServerIntegrationSuite.scala | /*
* 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 ... |
santhoshkumarvs/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/hash.scala | <reponame>santhoshkumarvs/spark
/*
* 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 ... |
santhoshkumarvs/spark | external/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaRelation.scala | /*
* 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 ... |
santhoshkumarvs/spark | sql/core/src/test/scala/org/apache/spark/sql/internal/SQLConfSuite.scala | /*
* 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 ... |
santhoshkumarvs/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/UpdateAttributeNullability.scala | <filename>sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/UpdateAttributeNullability.scala
/*
* 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 owne... |
santhoshkumarvs/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/PushDownLeftSemiAntiJoin.scala | /*
* 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 ... |
santhoshkumarvs/spark | sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/catalog/v2/ResolveMultipartIdentifierSuite.scala | <gh_stars>10-100
/*
* 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 "Li... |
santhoshkumarvs/spark | resource-managers/mesos/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtilsSuite.scala | <filename>resource-managers/mesos/src/test/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerUtilsSuite.scala
/*
* 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 cop... |
santhoshkumarvs/spark | resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/Utils.scala | /*
* 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 ... |
santhoshkumarvs/spark | resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/features/KubernetesFeaturesTestUtils.scala | /*
* 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 ... |
santhoshkumarvs/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/ui/SQLAppStatusListener.scala | <gh_stars>10-100
/*
* 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 "Li... |
santhoshkumarvs/spark | mllib/src/main/scala/org/apache/spark/ml/util/Instrumentation.scala | <reponame>santhoshkumarvs/spark<filename>mllib/src/main/scala/org/apache/spark/ml/util/Instrumentation.scala
/*
* 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 owner... |
santhoshkumarvs/spark | mllib/src/test/scala/org/apache/spark/ml/clustering/GaussianMixtureSuite.scala | /*
* 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 ... |
santhoshkumarvs/spark | mllib/src/test/scala/org/apache/spark/ml/MLEventsSuite.scala | /*
* 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 ... |
santhoshkumarvs/spark | sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/NestedSchemaPruningBenchmark.scala | /*
* 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 ... |
santhoshkumarvs/spark | core/src/main/scala/org/apache/spark/SecurityManager.scala | /*
* 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 ... |
santhoshkumarvs/spark | repl/src/test/scala/org/apache/spark/repl/ReplSuite.scala | /*
* 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 ... |
tarangbhalodia/scala-lagom-user-crud | user-impl/src/main/scala/com/lagom/user/infrastructure/impl/UserServiceImpl.scala | <gh_stars>1-10
package com.lagom.user.infrastructure.impl
import java.util.UUID
import akka.{Done, NotUsed}
import com.lagom.user.api
import com.lagom.user.api._
import com.lagom.user.infrastructure.ElasticsearchClient
import com.lagom.user.infrastructure.util.Converters._
import com.lightbend.lagom.scaladsl.api.Serv... |
tarangbhalodia/scala-lagom-user-crud | user-impl/src/main/scala/com/lagom/user/infrastructure/impl/LagomUserLoader.scala | package com.lagom.user.infrastructure.impl
import com.lagom.user.api.UserService
import com.lagom.user.infrastructure.ElasticsearchClient
import com.lightbend.lagom.scaladsl.api.ServiceLocator
import com.lightbend.lagom.scaladsl.api.ServiceLocator.NoServiceLocator
import com.lightbend.lagom.scaladsl.devmode.LagomDevMo... |
tarangbhalodia/scala-lagom-user-crud | user-impl/src/main/scala/com/lagom/user/infrastructure/ElasticsearchClient.scala | <gh_stars>1-10
package com.lagom.user.infrastructure
import java.net.URL
import com.sksamuel.elastic4s.http.{ElasticClient, ElasticNodeEndpoint, ElasticProperties, HttpClient}
import javax.inject.Singleton
import org.apache.http.auth.{AuthScope, UsernamePasswordCredentials}
import org.apache.http.client.config.Reques... |
tarangbhalodia/scala-lagom-user-crud | user-impl/src/main/scala/com/lagom/user/infrastructure/util/Converters.scala | package com.lagom.user.infrastructure.util
import com.lagom.user.api.User
import com.sksamuel.elastic4s.http.search.SearchHits
import com.sksamuel.elastic4s.playjson._
object Converters {
implicit class RichSearchHits(val searchHits: SearchHits) extends AnyVal {
def toUsers: Seq[User] = {
searchHits.hits.... |
tarangbhalodia/scala-lagom-user-crud | user-api/src/main/scala/com/lagom/user/api/UserService.scala | <filename>user-api/src/main/scala/com/lagom/user/api/UserService.scala
package com.lagom.user.api
import java.util.UUID
import akka.{Done, NotUsed}
import com.lightbend.lagom.scaladsl.api.{Descriptor, Service, ServiceCall}
import play.api.libs.json._
trait UserService extends Service {
def getUsers(pageNumber: In... |
jyoo980/maybe | src/test/scala/NothingSpec.scala | import java.util.NoSuchElementException
import org.scalatest.matchers._
import org.scalatest.flatspec.AnyFlatSpec
class NothingSpec extends AnyFlatSpec with should.Matchers with MaybeFixture {
"Nothing" should "not be defined" in {
val none = toNothing
none.isDefined shouldBe false
}
it should "throw ... |
jyoo980/maybe | project/plugin.sbt | <reponame>jyoo980/maybe
// Adding sbt formatting tool
// See docs here: https://scalameta.org/scalafmt/docs/installation.html#task-keys
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.0")
|
jyoo980/maybe | src/main/scala/Just.scala | <reponame>jyoo980/maybe<gh_stars>1-10
final case class Just[T](x: T) extends Maybe[T] {
override def isDefined: Boolean = true
override def get: T = x
override def exists(p: T => Boolean): Boolean = p(x)
override def filter(p: T => Boolean): Maybe[T] =
if (p(x)) Just(x)
else Nothing[T]()
override... |
jyoo980/maybe | build.sbt | <filename>build.sbt
name := "maybe"
version := "0.1"
scalaVersion := "2.13.3"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.0" % "test"
|
jyoo980/maybe | src/main/scala/Nothing.scala | final case class Nothing[T]() extends Maybe[T] {
override def isDefined: Boolean = false
override def get: T =
throw new NoSuchElementException
override def exists(p: T => Boolean): Boolean = false
override def filter(p: T => Boolean): Maybe[T] = Nothing[T]()
override def filterNot(p: T => Boolean): ... |
jyoo980/maybe | src/main/scala/Maybe.scala | abstract class Maybe[T] {
/** Existential check for a Maybe[T] type
*
* @return true for Just[T], false otherwise
*/
def isDefined: Boolean
/** Evaluates to the unwrapped instance of T
*
* @return unwrapped instance of T for Just[T]
* @throws NoSuchElementException if invoked on Nothing[... |
jyoo980/maybe | src/test/scala/JustSpec.scala | <reponame>jyoo980/maybe
import org.scalatest.matchers._
import org.scalatest.flatspec.AnyFlatSpec
class JustSpec extends AnyFlatSpec with should.Matchers with MaybeFixture {
"a Just[T]" should "be defined" in {
val maybeNum = toJust(1)
maybeNum.isDefined shouldBe true
}
it should "be defined in a patte... |
jyoo980/maybe | src/test/scala/MaybeFixture.scala | <reponame>jyoo980/maybe
trait MaybeFixture {
def toJust[T](t: T): Maybe[T] = Just[T](t)
def toNothing[T]: Maybe[T] = Nothing[T]()
}
|
super-wj-0820/flink | flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/api/TableImpl.scala | /*
* 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 ... |
super-wj-0820/flink | flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/api/StreamTableEnvironment.scala | <filename>flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/api/StreamTableEnvironment.scala
/*
* 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 co... |
jgagnon1/cats-andra | src/main/scala/com/jgagnon/cats/andra/Application.scala | <filename>src/main/scala/com/jgagnon/cats/andra/Application.scala
/*
* Copyright 2017 <NAME>
*
* 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/LICE... |
jgagnon1/cats-andra | src/main/scala/com/jgagnon/cats/andra/interpreters/ScalaMapInterpreter.scala | /*
* Copyright 2017 <NAME>
*
* 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 wr... |
jgagnon1/cats-andra | src/main/scala/com/jgagnon/cats/andra/Operations.scala | /*
* Copyright 2017 <NAME>
*
* 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 wr... |
tianhuil/spark-types | Injection.scala | <reponame>tianhuil/spark-types<gh_stars>0
class Bag
trait AComponent { this: BComponent =>
val a: A
class A {
def aFunc(i: Int): Int = {
if (i == 0) {
0
} else {
b.bFunc(i - 1) + 1
}
}
}
}
trait BComponent { this: AComponent =>
val b: B
class B {
def bFunc(i: ... |
tianhuil/spark-types | Inherit.scala | <reponame>tianhuil/spark-types
trait T {
val str: String
val int: Int
}
class C1 extends T {
val str: String = "foo"
val int: Int = 2
}
class C2 {
val str: String = "foo"
val int: Int = 2
}
object D {
def foo[S <: T](s: S): String = {
s.int.toString + s.str
}
def foo1(s: C1) = foo(s)
//
/... |
Lance0312/spark-cassandra-connection-factory | src/main/scala/co/verdigris/spark/connector/cql/AwsS3USWest1ConnectionFactory.scala | package co.verdigris.spark.connector.cql
import com.amazonaws.regions.Regions
object AwsS3USWest1ConnectionFactory extends S3ConnectionFactory {
this.s3Region = Some(Regions.US_WEST_1.getName)
}
|
Lance0312/spark-cassandra-connection-factory | project/plugins.sbt | <reponame>Lance0312/spark-cassandra-connection-factory<gh_stars>0
resolvers += "Era7 maven releases" at "https://s3-eu-west-1.amazonaws.com/releases.era7.com"
addSbtPlugin("ohnosequences" % "sbt-s3-resolver" % "0.15.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.0")
|
Lance0312/spark-cassandra-connection-factory | src/main/scala/co/verdigris/spark/connector/cql/AwsS3APSouth1ConnectionFactory.scala | package co.verdigris.spark.connector.cql
import com.amazonaws.regions.Regions
object AwsS3APSouth1ConnectionFactory extends S3ConnectionFactory {
this.s3Region = Some(Regions.AP_SOUTH_1.getName)
}
|
Lance0312/spark-cassandra-connection-factory | src/main/scala/co/verdigris/spark/connector/cql/AwsS3EUCentral1ConnectionFactory.scala | package co.verdigris.spark.connector.cql
import com.amazonaws.regions.Regions
object AwsS3EUCentral1ConnectionFactory extends S3ConnectionFactory {
this.s3Region = Some(Regions.EU_CENTRAL_1.getName)
}
|
Lance0312/spark-cassandra-connection-factory | src/main/scala/co/verdigris/spark/connector/cql/S3ConnectionFactory.scala | <reponame>Lance0312/spark-cassandra-connection-factory
package co.verdigris.spark.connector.cql
import co.verdigris.spark.connector.ssl.AwsS3SSLOptions
import com.datastax.driver.core.policies.ExponentialReconnectionPolicy
import com.datastax.driver.core.{Cluster, QueryOptions, SSLOptions, SocketOptions}
import com.da... |
Lance0312/spark-cassandra-connection-factory | src/main/scala/co/verdigris/spark/connector/cql/AwsS3EUWest1ConnectionFactory.scala | package co.verdigris.spark.connector.cql
import com.amazonaws.regions.Regions
object AwsS3EUWest1ConnectionFactory extends S3ConnectionFactory {
this.s3Region = Some(Regions.EU_WEST_1.getName)
}
|
Lance0312/spark-cassandra-connection-factory | build.sbt | <filename>build.sbt
import com.amazonaws.services.s3.model.Region
name := "spark-cassandra-connection-factory"
organization := "co.verdigris.spark"
version := "0.3.5"
scalaVersion := "2.11.10"
crossScalaVersions := Seq("2.10.6", "2.11.10")
lazy val scalaTest = "org.scalatest" %% "scalatest" % "3.0.0"
libraryDependen... |
Lance0312/spark-cassandra-connection-factory | src/main/scala/co/verdigris/spark/connector/cql/AwsS3EUWest2ConnectionFactory.scala | <reponame>Lance0312/spark-cassandra-connection-factory<gh_stars>0
package co.verdigris.spark.connector.cql
import com.amazonaws.regions.Regions
object AwsS3EUWest2ConnectionFactory extends S3ConnectionFactory {
this.s3Region = Some(Regions.EU_WEST_2.getName)
}
|
Lance0312/spark-cassandra-connection-factory | src/main/scala/co/verdigris/spark/connector/cql/AwsS3APSoutheast1ConnectionFactory.scala | package co.verdigris.spark.connector.cql
import com.amazonaws.regions.Regions
object AwsS3APSoutheast1ConnectionFactory extends S3ConnectionFactory {
this.s3Region = Some(Regions.AP_SOUTHEAST_1.getName)
}
|
Lance0312/spark-cassandra-connection-factory | src/test/scala/co/verdigris/spark/connector/cql/SparkContextUnitSpec.scala | package co.verdigris.spark.connector.cql
import org.apache.spark.{SparkConf, SparkContext}
import org.scalatest.{BeforeAndAfterAll, FunSpec}
trait SparkContextUnitSpec extends FunSpec with BeforeAndAfterAll {
var master: Option[String] = None
var appName: Option[String] = None
var sparkConf: SparkConf = _
var... |
Lance0312/spark-cassandra-connection-factory | src/main/scala/co/verdigris/spark/connector/cql/AwsS3SAEast1ConnectionFactory.scala | <filename>src/main/scala/co/verdigris/spark/connector/cql/AwsS3SAEast1ConnectionFactory.scala
package co.verdigris.spark.connector.cql
import com.amazonaws.regions.Regions
object AwsS3SAEast1ConnectionFactory extends S3ConnectionFactory {
this.s3Region = Some(Regions.SA_EAST_1.getName)
}
|
Lance0312/spark-cassandra-connection-factory | src/main/scala/co/verdigris/spark/connector/cql/AwsS3APNortheast2ConnectionFactory.scala | package co.verdigris.spark.connector.cql
import com.amazonaws.regions.Regions
object AwsS3APNortheast2ConnectionFactory extends S3ConnectionFactory {
this.s3Region = Some(Regions.AP_NORTHEAST_2.getName)
}
|
Lance0312/spark-cassandra-connection-factory | src/test/scala/co/verdigris/spark/connector/ssl/AwsS3SSLOptionsTest.scala | <gh_stars>1-10
package co.verdigris.spark.connector.ssl
import com.amazonaws.regions.{Region, Regions}
import com.datastax.spark.connector.cql.CassandraConnectorConf.CassandraSSLConf
import org.scalatest.{BeforeAndAfter, FunSpec, Matchers}
class AwsS3SSLOptionsTest extends FunSpec with Matchers with BeforeAndAfter {
... |
Lance0312/spark-cassandra-connection-factory | src/main/scala/co/verdigris/spark/connector/cql/AwsS3APSoutheast2ConnectionFactory.scala | package co.verdigris.spark.connector.cql
import com.amazonaws.regions.Regions
object AwsS3APSoutheast2ConnectionFactory extends S3ConnectionFactory {
this.s3Region = Some(Regions.AP_SOUTHEAST_2.getName)
}
|
Lance0312/spark-cassandra-connection-factory | src/main/scala/co/verdigris/spark/connector/cql/AwsS3GovCloudConnectionFactory.scala | package co.verdigris.spark.connector.cql
import com.amazonaws.regions.Regions
object AwsS3GovCloudConnectionFactory extends S3ConnectionFactory {
this.s3Region = Some(Regions.GovCloud.getName)
}
|
Lance0312/spark-cassandra-connection-factory | src/main/scala/co/verdigris/spark/connector/ssl/AwsS3SSLOptions.scala | package co.verdigris.spark.connector.ssl
import co.verdigris.ssl.S3JKSSSLOptions
import com.amazonaws.regions.Region
import com.datastax.spark.connector.cql.CassandraConnectorConf.CassandraSSLConf
class AwsS3SSLOptions(
sslConf: CassandraSSLConf,
awsRegion: Option[String] = None)
extends S3JKSSSLOptio... |
Lance0312/spark-cassandra-connection-factory | src/main/scala/co/verdigris/spark/connector/cql/AwsS3CNNorth1ConnectionFactory.scala | <reponame>Lance0312/spark-cassandra-connection-factory<filename>src/main/scala/co/verdigris/spark/connector/cql/AwsS3CNNorth1ConnectionFactory.scala
package co.verdigris.spark.connector.cql
import com.amazonaws.regions.Regions
object AwsS3CNNorth1ConnectionFactory extends S3ConnectionFactory {
this.s3Region = Some(... |
Lance0312/spark-cassandra-connection-factory | src/main/scala/co/verdigris/spark/connector/cql/AwsS3USWest2ConnectionFactory.scala | package co.verdigris.spark.connector.cql
import com.amazonaws.regions.Regions
object AwsS3USWest2ConnectionFactory extends S3ConnectionFactory {
this.s3Region = Some(Regions.US_WEST_2.getName)
}
|
Lance0312/spark-cassandra-connection-factory | src/main/scala/co/verdigris/spark/connector/cql/AwsS3APNortheast1ConnectionFactory.scala | <reponame>Lance0312/spark-cassandra-connection-factory
package co.verdigris.spark.connector.cql
import com.amazonaws.regions.Regions
object AwsS3APNortheast1ConnectionFactory extends S3ConnectionFactory {
this.s3Region = Some(Regions.AP_NORTHEAST_1.getName)
}
|
Lance0312/spark-cassandra-connection-factory | src/main/scala/co/verdigris/spark/connector/cql/AwsS3CACentral1ConnectionFactory.scala | <reponame>Lance0312/spark-cassandra-connection-factory
package co.verdigris.spark.connector.cql
import com.amazonaws.regions.Regions
object AwsS3CACentral1ConnectionFactory extends S3ConnectionFactory {
this.s3Region = Some(Regions.CA_CENTRAL_1.getName)
}
|
Lance0312/spark-cassandra-connection-factory | src/test/scala/co/verdigris/spark/connector/cql/AwsS3EUWest1ConnectionFactoryTest.scala | package co.verdigris.spark.connector.cql
import com.datastax.driver.core.Cluster
class AwsS3EUWest1ConnectionFactoryTest extends ConnectionFactorySpec {
override def beforeAll {
super.beforeAll
factory = AwsS3EUWest1ConnectionFactory
}
describe(".clusterBuilder") {
it("should return a new Cluster.... |
sridhar-sid/almaren-framework | src/main/scala/com/github/music/of/the/ainur/almaren/state/core/Source.scala | package com.github.music.of.the.ainur.almaren.state.core
import com.github.music.of.the.ainur.almaren.State
import org.apache.spark.sql.DataFrame
private[ainur] abstract class Source() extends State {
override def executor(df: DataFrame): DataFrame = source(df)
def source(df: DataFrame): DataFrame
}
case class... |
sridhar-sid/almaren-framework | src/main/scala/com/github/music/of/the/ainur/almaren/builder/core/Source.scala | package com.github.music.of.the.ainur.almaren.builder.core
import com.github.music.of.the.ainur.almaren.Tree
import com.github.music.of.the.ainur.almaren.builder.Core
import com.github.music.of.the.ainur.almaren.state.core.{SourceJdbc, SourceSql, SourceFile}
private[almaren] trait Source extends Core {
def sourceS... |
oyinda-subair/el-documento | src/main/scala/org/el/documento/config/http/BasicAuthentication.scala | package org.el.documento.config.http
import java.util.UUID
import akka.http.scaladsl.server._
import akka.http.scaladsl.model.headers._
import akka.http.scaladsl.server.Directives._
import org.el.documento.config.ApplicationConfig
import org.el.documento.model.{Public, SuperAdmin, UserClaim}
import scala.concurrent.... |
oyinda-subair/el-documento | src/main/scala/org/el/documento/ServiceMain.scala | package org.el.documento
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.server.Route
import akka.http.scaladsl.server.Directives._
import akka.stream.ActorMaterializer
import de.heikoseeberger.akkahttpplayjson.PlayJsonSupport
import org.el.documento.config.ApplicationConfig
impo... |
oyinda-subair/el-documento | src/main/scala/org/el/documento/messages/CreateRoleRequest.scala | package org.el.documento.messages
import play.api.libs.json.{Format, Json}
case class CreateRoleRequest(title: String, roleType: Option[String])
object CreateRoleRequest {
implicit val format: Format[CreateRoleRequest] = Json.format
} |
oyinda-subair/el-documento | src/test/scala/org/el/documento/DocumentoRouteTestkit.scala | <filename>src/test/scala/org/el/documento/DocumentoRouteTestkit.scala
package org.el.documento
import akka.actor.ActorSystem
import akka.http.scaladsl.model.{HttpEntity, MediaTypes}
import akka.http.scaladsl.server.Directives.{handleExceptions, handleRejections}
import akka.http.scaladsl.server.Route
import akka.http.... |
oyinda-subair/el-documento | src/main/scala/org/el/documento/controller/DocumentoController.scala | package org.el.documento.controller
import java.util.UUID
import akka.Done
import akka.actor.ActorSystem
import org.el.documento.config.base.SecureHelper.confirmPassword
import org.el.documento.config.ApplicationConfig
import org.el.documento.config.exceptions.{ResourceNotFoundException, UnauthorizedUserException}
im... |
oyinda-subair/el-documento | src/main/scala/org/el/documento/config/ApplicationConfig.scala | package org.el.documento.config
import com.typesafe.config.ConfigFactory
import org.slf4j.Logger
import org.slf4j.LoggerFactory
trait ApplicationConfig {
lazy val className: String = if(this.getClass.getCanonicalName != null)
this.getClass.getCanonicalName else "none"
private val config = ConfigFactory.load... |
oyinda-subair/el-documento | src/main/scala/org/el/documento/model/UserId.scala | package org.el.documento.model
import java.util.UUID
import play.api.libs.json.{Format, Json}
case class UserId(userId: UUID)
object UserId {
implicit val format: Format[UserId] = Json.format
}
case class UserClaim(userId: UUID, roleTitle: String)
object UserClaim {
implicit val format: Format[UserClaim] = ... |
oyinda-subair/el-documento | src/test/scala/org/el/documento/route/UserRouteSpec.scala | package org.el.documento.route
import akka.Done
import akka.http.scaladsl.model._
import org.el.documento.DocumentoRouteTestkit
import org.el.documento.messages.{CreateRoleRequest, CreateUserRequest, LoginByEmail}
import org.scalatest.concurrent.ScalaFutures
import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpec}... |
oyinda-subair/el-documento | src/main/scala/org/el/documento/config/exceptions/DocumentoRejections.scala | package org.el.documento.config.exceptions
import akka.http.javadsl.server.Rejection
case class UnauthorizedUser(message: String) extends Rejection |
oyinda-subair/el-documento | src/main/scala/org/el/documento/model/UserEntity.scala | package org.el.documento.model
import java.util.UUID
import org.el.documento.config.base.FormatEntity
import org.joda.time.DateTime
import play.api.libs.json.{Format, Json}
case class UserEntity(
userId: UUID,
name: String,
username: String,
... |
oyinda-subair/el-documento | src/test/scala/org/el/documento/Util.scala | <reponame>oyinda-subair/el-documento
package org.el.documento
import scala.util.Random
object Util {
private val random = new Random(System.currentTimeMillis)
def string10 = new String(Array.fill(10)((random.nextInt(26) + 65).toByte))
}
|
oyinda-subair/el-documento | build.sbt | val akkaHttpVersion = "10.1.9"
val akkaStreamVersion = "2.5.23"
val akkaSlickVersion = "1.1.1"
val playJsonVersion = "2.7.3"
val flywayVersion = "5.0.2"
val scalaTestVersion = "3.0.8"
val akkaHttpSessionVersion = "0.5.10"
val pauldijouVersion = "4.0.0"
val log4jVersion = "2.10.0"
val sentryVersion =... |
oyinda-subair/el-documento | src/main/scala/org/el/documento/database/ElDocumentoDAO.scala | package org.el.documento.database
import org.el.documento.repo.{RoleEntities, UserEntities}
import scala.concurrent.ExecutionContext
class ElDocumentoDAO(implicit ec: ExecutionContext) extends UserEntities with RoleEntities with DatabaseConnector {
object UserRepo extends UserRepository
object RoleRepo extends R... |
oyinda-subair/el-documento | src/main/scala/org/el/documento/config/exceptions/DocumentoExceptions.scala | <filename>src/main/scala/org/el/documento/config/exceptions/DocumentoExceptions.scala
package org.el.documento.config.exceptions
case class ResourceNotFoundException(message: String, cause: Option[Throwable] = None) extends Exception(message, cause.orNull)
case class UnauthorizedUserException(message: String, cause: ... |
oyinda-subair/el-documento | project/plugins.sbt | <reponame>oyinda-subair/el-documento
addSbtPlugin("io.github.davidmweber" % "flyway-sbt" % "6.0.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")
addSbtPlugin("au.com.onegeek" %% "sbt-dotenv" % "2.0.117")
resolvers += "Flyway" at "https://flywaydb.org/repo" |
oyinda-subair/el-documento | src/main/scala/org/el/documento/config/base/SecureHelper.scala | <gh_stars>0
package org.el.documento.config.base
import org.mindrot.jbcrypt.BCrypt
object SecureHelper {
def hashPassword(password: String): String = {
BCrypt.hashpw(password, BCrypt.gensalt())
}
def confirmPassword(password: String, hashPassword: String): Boolean = {
BCrypt.checkpw(password, hashPassw... |
oyinda-subair/el-documento | src/main/scala/org/el/documento/repo/UserEntities.scala | <gh_stars>0
package org.el.documento.repo
import java.util.UUID
import org.el.documento.config.base.SecureHelper._
import org.el.documento.database.DatabaseConnector
import org.el.documento.messages.CreateUserRequest
import org.el.documento.model.{UserClaim, UserEntity}
import org.joda.time.DateTime
import slick.ast.... |
oyinda-subair/el-documento | src/main/scala/org/el/documento/repo/RoleEntities.scala | <reponame>oyinda-subair/el-documento<filename>src/main/scala/org/el/documento/repo/RoleEntities.scala
package org.el.documento.repo
import org.el.documento.database.DatabaseConnector
import org.el.documento.messages.CreateRoleRequest
import org.el.documento.model.RoleEntity
import org.joda.time.DateTime
import slick.a... |
oyinda-subair/el-documento | src/main/scala/org/el/documento/messages/LoginByEmail.scala | package org.el.documento.messages
import play.api.libs.json.{Format, Json}
case class LoginByEmail(email: String, password: String)
object LoginByEmail {
implicit val format: Format[LoginByEmail] = Json.format
}
|
oyinda-subair/el-documento | src/main/scala/org/el/documento/config/http/RouteHandlerConfig.scala | package org.el.documento.config.http
import akka.http.scaladsl.model.StatusCode
import akka.http.scaladsl.model.{ContentTypes, HttpEntity, HttpResponse}
import akka.http.scaladsl.model.StatusCodes._
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.server._
import org.el.documento.config.exceptio... |
oyinda-subair/el-documento | src/main/scala/org/el/documento/config/base/DateTimeFormatter.scala | <reponame>oyinda-subair/el-documento
package org.el.documento.config.base
import org.joda.time.DateTime
import org.joda.time.format.DateTimeFormat
import play.api.libs.json.{JsNull, JsString, JsValue, Reads, Writes}
object DateTimeFormatter {
val dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
val jodaDateReads: Reads... |
oyinda-subair/el-documento | src/main/scala/org/el/documento/model/RoleEntity.scala | <reponame>oyinda-subair/el-documento
package org.el.documento.model
import org.el.documento.config.base.FormatEntity
import org.joda.time.DateTime
import play.api.libs.json.{Format, Json}
case class RoleEntity(
roleId: Int,
title: String,
roleType: ... |
oyinda-subair/el-documento | src/main/scala/org/el/documento/database/DatabaseConnector.scala | package org.el.documento.database
import org.el.documento.config.ApplicationConfig
import slick.basic.DatabaseConfig
import slick.jdbc.JdbcProfile
trait DatabaseConnector extends ApplicationConfig {
val driver: JdbcProfile = slick.jdbc.PostgresProfile
import driver.api._
private val databaseConfig = Database... |
oyinda-subair/el-documento | src/main/scala/org/el/documento/route/DocumentoRoute.scala | package org.el.documento.route
import akka.actor.ActorSystem
import akka.http.scaladsl.server.Route
import akka.http.scaladsl.model._
import akka.http.scaladsl.server.Directives._
import de.heikoseeberger.akkahttpplayjson.PlayJsonSupport
import org.el.documento.config.http.{BasicAuthentication, JWTAuthenticationServic... |
oyinda-subair/el-documento | src/main/scala/org/el/documento/config/http/JWTAuthentication.scala | <gh_stars>0
package org.el.documento.config.http
import org.el.documento.config.ApplicationConfig
import org.el.documento.model.UserClaim
import pdi.jwt.{Jwt, JwtAlgorithm}
import play.api.libs.json.Json
import scala.util.{Failure, Success, Try}
trait JWTAuthenticationServices {
def generateToken(userClaim: UserCl... |
oyinda-subair/el-documento | src/main/scala/org/el/documento/config/ErrorResponse.scala | package org.el.documento.config
import play.api.libs.json.{Format, Json}
case class ErrorResponse(code: Int, `type`: String, message: String) {
def toStrEntity = Json.toJson(this).toString()
}
object ErrorResponse {
implicit val format: Format[ErrorResponse] = Json.format
}
|
oyinda-subair/el-documento | src/main/scala/org/el/documento/messages/CreateUserRequest.scala | <filename>src/main/scala/org/el/documento/messages/CreateUserRequest.scala
package org.el.documento.messages
import org.el.documento.config.base.FormatEntity
import play.api.libs.json.{Format, Json}
case class CreateUserRequest(
name: String,
username: Strin... |
Nboaram/shapeless-guide-code | build.sbt | scalaVersion in ThisBuild := "2.13.5"
scalacOptions in Global ++= Seq(
"-deprecation",
"-encoding",
"UTF-8",
"-unchecked",
"-feature",
// Linter configuration (replaces -Xfatal-warnings, -Xlint, etc). More info here:
// https://www.scala-lang.org/2021/01/12/configuring-and-suppressing-warnings.html
Lis... |
frozenspider/fs-common-utils | src/main/scala/org/fs/utility/RichGeneralImplicits.scala | <filename>src/main/scala/org/fs/utility/RichGeneralImplicits.scala<gh_stars>0
package org.fs.utility
import java.io.StringWriter
import java.io.PrintWriter
/**
* Some general implicit helpers
*
* @author FS
*/
trait RichGeneralImplicits {
/** Throwable enriched with some of most general support methods */
imp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.