repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
retronym/scala-sandbox | finance-model/src/main/scala/retronym/finance/contract/Contract.scala | package retronym.finance.contract
case class Cashflow(amount: Double, currency: Currency) {
def scale(factor: Double) : Cashflow = Cashflow(factor * amount, currency)
def negate : Cashflow = scale(-1)
}
case class Evolution(c: Contract, cf: List[Cashflow])
object Evolution {
implicit def ContractToEvolution(c:... |
retronym/scala-sandbox | web-interface/src/main/scala/demo/helloworld/snippet/HelloWorld.scala | <gh_stars>1-10
package retronym.snippet
class HelloWorld {
def howdy = <span>Welcome to helloworld at {new _root_.java.util.Date}</span>
}
|
retronym/scala-sandbox | expressions/src/main/scala/retronym/expression/dsl/ExpressionDsl.scala | <reponame>retronym/scala-sandbox
package retronym.expression.dsl
import retronym.expression._
class ExpressionBuilder(e1: Expression) {
def +~(e2: Expression) = new BinaryOp(e1, Plus, e2)
def -~(e2: Expression) = new BinaryOp(e1, Minus, e2)
def *~(e2: Expression) = new BinaryOp(e1, Multiply, e2)
def /~(e2:... |
retronym/scala-sandbox | lessons/src/main/scala/retronym/lessons/collections/ForComprehensions.scala | <filename>lessons/src/main/scala/retronym/lessons/collections/ForComprehensions.scala<gh_stars>1-10
package retronym.lessons.collections
import _root_.org.spex.Specification
object ForComprehensions extends Specification {
val weekDays = List("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", ... |
retronym/scala-sandbox | finance-model/src/main/scala/retronym/finance/termsheet/Termsheet.scala | package retronym.finance.termsheet
import java.util.Date
class RichText
trait PayoffChart
class UnderlyingRow (
val name: String
)
class UnderlyingSection(
val introduction: Option[String],
val underlyings: List[UnderlyingRow],
val provisions: List[String]
)
{
}
class CouponSection(
)
class GeneralInfo... |
retronym/scala-sandbox | lessons/src/main/scala/retronym/lessons/annotations/Annotation.scala | package retronym.lessons.annotations
import _root_.org.specs.runner.ScalaTestSuite
import _root_.org.specs.Specification
import _root_.org.specs.runner._
import _root_.org.specs.matcher._
import _root_.org.specs.mock._
import _root_.org.specs.specification._
import _root_.org.specs._
import _root_.org.specs.i... |
retronym/scala-sandbox | lessons/src/main/scala/retronym/lessons/option/OptionalValues.scala | package retronym.lessons.option
import _root_.org.spex.Specification
object OptionalValues extends Specification {
"Java Style" should {
def add(a: java.lang.Integer, b: java.lang.Integer) : java.lang.Integer = {
if (a == null || b == null) return null
return a.intValue + b.intValue
}
"Fir... |
retronym/scala-sandbox | lessons/src/main/scala/retronym/lessons/testing/specs/Sample.scala | <gh_stars>1-10
package retronym.lessons.testing.specs
import _root_.org.spex.Specification
object Sample extends Specification {
"Basic Examples" should {
"this example will pass" in {
1 must be_==(1)
}
}
val spec = declare("Basic Examples without shorthand")
spec.forExample("this will pass").i... |
retronym/scala-sandbox | expressions/src/main/scala/retronym/expression/Expression.scala | <reponame>retronym/scala-sandbox
package retronym.expression
import _root_.scalaz.OptionW
import _root_.retronym.commons._
trait Expression {
def describe: String
def length: Int = 1
}
sealed abstract class BaseExpression extends Expression
case class Constant(value: Double) extends BaseExpression {
def desc... |
retronym/scala-sandbox | expressions/src/test/scala/retronym/expression/ExpressionTest.scala | <filename>expressions/src/test/scala/retronym/expression/ExpressionTest.scala
package retronym.expression
import dsl.ExpressionBuilder._
import dsl._
import RichExpression._
import _root_.org.spex.Specification
object expressionSpec extends Specification {
"describe" in {
val op = BinaryOp(Constant(1), Plus, C... |
retronym/scala-sandbox | web-interface/src/main/scala/bootstrap/liftweb/Boot.scala | <gh_stars>1-10
package bootstrap.liftweb
import _root_.net.liftweb.util._
import _root_.net.liftweb.http._
import _root_.net.liftweb.sitemap._
import _root_.net.liftweb.sitemap.Loc._
import Helpers._
/**
* A class that's instantiated early and run. It allows the application
* to modify lift's environment
*/
cl... |
retronym/scala-sandbox | lessons/src/main/scala/retronym/lessons/traits/UsingTraits.scala | <reponame>retronym/scala-sandbox
package retronym.lessons.traits
import _root_.org.spex.Specification
object UsingTraits extends Specification {
trait Camera {
def shoot(exposure: Int)
}
trait Zoomable {
def zoomIn(level: Int): Int
}
"Traits as interface contract" should {
"Implement one inter... |
retronym/scala-sandbox | lessons/src/main/scala/retronym/lessons/overload/Overload.scala | package retronym.lessons.overload
import _root_.org.spex.Specification
object Overload extends Specification {
"Overload" should {
class M {
final def m = "m"
}
case class Wrap1(a: String)
case class Wrap2(a: String)
class IllegalOverride extends M {
// def m() = "m" // can't o... |
retronym/scala-sandbox | expressions/src/test/scala/retronym/expression/ExpressionMatchers.scala | package retronym.expression
import _root_.org.specs.matcher.Matcher
case class expr_==(e: Expression) extends Matcher[Expression] {
override def apply(t: =>Expression) = {
(e == t, "matched", "expected: " + e.describe)
}
} |
retronym/scala-sandbox | finance-model/src/main/scala/retronym/finance/Option.scala | package retronym.finance
import java.math.BigDecimal
import java.util.Date
import scalaz.control.Monad
case class PayoffStyle()
case object Put extends PayoffStyle
case object Call extends PayoffStyle
case class Level()
case class AbsoluteLevel(value: BigDecimal)
case class PercentLevel(value: BigDecimal)
trait Un... |
retronym/scala-sandbox | lessons/src/main/scala/retronym/lessons/salutation/HelloWorldApp.scala | <reponame>retronym/scala-sandbox
package retronym.lessons.salutation
// Obligatory Hello World!
object HelloWorldApp {
// No static methods in Scala. main() is a method on the singleton object that I have
// called HelloWorldApp.
//
def main(args: Array[String]) = {
hello4(args)
}
// This i... |
retronym/scala-sandbox | lessons/src/main/scala/retronym/lessons/valsvars/ValsVars.scala | package retronym.lessons.valsvars
import _root_.org.specs.runner.ScalaTestSuite
import _root_.org.specs.Specification
import _root_.org.specs.runner._
import _root_.org.specs.matcher._
import _root_.org.specs.mock._
import _root_.org.specs.specification._
import _root_.org.specs._
import _root_.org.specs.io._... |
retronym/scala-sandbox | expressions/src/test/scala/retronym/expression/parse/ExpressionExternalDSLTest.scala | <reponame>retronym/scala-sandbox
package retronmym.expression.parse
import _root_.junit.framework.Assert._
import _root_.org.specs.runner._
import _root_.org.specs.matcher._
import _root_.org.specs.mock._
import _root_.org.specs.specification._
import _root_.org.specs._
import _root_.org.specs.io._
import _root_.org.s... |
retronym/scala-sandbox | expressions/src/main/scala/retronym/expression/RichExpression.scala | <gh_stars>1-10
package retronym.expression
import _root_.retronym.commons.BooleanW._
import _root_.retronym.commons.PartialFunctionW._
import RichExpression._
object RichExpression {
implicit def ExpressionToRichExpression(e : Expression) : RichExpression = new RichExpression(e)
}
class RichExpression(val e: Expre... |
retronym/scala-sandbox | lessons/src/main/scala/retronym/lessons/control/Control.scala | <reponame>retronym/scala-sandbox
package retronym.lessons.control
import _root_.org.specs.runner.ScalaTestSuite
import _root_.org.specs.Specification
import _root_.org.specs.runner._
import _root_.org.specs.matcher._
import _root_.org.specs.mock._
import _root_.org.specs.specification._
import _root_.org.specs... |
retronym/scala-sandbox | lessons/src/main/scala/retronym/lessons/Trail.scala | <filename>lessons/src/main/scala/retronym/lessons/Trail.scala
package retronym.lessons
import _root_.org.specs.runner.ScalaTestSuite
import callbyname.CallByName
import collections.VectorAverage
import erasure.Erasure
import control.Control
import option.OptionalValues
import org.spex.Specification
import overload.Ove... |
retronym/scala-sandbox | lessons/src/main/scala/retronym/lessons/ducktyping/DuckTyping.scala | <reponame>retronym/scala-sandbox
package retronym.lessons.ducktyping
import _root_.org.spex.Specification
object DuckTyping extends Specification {
class A {
def close() = "A.close"
}
class B {
def close() = "B.close"
}
"DuckTyping" should {
"closeIt() accepts anything that has a c... |
retronym/scala-sandbox | commons/src/main/scala/retronym/commons/BooleanW.scala | package retronym.commons
object BooleanW {
implicit def BooleanToBooleanW(b: Boolean) : BooleanW = new BooleanW(b)
}
class BooleanW(b : Boolean) {
def iif[A](ifTrue : => A, ifFalse : => A) = {
if(b) {ifTrue} else {ifFalse}
}
def iff[A](ifTrue : => A) = iif(Some(ifTrue), None)
} |
retronym/scala-sandbox | expressions/src/main/scala/retronym/expression/parse/ExpressionParser.scala | package retronym.expression.parse
import _root_.scala.util.parsing.combinator.syntactical.{StandardTokenParsers, StdTokenParsers}
import retronym.expression.Expression
import scala.util.parsing.combinator.lexical.StdLexical
object ExpressionExternalDSL extends StandardTokenParsers {
def parse(s: String): Expressio... |
retronym/scala-sandbox | lessons/src/main/scala/retronym/lessons/erasure/Erasure.scala | <reponame>retronym/scala-sandbox
package retronym.lessons.erasure
import org.spex.Specification
object Erasure extends Specification {
"Erasure" should {
"Type parameter 'T' is erased, and the instance of check always returns true" in {
def instanceOf[T](e: AnyRef) = e.isInstanceOf[T]
instanceOf[Int... |
retronym/scala-sandbox | expressions/src/main/scala/retronym/expression/Operator.scala |
package retronym.expression
case class Operator(symbol: String) {
override def toString = symbol
}
trait Commutative
trait Associative
trait HasIdentity[V] {
def isIdentity(v: V): Boolean
}
case object Plus extends Operator("+") with HasIdentity[Double] with Commutative with Associative {
def isIdentity(v: ... |
retronym/scala-sandbox | lessons/src/main/scala/retronym/lessons/callbyname/CallByName.scala | package retronym.lessons.callbyname
import _root_.org.spex.Specification
/**
* 4.6.1 The type of a value parameter may be prefixed by =>, e.g. x : => T . The type of
* such a parameter is then the parameterless method type => T . This indicates that
* the corresponding argument is not evaluated at the point of fun... |
retronym/scala-sandbox | commons/src/main/scala/retronym/commons/PartialFunctionW.scala | <reponame>retronym/scala-sandbox
package retronym.commons
import BooleanW._
object PartialFunctionW {
implicit def PartialFunctionToPartialFunctionW[A, B](pf: PartialFunction[A, B]) : PartialFunctionW[A, B] = {
new PartialFunctionW(pf)
}
}
class PartialFunctionW[-A, +B](pf: PartialFunction[A, B]) {
def toF... |
jancajthaml-scala/money | src/test/scala/com/github/jancajthaml/money/ParsingSpecs.scala | package com.github.jancajthaml.money
import org.scalatest.{FlatSpec, Matchers}
class ParsingSpecs extends FlatSpec with Matchers {
val run = true
if (run) "Trivia" should "parse 1" in {
val left = Money("1", "EUR")
assert(left.value == "1")
}
if (run) it should "parse 2" in {
val left = Money("... |
jancajthaml-scala/money | src/test/scala/com/github/jancajthaml/money/SerializationSpecs.scala | package com.github.jancajthaml.money
import org.scalatest.{FlatSpec, Matchers}
class SerializationSpecs extends FlatSpec with Matchers {
val run = true
if (run) "Trivia" should "serialize 1" in {
val left = Money("1", "EUR")
assert(left.toString() == "1")
}
if (run) it should "serialize 10000000.00... |
jancajthaml-scala/money | src/test/scala/com/github/jancajthaml/money/AdditionSpecs.scala | package com.github.jancajthaml.money
import org.scalatest.{FlatSpec, Matchers}
class AdditionSpecs extends FlatSpec with Matchers {
val run = true
if (run) "Trivia" should "add 1 + 1 = 2.0" in {
val left = Money("1", "EUR")
val right = Money("1", "EUR")
val result = left + right
//assert(result.... |
jancajthaml-scala/money | src/test/scala/com/github/jancajthaml/money/ComparationSpecs.scala | <gh_stars>1-10
package com.github.jancajthaml.money
import org.scalatest.{FlatSpec, Matchers}
class ComparationSpecs extends FlatSpec with Matchers {
val run = true
if (run) "Trivia" should "parse 1" in {
val left = Money("40", "EUR")
val right = Money("39", "EUR")
assert(left >= right)
assert(l... |
jancajthaml-scala/money | src/test/scala/com/github/jancajthaml/money/SubtractionSpecs.scala | <filename>src/test/scala/com/github/jancajthaml/money/SubtractionSpecs.scala
package com.github.jancajthaml.money
import org.scalatest.{FlatSpec, Matchers}
class SubtractionSpecs extends FlatSpec with Matchers {
val run = true
if (run) "Trivia" should "subtract 3 - 2 = 1.0" in {
val left = Money("3", "EUR")... |
jancajthaml-scala/money | src/test/scala/com/github/jancajthaml/money/ParsingPerformance.scala | <filename>src/test/scala/com/github/jancajthaml/money/ParsingPerformance.scala<gh_stars>1-10
package com.github.jancajthaml.money
import org.scalameter.api.{Measurer, Bench, Gen, exec}
object ParsingPerformance extends Bench.OfflineReport {
val times = Gen.range("times")(0, 10000, 1000)
performance of "Money" in... |
jancajthaml-scala/money | src/test/scala/com/github/jancajthaml/money/SubtractionPerformance.scala | package com.github.jancajthaml.money
import org.scalameter.api.{Measurer, Bench, Gen, exec}
object SubtractionPerformance extends Bench.OfflineReport {
val times = Gen.range("times")(0, 10000, 1000)
performance of "subtraction" in {
measure method "Money.subtract" in {
using(times) config (
e... |
jancajthaml-scala/money | src/main/scala/com/github/jancajthaml/money/Money.scala | package com.github.jancajthaml.money
import Money._
import java.math.{BigDecimal => BigDec, MathContext}
object Money {
private def assertUnderlying(x: Money) = {
if (x.underlying == null) {
x.underlying = new BigDec(x.repr, MathContext.DECIMAL128)
}
}
private def add(l: Money, r: Money) = {
... |
hmrc/binding-tariff-filestore | test/unit/uk/gov/hmrc/bindingtarifffilestore/service/FileStoreServiceSpec.scala | /*
* 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/binding-tariff-filestore | app/uk/gov/hmrc/bindingtarifffilestore/model/Search.scala | <gh_stars>0
/*
* 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 applica... |
hmrc/binding-tariff-filestore | app/uk/gov/hmrc/bindingtarifffilestore/controllers/ErrorHandling.scala | <gh_stars>0
/*
* 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 applica... |
hmrc/binding-tariff-filestore | test/unit/uk/gov/hmrc/bindingtarifffilestore/model/PagedTest.scala | /*
* 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/binding-tariff-filestore | app/uk/gov/hmrc/bindingtarifffilestore/audit/AuditService.scala | <reponame>hmrc/binding-tariff-filestore
/*
* 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
*
... |
hmrc/binding-tariff-filestore | app/uk/gov/hmrc/bindingtarifffilestore/connector/AmazonS3Connector.scala | <reponame>hmrc/binding-tariff-filestore
/*
* 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
*
... |
hmrc/binding-tariff-filestore | test/unit/uk/gov/hmrc/bindingtarifffilestore/connector/AmazonS3ConnectorSpec.scala | /*
* 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/binding-tariff-filestore | app/uk/gov/hmrc/bindingtarifffilestore/repository/MongoIndexCreator.scala | /*
* 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/binding-tariff-filestore | app/uk/gov/hmrc/bindingtarifffilestore/repository/FileMetadataMongoRepository.scala | /*
* 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/binding-tariff-filestore | app/uk/gov/hmrc/bindingtarifffilestore/controllers/FileStoreController.scala | /*
* 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/binding-tariff-filestore | test/unit/uk/gov/hmrc/bindingtarifffilestore/audit/AuditServiceTest.scala | /*
* 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/binding-tariff-filestore | app/uk/gov/hmrc/bindingtarifffilestore/service/FileStoreService.scala | <reponame>hmrc/binding-tariff-filestore
/*
* 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
*
... |
hmrc/binding-tariff-filestore | test/unit/uk/gov/hmrc/bindingtarifffilestore/model/SearchTest.scala | /*
* 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/binding-tariff-filestore | app/uk/gov/hmrc/bindingtarifffilestore/filters/AuthFilter.scala | <gh_stars>0
/*
* 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 applica... |
hmrc/binding-tariff-filestore | app/uk/gov/hmrc/bindingtarifffilestore/controllers/JsonParsing.scala | /*
* 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/binding-tariff-filestore | test/it/uk/gov/hmrc/bindingtarifffilestore/AuthSpec.scala | <gh_stars>0
/*
* Copyright 2018 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 applica... |
hmrc/binding-tariff-filestore | app/uk/gov/hmrc/bindingtarifffilestore/model/FileMetadata.scala | /*
* 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/binding-tariff-filestore | test/unit/uk/gov/hmrc/bindingtarifffilestore/model/upscan/ScanResultSpec.scala | /*
* 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/binding-tariff-filestore | app/uk/gov/hmrc/bindingtarifffilestore/model/upscan/v2/UpscanInitiateRequest.scala | /*
* 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/binding-tariff-filestore | test/unit/uk/gov/hmrc/bindingtarifffilestore/model/UploadRequestSpec.scala | /*
* 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/binding-tariff-filestore | app/uk/gov/hmrc/bindingtarifffilestore/model/Pagination.scala | <filename>app/uk/gov/hmrc/bindingtarifffilestore/model/Pagination.scala
/*
* 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.apac... |
hmrc/binding-tariff-filestore | app/uk/gov/hmrc/bindingtarifffilestore/connector/UpscanConnector.scala | /*
* 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/binding-tariff-filestore | app/uk/gov/hmrc/bindingtarifffilestore/model/upscan/ScanResult.scala | <reponame>hmrc/binding-tariff-filestore
/*
* 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
*
... |
hmrc/binding-tariff-filestore | app/uk/gov/hmrc/bindingtarifffilestore/config/AppConfig.scala | <filename>app/uk/gov/hmrc/bindingtarifffilestore/config/AppConfig.scala<gh_stars>0
/*
* 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... |
hmrc/binding-tariff-filestore | test/unit/uk/gov/hmrc/bindingtarifffilestore/repository/FileMetadataRepositorySpec.scala | /*
* 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/binding-tariff-filestore | test/unit/uk/gov/hmrc/bindingtarifffilestore/controllers/FileStoreControllerSpec.scala | /*
* 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/binding-tariff-filestore | test/it/uk/gov/hmrc/bindingtarifffilestore/FileStoreSpec.scala | <gh_stars>0
/*
* Copyright 2018 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 applica... |
hmrc/binding-tariff-filestore | project/AppDependencies.scala | <reponame>hmrc/binding-tariff-filestore<gh_stars>0
import sbt._
import play.core.PlayVersion.current
object AppDependencies {
private lazy val apacheHttpVersion = "4.5.13"
val compile = Seq(
"com.amazonaws" % "aws-java-sdk-s3" % "1.11.882",
"uk.gov.hmrc" %% "bootstrap... |
hmrc/binding-tariff-filestore | test/unit/uk/gov/hmrc/bindingtarifffilestore/connector/UpscanConnectorSpec.scala | /*
* 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/binding-tariff-filestore | test/unit/uk/gov/hmrc/bindingtarifffilestore/model/FileMetadataSpec.scala | <reponame>hmrc/binding-tariff-filestore<filename>test/unit/uk/gov/hmrc/bindingtarifffilestore/model/FileMetadataSpec.scala<gh_stars>0
/*
* 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... |
hmrc/binding-tariff-filestore | test/util/uk/gov/hmrc/bindingtarifffilestore/util/BaseFeatureSpec.scala | /*
* 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/binding-tariff-filestore | test/unit/uk/gov/hmrc/bindingtarifffilestore/config/AppConfigSpec.scala | /*
* 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... |
Gressa/PageRankAlgorithm | src/main/scala/net/sansa_stack/template/spark/rdf/PageRankImplementation.scala | package net.sansa_stack.template.spark.rdf
import org.apache.spark.sql.SparkSession
import java.net.{ URI => JavaURI }
import scala.collection.mutable
import org.apache.spark.graphx.Graph
import net.sansa_stack.rdf.spark.io._
import net.sansa_stack.rdf.spark.model.graph._
import net.sansa_stack.rdf.spark.model._
impor... |
Gressa/PageRankAlgorithm | src/main/scala/net/sansa_stack/template/spark/rdf/PageRankAlgorithmConvergence.scala | package net.sansa_stack.template.spark.rdf
import org.apache.spark.sql.SparkSession
import java.net.{ URI => JavaURI }
import scala.collection.mutable
import org.apache.spark.graphx.Graph
import net.sansa_stack.rdf.spark.io._
import net.sansa_stack.rdf.spark.model.graph._
import net.sansa_stack.rdf.spark.model._
impor... |
three/scala-maxmind-iplookups | src/test/scala/com.snowplowanalytics.maxmind.iplookups/IpLookupsTest.scala | /*
* Copyright (c) 2012-2018 Snowplow Analytics Ltd. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache License Version 2.0.
* You may obtain a copy of the Apache License Version 2.0 at http://www.apach... |
three/scala-maxmind-iplookups | src/main/scala/com.snowplowanalytics.maxmind.iplookups/IpLookups.scala | <reponame>three/scala-maxmind-iplookups
/*
* Copyright (c) 2012-2018 Snowplow Analytics Ltd. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0,
* and you may not use this file except in compliance with the Apache License Version 2.0.
* You may obtain a copy of the Apache... |
three/scala-maxmind-iplookups | project/plugins.sbt | <gh_stars>0
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.3")
addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.15")
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.3.2")
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.2")
addSbtPlugin("org.scov... |
algorithmiaio/plugin-sdk | build.sbt | <filename>build.sbt
inThisBuild(List(
organization := "com.algorithmia",
homepage := Some(url("https://github.com/algorithmiaio/plugin-sdk")),
licenses := List("MIT" -> url("https://github.com/algorithmiaio/plugin-sdk/blob/master/LICENSE")),
developers := List(
Developer(
"jbooth",
"<NAME>",
... |
algorithmiaio/plugin-sdk | project/plugins.sbt | addSbtPlugin("com.frugalmechanic" % "fm-sbt-s3-resolver" % "[0.11.0,1)")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7")
|
macrodatalab/spark-bo | examples/src/main/scala/com/bigobject/spark/examples/boOption.scala | package com.bigobject.spark.examples
class BoOption(args : Array[String]) {
private val options = nextOption(Map(), args.toList)
private def nextOption(opt : Map[String, Any], list: List[String]) : Map[String, Any] = {
list match {
case Nil => opt
case opt1 :: opt2 :: tail if (opt1.startsW... |
macrodatalab/spark-bo | spark-1.5.1/bigobject/src/main/scala/com/bigobject/spark/BORelation.scala | <filename>spark-1.5.1/bigobject/src/main/scala/com/bigobject/spark/BORelation.scala
/*
* Copyright 2015 bigobject.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.... |
macrodatalab/spark-bo | examples/src/main/scala/com/bigobject/spark/examples/byBO/calculate-byBO.scala | <gh_stars>1-10
package com.bigobject.spark.examples.byBO
import org.apache.spark.SparkContext
import org.apache.spark.SparkConf
import org.apache.spark.sql.SQLContext
import org.apache.spark.sql.functions._
import com.bigobject.spark._
import com.bigobject.spark.examples.BoOption
object SumApp {
def main(args: Arra... |
macrodatalab/spark-bo | spark-1.4.1/bigobject/src/main/scala/com/bigobject/spark/BORDD.scala | /*
* Copyright 2015 bigobject.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... |
macrodatalab/spark-bo | examples/src/main/scala/com/bigobject/spark/examples/byDF/calculate-byDF.scala | <filename>examples/src/main/scala/com/bigobject/spark/examples/byDF/calculate-byDF.scala
package com.bigobject.spark.examples.byDF
import org.apache.spark.SparkContext
import org.apache.spark.SparkConf
import org.apache.spark.sql.SQLContext
import org.apache.spark.sql.functions._
import com.bigobject.spark._
import co... |
scala-steward/caliban-deriving | caliban-deriving/src/main/scala-3/caliban/deriving/package.scala | package caliban.deriving
import caliban.parsing.adt.Directive
import caliban.schema.Schema
import caliban.schema.Annotations.GQLName
import caliban.schema.Annotations.GQLDescription
import caliban.schema.Annotations.GQLInputName
import caliban.schema.Annotations.GQLDeprecated
import caliban.schema.Annotations.GQLDirec... |
scala-steward/caliban-deriving | caliban-deriving/src/test/scala/caliban/deriving/InterfaceDerivationSpec.scala | package caliban.deriving
import caliban.GraphQL.graphQL
import caliban.schema.Annotations.GQLDescription
import caliban.schema.Schema
import caliban.{GraphQL, RootResolver}
import zio.test._
import zio.test.environment._
object InterfaceDerivationSpec extends DefaultRunnableSpec {
sealed trait ExampleSum {
def ... |
scala-steward/caliban-deriving | caliban-deriving/src/test/scala/caliban/deriving/ProductDerivationSpec.scala | package caliban.deriving
import caliban.GraphQL.graphQL
import caliban.deriving.annotations.GQLExclude
import caliban.schema.Annotations.{GQLDeprecated, GQLDescription, GQLName}
import caliban.schema.{GenericSchema, Schema}
import caliban.{GraphQL, RootResolver}
import zio._
import zio.query.ZQuery
import zio.random.R... |
amur-host/node | it/src/test/scala/com/amurplatform/it/sync/matcher/TradeBalanceAndRoundingTestSuite.scala | package com.amurplatform.it.sync.matcher
import com.typesafe.config.{Config, ConfigFactory}
import com.amurplatform.account.PrivateKeyAccount
import com.amurplatform.api.http.assets.SignedIssueV1Request
import com.amurplatform.it.ReportingTestName
import com.amurplatform.it.api.AssetDecimalsInfo
import com.amurplatfor... |
amur-host/node | src/main/scala/com/amurplatform/matcher/smart/MatcherContext.scala | package com.amurplatform.matcher.smart
import cats.data.EitherT
import cats.implicits._
import cats.kernel.Monoid
import com.amurplatform.lang.Global
import com.amurplatform.lang.v1.compiler.Types.{FINAL, UNIT}
import com.amurplatform.lang.v1.evaluator.FunctionIds._
import com.amurplatform.lang.v1.evaluator.ctx._
impo... |
amur-host/node | src/main/scala/com/amurplatform/settings/WalletSettings.scala | <gh_stars>1-10
package com.amurplatform.settings
import java.io.File
import com.amurplatform.state.ByteStr
case class WalletSettings(file: Option[File], password: String, seed: Option[ByteStr])
|
amur-host/node | src/main/scala/com/amurplatform/transaction/ChainSpecific.scala | <filename>src/main/scala/com/amurplatform/transaction/ChainSpecific.scala<gh_stars>1-10
package com.amurplatform.transaction
trait ChainSpecific {
val chainId: Byte
}
|
amur-host/node | benchmark/src/main/scala/com/amurplatform/state/Settings.scala | package com.amurplatform.state
import com.typesafe.config.Config
import net.ceedubs.ficus.Ficus._
import net.ceedubs.ficus.readers.ArbitraryTypeReader._
case class Settings(networkConfigFile: String,
aliasesFile: String,
aliasesFromHeight: Int,
restTxsFile: ... |
amur-host/node | lang/jvm/src/test/scala/com/amurplatform/lang/TypeInferrerTest.scala | package com.amurplatform.lang
import com.amurplatform.lang.v1.compiler.Types._
import org.scalatest.{FreeSpec, Matchers}
import Common._
import com.amurplatform.lang.v1.compiler.TypeInferrer
import com.amurplatform.lang.v1.evaluator.ctx.CaseType
class TypeInferrerTest extends FreeSpec with Matchers {
val typeparam... |
amur-host/node | src/test/scala/com/amurplatform/transaction/TransferTransactionV1Specification.scala | package com.amurplatform.transaction
import com.amurplatform.TransactionGen
import com.amurplatform.state.{ByteStr, EitherExt2}
import org.scalatest._
import org.scalatest.prop.PropertyChecks
import play.api.libs.json.Json
import com.amurplatform.account.{Address, PublicKeyAccount}
import com.amurplatform.transaction.... |
amur-host/node | lang/shared/src/main/scala/com/amurplatform/lang/v1/task/imports.scala | <reponame>amur-host/node
package com.amurplatform.lang.v1.task
object imports extends TaskMFunctions with TaskMInstances
|
amur-host/node | generator/src/main/scala/com.amurplatform.generator/OracleTransactionGenerator.scala | <reponame>amur-host/node
package com.amurplatform.generator
import cats.Show
import com.amurplatform.account.PrivateKeyAccount
import com.amurplatform.generator.OracleTransactionGenerator.Settings
import com.amurplatform.generator.utils.Gen
import com.amurplatform.it.util._
import com.amurplatform.state._
import com.a... |
amur-host/node | src/test/scala/com/amurplatform/history/BlockchainUpdaterBurnTest.scala | package com.amurplatform.history
import com.amurplatform.TransactionGen
import com.amurplatform.features.BlockchainFeatures
import com.amurplatform.settings.{BlockchainSettings, AmurSettings}
import com.amurplatform.state._
import com.amurplatform.state.diffs.{ENOUGH_AMT, produce}
import org.scalacheck.Gen
import org.... |
amur-host/node | src/test/scala/com/amurplatform/mining/package.scala | package com.amurplatform
import com.amurplatform.state.Blockchain
import com.amurplatform.transaction.Transaction
package object mining {
private[mining] def createConstConstraint(maxSize: Long, transactionSize: => Long) = OneDimensionalMiningConstraint(
maxSize,
new com.amurplatform.mining.TxEstimators.Fn ... |
amur-host/node | src/main/scala/com/amurplatform/transaction/Authorized.scala | <filename>src/main/scala/com/amurplatform/transaction/Authorized.scala
package com.amurplatform.transaction
import com.amurplatform.account.PublicKeyAccount
trait Authorized {
val sender: PublicKeyAccount
}
|
amur-host/node | src/main/scala/com/amurplatform/network/PeerSynchronizer.scala | <gh_stars>1-10
package com.amurplatform.network
import java.net.InetSocketAddress
import com.amurplatform.utils.ScorexLogging
import io.netty.channel.ChannelHandler.Sharable
import io.netty.channel.{ChannelHandlerContext, ChannelInboundHandlerAdapter}
import scala.concurrent.duration.FiniteDuration
class PeerSynchr... |
amur-host/node | src/main/scala/com/amurplatform/api/http/assets/SignedExchangeRequestV2.scala | <filename>src/main/scala/com/amurplatform/api/http/assets/SignedExchangeRequestV2.scala
package com.amurplatform.api.http.assets
import cats.implicits._
import io.swagger.annotations.ApiModelProperty
import play.api.libs.json.{Format, Json}
import com.amurplatform.account.PublicKeyAccount
import com.amurplatform.api.h... |
amur-host/node | src/main/scala/com/amurplatform/matcher/model/EventSerializers.scala | <filename>src/main/scala/com/amurplatform/matcher/model/EventSerializers.scala
package com.amurplatform.matcher.model
import java.io.NotSerializableException
import akka.serialization._
import com.amurplatform.matcher.market.MatcherActor.OrderBookCreated
import com.amurplatform.matcher.market.OrderBookActor.Snapshot
... |
amur-host/node | src/test/scala/com/amurplatform/http/DebugApiRouteSpec.scala | <filename>src/test/scala/com/amurplatform/http/DebugApiRouteSpec.scala
package com.amurplatform.http
import com.amurplatform.TestWallet
import com.amurplatform.settings.AmurSettings
import com.amurplatform.api.http.ApiKeyNotValid
class DebugApiRouteSpec extends RouteSpec("/debug") with RestAPISettingsHelper with Test... |
amur-host/node | src/test/scala/com/amurplatform/transaction/smart/script/ScriptV1Test.scala | package com.amurplatform.transaction.smart.script
import com.amurplatform.lang.v1.FunctionHeader
import com.amurplatform.lang.v1.compiler.Terms._
import com.amurplatform.lang.v1.testing.TypedScriptGen
import com.amurplatform.state.diffs.produce
import org.scalatest.prop.PropertyChecks
import org.scalatest.{Matchers, P... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.