repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
lindemer/pmp | src/test/scala/PmpConfig.scala | <reponame>lindemer/pmp
package config
import spinal.core._
import spinal.core.SpinalConfig
import spinal.core.sim.SimConfig
object PmpConfig {
val spinalConfig = SpinalConfig(
defaultClockDomainFrequency = FixedFrequency(10 MHz),
targetDirectory = "rtl"
)
def apply() = SimConfig.withWave
... |
ruuda/matasano | src/main/scala/Set1/Challenge7.scala | <filename>src/main/scala/Set1/Challenge7.scala
// Copyright 2016 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// A copy of the License is available in the root of the repository.
import io.Source
import com.matasano.Ae... |
ruuda/matasano | src/main/scala/Crypto.scala | <filename>src/main/scala/Crypto.scala
// Copyright 2016 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// A copy of the License is available in the root of the repository.
package com.matasano
object Crypto {
def xor(a... |
ruuda/matasano | src/main/scala/Util.scala | // Copyright 2016 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// A copy of the License is available in the root of the repository.
package com.matasano
object Util {
val bitCount: Int => Int = java.lang.Integer.bitC... |
ruuda/matasano | src/test/scala/Aes.scala | <gh_stars>0
// Copyright 2016 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// A copy of the License is available in the root of the repository.
import org.scalacheck.Gen
import org.scalacheck.Properties
import org.scala... |
ruuda/matasano | src/main/scala/Set1/Challenge5.scala | <filename>src/main/scala/Set1/Challenge5.scala
// Copyright 2016 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// A copy of the License is available in the root of the repository.
import com.matasano.Crypto
import com.ma... |
ruuda/matasano | src/test/scala/Encoding.scala | <reponame>ruuda/matasano<filename>src/test/scala/Encoding.scala<gh_stars>0
// Copyright 2016 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// A copy of the License is available in the root of the repository.
import org.s... |
ruuda/matasano | src/main/scala/Set1/Challenge6.scala | <filename>src/main/scala/Set1/Challenge6.scala
// Copyright 2016 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// A copy of the License is available in the root of the repository.
import io.Source
import com.matasano.Cr... |
ruuda/matasano | src/test/scala/Set1.scala | // Copyright 2016 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// A copy of the License is available in the root of the repository.
import org.scalacheck.Properties
import com.matasano.Crypto
import com.matasano.Encodi... |
ruuda/matasano | src/test/scala/Util.scala | // Copyright 2016 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// A copy of the License is available in the root of the repository.
import org.scalacheck.Arbitrary
import org.scalacheck.Gen
import org.scalacheck.Propert... |
ruuda/matasano | build.sbt | name := "matasano"
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.13.4" % "test"
|
ruuda/matasano | src/main/scala/Aes.scala | <filename>src/main/scala/Aes.scala
// Copyright 2016 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// A copy of the License is available in the root of the repository.
package com.matasano
object Aes {
import javax.cr... |
ruuda/matasano | src/main/scala/Set1/Challenge3.scala | <filename>src/main/scala/Set1/Challenge3.scala
// Copyright 2016 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// A copy of the License is available in the root of the repository.
import com.matasano.Crypto
import com.ma... |
ruuda/matasano | src/main/scala/Set1/Challenge1.scala | // Copyright 2016 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// A copy of the License is available in the root of the repository.
import com.matasano.Encoding
object Challenge1 {
def main(args: Array[String]) = {
... |
ruuda/matasano | src/test/scala/Crypto.scala | <reponame>ruuda/matasano
// Copyright 2016 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// A copy of the License is available in the root of the repository.
import org.scalacheck.Gen
import org.scalacheck.Properties
imp... |
ruuda/matasano | src/main/scala/TextDetection.scala | <reponame>ruuda/matasano
// Copyright 2016 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// A copy of the License is available in the root of the repository.
package com.matasano
import collection.immutable.SortedMap
im... |
ruuda/matasano | src/main/scala/Set1/Challenge2.scala | // Copyright 2016 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// A copy of the License is available in the root of the repository.
import com.matasano.Crypto
import com.matasano.Encoding
object Challenge2 {
def main... |
ruuda/matasano | src/main/scala/Set1/Challenge8.scala | // Copyright 2016 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// A copy of the License is available in the root of the repository.
import io.Source
import com.matasano.Encoding
import com.matasano.Util
object Challen... |
ruuda/matasano | src/test/scala/Set2.scala | // Copyright 2016 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// A copy of the License is available in the root of the repository.
import org.scalacheck.Properties
import com.matasano.Encoding
import com.matasano.Util... |
ruuda/matasano | src/main/scala/Set2/Challenge10.scala | <filename>src/main/scala/Set2/Challenge10.scala
// Copyright 2016 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// A copy of the License is available in the root of the repository.
import io.Source
import com.matasano.A... |
ruuda/matasano | src/main/scala/Encoding.scala | // Copyright 2016 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// A copy of the License is available in the root of the repository.
package com.matasano
object Encoding {
val hexChars = "0123456789abcdef"
val base6... |
kmbnw/multitreat | scala/build.sbt | name := "multitreat"
version := "0.1a"
organization := "net.kmbnw"
scalaVersion := "2.10.5"
libraryDependencies += "org.apache.spark" %% "spark-core" % "1.6.2"
libraryDependencies += "org.apache.spark" %% "spark-sql" % "1.6.2"
libraryDependencies += "org.apache.spark" %% "spark-hive" % "1.6.2"
libraryDep... |
kmbnw/multitreat | scala/src/test/scala/net/kmbnw/multitreat/TestMultitreat.scala | <gh_stars>1-10
/*
* Copyright 2016 <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 ... |
kmbnw/multitreat | scala/src/main/scala/net/kmbnw/multitreat/TreatmentPlan.scala | <filename>scala/src/main/scala/net/kmbnw/multitreat/TreatmentPlan.scala
/*
* Copyright 2016 <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/license... |
phymbert/spark-search | sql/src/test/scala/org/apache/spark/search/sql/TestData.scala | <reponame>phymbert/spark-search<filename>sql/src/test/scala/org/apache/spark/search/sql/TestData.scala
/*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may ... |
phymbert/spark-search | core/src/main/scala/org/apache/spark/search/rdd/SearchRDD.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
phymbert/spark-search | core/src/main/scala/org/apache/spark/search/rdd/SearchRDDImpl.scala | <filename>core/src/main/scala/org/apache/spark/search/rdd/SearchRDDImpl.scala
/*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the Lice... |
phymbert/spark-search | sql/src/test/scala/org/apache/spark/search/sql/LocalSparkSession.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
phymbert/spark-search | core/src/test/scala/org/apache/spark/search/rdd/DocumentBeanUpdaterSuite.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
phymbert/spark-search | benchmark/src/main/scala-2.11/benchmark/LuceneRDDBenchmark.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
phymbert/spark-search | examples/src/main/scala/all/examples/org/apache/spark/search/rdd/SearchRDDExamples.scala | <filename>examples/src/main/scala/all/examples/org/apache/spark/search/rdd/SearchRDDExamples.scala
/*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obta... |
phymbert/spark-search | sql/src/main/scala/org/apache/spark/search/sql/expression.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
phymbert/spark-search | core/src/main/scala/org/apache/spark/search/rdd/SearchJavaBaseRDD.scala | <filename>core/src/main/scala/org/apache/spark/search/rdd/SearchJavaBaseRDD.scala
/*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the ... |
phymbert/spark-search | core/src/main/scala/org/apache/spark/search/rdd/ZipUtils.scala | <reponame>phymbert/spark-search
/*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/license... |
phymbert/spark-search | core/src/main/scala/org/apache/spark/search/rdd/SearchRDDCartesian.scala | <filename>core/src/main/scala/org/apache/spark/search/rdd/SearchRDDCartesian.scala<gh_stars>10-100
/*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obta... |
phymbert/spark-search | core/src/main/scala/org/apache/spark/search/rdd/RDDWithSearch.scala | <reponame>phymbert/spark-search<filename>core/src/main/scala/org/apache/spark/search/rdd/RDDWithSearch.scala<gh_stars>10-100
/*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with th... |
phymbert/spark-search | core/src/main/scala/org/apache/spark/search/package.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
phymbert/spark-search | sql/src/test/scala/org/apache/spark/search/sql/SearchDatasetSuite.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
phymbert/spark-search | sql/src/main/scala/org/apache/spark/search/sql/SearchRule.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
phymbert/spark-search | core/src/test/scala/org/apache/spark/search/rdd/SearchRDDSuite.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
phymbert/spark-search | core/src/main/scala/org/apache/spark/search/rdd/SearchRDDIndexer.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
phymbert/spark-search | core/src/test/scala/org/apache/spark/search/rdd/TestData.scala | <filename>core/src/test/scala/org/apache/spark/search/rdd/TestData.scala
/*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License a... |
phymbert/spark-search | examples/src/main/scala/all/examples/org/apache/spark/search/rdd/ExampleData.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
phymbert/spark-search | core/src/test/scala/org/apache/spark/search/rdd/ZipUtilsSuite.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
phymbert/spark-search | benchmark/src/main/scala/benchmark/SparkRDDRegexBenchmark.scala | <reponame>phymbert/spark-search<gh_stars>10-100
/*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.ap... |
phymbert/spark-search | core/src/main/scala/org/apache/spark/search/rdd/SearchRDDReloaded.scala | <reponame>phymbert/spark-search<filename>core/src/main/scala/org/apache/spark/search/rdd/SearchRDDReloaded.scala
/*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
... |
phymbert/spark-search | sql/src/main/scala/org/apache/spark/search/sql/SearchStrategy.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
phymbert/spark-search | sql/src/main/scala/org/apache/spark/search/sql/physical.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
phymbert/spark-search | sql/src/main/scala/org/apache/spark/search/sql/logical.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
phymbert/spark-search | core/src/main/scala/org/apache/spark/search/rdd/package.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
phymbert/spark-search | sql/src/main/scala/org/apache/spark/search/sql/ColumnWithSearch.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
phymbert/spark-search | sql/src/main/scala/org/apache/spark/search/sql/package.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
phymbert/spark-search | benchmark/src/main/scala/benchmark/BaseBenchmark.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
phymbert/spark-search | benchmark/src/main/scala/benchmark/SearchRDDBenchmark.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
phymbert/spark-search | benchmark/src/main/scala/benchmark/ElasticsearchBenchmark.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
phymbert/spark-search | core/src/test/scala/org/apache/spark/search/rdd/SearchIndexRDDSuite.scala | /*
* Copyright © 2020 Spark Search (The Spark Search Contributors)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... |
leozc/lambda_java_example_pantsbuild | lambda/src/scala/com/example/slack/main/slack.scala | <reponame>leozc/lambda_java_example_pantsbuild<filename>lambda/src/scala/com/example/slack/main/slack.scala
package com.example.slack.main
import java.io.{InputStream, OutputStream}
import java.nio.charset.StandardCharsets.UTF_8
import org.json4s._
import org.json4s.JsonDSL._
import org.json4s.jackson.JsonMethods._
... |
foursquare/util | util-core/src/main/scala/com/twitter/util/Future.scala | <gh_stars>1-10
package com.twitter.util
import com.twitter.concurrent.{Offer, IVar, Tx, Scheduler}
import java.util.concurrent.atomic.{
AtomicBoolean, AtomicInteger, AtomicReference,
AtomicReferenceArray}
import java.util.concurrent.{Future => JavaFuture, TimeUnit}
import scala.annotation.tailrec
import scala.coll... |
foursquare/util | util-app/src/test/scala/com/twitter/app/FlagTest.scala | package com.twitter.app
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
import org.junit.runner.RunWith
object MyGlobalFlag extends GlobalFlag("a test flag", "a global test flag")
@RunWith(classOf[JUnitRunner])
class FlagTest extends FunSuite {
test("Flaggable: parse booleans") {
assert(Fl... |
foursquare/util | util-core/src/main/scala/com/twitter/concurrent/Spool.scala | <gh_stars>1-10
package com.twitter.concurrent
import scala.collection.mutable.ArrayBuffer
import com.twitter.util.{Future, Promise, Return, Await, Duration}
/**
* A spool is an asynchronous stream. It more or less
* mimics the scala {{Stream}} collection, but with cons
* cells that have deferred tails.
*
* Cons... |
foursquare/util | util-core/src/main/scala/com/twitter/util/Timer.scala | <filename>util-core/src/main/scala/com/twitter/util/Timer.scala
package com.twitter.util
import com.twitter.concurrent.NamedPoolThreadFactory
import com.twitter.concurrent.Serialized
import com.twitter.conversions.time._
import java.util.concurrent.atomic.AtomicBoolean
import java.util.concurrent.{CancellationExceptio... |
foursquare/util | util-core/src/main/scala/com/twitter/util/Closable.scala | package com.twitter.util
/**
* Closable is a mixin trait to describe a closable ``resource``.
*/
trait Closable { self =>
/**
* Close the resource. The returned Future is completed when
* the resource has been fully relinquished.
*/
final def close(): Future[Unit] = close(Time.Bottom)
/**
* Close... |
foursquare/util | util-jvm/src/main/scala/com/twitter/jvm/ContentionSnapshot.scala | package com.twitter.jvm
import java.lang.management.{ManagementFactory, ThreadInfo}
import java.lang.Thread.State._
import scala.collection.mutable
/**
* A thread contention summary. This provides a brief overview of threads
* that are blocked or otherwise waiting.
*
* While this could be an object, we use instan... |
foursquare/util | util-core/src/test/scala/com/twitter/concurrent/SpoolSpec.scala | <gh_stars>1-10
package com.twitter.concurrent
import scala.collection.mutable.ArrayBuffer
import org.specs.SpecificationWithJUnit
import com.twitter.util.{Await, Future, Promise, Return, Throw}
import Spool.{*::, **::}
class SpoolSpec extends SpecificationWithJUnit {
"Empty Spool" should {
val s = Spool.empty[... |
foursquare/util | util-core/src/test/scala/com/twitter/concurrent/AsyncSemaphoreSpec.scala | package com.twitter.concurrent
import org.specs.SpecificationWithJUnit
import org.specs.mock.Mockito
import java.util.concurrent.{ConcurrentLinkedQueue, RejectedExecutionException}
import com.twitter.util.Await
class AsyncSemaphoreSpec extends SpecificationWithJUnit with Mockito {
"AsyncSemaphore" should {
var ... |
foursquare/util | util-logging/src/main/scala/com/twitter/logging/App.scala | <reponame>foursquare/util
package com.twitter.logging
import com.twitter.app.{App, Flaggable}
import com.twitter.util.{Throw, Return}
object Logging {
implicit object LevelFlaggable extends Flaggable[Level] {
def parse(s: String) =
if (Logger.levelNames contains s)
Logger.levelNames(s)
else
... |
foursquare/util | util-zk-common/src/test/scala/com/twitter/zk/CommonConnectorSpec.scala | <filename>util-zk-common/src/test/scala/com/twitter/zk/CommonConnectorSpec.scala
package com.twitter.zk
import com.twitter.common.net.InetSocketAddressHelper
import com.twitter.common.zookeeper.ZooKeeperClient
import com.twitter.conversions.common.quantity._
import com.twitter.conversions.common.zookeeper._
import com... |
foursquare/util | util-core/src/main/scala/com/twitter/util/Awaitable.scala | <reponame>foursquare/util
package com.twitter.util
import java.util.concurrent.atomic.AtomicBoolean
/**
* Wait for the result of some action. Awaitable is not used
* directly, but through the `Await` object.
*/
trait Awaitable[+T] {
import Awaitable._
/**
* Support for `Await.ready`. The use of the implici... |
foursquare/util | project/Build.scala | <filename>project/Build.scala
import sbt._
import Keys._
object Util extends Build {
val zkVersion = "3.3.4"
val sharedSettings = Seq(
version := "6.3.0",
organization := "com.twitter",
crossScalaVersions := Seq("2.9.2", "2.10.0"),
// Workaround for a scaladoc bug which causes it to choke on
/... |
foursquare/util | util-jvm/src/main/scala/com/twitter/jvm/Estimator.scala | <reponame>foursquare/util
package com.twitter.jvm
import scala.util.Random
/**
* An estimator for values of type T.
*/
trait Estimator[T] {
/** A scalar measurement `m` was taken */
def measure(m: T)
/** Estimate the current value */
def estimate: T
}
/**
* A simple Kalman filter to estimate a scalar val... |
foursquare/util | util-logging/src/main/scala/com/twitter/logging/SyslogHandler.scala | /*
* Copyright 2010 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 t... |
foursquare/util | util-core/src/test/scala/com/twitter/concurrent/BrokerSpec.scala | package com.twitter.concurrent
import org.specs.SpecificationWithJUnit
import org.specs.mock.Mockito
import org.mockito.{Matchers, ArgumentCaptor}
import com.twitter.util.{Await, Return}
import com.twitter.common.objectsize.ObjectSizeCalculator
class BrokerSpec extends SpecificationWithJUnit with Mockito {
"Broker"... |
scarraway/scala-item-microservice | src/main/scala/AkkaHttpMicroservice.scala | import akka.actor.ActorSystem
import akka.http.scaladsl.server.{Directives, PathMatchers, Route, RouteResult}
import akka.event.{Logging, LoggingAdapter}
import akka.http.scaladsl.Http
import akka.stream.{ActorMaterializer, Materializer}
import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport
import akka.http.... |
scarraway/scala-item-microservice | src/test/scala/ServiceSpec.scala | import akka.event.NoLogging
import akka.http.scaladsl.model.ContentTypes._
import akka.http.scaladsl.model.StatusCodes._
import akka.http.scaladsl.testkit.ScalatestRouteTest
import org.scalatest._
class ServiceSpec extends FlatSpec with Matchers with ScalatestRouteTest with Service {
override def testConfigSource = ... |
wix/libpay-creditguard | libpay-creditguard-common/src/main/scala/com/wix/pay/creditguard/model/Commands.scala | <gh_stars>1-10
package com.wix.pay.creditguard.model
object Commands {
/** The doDeal command is used to process transactions in the CG Gateway. */
val doDeal = "doDeal"
}
|
wix/libpay-creditguard | libpay-creditguard-common/src/main/scala/com/wix/pay/creditguard/model/TransactionCodes.scala | package com.wix.pay.creditguard.model
object TransactionCodes {
/** Swiping of magnetic card. */
val regular = "Regular"
/** Self service. */
val selfService = "SelfService"
/** Fuel self service. */
val fuelSelfService = "FuelSelfService"
val contactless = "Contactless"
val contactle... |
wix/libpay-creditguard | libpay-creditguard-common/src/main/scala/com/wix/pay/creditguard/model/Currencies.scala | <filename>libpay-creditguard-common/src/main/scala/com/wix/pay/creditguard/model/Currencies.scala
package com.wix.pay.creditguard.model
object Currencies {
/** New Israeli Shekel USD linked. */
val ilsByUsd = "IlsByUsd"
/** New Israeli Shekel index linked. */
val ilsbyIndex = "IlsbyIndex"
}
|
wix/libpay-creditguard | libpay-creditguard-common/src/main/scala/com/wix/pay/creditguard/model/Conversions.scala | package com.wix.pay.creditguard.model
import java.math.{BigDecimal => JBigDecimal}
object Conversions {
def toCreditguardAmount(amount: Double): Int = {
JBigDecimal.valueOf(amount).movePointRight(2).intValueExact()
}
def toCreditguardYearMonth(year: Int, month: Int): String = {
f"$month%02d${... |
wix/libpay-creditguard | libpay-creditguard/src/main/scala/com/wix/pay/creditguard/CreditguardMerchantParser.scala | <filename>libpay-creditguard/src/main/scala/com/wix/pay/creditguard/CreditguardMerchantParser.scala
package com.wix.pay.creditguard
trait CreditguardMerchantParser {
def parse(merchantKey: String): CreditguardMerchant
def stringify(merchant: CreditguardMerchant): String
}
|
wix/libpay-creditguard | libpay-creditguard-common/src/main/scala/com/wix/pay/creditguard/model/RequestTransactionTypes.scala | <reponame>wix/libpay-creditguard
package com.wix.pay.creditguard.model
object RequestTransactionTypes {
/** Card holder is charged. */
val debit = "Debit"
/** Card holder is credited. */
val credit = "Credit"
}
|
wix/libpay-creditguard | libpay-creditguard-common/src/main/scala/com/wix/pay/creditguard/model/Versions.scala | package com.wix.pay.creditguard.model
object Versions {
val standard = "1001"
}
|
wix/libpay-creditguard | libpay-creditguard/src/test/scala/com/wix/pay/creditguard/JsonCreditguardAuthorizationParserTest.scala | package com.wix.pay.creditguard
import com.wix.pay.creditguard.CreditguardMatchers._
import org.specs2.mutable.SpecWithJUnit
import org.specs2.specification.Scope
class JsonCreditguardAuthorizationParserTest extends SpecWithJUnit {
trait Ctx extends Scope {
val authorizationParser: CreditguardAuthor... |
wix/libpay-creditguard | libpay-creditguard/src/test/scala/com/wix/pay/creditguard/JsonCreditguardMerchantParserTest.scala | <reponame>wix/libpay-creditguard
package com.wix.pay.creditguard
import com.wix.pay.creditguard.CreditguardMatchers._
import org.specs2.mutable.SpecWithJUnit
import org.specs2.specification.Scope
class JsonCreditguardMerchantParserTest extends SpecWithJUnit {
trait Ctx extends Scope {
val merchantPa... |
wix/libpay-creditguard | libpay-creditguard-common/src/main/scala/com/wix/pay/creditguard/model/Cvvs.scala | package com.wix.pay.creditguard.model
object Cvvs {
/** Merchant chooses not to pass CVV. */
val notProvided = "0"
/** CVV is not readable. */
val unreadable = "2"
/** card does not have CVV. */
val doesNotExist = "9"
}
|
wix/libpay-creditguard | libpay-creditguard/src/main/scala/com/wix/pay/creditguard/CreditguardMerchant.scala | package com.wix.pay.creditguard
/**
* @param idPrefix Prefix for ''com.wix.pay.creditguard.model.DoDealRequest#user'' field
*/
case class CreditguardMerchant(user: String,
password: String,
terminalNumber: String,
... |
wix/libpay-creditguard | libpay-creditguard/src/main/scala/com/wix/pay/creditguard/CreditguardAuthorizationParser.scala | package com.wix.pay.creditguard
trait CreditguardAuthorizationParser {
def parse(authorizationKey: String): CreditguardAuthorization
def stringify(authorization: CreditguardAuthorization): String
}
|
wix/libpay-creditguard | libpay-creditguard/src/main/scala/com/wix/pay/creditguard/CreditguardAuthorization.scala | package com.wix.pay.creditguard
case class CreditguardAuthorization(authNumber: String,
currency: String,
tranId: String,
cardId: String,
cardExpiration: String,
... |
wix/libpay-creditguard | libpay-creditguard-common/src/main/scala/com/wix/pay/creditguard/model/AuthSources.scala | <filename>libpay-creditguard-common/src/main/scala/com/wix/pay/creditguard/model/AuthSources.scala
package com.wix.pay.creditguard.model
object AuthSources {
val shva = "Shva"
val creditCompany = "Credit Company"
val voiceMail = "VoiceMail"
}
|
wix/libpay-creditguard | libpay-creditguard-common/src/main/scala/com/wix/pay/creditguard/model/Validations.scala | package com.wix.pay.creditguard.model
object Validations {
/**
* J1: Verifies card locally.
* If the card is ok and the total amount of the deal is under the ceiling, a debit is made without communication to Shva.
* If it's above the ceiling, an error occurs.
*/
val noComm = "NoComm"
/**
... |
wix/libpay-creditguard | libpay-creditguard-common/src/main/scala/com/wix/pay/creditguard/model/Languages.scala | <gh_stars>1-10
package com.wix.pay.creditguard.model
object Languages {
val hebrew = "Heb"
val english = "Eng"
}
|
wix/libpay-creditguard | libpay-creditguard/src/main/scala/com/wix/pay/creditguard/JsonCreditguardMerchantParser.scala | package com.wix.pay.creditguard
import org.json4s.DefaultFormats
import org.json4s.native.Serialization
class JsonCreditguardMerchantParser() extends CreditguardMerchantParser {
private implicit val formats = DefaultFormats
override def parse(merchantKey: String): CreditguardMerchant = {
Serializati... |
wix/libpay-creditguard | libpay-creditguard/src/test/scala/com/wix/pay/creditguard/CreditguardMatchers.scala | package com.wix.pay.creditguard
import org.specs2.matcher.{AlwaysMatcher, Matcher, Matchers}
trait CreditguardMatchers extends Matchers {
def authorizationParser: CreditguardAuthorizationParser
def beMerchant(user: Matcher[String] = AlwaysMatcher(),
password: Matcher[String] = AlwaysMatc... |
wix/libpay-creditguard | libpay-creditguard-common/src/main/scala/com/wix/pay/creditguard/model/Fields.scala | package com.wix.pay.creditguard.model
object Fields {
val user = "user"
val password = "password"
val int_in = "int_in"
}
|
wix/libpay-creditguard | libpay-creditguard-common/src/main/scala/com/wix/pay/creditguard/model/CommReasons.scala | package com.wix.pay.creditguard.model
object CommReasons {
val random = "1"
val creditLimit = "2"
val confidentialNumer = "3" // sic.
val serviceCode = "4"
val verifyOnly = "5"
val ambiguousBlocked = "6"
val zfl = "7"
val initiative = "8"
val charging = "9"
}
|
wix/libpay-creditguard | libpay-creditguard-common/src/main/scala/com/wix/pay/creditguard/model/ResponseTransactionTypes.scala | <reponame>wix/libpay-creditguard
package com.wix.pay.creditguard.model
object ResponseTransactionTypes {
/** Card holder is charged. */
val blocked = "Blocked"
/** Card holder is charged. */
val regularDebit = "RegularDebit"
/** Card holder is charged. */
val authDebit = "AuthDebit"
/** Card hol... |
wix/libpay-creditguard | libpay-creditguard-common/src/main/scala/com/wix/pay/creditguard/model/CardBrands.scala | package com.wix.pay.creditguard.model
object CardBrands {
val privateLabel = "0"
val mastercard = "1"
val visa = "2"
val maestro = "3"
val isracard = "5"
}
|
wix/libpay-creditguard | libpay-creditguard-common/src/main/scala/com/wix/pay/creditguard/model/CardAcquirers.scala | package com.wix.pay.creditguard.model
object CardAcquirers {
val isracard = "Isracard"
val visa = "Visa"
val diners = "Diners"
val amex = "Amex"
val jcb = "Jcb"
val alphacard = "Alphacard"
}
|
wix/libpay-creditguard | libpay-creditguard-common/src/main/scala/com/wix/pay/creditguard/model/Statuses.scala | <gh_stars>1-10
package com.wix.pay.creditguard.model
object Statuses {
val absent = "Absent"
val valid = "Valid"
val invalid = "Invalid"
val notValidated = "NotValidated"
}
|
wix/libpay-creditguard | libpay-creditguard/src/test/scala/com/wix/pay/creditguard/it/CreditguardGatewayIT.scala | <filename>libpay-creditguard/src/test/scala/com/wix/pay/creditguard/it/CreditguardGatewayIT.scala
package com.wix.pay.creditguard.it
import com.google.api.client.http.javanet.NetHttpTransport
import com.wix.pay.creditcard.{CreditCard, CreditCardOptionalFields, YearMonth}
import com.wix.pay.creditguard.Creditguar... |
wix/libpay-creditguard | libpay-creditguard/src/main/scala/com/wix/pay/creditguard/CreditguardGateway.scala | <reponame>wix/libpay-creditguard<filename>libpay-creditguard/src/main/scala/com/wix/pay/creditguard/CreditguardGateway.scala
package com.wix.pay.creditguard
import com.google.api.client.http._
import com.wix.pay.creditcard.CreditCard
import com.wix.pay.creditguard.model.Fields
import com.wix.pay.model.{Customer... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.