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 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
test/pagespecs/YouNeedToRequestAccessToSelfAssessmentPageSpec.scala
Scala
apache-2.0
3,632
import scala.io.Source import scala.util.control.Breaks._ object IODemo{ def main(args: Array[String]){ val fileName="./test.txt" readAndPrint(fileName) //读文件 /*单个字符处理 val source = Source.fromFile(fileName) for(c <- source) println(c) */ ...
PengLiangWang/Scala
IO/IODemo.scala
Scala
gpl-3.0
1,406
package im.actor.server.stickers import im.actor.serialization.ActorSerializer import im.actor.server.sticker.{ Sticker, StickerImage } object StickerMessages { def register(): Unit = ActorSerializer.register( 100001 → classOf[Sticker], 100002 → classOf[StickerImage] ) }
EaglesoftZJ/actor-platform
actor-server/actor-core/src/main/scala/im/actor/server/stickers/StickerMessages.scala
Scala
agpl-3.0
300
/* * Copyright 2015 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...
scottcutts/crypto
src/test/scala/uk/gov/hmrc/crypto/CryptoGCMWithKeysFromConfigSpec.scala
Scala
apache-2.0
10,011
package spire package std import spire.algebra.{EuclideanRing, IsIntegral, NRoot, Order, Signed} import spire.math.BitString trait ByteIsEuclideanRing extends EuclideanRing[Byte] { override def minus(a:Byte, b:Byte): Byte = (a - b).toByte def negate(a:Byte): Byte = (-a).toByte def one: Byte = 1.toByte def plu...
tixxit/spire
core/shared/src/main/scala/spire/std/byte.scala
Scala
mit
3,817
/* * Copyright 2013 Maurício Linhares * * Maurício Linhares licenses this file to you 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 ...
outbrain/postgresql-async
db-async-common/src/main/scala/com/github/mauricio/async/db/exceptions/UnknownLengthException.scala
Scala
apache-2.0
807
package mesosphere.marathon.api.v2.json import java.lang.{ Double => JDouble, Integer => JInt } import com.fasterxml.jackson.annotation.{ JsonIgnoreProperties, JsonProperty } import mesosphere.marathon.Protos.Constraint import mesosphere.marathon.api.validation.FieldConstraints._ import mesosphere.marathon.api.valida...
HardikDR/marathon
src/main/scala/mesosphere/marathon/api/v2/json/V2AppDefinition.scala
Scala
apache-2.0
7,452
package core.formatter.geo import com.fasterxml.jackson.core.JsonGenerator import com.fasterxml.jackson.databind.{ JsonSerializer, SerializerProvider } import com.lvxingpai.model.marketplace.seller.Seller import core.model.misc.GeoCommodity import scala.collection.JavaConversions._ /** * Created by pengyt on 2015/11...
Lvxingpai/Hanse
app/core/formatter/geo/GeoCommoditySerializer.scala
Scala
apache-2.0
903
/* * This software is licensed under the GNU Affero General Public License, quoted below. * * This file is a part of PowerAPI. * * Copyright (C) 2011-2016 Inria, University of Lille 1. * * PowerAPI is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public Lice...
Spirals-Team/powerapi
powerapi-core/src/test/scala/org/powerapi/module/libpfm/LibpfmCoreSensorSuite.scala
Scala
agpl-3.0
5,110
/* sbt -- Simple Build Tool * Copyright 2010 Mark Harrah */ package sbt import sbt.util.Level import sbt.internal.util.complete.HistoryCommands import scala.annotation.tailrec import java.io.File import sbt.io.Path._ object BasicCommandStrings { val HelpCommand = "help" val CompletionsCommand = "completions" ...
mdedetrich/sbt
main/command/src/main/scala/sbt/BasicCommandStrings.scala
Scala
bsd-3-clause
7,139
package se.lu.nateko.cp.meta.services.sparql.magic.fusion import org.eclipse.rdf4j.model.IRI import org.eclipse.rdf4j.model.Literal import org.eclipse.rdf4j.model.Value import org.eclipse.rdf4j.query.algebra.BindingSetAssignment import org.eclipse.rdf4j.query.algebra.Exists import org.eclipse.rdf4j.query.algebra.Exten...
ICOS-Carbon-Portal/meta
src/main/scala/se/lu/nateko/cp/meta/services/sparql/magic/fusion/DofPatternFusion.scala
Scala
gpl-3.0
10,337
package wdl import scala.util.{Failure, Success, Try} class NamespaceSpec extends WdlTest { "WdlNamespace" should { "enforce optional output types" in { val namespace = Try(loadWdl("type_checks.wdl")) namespace match { case Failure(f) => f.getMessage should startWith("ERROR: oopsNotOptiona...
ohsu-comp-bio/cromwell
wdl/src/test/scala/wdl/NamespaceSpec.scala
Scala
bsd-3-clause
495
// Copyright (c) 2013, Johns Hopkins University. All rights reserved. // This software is released under the 2-clause BSD license. // See /LICENSE.txt // Travis Wolfe, [email protected], 30 July 2013 package edu.jhu.hlt.parma.inference.topics import org.apache.commons.math3.special.Gamma import scala.collection.mut...
hltcoe/parma
src/main/scala/edu/jhu/hlt/parma/inference/topics/LDATrainer.scala
Scala
bsd-2-clause
5,064
/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2010 Travis Brown, The University of Texas at Austin // // 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 ...
utcompling/fieldspring
src/test/scala/opennlp/fieldspring/topo/Coordinate.scala
Scala
apache-2.0
1,842
/* Copyright 2009-2011 Jay Conrod * * This file is part of Tungsten. * * Tungsten 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 of * the License, or (at your option) any late...
jayconrod/tungsten
llvm/src/main/scala/tungsten/llvm/PhiAnalysis.scala
Scala
gpl-2.0
8,581
package com.meteorcode.pathway import scala.concurrent.Future /** * ==Pathway Graphics== * * Created by hawk on 9/21/15. */ package object graphics { /** * Creates a new [[GraphicsContext]] * @return a [[Future]] on a [[GraphicsContext]] */ def createGraphicsContext: Future[GraphicsContext] = ??...
MeteorCode/Pathway
src/main/scala/com/meteorcode/pathway/graphics/package.scala
Scala
mit
346
/** * 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...
MyPureCloud/kafka
core/src/test/scala/unit/kafka/admin/DeleteTopicTest.scala
Scala
apache-2.0
14,875
/* * Copyright (c) 2014-2020 by The Monix Project Developers. * See the project homepage at: https://monix.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...
alexandru/monifu
monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/DoOnNextAckOperator.scala
Scala
apache-2.0
2,292
package jp.co.bizreach.kinesisfirehose.action import com.amazonaws.services.kinesisfirehose.model.ServiceUnavailableException import jp.co.bizreach.kinesisfirehose._ import org.scalatest._ class PutRecordActionSpec extends FunSuite { private def fixture = new { var retryCount = 0 } with PutRecordAction { ...
bizreach/aws-kinesis-scala
core/src/test/scala/jp/co/bizreach/kinesisfirehose/action/PutRecordActionSpec.scala
Scala
apache-2.0
2,308
package repositories.onlinetesting import java.util.UUID import connectors.launchpadgateway.exchangeobjects.in.{ SetupProcessCallbackRequest, ViewPracticeQuestionCallbackRequest } import model.ProgressStatuses.{ PHASE3_TESTS_PASSED_WITH_AMBER, _ } import model.persisted.phase3tests.{ LaunchpadTest, LaunchpadTestCallb...
hmrc/fset-faststream
it/repositories/onlinetesting/Phase3TestRepositorySpec.scala
Scala
apache-2.0
19,600
/* * 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 ...
pronix/spark
core/src/main/scala/org/apache/spark/api/r/RBackendHandler.scala
Scala
apache-2.0
9,684
import leon.lang._ import leon.annotation._ object PropositionalLogic { sealed abstract class Formula case class And(lhs: Formula, rhs: Formula) extends Formula case class Or(lhs: Formula, rhs: Formula) extends Formula case class Implies(lhs: Formula, rhs: Formula) extends Formula case class Not(f: Formula)...
ericpony/scala-examples
testcases/web/verification/05_Propositional_Logic.scala
Scala
mit
3,062
package view import util.StringUtil import util.ControlUtil._ import util.Directory._ import org.parboiled.common.StringUtils import org.pegdown._ import org.pegdown.ast._ import org.pegdown.LinkRenderer.Rendering import java.text.Normalizer import java.util.Locale import scala.collection.JavaConverters._ import servi...
flyh2004/gitbucket
src/main/scala/view/Markdown.scala
Scala
apache-2.0
5,422
package dawn.flow.trajectory import dawn.flow.spatial._ import dawn.flow._ import breeze.linalg.{norm, DenseVector} import spire.math.Quaternion object MiniFilterIndoor extends FlowApp[Trajectory, TrajInit] { //****** Model ****** val dtIMU = 0.1 val dtVicon = (dtIMU * 5) val N = 100 //filter parameter...
rubenfiszel/scala-flow
drone/src/main/scala/MiniParticleFilter.scala
Scala
mit
1,299
package mesosphere.marathon.metrics import java.util.concurrent.TimeUnit import com.codahale.metrics.{ ExponentiallyDecayingReservoir, MetricRegistry } import com.google.inject.{ AbstractModule, Guice } import com.google.inject.matcher.{ AbstractMatcher, Matchers } import mesosphere.marathon.core.task.tracker.TaskTra...
timcharper/marathon
src/test/scala/mesosphere/marathon/metrics/MetricsTest.scala
Scala
apache-2.0
3,691
/** * 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...
dchenbecker/kafka-sbt
core/src/test/scala/unit/kafka/producer/SyncProducerTest.scala
Scala
apache-2.0
9,460
package scalpel import org.scalameter._ import org.scalameter.utils._ object SMRunner { def computeClasspath = this.getClass.getClassLoader match { case urlcl: java.net.URLClassLoader => extractClasspath(urlcl) case cl => sys.props("java.class.path") } def extractClasspath(urlclassloader: java.net.URLC...
lossyrob/scalpel
src/main/scala/scalpel/SMRunner.scala
Scala
bsd-3-clause
1,886
package dotty.tools package dotc package parsing import org.junit.Test import org.junit.Assert._ import ast.Trees.mods import ast.untpd._ import ast.{ Trees => d } import Parsers.Parser import util.SourceFile import core.Contexts._ import core.Flags object ModifiersParsingTest { given Context = (new ContextBase).i...
dotty-staging/dotty
compiler/test/dotty/tools/dotc/parsing/ModifiersParsingTest.scala
Scala
apache-2.0
4,753
package com.github.ldaniels528.trifecta.io.zookeeper import com.github.ldaniels528.trifecta.messages.codec.MessageDecoder import com.github.ldaniels528.trifecta.messages.codec.avro.AvroDecoder import com.github.ldaniels528.trifecta.messages.{KeyAndMessage, MessageOutputSource} import scala.concurrent.ExecutionContext...
ldaniels528/trifecta
src/main/scala/com/github/ldaniels528/trifecta/io/zookeeper/ZookeeperMessageOutputSource.scala
Scala
apache-2.0
1,429
/* * 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 ...
shuangshuangwang/spark
sql/hive/src/test/scala/org/apache/spark/sql/hive/test/TestHive.scala
Scala
apache-2.0
26,175
package examples import io.gatling.core.Predef._ import io.gatling.http.Predef._ /** * @author <a href="mailto:[email protected]">Marko Strukelj</a> */ class SimpleExample2 extends Simulation { // Create two scenarios // First one called Simple with three steps: // - first perform an HTTP GET // - ...
thomasdarimont/keycloak
testsuite/performance/tests/src/test/scala/examples/SimpleExample2.scala
Scala
apache-2.0
1,132
package ch.ethz.inf.da.tipstersearch import java.io.{File, FileInputStream, InputStream, PrintWriter} import ch.ethz.inf.da.tipstersearch.io.{QueryReader, RelevanceReader, ZipIterator} import ch.ethz.inf.da.tipstersearch.scoring.{RelevanceModel, TfidfModel, LanguageModel} import ch.ethz.inf.da.tipstersearch.util....
rjagerman/TipsterSearch
src/main/scala/Main.scala
Scala
mit
6,256
/* /* * Copyright 2014 DataGenerator Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicabl...
shraddha-patel/DGWithSpark
dg-spark/src/main/code/org/finra/datagenerator/RandomNumberEngine.scala
Scala
apache-2.0
3,001
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
ueshin/apache-spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/FilterPushdownSuite.scala
Scala
apache-2.0
49,425
package org.jetbrains.plugins.scala package base import com.intellij.testFramework.fixtures.{CodeInsightFixtureTestCase, CodeInsightTestFixture} import org.jetbrains.plugins.scala.base.libraryLoaders.{JdkLoader, LibraryLoader, ScalaLibraryLoader} import org.jetbrains.plugins.scala.debugger.DefaultScalaSdkOwner /** ...
loskutov/intellij-scala
test/org/jetbrains/plugins/scala/base/ScalaFixtureTestCase.scala
Scala
apache-2.0
899
/* * 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/core/src/test/scala/org/apache/spark/sql/sources/v2/DataSourceV2Suite.scala
Scala
apache-2.0
10,361
/* * Copyright © 2015-2019 the contributors (see Contributors.md). * * 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 Free Software Foundation, either version 3 of the License, or *...
musicEnfanthen/Knora
webapi/src/test/scala/org/knora/webapi/e2e/v1/PermissionsHandlingV1E2ESpec.scala
Scala
agpl-3.0
5,361
/* * Copyright 2018 Vladimir Konstantinov * * 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 ...
oxy-development/korro
src/main/scala/com/github/illfaku/korro/dto/ws/WsHandshakeRequest.scala
Scala
apache-2.0
1,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 not use this f...
mandar2812/DynaML
dynaml-tensorflow/src/main/scala/io/github/tailhq/dynaml/tensorflow/utils/Utils.scala
Scala
apache-2.0
11,783
/* * Copyright 2016 The SIRIS Project * * 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...
simulator-x/core
src/simx/core/helper/LateContextBinding.scala
Scala
apache-2.0
5,305
package dsmoq.services /** * データセットの属性を表すケースクラス * * @param name 属性名 * @param value 属性値 */ case class DataSetAttribute( name: String, value: String )
nkawa/dsmoq
server/apiServer/src/main/scala/dsmoq/services/DataSetAttribute.scala
Scala
apache-2.0
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 may ...
mkolod/incubator-spark
examples/src/main/scala/org/apache/spark/streaming/examples/TwitterPopularTags.scala
Scala
apache-2.0
2,734
package com.azavea.maml.ast.codec import com.azavea.maml.ast._ import com.azavea.maml.util.Neighborhood import geotrellis.raster.TargetCell import io.circe._ trait MamlCodecInstances extends MamlUtilityCodecs { implicit def totalDecoder: Decoder[Expression] implicit def totalEncoder: Encoder[Expression] impli...
geotrellis/maml
shared/src/main/scala/ast/codec/MamlCodecInstances.scala
Scala
apache-2.0
18,966
/* * Copyright 2015 PayPal * * 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 ...
keshin/squbs
squbs-unicomplex/src/test/scala/org/squbs/unicomplex/BadUnicomplexBootSpec.scala
Scala
apache-2.0
5,019
object Test extends App { println("foo") Macros.foo(42) }
scala/scala
test/files/run/macro-impl-rename-context/Test_2.scala
Scala
apache-2.0
62
package sbt.inc import xsbti.api.SourceAPI import xsbt.api.ShowAPI import xsbt.api.DefaultShowAPI._ import java.lang.reflect.Method import java.util.{ List => JList } /** * A class which computes diffs (unified diffs) between two textual representations of an API. * * Internally, it uses java-diff-utils library bu...
niktrop/sbt
compile/inc/src/main/scala/sbt/inc/APIDiff.scala
Scala
bsd-3-clause
2,694
/* * 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 ...
cin/spark
core/src/main/scala/org/apache/spark/status/api/v1/AllStagesResource.scala
Scala
apache-2.0
1,224
/* ,i::, :;;;;;;; ;:,,::;. 1ft1;::;1tL t1;::;1, :;::; _____ __ ___ __ fCLff ;:: tfLLC / ___/ / |/ /____ _ _____ / /_ CLft11 :,, i1tffLi \__ \ ____ / /|_/ //...
S-Mach/s_mach.datadiff
datadiff/src/test/scala/s_mach/datadiff/TupleDataDiffTest.scala
Scala
mit
36,854
package pspz3 import com.microsoft.z3 trait ZType[A] { def make(name: scala.Symbol): A } object ZType { def apply[A](f: String => A): ZType[A] = new ZType[A] { def make(x: scala.Symbol): A = f(x.name) } } trait ZTypes extends HasContext { import ctx._ implicit val ZTypeInt = ZType[ZInt](mkIntConst(_)) ...
paulp/pspz3
src/main/scala/ztype.scala
Scala
mit
720
package io.continuum.bokeh package examples package models import breeze.linalg.linspace import breeze.numerics.sin import math.{Pi=>pi} import thirdparty._ object TwinAxis extends Example with Tools { object source extends ColumnDataSource { val x = column(-2*pi to 2*pi by 0.1 toArray) val y1 =...
bokeh/bokeh-scala
examples/src/main/scala/models/TwinAxis.scala
Scala
mit
1,622
/* * 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 ...
spark0001/spark2.1.1
yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnAllocatorSuite.scala
Scala
apache-2.0
13,039
package io.github.edadma.numbers import scala.math._ abstract class AbstractQuaternion[T: Numeric, Q <: Quaternion[T, Double, Q, QuaternionDouble]] extends Quaternion[T, Double, Q, QuaternionDouble] { protected def promote(a: Double, b: Double, c: Double, d: Double): QuaternionDouble = QuaternionDouble(a, b, c, d)...
edadma/numbers
shared/src/main/scala/io/github/edadma/numbers/AbstractQuaternion.scala
Scala
mit
1,028
/* * Copyright (c) 2011, Daniel Spiewak * 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 cond...
djspiewak/anti-xml
src/test/scala/com/codecommit/antixml/StAXSpecs.scala
Scala
bsd-3-clause
2,473
package module.detailtrait /** * Created by liguodong on 2016/10/9. */ object AOPScala extends App{ /** * Scala中多重继承中方法的混入是由左往右的顺序。(见以下实例讲解) * scala中多继承对象方法的调用顺序是从右往左。(见以下实例讲解) */ val work = new Worker with toBefo with toBefo2 work.doAction } trait Action{ println("-----Action-----") def d...
liguodongIOT/java-scala-mix-sbt
src/main/scala/module/detailtrait/AOPScala.scala
Scala
apache-2.0
957
package com.arcusys.valamis.lesson.scorm.storage.sequencing import com.arcusys.valamis.lesson.scorm.model.manifest.ChildrenSelection trait ChildrenSelectionStorage { def create(sequencingId: Long, entity: ChildrenSelection) def get(sequencingId: Long): Option[ChildrenSelection] def delete(sequencingId: Long) }
igor-borisov/valamis
valamis-scorm-lesson/src/main/scala/com/arcusys/valamis/lesson/scorm/storage/sequencing/ChildrenSelectionStorage.scala
Scala
gpl-3.0
320
/* * Copyright 2013 Marek Radonsky * * 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 ...
radonsky/Taurus
app/controllers/Players.scala
Scala
apache-2.0
981
package maastar.algorithm.maastar import maastar.agent.{Agent, DecPomdpAgent} import maastar.game._ import maastar.policy.PolicyNode import org.scalamock.scalatest.MockFactory import org.scalatest.{FlatSpec, ShouldMatchers} /** * Created by nwertzberger on 6/23/14. */ class PolicyEvaluatorTest extends FlatSpec with...
nwertzberger/maastar
src/test/scala/maastar/algorithm/maastar/PolicyEvaluatorTest.scala
Scala
apache-2.0
2,157
import scala.io.Source if (args.length > 0) for (linea <- Source.fromFile(args(0)).getLines()) println(linea.length + " " + linea) else Console.err.println("Introduzca nombre de archivo")
fblupi/grado_informatica-NTP
Teoria/T2/printFile.scala
Scala
gpl-2.0
193
package com.github.soniex2.notebetter.util import net.minecraft.util.registry.RegistryNamespacedDefaultedByKey /** * @author soniex2 */ object MinecraftScalaHelper { type ResourceLocation = net.minecraft.util.ResourceLocation object ResourceLocation extends (String => ResourceLocation) with ((String, String...
eNByeX/NoteBetter
src/main/scala/com/github/soniex2/notebetter/util/MinecraftScalaHelper.scala
Scala
mit
1,422
/** * Copyright 2014 Jorge Aliss (jaliss at gmail dot com) - twitter: @jaliss * * 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 * * U...
k4200/securesocial
module-code/app/securesocial/core/services/RoutesService.scala
Scala
apache-2.0
8,208
package org.dbpedia.spotlight.model import java.util.Map import java.lang.String /** * @author pablomendes * @author Joachim Daiber */ trait SurfaceFormIndexer { /** * Adds the [[org.dbpedia.spotlight.model.SurfaceForm]] with with the corresponding annotated count and * total count. Total count is the nu...
Skunnyk/dbpedia-spotlight-model
index/src/main/scala/org/dbpedia/spotlight/model/SurfaceFormIndexer.scala
Scala
apache-2.0
1,088
package com.blinkbox.books.agora.catalogue.book import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.{FlatSpecLike, Matchers} import spray.testkit.ScalatestRouteTest import spray.routing.HttpService import com.blinkbox.books.test.MockitoSyrup import org.mockito.Matchers._ import ...
blinkboxbooks/catalogue-v2.scala
catalogue2-service-public/src/test/scala/com/blinkbox/books/agora/catalogue/book/BookApiTest.scala
Scala
mit
6,574
package org.jetbrains.plugins.scala package lang package formatting package processors import com.intellij.psi.tree.TokenSet import psi.api.ScalaFile import scaladoc.psi.api.ScDocComment import settings.ScalaCodeStyleSettings import com.intellij.psi.util.PsiTreeUtil import com.intellij.lang.ASTNode import org.jetbrain...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/formatting/processors/ScalaSpacingProcessor.scala
Scala
apache-2.0
58,102
package scrabble abstract class Tile { val letter: Char val value: Int override def toString = letter.toString } case class Letter(letter: Char, value: Int) extends Tile { override def equals(that: Any) = that match { case Letter(chr, vl) => (chr == letter) && (value == value) case _ => false } } ...
Happy0/scalascrabble
src/main/scala/Letter.scala
Scala
gpl-2.0
505
/* * Licensed to Intel Corporation under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * Intel Corporation licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use t...
dding3/BigDL
dl/src/main/scala/com/intel/analytics/bigdl/nn/MapTable.scala
Scala
apache-2.0
3,710
// Copyright (C) 2011-2012 the original author or authors. // See the LICENCE.txt 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 ...
scalastyle/scalastyle
src/test/scala/org/scalastyle/scalariform/SimplifyBooleanExpressionCheckerTest.scala
Scala
apache-2.0
2,629
package com.github.mtailor.srtplayground.actors import akka.pattern.ask import com.github.mtailor.srtplayground.actors.MonitoringActor.DownloadsStarted import com.github.mtailor.srtplayground.helpers.BaseActor import org.jsoup.Jsoup import spray.http.HttpResponse import scala.collection.JavaConverters._ class MediaP...
mtailor/srt-playground
src/main/scala/com/github/mtailor/srtplayground/actors/MediaPagesActor.scala
Scala
apache-2.0
1,196
package com.bot4s.telegram.api import cats.Applicative package object declarative { type Action[F[_], T] = T => F[Unit] type Filter[T] = T => Boolean type Args = Seq[String] type ActionWithArgs[F[_], T] = T => Args => F[Unit] type Extractor[T, R] = T => Option[R] /** ...
mukel/telegrambot4s
core/src/com/bot4s/telegram/api/declarative/package.scala
Scala
apache-2.0
1,698
/* * RunningWindowMax.scala * (FScape) * * Copyright (c) 2001-2022 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU Affero General Public License v3+ * * * For further information, please contact Hanns Holger Rutz at * [email protected] */ package de.sciss.fscape pac...
Sciss/FScape-next
core/shared/src/main/scala/de/sciss/fscape/stream/RunningWindowMax.scala
Scala
agpl-3.0
1,953
package controllers import javax.inject._ import play.api._ import play.api.mvc._ /** * This controller creates an `Action` to handle HTTP requests to the * application's home page. */ @Singleton class HomeController @Inject() extends Controller { /** * Create an Action to render an HTML page. * * The ...
makersu/playback-scala.g8
src/main/g8/app/controllers/HomeController.scala
Scala
apache-2.0
585
/** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.14.85 * apibuilder 0.14.93 app.apibuilder.io/apicollective/apibuilder-generator/latest/play_2_8_client */ package io.apibuilder.generator.v0.models { /** * An attribute represents a key/value pair that is optionally used to provid...
mbryzek/apidoc
generated/app/ApicollectiveApibuilderGeneratorV0Client.scala
Scala
mit
31,616
package slick.compiler import slick.ast._ import Util._ import slick.util.ConstArray /** Specialize the AST for edge cases of query parameters. This is required for * compiling `take(0)` for some databases which do not allow `LIMIT 0`. */ class SpecializeParameters extends Phase { val name = "specializeParameters...
nafg/slick
slick/src/main/scala/slick/compiler/SpecializeParameters.scala
Scala
bsd-2-clause
1,505
package pep_089 object Solution { val stream = getClass.getResourceAsStream("/pep_089/p089_roman.txt") val lines = scala.io.Source.fromInputStream(stream).getLines() def solve(): String = lines .map(s => s.length - s.replaceAll("DCCCC|LXXXX|VIIII|CCCC|XXXX|IIII", " ").length) .sum.toString }
filippovitale/pe
pe-solution/src/main/scala/pep_089/Solution.scala
Scala
mit
312
package scala.offheap package internal import java.{lang => jl} import internal.SunMisc.UNSAFE object Sanitizer { private[this] final val UNPACKED_ID_MASK = 65535L private[this] final val ID_MASK = jl.Long.MAX_VALUE << 48 private[this] final val ADDR_MASK = jl.Long.MAX_VALUE >> 16 def pack(id: Long, addr: Ad...
ignasi35/scala-offheap
core/src/main/scala/offheap/internal/Sanitizer.scala
Scala
bsd-3-clause
1,747
package org.jetbrains.plugins.scala import scala.language.implicitConversions /** * @author ven */ class Suspension[T](fun: () => T) { def this(t: T) = this ({() => t}) lazy val v = fun() } object Suspension { implicit def any2Susp[T](t: T): Suspension[T] = new Suspension(t) }
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/Suspension.scala
Scala
apache-2.0
289
type Elem = Object def newElem() = new Object() val MissFactor = 2 val Runs = 100 // number of runs to warm-up, and then number of runs to test val ItersPerRun = 1000 val elems = Array.fill(1024 * MissFactor)(newElem()) def testJava = val set = java.util.HashMap[Elem, Elem]() var count = 0 var iter =...
dotty-staging/dotty
tests/pos-with-compiler/benchSets.scala
Scala
apache-2.0
4,645
package propertynder.util import akka.http.scaladsl.model.HttpResponse import akka.stream.ActorMaterializer import akka.util.ByteString import scala.concurrent.Future object HTTP { implicit class ResponseWithBody(response: HttpResponse) { def body(implicit mat: ActorMaterializer): Future[String] = { impl...
ostapneko/propertynder
src/main/scala/propertynder/util/HTTP.scala
Scala
mit
471
package dielectric object Dielectric extends spark.AllInstances with syntax.AllSyntax
adelbertc/dielectric
src/main/scala/dielectric/Dielectric.scala
Scala
apache-2.0
94
package com.redislabs.provider.redis.df.cluster import com.redislabs.provider.redis.df.CsvDataframeSuite import com.redislabs.provider.redis.env.RedisClusterEnv class CsvDataframeClusterSuite extends CsvDataframeSuite with RedisClusterEnv
RedisLabs/spark-redis
src/test/scala/com/redislabs/provider/redis/df/cluster/CsvDataframeClusterSuite.scala
Scala
bsd-3-clause
241
/* * Copyright (c) 2014-2020 by The Monix Project Developers. * See the project homepage at: https://monix.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...
alexandru/monifu
monix-reactive/shared/src/main/scala/monix/reactive/internal/operators/ThrottleLastObservable.scala
Scala
apache-2.0
3,800
package org.ensime.indexer import java.sql.SQLException import akka.actor._ import akka.event.slf4j.SLF4JLogging import org.apache.commons.vfs2._ import org.ensime.api._ import org.ensime.indexer.DatabaseService._ import org.ensime.util.file._ //import scala.concurrent.ExecutionContext.Implicits.global import scala....
eddsteel/ensime
core/src/main/scala/org/ensime/indexer/SearchService.scala
Scala
gpl-3.0
10,698
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/amls-frontend
test/controllers/businessactivities/WhoIsYourAccountantIsUkControllerSpec.scala
Scala
apache-2.0
6,265
package at.forsyte.apalache.tla.typecheck.passes import at.forsyte.apalache.tla.imp.src.SourceStore import at.forsyte.apalache.tla.typecheck.{TlaType1, TypeCheckerListener} import at.forsyte.apalache.tla.typecheck.etc.{EtcRef, ExactRef} import com.typesafe.scalalogging.LazyLogging class LoggingTypeCheckerListener(sou...
konnov/apalache
tla-types/src/main/scala/at/forsyte/apalache/tla/typecheck/passes/LoggingTypeCheckerListener.scala
Scala
apache-2.0
1,160
package org.jetbrains.plugins.scala.codeInsight import com.intellij.codeInsight.editorActions.moveLeftRight.MoveElementLeftRightHandler import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.lang.psi.api.expr.ScArgumentExprList import org.jetbrains.plugins.scala.lang.psi.api.statements.params.ScParamete...
katejim/intellij-scala
src/org/jetbrains/plugins/scala/codeInsight/ScalaMoveLeftRightHandler.scala
Scala
apache-2.0
740
/* * 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
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/Config.scala
Scala
apache-2.0
28,977
package gitbucket.core.service import gitbucket.core.model._ import gitbucket.core.model.Profile._ import org.specs2.mutable.Specification class PullRequestServiceSpec extends Specification with ServiceSpecBase with PullRequestService with IssuesService { def swap(r: (Issue, PullRequest)) = (r._2 -> r._1) "PullR...
doron123/gitbucket
src/test/scala/gitbucket/core/service/PullRequestServiceSpec.scala
Scala
apache-2.0
1,926
/* * Copyright 2020 Precog Data * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
quasar-analytics/quasar
qsu/src/main/scala/quasar/qsu/CoalesceUnaryMappable.scala
Scala
apache-2.0
3,920
package com.twitter.finatra.httpclient.test import com.twitter.finagle.Service import com.twitter.finagle.http.Method._ import com.twitter.finagle.http.{Method, Request, Response} import com.twitter.finatra.utils.Resettable import com.twitter.inject.app.Banner import com.twitter.inject.{Injector, Logging} import com.t...
syamantm/finatra
httpclient/src/test/scala/com/twitter/finatra/httpclient/test/InMemoryHttpService.scala
Scala
apache-2.0
3,520
package akka.ainterface.remote import akka.actor.{Actor, ActorLogging, ActorRef, Props, Terminated} import akka.ainterface.local.LocalNode import akka.ainterface.remote.RemoteHubProtocol.{Accepted, Tick} import akka.ainterface.remote.handshake.HandshakeInitiator import akka.ainterface.util.actor.DynamicSupervisorProto...
ainterface/ainterface
ainterface/src/main/scala/akka/ainterface/remote/RemoteHub.scala
Scala
apache-2.0
5,216
import scala.concurrent.duration._ class DurationTest { //Should be triggering DurationInt implicit class inside duration package object val timeout: FiniteDuration = /*start*/1 millis span/*end*///This is valid, millis and span highlighted in red. } //DurationConversions.spanConvert.R
ilinum/intellij-scala
testdata/typeInference/bugs5/SCL4938.scala
Scala
apache-2.0
291
/* * 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 ...
tejasapatil/spark
sql/core/src/test/scala/org/apache/spark/sql/DateFunctionsSuite.scala
Scala
apache-2.0
28,003
package org.apache.spark.sql.types import org.apache.spark.sql.catalyst.InternalRow import org.apache.spark.sql.catalyst.expressions.GenericInternalRow import org.apache.spark.sql.catalyst.expressions.UnsafeRow import org.apache.spark.unsafe.types.UTF8String import ch.ninecode.model.BasicElement import ch.ninecode.mo...
derrickoswald/CIMScala
CIMReader/src/main/scala/org/apache/spark/sql/types/ElementUDT.scala
Scala
mit
3,447
package archery import scala.collection.mutable.{ArrayBuffer, PriorityQueue} import scala.math.{min, max} import scala.util.Try object RTree { /** * Construct an empty RTree. */ def empty[A]: RTree[A] = new RTree(Node.empty[A], 0) /** * Construct an RTree from a sequence of entries. */ def apply...
arunma/archery
core/src/main/scala/archery/RTree.scala
Scala
mit
6,005
package net.hearthstats.ui import net.hearthstats.core.HeroClass import net.hearthstats.core.HearthstoneMatch trait HearthstatsPresenter { def setOpponentClass(heroClass: HeroClass): Unit def setYourClass(heroClass: HeroClass): Unit def setOpponentName(n: String): Unit def setCoin(coin: Boolean): Unit def m...
HearthStats/HearthStats.net-Uploader
companion/src/main/scala/net/hearthstats/ui/HearthstatsPresenter.scala
Scala
bsd-3-clause
383
package com.twitter.finagle.thrift import com.twitter.finagle.Service import com.twitter.util.{Return, Throw, Promise, Time} import org.apache.thrift.protocol.{TBinaryProtocol, TMessage, TMessageType} import org.apache.thrift.transport.TMemoryBuffer import org.junit.runner.RunWith import org.mockito.{Matchers, Argumen...
koshelev/finagle
finagle-thrift/src/test/scala/com/twitter/finagle/thrift/SeqIdFilterTest.scala
Scala
apache-2.0
4,262
/* * 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
mllib/src/main/scala/org/apache/spark/ml/image/ImageSchema.scala
Scala
apache-2.0
9,131
package org.bitcoins.protocol.rpc.bitcoincore.blockchain.softforks /** * Created by Tom on 1/11/2016. */ trait SoftForks { def id : String def version : Int def enforce : EnforcementProgress def reject : RejectionProgress } case class SoftForksImpl(id : String, version : Int, enforce : EnforcementProgress...
Christewart/scalacoin
src/main/scala/org/bitcoins/protocol/rpc/bitcoincore/blockchain/softforks/SoftForks.scala
Scala
mit
392
package sttp.client3.okhttp import sttp.capabilities.WebSockets import sttp.client3._ import sttp.client3.testing.ConvertToFuture import sttp.client3.testing.websocket.{WebSocketBufferOverflowTest, WebSocketConcurrentTest, WebSocketTest} import sttp.monad.{FutureMonad, MonadError} import scala.concurrent.duration._ i...
softwaremill/sttp
okhttp-backend/src/test/scala/sttp/client3/okhttp/OkHttpFutureWebsocketTest.scala
Scala
apache-2.0
1,275
package pl.msitko.xml.bench import pl.msitko.xml.parsing.XmlParser import pl.msitko.xml.printing.XmlPrinter object SmallRoundtripLens extends SmallRoundtrip { override def roundtrip(input: String): String = { val parsed = XmlParser.parse(input).right.get XmlPrinter.print(parsed) } }
note/xml-lens
bench/src/main/scala/pl/msitko/xml/bench/SmallRoundtripLens.scala
Scala
mit
298
/* Copyright 2016-17, Hasso-Plattner-Institut fuer Softwaresystemtechnik GmbH 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 applicab...
bpn1/ingestion
src/main/scala/de/hpi/ingestion/textmining/models/Alias.scala
Scala
apache-2.0
1,398