code stringlengths 5 1M | repo_name stringlengths 5 109 | path stringlengths 6 208 | language stringclasses 1
value | license stringclasses 15
values | size int64 5 1M |
|---|---|---|---|---|---|
package pl.newicom.dddd.process
import akka.persistence.PersistentActor
import pl.newicom.dddd.aggregate.DomainEvent
import pl.newicom.dddd.persistence.PersistentActorLogging
trait SagaState[T <: SagaState[T]]
trait SagaStateHandling[S <: SagaState[S]] extends SagaAbstractStateHandling {
this: PersistentActor with... | odd/akka-ddd | akka-ddd-core/src/main/scala/pl/newicom/dddd/process/SagaStateHandling.scala | Scala | mit | 2,015 |
import org.apache.spark._
import org.apache.spark.SparkConf
import org.apache.spark.SparkContext._
import java.text.SimpleDateFormat
object SparkJoin{
def main(args: Array[String]) {
val s = System.nanoTime
val conf = new SparkConf().setAppName("SparkJoin")
val sc = new SparkContext(conf)
def parseD... | HasZhenzhen/spark_testing | spark_join/reduce_side/sparkjoin_reduce.scala | Scala | apache-2.0 | 1,956 |
// Copyright (C) 2014 Open Data ("Open Data" refers to
// one or more of the following companies: Open Data Partners LLC,
// Open Data Research LLC, or Open Data Capital LLC.)
//
// This file is part of Hadrian.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in ... | opendatagroup/hadrian | hadrian/src/main/scala/com/opendatagroup/hadrian/options.scala | Scala | apache-2.0 | 3,842 |
/*
* Copyright 2015 eleflow.com.br.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | eleflow/uberdata | iuberdata_core/src/main/scala/org/apache/spark/ml/param/shared/HasARIMAP.scala | Scala | apache-2.0 | 1,027 |
/*
* Copyright 2013 Stephan Rehfeld
*
* 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 ... | stephan-rehfeld/scaladelray | src/main/scala/scaladelray/ui/ScalaDelRay.scala | Scala | apache-2.0 | 54,607 |
/*
* GaussianProcessTraining.scala
* Demonstrates use of externally trained models in Figaro.
*
* Created By: Dan Garant (dgarant@cra.com)
* Creation Date: May 20, 2016
*
* Copyright 2016 Avrom J. Pfeffer and Charles River Analytics, Inc.
* See http://www.cra.com or email figaro@cra.com for information... | scottcb/figaro | FigaroExamples/src/main/scala/com/cra/figaro/example/GaussianProcessTraining.scala | Scala | bsd-3-clause | 4,599 |
package com.twitter.finagle.redis
import com.twitter.conversions.time._
import com.twitter.finagle.redis.naggati.test.TestCodec
import com.twitter.finagle.redis.protocol._
import com.twitter.finagle.redis.util._
import com.twitter.finagle.Redis
import com.twitter.finagle.redis.naggati._
import com.twitter.io.Buf
impor... | adriancole/finagle | finagle-redis/src/test/scala/com/twitter/finagle/redis/RedisTest.scala | Scala | apache-2.0 | 9,411 |
package io.questions.model.questionnaire
import io.circe.parser.parse
import io.circe.syntax._
import io.questions.QuestionsSpec
import io.questions.model.questionnaire.Path._
import io.questions.model.questionnaire.QuestionnaireNodePredicate._
import io.questions.model.questionnaire.TestQuestionnaire._
import io.ques... | channingwalton/qanda | questionnaire/src/test/scala/io/questions/model/questionnaire/QuestionnaireNodePredicateSpec.scala | Scala | mit | 2,783 |
/*
* 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 ... | pgandhi999/spark | core/src/main/scala/org/apache/spark/internal/config/UI.scala | Scala | apache-2.0 | 6,124 |
package com.atomist.source.git
import java.io.File
import java.net.URL
import java.nio.file.{FileAlreadyExistsException, Files}
import com.atomist.source.ArtifactSourceException
import com.atomist.source.git.GitHubServices.Url
import com.typesafe.scalalogging.LazyLogging
import org.apache.commons.io.FileUtils
import... | atomist/artifact-source | src/main/scala/com/atomist/source/git/GitRepositoryCloner.scala | Scala | gpl-3.0 | 3,077 |
package org.scalatest
import Filter.IgnoreTag
/**
* Filter whose <code>apply</code> method determines which of the passed tests to run and ignore based on tags to include and exclude passed as
* as class parameters.
*
* <p>
* This class handles the <code>org.scalatest.Ignore</code> tag specially, in that its <co... | hubertp/scalatest | src/main/scala/org/scalatest/Filter.scala | Scala | apache-2.0 | 14,501 |
package com.twitter.finatra.conversions
import com.twitter.concurrent.AsyncStream
import com.twitter.concurrent.AsyncStream.{fromFuture, fromSeq}
import com.twitter.util.{Future, Try}
object asyncStream {
implicit class RichFutureSeq[T](val self: Future[Seq[T]]) extends AnyVal {
def toAsyncStream: AsyncStream[... | syamantm/finatra | utils/src/main/scala/com/twitter/finatra/conversions/asyncStream.scala | Scala | apache-2.0 | 1,040 |
/*
* Copyright (c) 2012-2014 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... | TimothyKlim/snowplow | 3-enrich/scala-common-enrich/src/test/scala/com.snowplowanalytics.snowplow.enrich.common/enrichments/registry/CampaignAttributionEnrichmentSpec.scala | Scala | apache-2.0 | 5,660 |
package demo.pages
import com.acework.js.components.bootstrap._
import demo.examples.util.CodeContent
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.prefix_<^._
import scala.scalajs.js.UndefOr._
/**
* Created by weiyin on 17/03/15.
*/
object Progressbars {
val exampleSource =
"""
|... | weiyinteo/scalajs-react-bootstrap | demo/src/main/scala/demo/pages/Progressbars.scala | Scala | mit | 5,230 |
package es.um.nosql.streaminginference.spark.utils
import org.apache.spark.SparkConf
object KryoHelper {
def enable(conf: SparkConf): Unit = {
conf
// https://stackoverflow.com/questions/42555183/mapwithstaterddrecord-with-kryo
// .set("spark.kryo.registrationRequired", "true")
.set("s... | catedrasaes-umu/NoSQLDataEngineering | projects/es.um.nosql.streaminginference.json2dbschema/src/es/um/nosql/streaminginference/spark/utils/KryoHelper.scala | Scala | mit | 1,646 |
package sysadmin
import scalikejdbc._
import skinny.orm._
case class User(id: Long, os: String, java: String, user: String)
object User extends SkinnyCRUDMapper[User] {
override val connectionPoolName = 'sysadmin
override def defaultAlias = createAlias("u")
override def extract(rs: WrappedResultSet, n: Resul... | holycattle/skinny-framework | factory-girl/src/test/scala/sysadmin/User.scala | Scala | mit | 432 |
package org.ucombinator.jaam.tools.listitems
import java.io.File
import java.lang.reflect.Executable
import java.net.URLClassLoader
import java.util.jar.JarFile
import scala.collection.JavaConversions._
import scala.collection.mutable
import org.objectweb.asm._
import org.objectweb.asm.tree._
case class ListPrintOp... | Ucombinator/jaam | src/main/scala/org/ucombinator/jaam/tools/ListItems.scala | Scala | bsd-2-clause | 5,671 |
package week4
/**
* Obj with pattern matching
*/
object List {
// Call with two args
def apply[T](x1: T, x2: T): List[T] = new Cons(x1, new Cons(x2, new Nil))
// Call with no args
def apply[T]() = new Nil
}
| guhemama/moocs | Functional.Programming.in.Scala.Coursera/Week4/src/week4/List.scala | Scala | bsd-3-clause | 220 |
package org.apache.spark.ml.dsl.utils.messaging
import com.tribbloids.spookystuff.testutils.FunSpecx
import org.apache.spark.ml.dsl.utils.messaging.TestBeans._
class MessageWriterSuite extends FunSpecx {
val user1 = User("1")
val user2 = User("2", Some(Roles(Seq("r1", "r2"))))
val map = Map(1 -> user1, 2 -> us... | tribbloid/spookystuff | mldsl/src/test/scala/org/apache/spark/ml/dsl/utils/messaging/MessageWriterSuite.scala | Scala | apache-2.0 | 1,673 |
/*
* 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 ... | daewon/incubator-s2graph | loader/src/main/scala/org/apache/s2graph/loader/spark/HBaseRDDFunctions.scala | Scala | apache-2.0 | 9,247 |
package scanalyzer
package testing
import analysis._
import analysis.dominance._
import cfg._
import org.scalatest._
class DominanceSpec extends FlatSpec with Matchers {
"DominanceAnalysis" should "compute correct dominance information for ex01" in {
val fun = Parser.parse("examplefiles/ex01.cfg")
val ana... | fabian-r/scanalyzer | src/test/scala/DominanceAnalysis.scala | Scala | mit | 5,254 |
import scalaz._, Scalaz._
import scalaz.concurrent._
/**
* "Colonies" send out many [[Ant]]s to optimize for the best tour of a location
* graph.
*
* Colonies are parameterized by the kind of ant that they are composed of.
*/
abstract class Colony(val ant: Ant) {
type AntGraph = ConnectedGraph[ant.Node, ant.Wei... | hakuch/TravellingAnts | src/main/scala/Colony.scala | Scala | mit | 4,265 |
package org.jetbrains.plugins.scala.annotator
import org.jetbrains.plugins.scala.{LatestScalaVersions, ScalaVersion}
// Technically, it's "type mismatch", but we can do better than the scalac, SCL-16904
// See also: TypeMismatchHighlightingTest
class ScFunctionExprAnnotatorTest extends ScalaHighlightingTestBase {
o... | JetBrains/intellij-scala | scala/scala-impl/test/org/jetbrains/plugins/scala/annotator/ScFunctionExprAnnotatorTest.scala | Scala | apache-2.0 | 9,533 |
package com.nulabinc.backlog.migration.common.conf
import java.io.File
import java.nio.file.Path
case class MappingDirectory(
userMappingFilePath: Path,
userMappingListFilePath: Path,
statusMappingFilePath: Path,
statusMappingListFilePath: Path,
priorityMappingFilePath: Path,
priorityMappingLi... | nulab/backlog-migration-common | core/src/main/scala/com/nulabinc/backlog/migration/common/conf/MappingDirectory.scala | Scala | mit | 1,518 |
/*
* Copyright © 2014 TU Berlin (emma@dima.tu-berlin.de)
*
* 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 app... | emmalanguage/emma | emma-lib-flink/src/test/scala/org/emmalanguage/lib/graphs/TransitiveClosureFlinkSpec.scala | Scala | apache-2.0 | 1,129 |
package com.datastax.spark.connector.rdd.typeTests
import java.math.BigDecimal
import java.math.BigInteger
import org.apache.spark.sql.types.DecimalType
import org.apache.spark.sql.SaveMode
case class LongRow(pkey: Long, ckey1: Long, ckey2: Long, data1: Long)
case class BigDecimalRow(pkey: BigDecimal, ckey1: BigDeci... | shashwat7/spark-cassandra-connector | spark-cassandra-connector/src/it/scala/com/datastax/spark/connector/rdd/typeTests/VarintTypeTest.scala | Scala | apache-2.0 | 2,748 |
package scala.slick.lifted
import scala.language.existentials
import scala.annotation.implicitNotFound
import scala.slick.SlickException
import scala.slick.util.{ProductLinearizer, ValueLinearizer, NaturalTransformation2, RecordLinearizer}
import scala.slick.ast.{WithOp, TableNode, Node, Symbol}
import scala.annotatio... | zefonseca/slick-1.0.0-scala.2.11.1 | src/main/scala/scala/slick/lifted/Shape.scala | Scala | bsd-2-clause | 6,007 |
// In order to make a universal transformation,
// another type needs to be introduced.
// To read more about FunctionK (~>):
// typelevel.org/cats/datatypes/functionk.html
trait ~>[F[_], G[_]] {
def apply[X](fa: F[X]): G[X]
}
def fromY[A, B]: (A => ?) ~> (B => ?) = new ~>[A => ?, B => ?] {
def apply[X](f: A => X)... | hmemcpy/milewski-ctfp-pdf | src/content/2.6/code/scala/snippet01.scala | Scala | gpl-3.0 | 352 |
package spark.broadcast
import java.io._
import java.net._
import java.util.{BitSet, Comparator, Timer, TimerTask, UUID}
import java.util.concurrent.atomic.AtomicInteger
import scala.collection.mutable.{ListBuffer, Map, Set}
import scala.math
import spark._
import spark.storage.StorageLevel
class BitTorrentBroadcas... | ankurdave/arthur | core/src/main/scala/spark/broadcast/BitTorrentBroadcast.scala | Scala | bsd-3-clause | 34,962 |
/**
* Licensed to Big Data Genomics (BDG) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The BDG licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use ... | laserson/adam | adam-core/src/test/scala/org/bdgenomics/adam/projections/FragmentFieldSuite.scala | Scala | apache-2.0 | 2,246 |
package com.github.mgoeminne.iban
import java.util.Locale
import com.github.mgoeminne.iban
/**
* A representation of a basic bank account number.
*/
abstract class BBAN(val account: String, val countryCode: String)
{
/**
* Transform the BBAN into its IBAN representation.
* @return the IBAN representaion... | mgoeminne/scala-iban | src/main/scala/com/github/mgoeminne/iban/Bban.scala | Scala | mit | 806 |
package org.bitcoins.core.script.arithmetic
import org.bitcoins.core.script.constant._
import org.bitcoins.core.script.control.{
ControlOperationsInterpreter,
OP_VERIFY
}
import org.bitcoins.core.script.flag.ScriptFlagUtil
import org.bitcoins.core.script.result._
import org.bitcoins.core.script.{
ExecutedScriptP... | bitcoin-s/bitcoin-s | core/src/main/scala/org/bitcoins/core/script/arithmetic/ArithmeticInterpreter.scala | Scala | mit | 19,057 |
/*
* Copyright (c) 2014-2021 by The Monix Project Developers.
* See the project homepage at: https://monix.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache... | monixio/monix | monix-eval/shared/src/main/scala/monix/eval/internal/TaskCreate.scala | Scala | apache-2.0 | 8,861 |
/***********************************************************************
* Copyright (c) 2013-2015 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0 which
* accompanies this distribution and is ... | vpipkt/geomesa | geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/iterators/ConsistencyCheckingIterator.scala | Scala | apache-2.0 | 3,167 |
package acolyte.reactivemongo
import reactivemongo.io.netty.channel.DefaultChannelId
import reactivemongo.api.bson.{
BSONDocument,
BSONBoolean,
BSONInteger,
BSONString
}
final class WriteHandlerSpec extends org.specs2.mutable.Specification
with ResponseMatchers with WriteHandlerFixtures {
"Write handler... | cchantep/acolyte | reactive-mongo/src/test/scala/WriteHandlerSpec.scala | Scala | lgpl-2.1 | 6,997 |
/*
* Copyright 2022 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | hmrc/iht-frontend | app/iht/controllers/application/exemptions/charity/CharityNumberController.scala | Scala | apache-2.0 | 5,298 |
/*
* Copyright 2017 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | cjwebb/play-filters | src/main/scala/uk/gov/hmrc/play/filters/frontend/SessionTimeoutFilter.scala | Scala | apache-2.0 | 5,694 |
/*
* 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 ... | mtunique/flink | flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/stream/sql/CorrelateTest.scala | Scala | apache-2.0 | 7,547 |
/*
* Created on 2010/11/28
* Copyright (c) 2010-2014, Wei-ju Wu.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, ... | weiju/zmpp2 | zmpp-tads3/src/test/scala/org/zmpp/tads3/RegexPatternTest.scala | Scala | bsd-3-clause | 4,350 |
/*
* 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 ... | apache/flink | flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/utils/UserDefinedAggFunctions.scala | Scala | apache-2.0 | 5,226 |
package com.eigengo.lift.exercise.classifiers.model
import com.eigengo.lift.exercise.classifiers.ExerciseModel
import com.eigengo.lift.exercise.classifiers.workflows.ClassificationAssertions
trait StandardEvaluation {
import ClassificationAssertions._
import ExerciseModel._
// TODO: introduce memoisation into... | lachatak/lift | server/exercise/src/main/scala/com/eigengo/lift/exercise/classifiers/model/StandardEvaluation.scala | Scala | apache-2.0 | 5,650 |
package com.twitter.finagle.http
/**
* Proxy for Request. This can be used to create a richer request class.
*/
abstract class RequestProxy extends Request.Proxy
| mkhq/finagle | finagle-base-http/src/main/scala/com/twitter/finagle/http/RequestProxy.scala | Scala | apache-2.0 | 166 |
package controllers
import javax.inject._
import play.api._
import play.api.mvc._
@Singleton
class HomeController @Inject() extends Controller {
def index = Action {
Ok(views.html.somar(0, 0, 0))
}
def somar(x: Int, y: Int) = Action.apply {
val resultado = x + y
Ok(views.html.somar(x, y, resultado)... | lrlucena/webapp | exemplos/calculadora/app/controllers/HomeController.scala | Scala | gpl-3.0 | 468 |
package blended.streams.transaction
import akka.NotUsed
import akka.actor.ActorSystem
import akka.stream.scaladsl.{Broadcast, Flow, GraphDSL, Zip}
import akka.stream.FlowShape
import blended.jms.utils.{IdAwareConnectionFactory, JmsDestination}
import blended.streams.FlowHeaderConfig
import blended.streams.jms._
import... | woq-blended/blended | blended.streams/src/main/scala/blended/streams/transaction/TransactionWiretap.scala | Scala | apache-2.0 | 4,485 |
package org.jetbrains.plugins.scala.util
import com.intellij.openapi.diagnostic.Logger
import org.jetbrains.plugins.scala.util.TracingLogger.LogLevel
final class TracingLogger(private val logger: Logger, level: LogLevel) {
def log(message: String): Unit = log(message, TracingLogger.DefaultTraceLogLevel)
def log... | JetBrains/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/util/TracingLogger.scala | Scala | apache-2.0 | 1,273 |
package us.stivers.blue.uri
import scala.collection.immutable.{Map,MapProxy}
/**
* Represents the Query part of a URI.
*/
case class Query(parameters: Map[String,List[String]]) extends MapProxy[String,List[String]] {
val self = parameters
override lazy val toString = Query.QueryToString(this)
}
object Query ... | cstivers78/blue | blue-core/src/main/scala/us/stivers/blue/uri/Query.scala | Scala | apache-2.0 | 1,338 |
import de.tototec.sbuild._
import de.tototec.sbuild.ant._
import de.tototec.sbuild.ant.tasks._
@version("0.7.1")
@classpath(
"mvn:org.sbuild:org.sbuild.plugins.sbuildplugin:0.3.0",
"mvn:org.apache.ant:ant:1.8.4",
"mvn:org.sbuild:org.sbuild.plugins.mavendeploy:0.1.0"
)
class SBuild(implicit _project: Project) {
... | SBuild-org/sbuild-unzip-plugin | org.sbuild.plugins.unzip/SBuild.scala | Scala | apache-2.0 | 3,238 |
package base
import ch.epfl.yinyang.api._
trait Base extends BaseYinYangTypeTag with CodeGenerator {
def main(): Any
}
trait RepBase extends Base {
type R[+T]
} | vjovanov/scala-yinyang | components/dsls/src/base/Base.scala | Scala | bsd-3-clause | 166 |
package com.yetu.siren.json.playjson
import com.yetu.siren.json.JsonBaseSpec
import org.scalactic.TypeCheckedTripleEquals
import org.scalatest.{ Inside, DiagrammedAssertions }
import play.api.libs.json._
class PlayJsonSirenFormatSpec extends JsonBaseSpec[JsValue]
with DiagrammedAssertions with Inside with TypeChe... | yetu/siren-scala | src/test/scala/com/yetu/siren/json/playjson/PlayJsonSirenFormatSpec.scala | Scala | mit | 4,250 |
/*
* 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 ... | jatin9896/incubator-carbondata | integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/preaggregate/TestPreAggCreateCommand.scala | Scala | apache-2.0 | 23,469 |
package com.eevolution.context.dictionary.infrastructure.service.impl
import java.util.UUID
import com.eevolution.context.dictionary.infrastructure.repository.MigrationStepRepository
import com.eevolution.context.dictionary.infrastructure.service.MigrationStepService
import com.lightbend.lagom.scaladsl.api.ServiceCal... | adempiere/ADReactiveSystem | dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/service/impl/MigrationStepServiceImpl.scala | Scala | gpl-3.0 | 2,082 |
package config
import java.io.File
import com.typesafe.config.ConfigFactory
object Config {
val config = ConfigFactory.parseFile(new File("app.conf"))
println(config.getObject("app"))
val folders = config.getObject("app.folders")
}
| felixbr/akka-file-sync | src/main/scala/config/Config.scala | Scala | mit | 242 |
package indix.rocksdb.cascading
import cascading.flow.FlowProcess
import cascading.scheme.{Scheme, SinkCall, SourceCall}
import cascading.tap.Tap
import cascading.tap.hadoop.Hfs
import cascading.tuple.Fields
import indix.rocksdb.RKeyValueWritable
import indix.rocksdb.hadoop.RocksDBOutputFormat
import org.apache.hadoop... | ind9/rocksdb-io | src/main/scala/indix/rocksdb/cascading/RocksDBTap.scala | Scala | apache-2.0 | 1,860 |
package com.twitter.util
import java.io.Serializable
import java.util.concurrent.TimeUnit
object Duration extends TimeLikeOps[Duration] {
def fromNanoseconds(nanoseconds: Long): Duration = new Duration(nanoseconds)
// This is needed for Java compatibility.
override def fromSeconds(seconds: Int): Duration = su... | luciferous/util | util-core/src/main/scala/com/twitter/util/Duration.scala | Scala | apache-2.0 | 14,190 |
package sbt
import java.io.File
import Types.:+:
object CacheTest // extends Properties("Cache test")
{
val lengthCache = new File("/tmp/length-cache")
val cCache = new File("/tmp/c-cache")
import Cache._
import FileInfo.hash._
import Ordering._
import sbinary.DefaultProtocol.FileFormat
def test(): Uni... | jasonchaffee/sbt | cache/src/test/scala/CacheTest.scala | Scala | bsd-3-clause | 781 |
/**
* Copyright (C) 2015 Stratio (http://stratio.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | luismcl/crossdata | core/src/main/scala/org/apache/spark/sql/sources/CatalystToCrossdataAdapter.scala | Scala | apache-2.0 | 13,375 |
import scala.reflect.macros.blackbox.Context
import language.experimental.macros
object Macros {
def impl(c: Context) = {
import c.universe._
val wut = c.typecheck(Select(Literal(Constant(10)), newTermName("$minus")), silent = true)
// println(showRaw(wut, printIds = true, printTypes = true))
c.Expr[... | loskutov/intellij-scala | testdata/scalacTests/macros/t7461/Macros_1.scala | Scala | apache-2.0 | 362 |
/*
* Copyright 2014-15 Intelix Pty Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | intelix/eventstreams | es-core/es-api/src/main/scala/eventstreams/core/actors/ActorTools.scala | Scala | apache-2.0 | 750 |
package com.sysgears.example.config
import com.typesafe.config.ConfigFactory
/**
* Base Configuration.
*/
trait BaseConfiguration {
/**
* Local configuration (application.conf, reference.conf, JVM settings).
*/
val config = ConfigFactory.load()
/**
* Service name.
*/
val Service: String = "exa... | oermolaev/zookeeper-config-example | src/main/scala/com/sysgears/example/config/BaseConfiguration.scala | Scala | unlicense | 445 |
/***********************************************************************
* Copyright (c) 2013-2016 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and is ... | mdzimmerman/geomesa | geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/InfiniteIteratorTest.scala | Scala | apache-2.0 | 1,835 |
/*
* Copyright 2015 PayPal
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | keshin/squbs | squbs-testkit/src/main/scala/org/squbs/testkit/japi/SimpleTestKit.scala | Scala | apache-2.0 | 911 |
package jp.que.ti.sv.util
import org.scalatest.enablers.Length
import jp.que.ti.sv.MessageBox
object StringUtil {
/**
* 全角スペースもトリムします。
* @param value トリム対象の文字列
* @return トリム後の文字列
*/
def trim(value: String): String = {
val valueLen = value.length()
var len = valueLen
if (value == null || v... | yangiYA/simple-validator | simple-valid/src/main/scala/jp/que/ti/sv/util/StringUtil.scala | Scala | mit | 1,990 |
/*
* DistributionFactory.scala
* Methods to create factors for simple distributions.
*
* Created By: Glenn Takata (gtakata@cra.com)
* Creation Date: Dec 15, 2014
*
* Copyright 2014 Avrom J. Pfeffer and Charles River Analytics, Inc.
* See http://www.cra.com or email figaro@cra.com for information.
*
* S... | scottcb/figaro | Figaro/src/main/scala/com/cra/figaro/algorithm/factored/factors/factory/DistributionFactory.scala | Scala | bsd-3-clause | 5,861 |
/*
* 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/simple-reactivemongo | src/test/scala/uk/gov/hmrc/mongo/AtomicUpdateSpec.scala | Scala | apache-2.0 | 10,320 |
package io.youi.model
case class ImageEditorInfo(image: ImageInfo, selection: SelectionInfo)
| outr/youi | core/shared/src/main/scala/io/youi/model/ImageEditorInfo.scala | Scala | mit | 94 |
package ls
import com.mongodb.casbah.Imports._
// for reference http://www.mongodb.org/display/DOCS/Advanced+Queries
object Libraries extends Logged {
import Conversions._
import Mongo._
import com.mongodb.casbah.commons.Imports.ObjectId
import com.mongodb.casbah.commons.{ MongoDBObject => Obj, MongoDBList =... | softprops/ls-server | src/main/scala/Libraries.scala | Scala | mit | 6,656 |
package fr.thomasdufour.autodiff
package derived
import shapeless.Cached
import shapeless.Refute
object cached {
implicit def mkDiff[A]( implicit refute: Refute[Diff[A]], ev: Cached[MkDiff[A]] ): Diff[A] = {
val _ = refute
ev.value
}
}
| chwthewke/auto-diff | auto-diff-generic/src/main/scala/fr/thomasdufour/autodiff/derived/cached.scala | Scala | apache-2.0 | 250 |
package test
import play.api.test._
class WebRTCIntegration extends BrowserSpecification {
"Two browsers" should {
// "be able to chat via WebRTC Client" in new WithTwoBrowsers(Chrome, Chrome) {
// "be able to chat via WebRTC" in new WithTwoBrowsers(Firefox, Firefox) {
"be able to chat via WebRTC" in ne... | OlivierBlanvillain/scalajs-transport | examples/chat-webrtc/jvm/test/WebRTCIntegration.scala | Scala | mit | 682 |
/*
* Copyright (c) 2013-2014 Telefónica Investigación y Desarrollo S.A.U.
*
* 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
*
* Unles... | telefonicaid/fiware-cosmos-platform | cosmos-api/test/es/tid/cosmos/api/profile/dao/mock/MockCosmosDataStore.scala | Scala | apache-2.0 | 8,006 |
/*
* 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 ... | akopich/spark | sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/ProcessingTimeExecutorSuite.scala | Scala | apache-2.0 | 5,884 |
/*
Copyright 2013 Cristian Vrabie, Evelina Vrabie
This file is part of UKGist.
UKGist is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.... | CodeAndMagic/ukgist-server | src/main/scala/com/codeandmagic/ukgist/model/PoliceCrimeData.scala | Scala | gpl-3.0 | 2,974 |
/*
Copyright 2016-17, Hasso-Plattner-Institut fuer Softwaresystemtechnik GmbH
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicab... | bpn1/ingestion | src/main/scala/de/hpi/ingestion/dataimport/dbpedia/DBpediaImport.scala | Scala | apache-2.0 | 7,974 |
package controllers
import javax.inject.{Inject, Singleton}
import com.github.j5ik2o.forseti.adaptor.generator.IdGenerator
import com.github.j5ik2o.forseti.adaptor.handler.ProtocolModeType
import com.github.j5ik2o.forseti.adaptor.handler.flow.`implicit`.{
AuthorizationImplicitGrant,
AuthorizationImplicitGrantHand... | j5ik2o/forseti | app/open-id-provider/app/controllers/ProviderImplicitFlowController.scala | Scala | mit | 5,520 |
/*
* Copyright 2022 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | hmrc/pbik-frontend | app/config/wiring.scala | Scala | apache-2.0 | 1,060 |
/**
* Copyright (c) 2013-2015 Patrick Nicolas - Scala for Machine Learning - All rights reserved
*
* The source code in this file is provided by the author for the sole purpose of illustrating the
* concepts and algorithms presented in "Scala for Machine Learning". It should not be used to
* build commercial ap... | batermj/algorithm-challenger | books/cs/machine-learning/scala-for-machine-learning/1rst-edition/original-src-from-the-book/src/main/scala/org/scalaml/reinforcement/qlearning/QLState.scala | Scala | apache-2.0 | 3,085 |
package uk.co.mattthomson.coursera.ggp.gresley.gdl
import org.scalatest.FlatSpec
import org.scalatest.matchers.ShouldMatchers
class RuleSpec extends FlatSpec with ShouldMatchers {
"A rule" should "bind based on the supplied facts" in {
val rule = Rule(Input(Role("black"), Action("move", List(VariableTerm("x")))... | matt-thomson/gresley | src/test/scala/uk/co/mattthomson/coursera/ggp/gresley/gdl/RuleSpec.scala | Scala | mit | 1,605 |
/******************************************************************************
File: core.scala
Description: FlexPRET Processor (configurable 5-stage RISC-V processor)
Author: Michael Zimmer (mzimmer@eecs.berkeley.edu)
Contributors:
License: See LICENSE.txt
************************************************************... | mdsalman729/flexpret_project | src/Core/core.scala | Scala | bsd-3-clause | 6,555 |
package example
object Main extends App {
println(Lists.sum(List(1,3,2)))
} | mmcc007/scala-principles | example/src/main/scala/example/Main.scala | Scala | gpl-3.0 | 78 |
package org.scaladebugger.test.info
import org.scaladebugger.test.java.{JavaEnumerations, JavaStaticMethods}
/**
* Provides tests for examining class type information.
*
* @note Should have a class name of org.scaladebugger.test.info.ClassType
*/
object ClassType {
private trait BaseInterface
private trait In... | chipsenkbeil/scala-debugger | scala-debugger-test/src/main/scala/org/scaladebugger/test/info/ClassType.scala | Scala | apache-2.0 | 2,478 |
package controllers
import play.api._
import play.api.mvc._
class UserGuide192 extends Controller {
def userGuideIndex = Action {
Ok(views.html.userGuide_1_9_2.userGuideIndex())
}
def writingYourFirstTest = Action {
Ok(views.html.userGuide_1_9_2.writingYourFirstTest())
}
def usingAssertions = Act... | scalatest/scalatest-website | app/controllers/UserGuide192.scala | Scala | apache-2.0 | 2,982 |
package io.udash.web.guide
import io.udash._
import io.udash.web.commons.views.MarkdownPageState
import io.udash.web.guide.markdown.MarkdownPage
sealed abstract class RoutingState(val parentState: Option[ContainerRoutingState]) extends State {
override type HierarchyRoot = RoutingState
def url(implicit applicati... | UdashFramework/udash-guide | guide/src/main/scala/io/udash/web/guide/RoutingStatesDef.scala | Scala | gpl-3.0 | 3,918 |
package scala.models
import com.bryzek.apidoc.generator.v0.models.InvocationForm
import ning.Ning18ClientGenerator
import org.scalatest.{ShouldMatchers, FunSpec}
class ExampleUnionTypesSpec extends FunSpec with ShouldMatchers {
private lazy val service = models.TestHelper.parseFile(s"/examples/union-types-service.... | krschultz/apidoc-generator | scala-generator/src/test/scala/models/ExampleUnionTypesSpec.scala | Scala | mit | 1,092 |
/*
* Copyright 2014–2017 SlamData 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 agr... | drostron/quasar | connector/src/test/scala/quasar/connector/EnvironmentErrorSpec.scala | Scala | apache-2.0 | 844 |
package notebook.kernel.pfork
import java.io.{EOFException, File, ObjectInputStream, ObjectOutputStream}
import java.net._
import java.util.concurrent.Executors
import java.util.concurrent.atomic.AtomicBoolean
import com.typesafe.config.Config
import org.apache.commons.exec._
import org.apache.commons.exec.util.Strin... | antonkulaga/spark-notebook | modules/subprocess/src/main/scala/notebook/kernel/pfork/BetterFork.scala | Scala | apache-2.0 | 8,455 |
/**
* The MIT License (MIT) Copyright (c) 2014 University of Applied Sciences, Berlin, Germany
* For more detailed information, please read the licence.txt in the root directory.
**/
package org.onepercent.Jobs
import org.onepercent.utils.ApacheSparkController
import org.onepercent.{JobExecutor, JobResult}
/**
*... | isn0gud/onepercent | src/main/scala/org/onepercent/Jobs/ApacheSparkJob.scala | Scala | mit | 775 |
/**
* Copyright (C) 2016 DANS - Data Archiving and Networked Services (info@dans.knaw.nl)
*
* 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... | DANS-KNAW/easy-split-multi-deposit | src/main/scala/nl.knaw.dans.easy.multideposit/SplitMultiDepositApp.scala | Scala | apache-2.0 | 4,533 |
package org.juanitodread.pitayafinch.nlp.tools.entities.fixtures
import org.juanitodread.pitayafinch.formatters.NumberFormatter
import org.juanitodread.pitayafinch.model.nlp.entities.Entity
import org.juanitodread.pitayafinch.nlp.tools.entities.EntityRecognizer
import org.juanitodread.pitayafinch.nlp.tools.models.enti... | juanitodread/pitaya-finch | src/test/scala/org/juanitodread/pitayafinch/nlp/tools/entities/fixtures/EntityRecognizerFixture.scala | Scala | apache-2.0 | 759 |
/*
* Copyright (c) 2017 Georgios Andreadakis
*
* 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... | GeorgiosAndreadakis/TextAnalyzerPlatform | application/src/main/scala/org/tap/application/importdoc/DocImporter.scala | Scala | apache-2.0 | 1,531 |
/*
* Copyright (c) 2012 - 2020 Splice Machine, Inc.
*
* This file is part of Splice Machine.
* Splice Machine is free software: you can redistribute it and/or modify it under the terms of the
* GNU Affero General Public License as published by the Free Software Foundation, either
* version 3, or (at your option) ... | splicemachine/spliceengine | splice_spark2/src/test/spark3.1/com/splicemachine/spark2/splicemachine/TestStreamingContext.scala | Scala | agpl-3.0 | 6,350 |
/*
* Copyright 2014 IBM Corp.
*
* 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... | yeghishe/spark-kernel | protocol/src/main/scala/com/ibm/spark/kernel/protocol/v5/content/StreamContent.scala | Scala | apache-2.0 | 1,258 |
/*
* Copyright 2017-2022 Viktor Lövgren
*
* SPDX-License-Identifier: MIT
*/
package ciris
import org.http4s.Uri
package object http4s {
implicit final val uriConfigDecoder: ConfigDecoder[String, Uri] =
ConfigDecoder[String].mapOption("Uri")(Uri.fromString(_).toOption)
}
| vlovgr/ciris | modules/http4s/src/main/scala/ciris/http4s/http4s.scala | Scala | mit | 285 |
/*
* 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 ... | wangyixiaohuihui/spark2-annotation | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala | Scala | apache-2.0 | 25,333 |
package edu.msstate.dasi.csb.workload.spark
import edu.msstate.dasi.csb.workload.Workload
import org.apache.spark.graphx.Graph
import scala.reflect.ClassTag
/**
* Collects all outgoing edges for each vertex.
*/
class OutEdges(engine: SparkEngine) extends Workload {
val name = "Out-edges"
/**
* Collects all... | msstate-dasi/csb | csb/src/main/scala/edu/msstate/dasi/csb/workload/spark/OutEdges.scala | Scala | gpl-3.0 | 509 |
/*
* @author Philip Stutz
*
* Copyright 2012 University of Zurich
*
* 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
*
* U... | mageru/signal-collect | src/main/scala/com/signalcollect/storage/VertexMap.scala | Scala | apache-2.0 | 10,736 |
package com.artclod.mathml.scalar.concept
import org.junit.runner.RunWith
import org.scalatestplus.play._
import play.api.test.Helpers._
import org.junit.runner.RunWith
import play.api.test._
import play.api.test.Helpers._
import com.artclod.mathml._
import com.artclod.mathml.scalar._
import com.artclod.mathml.scalar.... | kristiankime/calc-tutor | test/com/artclod/mathml/scalar/concept/UnaryFunctionSpec.scala | Scala | mit | 639 |
package com.crobox.clickhouse.dsl.column
import com.crobox.clickhouse.dsl.schemabuilder.ColumnType
import com.crobox.clickhouse.dsl.schemabuilder.ColumnType.SimpleColumnType
import com.crobox.clickhouse.dsl.{ExpressionColumn, TableColumn}
trait TypeCastFunctions { self: Magnets =>
abstract class TypeCastColumn[V](... | crobox/clickhouse-scala-client | dsl/src/main/scala/com.crobox.clickhouse/dsl/column/TypeCastFunctions.scala | Scala | lgpl-3.0 | 7,555 |
/* ---------------------------------------------------------------------
%%
%% Copyright (c) 2007-2014 Basho Technologies, Inc. All Rights Reserved.
%%
%% This file is provided to you under the Apache License,
%% Version 2.0 (the "License"); you may not use this file
%% except in compliance with the License. You may ... | basho-labs/rinamo | tests/com.basho.dynamodb.integ/src/test/scala/acceptance/HashMappingTest.scala | Scala | apache-2.0 | 7,480 |
// Copyright (C) 2013 Frank Raiser
// See the LICENCE file distributed with this work for additional
// information regarding copyright ownership.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the Lic... | FrankRaiser/scala-logic | src/main/scala/scala/logic/rules/Rule.scala | Scala | apache-2.0 | 932 |
/**
* Copyright 2017-2018 Alexis Seigneurin.
*
* 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 ... | aseigneurin/kafka-streams-scala | src/main/scala/com/github/aseigneurin/kafka/streams/scala/ImplicitConversions.scala | Scala | apache-2.0 | 1,288 |
/*
* Copyright (c) 2016 Tinkoff
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | TinkoffCreditSystems/aerospike-scala | src/test/scala/ru/tinkoff/aerospikemacro/converters/CasterTest.scala | Scala | apache-2.0 | 1,927 |
Subsets and Splits
Filtered Scala Code Snippets
The query filters and retrieves a sample of code snippets that meet specific criteria, providing a basic overview of the dataset's content without revealing deeper insights.