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 com.avsystem.scex package compiler import java.{lang => jl, util => ju} import com.avsystem.scex.parsing.{ShiftInfo, ShiftInfoPositionMapping} import scala.collection.immutable.SortedMap /** * Created: 24-10-2013 * Author: ghik */ class ShiftInfoPositionMappingTest extends ScexFunSuite { test("empty ma...
pnf/scex
scex-derived/src/test/scala/com/avsystem/scex/compiler/ShiftInfoPositionMappingTest.scala
Scala
apache-2.0
2,265
/******************************************************************************* * This file is part of tiscaf. * * tiscaf 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 L...
gnieh/tiscaf
core/src/main/scala/tiscaf/HPeer.scala
Scala
lgpl-3.0
8,592
package org.ffmmx.example.musicplayer import org.scaloid.common._ import android.widget._ import android.content.{Intent, Context, BroadcastReceiver} import android.widget.SeekBar.OnSeekBarChangeListener import android.view._ import scala.collection.mutable.{ListBuffer, Stack} import android.os.Environment import java...
firefoxmmx2/Android_MusicPlayer
src/org/ffmmx/example/musicplayer/activity.scala
Scala
apache-2.0
14,246
package scalera.moonrover import scalera.moonrover.RoverProgram._ import scalera.moonrover.interpreter.Program class SimulatorTest extends BaseTest("Simulator") { it should "run the simulation and find out if the program is useless" in { val sim = Simulator( Program( 1 -> NOP, 2 -> LEFT, ...
Scalera/moonrover
core/src/test/scala/scalera/moonrover/SimulatorTest.scala
Scala
apache-2.0
412
package cpup.mc.oldenMagic.content.runes import cpup.mc.oldenMagic.api.oldenLanguage.runes.{TRuneType, TRune} import cpup.mc.oldenMagic.api.oldenLanguage.runeParsing.TVerbRune import cpup.mc.oldenMagic.api.oldenLanguage.casting.CastingContext import net.minecraft.entity.Entity import cpup.mc.lib.util.pos.BlockPos impo...
CoderPuppy/oldenmagic-mc
src/main/scala/cpup/mc/oldenMagic/content/runes/ProtectRune.scala
Scala
mit
1,811
package com.datawizards.splot.examples.charts.bar import com.datawizards.splot.api.implicits._ object BarChartWithSimpleAPI extends App { SPlot.plotBar(Seq(1.0, 4.0, 9.0)) SPlot.plotBar(Seq("a","b","c"), Seq(1.0, 4.0, 9.0)) }
piotr-kalanski/SPlot
src/main/scala/com/datawizards/splot/examples/charts/bar/BarChartWithSimpleAPI.scala
Scala
apache-2.0
233
package redmine4s.api.resource import org.scalatest.{DiagrammedAssertions, FlatSpec} class EnumerationResourceSpec extends FlatSpec with DiagrammedAssertions { }
tomingtoming/redmine4s
src/test/scala/redmine4s/api/resource/EnumerationResourceSpec.scala
Scala
apache-2.0
164
package cc.factorie.app.nlp.hcoref import java.io._ import scala.io.Source import cc.factorie._ import cc.factorie.util.{VectorUtils, EvaluatableClustering, NonValidatingXML} import cc.factorie.app.nlp._ import cc.factorie.app.nlp.pos.OntonotesForwardPosTagger import cc.factorie.app.nlp.ner.NoEmbeddingsConllStackedCha...
iesl/fuse_ttl
src/factorie-factorie_2.11-1.1/src/main/scala/cc/factorie/app/nlp/hcoref/TACCoref.scala
Scala
apache-2.0
20,912
/* * 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 ...
aokolnychyi/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/ui/ExecutionPage.scala
Scala
apache-2.0
5,485
/** * 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 ...
bigdatagenomics/bdg-services
bdgs-core/src/main/scala/org/bdgenomics/services/ClasspathFileLocator.scala
Scala
apache-2.0
1,755
package com.github.rcoh.query.lang import scala.util.parsing.combinator.RegexParsers /** * Created by russell on 8/3/16. */ case class ParseError(message: String, offset: Int, formattedError: String) { override def toString = formattedError } object QueryParser { def parse(s: String): Either[ParseError, Qu...
rcoh/lasic
src/main/scala/com/github/rcoh/query/lang/Parser.scala
Scala
mit
1,858
package com.plasmaconduit.algebro import scala.language.higherKinds import scala.language.implicitConversions trait Foldable[F[_]] { def fold[M: Monoid](m :F[M]): M def foldMap[M: Monoid, A](f: A => M, n: F[A]): M def foldRight[A, B](f: (A, B) => B, m: B, n: F[A]): B def foldLeft[A, B](f: (B, A) => B, m: ...
plasmaconduit/algebro
src/main/scala/com/plasmaconduit/algebro/Foldable.scala
Scala
mit
1,211
package actors import akka.actor.{Actor, ActorRef, PoisonPill, Props, actorRef2Scala} import play.api.Mode import play.api.Play.current import play.api.libs.json.Json import play.api.libs.ws.WSClient import scala.collection.immutable.Map import scala.concurrent.ExecutionContext.Implicits._ /* * Classe Port used to b...
snigle/FrontDockerOrchestrator
PlayProject/app/actors/ContainersActor.scala
Scala
mit
3,152
/*- * #%L * FWAPP Framework * %% * Copyright (C) 2016 - 2017 Open Design Flow * %% * 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) a...
opendesignflow/fwapp
src/main/scala/org/odfi/wsb/fwapp/FWappApp.scala
Scala
agpl-3.0
3,100
import org.scalacheck.Arbitrary import org.specs2.scalaz._ import scalaz.scalacheck.ScalazProperties._ class VecSpec extends Spec { implicit val arbitraryVec = Arbitrary { for { (x, y) <- Arbitrary.arbitrary[(Int, Int)] } yield Vec(x, y) } checkAll(equal.laws[Vec]) checkAll(monoid.laws[Vec]) }
debasishg/proptest
src/test/scala/net/debasishg/prop/VecSpec.scala
Scala
apache-2.0
319
package junto.graph import scalax.collection.GraphEdge._ final class RWUnDiEdgeAssoc[N](val e: UnDiEdge[N]) { def ^(rweight: Double) = new RWUnDiEdge[N](e.nodes, rweight) }
scalanlp/junto
src/main/scala/junto/graph/RWUnDiEdgeAssoc.scala
Scala
apache-2.0
183
package colossus.service import colossus.util.DataSize._ import org.scalatest.{WordSpec, MustMatchers} import scala.concurrent.duration.Duration class ServiceConfigLoadingSpec extends WordSpec with MustMatchers { "Service configuration loading" should { "load defaults" in { val config = ServiceConfig.De...
tumblr/colossus
colossus-tests/src/test/scala/colossus/service/ServiceConfigLoadingSpec.scala
Scala
apache-2.0
926
package controllers import scala.concurrent.duration._ import views._ import lila.api.Context import lila.app._ import lila.ublog.{ UblogBlog, UblogPost } import lila.user.{ User => UserModel } import play.api.i18n.Lang import lila.i18n.LangList import lila.report.Suspect final class Ublog(env: Env) extends LilaCont...
luanlv/lila
app/controllers/Ublog.scala
Scala
mit
9,767
/* * 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/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600ei/v3/retriever/CT600EiBoxRetriever.scala
Scala
apache-2.0
967
package satisfaction.fs import java.io._ import org.joda.time.DateTime /** * Simple FileSystem, for accessing local disk. * Mostly for testing... * * XXX Add unit tests for local file operations */ case class LocalFileSystem() extends FileSystem { case class LocalFStatus( file : java.io.File ) extends...
ifwe/satisfaction
modules/core/src/main/scala/satisfaction/fs/LocalFs.scala
Scala
apache-2.0
2,877
package lila package object api extends PackageObject
luanlv/lila
modules/api/src/main/package.scala
Scala
mit
55
import types.Types.{Solution, OptimalSolution, ProblemData} import scala.util.Random package object algorithms { def cost(problem: ProblemData, solution: Solution): Int = { val (nItems, m1, m2) = problem val sumatory = for { i <- 0 until nItems j <- 0 until nItems } yield m1(i)(j) * m2(solu...
Truji92/MH-algoritmos-basados-en-trayectorias
src/main/scala/algorithms/package.scala
Scala
mit
950
package com.jackbeasley.enigma class Plugboard(cipher:Cipher) { def mapForward(input:Char):Char = cipher.cipherForward(input) def mapBackward(input:Char):Char = cipher.cipherBackward(input) } object Plugboard { def isValid(settings:Array[(Char,Char)]):Boolean = { var rawString = "" // Empty the mapp...
jackbeasley/enigma
src/main/scala/Plugboard.scala
Scala
gpl-3.0
1,642
// scalac: -Xasync object Test extends scala.tools.partest.JUnitTest(classOf[scala.async.run.ifelse1.IfElse1Spec]) package scala.async.run.ifelse1 { import language.{reflectiveCalls, postfixOps} import scala.concurrent.{Future, ExecutionContext, Await} import scala.concurrent.duration._ import scala.tools.te...
lrytz/scala
test/async/jvm/ifelse1.scala
Scala
apache-2.0
3,919
/* * 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 ...
goldmedal/spark
sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
Scala
apache-2.0
129,354
package com.github.mauricio.async.db.mysql import org.specs2.mutable.Specification import java.util.UUID import java.nio.ByteBuffer import io.netty.buffer.Unpooled import io.netty.util.CharsetUtil import com.github.mauricio.async.db.RowData class BinaryColumnsSpec extends Specification with ConnectionHelper { "con...
dripower/postgresql-async
mysql-async/src/test/scala/com/github/mauricio/async/db/mysql/BinaryColumnsSpec.scala
Scala
apache-2.0
4,375
/* * Copyright (c) 2017-2021, Robby, Kansas State University * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, th...
sireum/v3-logika-runtime
library/shared/src/test/scala/org/sireum/CircularQueueTest.scala
Scala
bsd-2-clause
11,377
package scorex.block import scorex.serialization.Deser import scala.util.Try /** * A generic interface with functionality to convert data into a part of a block and vice versa */ trait BlockProcessingModule[BlockPartDataType] extends Deser[BlockField[BlockPartDataType]] { def parseBytes(bytes: Array[Byte]): T...
ScorexProject/Scorex
scorex-basics/src/main/scala/scorex/block/BlockProcessingModule.scala
Scala
cc0-1.0
590
package xyz.hyperreal.prolog import scala.math._ import xyz.hyperreal.numbers.ComplexBigInt object MathConstants { val pi: Number = Pi val e: Number = E val i: Number = ComplexBigInt.i }
edadma/funl
prolog/src/main/scala/xyz/hyperreal/prolog/MathConstants.scala
Scala
mit
200
/* 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 not use this f...
mandar2812/DynaML
dynaml-core/src/main/scala/io/github/tailhq/dynaml/models/neuralnets/NeuralNet.scala
Scala
apache-2.0
4,764
package com.typesafe.slick.testkit.util import org.slf4j.MDC import scala.language.existentials import scala.concurrent.{Promise, ExecutionContext, Await, Future, blocking} import scala.concurrent.duration.Duration import scala.reflect.ClassTag import scala.util.{Failure, Success} import scala.util.control.NonFatal ...
lukasz-golebiewski/slick
slick-testkit/src/main/scala/com/typesafe/slick/testkit/util/Testkit.scala
Scala
bsd-2-clause
13,604
package nbmtools import java.util.zip.ZipFile object NbmUtils { private implicit def toBiFunction[A, B, C](f: Function2[A, B, C]) = { new java.util.function.BiFunction[A, B, C] { override def apply(a: A, b: B): C = f(a, b) } } implicit def toZipEntryList(file: ZipFile): List[Z...
tkob/nbmtools
src/main/scala/nbmtools/NbmUtils.scala
Scala
mit
513
/** * Copyright 2015 Mohiva Organisation (license at mohiva dot 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 req...
mohiva/play-silhouette
silhouette/app/com/mohiva/play/silhouette/api/repositories/AuthInfoRepository.scala
Scala
apache-2.0
3,198
package service import dao._ import model._ import org.joda.time.DateTime import router.dto.ActivityDto import utils.DatabaseConfig._ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import scalaz.OptionT import scalaz.OptionT._ import scalaz.std.scalaFuture._ /** * Created b...
Gneotux/pfc
src/main/scala/service/ActivityService.scala
Scala
apache-2.0
5,693
package com.yammer.metrics.scala import collection.JavaConversions._ import java.util.concurrent.TimeUnit import java.io.File /** * A Scala façade class for Timer. */ class Timer(metric: com.yammer.metrics.Timer) { /** * Runs f, recording its duration, and returns the result of f. */ def time[A](f: => A):...
hailcode/metrics-scala
src/main/scala/com/yammer/metrics/scala/Timer.scala
Scala
apache-2.0
1,326
package com.theomn.cartography import net.minecraft.entity.player.EntityPlayerMP import net.minecraft.server.MinecraftServer import net.minecraft.world.World import net.minecraftforge.fml.relauncher.{SideOnly, Side} import org.apache.logging.log4j.LogManager import net.minecraft.util.BlockPos import net.minecraftfor...
onelson/cartography
src/main/scala/com/theomn/cartography/CartographyEventHandler.scala
Scala
lgpl-2.1
2,591
package myutil /** * Created by basil on 16/09/14. */ object FormattedOutput { def byteArrayToHex(bytes: Array[Byte]): String = bytes.map{ b => String.format("%02X", new java.lang.Integer(b & 0xff)) }.mkString("'", " ", "'") }
cn-uofbasel/nfn-scala
src/main/scala/myutil/FormattedOutput.scala
Scala
isc
234
// Copyright (c) 2015 Ben Zimmer. All rights reserved. package bdzimmer.pixeleditor.model import org.apache.commons.io.FileUtils import java.io.File import scala.collection.JavaConverters._ case class AssetMetadata(id: String, assetType: String, name: String, filename: String, info: String) object AssetMetadataUtil...
bdzimmer/pixel-editor
src/main/scala/bdzimmer/pixeleditor/model/AssetMetadata.scala
Scala
bsd-3-clause
1,049
package com.github.mrpowers.spark.daria.utils import org.apache.spark.sql.{DataFrame, SparkSession} case class DariaSchemaMismatchError(smth: String) extends Exception(smth) object SchemaSafeWriter { // writes to a Parquet data lake if the schema matches the existing schema // throws an error if the schemas don...
MrPowers/spark-daria
src/main/scala/com/github/mrpowers/spark/daria/utils/SchemaSafeWriter.scala
Scala
mit
1,078
/* * Copyright (c) 2011-14 Miles Sabin * * 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...
TomasMikula/shapeless
core/src/test/scala/shapeless/poly.scala
Scala
apache-2.0
10,515
package comms import org.scalajs.dom import scala.concurrent.Future import scalajs.concurrent.JSExecutionContext.Implicits.runNow import upickle.default._ import upickle.Js import autowire._ object Client extends autowire.Client[Js.Value, Reader, Writer]{ override def doCall(req: Request): Future[Js.Value] = { ...
aholland/play-scalajs-workbench-example
workbench/src/main/scala/comms/Client.scala
Scala
mit
639
package io.circe import cats.data.Xor trait Parser extends Serializable { def parse(input: String): Xor[ParsingFailure, Json] def decode[A](input: String)(implicit d: Decoder[A]): Xor[Error, A] = parse(input).flatMap { json => d(Cursor(json).hcursor) } }
beni55/circe
core/shared/src/main/scala/io/circe/Parser.scala
Scala
apache-2.0
266
package com.alanjz.microstrike.weapon trait MachineGun { }
spacenut/microstrike
src/com/alanjz/microstrike/weapon/MachineGun.scala
Scala
gpl-2.0
61
package x7c1.linen.modern.init.inspector import x7c1.linen.glue.res.layout.{SourceSearchRow, SourceSearchRowClientError, SourceSearchRowFooter, SourceSearchRowLabel, SourceSearchRowOriginError, SourceSearchRowSourceItem, SourceSearchRowSourceNotFound} import x7c1.linen.repository.inspector.{ClientLoadingError, Discove...
x7c1/Linen
linen-modern/src/main/scala/x7c1/linen/modern/init/inspector/SearchReportRowProviders.scala
Scala
mit
2,037
/* * Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com> */ package scalaguide.i18n // #inject-langs import javax.inject.Inject import play.api.i18n.{Lang, Langs} import play.api.mvc.{BaseController, ControllerComponents} class ScalaI18nService @Inject()(langs: Langs) { val availableLangs: Seq[La...
Shenker93/playframework
documentation/manual/working/scalaGuide/main/i18n/code/scalaguide/i18n/ScalaI18nService.scala
Scala
apache-2.0
2,779
package com.lyrx.text import java.io.File import com.lyrx.html.DivBasedTagCollector import com.lyrx.text.TextTypes.{Par, Pars} import scala.collection.immutable.HashMap import scala.collection.immutable.HashMap.HashMap1 import scala.util.matching.Regex /** * Created by alex on 17.10.16. */ trait ParBasedGenerat...
lyrx/lyrxgenerator
src/main/scala/com/lyrx/text/ParBasedGenerator.scala
Scala
gpl-3.0
3,290
val primerArgumento = if (args.length > 0) args(0) else "" // similar al switch, pero no necesita breaks y genera un valor directamente que se infiere val ayuda = primerArgumento match { // ayuda sera de tipo String, inferido por el compilador case "l" => "formato largo" case "f" => "formato impresion" case _ =>...
romanarranz/NTP
S5/estructuraMatch.scala
Scala
mit
353
package frameless import org.scalacheck.{Arbitrary, Prop} import org.scalacheck.Prop._ import scala.reflect.ClassTag import shapeless.test.illTyped import org.scalatest.matchers.should.Matchers class CreateTests extends TypedDatasetSuite with Matchers { import TypedEncoder.usingInjection test("creation using X...
imarios/frameless
dataset/src/test/scala/frameless/CreateTests.scala
Scala
apache-2.0
5,445
package eu.pepot.eu.spark.inputsplitter.helper import java.io.File import eu.pepot.eu.spark.inputsplitter.common.file.FileDetails import Helper._ object TestsHelper { def resourcesBaseDir(subDir: String) = { toStringPath("src/test/resources/eu/pepot/eu/spark/inputsplitter/samples", subDir) } def resource...
mauriciojost/spark-input-splitter
src/test/scala/eu/pepot/eu/spark/inputsplitter/helper/TestsHelper.scala
Scala
apache-2.0
558
/** * 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-core/src/main/scala/io/gatling/core/cli/GatlingOptionParser.scala
Scala
apache-2.0
1,089
package io.github.edadma.numbers import java.math.{RoundingMode, MathContext} import math._ class BigDecimalMath(val mc: MathContext) { def this(precision: Int) = this(new MathContext(precision, RoundingMode.HALF_EVEN)) class Const(compute: => BigDecimal) { private var _value: BigDecimal = null de...
edadma/numbers
shared/src/main/scala/io/github/edadma/numbers/BigDecimalMath.scala
Scala
mit
7,568
package com.twitter.finagle.filter import com.twitter.finagle._ import com.twitter.finagle.stats.StatsReceiver import com.twitter.finagle.tracing.Annotation.BinaryAnnotation import com.twitter.finagle.tracing.ForwardAnnotation import com.twitter.finagle.util.Rng import com.twitter.logging.HasLogLevel import com.twitte...
twitter/finagle
finagle-core/src/main/scala/com/twitter/finagle/filter/DarkTrafficFilter.scala
Scala
apache-2.0
3,021
package chandu0101.scalajs.react.components package materialui import chandu0101.macros.tojs.JSMacro import japgolly.scalajs.react._ import japgolly.scalajs.react.raw.React import japgolly.scalajs.react.vdom.VdomNode import org.scalajs.dom import scala.scalajs.js import scala.scalajs.js.`|` /** * This file is gene...
rleibman/scalajs-react-components
core/src/main/scala/chandu0101/scalajs/react/components/materialui/MuiTableHeaderColumn.scala
Scala
apache-2.0
2,363
/* * 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/scala-csv
laws/shared/src/main/scala-2.12/kantan/csv/laws/discipline/VersionSpecificReaderEngineTests.scala
Scala
mit
1,018
package colang.ast.raw import colang.Strategy.Result import colang.Strategy.Result.{Malformed, NoMatch, Success} import colang._ import colang.issues._ import colang.tokens._ import scala.annotation.tailrec /** * Represents a compiler components that groups tokens into higher-level syntax tree nodes representing r...
merkispavel/colang
src/main/scala/colang/ast/raw/Parser.scala
Scala
mit
21,505
package org.ai4fm.proofprocess.ui.graph import scala.collection.JavaConversions._ import org.ai4fm.proofprocess.{Attempt, Proof, ProofElem, ProofEntry, ProofParallel, ProofSeq, ProofStore} import org.ai4fm.proofprocess.core.graph.EmfPProcessTree import org.eclipse.emf.ecore.EObject /** * Calculates ProofProcess gr...
andriusvelykis/proofprocess
org.ai4fm.proofprocess.ui/src/org/ai4fm/proofprocess/ui/graph/PProcessGraph.scala
Scala
epl-1.0
3,593
package monocle.std import monocle.MonocleSuite import monocle.law.discipline.LensTests import monocle.law.discipline.function.{Cons1Tests, EachTests, ReverseTests, Snoc1Tests} class Tuple2Spec extends MonocleSuite { checkAll("first tuple2", LensTests(first[(Int, Char), Int])) checkAll("second tuple2", LensTests(...
NightRa/Monocle
test/src/test/scala/monocle/std/Tuple2Spec.scala
Scala
mit
599
package com.sksamuel.elastic4s.search.aggs import com.sksamuel.elastic4s.http.search.DateRangeBucket import com.sksamuel.elastic4s.testkit.DockerTests import com.sksamuel.elastic4s.{ElasticDate, ElasticDateMath, Years} import org.scalatest.{FreeSpec, Matchers} import scala.util.Try class KeyedDateRangeAggregationHtt...
Tecsisa/elastic4s
elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/search/aggs/KeyedDateRangeAggregationHttpTest.scala
Scala
apache-2.0
3,098
package org.scalafmt import scala.meta.Case import scala.meta.Tree import scala.reflect.ClassTag import scala.reflect.classTag import java.nio.file.Path import scala.meta.inputs.Position import org.scalafmt.internal.Decision import org.scalafmt.internal.FormatToken import org.scalafmt.internal.State import org.scalafm...
scalameta/scalafmt
scalafmt-core/shared/src/main/scala/org/scalafmt/Error.scala
Scala
apache-2.0
3,524
package gsd.linux.tools import util.logging.ConsoleLogger import java.io.PrintStream import gsd.linux.cnf.DimacsReader.{DimacsHeader, DimacsProblem} import org.clapper.argot._ import gsd.linux.cnf.{DimacsReader, ImplBuilder, SATBuilder} import java.util.Scanner object ImplGraphMain extends ArgotUtil with ConsoleLog...
jacksonpradolima/linux-variability-analysis-tools.fm-translation
src/main/scala/gsd/linux/tools/ImplGraphMain.scala
Scala
lgpl-3.0
2,934
package com.sksamuel.scoverage.samples import akka.actor.{ActorRef, Actor} import scala.util.Random import scala.concurrent.duration._ import scala.concurrent.ExecutionContext.Implicits.global import scala.language.postfixOps /** @author Stephen Samuel */ class ClientActor(priceEngine: ActorRef, orderEngine: ActorRef...
scoverage/sbt-scoverage-samples
src/main/scala/com/sksamuel/scoverage/samples/ClientActor.scala
Scala
apache-2.0
1,298
//package tests // // //import org.scalatest.FunSuite //import org.junit.runner.RunWith //import org.scalatest.junit.JUnitRunner //import ch.usi.inf.l3.piuma.transform.dsl.ParseTransformerDSL // //@RunWith(classOf[JUnitRunner]) //class Test extends FunSuite { // import ParseTransformerDSL._ // test("should not parse"...
amanjpro/piuma
simple/src/main/scala/tests/Test.scala
Scala
bsd-3-clause
1,006
package io.mpjsons.impl.deserializer import io.mpjsons.JsonTypeDeserializer import io.mpjsons.impl.StringIterator class PostTransformDeserializer[T](internalDeserializer: JsonTypeDeserializer[_ <: Any], transform: T => T) extends JsonTypeDeserializer[T]{ override def deserialize(jsonIterator: StringIterator): T =...
marpiec/mpjsons
src/main/scala/io/mpjsons/impl/deserializer/PostTransformDeserializer.scala
Scala
apache-2.0
407
/* * Originally (c) 2014 Dmitry Leskov, http://www.dmitryleskov.com * Released into the public domain under the Unlicense, http://unlicense.org */ package streamhygiene package part2 import Test._ object Part2 extends AutoConfig { def input = Stream.continually(1) take problemSize /* * It looks like the i...
dmitryleskov/stream-hygiene
src/streamhygiene/part2/Part2.scala
Scala
unlicense
1,330
package example case class Box[T](var element: T) { def get(): T = element def set(newElement: T): Unit = { element = newElement } } object Collection { def test0(): Unit = { val box1 = new Box[Int](10) println(s"box1 => $box1") println(s"box1.get() => ${box1.get}") box1.set(0) pri...
ohtomi/sandbox
scala-start/src/main/scala/example/Collection.scala
Scala
mit
3,336
/*********************************************************************** * Copyright (c) 2013-2019 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...
elahrvivaz/geomesa
geomesa-tools/src/main/scala/org/locationtech/geomesa/tools/stats/StatsTopKCommand.scala
Scala
apache-2.0
2,651
package com.twitter.finagle.server import com.twitter.concurrent.AsyncSemaphore import com.twitter.finagle.filter.{MaskCancelFilter, RequestSemaphoreFilter} import com.twitter.finagle.service.TimeoutFilter import com.twitter.finagle.stats.{StatsReceiver, ServerStatsReceiver} import com.twitter.finagle.tracing._ import...
a-manumohan/finagle
finagle-core/src/main/scala/com/twitter/finagle/server/DefaultServer.scala
Scala
apache-2.0
4,023
/* Copyright 2014 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 to in writing, software...
jzmq/scalding
scalding-serialization/src/main/scala/com/twitter/scalding/serialization/macros/impl/OrderedBufferableProviderImpl.scala
Scala
apache-2.0
3,999
/* * 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 ...
WindCanDie/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/memory.scala
Scala
apache-2.0
11,905
import org.broadinstitute.gatk.queue.QScript import org.broadinstitute.gatk.queue.extensions.gatk._ class callVariants extends QScript { def script() { val hc = new HaplotypeCaller hc.reference_sequence = new File ("hg42.fa") hc.standard_min_confidence_threshold_for_emitting = 10 hc.standard_min_confidence_thr...
michael-weinstein/GATKbyDirectory
bogus1.bam.scatter.scala
Scala
gpl-3.0
506
import java.io._ import Implicits._ import akka.event.LoggingAdapter import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration._ import scala.concurrent.{Await, Future, Promise} import scala.sys.process.{ProcessIO, _} /** * Created by johan on 11.09.2016. */ object Implicits { ...
Sukram21/FlixFace
src/main/scala/processCom.scala
Scala
mit
1,783
package com.twitter.diffy.proxy import javax.inject.Singleton import com.google.inject.Provides import com.twitter.diffy.analysis._ import com.twitter.diffy.lifter.{FieldMap, Message} import com.twitter.finagle._ import com.twitter.inject.TwitterModule import com.twitter.util._ import org.apache.log4j object Differen...
SDUUitgevers/diffy
src/main/scala/com/twitter/diffy/proxy/DifferenceProxy.scala
Scala
apache-2.0
3,547
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
akopich/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala
Scala
apache-2.0
38,420
/* * 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/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600j/v3/J45.scala
Scala
apache-2.0
980
package org.elasticmq.actor import org.elasticmq.actor.reply._ import org.elasticmq.msg.{DeleteQueue, LookupQueue, ListQueues, CreateQueue} import org.elasticmq.MillisVisibilityTimeout import org.elasticmq.actor.test.{DataCreationHelpers, QueueManagerForEachTest, ActorTest} class QueueManagerActorTest extends ActorTe...
adamw/elasticmq
core/src/test/scala/org/elasticmq/actor/QueueManagerActorTest.scala
Scala
apache-2.0
2,536
package spire.math.prime import scala.annotation.tailrec import scala.collection.mutable.{ArrayBuffer} import System.arraycopy import spire.math.{SafeLong, min} import spire.syntax.cfor._ import SieveUtil._ /** * This respresents a single sieve segment. * * The 'start' field says what this segment's first number...
woparry/spire
core/src/main/scala/spire/math/prime/SieveSegment.scala
Scala
mit
5,550
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this fi...
xjrk58/elasticsearch-hadoop
spark/sql-13/src/main/scala/org/elasticsearch/spark/sql/SchemaUtils.scala
Scala
apache-2.0
14,646
//no import of stainless.collection.List object List3 { def foobar = 1 :: Nil }
epfl-lara/stainless
frontends/benchmarks/extraction/invalid/List3.scala
Scala
apache-2.0
83
package com.arcusys.valamis.settings.service /** * Created by igorborisov on 17.10.14. */ trait SiteDependentSettingService { def setSetting(siteId: Int, name: String, value: Option[String]): Unit def getSetting(siteId: Int, name: String): Option[String] }
ViLPy/Valamis
valamis-core/src/main/scala/com/arcusys/valamis/settings/service/SiteDependentSettingService.scala
Scala
lgpl-3.0
266
package org.json4s package ext class JacksonTypeFieldSerializerSpec extends TypeFieldSerializerSpec("Jackson") { val s: Serialization = jackson.Serialization }
json4s/json4s
tests/src/test/scala/org/json4s/ext/JacksonTypeFieldSerializerSpec.scala
Scala
apache-2.0
163
/* * This file is part of AckCord, licensed under the MIT License (MIT). * * Copyright (c) 2019 Katrix * * 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 ...
Katrix-/AckCord
requests/src/main/scala/ackcord/util/StreamInstances.scala
Scala
mit
3,213
package controllers import actors.{StationsDBActor, WebSocketActor} import models._ import play.Logger import play.api.Play import play.api.libs.json._ import play.api.libs.ws._ import play.api.mvc._ import akka.actor._ import javax.inject._ import StationsDBActor._ import play.api.Play.current import play.api.libs....
jdauphant/reactive-velib-api
app/controllers/Application.scala
Scala
bsd-2-clause
1,643
/** * Ephedra Food Alerts * Copyright (C) 2013-2014 Philippe Sam-Long aka pulsation * * This program 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 ...
pulsation/ephedra-android
src/eu/pulsation/ephedra/About/AboutFragment.scala
Scala
gpl-3.0
2,290
package servlet import org.eclipse.jgit.http.server.GitServlet import org.eclipse.jgit.lib._ import org.eclipse.jgit.transport._ import org.eclipse.jgit.transport.resolver._ import org.slf4j.LoggerFactory import javax.servlet.ServletConfig import javax.servlet.ServletContext import javax.servlet.http.{HttpServletResp...
mqshen/gitbucketTest
src/main/scala/servlet/GitRepositoryServlet.scala
Scala
apache-2.0
9,503
/* * Copyright (c) 2014, Brook 'redattack34' Heisler * 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, t...
Redattack34/ModularRayguns
src/main/scala/com/castlebravostudios/rayguns/api/items/RaygunModule.scala
Scala
bsd-3-clause
4,152
package org.jetbrains.plugins.scala package lang package psi package api package statements import java.util import com.intellij.openapi.progress.ProgressManager import com.intellij.openapi.project.DumbServiceImpl import com.intellij.openapi.util.Key import com.intellij.pom.java.LanguageLevel import com.intellij.psi...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/psi/api/statements/ScFunction.scala
Scala
apache-2.0
27,071
package cn.changhong.web.controller.auth import cn.changhong.web.persistent.SlickDBPoolManager import cn.changhong.web.persistent.Tables.Tables.User import cn.changhong.web.router.{RestAction, RestAopRouterProvider, LogAopAction} import cn.changhong.web.util._ import com.twitter.finagle.http.Response import org.jboss....
guoyang2011/myfinagle
WebTemplate/src/main/scala/cn/changhong/web/controller/auth/UserAuthService.scala
Scala
apache-2.0
8,260
package mypipe.producer.stdout import mypipe.api.event._ import mypipe.api.producer.Producer import org.slf4j.LoggerFactory import com.typesafe.config.Config class StdoutProducer(config: Config) extends Producer(config) { protected val mutations = scala.collection.mutable.ListBuffer[String]() protected val log =...
tramchamploo/mypipe
mypipe-producers/src/main/scala/mypipe/producer/stdout/StdoutProducer.scala
Scala
apache-2.0
2,788
object timeofday { class DateError extends Exception /** Simulating properties in Scala * (example 4.2.1 in the Scala Language Specification) */ class TimeOfDayVar { private var h, m, s: Int = 0 def hours = h /** A method 'ident_=' is a setter for 'ident'. 'code.ident = ...' will * b...
felixmulder/scala
test/disabled/presentation/timeofday/src/timeofday.scala
Scala
bsd-3-clause
895
/* * 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 ...
chenc10/Spark-PAF
mllib/src/main/scala/org/apache/spark/ml/feature/StopWordsRemover.scala
Scala
apache-2.0
7,442
/*********************************************************************** * 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-spark/geomesa-spark-jts/src/main/scala/org/locationtech/geomesa/spark/jts/encoders/SparkDefaultEncoders.scala
Scala
apache-2.0
1,633
package org.scaladebugger.test.steps import org.scaladebugger.test.helpers.Stubs._ /** * Provides test of performing basic step in/out/over in Scala situations * involving iterations. * * @note Should have a class name of org.scaladebugger.test.steps.BasicIterations */ object BasicIterations { def main(args: A...
ensime/scala-debugger
scala-debugger-test/src/main/scala/org/scaladebugger/test/steps/BasicIterations.scala
Scala
apache-2.0
987
/* * 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 ...
shaneknapp/spark
core/src/test/scala/org/apache/spark/util/collection/AppendOnlyMapSuite.scala
Scala
apache-2.0
5,818
package com.github.chengpohi.domain.search import akka.http.scaladsl.server.Route import com.github.chengpohi.infrastructure.util.AdjointUtils._ import com.github.chengpohi.infrastructure.{BaseController, Repository} import org.apache.logging.log4j.LogManager trait ActionQueryController extends BaseController { rep...
chengpohi/coolmarks
src/main/scala/com/github/chengpohi/domain/search/ActionQueryController.scala
Scala
apache-2.0
637
package me.archdev.utils import de.flapdoodle.embed.process.runtime.Network._ import me.archdev.restapi.utils.db.{DatabaseConnector, DatabaseMigrationManager} import ru.yandex.qatools.embed.postgresql.PostgresStarter import ru.yandex.qatools.embed.postgresql.config.AbstractPostgresConfig.{Credentials, Net, Storage, Ti...
ArchDev/akka-http-rest
src/test/scala/me/archdev/utils/InMemoryPostgresStorage.scala
Scala
mit
1,301
package com.twitter.scrooge.ast import scala.collection.mutable import com.twitter.scrooge.frontend.ScroogeInternalException sealed abstract class Identifier extends IdNode { // It was intentional not to override toString. Instead, use // "fullName" to indicate its purpose. def fullName: String def toCamelC...
tellapart/scrooge
scrooge-generator/src/main/scala/com/twitter/scrooge/AST/Identifier.scala
Scala
apache-2.0
4,925
package spgui import org.scalajs.dom.document import scala.scalajs.js.JSApp import scala.scalajs.js.annotation.JSExport object Main extends JSApp { @JSExport override def main(): Unit = { LoadingWidgets.loadWidgets Layout().renderIntoDOM(document.getElementById("spgui-root")) } }
kristoferB/SP
sperica/frontend/src/main/scala/spgui/Main.scala
Scala
mit
298
/* * 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 ...
publicRoman/spark
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/submitsteps/KubernetesDriverSpec.scala
Scala
apache-2.0
2,200
/* * Copyright 2011 javaBin * 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 agree...
javaBin/submitit
submitit-webapp/src/main/scala/no/java/submitit/app/Captcha.scala
Scala
mit
1,367
package xyz.hyperreal.prolog.builtin import xyz.hyperreal.bvm.VM import java.io.{BufferedReader, FileReader, FileWriter, PrintWriter} import xyz.hyperreal.char_reader.CharReader import xyz.hyperreal.prolog.{ DataStream, SinkStream, SourceStream, SystemInput, SystemOutput, TextSinkStream, TextSourceStrea...
edadma/funl
prolog/src/main/scala/xyz/hyperreal/prolog/builtin/Streams.scala
Scala
mit
3,592