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 test.support import ddd.support.domain.event.{DomainEventMessage, EventPublisher} import akka.actor.Actor trait LocalPublisher extends EventPublisher { this: Actor => override def publish(em: DomainEventMessage) { context.system.eventStream.publish(em.event) } }
pawelkaczor/ddd-leaven-akka
src/test/scala/test/support/LocalPublisher.scala
Scala
mit
285
package org.scalatra.atmosphere import org.json4s._ class NativeSimpleWireFormat(implicit formats: Formats) extends SimpleJsonWireFormat with native.JsonMethods { protected def renderJson(json: JsonAST.JValue): String = compact(render(json)) }
lightvector/scalatra
atmosphere/src/main/scala/org/scalatra/atmosphere/NativeSimpleWireFormat.scala
Scala
bsd-2-clause
247
/* * Copyright 2014 Pascal Voitot (@mandubian) * * 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 ...
mandubian/zpark-ztream
src/main/scala/LocalInputDStream.scala
Scala
apache-2.0
10,496
/* * This file is part of eCobertura. * * Copyright (c) 2009, 2010 Joachim Hofer * All rights reserved. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/le...
jmhofer/eCobertura
ecobertura.core/src/main/scala/ecobertura/core/log/LogStatus.scala
Scala
epl-1.0
1,117
package net.bmjames.opts.helpdoc import net.bmjames.opts.internal.words import net.bmjames.opts.types.Doc import scalaz.{Applicative, Monoid, MonadPlus} import scalaz.std.list._ import scalaz.std.option._ import scalaz.syntax.std.option._ import scalaz.syntax.monadPlus._ import scalaz.syntax.foldable._ /** The fre...
bmjames/scala-optparse-applicative
src/main/scala/net/bmjames/opts/helpdoc/Chunk.scala
Scala
bsd-3-clause
3,144
/* * Copyright 2012 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...
wyzssw/zipkin
zipkin-web/src/main/scala/com/twitter/zipkin/web/Main.scala
Scala
apache-2.0
4,760
/*********************************************************************** * Copyright (c) 2013-2022 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
locationtech/geomesa
geomesa-features/geomesa-feature-kryo/src/main/scala/org/locationtech/geomesa/features/kryo/json/KryoJsonSerialization.scala
Scala
apache-2.0
20,148
/* * This file is part of Kiama. * * Copyright (C) 2011-2015 Anthony M Sloane, Macquarie University. * * Kiama is free software: you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the * Free Software Foundation, either version 3 of the License, or ...
adeze/kiama
library/src/org/kiama/util/Tests.scala
Scala
gpl-3.0
10,926
/* * Copyright 2019 ACINQ SAS * * 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...
ACINQ/eclair
eclair-core/src/test/scala/fr/acinq/eclair/interop/rustytests/RustyTestsSpec.scala
Scala
apache-2.0
6,613
/* * Copyright 2010-2011 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or ag...
lift/framework
persistence/squeryl-record/src/test/scala/net/liftweb/squerylrecord/SquerylRecordSpec.scala
Scala
apache-2.0
15,678
/* * Copyright 2011-2018 GatlingCorp (http://gatling.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 applic...
wiacekm/gatling
gatling-commons/src/main/scala/io/gatling/commons/util/HtmlHelper.scala
Scala
apache-2.0
1,460
import scala.io._ val ifrsIn = Source.fromFile("ifrs.en.txt").getLines.map(_.trim) var ngrams = collection.mutable.Set[String]() var ngs : List[String] = Nil val N = 3 for(line <- ifrsIn) { val ws = line.split(" ") for(w <- ws) { ngs ::= w for(i <- 1 to 3) { ngrams += ngs.take(i).mkString(" ") ...
monnetproject/bliss
betalm/scripts/ngram-salient-intersect.scala
Scala
bsd-3-clause
519
(lp1 (ccopy_reg _reconstructor p2 (cpygments.token _TokenType p3 c__builtin__ tuple p4 (S'Comment' p5 S'Multiline' p6 ttRp7 (dp8 S'subtypes' p9 c__builtin__ set p10 ((ltRp11 sS'parent' p12 g2 (g3 g4 (g5 ttRp13 (dp14 g12 g2 (g3 g4 (ttRp15 (dp16 g5 g13 sS'Name' p17 g2 (g3 g4 (g17 ttRp18 (dp19 S'Function' p20 g2 (g3 g4 (g...
qsnake/pygments
tests/examplefiles/output/Errors.scala
Scala
bsd-2-clause
9,649
import scala.tools.partest.ReplTest object Test extends ReplTest { def code = """ |import scala.reflect.classTag |classManifest[scala.List[_]] |classTag[scala.List[_]] |classManifest[scala.collection.immutable.List[_]] |classTag[scala.collection.immutable.List[_]] |classManifest[Predef.Set[_]...
yusuke2255/dotty
tests/pending/run/t6329_repl.scala
Scala
bsd-3-clause
474
package neuroflow.cuda import jcuda.driver.CUcontext import jcuda.driver.JCudaDriver._ /** * @author dlwh **/ class CuContext(val context: CUcontext) extends AnyVal { def withPush[T](t: =>T) = { cuCtxPushCurrent(context) try { t } finally { cuCtxPopCurrent(context) } } } object C...
zenecture/neuroflow
core/src/main/scala/neuroflow/cuda/CuContext.scala
Scala
apache-2.0
773
/* package io.ssc.angles.pipeline.data import com.dkhenry.RethinkDB.{RqlConnection, RqlCursor} import io.ssc.angles.pipeline.explorers.ExplorerUriPair import org.apache.commons.lang3.StringUtils /** * Created by xolor on 16.02.15. */ object RethinkDb extends App { getPairList def getPairList ...
jhendess/angles
src/main/scala/io/ssc/angles/pipeline/data/RethinkDb.scala
Scala
gpl-3.0
1,590
/* * Copyright 2015 Nicolas Rinaudo * * 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...
nrinaudo/tabulate
laws/shared/src/main/scala/kantan/csv/laws/discipline/RfcReaderTests.scala
Scala
mit
1,639
/* * 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 ...
jackylk/incubator-carbondata
integration/spark/src/test/scala/org/apache/carbondata/integration/spark/testsuite/dataload/TestLoadDataWithYarnLocalDirs.scala
Scala
apache-2.0
3,638
package com.socrata.datacoordinator.common.soql.csvreps import com.socrata.datacoordinator.truth.csv.CsvColumnRep import com.socrata.soql.types.{SoQLNull, SoQLValue, SoQLFixedTimestamp, SoQLType} import org.joda.time.DateTime import org.joda.time.format.{DateTimeFormatter, DateTimeFormat} object FixedTimestampRep ext...
socrata-platform/data-coordinator
coordinatorlib/src/main/scala/com/socrata/datacoordinator/common/soql/csvreps/FixedTimestampRep.scala
Scala
apache-2.0
1,147
package com.ignition.types import org.apache.spark.sql.Row import org.apache.spark.sql.types.StructType /** * Provides the conversion of field names to field indices. */ case class RowSchemaHelper(schema: StructType) { val indexMap = schema.fieldNames.zipWithIndex.toMap val fieldNames = schema.fieldNames def...
uralian/ignition
src/main/scala/com/ignition/types/entities.scala
Scala
apache-2.0
1,174
package org.scaladebugger.api.lowlevel.requests.filters import com.sun.jdi.ObjectReference import org.scaladebugger.api.lowlevel.requests.JDIRequestProcessor import org.scaladebugger.api.lowlevel.requests.filters.processors.InstanceFilterProcessor /** * Represents a filter used to limit requests to a specific instan...
ensime/scala-debugger
scala-debugger-api/src/main/scala/org/scaladebugger/api/lowlevel/requests/filters/InstanceFilter.scala
Scala
apache-2.0
1,051
package com.anduo.learn.akka.scala.actor import java.util.ArrayList import java.util.HashMap import akka.actor.{ActorRef, Actor} import com.anduo.learn.akka.scala.message.{MapData, WordCount, ReduceData, Result} import scala.collection.JavaConversions._ /** * ━━━━━━神兽出没━━━━━━ *    ┏┓   ┏┓ *   ┏┛┻━━━┛┻┓ *   ┃    ...
anduo1989/learn_akka
akka-sbt/src/main/scala/com/anduo/learn/akka/scala/actor/ReduceActor.scala
Scala
apache-2.0
1,764
// Project: Default (Template) Project // Module: // Description: // Distributed under the MIT License (see included file LICENSE) package slogging abstract class LoggerTemplate extends AbstractUnderlyingLogger { @inline private final def log(level: MessageLevel, src: String, msg: String): Unit = log(leve...
jokade/slogging
shared/src/main/scala/slogging/LoggerTemplate.scala
Scala
mit
2,653
package rl package tests import org.specs2.Specification import java.net.IDN import org.specs2.matcher.DataTables import org.specs2.execute.Result import skinny.micro.rl._ class IDNASpec extends Specification with DataTables { def is = "To deal with Unicode domains" ^ "should convert from unicode to ASC...
xerial/skinny-micro
micro/src/test/scala/rl/tests/IDNASpec.scala
Scala
bsd-2-clause
1,661
package com.datayumyum.helloPOS case class Address(line1: String, city: String, state: String, zip: String) { override def toString: String = { f"${line1}\r\n${city}, ${state} ${zip}" } }
sonwh98/helloPOS
src/main/scala/com/datayumyum/helloPOS/Address.scala
Scala
gpl-2.0
196
/* * 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 ...
mohammadshahidkhan/incubator-carbondata
integration/spark/src/main/scala/org/apache/spark/sql/CarbonDatasourceHadoopRelation.scala
Scala
apache-2.0
6,900
package crm import java.util.concurrent._ import scala.language._ import scala.util.control.Exception._ import scopt._ import org.w3c.dom._ import dispatch._ import scala.concurrent.Await import scala.concurrent.duration._ import scala.async.Async._ import scala.util._ import org.log4s._ import cats._ import cats.data...
aappddeevv/mscrm-soap-auth
src/main/scala/crm/entityscript.scala
Scala
apache-2.0
16,343
package org.finra.datagenerator.scaffolding.dependency /** * Created by dkopel on 10/7/16. */ case class Aspect(label: String)
yukaReal/DataGenerator
rubber-scaffolding/rubber-dependency/src/main/scala/org/finra/datagenerator/scaffolding/dependency/Aspect.scala
Scala
apache-2.0
132
package pureconfig.module import com.typesafe.config.Config import zio.config._ import zio.config.typesafe._ import pureconfig.ConfigConvert package object zioconfig { implicit def zioConfigConvert[A](implicit cd: ConfigDescriptor[A]): ConfigConvert[A] = ConfigConvert[Config].xemap( c => Typesafe...
melrief/pureconfig
modules/zio-config/src/main/scala/pureconfig/module/zioconfig/package.scala
Scala
mpl-2.0
722
package org.opencommercesearch.api.common import java.net.URLEncoder import java.util import org.apache.solr.client.solrj.SolrQuery import org.apache.solr.client.solrj.response.{FacetField, QueryResponse} import org.apache.solr.common.util.NamedList import org.opencommercesearch.api.controllers.BaseSpec import org.op...
madickson/opencommercesearch
opencommercesearch-api/test/org/opencommercesearch/api/common/FacetHandlerSpec.scala
Scala
apache-2.0
5,581
/* * Copyright 2010 LinkedIn * * 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...
tcrayford/hafka
kafka/core/src/main/scala/kafka/consumer/SimpleConsumer.scala
Scala
bsd-3-clause
7,832
package com.spike.giantdataanalysis.spark.example.rdd import com.spike.giantdataanalysis.spark.support.Datasets import java.util.Date /** * RDD Actions * * collect() * count() * countByValue() * take(num) * top(num) * takeOrdered(num)(ordering) * takeSample(withReplacement, num, [seed]) * reduce(func) * ag...
zhoujiagen/giant-data-analysis
data-management-infrastructure/scala-infrastructure-apache-spark/src/main/scala/com/spike/giantdataanalysis/spark/example/rdd/RDDActions.scala
Scala
mit
1,618
package scalaprops import scalaz._ import scalaz.std.anyVal._ import scalaz.std.either._ import scalaz.std.tuple._ import FunctionEqual._ import ScalapropsScalaz._ object IndexedReaderWriterStateTTest extends Scalaprops { private[this] implicit def equal[F[_]: Monad, R, W, S1, S2, A](implicit F: Equal[(R, S1) =...
scalaprops/scalaprops
scalaz/src/test/scala/scalaprops/IndexedReaderWriterStateTTest.scala
Scala
mit
1,664
package net.paploo.encountersimulator.sim /** * We isolate damage calculation so that different rule sets can be implemented. * * Note that we attempt to isolate use of random numbers to here, making the * non-determinism be limited. */ trait DamageCalculator { def computeDamage(attacker: Creature, defender: Cr...
paploo/EncounterSimulator
src/main/scala/net/paploo/encountersimulator/sim/DamageCalculator.scala
Scala
bsd-3-clause
667
/* * 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...
saurabharora80/hmrc-email-renderer
app/uk/gov/hmrc/hmrcemailrenderer/config/microserviceGlobal.scala
Scala
apache-2.0
2,487
package com.daxin.localtest import org.apache.spark.{SparkConf, SparkContext} import org.apache.spark.rdd.RDD /** * Created by 青春常驻Dax1n on 2016/10/8. */ object App { def main(args: Array[String]): Unit = { //一些关于RDD的隐式转换都在RDD的伴生兑现各种实现的 //就是在object RDD中实现的,好处是在隐式转换的时候不用创建RDD的实例就可以使用隐式函数 //如果隐式转换在c...
Dax1n/Scala
Spark/src/main/scala/com/daxin/localtest/App.scala
Scala
apache-2.0
1,004
/** * 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"); yo...
everttigchelaar/camel-svn
components/camel-scala/src/test/scala/org/apache/camel/scala/test/Envelope.scala
Scala
apache-2.0
992
package com.github.vooolll.serialization.compatibility import com.github.vooolll.base._ import com.github.vooolll.domain.oauth._ import com.github.vooolll.serialization.FacebookDecoders._ class AccessTokenCompatSpec extends CompatibilitySpec { val userAccessTokenPath = "testdata/user_access_token.json" val appAc...
vooolll/facebook4s
src/test/scala/com/github/vooolll/serialization/compatibility/AccessTokenCompatSpec.scala
Scala
apache-2.0
968
/* * Copyright (C) 2011 Lalit Pant <pant.lalit@gmail.com> * * The contents of this file are subject to the GNU General Public License * Version 3 (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.gnu.org/copyleft/gpl.html * *...
dotta/kojo
KojoEnv/test/unit/src/net/kogics/kojo/xscala/CompilerAndRunnerTest.scala
Scala
gpl-3.0
739
package com.github.leifker.spark.sentiment import com.github.leifker.spark.sentiment.POSMode.POSMode import org.apache.spark.ml.UnaryTransformer import org.apache.spark.ml.param._ import com.peoplepattern.text.Implicits._ import org.apache.spark.ml.util.{DefaultParamsReadable, DefaultParamsWritable, Identifiable} impo...
leifker/geo-sentiment
spark/src/main/scala/com/github/leifker/spark/sentiment/ReviewTokenizer.scala
Scala
gpl-3.0
7,221
package com.twitter.finagle.thriftmux.pushsession import com.twitter.finagle.Mux.param.OppTls import com.twitter.finagle.pushsession.RefPushSession import com.twitter.finagle.pushsession.utils.MockChannelHandle import com.twitter.finagle.{param => fparam} import com.twitter.finagle.mux.{Request, Response} import com.t...
luciferous/finagle
finagle-thriftmux/src/test/scala/com/twitter/finagle/thriftmux/pushsession/MuxDowngradingNegotiatorTest.scala
Scala
apache-2.0
4,392
package pl.touk.nussknacker.ui.api import akka.http.scaladsl.server.{Directive0, Directives} import pl.touk.nussknacker.restmodel.process.ProcessIdWithName import pl.touk.nussknacker.engine.api.process.ProcessId import pl.touk.nussknacker.ui.security.api.Permission.Permission import pl.touk.nussknacker.ui.security.api...
TouK/nussknacker
ui/server/src/main/scala/pl/touk/nussknacker/ui/api/AuthorizeProcessDirectives.scala
Scala
apache-2.0
1,618
package net.ground5hark.sbt.css import java.io.{IOException, InputStreamReader, FileInputStream, OutputStreamWriter, FileOutputStream, Closeable} import com.typesafe.sbt.web.pipeline.Pipeline import com.typesafe.sbt.web.{PathMapping, SbtWeb} import com.yahoo.platform.yui.compressor.CssCompressor import sbt.Keys._ imp...
ground5hark/sbt-css-compress
src/main/scala/net/ground5hark/sbt/css/SbtCssCompress.scala
Scala
mit
4,125
/* * 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 ...
vax11780/spark
core/src/main/scala/spark/scheduler/DAGScheduler.scala
Scala
apache-2.0
32,801
package controllers import play.api._ import play.api.mvc._ import models.Task import play.api.data._ import play.api.data.Forms._ object Application extends Controller { val taskForm = Form( "label" -> nonEmptyText ) def index = Action { Redirect(routes.Application.tasks) } def tasks = Action ...
ericmoritz/play-example
todolist/app/controllers/Application.scala
Scala
mit
718
package mesosphere.marathon package raml import mesosphere.marathon.core.pod import mesosphere.marathon.core.pod.PodDefinition import mesosphere.marathon.core.pod.PodDefinition._ import mesosphere.marathon.state.{ PathId, Timestamp } import mesosphere.marathon.state import scala.concurrent.duration._ trait PodConver...
guenter/marathon
src/main/scala/mesosphere/marathon/raml/PodConversion.scala
Scala
apache-2.0
4,765
package implConv object B { import A._ "".foo val x: Int = "" // error: feature val y: String = 1 // error: feature }
som-snytt/dotty
tests/neg-custom-args/impl-conv/B.scala
Scala
apache-2.0
131
package algo object FastExponentiation { def powerOf(a:Int, b:Int):Int = { var result = 1; var a1 = a; var b1 = b; while(b1!=0) { if(b1%2==1) { result*=a1; } b1 = b1/ 2; a1 = a1* a1; } return result } }
mrushah/DSProject
DSProject/src/algo/FastExponentiation.scala
Scala
apache-2.0
288
/* * Copyright 2007-2010 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
lift/lift
framework/lift-modules/lift-paypal/src/main/scala/net/liftweb/paypal/Rules.scala
Scala
apache-2.0
1,418
package scalan.monads import scalan._ import scala.reflect.runtime.universe._ import scalan.collections.CollectionsDslExp trait FreeStates extends Base { self: MonadsDsl => type RepStateF[S,A] = Rep[StateF[S,A]] trait StateF[S, A] extends Def[StateF[S, A]] { implicit def eS: Elem[S] implicit def eA: Elem...
scalan/scalan
effects/src/test/scala/scalan/monads/FreeStates.scala
Scala
apache-2.0
7,065
//package edu.uwm.cs.pir.domain // //import edu.uwm.cs.pir.spark.SparkObject._ //import edu.uwm.cs.pir.utils.GeneralUtils._ // //import java.awt.image.BufferedImage //import java.io.IOException //import java.io.InputStream // //import com.amazonaws.services.s3.AmazonS3 // //import edu.uwm.cs.mir.prototypes.feature.lire...
pir-dsl/pir-embedding
core/src/main/scala/edu/uwm/cs/pir/domain/MIRDomain.scala
Scala
gpl-2.0
1,865
/*********************************************************************** * Copyright (c) 2013-2018 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...
ddseapy/geomesa
geomesa-kudu/geomesa-kudu-datastore/src/main/scala/org/locationtech/geomesa/kudu/index/z2/KuduZ2Schema.scala
Scala
apache-2.0
4,087
/* * 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 app...
Stratio/crossdata
core/src/main/scala/org/apache/spark/sql/crossdata/util/CreateRelationUtil.scala
Scala
apache-2.0
2,027
package com.bolour.boardgame.scala.server.domain.json import java.time.Instant import com.bolour.boardgame.scala.server.domain.json.JsonUtil.unwrapQuotedJsonString import spray.json.{DefaultJsonProtocol, JsString, JsValue, RootJsonFormat, deserializationError} object InstantJsonProtocol extends DefaultJsonProtocol {...
azadbolour/boardgame
scala-server/app/com/bolour/boardgame/scala/server/domain/json/InstantJsonProtocol.scala
Scala
agpl-3.0
824
package org.alghimo.spark.dimensionalModelling import org.apache.spark.sql.{Dataset, Encoder} /** * Created by alghimo on 6/7/2017. */ trait EnrichedDimensionWithDimensionProvider[ENRICHED_DIM <: (Product with Serializable), DIM <: (Product with Serializable)] { type EnrichedWithDimension = (ENRICHED_DIM, DIM) ...
alghimo/spark-dimensional-modelling
src/main/scala/org/alghimo/spark/dimensionalModelling/EnrichedDimensionWithDimensionProvider.scala
Scala
apache-2.0
1,173
package com.github.j5ik2o.dddbase.example.repository.util import java.net.InetSocketAddress import java.nio.channels.ServerSocketChannel /** * This code is originated from Spray. * https://github.com/spray/spray/blob/b473d9e8ce503bafc72825914f46ae6be1588ce7/spray-util/src/main/scala/spray/util/Utils.scala#L35-L47...
j5ik2o/scala-ddd-base-functional
example/src/test/scala/com/github/j5ik2o/dddbase/example/repository/util/RandomPortSupport.scala
Scala
mit
1,025
package org.twitterist.utils.solr.schemamanager.client import org.twitterist.utils.solr.schemamanager.schema.Field /** Client implementation base on the Dispatch http client * * This is the default http client implementation used * * @see http://dispatch.databinder.net/Dispatch.html */ private[schemamanager] o...
twitterist/solr-schema-manager
src/main/scala/org/twitterist/utils/solr/schemamanager/client/DispatchHttpClient.scala
Scala
mit
673
package com.github.diegopacheco.sandbox.scripts.scala.basic.hello.world object Hello{ def main(args : Array[String]) = println("Hello, world!") }
diegopacheco/scala-playground
scala-playground/src/com/github/diegopacheco/sandbox/scripts/scala/basic/hello/world/hello.scala
Scala
unlicense
150
package code.snippet import java.text.SimpleDateFormat import java.util.Date import net.liftweb.util.Helpers._ import net.liftweb.util._ import code.lib.BuildInfo class CacheBust { lazy val buildTime = BuildInfo.buildTime lazy val date: Date = new Date(buildTime) lazy val formatter = new SimpleDateFormat("yyMM...
karma4u101/FoBo-Demo
pimping-lift-advanced-md/src/main/scala/code/snippet/CacheBust.scala
Scala
apache-2.0
488
/*********************************************************************** * 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/util/GeoMesaBatchWriterConfig.scala
Scala
apache-2.0
3,592
/** * Copyright 2011-2017 GatlingCorp (http://gatling.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 appli...
timve/gatling
gatling-core/src/main/scala/io/gatling/core/feeder/JsonFeederFileParser.scala
Scala
apache-2.0
1,722
package parku30 import java.nio.charset.Charset import java.nio.file.{Files, Paths} import parku30.kml.KmlDoc import parku30.mapslt.StringUtil._ import parku30.mapslt.{MapsltClassifiers, MapsltMapSearchServer, MapsltTerritoryServer, MapsltToKmlConverter} case class Config(teritorija: Option[String] = None, ...
pukomuko/mapslt-to-kml
src/main/scala/parku30/MapsltToKml.scala
Scala
mit
4,731
package org.spring4scala.jdbc import org.springframework.jdbc.support._ import java.sql._ import javax.sql._ import scala.language.implicitConversions package object support { type DatabaseMetaDataCallbackFunction = DatabaseMetaData => AnyRef class DBMetadataExtractor(callback: DatabaseMetaDataCallbackFunction) e...
orthanner/spring4scala
spring4scala-jdbc/src/main/scala/org/spring4scala/jdbc/support/package.scala
Scala
mit
586
package scorex.waves.transaction import play.api.libs.functional.syntax._ import play.api.libs.json.{JsPath, Reads, Writes} import scorex.account.{Account, PublicKeyAccount} import scorex.api.http.formats._ case class SignedPayment(timestamp: Long, amount: Long, fee: ...
B83YPoj/Waves
src/main/scala/scorex/waves/transaction/SignedPayment.scala
Scala
apache-2.0
1,421
/* * 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 ...
bowenli86/flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/common/CommonPythonCorrelate.scala
Scala
apache-2.0
4,374
import akka.actor.ActorSystem import akka.testkit._ import org.scalatest._ abstract class FSMSpec extends TestKit(ActorSystem()) with ImplicitSender with WordSpecLike with ShouldMatchers with BeforeAndAfterAll { override def afterAll = TestKit.shutdownActorSystem(system) }
fadeddata/ant-fsm
src/test/scala/FSMSpec.scala
Scala
mit
278
package scala.meta.contrib.implicits import scala.meta._ import scala.meta.contrib._ trait ReplaceExtensions { implicit class ExtensionReplacers[A](a: A) { def withStats(bs: List[Stat])(implicit ev: Replace[A, Stat]): A = ev.replace(a, bs) def withMods(bs: List[Mod])(implicit ev: Replace[A, Mod]): A = ev.re...
DavidDudson/scalameta
scalameta/contrib/shared/src/main/scala/scala/meta/contrib/implicits/ReplaceExtensions.scala
Scala
bsd-3-clause
391
package zzb.db.schema import org.squeryl._ //import org.squeryl.PrimitiveTypeMode._ import zzb.db.entites.{ Company, User } object Util extends PrimitiveTypeMode import Util._ /** * Created with IntelliJ IDEA. * User: Simon Xiao * Date: 13-8-20 * Time: 下午5:00 * Copyright baoxian.com 2012~2020 */ object FirstS...
stepover/zzb
zzb-dbaccess/src/test/scala/zzb/db/schema/Schemas.scala
Scala
mit
611
package spinoco.protocol.mail import scodec.Codec import shapeless.Typeable import scala.reflect.ClassTag /** * Created by pach on 13/10/17. */ package object header { trait EmailHeaderField { /** returns name of the email header **/ def name: String } /** denotes header fields that may be used w...
Spinoco/protocol
mail/src/main/scala/spinoco/protocol/mail/header/header.scala
Scala
mit
1,579
package at.hazm.quebic import java.io.File import java.util.Timer import at.hazm.quebic.Queue.Value2Struct object Performance { def main(args:Array[String]):Unit = { val file = File.createTempFile("test-", ".qbc", new File(".")) file.deleteOnExit() val timer = new Timer("") val capacity = Long.Max...
torao/quebic
src/test/scala/at/hazm/quebic/Performance.scala
Scala
apache-2.0
1,890
/* sbt -- Simple Build Tool * Copyright 2008, 2009, 2010 Mark Harrah */ package sbt import java.io.File import compiler.AnalyzingCompiler final class Console(compiler: AnalyzingCompiler) { /** Starts an interactive scala interpreter session with the given classpath.*/ def apply(classpath: Seq[File], log: Logge...
ornicar/xsbt
main/actions/Console.scala
Scala
bsd-3-clause
1,224
package org.jetbrains.plugins.scala package lang package transformation package general /** * @author Pavel Fatin */ class ExpandForComprehensionTest extends TransformerTest(new ExpandForComprehension()) { def testForeach(): Unit = check( before = "for(v <- Seq(A)) { v.a() }", after = "Seq(A).foreach(v ...
ilinum/intellij-scala
test/org/jetbrains/plugins/scala/lang/transformation/general/ExpandForComprehensionTest.scala
Scala
apache-2.0
1,351
/* * Copyright (c) 2014 - 2015 Contributor. All rights reserved. */ package org.scalaide.debug.internal.expression package proxies.phases import scala.reflect.runtime._ import org.scalaide.debug.internal.expression.Names.Debugger trait PrimitivesCommons { self: AstTransformer[_] => import universe._ /** cre...
Kwestor/scala-ide
org.scala-ide.sdt.debug.expression/src/org/scalaide/debug/internal/expression/proxies/phases/PrimitivesCommons.scala
Scala
bsd-3-clause
504
package net.iakovlev.dynamo.generic.test import net.iakovlev.dynamo.generic.AwsAttributeValueDecoder import org.specs2.mutable.Specification import com.amazonaws.services.dynamodbv2.{model => aws} class DecodeMapAsClassTest extends Specification with AwsAttributeValueDecoder { "Use map based decoder for ne...
RomanIakovlev/easycodecs
aws-dynamodb-bindings/src/test/scala/net/iakovlev/dynamo/generic/test/DecodeMapAsClassTest.scala
Scala
apache-2.0
877
def f(a: Int, b: Boolean) {} /* applicable: false */ f(/* offset: 6 */a = 1, /* offset: 14 */b = true, /*resolved: false */c = "foo")
ilinum/intellij-scala
testdata/resolve2/function/named/NoName2.scala
Scala
apache-2.0
134
import reactivemongo.bson.{ BSON, BSONDecimal, BSONDocument, BSONDocumentHandler, BSONDocumentReader, BSONDocumentWriter, BSONDouble, BSONHandler, BSONInteger, BSONNull, BSONReader, BSONWriter, Macros } import reactivemongo.bson.exceptions.DocumentKeyNotFound import org.specs2.matcher.MatchRe...
ornicar/ReactiveMongo
macros/src/test/scala/MacroSpec.scala
Scala
apache-2.0
16,534
package io.sweetheart.examples.pis.classesAndObjects object SemiInterface { def printProd2(): Unit = { val s = "hello"; println(s) } def check(x: Int): Unit = { if (x < 2) println("too small") else println("ok") } }
zzragida/ScalaExamples
ProgrammingInScala/src/io/sweetheart/examples/pis/classesAndObjects/SemiInterface.scala
Scala
apache-2.0
251
/*********************************************************************** * 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 ...
nagavallia/geomesa
geomesa-jupyter/geomesa-jupyter-leaflet/src/test/scala/org/locationtech/geomesa/jupyter/LeafletTest.scala
Scala
apache-2.0
1,876
package org.http4s package server import cats.effect._ import cats.implicits._ import org.http4s.Uri.uri class HttpRoutesSpec extends Http4sSpec { val routes1 = HttpRoutes.of[IO] { case req if req.pathInfo == "/match" => Response[IO](Status.Ok).withEntity("match").pure[IO] case req if req.pathInfo =...
aeons/http4s
server/src/test/scala/org/http4s/server/HttpRoutesSpec.scala
Scala
apache-2.0
1,778
package codecheck.github.models import org.json4s.JValue case class ReviewRequest(value: JValue) extends AbstractJson(value) { def id = get("id").toLong def number = get("number").toLong }
code-check/github-api-scala
src/main/scala/codecheck/github/models/ReviewRequest.scala
Scala
mit
195
package ohnosequences.ivy /** * @author <a href="michael@ahlers.consulting">Michael Ahlers</a> */ object Scenarios { val locationWithBucketNameAndObjectKeys: List[(String, (String, String))] = ("s3://bucket/path0", ("bucket", "path0")) :: ("s3://bucket//path0", ("bucket", "path0")) :: ("s3://bucke...
ohnosequences/ivy-s3-resolver
src/test/scala/ohnosequences/ivy/Scenarios.scala
Scala
apache-2.0
575
package org.typeclassesfun object notypeclassesV2 { trait Json { def json: String } trait Evaluator { def evaluate: Int } sealed trait Expression extends Json with Evaluator case class Value(value: Int) extends Expression { override def json: String = s"$value" override def evaluate: Int = value } ...
sirocchj/typeclassesfun
src/main/scala/org/typeclassesfun/notypeclassesV2.scala
Scala
apache-2.0
1,574
package polyite.util import java.util.logging.Logger /** * Utility for parsing argument values. */ object ParseArgs { private val myLogger : Logger = Logger.getLogger("") /** * Parses a boolean value. Logs a message if the property is missing or the * value is malformed. * * @param v String ...
stganser/polyite
src/polyite/util/ParseArgs.scala
Scala
mit
3,413
// src/main/scala/progscala2/appdesign/parthenon/Money.scala package progscala2.appdesign.parthenon /** * The same class from the Design by Contract section, with a new apply method * in the companion object below. */ case class Money(amount: Double) { require(amount >= 0.0, s"Negative amount $amount not allowed"...
sunilrebel/programming-scala
examples/src/main/scala/progscala2/appdesign/parthenon/Money.scala
Scala
mpl-2.0
709
/* * 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 ...
PredictionIO/PredictionIO
data/src/main/scala/org/apache/predictionio/data/store/python/PPythonEventStore.scala
Scala
apache-2.0
5,602
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
Intel-bigdata/OAP
oap-native-sql/core/src/test/scala/org/apache/spark/sql/DataFrameImplicitsSuite.scala
Scala
apache-2.0
3,431
/** * The MIT License (MIT) * * Copyright (c) 2013-2015 Andrew Snare, Age Mooij * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the ...
solarmosaic/utility-api-client
src/main/scala/com/solarmosaic/client/utilityApi/json/SnakeCaseJsonSupport.scala
Scala
mit
2,152
/* * * Copyright 2015. * * 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...
tudarmstadt-lt/JoBimTextCT
org.jobimtext.ct/src/test/scala/org/jobimtext/TestRunner.scala
Scala
apache-2.0
1,111
package es.us.linkage import es.us.cluster.Utils import org.apache.spark.internal.Logging import org.apache.spark.mllib.linalg.{Vector, Vectors} import org.apache.spark.mllib.stat.{MultivariateStatisticalSummary, Statistics} import org.apache.spark.rdd.RDD import org.apache.spark.sql.SparkSession /** * @author José...
josemarialuna/ClusterIndices
src/main/scala/es/us/linkage/LinkageModel.scala
Scala
apache-2.0
12,376
/* * ____ ____ _____ ____ ___ ____ * | _ \\ | _ \\ | ____| / ___| / _/ / ___| Precog (R) * | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data * | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, In...
precog/platform
mimir/src/main/scala/com/precog/mimir/JoinOptimizer.scala
Scala
agpl-3.0
4,516
/** * Copyright (C) 2010 Orbeon, Inc. * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. * * This program i...
ajw625/orbeon-forms
src/main/scala/org/orbeon/oxf/xforms/control/controls/XFormsOutputControl.scala
Scala
lgpl-2.1
11,898
package im.actor.server import akka.actor.ActorSystem import im.actor.server.dialog.privat.{ PrivateDialog, PrivateDialogExtension, PrivateDialogRegion } import im.actor.server.user.{ UserExtension, UserProcessor, UserProcessorRegion, UserViewRegion } import org.scalatest.Suite trait ImplicitUserRegions extends Impli...
winiceo/actor-platform
actor-server/actor-testkit/src/main/scala/im/actor/server/ImplicitUserRegions.scala
Scala
mit
851
package ro.redeul import ro.redeul.detector.fs.{File, FileSystem} object FileUtilities { def weakHash(f: File)(implicit fs: FileSystem): String = "" def compareContent(f1: File, f2: File)(implicit fs:FileSystem): Boolean = true }
mtoader/katas
DuplicateFileDetector/src/main/scala/ro/redeul/FileUtilities.scala
Scala
mit
239
package masterleague4s package data case class PickF[+A, +B](hero: A, player: B) object PickF { //todo: Implement bitraverse. Can this be done from tuple2? }
martijnhoekstra/masterleague4s
src/main/scala/data/PickF.scala
Scala
gpl-3.0
162
// Jubatus: Online machine learning framework for distributed environment // Copyright (C) 2014-2015 Preferred Networks and Nippon Telegraph and Telephone Corporation. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License version 2.1...
jubatus/jubaql-server
processor/src/main/scala/us/jubat/jubaql_server/processor/updater/JubatusClient.scala
Scala
lgpl-2.1
6,209
package models import java.net.URLEncoder import play.api.libs.ws.WS import play.api.libs.concurrent.Execution.Implicits.defaultContext import play.api.libs.json.JsArray object Pesquisador { def pesquise(origem: String, destino: String) = { import play.api.Play.current // necessário por causa do WS ...
w2srobinho/ine5646
origem_destino/app/models/Pesquisador.scala
Scala
mit
1,505
package net.chwthewke.scala.protobuf trait ProtobufEnum[V] extends Numbered[V] { def values: IndexedSeq[V] trait Value { this: V => def ordinal = values.indexOf(this) } def apply(ord: Int): V = values(ord) def named(name: String): Option[V] = values.find(this.name(_) == name) def numbered(numbe...
chwthewke/scala-protobuf
scala-protobuf/src/main/scala/net/chwthewke/scala/protobuf/ProtobufEnum.scala
Scala
apache-2.0
383
/* * 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 ...
hengyicai/OnlineAggregationUCAS
examples/src/main/scala/org/apache/spark/examples/graphx/LiveJournalPageRank.scala
Scala
apache-2.0
2,016
/* * Copyright (C) 2016-2017 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.scaladsl.persistence.cassandra import java.net.URI import scala.collection.immutable abstract class CassandraConfig private[lagom] () { /** Returns the Cassandra contact-points. */ def uris: immutable.Seq[Ca...
edouardKaiser/lagom
persistence-cassandra/scaladsl/src/main/scala/com/lightbend/lagom/scaladsl/persistence/cassandra/CassandraConfig.scala
Scala
apache-2.0
508
/* * Copyright 2014 DataGenerator 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 required by app...
FINRAOS/DataGenerator
dg-common/src/main/scala/org/finra/datagenerator/common/Graph/AddChildToExistingNodeDescription.scala
Scala
apache-2.0
1,179