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 chess package format class ForsythPerfTest extends ChessTest { args(skipAll = true) val initialBoard = Board.init(variant.Standard) val emptyBoard = (Forsyth << "8/8/8/8/8/8/8/8").get.board // "export one position board" should { // "many times" in { // val nb = 10000 // val iterat...
niklasf/scalachess
src/test/scala/format/ForsythPerfTest.scala
Scala
mit
2,083
package vulkan.wrapper.registry.vtype import vulkan.wrapper.registry.{Registry, VulkanComponentMappedData} import scala.xml.Node class VulkanUnionType(registry: Registry, node: Node) extends VulkanMemberType(registry, node) { } object VulkanUnionType { def apply(registry: Registry): VulkanComponentMappedData[Vu...
MrInformatic/VulkanWrapper
src/vulkan/wrapper/registry/vtype/VulkanUnionType.scala
Scala
mit
511
package uk.gov.gds.ier.model case class KeyForError(key:String)
michaeldfallen/ier-frontend
app/uk/gov/gds/ier/model/KeyForError.scala
Scala
mit
64
package com.ftchinese.jobs.push import java.net.Socket import javax.net.ssl.{KeyManagerFactory, SSLContext} import com.ftchinese.jobs.common.KeystoreManager /** * Push server manager. * Created by wanbo on 16/3/21. */ class PushServerManager(keyName: String, keyPassword: String) { private var server_host = ""...
FTChinese/push
src/main/scala/com/ftchinese/jobs/push/PushServerManager.scala
Scala
mit
1,085
package colossus package service import core._ import akka.actor.ActorRef import scala.concurrent.duration._ import scala.concurrent.ExecutionContext import java.net.InetSocketAddress import metrics.MetricAddress import Codec._ trait CodecDSL {self => type Input type Output } trait DefaultHandler extends Cod...
zgagnon/colossus
colossus/src/main/scala/colossus/service/ServiceDSL.scala
Scala
apache-2.0
12,771
package pl.bigpicture.wikipv import java.net.URLEncoder /** * Created by kuba on 14/02/16. */ case class PageStat(page: String, lang: String, pv: Int, ts: Int) { def pageTitleURL = URLEncoder.encode(page.replace(" ", "_"), "UTF-8") /** * Get URL to Wikipedia article for given page and lang */ def ...
jpieprzyk/wikipv
src/main/scala/pl/bigpicture/wikipv/PageStat.scala
Scala
apache-2.0
445
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
dotty-staging/scalatest
scalatest-test/src/test/scala/org/scalatest/matchers/dsl/ResultOfOfTypeInvocationSpec.scala
Scala
apache-2.0
936
/* sbt -- Simple Build Tool * Copyright 2009, 2010 Mark Harrah */ package sbt import java.io.File import xsbti.ArtifactInfo.{ ScalaCompilerID, ScalaLibraryID, ScalaOrganization } /** * Represents the source for Scala classes for a given version. The reason both a ClassLoader and the jars are required * is that t...
pdalpra/sbt
util/classpath/src/main/scala/sbt/ScalaInstance.scala
Scala
bsd-3-clause
8,626
/*********************************************************************** * Copyright (c) 2013-2016 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 is ...
nagavallia/geomesa
geomesa-tools/src/main/scala/org/locationtech/geomesa/tools/export/ExportCommand.scala
Scala
apache-2.0
6,712
package Scalisp import org.scalatest.FlatSpec import org.scalatest.matchers.ShouldMatchers class BugFiexes extends FlatSpec with ShouldMatchers { val repl = new REPL() // https://github.com/Mononofu/Scalisp/issues/1 "Variables set in child scopes" should "change the parent scope too" in { repl.execute(""" ...
quantintel/Scalisp
src/test/scala/BugFixes.scala
Scala
mit
507
package io.cronit.services import io.cronit.common.SchedulerServiceException import io.cronit.models.{CronScheduler, JobModel, RestJobModel, ScheduleOnce} import io.cronit.utils.Configuration import org.joda.time.DateTime import org.mockito.Mockito.when import org.scalatest.{FlatSpec, Matchers} import org.specs2.mock....
212data/cronit-service
src/test/scala/io/cronit/services/JobModelBuilderServiceTest.scala
Scala
apache-2.0
5,223
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2010, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
cran/rkafkajars
java/scala/collection/mutable/WrappedArrayBuilder.scala
Scala
apache-2.0
1,851
/* * Copyright 2017 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 writin...
akara/squbs
squbs-unicomplex/src/test/scala/org/squbs/unicomplex/dummyfailedextensions/DummyFailedExtensions.scala
Scala
apache-2.0
1,392
package org.greencheek.spray.cache.memcached import org.greencheek.util.memcached.{WithMemcached, MemcachedBasedSpec} import akka.actor.ActorSystem import net.spy.memcached.ConnectionFactoryBuilder.Protocol import scala.concurrent._ import ExecutionContext.Implicits.global import org.greencheek.util.PortUtil import or...
tootedom/spray-cache-spymemcached
src/test/scala/org/greencheek/spray/cache/memcached/LargeContentCachingSpec.scala
Scala
apache-2.0
1,356
package com.twitter.finagle.memcached.protocol.text.client import com.twitter.finagle.memcached.protocol.ServerError import com.twitter.finagle.memcached.protocol.text.FrameDecoder import com.twitter.finagle.memcached.util.ParserUtils import com.twitter.io.Buf import com.twitter.logging.Logger import scala.collection....
twitter/finagle
finagle-memcached/src/main/scala/com/twitter/finagle/memcached/protocol/text/client/ClientDecoder.scala
Scala
apache-2.0
5,630
/* * 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 ...
ron8hu/spark
core/src/main/scala/org/apache/spark/status/AppStatusStore.scala
Scala
apache-2.0
13,336
package org.scalaide.core.internal.text import org.eclipse.jface.text.IDocument import org.eclipse.jface.text.IRegion import org.eclipse.jface.text.TextUtilities import org.scalaide.core.text.Document import org.scalaide.core.text.InternalDocument class TextDocument(private val doc: IDocument) extends Document with I...
dragos/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/core/internal/text/TextDocument.scala
Scala
bsd-3-clause
2,152
package gmodlab import reflect.{BeanProperty}, java.util.concurrent.atomic.{AtomicBoolean} //serial port/socket operations class Port extends ul.GetTextable { @BeanProperty var serial:ul.commx.SerialPJC = null @BeanProperty var socket:java.net.Socket = null val _isOpened = new AtomicBoolean(false) ...
tardigrade888/gmodlab
repo/src/gmodlab/Port.scala
Scala
mit
2,195
package it.polimi.genomics.GMQLServer import it.polimi.genomics.core.DataStructures.Builtin.MetaAggregateFactory import it.polimi.genomics.core.DataStructures.MetaAggregate.{MetaAggregateFunction} object DefaultMetaAggregateFactory extends MetaAggregateFactory{ val castExc = "GMQL Casting Exception – Could not pa...
DEIB-GECO/GMQL
GMQL-Server/src/main/scala/it/polimi/genomics/GMQLServer/DefaultMetaAggregateFactory.scala
Scala
apache-2.0
8,039
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
felixmulder/scala
src/library/scala/collection/mutable/Builder.scala
Scala
bsd-3-clause
6,040
/* * Copyright 2014–2020 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...
slamdata/quasar
foundation/src/main/scala/quasar/contrib/argonaut/JsonCodecs.scala
Scala
apache-2.0
1,659
/* * * 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"); y...
TiVo/samza
samza-core/src/main/scala/org/apache/samza/util/ExponentialSleepStrategy.scala
Scala
apache-2.0
6,027
package speedith.mixr.isabelle import org.junit.Test import java.io.{LineNumberReader, InputStreamReader} import java.nio.charset.Charset import isabelle.Term.Term import mixr.isabelle.pure.lib.TermYXML import org.junit.Assert.assertTrue import speedith.core.lang.{SpiderDiagram, CompoundSpiderDiagram} import Translati...
urbas/mixr
libs/SpeedithIsabelleTranslator/src/test/scala/speedith/mixr/isabelle/TranslationsTest.scala
Scala
mit
1,839
package org.photon.realm import org.photon.common.{network => base} import java.nio.charset.Charset import com.twitter.util.Future import org.photon.protocol.photon.UserInfos final case class GrantAccessException(reason: String = "", underlying: Throwable = null) extends RuntimeException(reason, underlying) final c...
Emudofus/Photon
realm/main/src/org/photon/realm/NetworkComponent.scala
Scala
mit
1,067
/* * The MIT License (MIT) * * Copyright (c) 2016 Ian McIntosh * * 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 without limitation the rights to * use,...
cranst0n/f3
modules/web/src/main/scala/f3/web/circuit.scala
Scala
mit
2,731
package com.airbnb.scheduler.state import com.airbnb.scheduler.jobs._ /** * @author Florian Leibert (flo@leibert.de) */ trait PersistenceStore { /** * Persists a job with the underlying persistence store * @param job * @return */ def persistJob(job: BaseJob): Boolean /** * Saves a taskId in t...
snegi/chronos
src/main/scala/com/airbnb/scheduler/state/PersistenceStore.scala
Scala
apache-2.0
1,663
/* * 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 ...
hengyicai/OnlineAggregationUCAS
dev/audit-release/sbt_app_hive/src/main/scala/HiveApp.scala
Scala
apache-2.0
2,004
/* * Licensed to Metamarkets Group Inc. (Metamarkets) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Metamarkets licenses this file * to you under the Apache License, Version 2.0 (the * "License"); ...
druid-io/tranquility
core/src/test/scala/com/metamx/tranquility/test/DirectDruidTest.scala
Scala
apache-2.0
19,292
package gui import java.awt.Color import java.awt.event.{ActionListener, KeyEvent} import javax.swing._ import connections.usb.Adb import slide.Device import net.miginfocom.swing.MigLayout class DeviceField(var onComponentsShown: () => Unit, var actionListener: ActionListener) extends JPanel { this.setLayout(ne...
itstar4tech/slide-desktop
src/main/java/gui/DeviceField.scala
Scala
gpl-2.0
3,415
package com.scalaAsm.x86 package Instructions package System // Description: Load Segment Limit // Category: general trait LSL extends InstructionDefinition { val mnemonic = "LSL" } object LSL extends TwoOperands[LSL] with LSLImpl trait LSLImpl extends LSL { implicit object _0 extends TwoOp[r16, m16] { val ...
bdwashbu/scala-x86-inst
src/main/scala/com/scalaAsm/x86/Instructions/System/LSL.scala
Scala
apache-2.0
1,098
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
ueshin/apache-spark
core/src/main/scala/org/apache/spark/internal/config/Python.scala
Scala
apache-2.0
2,459
package connectionpools.impl import java.util import javax.sql.DataSource import com.zaxxer.hikari.{HikariConfig, HikariDataSource} import connectionpools.DataSources._ import connectionpools._ import scala.collection.JavaConverters._ /** * HikariCPDataSourceFactory * @author Sunghyouk Bae sunghyouk.bae@gmail.com...
debop/connectionpool-benchmark
src/main/scala/connectionpools/impl/HikariCPDataSourceFactory.scala
Scala
apache-2.0
3,266
/* * 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 ...
bowenli86/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/rules/logical/FlinkCalcMergeRuleTest.scala
Scala
apache-2.0
3,261
package lampion.scala; import _root_.scala.collection._ class Foo extends mutable.HashMap
yusuke2255/dotty
tests/untried/pos/t595.scala
Scala
bsd-3-clause
92
package com.pfalabs.tinyfilter import org.osgi.service.component.annotations.Component import javax.servlet.Servlet import javax.servlet.http.HttpServlet import org.osgi.service.component.annotations.ServiceScope.SINGLETON import org.slf4j.Logger import org.slf4j.LoggerFactory @Component(service = Array(classOf[Servl...
stillalex/scala-osgi-trials
tiny-filter/src/main/scala/com/pfalabs/tinyfilter/DefaultServlet.scala
Scala
apache-2.0
754
/* * FILE: predicateJoinTestScala.scala * Copyright (c) 2015 - 2018 GeoSpark Development Team * * MIT License * * 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, in...
Sarwat/GeoSpark
sql/src/test/scala/org/datasyslab/geosparksql/predicateJoinTestScala.scala
Scala
mit
22,081
// // NamelessToNamed.scala -- Scala trait NamelessToNamed // Project OrcScala // // Created by dkitchin on Jul 10, 2010. // // Copyright (c) 2017 The University of Texas at Austin. All rights reserved. // // Use and redistribution of this file is governed by the license terms in // the LICENSE file found in the projec...
orc-lang/orc
OrcScala/src/orc/ast/oil/nameless/NamelessToNamed.scala
Scala
bsd-3-clause
7,646
package io.iohk.ethereum.vm import io.iohk.ethereum.domain.UInt256 object Stack { /** * Stack max size as defined in the YP (9.1) */ val DefaultMaxSize = 1024 def empty(maxSize: Int = DefaultMaxSize): Stack = new Stack(Vector(), maxSize) } //TODO: consider a List with head being top of the stack ...
input-output-hk/etc-client
src/main/scala/io/iohk/ethereum/vm/Stack.scala
Scala
mit
3,125
package com.twitter.scalding import cascading.flow.FlowException import org.scalatest.{ Matchers, WordSpec } import scala.util.Try class StatsTestJob1(args: Args) extends Job(args) with CounterVerification { val nonZero = Stat("number of non-zero records", "stats") TypedPipe.from(TypedTsv[(String, Int)](args("i...
tdyas/scalding
scalding-core/src/test/scala/com/twitter/scalding/StatsTest.scala
Scala
apache-2.0
1,822
/* * 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/accounts/frs102/boxes/AC123A.scala
Scala
apache-2.0
1,515
package tastytest object TestDefaults extends Suite("TestDefaults") { test("new Defaults()()") { val defaults = new Defaults()() assert(defaults.i == 33) assert(defaults.s == "foo") assert(defaults.b == false) } test("""new Defaults(s="bar")()""") { val defaults = new Defaults(s="bar")() ...
lrytz/scala
test/tasty/run/src-2/tastytest/TestDefaults.scala
Scala
apache-2.0
1,803
package nl.dekkr.eversync.scala.model import java.io.File case class FileDetails(file: File, mimeType: String)
dekkr/eversync
src/main/scala/nl/dekkr/eversync/scala/model/FileDetails.scala
Scala
mit
114
package org.jetbrains.plugins.scala package lang package psi package stubs package elements package signatures import com.intellij.psi.PsiElement import com.intellij.psi.stubs.{IndexSink, StubElement, StubInputStream, StubOutputStream} import org.jetbrains.plugins.scala.lang.psi.api.statements.params.{ScClassParameter...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/stubs/elements/signatures/ScParamElementType.scala
Scala
apache-2.0
3,055
package org.jetbrains.plugins.scala package base import java.io.File import com.intellij.openapi.module.Module import com.intellij.openapi.project.Project import com.intellij.openapi.projectRoots.{JavaSdk, Sdk} import com.intellij.openapi.roots._ import com.intellij.openapi.roots.libraries.Library import com.intellij...
ghik/intellij-scala
test/org/jetbrains/plugins/scala/base/ScalaLibraryLoader.scala
Scala
apache-2.0
5,817
package com.thoughtworks.datacommons.prepbuddy.rdds import org.apache.spark.rdd.RDD class NumericIndexedRDD(doubleRDD: RDD[Double]) { private val sortedRDDWithIndex = doubleRDD.sortBy(x => x, ascending = true).zipWithIndex() private val RDDWithIndex = sortedRDDWithIndex.map { case (rowValue, rowIndex) => (row...
data-commons/prep-buddy
src/main/scala/com/thoughtworks/datacommons/prepbuddy/rdds/NumericIndexedRDD.scala
Scala
apache-2.0
1,111
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
chenc10/Spark-PAF
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala
Scala
apache-2.0
13,187
/* * Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com> */ package test import play.api.test._ import controllers.Assets.Asset object RouterSpec extends PlaySpecification { "reverse routes containing boolean parameters" in { "in the query string" in { controllers.routes.Application.takeBoo...
jyotikamboj/container
pf-framework/src/sbt-plugin/src/sbt-test/routes-compiler-plugin/injected-routes-compilation/tests/RouterSpec.scala
Scala
mit
7,061
/* * 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 ...
oscarceballos/flink-1.3.2
flink-runtime/src/main/scala/org/apache/flink/runtime/akka/AkkaUtils.scala
Scala
apache-2.0
25,186
package com.socrata.querycoordinator import com.socrata.http.client.RequestBuilder import com.socrata.soql.environment.TableName import com.socrata.soql.typed._ import com.socrata.thirdparty.typesafeconfig.Propertizer import com.typesafe.config.{Config, ConfigFactory} import org.apache.log4j.PropertyConfigurator impor...
socrata-platform/query-coordinator
query-coordinator/src/test/scala/com/socrata/querycoordinator/TestBase.scala
Scala
apache-2.0
768
/* * Copyright (C) 2016 Nikos Katzouris * * 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 option) any later version. * * This program is d...
nkatzz/OLED
src/main/scala/experiments/datautils/tracknow/TK.scala
Scala
gpl-3.0
3,202
// Copyright (c) 2011 Paul Butcher // // 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 without limitation the rights // to use, copy, modify, merge, publish,...
paulbutcher/borachio
core_tests/src/test/scala/ProxyTest.scala
Scala
mit
2,677
package com.stefansavev.randomprojections.interface import com.stefansavev.randomprojections.datarepr.dense.PointIndexes import com.stefansavev.randomprojections.implementation.{PointSignatures, RandomTreeLeaf} //collects the points into buckets trait BucketCollector { def collectPoints(pointIds: PointIndexes): Ran...
stefansavev/random-projections-at-berlinbuzzwords
src/main/scala/com/stefansavev/randomprojections/interface/BucketCollector.scala
Scala
apache-2.0
428
package com.seremis.geninfusion.model.animation import com.seremis.geninfusion.api.GIApiInterface import com.seremis.geninfusion.api.model.IModel import com.seremis.geninfusion.api.model.animation.{IAnimation, IAnimator} import scala.collection.mutable.Queue class Animator(model: IModel) extends IAnimator { pro...
Seremis/Genetic-Infusion
src/main/scala/com/seremis/geninfusion/model/animation/Animator.scala
Scala
gpl-3.0
719
package es.weso.rdf.turtle.parser import es.weso.rdf.nodes._ import scala.language.postfixOps import es.weso.rdf._ import es.weso.rdf.triples.RDFTriple case class TurtleParserState(triples: List[RDFTriple], namespaces: PrefixMap, bNodeLabels: BNodeTable, baseIRI: IRI) { def addTriple(t: RDFTriple): TurtleParserSta...
labra/turtleparser-with-combinators
turtleparser/shared/src/main/scala/es/weso/rdf/turtle/parser/TurtleParserState.scala
Scala
lgpl-3.0
1,384
/* * 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/computations/CPQ21.scala
Scala
apache-2.0
1,672
package fpinscala.exercises.ch09parsing import java.util.regex._ import scala.util.matching.Regex trait Parsers[Parser[+_]] { self => def run[A](p: Parser[A])(input: String): Either[ParseError, A] def succeed[A](a: A): Parser[A] def or[A](s1: Parser[A], s2: Parser[A]): Parser[A] def flatMap[A, B](p: Parser...
huajianmao/fpinscala
src/main/scala/fpinscala/exercises/ch09parsing/Parsers.scala
Scala
mit
9,026
/* * Copyright (c) 2012, 2013, 2014, 2015, 2016 SURFnet BV * 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, thi...
BandwidthOnDemand/nsi-requester
app/support/CustomSSLEngineProvider.scala
Scala
bsd-3-clause
2,241
package lettergenerator package validators object ErrorMessageFactory { def apply(validator: Validator): String = validator match { case PathValidator() => "Could not reach the %s. Please" + " check if path is correct, or report this issue" case DetailsValidator(_, _) => "Details file error: the r...
claudiusbr/LetterGenerator
src/main/scala/lettergenerator/validators/ErrorMessageFactory.scala
Scala
mit
485
/** * 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...
unix1986/universe
tool/kafka-0.8.1.1-src/core/src/test/scala/other/kafka/TestLogCleaning.scala
Scala
bsd-2-clause
13,382
package com.github.akiomik.leap_scala import com.leapmotion.leap.Finger object StaticFinger extends StaticFinger trait StaticFinger { def invalid: Finger = Finger.invalid }
akiomik/leap-scala
src/main/scala/com/github/akiomik/leap_scala/StaticFinger.scala
Scala
mit
179
package mesosphere.marathon package core.matcher.base.util import mesosphere.UnitTest import mesosphere.marathon.core.instance.{ LocalVolume, LocalVolumeId } import mesosphere.marathon.core.launcher.InstanceOpFactory import mesosphere.marathon.core.launcher.impl.TaskLabels import mesosphere.marathon.core.task.Task imp...
janisz/marathon
src/test/scala/mesosphere/marathon/core/matcher/base/util/OfferOperationFactoryTest.scala
Scala
apache-2.0
6,875
/* * Copyright (c) 2013 Habla Computing * * 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...
hablapps/app-dofollow
src/test/scala/org/hablapps/dofollow/test/portal/project/SetUpProjectTest.scala
Scala
apache-2.0
8,897
/** * © 2019 Refinitiv. All Rights Reserved. * * 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 l...
dudi3001/CM-Well
server/cmwell-common/src/main/scala/cmwell/common/formats/JsonSerializer.scala
Scala
apache-2.0
21,046
/* * Copyright 2013 the original author or 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 appli...
lanwen/rest-assured
examples/scalatra-example/src/main/scala/com/jayway/restassured/scalatra/CustomAuthExample.scala
Scala
apache-2.0
1,882
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
aosagie/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/sql/DropViewStatement.scala
Scala
apache-2.0
1,250
package org.loklak.data /** * Created by Scott on 6/4/16. */ object DAO { private val es = ES.client def store(id:String, json:String) = { es.index("loklak","twitter",json,id) } }
DengYiping/loklak-scala
src/main/scala/org/loklak/data/DAO.scala
Scala
mit
195
/* * 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 ...
databricks/spark-tfocs
src/main/scala/org/apache/spark/mllib/optimization/tfocs/DVectorFunctions.scala
Scala
apache-2.0
3,593
// Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). // Licensed under the Apache License, Version 2.0 (see LICENSE). package org.pantsbuild.example // A simple jvm binary to test the jvm_run task on. Try, e.g., // ./pants -ldebug run --run-jvm-jvm-options='-Dfoo=bar' --run-jvm-args="Foo Bar" \\\\ // ...
areitz/pants
examples/src/scala/org/pantsbuild/example/JvmRunExample.scala
Scala
apache-2.0
514
package redis import scala.concurrent.Await import redis.api.pubsub._ import redis.actors.RedisSubscriberActor import java.net.InetSocketAddress import akka.actor.{Props, ActorRef} import akka.testkit.{TestActorRef, TestProbe} import akka.util.ByteString class RedisPubSubSpec extends RedisStandaloneServer { sequen...
etaty/rediscala
src/test/scala/redis/RedisPubSubSpec.scala
Scala
apache-2.0
4,315
package breeze.optimize import breeze.math.MutableCoordinateSpace import com.typesafe.scalalogging.slf4j.Logging import breeze.collection.mutable.RingBuffer /** * SPG is a Spectral Projected Gradient minimizer; it minimizes a differentiable * function subject to the optimum being in some set, given by the projecti...
ktakagaki/breeze
src/main/scala/breeze/optimize/SpectralProjectedGradient.scala
Scala
apache-2.0
3,621
package org.jetbrains.plugins.scala.performance.typing import scala.concurrent.duration.{Duration, DurationInt} import scala.language.postfixOps /** * !!! Also see tests in [[org.jetbrains.plugins.scala.lang.actions.editor]] package * TODO: unify tests and move to a common package */ class ScalaTypedHandlerTest ex...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/performance/typing/ScalaTypedHandlerTest.scala
Scala
apache-2.0
1,438
package org.github.sguzman.scala.game.scalebra.mvc.view import java.util.concurrent.Executors import akka.actor.{Actor, ActorLogging} import org.github.sguzman.scala.game.scalebra.Scalebra import org.github.sguzman.scala.game.scalebra.actor.{Start, Stop} import org.github.sguzman.scala.game.scalebra.util.log.L import...
sguzman/Scalebra
src/main/scala/org/github/sguzman/scala/game/scalebra/mvc/view/View.scala
Scala
mit
3,840
package io.sphere.mongo.generic import com.mongodb.DBObject import org.scalatest.matchers.must.Matchers import org.scalatest.wordspec.AnyWordSpec import io.sphere.mongo.MongoUtils.dbObj import io.sphere.mongo.format.DefaultMongoFormats._ import io.sphere.mongo.format.MongoFormat import org.scalatest.Assertion class S...
sphereio/sphere-scala-libs
mongo/mongo-derivation-magnolia/src/test/scala/io/sphere/mongo/generic/SumTypesDerivingSpec.scala
Scala
apache-2.0
5,032
package sangria.parser import language.postfixOps import sangria.ast.AstLocation import sangria.ast import sangria.ast._ import sangria.util.{FileUtil, StringMatchers} import scala.reflect.ClassTag import scala.util.{Failure, Success} import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWord...
OlegIlyenko/sangria
modules/core/src/test/scala/sangria/parser/QueryParserSpec.scala
Scala
apache-2.0
86,421
package org.jetbrains.plugins.scala package lang package surroundWith package surrounders package expression /** * @author Dmitry Krasilschikov */ import com.intellij.lang.ASTNode import com.intellij.openapi.util.TextRange import com.intellij.psi.PsiElement import org.jetbrains.plugins.scala.lang.psi.api.expr._ ...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/lang/surroundWith/surrounders/expression/ScalaWithForYieldSurrounder.scala
Scala
apache-2.0
1,242
// TLCockpit // Copyright 2017-2021 Norbert Preining // Licensed according to GPLv3+ // // Front end for tlmgr package TLCockpit import javafx.scene.Node import TLCockpit.Utils._ import TeXLive._ import TeXLive.OsTools._ import scala.collection.{immutable, mutable} import scala.collection.mutable.ArrayBuffer import...
TeX-Live/tlcockpit
src/main/scala/TLCockpit/ApplicationMain.scala
Scala
gpl-3.0
60,601
package freecli package circe import scala.io.Source import cats.Show import io.circe.generic.auto._ import io.circe.Json import io.circe.parser._ import core.api.StringDecoder import circe.all._ class Test extends testkit.Test { describe("Circe Json StringDecoder") { it("decode inline string to json") { ...
pavlosgi/freecli
circe/src/test/scala/freecli/circe/Test.scala
Scala
apache-2.0
2,430
/* * 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 ...
wangmiao1981/spark
core/src/test/scala/org/apache/spark/storage/BlockManagerDecommissionIntegrationSuite.scala
Scala
apache-2.0
13,924
// Copyright (C) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in project root for information. package com.microsoft.ml.spark.schema /** Contains objects and functions to manipulate Categoricals */ import org.apache.spark.sql.DataFrame import org.apache.spark.sql.types._...
rastala/mmlspark
src/core/schema/src/main/scala/Categoricals.scala
Scala
mit
14,254
package slinky.readwrite import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import scala.scalajs.js trait TypeConstructorWriters { implicit def optionWriter[T](implicit writer: Writer[T]): Writer[Option[T]] = _.map(v => writer.write(v)).orNull implicit def eitherWriter[A...
shadaj/slinky
readWrite/src/main/scala-2/slinky/readwrite/TypeConstructorWriters.scala
Scala
mit
1,369
package com.omearac.http import akka.http.scaladsl.server.Directives._ import com.omearac.http.routes.{ ConsumerCommands, ProducerCommands, CollectorCommands } trait HttpService extends ConsumerCommands with ProducerCommands with CollectorCommands { def routes = producerHttpCommands ~ co...
soujiro0725/market-analysis-microservices
src/main/scala/com/omearac/http/HttpService.scala
Scala
apache-2.0
409
package org.jetbrains.plugins.scala.lang.formatter.tests import com.intellij.psi.codeStyle.CommonCodeStyleSettings import org.jetbrains.plugins.scala.lang.formatter.AbstractScalaFormatterTestBase /** * @author Alexander Podkhalyuzin */ class ScalaBugsTest extends AbstractScalaFormatterTestBase { /* stub: def t...
JetBrains/intellij-scala-historical
test/org/jetbrains/plugins/scala/lang/formatter/tests/ScalaBugsTest.scala
Scala
apache-2.0
23,547
/** * Copyright 2009 Jorge Ortiz * * 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...
xuwei-k/nscala-time
src/main/scala/com/github/nscala_time/time/StaticDateTime.scala
Scala
apache-2.0
1,726
package transport import scala.scalajs.js package object jsapi { type RTCVoidCallback = js.Function0[Unit] type RTCSessionDescriptionCallback = js.Function1[RTCSessionDescription, Unit] type RTCPeerConnectionErrorCallback = js.Function1[js.Object, Unit] type RTCStatsCallback = js.Function1[RTCStatsReport, Uni...
OlivierBlanvillain/scalajs-transport
transport/webrtc/js/src/main/scala/transport/jsapi/package.scala
Scala
mit
602
package org.bitcoins.core.gen import org.bitcoins.core.bloom._ import org.scalacheck.Gen /** * Created by chris on 8/7/16. */ abstract class BloomFilterGenerator { /** Builds a generic bloom filter loaded with no hashes and returns it */ def bloomFilter: Gen[BloomFilter] = for { size <- Gen.choose(1, 100) ...
Christewart/bitcoin-s-core
src/main/scala/org/bitcoins/core/gen/BloomFilterGenerators.scala
Scala
mit
1,299
package org.jetbrains.plugins.scala.lang.completion.weighter import com.intellij.codeInsight.completion.{CompletionLocation, CompletionWeigher} import com.intellij.codeInsight.lookup.LookupElement import org.jetbrains.plugins.scala.lang.completion.lookups.ScalaLookupItem /** * @author Alexander Podkhalyuzin */ cla...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/completion/weighter/ScalaParameterCompletionWeigher.scala
Scala
apache-2.0
984
package score.discord.canti.collections import java.util.NoSuchElementException import scala.collection.mutable class LogBuffer[T](capacity: Int) extends mutable.IndexedSeq[T]: private val buffer = new Array[Any](capacity) private var readPos, writePos = 0 private var isEmpty_ = true override def length: Int...
ScoreUnder/canti-bot
src/main/scala/score/discord/canti/collections/LogBuffer.scala
Scala
agpl-3.0
1,841
package org.broadinstitute.clio.client.dispatch import akka.NotUsed import akka.stream.scaladsl.Source import org.broadinstitute.clio.client.commands.UndeliverCommand import org.broadinstitute.clio.client.dispatch.MoveExecutor.IoOp import org.broadinstitute.clio.client.util.IoUtil import org.broadinstitute.clio.client...
broadinstitute/clio
clio-client/src/main/scala/org/broadinstitute/clio/client/dispatch/UndeliverExecutor.scala
Scala
bsd-3-clause
1,908
/** Copyright 2016 - 2021 Martin Mauch (@nightscape) * * 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...
crealytics/spark-excel
src/main/3.2/scala/com/crealytics/spark/v2/excel/ExcelOutputWriter.scala
Scala
apache-2.0
1,313
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.internal.scaladsl.registry import akka.Done import akka.actor.CoordinatedShutdown import com.lightbend.lagom.internal.registry.serviceDnsRecords import com.lightbend.lagom.scaladsl.api.ServiceInfo import com.types...
ignasi35/lagom
dev/service-registry/devmode-scaladsl/src/main/scala/com/lightbend/lagom/internal/scaladsl/registry/ServiceRegistration.scala
Scala
apache-2.0
1,447
package com.arcusys.valamis.web.servlet.base import java.util import javax.servlet.http.{HttpServletRequest, HttpServletRequestWrapper, HttpServletResponse} import org.scalatra.servlet.ServletApiImplicits import org.scalatra.{Delete, Handler, Patch, Put} import scala.collection.JavaConversions._ // tomcat (with def...
igor-borisov/valamis
valamis-portlets/src/main/scala/com/arcusys/valamis/web/servlet/base/HTTPMethodsSupport.scala
Scala
gpl-3.0
1,712
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.3 * @date Tue May 29 14:45:32 EDT 2012 * @see LICENSE (MIT style license file). */ package scalation.analytics.clusterer import scala.collection.mutable.Set import scala.util.control.Bre...
scalation/fda
scalation_1.3/scalation_modeling/src/main/scala/scalation/analytics/clusterer/KMeansClusterer.scala
Scala
mit
19,438
import scala.quoted.* object Exp { private def compileImpl(e: Expr[Int], env: Map[String, Expr[Int]])(using Quotes): Expr[Int] = { e match { case '{$s:Int} => s case exp => compileImpl(exp, env) } } private def compileUnlift(e: Expr[Int])(using Quotes): Expr[Int] = { val envir...
dotty-staging/dotty
tests/run-macros/i9475/Macro_1.scala
Scala
apache-2.0
474
/** * 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...
TiVo/kafka
core/src/main/scala/kafka/log/LogLoader.scala
Scala
apache-2.0
22,795
package io.udash.web.homepage.styles.partials import io.udash.css.{CssBase, CssStyle} import io.udash.web.commons.styles.attributes.Attributes import io.udash.web.commons.styles.components.{HeaderButtonsStyles, HeaderNavStyles} import io.udash.web.commons.styles.utils.{CommonStyleUtils, MediaQueries, StyleConstants} i...
UdashFramework/udash-core
guide/shared/src/main/scala/io/udash/web/homepage/styles/partials/HeaderStyles.scala
Scala
apache-2.0
2,468
package discord import javax.inject.{Inject, Singleton} import discord.api.DiscordCommand import discord.commands._ @Singleton class DiscordCommandRegistry @Inject()( val helpCommand: DiscordHelpCommand, val pingCommand: DiscordPingC...
Cobbleopolis/MonsterTruckBot
modules/discord/app/discord/DiscordCommandRegistry.scala
Scala
mit
1,277
package com.xenopsconsulting.gamedayapi.batch import org.junit.Test class MySQLDatabaseImporterTest { @Test def testCreate() { // MySQLDatabaseImporter.createTables() // MySQLDatabaseImporter.importPitchesByYearAndTeam(2011, "sea") // MySQLDatabaseImporter.importPitchesByYearsAndTeam(List(2010, 2011, 20...
ecopony/scala-gameday-api
src/test/scala/com/xenopsconsulting/gamedayapi/batch/MySQLDatabaseImporterTest.scala
Scala
mit
399
/* * Copyright 2017-2022 John Snow Labs * * 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...
JohnSnowLabs/spark-nlp
src/main/scala/com/johnsnowlabs/nlp/embeddings/ReadsFromBytes.scala
Scala
apache-2.0
1,006
/* * Copyright 2012 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 require...
Comcast/money
money-core/src/main/scala/com/comcast/money/core/samplers/Sampler.scala
Scala
apache-2.0
1,227
package ee.cone.c4gate.deep_session import ee.cone.c4actor._ import ee.cone.c4assemble.Assemble import ee.cone.c4gate.SessionAttrAccessFactory import ee.cone.c4proto.Protocol trait DeepSessionAttrApp extends SessionDataProtocolApp with DeepSessionAttrFactoryImplApp with DeepSessionDataAssembleApp trait Ses...
wregs/c4proto
c4gate-extra/src/main/scala/ee/cone/c4gate/deep_session/DeepSessionAttrMix.scala
Scala
apache-2.0
1,213