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 castalia.model import castalia.UnitSpecBase import castalia.model.Model.LatencyConfig import scala.concurrent.duration.Duration class ModelSpec extends UnitSpecBase { "A latencyconfig" when { "parsing the json" should { "find the right distribution" in { val constantLatencyConfig = Lat...
TimSoethout/stubserver
src/test/scala/castalia/model/ModelSpec.scala
Scala
mit
1,325
package uima.cpe import us.feliscat.text.{StringNone, StringOption, StringSome} /** * <pre> * Created on 2016/12/18. * </pre> * * @author K.Sakamoto */ object IntermediatePoint { case object QuestionReader extends IntermediatePoint(0) { override val name: String = "QuestionReader" override...
ktr-skmt/FelisCatusZero-multilingual
src/main/scala/uima/cpe/IntermediatePoint.scala
Scala
apache-2.0
2,689
package chrome.management.bindings import chrome.events.bindings.Event import chrome.management.bindings.ExtensionInfo.LaunchType import chrome.runtime.bindings.Runtime.AppID import scala.scalajs.js import scala.scalajs.js.annotation.JSName @JSName("chrome.management") object Management extends js.Object { val on...
amsayk/scala-js-chrome
bindings/src/main/scala/chrome/management/bindings/Management.scala
Scala
mit
2,060
/* * Copyright 2006-2011 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
pbrant/framework
persistence/mapper/src/main/scala/net/liftweb/mapper/ProtoTag.scala
Scala
apache-2.0
2,483
package com.github.pheymann.rrt import cats.{Id, ~>} import TestAction._ import akka.actor.ActorSystem import com.github.pheymann.rrt.io.DbService import com.github.pheymann.rrt.io.DbService.UndefinedDatabase import com.github.pheymann.rrt.util.RandomUtil import com.github.pheymann.rrt.util.ResponseComparator.BodyComp...
pheymann/rest-refactoring-test
core/src/main/scala/com/github/pheymann/rrt/TestActionInterpreter.scala
Scala
mit
2,598
package controllers import models.Formats.AlarmFormat import models._ import play.api.Play.current import play.api.libs.concurrent.Akka import play.api.libs.json.Json import play.api.mvc._ import scala.concurrent.ExecutionContext.Implicits.global /** * Created by evalery on 06/02/15. */ object AlarmController exte...
evanther/play-akka-reactivemongo
app/controllers/AlarmController.scala
Scala
apache-2.0
1,122
package jgo.tools.compiler import lexer._ import scala.util.parsing.input.Reader package object parser { type Input = Base#Input }
thomasmodeneis/jgo
src/src/main/scala/jgo/tools/compiler/parser/package.scala
Scala
gpl-3.0
136
/* * 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
core/src/main/scala/org/apache/spark/scheduler/OutputCommitCoordinator.scala
Scala
apache-2.0
9,019
package sample.blog import java.lang.{ Long ⇒ JLong } import java.util.concurrent.Executor import akka.event.LoggingAdapter import akka.persistence.cassandra._ import akka.stream._ import akka.stream.scaladsl.{ Keep, Source } import akka.stream.stage._ import com.datastax.driver.core._ import com.google.common.util.c...
haghard/akka-pq
src/main/scala/sample/blog/PsJournal.scala
Scala
apache-2.0
10,578
// Copyright (c) 2016 PSForever.net to present package net.psforever.packet.game import net.psforever.packet.{GamePacketOpcode, Marshallable, PlanetSideGamePacket} import scodec.Codec import scodec.codecs._ /** * Promotes a warpgate's "broadcast" functionality.<br> * <br> * Change the map name of a warpgate int...
Fate-JH/PSF-Server
common/src/main/scala/net/psforever/packet/game/BroadcastWarpgateUpdateMessage.scala
Scala
gpl-3.0
2,094
/** * Copyright 2015 Peter Nerg * * 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 agre...
pnerg/java-scala-util-converter
src/test/scala/javascalautils/converters/j2s/ConvertersEitherSuite.scala
Scala
apache-2.0
1,732
import scala.tools.partest.ReplTest object Test extends ReplTest { def code = """ var s = 0 for (i <- 1 to 10) {s += i} for (i <- 1 to 10) {s += i} for (i <- 1 to 10) {s += i} println(s) """ }
yusuke2255/dotty
tests/pending/run/t5583.scala
Scala
bsd-3-clause
198
package com.outr.arango case class Index(`type`: IndexType, fields: List[String], sparse: Boolean = false, unique: Boolean = false, deduplicate: Boolean = true, geoJson: Boolean = true, minLength: Long = 3L, ...
outr/arangodb-scala
core/src/main/scala/com/outr/arango/Index.scala
Scala
mit
672
/* * Copyright 2022 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/self-service-time-to-pay-frontend
app/repo/Repo.scala
Scala
apache-2.0
2,439
/* * 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 ...
HuaweiBigData/carbondata
integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/dataload/TestLoadDataWithNoMeasure.scala
Scala
apache-2.0
4,063
package org.example1_1.usage import org.example1_1.declaration._ import org.example1_1.declaration.data.{X => X_Renamed, Y => Y_Renamed, Z => Z_Renamed} trait Usage2 { val x1: X_Renamed = ??? val y1: Y_Renamed = ??? val y2: Y_Renamed = ??? val z1: Z_Renamed = ??? val z2: Z_Renamed = ??? val xx: X4 = ??...
JetBrains/intellij-scala
scala/scala-impl/testdata/move/allInOne_1_MoveXYZ/after/org/example1_1/usage/Usage2.scala
Scala
apache-2.0
1,670
/* * 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/metastore/Mount.scala
Scala
apache-2.0
1,800
package eu.ace_design.island.viewer.svg import java.awt.{Color, BasicStroke, Graphics2D} import java.awt.geom.Line2D import eu.ace_design.island.map.resources.Biome import eu.ace_design.island.map.{RiverFlow, HasForBiome, IslandMap} import eu.ace_design.island.stdlib.{Colors, Biomes} import Colors._ /** * the BiomeV...
ace-design/island
engine/src/main/scala/eu/ace_design/island/viewer/svg/BiomeViewer.scala
Scala
lgpl-3.0
1,843
package com.textteaser.summarizer import org.scalatest.{BeforeAndAfter, FunSuite} import net.codingwell.scalaguice.InjectorExtensions.ScalaInjector import com.google.inject.Guice class ParserSuite extends FunSuite with BeforeAndAfter { val guice = new ScalaInjector(Guice.createInjector(new GuiceModule(new Config))...
ahmadassaf/Text-Teaser
src/test/scala/com/textteaser/summarizer/ParserSuite.scala
Scala
mit
8,363
/* * Copyright 2010-2011 Vilius Normantas <code@norma.lt> * * This file is part of Crossbow library. * * Crossbow 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 ...
ViliusN/Crossbow
crossbow-core/test/lt/norma/crossbow/indicators/SignalTest.scala
Scala
gpl-3.0
2,901
package se.lu.nateko.cp.meta.core.data import spray.json._ import scala.util.Try import scala.util.Failure import scala.util.Success import scala.util.control.NoStackTrace object GeoJson { class FormatException(msg: String) extends IllegalArgumentException(msg) with NoStackTrace def fromFeatureWithLabels(f: GeoFe...
ICOS-Carbon-Portal/meta
core/src/main/scala/se/lu/nateko/cp/meta/core/data/GeoJson.scala
Scala
gpl-3.0
6,227
/* * 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 ...
pperalta/ignite
modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
Scala
apache-2.0
38,148
package rpgboss.editor.resourceselector import scala.swing._ import rpgboss.editor._ import rpgboss.model.resource._ import rpgboss.model._ import scala.swing.event.MouseClicked import scala.swing.event.EditDone import com.typesafe.scalalogging.slf4j.LazyLogging import rpgboss.editor.misc.MapLocPanel import rpgboss.ed...
toastythought/rpgboss
editor/src/main/scala/rpgboss/editor/resourceselector/ResourceField.scala
Scala
agpl-3.0
7,235
/* * Copyright 2016 Nikolay Donets * * 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 ...
nikdon/telepooz
src/main/scala/com/github/nikdon/telepooz/model/methods/SendVoice.scala
Scala
apache-2.0
2,550
package vexriscv.plugin import spinal.core._ import spinal.lib._ import vexriscv._ class NoPipeliningPlugin() extends Plugin[VexRiscv] { override def setup(pipeline: VexRiscv): Unit = { import pipeline.config._ val decoderService = pipeline.service(classOf[DecoderService]) decoderService.addDefault(HA...
SpinalHDL/VexRiscv
src/main/scala/vexriscv/plugin/NoPipeliningPlugin.scala
Scala
mit
757
package org.gc.scala.learningscala.db.postgres.jdbc import java.sql.{Connection, DriverManager, ResultSet}; /** * Created by gchand on 1/11/2016. */ object Sample { def main(args: Array[String]) { // Database Config val connectionUrl = "jdbc:postgresql://localhost:5432/scala?user=postgres&password=gw" ...
ganeshchand/learning-scala
src/main/scala-2.11/org/gc/scala/learningscala/db/postgres/jdbc/Sample.scala
Scala
mit
1,385
package nl.gideondk.raiku import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent._ import scala.concurrent.duration._ class BucketSpec extends RaikuSpec { import nl.gideondk.raiku.TestModels._ val bucket = RaikuBucket.default[Z]("raiku_test_z_bucket", client) Await.result(bucket.se...
gideondk/Raiku
src/test/scala/nl/gideondk/raiku/BucketSpec.scala
Scala
apache-2.0
3,506
package dokutoku.golden_thumb.mod import scala.collection.mutable.ListBuffer import dokutoku.golden_thumb.seed.traits.GoldenSeed import forestry.api.recipes.RecipeManagers import net.minecraft.item.ItemStack import net.minecraftforge.liquids.LiquidStack import thermalexpansion.api.crafting.CraftingManagers import doku...
AtomFusion/GoldenThumb
dokutoku/golden_thumb/mod/Integration.scala
Scala
mit
1,773
package org.saddle.vec import org.saddle.stats._ import org.saddle.Vec /** * Enrich Vec with stats */ trait VecStatsImplicits { type Vec2Stats[A] = Vec[A] => VecStats[A] implicit def vecToIntStats(s: Vec[Int]): VecStats[Int] = new IntStats(s) implicit def vecToLongStats(s: Vec[Long]): VecStats[Long] = new Lo...
saddle/saddle
saddle-core/src/main/scala/org/saddle/vec/VecStatsImplicits.scala
Scala
apache-2.0
1,045
package org.jetbrains.plugins.scala package annotator import org.intellij.lang.annotations.Language import org.jetbrains.plugins.scala.base.SimpleTestCase import org.jetbrains.plugins.scala.extensions._ import org.jetbrains.plugins.scala.lang.psi.api.ScalaFile import org.jetbrains.plugins.scala.lang.psi.api.statements...
LPTK/intellij-scala
test/org/jetbrains/plugins/scala/annotator/FunctionAnnotatorTest.scala
Scala
apache-2.0
9,743
package org.bizzle.plugin.ghosthost import java.{ io, net }, io.IOException, net.URL import sbt.{ Classpaths, Compile, ModuleID, UpdateReport } class ModuleSpec(val moduleID: ModuleID, paths: Seq[String]) { private[ghosthost] def getPathMappings: Map[String, String] = { import moduleID.{ name => l...
TheBizzle/Ghost-Host
src/main/scala/org/bizzle/plugin/ghosthost/ModuleSpec.scala
Scala
bsd-3-clause
1,481
package im.actor.server.api.rpc.service import akka.contrib.pattern.DistributedPubSubMediator import akka.testkit.TestProbe import com.google.protobuf.CodedInputStream import im.actor.api.rpc.Implicits._ import im.actor.api.rpc._ import im.actor.api.rpc.counters.UpdateCountersChanged import im.actor.api.rpc.files.File...
chenbk85/actor-platform
actor-server/actor-tests/src/test/scala/im/actor/server/api/rpc/service/MessagingServiceSpec.scala
Scala
mit
12,808
package rpn import scala.annotation.tailrec object Rpn { def main(args: Array[String]) { println(rpn("35 1 2 + 4 x+13 −random comment2*5%")) // prints 3 } def rpn(s: String) = { val parse = rpnParse(s) rpnSolve(parse) } def rpnParse(s: String) = { @tailrec def rpnParse_rec(s: List[Char...
HiinoFW/stuff
scala/rpn/Rpn.scala
Scala
mit
2,143
package vectors4s.base /** * vectors4s * Created by oruebenacker on 5/11/17. */ trait AbstractVector[I, V <: AbstractVector[I, V]] { def indices: Iterable[I] def apply(index: I): Double def *(a: Double): V def /(a: Double): V = *(1.0 / a) def unary_- : V = *(-1.0) def +(o: V): V def -(o: V):...
curoli/vectors4s
src/main/scala/vectors4s/base/AbstractVector.scala
Scala
mit
509
package pl.touk.nussknacker.engine.management.sample.transformer import pl.touk.nussknacker.engine.api.{CustomStreamTransformer, LazyParameter, MethodToInvoke, ParamName} case object NoneReturnTypeTransformer extends CustomStreamTransformer { @MethodToInvoke(returnType = classOf[Void]) def execute(@ParamName("exp...
TouK/nussknacker
engine/flink/management/dev-model/src/main/scala/pl/touk/nussknacker/engine/management/sample/transformer/NoneReturnTypeTransformer.scala
Scala
apache-2.0
389
// Databricks notebook source // MAGIC %md // MAGIC # [SDS-2.2-360-in-525-01: Intro to Apache Spark for data Scientists](https://lamastex.github.io/scalable-data-science/360-in-525/2018/01/) // MAGIC ### [SDS-2.2, Scalable Data Science](https://lamastex.github.io/scalable-data-science/sds/2/2/) // COMMAND ---------- ...
lamastex/scalable-data-science
db/2/2/360-in-525-01/001_whySpark.scala
Scala
unlicense
11,913
package java.nio import scala.scalajs.js.typedarray._ private[nio] final class TypedArrayIntBuffer private ( override private[nio] val _typedArray: Int32Array, _initialPosition: Int, _initialLimit: Int, _readOnly: Boolean) extends IntBuffer(_typedArray.length, null, -1) { position(_initialPosition) l...
jmnarloch/scala-js
javalib/src/main/scala/java/nio/TypedArrayIntBuffer.scala
Scala
bsd-3-clause
3,333
object Test extends App { // First make sure specific types are preserved val tmp: Vector[Int] = Vector(Vector(1,2), Vector(3,4)).view.flatten.force // Now make sure we really get a view val seq = Seq(Seq(1, 2), Seq(3, 4)).view.flatten Console.println(seq.isInstanceOf[collection.SeqView[_,_]]) }
felixmulder/scala
test/files/run/t5201.scala
Scala
bsd-3-clause
308
package au.com.onegeek.respite import org.scalatest._ abstract class AcceptanceSpec extends WordSpec with Matchers with BeforeAndAfter
mefellows/respite
respite-core/src/test/scala/au/com/onegeek/respite/AcceptanceSpec.scala
Scala
mit
136
/* * 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 ...
map222/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercionSuite.scala
Scala
apache-2.0
50,053
package Tutorial import Chisel._ import Node._ import Literal._ import scala.collection.mutable.HashMap import scala.collection.mutable.ArrayBuffer class IncThroughOffloadgComponent extends gComponentLeaf (() => UFix(width = 32)) (() => UFix(width = 32)) (ArrayBuffer(("constOff", () => UFix(width = 32), () => UFix(wi...
seyedmaysamlavasani/GorillaPP
chisel/Gorilla++/backup/Offloaded.scala
Scala
bsd-3-clause
6,380
package gitbucket.core.service import gitbucket.core.model.WebHook import org.scalatest.FunSuite import gitbucket.core.model.WebHookContentType class WebHookServiceSpec extends FunSuite with ServiceSpecBase { lazy val service = new WebHookPullRequestService with AccountService with RepositoryService with PullReque...
nobusugi246/gitbucket
src/test/scala/gitbucket/core/service/WebHookServiceSpec.scala
Scala
apache-2.0
5,769
package org.oxygen.redio.runtime import net.minecraft.util.BlockPos import net.minecraft.world.IBlockAccess import scala.collection.immutable.HashSet trait PacketNode { def isAcceptable(world: IBlockAccess, pos: BlockPos, target: String): Boolean def acceptPacket(world: IBlockAccess, pos: BlockPos, source: String,...
chenzhuoyu/RedIO
src/main/scala/org/oxygen/redio/runtime/PacketNode.scala
Scala
lgpl-2.1
1,391
package rere.ql.options import rere.ql.queries.Func import rere.ql.typeclasses.Transmuter import rere.ql.types.{ReqlArray, ReqlDatum} trait EmitOptions { sealed trait EmitOptions[R <: ReqlDatum, Base <: ReqlDatum] extends ComposableOptions // usually compiler can't infer this types and they should be specified ...
pbaun/rere
modules/ql/src/main/scala/rere/ql/options/EmitOptions.scala
Scala
apache-2.0
1,207
package be.studiocredo.account import java.io.File import java.security.MessageDigest import java.text.{DecimalFormat, DecimalFormatSymbols} import be.studiocredo.util.Money import models.entities.{PaymentEdit, PaymentType} import org.joda.time.DateTime import org.joda.time.format.DateTimeFormat import scala.collect...
studiocredo/ticket-reservation
app/be/studiocredo/account/AXATransactionImporter.scala
Scala
apache-2.0
3,950
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
pncampbell/ct-calculations
src/test/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/AC59Spec.scala
Scala
apache-2.0
1,001
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
liquidarmour/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v3/retriever/AboutThisReturnBoxRetriever.scala
Scala
apache-2.0
2,436
package lifted import scala.virtualization.lms.common._ import scala.virtualization.lms.internal.ScalaCompile import scala.virtualization.lms.util.OverloadHack import ch.epfl.yinyang.api._ import scala.tools.nsc._ import scala.tools.nsc.util._ import scala.tools.nsc.reporters._ import scala.tools.nsc.io._ import scala...
vjovanov/scala-yinyang
components/delite-test/src/lifted/ScalaPkgTest.scala
Scala
bsd-3-clause
5,066
/* * 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 ...
ddna1021/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/DataSourceScanExec.scala
Scala
apache-2.0
20,095
package xyz.hyperreal.prolog import xyz.hyperreal.bvm.VM import xyz.hyperreal.char_reader.CharReader import scala.collection.mutable object Compilation { var debug = false val reserved = Set( indicator("true", 0), indicator("fail", 0), indicator("false", 0), indicator("repeat", 0), ...
edadma/funl
prolog/src/main/scala/xyz/hyperreal/prolog/Compilation.scala
Scala
mit
30,318
object Test { def main(args: Array[String]) = { val is = List(1,2,3) is match { case List(1, _*} => // error: pattern expected } } } // error: eof expected, but '}' found
dotty-staging/dotty
tests/neg/t5702-neg-bad-brace.scala
Scala
apache-2.0
196
package edu.gemini.qv.plugin.chart.ui import java.awt.Color import javax.swing.UIManager import edu.gemini.qv.plugin.chart.Axis import edu.gemini.qv.plugin.filter.core._ import edu.gemini.qv.plugin.filter.ui.CategoriesFilter import edu.gemini.qv.plugin.filter.ui.FilterElement.FilterElementChanged2 import edu.gemini.q...
arturog8m/ocs
bundle/edu.gemini.qv.plugin/src/main/scala/edu/gemini/qv/plugin/chart/ui/AxisEditor.scala
Scala
bsd-3-clause
6,535
/* * Copyright 2016 The BigDL Authors. * * 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...
intel-analytics/BigDL
scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/utils/tf/loaders/Fill.scala
Scala
apache-2.0
1,206
/** * (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...
kijiproject/kiji-express
kiji-express-tools/src/test/scala/org/kiji/express/repl/KijiPipeToolSuite.scala
Scala
apache-2.0
5,194
/* * Copyright 2012-2015 Comcast Cable Communications Management, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless re...
ipapa/money
money-core/src/test/scala/com/comcast/money/logging/TraceLoggingSpec.scala
Scala
apache-2.0
1,680
package wandou.math.indicator import java.awt.Color /** * * @author Caoyuan Deng */ trait Plottable { def plot: Plot def getColor(idx: Int): Color def setColor(idx: Int, color: Color) def layer: Int def layer_=(order: Int) }
wandoulabs/wandou-math
wandou-math/src/main/scala/wandou/math/indicator/Plottable.scala
Scala
apache-2.0
244
package net.gumbix.bioinf.string.alignment import net.gumbix.bioinf.phylo.{JoinedTaxon, NeighborJoiningMetric, NeighborJoiningTree, Taxon} import scala.collection.mutable import scala.collection.mutable.ArrayBuffer /** * Implementation of a variant of the CLUSTAL algorithm. * @author Markus Gumbel (m.gumbel@hs-m...
markusgumbel/scalabioalg
core/src/main/scala/net/gumbix/bioinf/string/alignment/Clustal.scala
Scala
apache-2.0
3,630
/* * Part of NDLA article-api. * Copyright (C) 2016 NDLA * * See LICENSE * */ package no.ndla.articleapi.model.api import org.scalatra.swagger.annotations.{ApiModel, ApiModelProperty} import scala.annotation.meta.field @ApiModel(description = "Description of the tags of the article") case class ArticleTag(@(Ap...
NDLANO/article-api
src/main/scala/no/ndla/articleapi/model/api/ArticleTag.scala
Scala
gpl-3.0
564
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j 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 Foundatio...
HuangLS/neo4j
community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/spi/v2_3/HardcodedGraphStatistics.scala
Scala
apache-2.0
1,067
package scalarules.test.junit import org.junit.Test class SomeHelpreForTest class SingleTestSoTargetWillNotFailDueToNoTestsTest { @Test def someTest: Unit = println("passing") }
bazelbuild/rules_scala
test/src/main/scala/scalarules/test/junit/JunitNoTests.scala
Scala
apache-2.0
189
package es.weso.rdf.nodes trait Literal extends RDFNode { def dataType: IRI def isLangLiteral: Boolean def hasLang(lang: Lang): Boolean override def getLexicalForm: String } case class DatatypeLiteral(lexicalForm: String, dataType: IRI) extends Literal { override def isLangLiteral = false override def ha...
labra/SRDF
srdf/shared/src/main/scala/es/weso/rdf/nodes/Literal.scala
Scala
mit
3,836
package views.html package game import lila.api.Context import lila.app.templating.Environment._ import lila.app.ui.ScalatagsTemplate._ import controllers.routes object importGame { private def analyseHelp(implicit ctx: Context) = ctx.isAnon option a(cls := "blue", href := routes.Auth.signup)(trans.youNeedAnA...
luanlv/lila
app/views/game/importGame.scala
Scala
mit
1,935
package debop4s.core.utils import java.io._ import java.nio.charset.Charset import debop4s.core._ import org.slf4j.LoggerFactory import scala.annotation.tailrec /** * debop4s.core.tools.Streams * @author 배성혁 sunghyouk.bae@gmail.com * @since 2013. 12. 9. 오후 11:00 */ object Streams { private[this] lazy val lo...
debop/debop4s
debop4s-core/src/main/scala/debop4s/core/utils/Streams.scala
Scala
apache-2.0
2,207
/* * 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 ...
ueshin/apache-flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/sources/CsvTableSourceFactoryBase.scala
Scala
apache-2.0
4,830
package com.outr.arango.api.model import io.circe.Json case class GeneralGraphEdgeModifyHttpExamplesRc200(error: Boolean, code: Option[Int] = None, edge: Option[EdgeRepresentation] = None, ...
outr/arangodb-scala
api/src/main/scala/com/outr/arango/api/model/GeneralGraphEdgeModifyHttpExamplesRc200.scala
Scala
mit
477
package src.main.scala.utils.conversion object ConvertTimeToSeconds { /* * method: convertTimeStrToSeconds * * Converts a string of the form: * * H:m:s * * where 'H', 'm', and 's' are numbers representing hours, minutes, * and seconds respectively, but they can be over the normal range ...
je-nunez/urban_planning_on_gtfs_traffic_congestion
src/main/scala/utils/conversion/ConvertTimeToSeconds.scala
Scala
gpl-2.0
1,173
package sparkutil import org.apache.spark.rdd.RDD import org.apache.spark.{SparkConf, SparkContext} /** * Spark工具类 * Created by Administrator on 2016/12/15. */ object Util { def conf: SparkConf = { System.setProperty("hadoop.home.dir", "D:/Program Files/hadoop_winutils") System.setProperty...
monsonlee/BigData
Project6_SparkBasic5个小问题/sparkutil/Util.scala
Scala
gpl-3.0
1,064
package scala.meta import junit.framework.Test import org.jetbrains.plugins.scala.DependencyManagerBase._ import org.jetbrains.plugins.scala.{LatestScalaVersions, ScalaVersion} import org.jetbrains.plugins.scala.base.ScalaSdkOwner import org.jetbrains.plugins.scala.base.libraryLoaders.{IvyManagedLoader, LibraryLoader,...
JetBrains/intellij-scala
scala/scala-impl/test/scala/meta/ScalaMetaTestBase.scala
Scala
apache-2.0
869
package actors import akka.actor._ import play.api.libs.json._ import play.api.mvc.RequestHeader import json._ import models.PLM import models.User import log.PLMLogger import spies._ import plm.core.model.lesson.Exercise import plm.core.model.lesson.Lesson import plm.core.model.lesson.Lecture import plm.core.lang.Pro...
BaptisteMounier/webPLM
app/actors/PLMActor.scala
Scala
agpl-3.0
9,385
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
pgandhi999/spark
sql/hive/src/test/scala/org/apache/spark/sql/hive/ClasspathDependenciesSuite.scala
Scala
apache-2.0
3,198
package katas.scala.doors import org.junit.Test import org.scalatest.Matchers class Doors13 extends Matchers { @Test def `walking doors`() { val amount = 10 val steps = Range.inclusive(1, amount).flatMap { stepSize => Range(stepSize - 1, amount, stepSize) } val doors = steps.groupBy{ it => it }.toList.so...
dkandalov/katas
scala/src/katas/scala/doors/Doors13.scala
Scala
unlicense
470
/* Copyright 2009-2021 EPFL, Lausanne */ package stainless package extraction package methods trait Trees extends throwing.Trees { self => override protected def unapplyScrut(scrut: Expr, up: UnapplyPattern)(using s: Symbols): Expr = if (s.lookupFunction(up.id).exists(_.flags.exists { case IsMethodOf(_) => tru...
epfl-lara/stainless
core/src/main/scala/stainless/extraction/methods/Trees.scala
Scala
apache-2.0
18,491
sealed class Foo class Test { def f = { class Bar extends Foo } class C { class Bar extends Foo } object O { class Bar extends Foo } }
som-snytt/dotty
tests/pos/i3149.scala
Scala
apache-2.0
161
/* * Copyright 2015 - 2017 Pablo Alcaraz * Mysql to Postgres converter * * 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...
pabloa/mysql2postgresql
src/test/scala/com/github/mysql2postgresql/converter/writer/TestWriterStep.scala
Scala
apache-2.0
2,763
package suggestions package gui import scala.collection.mutable.ListBuffer import scala.collection.JavaConverters._ import scala.concurrent._ import scala.concurrent.ExecutionContext.Implicits.global import scala.swing._ import scala.util.{ Try, Success, Failure } import scala.swing.event._ import swing.Swing._ import...
4DD8A19D69F5324F9D49D17EF78BBBCC/Princip_les_of_Rea_ctive_Progra_mming
suggestions/src/main/scala/suggestions/gui/WikipediaSuggest.scala
Scala
mit
4,699
object CopyInv { case class Foo(x: BigInt) { require(x > 0) } def prop(foo: Foo, y: BigInt) = { require(y > 1) foo.copy(x = y) } }
epfl-lara/stainless
frontends/benchmarks/verification/valid/MicroTests/CopyInv.scala
Scala
apache-2.0
155
package org.refptr.iscala package widgets sealed trait BorderStyle extends EnumType with SnakeCase @enum object BorderStyle extends Enumerated[BorderStyle] { case object None extends BorderStyle case object Hidden extends BorderStyle case object Dotted extends BorderStyle case object Dashed extends Bor...
nkhuyu/IScala
lib/src/main/scala/Enums.scala
Scala
mit
3,209
package screact.swing import scutil.lang.* import scutil.gui.SwingUtil.* import screact.* import screact.extra.Blocker /** used to connect Swing widgets to the reactive world */ object SwingWidget { /** simply emit events from some Connectable */ def events[T](connect:Effect[T]=>Disposer):Events[T] = { require(i...
ritschwumm/screact
src/main/scala/screact/swing/SwingWidget.scala
Scala
bsd-2-clause
2,279
package controllers import scala.language.higherKinds import play.api.i18n.I18nSupport import play.api.mvc._ import controllers.sugar.Requests.{AuthRequest, AuthedProjectRequest, OreRequest} import controllers.sugar.{Actions, Requests} import ore.db.Model import ore.db.access.ModelView import ore.db.impl.OrePostgres...
SpongePowered/Ore
orePlayCommon/app/controllers/OreBaseController.scala
Scala
mit
6,465
import playground.X def test(x: Int) = X.power(x, 2)
dotty-staging/dotty
tests/pos-macros/i8208/Test_2.scala
Scala
apache-2.0
53
/* * Copyright 2011 Hui Wen Han, 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 agre...
huiwenhan/PrefStore
src/main/scala/me/huiwen/prefz/ForwardingManager.scala
Scala
apache-2.0
1,143
/* * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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 b...
hpe-cct/cct-core
src/test/scala/cogx/cogmath/circuit/CircuitSpec.scala
Scala
apache-2.0
5,339
/* * Copyright 2012-2014 Comcast Cable Communications Management, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unl...
mattinger/sirius
src/main/scala/com/comcast/xfinity/sirius/api/impl/bridge/PaxosStateBridge.scala
Scala
apache-2.0
7,607
package sylvestris.core import cats.implicits._ import org.scalacheck._, Prop._, Shapeless._ import spray.json._, DefaultJsonProtocol._ import sylvestris.core._, Graph._, Relationship._ import sylvestris.core.fixtures._, model._ //TODO make this a trait and use the withgraph business... @SuppressWarnings(Array( "or...
janrain/sylvestris
core/src/test/scala/sylvestris/core/NodeOpsTest.scala
Scala
mit
4,111
/** * Copyright (C) 2013 Carnegie Mellon University * * 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 appl...
twmarshall/tdb
core/src/main/scala/tdb/list/PartitionedDoubleChunkList.scala
Scala
apache-2.0
6,483
/* ,i::, :;;;;;;; ;:,,::;. 1ft1;::;1tL t1;::;1, :;::; _____ __ ___ __ fCLff ;:: tfLLC / ___/ / |/ /____ _ _____ / /_ CLft11 :,, i1tffLi \\__ \\ ____ / /|_/ ...
S-Mach/s_mach.datadiff
datadiff-core/src/main/scala/s_mach/datadiff/DataDiff.scala
Scala
mit
2,526
package cz.augi.gsonscala import java.lang.reflect.ParameterizedType import com.google.gson.reflect.TypeToken import com.google.gson.stream.{JsonReader, JsonWriter} import com.google.gson.{Gson, TypeAdapter, TypeAdapterFactory} object OptionTypeAdapterFactory extends TypeAdapterFactory { override def create[T](gso...
augi/gson-scala
src/main/scala/cz/augi/gsonscala/OptionTypeAdapter.scala
Scala
mit
1,159
package org.embulk.parser.xpath2 import com.ximpleware.VTDNav object VTD { final def withinContext[A](nav: VTDNav)(f: => A): A = try { nav.push() f } finally nav.pop() }
maji-KY/embulk-parser-xpath2
src/main/scala/org/embulk/parser/xpath2/VTD.scala
Scala
gpl-2.0
186
package org.openurp.edu.teach.ws.code import org.beangle.data.jpa.dao.OqlBuilder import org.beangle.data.model.dao.EntityDao import org.beangle.webmvc.api.annotation.response import org.openurp.code.BaseCode import org.beangle.data.model.Entity import org.beangle.commons.http.accept.ContentNegotiationManager import or...
openurp/edu-core
grade/ws/src/main/scala/org/openurp/edu/teach/ws/code/AbstractWS.scala
Scala
gpl-3.0
826
/* ,i::, :;;;;;;; ;:,,::;. 1ft1;::;1tL t1;::;1, :;::; _____ __ ___ __ fCLff ;:: tfLLC / ___/ / |/ /____ _ _____ / /_ CLft11 :,, i1tffLi \\__ \\ ____ / /|_/ ...
S-Mach/s_mach.datadiff
datadiff/src/main/scala/s_mach/datadiff/impl/OptionDataDiffImpl.scala
Scala
mit
2,660
/* Copyright (c) 2015 Andrée Ekroth. * Distributed under the MIT License (MIT). * See accompanying file LICENSE or copy at * http://opensource.org/licenses/MIT */ package com.github.ekroth package songkick /** Objects corresponding to Songkick's object model. */ trait Objects { import scala.collection.immuta...
ekroth/play-songkick
src/main/scala/com/github/ekroth/songkick/Objects.scala
Scala
mit
3,246
package wom.types import wom.WomExpressionException import wom.values.WomValue import scala.runtime.ScalaRunTime import scala.util.{Failure, Success, Try} class WomTypeException(message: String) extends RuntimeException(message) trait WomType { /** * Method to be overridden by implementation classes defining ...
ohsu-comp-bio/cromwell
wom/src/main/scala/wom/types/WomType.scala
Scala
bsd-3-clause
4,263
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
Intel-bigdata/OAP
oap-native-sql/core/src/main/scala/com/intel/oap/execution/ColumnarDataSourceRDD.scala
Scala
apache-2.0
4,738
/* * Copyright 2016 LinkedIn Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
shankar37/dr-elephant
app/org/apache/spark/deploy/history/SparkFSFetcher.scala
Scala
apache-2.0
5,121
// the type Function1[A,B] // can be written as A => B object ArrayUtils { def filter(xs: Array[Int], pred: Int => Boolean): Array[Int] = ??? }
agconti/scala-school
04-functions-as-values/slides/slide034.scala
Scala
mit
151
package scala package reflect package api import scala.collection.immutable.ListMap /** * <span class="badge badge-red" style="float: right;">EXPERIMENTAL</span> * * This trait provides annotation support for the reflection API. * * In Scala, annotations belong to one of the two categories: * * <ul> * <l...
felixmulder/scala
src/reflect/scala/reflect/api/Annotations.scala
Scala
bsd-3-clause
9,188
package ml.sparkling.graph.examples import java.io.File import org.apache.log4j.Logger import org.apache.spark.rdd.RDD import org.apache.spark.storage.StorageLevel import org.apache.spark.{SparkConf, SparkContext} /** * Created by Roman Bartusiak (roman.bartusiak@pwr.edu.pl http://riomus.github.io). */ object Mat...
sparkling-graph/sparkling-graph
examples/src/main/scala/ml/sparkling/graph/examples/MatrixCreator.scala
Scala
bsd-2-clause
5,352
/* * Copyright © 2015 Lukas Rosenthaler, Benjamin Geer, Ivan Subotic, * Tobias Schweizer, André Kilchenmann, and Sepideh Alassi. * * This file is part of Knora. * * Knora 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 F...
nie-ine/Knora
webapi/src/main/scala/org/knora/webapi/Jsonable.scala
Scala
agpl-3.0
1,132
package edu.gemini.pit.ui.editor import edu.gemini.model.p1.immutable._ import swing._ import edu.gemini.pit.ui.util.BooleanToolPreference._ import edu.gemini.pit.ui.robot.CatalogRobot import edu.gemini.pit.model.Model import edu.gemini.pit.catalog._ import java.awt import awt.Color import edu.gemini.pit.ui.util._ imp...
arturog8m/ocs
bundle/edu.gemini.pit/src/main/scala/edu/gemini/pit/ui/editor/SynchronousLookup.scala
Scala
bsd-3-clause
3,899
package parsers.generic import org.jsoup.Jsoup import org.jsoup.nodes.Document import org.jsoup.nodes.Element import scala.collection.JavaConversions._ import java.net.URL import java.io.InputStream import parsers.base.TableParser class HTMLTableParser(url: String, tableExpression: String, rowExpression: String, col...
maxmouchet/vamk-timetables
parsers/src/main/scala/parsers/generic/HTMLTableParser.scala
Scala
mit
1,848