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 korolev.web import korolev.web.PathAndQuery._ import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers import scala.language.implicitConversions class PathAndQuerySpec extends AnyFlatSpec with Matchers { ".fromString" should "parse path with Root" in { val path = PathAndQ...
fomkin/korolev
modules/web/src/test/scala/korolev/web/PathAndQuerySpec.scala
Scala
apache-2.0
7,144
package controllers import java.util.UUID import models.AssetSupport._ import play.api.libs.concurrent.Akka import play.api.libs.json.Json import play.api.mvc.{Controller, Action} import services.ConfigSupport._ import services.mailer.OrderMailer import services.{MailRequest, OrderUpdateMailRequest, OrderCreateMailR...
tsechov/shoehorn
app/controllers/Mails.scala
Scala
apache-2.0
1,473
/* * Copyright 2020 Precog Data * * 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 ...
quasar-analytics/quasar
ejson/src/main/scala/quasar/ejson/DecodeEJsonK.scala
Scala
apache-2.0
3,124
package com.learn.spark.akka import akka.actor.{Actor, ActorSystem, Props} import com.typesafe.config.ConfigFactory import org.apache.spark.{SparkConf, SparkContext} /** * Created by xiaojie on 17/7/13. */ class Master_old extends Actor { println("constructor invoked") override def preStart(): Unit = { ...
xiaoJacky/sparkLearning
sparkLearning/src/main/scala/com/learn/spark/akka/Master_old.scala
Scala
apache-2.0
2,000
package odfi.h2dl.indesign.h2dl.interpreter import tcl.TclInterpreter import tcl.ExtendedTclList import odfi.h2dl.indesign.h2dl.H2DLObject import nx.NXObject class H2DLInterpreter extends TclInterpreter { def getRootH2DLInstances: List[H2DLObject] = { var objects = this.eval(""" ## Get Instances set nsfBaseO...
richnou/h2dl-indesign
src/main/scala/odfi/h2dl/indesign/h2dl/interpreter/H2DLInterpreter.scala
Scala
gpl-2.0
844
/* * Copyright 2014-2022 Netflix, 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...
Netflix/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/stacklang/SetSuite.scala
Scala
apache-2.0
970
/* * 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 ...
WangTaoTheTonic/flink
flink-runtime/src/test/scala/org/apache/flink/runtime/testingUtils/TestingJobManagerLike.scala
Scala
apache-2.0
15,263
package io.reactors.transport import io.reactors._ /** Delivers locally, to reactors within the current reactor system. * * This is usually the default transport in the reactor system, but it is only * used with newly created channels when the configuration option * `system.channels.create-as-local` is set...
storm-enroute/reactors
reactors-core/shared/src/main/scala/io/reactors/transport/LocalTransport.scala
Scala
bsd-3-clause
1,158
/* * Copyright (c) 2010 by Alexander Grünewald * * This file is part of gruenewa-grid, a grid computing runtime. * * gruenewa-grid 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 th...
gruenewa/gruenewa-grid
src/main/scala/gruenewa/grid/Discovery.scala
Scala
gpl-3.0
2,024
/* * 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 ...
Yelp/zipkin
zipkin-query/src/test/scala/com/twitter/zipkin/query/adjusters/TimeSkewAdjusterSpec.scala
Scala
apache-2.0
14,818
package scribe.output sealed trait LogOutput extends Any { def plainText: String def length: Int = plainText.length def map(f: String => String): LogOutput def splitAt(index: Int): (LogOutput, LogOutput) } object LogOutput { lazy val NewLine: LogOutput = new TextOutput("\\n") } object EmptyOutput extends ...
outr/scribe
core/shared/src/main/scala/scribe/output/LogOutput.scala
Scala
mit
5,643
package de.tu_berlin.formic.datastructure.json.persistence import java.io.File import akka.actor._ import akka.testkit.{ImplicitSender, TestKit} import com.typesafe.config._ import org.apache.commons.io.FileUtils import org.scalatest._ import scala.util._ abstract class PersistenceSpec(system: ActorSystem) extends ...
rbraeunlich/formic
json/jvm/src/test/scala/de/tu_berlin/formic/datastructure/json/persistence/PersistenceSpec.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 ...
manuzhang/incubator-gearpump
external/kudu/src/main/scala/org/apache/gearpump/external/kudu/KuduSink.scala
Scala
apache-2.0
4,217
/* * 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/amls-frontend
app/controllers/declaration/RenewRegistrationController.scala
Scala
apache-2.0
3,945
package jp.que.ti.sv.validator.immutable.pram1 import jp.que.ti.sv.NotRequiredBase import jp.que.ti.sv.ParameterInfo /** * パラメータの文字列長が、指定の長さ以下であることをチェックする Validator */ class Maxlength(val max: Int) extends NotRequiredBase("maxlength") { def isValidInputed(paramValue: String): Boolean = { max >= trim(paramValue)....
yangiYA/simple-validator
simple-valid/src/main/scala/jp/que/ti/sv/validator/immutable/pram1/Maxlength.scala
Scala
mit
759
/* * HashMultiSet.scala * A hashed MultiSet * * Created By: Avi Pfeffer (apfeffer@cra.com) * Creation Date: Jan 1, 2009 * * Copyright 2013 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email figaro@cra.com for information. * * See http://www.github.com/p2t2/figaro f...
bruttenberg/figaro
Figaro/src/main/scala/com/cra/figaro/util/HashMultiSet.scala
Scala
bsd-3-clause
2,372
/* * 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 ...
vinodkc/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala
Scala
apache-2.0
151,224
package gdg.blaze.ext.hadoop import gdg.blaze._ import gdg.blaze.codec.{PlainCodec, JSONCodec} import org.apache.hadoop.io.{LongWritable, Text} import org.apache.hadoop.mapreduce.lib.input.TextInputFormat import org.apache.spark.streaming.dstream.{DStream, InputDStream} /* add_field => ... # hash (optional), default...
micahrupersburg/blaze-of-glory
src/main/scala/gdg/blaze/ext/hadoop/HdfsInput.scala
Scala
apache-2.0
1,941
package wandou.math.algebra import wandou.math.CardinalityException import wandou.math.IndexException /** * sparse matrix with general element values whose columns are accessible quickly. Implemented as a column array of * SparseVectors. * Construct a matrix of the given cardinality with the given data columns * ...
wandoulabs/wandou-math
wandou-math/src/main/scala/wandou/math/algebra/SparseColumnMatrix.scala
Scala
apache-2.0
4,157
package scwebapp.servlet.extension import jakarta.servlet.http.* import scwebapp.servlet.HttpAttribute object HttpSessionExtensions { extension(peer:HttpSession) { def attribute[T<:AnyRef](name:String):HttpAttribute[T] = new HttpAttribute[T]( () => peer.getAttribute(name), (it) => peer.setAttribute(na...
ritschwumm/scwebapp
modules/servlet/src/main/scala/scwebapp/servlet/extension/HttpSessionExtensions.scala
Scala
bsd-2-clause
378
// Project: angulate2-examples // Module: 06 AngelloLite // Description: Component for rendering of StoryS package angellolite import angulate2._ @Component( selector = "story", templateUrl = "src/main/resources/html/story.html", inputs = @@("story") ) class StoryComponent { var story: Story = _ }
jokade/angulate2-examples
archive/06_angelloLite/js/src/main/scala/angellolite/StoryComponent.scala
Scala
mit
319
package org.juitar.util.time import org.juitar.util.time.TimeSampler._ import org.specs2.mutable.SpecificationWithJUnit import org.specs2.specification.Scope import scala.concurrent.ExecutionContext class BufferedReporterTest extends SpecificationWithJUnit { private[this] implicit val executionContext = Executio...
sha1n/scala-time
src/test/scala/org/juitar/util/time/BufferedReporterTest.scala
Scala
apache-2.0
2,068
package com.datawizards.dqm.configuration.loader import java.io.File import com.datawizards.dqm.configuration.DataQualityMonitoringConfiguration import com.typesafe.config.{Config, ConfigFactory} /** * Loads multiple tables configuration from file. * <br/> * Expected format: * <pre> *tablesConfiguration = ...
piotr-kalanski/data-quality-monitoring
src/main/scala/com/datawizards/dqm/configuration/loader/FileMultipleTablesConfigurationLoader.scala
Scala
apache-2.0
1,684
package models.machine import akka.actor._ import models._ import models.connector.Connector.PositionUpdate /** Keeps track of the current row number. */ private object RowTracker { case class NextRow(carriage: Carriage) case class WorkingZone(from: Needle, until: Needle) { private[RowTracker] def contains(po...
knittery/knittery-ui
app/models/machine/RowTracker.scala
Scala
gpl-2.0
2,437
package com.datastax.spark.connector import scala.language.implicitConversions import com.datastax.spark.connector.cql.TableDef sealed trait ColumnSelector { def aliases: Map[String, String] def selectFrom(table: TableDef): IndexedSeq[ColumnRef] } case object AllColumns extends ColumnSelector { override def a...
shashwat7/spark-cassandra-connector
spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/ColumnSelector.scala
Scala
apache-2.0
1,861
/******************************************************************************* Copyright (c) 2012-2013, KAIST, S-Core. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. **********************************************************...
darkrsw/safe
src/main/scala/kr/ac/kaist/jsaf/interpreter/objects/JSBooleanConstructor.scala
Scala
bsd-3-clause
1,616
package com.monsanto.arch.cloudformation.model.resource import com.monsanto.arch.cloudformation.model._ import spray.json._ /** * The AWS::ElasticLoadBalancingV2::LoadBalancer resource creates an Elastic Load Balancing Application load balancer * that distributes incoming application traffic across multiple targe...
cibotech/cloudformation-template-generator
src/main/scala/com/monsanto/arch/cloudformation/model/resource/ElasticLoadBalancingV2.scala
Scala
bsd-3-clause
22,319
/* _____ _ * | ___| __ __ _ _ __ ___ (_) __ _ _ __ * | |_ | '__/ _` | '_ ` _ \\| |/ _` | '_ \\ * | _|| | | (_| | | | | | | | (_| | | | | * |_| |_| \\__,_|_| |_| |_|_|\\__,_|_| |_| * * Copyright 2014 Pellucid Analytics * * Licensed under the Apache License, Version 2.0 (the "License"); *...
longcao/framian
framian/src/main/scala/framian/Column.scala
Scala
apache-2.0
10,753
/* * Copyright 2015-2020 Noel Welsh * * 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...
underscoreio/doodle
java2d/src/main/scala/doodle/java2d/effect/Canvas.scala
Scala
apache-2.0
3,467
/* * Copyright 2015 Commonwealth Computer Research, 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 applicabl...
kevinwheeler/geomesa
geomesa-feature/src/main/scala/org/locationtech/geomesa/feature/ScalaSimpleFeature.scala
Scala
apache-2.0
6,217
package io.vertx.ext.asyncsql.impl import io.vertx.core.Vertx import io.vertx.core.json.JsonObject import io.vertx.ext.asyncsql.impl.pool.MysqlAsyncConnectionPool /** * @author <a href="http://www.campudus.com">Joern Bernhardt</a>. */ class MySQLClient(val vertx: Vertx, val config: JsonObject) extends BaseSQLClient...
InfoSec812/vertx-mysql-postgresql-service
src/main/scala/io/vertx/ext/asyncsql/impl/MySQLClient.scala
Scala
apache-2.0
717
package org.gbougeard.api import com.typesafe.config.ConfigFactory import scala.concurrent.Future import scala.util.{Success, Failure} import akka.actor.ActorSystem import akka.event.Logging import play.api.libs.json._ import play.api.libs.functional.syntax._ import spray.http._ import spray.client.pipelining._ imp...
gbougeard/gas
src/main/scala/org/gbougeard/api/Common.scala
Scala
apache-2.0
2,156
package epic.parser.models /* Copyright 2012 David Hall 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...
maxim-rabinovich/epic
src/main/scala/epic/parser/models/FeaturizedLexicon.scala
Scala
apache-2.0
1,112
/* * Copyright (c) 2012, 2013 Roberto Tyley * * This file is part of 'BFG Repo-Cleaner' - a tool for removing large * or troublesome blobs from Git repositories. * * BFG Repo-Cleaner is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * ...
NeilBryant/bfg-repo-cleaner
bfg/src/test/scala/com/madgag/git/bfg/cli/TextReplacementConfigSpec.scala
Scala
gpl-3.0
2,264
/** * (c) Copyright 2013 WibiData, Inc. * * See the NOTICE 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...
rpinzon/kiji-schema
kiji-schema-extras/src/main/scala/org/kiji/schema/extra/tools/HFileTool.scala
Scala
apache-2.0
8,944
/* * 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 writing, software * distribute...
wvlet/airframe
airframe-fluentd/src/test/scala/wvlet/airframe/fluentd/FluencyTest.scala
Scala
apache-2.0
3,347
// Exercise code paths for different types of cached term refs. // Specifically, `NonNullTermRef`s are cached separately from regular `TermRefs`. // If the two kinds of trefs weren't cached separately, then the code below would // error out, because every time `x` is accessed the nullable or non-null denotation // woul...
dotty-staging/dotty
tests/explicit-nulls/pos/flow-tref-caching.scala
Scala
apache-2.0
753
package test import org.scalatest.FunSuite import offheap._ @data class Inner(var v: Int) @data class Outer(@embed var inner: Inner) @data class Inner2(v: Long) @data class Outer2 { @embed var inner: Inner2 = _ } class EmbedSuite extends FunSuite { implicit val alloc = malloc test("inner pointer") { val in...
ignasi35/scala-offheap
tests/src/test/scala/EmbedSuite.scala
Scala
bsd-3-clause
1,170
package io.kaitai.struct import io.kaitai.struct.datatype.DataType.{CalcIntType, KaitaiStreamType, UserTypeInstream} import io.kaitai.struct.datatype.{BigEndian, CalcEndian, Endianness, FixedEndian, InheritedEndian, LittleEndian} import io.kaitai.struct.exprlang.Ast import io.kaitai.struct.format._ import io.kaitai.st...
kaitai-io/kaitai_struct_compiler
shared/src/main/scala/io/kaitai/struct/GoClassCompiler.scala
Scala
gpl-3.0
3,203
package kmeans import scala.annotation.tailrec import scala.collection._ import scala.util.Random import org.scalameter._ import common._ class KMeans { def generatePoints(k: Int, num: Int): Seq[Point] = { val randx = new Random(1) val randy = new Random(3) val randz = new Random(5) (0 until num) ...
huajianmao/learning
coursera/parprog1/week3/kmeans/src/main/scala/kmeans/KMeans.scala
Scala
mit
3,806
package io.buoyant.http import com.twitter.finagle.{Status => _, _} import com.twitter.finagle.http._ import io.buoyant.test.FunSuite class StatusTest extends FunSuite { def lookup(path: Path) = await(Namer.global.lookup(path).values.toFuture).get test("status") { val client = Http.newService("/$/io.buo...
linkerd/linkerd
router/http/src/test/scala/io/buoyant/http/StatusTest.scala
Scala
apache-2.0
723
/* * 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 ...
MLnick/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/statsEstimation/AggregateEstimation.scala
Scala
apache-2.0
2,842
package cvx import breeze.linalg.{DenseMatrix, DenseVector, diag, sum} import breeze.numerics.{exp, log} /** * Created by oar on 10.10.17. * * Let $P=(p_j)_{j=1}^n$ and $Q=(q_j)_{j=1}^n$ denote discrete probability * distributions, i.e. $p_j>=0$ and $\\sum p_j=1$ and likewise for $Q$. * * Given any matr...
spyqqqdia/cvx
src/main/scala/cvx/Dist_KL.scala
Scala
mit
12,728
package com.kozlowst.oms.orderbot.cluster import akka.actor.{Actor, ActorLogging, ActorRef, Props} import com.kozlowst.oms.common.commands.{Command, CommandResponse} import com.kozlowst.oms.common.models.Order import com.kozlowst.oms.orderbot.config.OrderBotConfig /** * Created by tomek on 4/12/17. */ object Cli...
rysiekblah/oms-akka-poc
order-bot/src/main/scala/com/kozlowst/oms/orderbot/cluster/ClientCheckAsk.scala
Scala
mit
1,204
package sparxles package engine sealed trait Observable[A] { def observe(observer: Observer[A]) def map[B](f: A => B): Observable[B] def scan[B](seed: B)(f: (B,A) => B): Observable[B] } sealed trait Observer[A] { def onNext[A]: Unit def onComplete(): Unit } object Observable { def run[A](stream: EventStre...
underscoreio/sparxles
src/main/scala/sparxles/engine/Observable.scala
Scala
apache-2.0
1,643
package eu.gruchala.other import java.util.concurrent.atomic.AtomicInteger import scala.collection.mutable.ListBuffer import scala.annotation.tailrec import scala.util.control.NoStackTrace object CookBookApplication { def main(args: Array[String]) {} } object DifficultyLevel extends Enumeration { val HARD, M...
leszekgruchala/scala-exercises
src/main/scala/eu/gruchala/other/CookBookApplication.scala
Scala
apache-2.0
2,148
package debop4s.rediscala.serializer /** * Redis 데이터를 직렬화 합니다. * @author Sunghyouk Bae */ trait RedisSerializer[@miniboxed T] { val EMPTY_BYTES = Array[Byte]() /** * 객체를 직렬화 합니다. * @param graph serialized 될 객체 * @return serialized 된 데이터 */ def serialize(graph: T): Array[Byte] /** * 객체를 역 직...
debop/debop4s
debop4s-rediscala/src/main/scala/debop4s/rediscala/serializer/RedisSerializer.scala
Scala
apache-2.0
520
package blended.security import java.util import blended.container.context.api.ContainerContext import blended.security.boot.{GroupPrincipal, UserPrincipal} import blended.security.internal.BlendedConfiguration import blended.util.logging.Logger import com.typesafe.config.{Config, ConfigFactory} import javax.security...
woq-blended/blended
blended.security/jvm/src/main/scala/blended/security/AbstractLoginModule.scala
Scala
apache-2.0
3,872
package org.jetbrains.plugins.scala package lang package psi package stubs import com.intellij.psi.stubs.StubElement import org.jetbrains.plugins.scala.lang.psi.api.toplevel.ScPackaging /** * @author ilyas */ trait ScPackagingStub extends StubElement[ScPackaging] { def parentPackageName: String def packageNa...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/stubs/ScPackagingStub.scala
Scala
apache-2.0
359
/* sbt -- Simple Build Tool * Copyright 2008, 2009, 2010 Mark Harrah */ package sbt.internal.util import sbt.util._ // note that setting the logging level on this logger has no effect on its behavior, only // on the behavior of the delegates. class MultiLogger(delegates: List[AbstractLogger]) extends BasicLogger...
Duhemm/util
internal/util-logging/src/main/scala/sbt/internal/util/MultiLogger.scala
Scala
bsd-3-clause
1,982
package org.template.recommendation import io.prediction.controller.PPreparator import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ import org.apache.spark.rdd.RDD class Preparator extends PPreparator[TrainingData, PreparedData] { def prepare(sc: SparkContext, trainingData: TrainingData)...
wangmiao1981/PredictionIO
examples/scala-parallel-recommendation/custom-serving/src/main/scala/Preparator.scala
Scala
apache-2.0
449
import javax.servlet.ServletContext import org.scalatra.LifeCycle import de.tu_berlin.impro3.frontend._ class ScalatraBootstrap extends LifeCycle { override def init(context: ServletContext) { // Mount servlets. context.mount(new LocationController, "/api/location/*") context.mount(new HashtagController...
joroKr21/spatio-temporal-dynamics
impro3-ws14-frontend/src/main/scala/ScalatraBootstrap.scala
Scala
apache-2.0
387
package com.twitter.finagle.redis.integration import com.twitter.finagle.redis.ClientError import com.twitter.finagle.redis.naggati.RedisClientServerIntegrationTest import com.twitter.finagle.redis.protocol._ import com.twitter.finagle.redis.tags.{ClientServerTest, RedisTest} import com.twitter.finagle.redis.util.{Byt...
sveinnfannar/finagle
finagle-redis/src/test/scala/com/twitter/finagle/redis/commands/string/StringClientServerIntegrationSuite.scala
Scala
apache-2.0
11,444
class C[T] extends D[T] { private def c1 = 0 private[this] def c2 = 0 } trait D[T] { self: C[T] => private def d1 = 0 private[this] def d2 = 0 c1 // a member, but inaccessible. c2 // a member, but inaccessible. d1 // okay d2 // okay class C { d1 d2 } def x(other: D[Any]): Unit = {...
folone/dotty
tests/untried/neg/t7475f.scala
Scala
bsd-3-clause
369
package fpinscala.answers /** * See [[fpinscala.gettingstarted.MyModule]] */ object Exercise3 { // Exercise 3: Implement `curry`. // Note that `=>` associates to the right, so we could // write the return type as `A => B => C` def curry[A,B,C](f: (A, B) => C): A => (B => C) = a => b => f(a, b) // N...
tobyweston/fpinscala
answers/src/main/scala/fpinscala/answers/Exercise3.scala
Scala
mit
899
/** * 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 ...
massie/adam
adam-core/src/test/scala/org/bdgenomics/adam/rdd/ParallelFileMergerSuite.scala
Scala
apache-2.0
7,825
/* * Copyright 2014–2018 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...
jedesah/Quasar
core/src/test/scala/quasar/metastore/MetaStoreAccessSpec.scala
Scala
apache-2.0
3,335
package commands import codeoptimus.sgir.comm.IRCPacket /** * * Created with IntelliJ IDEA. * User: Aaron Allred */ object Command { def recvMsg(ircPacket: IRCPacket) { ircPacket.msg } // Parse out the message sent for any possible commands. def parseCommand(msg: String): (String, String) = { val...
digicyc/SGir
src/main/scala/commands/Command.scala
Scala
mit
698
package com.github.gdefacci.briscola.web.util import org.eclipse.jetty.server.Server import org.eclipse.jetty.server.ServerConnector import org.eclipse.jetty.util.component.LifeCycle import org.eclipse.jetty.webapp.WebAppContext import org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitialize...
gdefacci/briscola
ddd-briscola-web/src/main/scala/com/github/gdefacci/briscola/web/util/jettyUtil.scala
Scala
bsd-3-clause
3,869
/* * Copyright (c) 2018. Fengguo Wei and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License v2.0 * which accompanies this distribution, and is available at * https://www.apache.org/licenses/LICENSE-2.0 * * Detailed contributors ar...
arguslab/Argus-SAF
jawa/src/test/scala/org/argus/jawa/flow/summary/model/SetSuTest.scala
Scala
apache-2.0
5,390
package io.github.ptitjes.scott.api import io.github.ptitjes.scott.utils.Trie /** * @author Didier Villevalois */ case class TagSet(tags: IndexedSeq[String]) { private val stringToCode = Trie[Int]() ++ tags.zipWithIndex private val maxLength = tags.map(_.length).reduce(math.max) def size: Int = tags.size def...
ptitjes/scott
scott-core/src/main/scala/io/github/ptitjes/scott/api/TagSet.scala
Scala
gpl-3.0
492
/* * Copyright (C) 2014 - 2017 Contributors as noted in the AUTHORS.md file * * This program 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 of the * License, or (at your option)...
Tensei-Data/tensei-agent
src/test/scala/com/wegtam/tensei/agent/parsers/FileParsers/CSV/ComplexCSVTest.scala
Scala
agpl-3.0
17,576
/** Licensed to Gravity.com under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Gravity.com licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this fil...
bikash/HPaste
src/main/scala/com/gravity/hbase/mapreduce/mapreduce2.scala
Scala
apache-2.0
45,969
/******************************************************************************* * Copyright 2010 Maxime Lévesque * * 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.apa...
takezoux2/squeryl-experimental
src/main/scala/org/squeryl/dsl/QueryDsl.scala
Scala
apache-2.0
21,723
/* * 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 ...
mike0sv/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/NullableColumnAccessor.scala
Scala
apache-2.0
2,000
/* Copyright (c) 2016, Elliot Stirling 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, this list of conditions and th...
Trugath/Evolve
src/main/scala/evolve/core/Evolver.scala
Scala
bsd-3-clause
4,980
/**********************************************************************************************\\ * Rapture ORM Library * * Version 0.9.0 * * ...
propensive/rapture-orm
src/pool.scala
Scala
apache-2.0
3,731
package ammonite.integration import ammonite.integration.TestUtils._ import ammonite.ops.ImplicitWd._ import ammonite.ops._ import ammonite.util.Util import utest._ /** * Make sure that if we run Scala scripts using the Ammonite executable, and * they, fail with "expected" failure modes, don't show useless stack ...
alexarchambault/ammonium
integration/src/test/scala/ammonite/integration/ErrorTruncationTests.scala
Scala
mit
2,719
/* * Copyright (c) 2017 Magomed Abdurakhmanov, Hypertino * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * */ package com.hypertino.hyperbus.util import java.uti...
hypertino/hyperbus
hyperbus/src/main/scala/com/hypertino/hyperbus/util/FuzzyIndex.scala
Scala
mpl-2.0
2,641
package akka.persistence.snapshot.local import com.typesafe.config.ConfigFactory import akka.persistence.PluginCleanup import akka.persistence.snapshot.SnapshotStoreSpec class LocalSnapshotStoreSpec extends SnapshotStoreSpec with PluginCleanup { lazy val config = ConfigFactory.parseString( """ |akka.pers...
krasserm/akka-persistence-testkit
src/test/scala/akka/persistence/snapshot/local/LocalSnapshotStoreSpec.scala
Scala
apache-2.0
486
package de.frosner.metaviz.util import org.scalajs.dom import org.scalajs.dom.document object Util { def generateElement(parent: dom.Node, id: String, tagName: String): dom.Element = { val element = document.createElement(tagName) element.id = id parent.appendChild(element) element } def gener...
FRosner/metaviz-js
src/main/scala/de/frosner/metaviz/util/Utils.scala
Scala
apache-2.0
709
/* * StringFieldViewImpl.scala * (LucreSwing) * * Copyright (c) 2014-2021 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU Affero General Public License v3+ * * * For further information, please contact Hanns Holger Rutz at * contact@sciss.de */ package de.sciss.lucre....
Sciss/LucreSwing
jvm/src/main/scala/de/sciss/lucre/swing/impl/StringFieldViewImpl.scala
Scala
agpl-3.0
2,731
/* * Copyright (C) 2011-2017 Interfaculty Department of Geoinformatics, University of * Salzburg (Z_GIS) & Institute of Geological and Nuclear Sciences Limited (GNS Science) * in the SMART Aquifer Characterisation (SAC) programme funded by the New Zealand * Ministry of Business, Innovation and Employment (MBIE) * ...
ZGIS/smart-portal-backend
test/OwcCreatorApplicationDAOSpec.scala
Scala
apache-2.0
3,694
/** * * @author Richard Li */ object puzzle4 extends App { def howManyElements(collections: Iterable[Iterable[_]]): Int = { collections.map(_.size).sum } // we can get right answers println(howManyElements(List(List(1, 2, 3), List(4, 5, 6)))) println(howManyElements(Set(List(1, 2, 3), List(4, 5, 6, ...
precompiler/scala-101
puzzles/src/main/scala/puzzle4.scala
Scala
apache-2.0
973
package blub trait SomeFunctionality { class P(val s: String) } object External extends SomeFunctionality
martinring/clide2
modules/clide-core/src/main/scala/shouldntbethere/package.scala
Scala
lgpl-3.0
111
/* * 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 ...
bravo-zhang/spark
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala
Scala
apache-2.0
81,994
package components import javax.inject._ import com.sksamuel.elastic4s.ElasticsearchClientUri import com.sksamuel.elastic4s.http.HttpClient import org.biosys.pubmed.search.PubmedSearchApi import play.api.Configuration import play.api.inject.ApplicationLifecycle import scala.concurrent.Future @Singleton class Pubmed...
sdor/biosys
labnotes/app/components/PubmedSearchComponent.scala
Scala
gpl-2.0
809
/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package swave.core.util import org.scalacheck.Gen import org.scalatest.prop.GeneratorDrivenPropertyChecks imp...
sirthias/swave
core/src/test/scala/swave/core/util/ResizableRingBufferSpec.scala
Scala
mpl-2.0
2,368
package com.scalableQuality.quick.mantle.parsing import org.scalatest.{FlatSpec, Matchers} class DelimitedRowIdentifierTest extends FlatSpec with Matchers { "DelimitedRowIdentifier.apply(columnIdentifiers)" should "return Left[ErrorMessage] when no columnIdentifiers are supplied" in { val delimiterEither =...
MouslihAbdelhakim/Quick
src/test/scala/com/scalableQuality/quick/mantle/parsing/DelimitedRowIdentifierTest.scala
Scala
apache-2.0
5,490
package net.flaviusb.atomish import scala.collection.mutable.{Map => MMap, MutableList => MList} class PreUniverse { self => var gensyms: MMap[Int, AtomishThing] = MMap[Int, AtomishThing]() var currgs: Int = 1 var scopes: MList[MMap[String, AtomishThing]] = MList() // New scopes go on the front of the list cl...
flaviusb/Atomish
bootstrap/PreUniverse.scala
Scala
gpl-3.0
23,238
package org.bowlerframework.model import collection.mutable.HashMap /** * Initializes itself and its validators with a bean. */ trait ModelValidatorBuilder[T] { /** * Should initialize all Validators with the use of the bean. */ def initialize(bean: T): ModelValidator } /** * Holds default validations ...
rkpandey/Bowler
core/src/main/scala/org/bowlerframework/model/ModelValidatorBuilder.scala
Scala
bsd-3-clause
802
/* * 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 ...
ksimar/incubator-carbondata
examples/spark/src/main/scala/org/apache/carbondata/examples/HadoopFileExample.scala
Scala
apache-2.0
1,922
package models import io.circe.{Decoder, Encoder} import scala.collection.immutable /** * Created by alex on 16/02/16. */ case class EntryTemplate[D](user: Option[String], seasons: Set[SeasonTemplate[D]], links: Links[EntryRel] = Links[EntryRel]()) sealed trait EntryRel extends Rel object EntryRel extends RelEnu...
unclealex72/west-ham-calendar
shared/src/main/scala/models/EntryTemplate.scala
Scala
apache-2.0
875
package skinny.mailer.implicits import scala.language.implicitConversions import javax.mail._ import javax.mail.internet._ import skinny.mailer._ /** * Implicit conversions for SkinnyMailer. */ trait SkinnyMailerImplicits { implicit def convertMimeMessageToRichMimeMessage[T >: SkinnyMessage <: Message](m: T): R...
Kuchitama/skinny-framework
mailer/src/main/scala/skinny/mailer/implicits/SkinnyMailerImplicits.scala
Scala
mit
620
/* * Copyright 2014–2018 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...
jedesah/Quasar
core/src/main/scala/quasar/fs/mount/MountRequest.scala
Scala
apache-2.0
2,302
import sbt._ object Common { import Keys._ val servletApiDep = "javax.servlet" % "javax.servlet-api" % "3.0.1" % "provided" val jettyVersion = "8.1.13.v20130916" def specs2Dep(sv: String) = sv.split("[.-]").toList match { case "2" :: "9" :: _ => "org.specs2" %% "specs2" % "1.12.4.1" case _ =>...
benhutchison/unfiltered
project/common.scala
Scala
mit
2,346
package collins.provisioning /** * Part of the provisioning profile, describes the role requirements as well as default roles for an * asset being provisioned */ case class ProvisionerRoleData( primary_role: Option[String], pool: Option[String], secondary_role: Option[String], contact: Option[String...
discordianfish/collins
app/collins/provisioning/ProvisionerRoleData.scala
Scala
apache-2.0
671
package me.gregd.cineworld.domain.repository import java.time.LocalDate import cats.effect.Async import com.typesafe.scalalogging.LazyLogging import io.circe.generic.auto._ import io.circe.parser._ import io.circe.syntax._ import me.gregd.cineworld.config.ListingsTableName import me.gregd.cineworld.domain.model.{Movie...
Grogs/cinema-service
domain/src/main/scala/me/gregd/cineworld/domain/repository/SlickListingsRepository.scala
Scala
gpl-3.0
1,896
/** * Copyright 2015 Ram Sriharsha * * 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...
YanjieGao/magellan
src/test/scala/magellan/ShapefileSuite.scala
Scala
apache-2.0
4,142
package com.eevolution.context.dictionary.domain.api.repository import com.eevolution.context.dictionary._ /** * Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Publi...
adempiere/ADReactiveSystem
dictionary-api/src/main/scala/com/eevolution/context/dictionary/domain/api/repository/LdapAccessRepository.scala
Scala
gpl-3.0
1,133
/* * 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 ...
sh-cho/cshSpark
deploy/FaultToleranceTest.scala
Scala
apache-2.0
13,729
/* * 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 ...
ueshin/apache-spark
sql/core/src/test/scala/org/apache/spark/sql/test/GenericWordSpecSuite.scala
Scala
apache-2.0
1,881
package controllers import java.io.File import controllers.Utils._ import scala.xml._ object XmlTestResultParser { // def parse(el: Elem) = TestEntry(Some((el \\\\ "testsuite").text).get,"",false) def metadata(el: Elem) = getAttributes(el,List("name","time","tests","errors","skipped","failures")) def getAttri...
olka/test-reports-agregator
app/controllers/XmlTestResultParser.scala
Scala
mit
713
package org.vaadin.addons.rinne.mixins import com.vaadin.server.Resource import com.vaadin.ui.{Component, UI} import java.util.Locale import scala.collection.mutable trait ComponentMixin extends SizeableMixin { this: Component => lazy val styleNames = new mutable.Set[String] with Serializable { def contains(...
LukaszByczynski/rinne
src/main/scala/org/vaadin/addons/rinne/mixins/ComponentMixin.scala
Scala
apache-2.0
1,671
trait Foo { def i: Int } trait Bar case class Spam(i: Int) extends Foo with Bar object Test { def matchParent(p:Any) = p match { case f:Foo if f.i == 1 => 1 case _:Bar => 2 case _:Foo => 3 } def main(args: Array[String]): Unit = { println(matchParent(Spam(3))) } }
yusuke2255/dotty
tests/run/t4482.scala
Scala
bsd-3-clause
291
package ch.epfl.bluebrain.nexus.iam.client.types import ch.epfl.bluebrain.nexus.commons.circe.syntax._ import ch.epfl.bluebrain.nexus.iam.client.config.Contexts._ import ch.epfl.bluebrain.nexus.iam.client.config.IamClientConfig import ch.epfl.bluebrain.nexus.iam.client.config.Vocabulary._ import ch.epfl.bluebrain.nexu...
hygt/nexus-iam
client/src/main/scala/ch/epfl/bluebrain/nexus/iam/client/types/AccessControlLists.scala
Scala
apache-2.0
3,733
package com.vorlov package object commands { def registerCommands: Unit = { Main.registerCommand(FetchData, "fetch-data", "fetch") Main.registerCommand(Normalize, "normalize") Main.registerCommand("naive-bayes", NaiveBayes) } }
VolodymyrOrlov/tweets-opinion-mining
src/main/scala/com/vorlov/commands/package.scala
Scala
apache-2.0
249
package com.aurelpaulovic.scala_kata.s_99 /* * P10 (*) Run-length encoding of a list. * Use the result of problem P09 to implement the so-called run-length * encoding data compression method. Consecutive duplicates of elements are * encoded as tuples (N, E) where N is the number of duplicates of the * element E....
AurelPaulovic/scala-kata
src/main/scala/com/aurelpaulovic/scala_kata/s_99/p10/package.scala
Scala
apache-2.0
674
/** * Copyright (C) 2012 Inria, University Lille 1. * * This file is part of PowerAPI. * * PowerAPI 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 of the * License, or (at your...
abourdon/powerapi-akka
examples/adam-demo/demo-full/src/main/scala/fr/inria/powerapi/example/adamdemo/full/DemoListener.scala
Scala
agpl-3.0
4,032
/* * Copyright (c) 2013-2014 Erik van Oosten * * 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 ...
thecoda/scala-imperial
src/test/scala/imperial/measures/GaugeSpec.scala
Scala
apache-2.0
1,397