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
/* * 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/spark-mongodb
spark-mongodb/src/test/scala/com/stratio/datasource/mongodb/client/MongodbClientFactoryTest.scala
Scala
apache-2.0
5,202
package geotrellis.logic.applicative import geotrellis._ import geotrellis.process._ /** * This corresponds to Haskell's "apply" (<*>) on Functor. */ case class Apply[A, Z:Manifest](a:Op[A])(f:Op[A => Z]) extends Op2[A, A => Z, Z](a, f)((a, f) => Result(f(a)))
Tjoene/thesis
Case_Programs/geotrellis-0.7.0/src/main/scala/geotrellis/logic/applicative/Apply.scala
Scala
gpl-2.0
265
package org.scalaide.core.internal.builder import org.eclipse.core.resources.IFile import org.eclipse.core.runtime.IProgressMonitor import org.eclipse.core.runtime.SubMonitor import sbt.inc.IncOptions import sbt.inc.Analysis import java.io.File import org.eclipse.core.resources.IMarker /** * Abstraction which expose...
andrey-ilinykh/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/core/internal/builder/EclipseBuildManager.scala
Scala
bsd-3-clause
1,661
/* * 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 ...
andrewor14/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala
Scala
apache-2.0
10,326
package uk.gov.gds.ier.transaction.ordinary.previousAddress import uk.gov.gds.ier.model.{PossibleAddress, Addresses, MovedHouseOption} import uk.gov.gds.ier.step.StepTemplate import uk.gov.gds.ier.serialiser.JsonSerialiser import uk.gov.gds.ier.service.AddressService import uk.gov.gds.ier.transaction.ordinary.Inprogre...
alphagov/ier-frontend
app/uk/gov/gds/ier/transaction/ordinary/previousAddress/PreviousAddressSelectMustache.scala
Scala
mit
4,073
package me.jeffmay.neo4j.client.ws import akka.actor.Scheduler import me.jeffmay.neo4j.client._ import me.jeffmay.neo4j.client.cypher.CypherStatement import me.jeffmay.neo4j.client.ws.json.DebugFormats import me.jeffmay.neo4j.client.ws.json.rest.RestFormats._ import me.jeffmay.neo4j.client.ws.json.rest._ import me.jef...
AudaxHealthInc/neo4j-scala-client
ws/src/main/scala/me/jeffmay/neo4j/client/ws/WSNeo4jClient.scala
Scala
apache-2.0
6,154
/* * 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 ...
ajaysaini725/spark
project/SparkBuild.scala
Scala
apache-2.0
32,461
package com.raquo.xstream class MiscSpec extends UnitSpec { it("collect should work") { trait BaseFoo { val foo: String = "basefoo" } trait Foo extends BaseFoo { override val foo: String = "foo" } trait SubFoo extends Foo { override val foo: String = "subfoo" } val foo = new Foo {} val baseFoo...
raquo/XStream.scala
src/test/scala/com/raquo/xstream/MiscSpec.scala
Scala
mit
923
class D(x: Int) { class DD { inline def apply() = new DD() } val inner = new DD } object Test { new D(2).inner.apply() }
som-snytt/dotty
tests/pos/i3130d.scala
Scala
apache-2.0
133
package lila.db package api import Implicits._ import play.api.libs.json._ import reactivemongo.bson._ object $primitive { import play.modules.reactivemongo.json._ def apply[A: InColl, B]( query: JsObject, field: String, modifier: QueryBuilder => QueryBuilder = identity, max: Option[Int] = None)(...
Enigmahack/lila
modules/db/src/main/api/primitive.scala
Scala
mit
1,080
/* * 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 ...
BaiGang/spark_multiboost
src/main/scala/org/apache/spark/mllib/classification/multilabel/stronglearners/AdaBoostMH.scala
Scala
apache-2.0
6,667
package org.draegisoft.ddlCodeGenerator sealed abstract class TableType(val name:String) case class SimpleTableType(override val name: String, columns: Seq[ColumnType]) extends TableType(name)
mdraeger/ddlCodeGenerator
src/main/scala/org/draegisoft/ddlCodeGenerator/TableType.scala
Scala
gpl-3.0
195
/* * Copyright (c) 2015 François Cabrol. * * This file is part of MelVi. * * MelVi 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...
francoiscabrol/MelVi
src/main/scala/com/cabrol/francois/melvi/utils/MidiUtils.scala
Scala
gpl-3.0
3,411
/* * Copyright (C) 2007 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 * ...
milliondreams/jiva-ng
src/main/scala/net/kogics/jiva/evolution/RouletteWheelSelector.scala
Scala
gpl-3.0
1,747
package com.arcusys.valamis.web.portlet import javax.portlet.{RenderRequest, RenderResponse} import com.arcusys.learn.liferay.services.CompanyHelper import com.arcusys.valamis.lrs.serializer.AgentSerializer import com.arcusys.valamis.lrssupport.oauth.OAuthPortlet import com.arcusys.valamis.utils.TincanHelper._ import...
arcusys/Valamis
valamis-portlets/src/main/scala/com/arcusys/valamis/web/portlet/GradebookView.scala
Scala
gpl-3.0
1,339
package plainer.external import akka.actor.{Actor, ActorSystem} import akka.actor.Props import akka.event.Logging class MyActor extends Actor { val log = Logging(context.system, this) def receive = { case "test" => log.info("received test") case _ => log.info("received unknown message") } } class Simpl...
zeroed/plainer.scala
src/plainer/external/SimpleCounter.scala
Scala
gpl-3.0
747
/* * 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 ...
aosagie/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/continuous/ContinuousRateStreamSource.scala
Scala
apache-2.0
5,640
/* * 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
core/src/test/scala/org/apache/spark/executor/ExecutorSuite.scala
Scala
apache-2.0
31,902
package scala.slick.examples.direct //#imports import scala.slick.driver.H2Driver import H2Driver.simple.Database import Database.{threadLocalSession => session} import scala.slick.direct._ import scala.slick.direct.AnnotationMapper._ //#imports //#schema // describe schema for direct embedding @table(name="COFFE...
boldradius/slick
src/sphinx/code/DirectEmbedding.scala
Scala
bsd-2-clause
1,994
package geometry import com.vividsolutions.jts.{geom => jts} trait Geometry { val jtsGeometry: jts.Geometry def geometryType: String = jtsGeometry.getGeometryType def envelope: Envelope = Envelope(jtsGeometry.getEnvelopeInternal) def isValid: Boolean = jtsGeometry.isValid def isSimple: Boolean = jtsGeo...
jmarin/scale
core/src/main/scala/geometry/Geometry.scala
Scala
apache-2.0
2,262
package org.machine.engine.graph.decisions object NodeIdentityGenerator{ private var counter: Short = 0 private val incr: Short = 1 def id:Short = { counter = (counter + incr).toShort return counter } def reset{ counter = 0 } }
sholloway/graph-engine
src/main/scala/org/machine/engine/graph/decisions/NodeIdentifyGenerator.scala
Scala
mit
255
package scray.querying.storeabstraction import scray.querying.description.{ TableIdentifier, VersioningConfiguration } import scray.querying.description.Row import scray.querying.source.store.QueryableStoreSource import scray.querying.queries.DomainQuery import com.twitter.util.FuturePool /** * interface for store g...
scray/scray
scray-querying/modules/scray-querying/src/main/scala/scray/querying/storeabstraction/StoreGenerators.scala
Scala
apache-2.0
972
package spark.streaming.dstream import spark.streaming.{Duration, DStream, Time} import spark.RDD private[streaming] class FlatMappedDStream[T: ClassManifest, U: ClassManifest]( parent: DStream[T], flatMapFunc: T => Traversable[U] ) extends DStream[U](parent.ssc) { override def dependencies = List(parent...
koeninger/spark
streaming/src/main/scala/spark/streaming/dstream/FlatMappedDStream.scala
Scala
bsd-3-clause
516
package io.vamp.container_driver.marathon import akka.actor.{ Actor, ActorRef } import akka.event.LoggingAdapter import io.vamp.common.akka.ActorExecutionContextProvider import io.vamp.common.http.HttpClient import io.vamp.common.notification.NotificationErrorException import io.vamp.common.util.HashUtil import io.vam...
magneticio/vamp
dcos/src/main/scala/io/vamp/container_driver/marathon/MarathonDriverActor.scala
Scala
apache-2.0
24,715
/** * 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 ...
VinACE/adam
adam-core/src/main/java/org/bdgenomics/adam/io/BAMFilteredRecordReader.scala
Scala
apache-2.0
5,261
/* * 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 ...
setjet/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
Scala
apache-2.0
45,536
package kmeans import scala.annotation.tailrec import scala.collection.{GenMap, GenSeq, _} 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) ...
alvsanand/scala_specialization_coursera
parprog1_kmeans/src/main/scala/kmeans/KMeans.scala
Scala
apache-2.0
4,187
package test import java.util.Date trait Currency { val symbol: String val name: String } // unfortunately Objects is not supported by json4s (or not yet) case class Dollar() extends Currency { val symbol = "$" val name = "dollar" } case class Euro() extends Currency { val symbol = "€" val name = "euro...
weimeittx/IM
runner/src/main/scala/test/Test.scala
Scala
apache-2.0
2,062
package cs.ucla.edu.bwaspark.datatype import scala.collection.mutable.MutableList class CigarType { var cigarSegs: MutableList[CigarSegType] = new MutableList[CigarSegType] var cigarStr: String = new String }
peterpengwei/bwa-spark-fpga
src/main/scala/cs/ucla/edu/bwaspark/datatype/CigarType.scala
Scala
gpl-2.0
216
package de.tu_berlin.impro3.scala.spatio_temporal_dynamics.parsers import de.tu_berlin.impro3.scala.spatio_temporal_dynamics._ import model.Tweet import java.text.SimpleDateFormat import java.lang.{ ThreadLocal => JThreadLocal } import java.util.Locale import org.json4s._ import org.json4s.native.JsonMethods /** [[...
joroKr21/spatio-temporal-dynamics
impro3-ws14-scala/src/main/scala/de/tu_berlin/impro3/scala/spatio_temporal_dynamics/parsers/JsonParser.scala
Scala
apache-2.0
1,433
/* Copyright (C) 2008-2014 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
hlin117/factorie
src/main/scala/cc/factorie/app/nlp/load/LoadConll2011.scala
Scala
apache-2.0
15,317
package org.jetbrains.plugins.scala.lang.psi.impl.base.types import com.intellij.lang.ASTNode import org.jetbrains.plugins.scala.lang.psi.ScalaPsiElementImpl import org.jetbrains.plugins.scala.lang.psi.api.base.types._ /** * @author Alexander Podkhalyuzin * Date: 14.03.2008 */ class ScSequenceArgImpl(node: ASTNode)...
gtache/intellij-lsp
intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/psi/impl/base/types/ScSequenceArgImpl.scala
Scala
apache-2.0
434
package com.github.karlhigley.spark.neighbors.collision import scala.util.hashing.MurmurHash3 import org.apache.spark.mllib.linalg.SparseVector import org.apache.spark.rdd.RDD import org.apache.spark.storage.StorageLevel import com.github.karlhigley.spark.neighbors.lsh.{ BitSignature, HashTableEntry, IntSignature } ...
L2V/like2vec
src/prediction/src/main/scala/com/github/karlhigley/spark/neighbors/collision/BandingCollisionStrategy.scala
Scala
apache-2.0
1,362
// test shadowing of implicits by synonymous non-implicit symbols // whether they be inherited, imported (explicitly or using a wildcard) or defined directly class A class B trait S { implicit def aToB(a: A): B = new B } class T1 extends S { def x: B = { val aToB = 3 // ok: doesn't compile, be...
felixmulder/scala
test/files/neg/t3453.scala
Scala
bsd-3-clause
1,485
/* * 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/play-ui
src/test/scala/uk/gov/hmrc/play/views/helpers/InputRadioGroupSpec.scala
Scala
apache-2.0
4,721
package com.twitter.finagle.client import com.twitter.finagle.{Addr, Dtab} import com.twitter.util.{Closable, Var, Witness} import java.util.concurrent.atomic.AtomicReference import scala.collection.mutable /** * For all paths registered to a given client and Dtab, the [[EndpointRegistry]] * keeps a reference to ob...
koshelev/finagle
finagle-core/src/main/scala/com/twitter/finagle/client/EndpointRegistry.scala
Scala
apache-2.0
3,598
/* * 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 ...
guoxiaolongzte/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/LiteralExpressionSuite.scala
Scala
apache-2.0
11,249
package org.jetbrains.plugins.scala package codeInspection.typeChecking import com.intellij.codeInspection.LocalInspectionTool import org.jetbrains.plugins.scala.codeInspection.ScalaLightInspectionFixtureTestAdapter /** * Nikolay.Tropin * 9/26/13 */ class ComparingUnrelatedTypesInspectionTest extends ScalaLightIns...
whorbowicz/intellij-scala
test/org/jetbrains/plugins/scala/codeInspection/typeChecking/ComparingUnrelatedTypesInspectionTest.scala
Scala
apache-2.0
8,203
/* * 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 ...
abhishekshivanna/samza
samza-yarn/src/main/scala/org/apache/samza/job/yarn/SamzaYarnAppMasterService.scala
Scala
apache-2.0
4,021
package views.html.admin import play.templates._ import play.templates.TemplateMagic._ import play.api.templates._ import play.api.templates.PlayMagic._ import models._ import controllers._ import play.api.i18n._ import play.api.mvc._ import play.api.data._ import views.html._ import org.bson.types.ObjectId /**/ obj...
kandole/simple_reservation
target/scala-2.10/src_managed/main/views/html/admin/adminNavbar.template.scala
Scala
gpl-2.0
1,627
import java.io.FileWriter import traits.Arg object Main extends Arg { val arq = argstext("file") val im = SubImage(arq) val instances = im.bodies.groupBy(_._2).toList.sortBy(_._1.hashCode()).zipWithIndex.flatMap { case ((_, seq), idx) => seq map { case ((x, y), _) => (x, y, idx) } } val classes = instan...
davips/image2arff
src/main/scala/Main.scala
Scala
gpl-3.0
716
package com.wavesplatform.mining import com.wavesplatform.state.{Blockchain, Diff} import com.wavesplatform.test.FreeSpec import com.wavesplatform.transaction.Transaction import org.scalacheck.Gen import org.scalamock.scalatest.PathMockFactory class OneDimensionalMiningConstraintSuite extends FreeSpec with PathMockFa...
wavesplatform/Waves
node/src/test/scala/com/wavesplatform/mining/OneDimensionalMiningConstraintSuite.scala
Scala
mit
2,188
package org.jetbrains.plugins.scala.lang.psi.impl.search import com.intellij.openapi.application.QueryExecutorBase import com.intellij.openapi.progress.ProgressManager import com.intellij.psi._ import com.intellij.psi.search.searches.ClassInheritorsSearch import com.intellij.psi.search.searches.ClassInheritorsSearch.S...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/search/ScalaLocalInheritorsSearcher.scala
Scala
apache-2.0
2,316
package com.googlecode.kanbanik.commands import org.apache.shiro.SecurityUtils import com.googlecode.kanbanik.builders.UserBuilder import com.googlecode.kanbanik.model.User import org.apache.shiro.subject.Subject import com.googlecode.kanbanik.dtos.{SessionDto, ErrorDto, UserDto, EmptyDto} class GetCurrentUserComman...
gudtago/kanbanik
kanbanik-server/src/main/scala/com/googlecode/kanbanik/commands/GetCurrentUserCommand.scala
Scala
apache-2.0
967
package uk.gov.gds.ier.transaction.crown.address import uk.gov.gds.ier.test.FormTestSuite import uk.gov.gds.ier.model.{PartialManualAddress, Addresses, PartialAddress} class AddressFormTests extends FormTestSuite with AddressForms { behavior of "AddressForms.addressForm" it should "successfully bind a valid...
alphagov/ier-frontend
test/uk/gov/gds/ier/transaction/crown/address/AddressFormTests.scala
Scala
mit
16,648
package com.eevolution.context.dictionary.infrastructure.repository import java.util.UUID import com.eevolution.context.dictionary.domain._ import com.eevolution.context.dictionary.domain.model.ChangeLog import com.eevolution.context.dictionary.infrastructure.db.DbContext._ import com.eevolution.utils.PaginatedSequen...
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/repository/ChangeLogRepository.scala
Scala
gpl-3.0
2,718
package scalaxy.dsl import scala.language.experimental.macros import scala.reflect.macros.blackbox.Context import scala.collection.GenTraversableOnce import scala.collection.generic.CanBuildFrom import scala.collection.breakOut import scala.reflect.runtime.{ universe => ru } object ReifiedFilterMonadicMacros { ...
nativelibs4java/Scalaxy
DSL/ReifiedFilterMonadicMacros.scala
Scala
bsd-3-clause
3,851
package com.catinthedark.gban import com.catinthedark.gban.network.{NetworkServerControl, NetworkClientControl, NetworkControl} /** * Created by over on 18.04.15. */ class Shared0( val serverAddress: String ) { val networkControl = if (serverAddress != null) { new NetworkClientControl(serverAddress) } els...
cat-in-the-dark/old48_34_game
src/main/scala/com/catinthedark/gban/Shared0.scala
Scala
mit
403
/** * Copyright (C) 2013 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...
wesley1001/orbeon-forms
src/main/scala/org/orbeon/oxf/fb/PermissionsOps.scala
Scala
lgpl-2.1
4,325
/* * Copyright (c) 2016, Team Mion * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIM...
teammion/tm-morefood
src/main/scala/io/teammion/morefood/util/InventoryIterator.scala
Scala
isc
2,818
/** * Copyright (c) 2002-2014, OnPoint Digital, Inc. All rights reserved * * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS...
alexwestphal/timez
src/main/scala/timez/syntax/time/ZoneIdSyntax.scala
Scala
bsd-3-clause
890
/* * 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 ...
aniketadnaik/carbondataStreamIngest
integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonAnalysisRules.scala
Scala
apache-2.0
8,731
/** * 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...
MykolaB/gatling
gatling-http/src/main/scala/io/gatling/http/action/async/ws/WsActor.scala
Scala
apache-2.0
9,381
package fpinscala.monoids import fpinscala.parallelism.Nonblocking._ import fpinscala.parallelism.Nonblocking.Par.toParOps // infix syntax for `Par.map`, `Par.flatMap`, etc trait Monoid[A] { def op(a1: A, a2: A): A def identity: A def zero: A = identity } object Monoid { val stringMonoid = new Monoid[String...
ailveen/fpinscala
exercises/src/main/scala/fpinscala/monoids/Monoid.scala
Scala
mit
9,047
package com.github.diegopacheco.sandbox.sacala.twoten.implicitclazz object ImplicitClassFun extends App { implicit class RichInteger(n:Int) extends Ordered[Int]{ def isMin(m:Int) : Int = if (n <= m) n else m def compare(m:Int): Int = if ( n <= m ) -1 else 0 } val i1 = 10 val i2 = 20 ...
diegopacheco/scala-playground
scala-2.10-playground/src/com/github/diegopacheco/sandbox/sacala/twoten/implicitclazz/ImplicitClassFun.scala
Scala
unlicense
356
package com.komanov.serialization.jmh.tests import com.komanov.serialization.converters.Converters import com.komanov.serialization.jmh.ConverterType import org.specs2.mutable.SpecWithJUnit class ConverterTypeTest extends SpecWithJUnit { "ConverterType" should { "contain all converters" >> { ConverterTyp...
dkomanov/stuff
src/com/komanov/serialization/jmh/tests/ConverterTypeTest.scala
Scala
mit
408
package chandu0101.scalajs.react.components.demo.components.materialui import chandu0101.scalajs.react.components.demo.components.CodeExample import chandu0101.scalajs.react.components.materialui._ import japgolly.scalajs.react._ import japgolly.scalajs.react.vdom.prefix_<^._ import scalacss.Defaults._ import scalacs...
mproch/scalajs-react-components
demo/src/main/scala/chandu0101/scalajs/react/components/demo/components/materialui/MuiSwitchesDemo.scala
Scala
apache-2.0
3,950
package views import org.specs2.mutable.Specification import models.jbehave.JBehaveComposite class JBehaveCompositesSpec extends Specification { "jBehaveComposites#render" should { val compositePackage = "com.technologyconversations.test" val compositeClass = "TcBddComposites" val steps = List("Given ...
TechnologyConversations/TechnologyConversationsBdd
test/views/JBehaveCompositesSpec.scala
Scala
apache-2.0
2,180
// covariant linked list abstract class M { self => type T final type selfType = M {type T <: self.T} type actualSelfType >: self.type <: selfType def next: selfType // I don't understand why this doesn't compile, but that's a separate matter // error: method all2 cannot be accessed in M.this.selfType ...
loskutov/intellij-scala
testdata/scalacTests/failed/t1279a.scala
Scala
apache-2.0
1,720
package scala package reflect package internal trait StdAttachments { self: SymbolTable => /** * Common code between reflect-internal Symbol and Tree related to Attachments. */ trait Attachable { protected var rawatt: scala.reflect.macros.Attachments { type Pos = Position } = NoPosition def attach...
shimib/scala
src/reflect/scala/reflect/internal/StdAttachments.scala
Scala
bsd-3-clause
4,109
/* * 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 ...
caneGuy/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/FileDataSourceV2.scala
Scala
apache-2.0
2,687
/* * Copyright 2017 Datamountaineer. * * 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...
datamountaineer/stream-reactor
kafka-connect-bloomberg/src/test/scala/com/datamountaineer/streamreactor/connect/bloomberg/AvroDeserializer.scala
Scala
apache-2.0
1,054
package scalan.demo import java.io.File import scalan.{JNIExtractorOpsExp, Scalan} import scalan.compilation.{KernelStore, KernelType} import scalan.examples.Helpers._ import scalan.monads.{MonadsDsl, MonadsDslStd, MonadsDslExp} trait Example4 extends Scalan with MonadsDsl { def sum[F[_]:Cont] (F: Monad[F...
scalan/scalan-starter
scalan-starter-core/src/test/scala/scalan/demo/Example4.scala
Scala
apache-2.0
1,771
package com.twitter.webbing.route import com.twitter.finagle.Service import com.twitter.finagle.http.{Status, MediaType, Response} import com.twitter.logging.Logger import com.twitter.util.{FuturePool, Future} import java.io.{FileInputStream, File, InputStream} import org.apache.commons.io.IOUtils import org.jboss.net...
finagle/webbing
route-finagle-http/src/main/scala/com/twitter/webbing/route/NettyStaticRouter.scala
Scala
apache-2.0
3,885
package im.actor.server.sequence import akka.actor.ActorSystem import im.actor.server.model.push.GooglePushCredentials private[sequence] final class GooglePushProvider(userId: Int, system: ActorSystem) extends PushProvider { private val googlePushExt = GooglePushExtension(system) def deliverInvisible(seq: Int, c...
ljshj/actor-platform
actor-server/actor-core/src/main/scala/im/actor/server/sequence/GooglePushProvider.scala
Scala
mit
1,295
package com.sksamuel.elastic4s.searches.sort import com.sksamuel.elastic4s.searches.QueryDefinition import org.elasticsearch.common.geo.{GeoDistance, GeoPoint} import org.elasticsearch.common.unit.DistanceUnit import org.elasticsearch.index.query.GeoValidationMethod import org.elasticsearch.search.sort.{GeoDistanceSor...
ulric260/elastic4s
elastic4s-core/src/main/scala/com/sksamuel/elastic4s/searches/sort/GeoDistanceSortDefinition.scala
Scala
apache-2.0
1,568
package models import scala.slick.driver.H2Driver.simple._ import com.github.tototoshi.slick.H2JodaSupport._ import org.joda.time.DateTime object Tables extends Tables trait Tables { sealed abstract class HistoryType(val code: String) object HistoryType{ case object TotalAmount extends HistoryType("Total") ...
withpop/money-backward
app/models/Tables.scala
Scala
mit
2,611
import scala.concurrent.duration._ import play.api._ import play.api.libs.concurrent.Akka import play.api.libs.concurrent.Execution.Implicits._ import com.thetestpeople.trt.utils.RichConfiguration._ import com.thetestpeople.trt.Config._ import com.thetestpeople.trt.utils.HasLogger import scala.concurrent.Future import ...
thetestpeople/trt
app/Global.scala
Scala
mit
2,541
package org.jetbrains.plugins.scala package codeInsight.template.util import com.intellij.psi._ import org.jetbrains.plugins.scala.lang.resolve.processor.BaseProcessor import org.jetbrains.plugins.scala.lang.resolve.{ResolveTargets, ScalaResolveResult} /** * User: Alexander Podkhalyuzin * Date: 30.01.2009 */ class...
double-y/translation-idea-plugin
src/org/jetbrains/plugins/scala/codeInsight/template/util/VariablesCompletionProcessor.scala
Scala
apache-2.0
656
package com.agilogy.json import org.scalatest.FlatSpec import play.api.libs.json.{ Json, JsNumber } class JsonComparatorWithEllipsisSpec extends FlatSpec { import JsonComparator._ it should "compare Json strings with ellipsis when nothing replaces the ellipsis" in { val actual = """{"a":1}""" val expect...
agilogy/json-comparator
src/test/scala/com/agilogy/json/JsonComparatorWithEllipsisSpec.scala
Scala
apache-2.0
4,088
/** Copyright 2015 TappingStone, 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 ...
alex9311/PredictionIO
core/src/test/scala/org/apache/predictionio/controller/MetricTest.scala
Scala
apache-2.0
4,445
package io.ubiqesh.central.mqtt import org.vertx.scala.core.Vertx import org.vertx.java.core.{Handler => JHandler} import org.vertx.java.core.buffer._ import org.vertx.scala.core.net.NetSocket import io.netty.buffer.{Unpooled, ByteBuf} import java.io.{ByteArrayInputStream, DataInputStream, DataInput} import spray.json...
ubiqesh/ubiqesh
central/src/main/scala/io/ubiqesh/central/mqtt/MqttServer.scala
Scala
apache-2.0
1,046
package gitbucket.core.service import gitbucket.core.model.{WebHook, RepositoryWebHook} import org.scalatest.FunSuite import gitbucket.core.model.WebHookContentType class WebHookServiceSpec extends FunSuite with ServiceSpecBase { lazy val service = new WebHookPullRequestService with AccountService with ActivityServ...
McFoggy/gitbucket
src/test/scala/gitbucket/core/service/WebHookServiceSpec.scala
Scala
apache-2.0
6,683
package object junto { protected[junto] def differenceNorm2Squared(length: Int)( dist1: Seq[Double], dist2: Seq[Double] ) = { var index = 0 var squaredDiffsSum = 0.0 while (index < length) { val diff = dist1(index) - dist2(index) squaredDiffsSum += diff * diff index += 1 } ...
scalanlp/junto
src/main/scala/junto/package.scala
Scala
apache-2.0
410
/* * @author Philip Stutz * * Copyright 2011 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....
Tjoene/thesis
Case_Programs/signal-collect/src/test/scala/com/signalcollect/features/AggregationOperationsSpec.scala
Scala
gpl-2.0
3,889
// @SOURCE:/Users/TarcioMac/Development/PlayProjects/uk.aber.spam/conf/routes // @HASH:e03a3112c60574d71b1dd4dda8f4a7a06eb4c740 // @DATE:Thu Aug 07 15:09:32 BST 2014 import Routes.{prefix => _prefix, defaultPrefix => _defaultPrefix} import play.core._ import play.core.Router._ import play.core.Router.HandlerInvokerFac...
tmmachado/uk.aber.spam
target/scala-2.11/src_managed/main/routes_reverseRouting.scala
Scala
gpl-2.0
12,815
package provingground.translation import provingground._ import translation._ import NlpProse._ //import provingground.ParseProse._ import java.io._ // import java.util.*; import scala.jdk.CollectionConverters._ import edu.stanford.nlp.io._ import edu.stanford.nlp.ling._ import edu.stanford.nlp.pipeline._ import ed...
siddhartha-gadgil/ProvingGround
nlp/src/main/scala/provingground/nlp/CoreNLP.scala
Scala
mit
4,777
package de.frosner.broccoli.models import play.api.libs.json.{JsValue, Json} case class InstanceCreation(templateId: String, parameters: Map[String, JsValue]) object InstanceCreation { implicit val instanceCreationWrites = Json.writes[InstanceCreation] implicit val instanceCreationReads = Json.reads[InstanceCr...
FRosner/cluster-broccoli
server/src/main/scala/de/frosner/broccoli/models/InstanceCreation.scala
Scala
apache-2.0
331
/* * 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-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/FlatJoinRunner.scala
Scala
apache-2.0
2,073
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.registry.impl import java.net.URI import java.util.{ Collections, Map => JMap } import com.lightbend.lagom.internal.javadsl.registry.ServiceRegistryService import com.lightbend.lagom.javadsl.api.ServiceAcl import...
rstento/lagom
dev/service-registry/service-locator/src/main/scala/com/lightbend/lagom/registry/impl/UnmanagedServices.scala
Scala
apache-2.0
754
import scala.annotation._ object Sublist { @tailrec private def checkForSuperOrSubLists[T](list1: List[T], list2: List[T], subOrSuperList: Int): Int = { if (!list2.isEmpty && list2.length >= list1.length) { if (list1 == list...
stanciua/exercism
scala/sublist/src/main/scala/Sublist.scala
Scala
mit
972
package services import java.util.{Date, UUID} import javax.inject.Inject import dao.Schema import geo.GeoDataLoader import kidstravel.shared.Api import kidstravel.shared.geo.{City, CityLabel, Country} import kidstravel.shared.poi.Poi import play.api.db.slick.DatabaseConfigProvider import slick.driver.JdbcProfile imp...
devkat/kidstravel
server/src/main/scala/services/ApiService.scala
Scala
apache-2.0
1,710
package sttp.client3.opentracing import io.opentracing.tag.Tags import io.opentracing.{Span, SpanContext, Tracer} import io.opentracing.propagation.Format import io.opentracing.Tracer.SpanBuilder import sttp.capabilities.Effect import sttp.monad.MonadError import sttp.monad.syntax._ import sttp.client3.{FollowRedirect...
softwaremill/sttp
metrics/open-tracing-backend/src/main/scala/sttp/client3/opentracing/OpenTracingBackend.scala
Scala
apache-2.0
4,227
object SubD
typesafehub/sbteclipse
src/sbt-test/sbteclipse/04-dependency-options/subd/src/main/scala/SubD.scala
Scala
apache-2.0
12
package js.hw4 import scala.util.parsing.input.Positional import js.util._ object ast { sealed abstract class Expr extends Positional { // pretty print as AST override def toString(): String = print.prettyAST(this) // pretty print as JS expression def prettyJS(): String = print.prettyJS(this) /...
mpgarate/ProgLang-Assignments
HW4/HW4/src/main/scala/js/hw4/ast.scala
Scala
mit
4,788
import sbt._ class ThereminProject(info: ProjectInfo) extends DefaultProject(info) { // repositories to use val scalaToolsReleases = ScalaToolsReleases // dependencies val scalatest = "org.scalatest" % "scalatest" % "1.2" % "test" // test listeners def junitXmlListener: TestReportListener = n...
mmakowski/theremin
project/build/ThereminProject.scala
Scala
bsd-2-clause
492
/** * Copyright 2010-2013 Artima, 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...
scalatest/scalactic-website
test/ExampleUnitSpec.scala
Scala
apache-2.0
1,169
package physical.habitat import org.locationtech.jts.geom.{Geometry, MultiPolygon} import locals.{Constants, HabitatType, Reef, Other, RockyIntertidal, Ocean} import org.opengis.feature.simple.SimpleFeature object SimpleFeatureAdaptor { def getGeometry(sf: SimpleFeature) : Geometry = sf.getAttribute(Constants.Shape...
shawes/zissou
src/main/scala/physical/habitat/SimpleFeatureAdaptor.scala
Scala
mit
883
package org.cloudfun.framework.storage.mongodb import com.osinka.mongodb.Serializer import org.cloudfun.framework.storage.Storable import com.mongodb.{BasicDBList, BasicDBObject, DBObject} import org.cloudfun.framework.data.{MutableData, Data} import scala.collection.JavaConversions._ import org.bson.types.ObjectId im...
zzorn/cloudfun
src/main/scala/org/cloudfun/framework/storage/mongodb/MongoSerializer.scala
Scala
lgpl-3.0
3,517
package io.circe import cats.data.{ NonEmptyList, Validated, Xor } import cats.laws.discipline.arbitrary._ import cats.laws.discipline.eq._ import io.circe.test.{ CodecTests, CirceSuite } import org.scalacheck.Prop.forAll class AnyValCodecTests extends CirceSuite { checkAll("Codec[Unit]", CodecTests[Unit].codec) ...
groz/circe
core/shared/src/test/scala/io/circe/CodecTests.scala
Scala
apache-2.0
3,813
package mesosphere.marathon.integration import mesosphere.marathon.integration.setup._ import org.scalatest.{ GivenWhenThen, Matchers } import play.api.libs.json.Json class InfoIntegrationTest extends IntegrationFunSuite with SingleMarathonIntegrationTest with GivenWhenThen with Matchers { test("v2/info returns the...
EasonYi/marathon
src/test/scala/mesosphere/marathon/integration/InfoIntegrationTest.scala
Scala
apache-2.0
1,450
import scala.concurrent.{ Await, Future } import scala.concurrent.duration.FiniteDuration import reactivemongo.api.{ Cursor, CursorFlattener, CursorProducer, WrappedCursor } import reactivemongo.api.TestCompat._ trait Cursor1Spec { spec: CursorSpec => def group1 = { val nDocs = 16517 s"insert $nDoc...
ornicar/ReactiveMongo
driver/src/test/scala/Cursor1Spec.scala
Scala
apache-2.0
13,421
/******************************************************************************* * Copyright (c) 2014 Guillaume DUBUISSON DUPLESSIS <guillaume.dubuisson_duplessis@insa-rouen.fr>. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * ...
GuillaumeDD/scala99problems
src/main/scala/binaryTree/P64/sol02.scala
Scala
gpl-3.0
771
/* * Copyright 2017 Exon IT * * 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 w...
exon-it/redmine-scala-client
client-play25-ws/src/test/scala/by/exonit/redmine/client/play25ws/BasicSpec.scala
Scala
apache-2.0
1,114
package slick.memory import java.util.concurrent.atomic.AtomicLong import com.typesafe.config.Config import org.reactivestreams.Subscriber import scala.collection.mutable.{ArrayBuffer, HashMap, HashSet} import scala.concurrent.{Future, ExecutionContext} import slick.SlickException import slick.ast._ import slick.l...
kwark/slick
slick/src/main/scala/slick/memory/HeapBackend.scala
Scala
bsd-2-clause
7,918
/* * Copyright 2013-2015 Websudos, Limited. * * 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 c...
analytically/phantom
phantom-dsl/src/main/scala/com/websudos/phantom/builder/serializers/CollectionModifiers.scala
Scala
bsd-2-clause
6,675
package org.coursera.zipkin import com.twitter.finagle.Httpx import com.twitter.finagle.param import com.twitter.logging.Logger import com.twitter.scrooge.BinaryThriftStructSerializer import com.twitter.server.Closer import com.twitter.server.TwitterServer import com.twitter.util.Await import com.twitter.util.Base64St...
coursera/zipkin
zipkin-all/src/main/scala/org/coursera/zipkin/Main.scala
Scala
apache-2.0
2,044
/* * 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 ...
nchammas/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/adaptive/AdaptiveQueryExecSuite.scala
Scala
apache-2.0
91,648
package scala.meta.internal.tokenizers import scala.collection.mutable object Compat { def newMutableMap[A, B] = mutable.Map.empty[A, B] }
scalameta/scalameta
scalameta/tokenizers/native/src/main/scala/scala/meta/internal/tokenizers/Compat.scala
Scala
bsd-3-clause
143
package utils import com.mongodb.casbah.MongoConnection import play.api.Play import com.mongodb.casbah.MongoDB object MongoHQConfig { val mongoServer = Play.current.configuration.getString("mongoServer").get val mongoPort = Play.current.configuration.getString("mongoPort").get.toInt val databaseName = Play.curre...
knoldus/Play-Starter-Template
app/utils/MongoHQConfig.scala
Scala
apache-2.0
646