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 ohnosequences.metapasta import ohnosequences.awstools.s3.ObjectAddress import ohnosequences.metapasta.reporting.SampleId object S3Paths { def mergedFastq(resultsObject: ObjectAddress, sample: String): ObjectAddress = resultsObject / sample / "reads" / (sample + ".merged.fastq") def notMergedFastq(resul...
INTERCROSSING/metapasta
src/main/scala/ohnosequences/metapasta/S3Paths.scala
Scala
agpl-3.0
3,439
package fpinscala.parallelism import java.util.concurrent._ object Par { type Par[A] = ExecutorService => Future[A] def run[A](s: ExecutorService)(a: Par[A]): Future[A] = a(s) def unit[A](a: A): Par[A] = (es: ExecutorService) => UnitFuture(a) // `unit` is represented as a function that returns a `UnitFuture...
ailveen/fpinscala
exercises/src/main/scala/fpinscala/parallelism/Par.scala
Scala
mit
6,906
/* * 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 ...
style95/openwhisk
tests/src/test/scala/org/apache/openwhisk/core/controller/test/migration/SequenceActionApiMigrationTests.scala
Scala
apache-2.0
7,562
package breeze.numerics /* Copyright 2012 David Hall 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 t...
eponvert/breeze
src/test/scala/breeze/numerics/BesselTest.scala
Scala
apache-2.0
1,136
/* Copyright (C) 2008-2014 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
zxsted/factorie
src/main/scala/cc/factorie/model/Factor2.scala
Scala
apache-2.0
26,948
package filodb.coordinator import scala.collection.mutable import scala.util.{Failure, Success} import akka.actor.{ActorRef, Address, AddressFromURIString} import com.typesafe.scalalogging.StrictLogging import org.scalactic._ import filodb.coordinator.NodeClusterActor._ import filodb.core.{DatasetRef, ErrorResponse,...
filodb/FiloDB
coordinator/src/main/scala/filodb.coordinator/ShardManager.scala
Scala
apache-2.0
28,290
package au.com.dius.pact.provider.scalatest import java.io.File import java.net.URL import java.util.concurrent.Executors import au.com.dius.pact.model import au.com.dius.pact.model.{FullResponseMatch, RequestResponseInteraction, ResponseMatching, Pact => PactForConsumer} import au.com.dius.pact.provider.sbtsupport.H...
olga-vasylchenko/pact-jvm
pact-jvm-provider-scalatest/src/main/scala/au/com/dius/pact/provider/scalatest/ProviderSpec.scala
Scala
apache-2.0
4,442
package com.sksamuel.elastic4s.testutils import com.sksamuel.elastic4s.testutils.StringExtensions.StringOps import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers.convertToStringShouldWrapper class StringExtensionsTest extends AnyFlatSpec { it should "convert line endings to Window...
sksamuel/elastic4s
elastic4s-core/src/test/scala/com/sksamuel/elastic4s/testutils/StringExtensionsTest.scala
Scala
apache-2.0
561
package models.db import scalikejdbc._ case class CellPosition( areaId: Int, infoNo: Int, cell: Int, posX: Int, posY: Int) { def save()(implicit session: DBSession = CellPosition.autoSession): CellPosition = CellPosition.save(this)(session) def destroy()(implicit session: DBSession = CellPosition.auto...
ttdoda/MyFleetGirls
server/app/models/db/CellPosition.scala
Scala
mit
3,539
package scalax.collection package config import mutable.ArraySet /** Base trait for `Graph` configuration and optimization hints. This type is used by * the implicit parameter of `Graph` factory methods. */ trait GraphConfig { /** Indicates the expected number of nodes in the graph. */ def orderHint: Int } ...
scala-graph/scala-graph
core/src/main/scala/scalax/collection/config/GraphConfig.scala
Scala
apache-2.0
915
/* * 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 ...
big-pegasus/spark
core/src/main/scala/org/apache/spark/storage/StorageUtils.scala
Scala
apache-2.0
15,152
package models import database.helper.LdapUserStatus import play.api.libs.json.{JsValue, Json, Reads, Writes} import java.util.UUID trait User extends UniqueEntity { def systemId: String def campusId: String def lastname: String def firstname: String def email: String def status: LdapUserStatus } s...
THK-ADV/lwm-reloaded
app/models/User.scala
Scala
mit
1,691
object Main { object Orientation extends Enumeration { type Orientation = Value val North = Value("N") val East = Value("E") val South = Value("S") val West = Value("O") } import Orientation._ object Move extends Enumeration { type Move = Value val Forward = Value("A") val Right...
Dinduks/treasure-hunt
src/main/scala/Main.scala
Scala
mit
8,070
package pattern.math import pattern.{Pattern, P2} /* +1>> This source code is licensed as GPLv3 if not stated otherwise. >> NO responsibility taken for ANY harm, damage done >> to you, your data, animals, etc. >> +2>> >> Last modified: 2013-10-29 :: 20:37 >> Origin: patterns >> +3...
lodsb/patterns
src/main/scala/pattern/math/Mult.scala
Scala
gpl-3.0
754
package org.jetbrains.plugins.scala.util import java.awt.Event import java.awt.event.MouseEvent import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicLong import com.intellij.concurrency.JobScheduler import com.intellij.diagnostic.PerformanceWatcher import com.intellij.ide.IdeEventQueue import...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/util/UIFreezingGuard.scala
Scala
apache-2.0
6,327
package TwentyOneToThirty /** * Created by Farrell on 5/21/15. */ object P24 { }
Spinlocks/99Problems
src/TwentyOneToThirty/P24.scala
Scala
apache-2.0
85
package com.sksamuel.elastic4s.search.queries import com.sksamuel.elastic4s.{DocumentRef, ElasticsearchClientUri} import com.sksamuel.elastic4s.analyzers.StandardAnalyzer import com.sksamuel.elastic4s.http.{ElasticDsl, HttpClient} import com.sksamuel.elastic4s.searches.queries.ArtificialDocument import com.sksamuel.el...
aroundus-inc/elastic4s
elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/search/queries/MoreLikeThisQueryHttpTest.scala
Scala
apache-2.0
2,474
/** * ***************************************************************************** * Copyright (c) 2014 Guillaume DUBUISSON DUPLESSIS <guillaume.dubuisson_duplessis@insa-rouen.fr>. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0...
GuillaumeDD/scala99problems
src/main/scala/binaryTree/P61A/P61A.scala
Scala
gpl-3.0
2,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 ...
daewon/incubator-s2graph
s2core/src/main/scala/org/apache/s2graph/core/mysqls/ColumnMeta.scala
Scala
apache-2.0
5,325
import sbt._ import Keys._ object GruntTask extends Plugin { private def runGrunt(task: String) = { val cmd = "grunt " + task cmd ! } // Grunt command def gruntCommand = { Command.single("grunt") { (state: State, task: String) => runGrunt(task) state } } // Grunt task de...
moatra/playground
project/GruntTask.scala
Scala
mit
608
/* * Copyright (c) 2016. <jason.zou@gmail.com> * * ControlField.scala is part of marc4scala. * * marc4scala is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, o...
jasonzou/marc4scala
src/main/scala/org/marc4scala/ControlField.scala
Scala
gpl-3.0
2,073
package mesosphere.marathon package api.v2.json import com.wix.accord.validate import mesosphere.UnitTest import mesosphere.marathon.api.v2.AppNormalization import mesosphere.marathon.raml.{ App, GroupConversion, GroupUpdate, Raml } import mesosphere.marathon.state.PathId._ import mesosphere.marathon.state._ import me...
natemurthy/marathon
src/test/scala/mesosphere/marathon/api/v2/json/GroupUpdateTest.scala
Scala
apache-2.0
7,652
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs // Licence: http://www.gnu.org/licenses/gpl-3.0.en.html /* * This file contains derivative works that require the following * header to be displayed: * * Copyright 2002-2014 EPFL. * Copyright 2011-2014 Typesafe, Inc. * All rights reserved. ...
rorygraves/ensime-server
core/src/main/scala/org/ensime/core/Completion.scala
Scala
gpl-3.0
13,317
/* * Copyright (C) 2017 LREN CHUV for Human Brain Project * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version...
LREN-CHUV/workflow
src/main/scala/ch/chuv/lren/woken/monitoring/package.scala
Scala
apache-2.0
1,385
package dal import com.softwaremill.clippy.AdviceState.AdviceState import com.softwaremill.clippy._ import com.softwaremill.id.IdGenerator import util.SqlDatabase import scala.concurrent.{ExecutionContext, Future} class AdvicesRepository(database: SqlDatabase, idGenerator: IdGenerator)(implicit ec: ExecutionContext)...
softwaremill/scala-clippy
ui/app/dal/AdvicesRepository.scala
Scala
apache-2.0
3,355
import sbt._ import Keys._ object LVATBuild extends Build { lazy val root = Project(id = "lvat", base = file(".")) lazy val fmTranslation = Project(id = "fm-translation", base = file("fm-translation/")) dependsOn (root) lazy val paperTools = Project(id = "paper-tools", base = file("paper-tools/")) dependsO...
AlexanderKnueppel/is-there-a-mismatch
Source/KConfigTranslator/project/Build.scala
Scala
lgpl-3.0
367
object FoundReq { object F val a = new (Int *** ((List[C] *** C { type A = C }) >:< D)) def f(arg: Int *** ((List[String] *** C { type A = F.type }) >:< D)) = ??? f(a) }
tek/splain
core/src/test/resources-2.13.7+/latest/splain/plugin/PluginSpec/foundreq/code.scala
Scala
mit
178
/* ************************************************************************************* * Copyright 2013 Normation SAS ************************************************************************************* * * This file is part of Rudder. * * Rudder is free software: you can redistribute it and/or modify * it under the...
armeniaca/rudder
rudder-core/src/main/scala/com/normation/rudder/reports/execution/ReportsExecutionRepository.scala
Scala
gpl-3.0
7,995
import common._ object forcomp {;import org.scalaide.worksheet.runtime.library.WorksheetSupport._; def main(args: Array[String])=$execute{;$skip(90); val dictionaryPath = List("forcomp", "linuxwords.txt");System.out.println("""dictionaryPath : List[java.lang.String] = """ + $show(dictionaryPath ));$skip(543); ...
simula67/scala-coursera-martin-odersky
forcomp/.worksheet/src/forcomp.scala
Scala
mpl-2.0
13,699
package com.github.rosmith.nlp.query.filter import com.github.rosmith.nlp.query.filter.Datatype._ import com.github.rosmith.nlp.query.filter.BinaryOperator._ import com.github.rosmith.nlp.query.OperandValue class CountQueryFilter(_var: OperandValue, op: BinaryOperator, _val: Int) extends BinaryQueryFilter(_var, op, n...
rosmith/giet
src/main/scala/com/github/rosmith/nlp/query/filter/CountQueryFilter.scala
Scala
mit
354
/* * 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 ...
daortizh/incubator-spot
spot-ml/src/main/scala/org/apache/spot/proxy/ProxySuspiciousConnectsAnalysis.scala
Scala
apache-2.0
6,897
package com.karasiq.shadowcloud.storage.utils import akka.NotUsed import akka.actor.{ActorContext, ActorSystem} import akka.stream.scaladsl.Flow import akka.util.ByteString import com.karasiq.shadowcloud.ShadowCloud import com.karasiq.shadowcloud.config.StorageConfig import com.karasiq.shadowcloud.index.IndexData impo...
Karasiq/shadowcloud
core/src/main/scala/com/karasiq/shadowcloud/storage/utils/IndexRepositoryStreams.scala
Scala
apache-2.0
1,793
package eu.execom.FabutPresentation.service import eu.execom.FabutPresentation.util.Logging import eu.execom.FabutPresentation.persistence.User import org.apache.commons.mail.HtmlEmail class MailSender( val smtpUrl: String, val smtpPort: Int, val smtpUserName: String, val smtpPassword: String, val smtpSslO...
idostanic/FabutPresentation
src/main/scala/eu/execom/FabutPresentation/service/MailSender.scala
Scala
apache-2.0
1,309
package com.taig.tmpltr.engine.html import com.taig.tmpltr._ import play.api.mvc.Content class i( val attributes: Attributes, val content: Content ) extends markup.i with Tag.Body[i, Content] object i extends Tag.Body.Appliable[i, Content]
Taig/Play-Tmpltr
app/com/taig/tmpltr/engine/html/i.scala
Scala
mit
243
package slogger.model.processing import org.joda.time.Duration case class CalculationMetaStats ( processedDocuments: Long, reusedSlices: Long, processingTime: Duration )
IvanMykhailov/stats-logger
core/src/main/scala/slogger/model/processing/CalculationMetaStats.scala
Scala
mit
178
package pl.umk.bugclassification.scmparser.gerrit.parsers import org.scalatest.FunSuite import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class JsonGerritEventStreamParserSuite extends FunSuite { test("parsing correct 'patch set created event'") { val line = "...
mfejzer/CommitClassification
src/test/scala/pl/umk/bugclassification/scmparser/gerrit/parsers/JsonGerritEventStreamParserSuite.scala
Scala
bsd-3-clause
1,378
package org.neilconcepts import scalaz._ import Scalaz._ import scala.concurrent._ import scala.concurrent.duration._ import ExecutionContext.Implicits.global import Kleisli._ object Twitter { def getTweets(name: String, apiKey: String, apiSecret: String): Future[List[Tweet]] = future { val tweet1 = Tweet(UserD...
bneil/scalaz_playground
src/main/scala/org/neilconcepts/Scalaz_playground.scala
Scala
mit
3,743
/* * 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 ...
gioenn/xSpark
core/src/main/scala/org/apache/spark/shuffle/sort/SortShuffleWriter.scala
Scala
apache-2.0
4,813
/* * Copyright (c) 2016 SnappyData, Inc. 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 ap...
vjr/snappydata
core/src/main/scala/org/apache/spark/sql/SnappyBaseParser.scala
Scala
apache-2.0
20,136
package be.angelcorp.glsl.impl import be.angelcorp.glsl._ import be.angelcorp.glsl.ast._ import be.angelcorp.glsl.util.GlslType import org.slf4j.LoggerFactory import scala.reflect.macros.whitebox.Context /** * Generates scala symbols into the object class files to retain glsl information during runtime (and code as...
AODtorusan/scala-glsl
macros/src/main/scala/be/angelcorp/glsl/impl/ScalaGenerator.scala
Scala
mit
2,751
class B extends A
xeno-by/old-scalameta-sbt
sbt/src/sbt-test/source-dependencies/parent-member-change/B.scala
Scala
bsd-3-clause
17
package com.arcusys.learn.liferay.update.version300 import java.sql.Connection import com.arcusys.learn.liferay.update.version300.migrations.scorm.{ActivityStateNodeMigration, ActivityStateTreeMigration} import com.arcusys.valamis.persistence.common.SlickProfile import com.arcusys.valamis.persistence.impl.scorm.model...
igor-borisov/valamis
learn-portlet/src/test/scala/com/arcusys/learn/liferay/update/version300/ActivityStateTreeMigrationTest.scala
Scala
gpl-3.0
5,228
import io.gatling.core.Predef._ import io.gatling.http.Predef._ object PatientOverview { def choosePatient(patientId: String, offset: Int = 0, max: Int = 10) = exec(http("Patient Overview") .get("/patientOverview/index?offset=" + offset + "&max=" + max)) .pause(2) .exec(http("Choose Patient") .get("/patie...
silverbullet-dk/opentele-performance-tests
src/test/scala/user-files/simulations/processes/clinician/PatientOverview.scala
Scala
apache-2.0
356
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.api.cache.ehcache import javax.inject.{ Inject, Provider } import net.sf.ehcache.CacheManager import play.api.cache.{ AsyncCacheApi, SyncCacheApi } import play.api.cache.ehcache.CacheManagerProvider import play.api.inject._ impo...
wsargent/playframework
framework/src/play-ehcache/src/test/scala/play/api/cache/ehcache/EhCacheApiSpec.scala
Scala
apache-2.0
1,830
import Dependencies._ import sbt.Keys._ import sbt._ import scoverage.ScoverageSbtPlugin object BalboaCommon { lazy val settings: Seq[Setting[_]] = BuildSettings.projectSettings ++ Seq( libraryDependencies <++= scalaVersion {libraries(_)}, sbtbuildinfo.BuildInfoKeys.buildInfoPackage := "com.socrata.balboa", ...
socrata-platform/balboa
project/BalboaCommon.scala
Scala
apache-2.0
799
/** * Copyright 2015 Mohiva Organisation (license at mohiva dot com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless require...
akkie/play-silhouette
silhouette/test/com/mohiva/play/silhouette/impl/providers/oauth2/GitLabProviderSpec.scala
Scala
apache-2.0
9,607
package is.hail.lir import is.hail.asm4s._ import is.hail.utils._ import org.objectweb.asm.Opcodes._ import org.objectweb.asm._ import scala.collection.mutable class SplitUnreachable() extends Exception() object SplitMethod { val TargetMethodSize: Int = 500 def apply( c: Classx[_], m: Method, block...
hail-is/hail
hail/src/main/scala/is/hail/lir/SplitMethod.scala
Scala
mit
14,746
/* * Copyright 2011-2017 GatlingCorp (http://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applic...
wiacekm/gatling
gatling-benchmarks/src/main/scala/io/gatling/http/request/builder/HttpRequestExpressionBuilderBenchmark.scala
Scala
apache-2.0
3,734
package com.seanshubin.schulze.persistence import datomic.{Connection, Peer} import ReferenceLookup._ import com.seanshubin.schulze.persistence.datomic_util.ScalaAdaptor import ScalaAdaptor._ class DatomicPersistenceApi(connection: Connection) extends PersistenceApi { def createElection(name: String) { val db =...
SeanShubin/schulze
persistence/src/main/scala/com/seanshubin/schulze/persistence/DatomicPersistenceApi.scala
Scala
unlicense
3,608
package org.aj.ner import org.aj.ner.SNerPipeline.Pipeline import org.scalatest.{FunSpecLike, Matchers} /** * Created by ajlnx on 9/24/16. */ class NerTest extends FunSpecLike with Matchers { val sner = SNer() val input = Array[String]( "Democratic presidential nominee Hillary Clinton.", "A homeowner...
ajmnsk/ner
src/test/scala/org/aj/ner/NerTest.scala
Scala
mit
2,669
import org.specs2.mutable._ import play.api.libs.iteratee._ import reactivemongo.api._ import reactivemongo.api.gridfs.{ReadFile, DefaultFileToSave, GridFS} import reactivemongo.api.gridfs.Implicits._ import reactivemongo.bson._ import scala.concurrent._ import reactivemongo.api.gridfs import scala.concurrent.duration....
lunatech-labs/lunatech-reactivemongo
driver/src/test/scala/GridfsSpec.scala
Scala
apache-2.0
1,506
import sbt.Keys.version import sbt._ object Common { val versionString = "1.46" val scalaVersionString = "2.11.8" val organisationString = "dvla" val organisationNameString = "Driver & Vehicle Licensing Agency" val nexus = "http://rep002-01.skyscape.preview-dvla.co.uk:8081/nexus/content/repositories" val ...
dvla/vrm-assign-online
project/Common.scala
Scala
mit
1,039
package monocle.bench import java.util.concurrent.TimeUnit import monocle.bench.BenchModel._ import monocle.bench.input.Nested0Input import org.openjdk.jmh.annotations._ import shapeless._ @BenchmarkMode(Array(Mode.AverageTime)) @OutputTimeUnit(TimeUnit.MICROSECONDS) @State(Scope.Benchmark) class ShapelessLensBench ...
aoiroaoino/Monocle
bench/src/main/scala/monocle/bench/ShapelessLensBench.scala
Scala
mit
1,655
package edu.rice.habanero.benchmarks.bitonicsort import edu.rice.habanero.actors.{ScalazActor, ScalazActorState, ScalazPool} import edu.rice.habanero.benchmarks.philosopher.PhilosopherAkkaActorBenchmark.ExitMessage import edu.rice.habanero.benchmarks.{Benchmark, BenchmarkRunner, PseudoRandom} import scala.collection....
shamsmahmood/savina
src/main/scala/edu/rice/habanero/benchmarks/bitonicsort/BitonicSortScalazActorBenchmark.scala
Scala
gpl-2.0
16,599
/* * Copyright 2016 Miroslav Janíček * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
mjanicek/rembulan
rembulan-tests/src/test/scala/net/sandius/rembulan/test/fragments/StringLibFragmentsRunSpec.scala
Scala
apache-2.0
1,064
/* * Copyright (c) 2013-2014 Telefónica Investigación y Desarrollo S.A.U. * * 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 * * Unles...
telefonicaid/fiware-cosmos-platform
cosmos-api/test/es/tid/cosmos/api/profile/HandleConstraintTest.scala
Scala
apache-2.0
1,193
/* * Copyright 2016 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...
ahudspith-equalexperts/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600/v2/B31.scala
Scala
apache-2.0
942
/* * 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 ...
UndeadBaneGitHub/spark
core/src/main/scala/org/apache/spark/deploy/SparkHadoopUtil.scala
Scala
apache-2.0
16,924
package pigpio.scaladsl import scala.util.control.NonFatal import scala.util.{Failure, Success, Try} /** * */ trait DigitalIO { def gpioGetMode(gpio: Gpio)(implicit pigpio: PigpioLibrary): Try[PinMode] def gpioSetMode(gpio: Gpio, mode: PinMode)(implicit pigpio: PigpioLibrary): Try[GpioResult] def gpioRead(g...
jw3/pigpio-scala
src/main/scala/pigpio/scaladsl/DigitalIO.scala
Scala
apache-2.0
1,527
// Copyright (c) 2019 Ben Zimmer. All rights reserved. // Simple Swing GUI for configuring properties. package bdzimmer.secondary.export.view import java.awt.Font // scalastyle:ignore illegal.imports import java.awt.{GridLayout, BorderLayout} import java.awt.event.{ActionListener, ActionEvent} imp...
bdzimmer/secondary
src/main/scala/bdzimmer/secondary/export/view/ConfigurationGUI.scala
Scala
bsd-3-clause
4,040
package no.digipost.labs.security import org.scalatra.ScalatraServlet trait SecurityHeaders { self: ScalatraServlet => after() { response.headers += Headers.CacheControl -> "no-cache, no-store, no-transform" response.headers += Headers.XFrameOptions -> "deny" response.headers += Headers.XContentTypeOpt...
digipost/labs
backend/src/main/scala/no/digipost/labs/security/SecurityHeaders.scala
Scala
apache-2.0
567
package ru.maizy.cheesecake.core.tests.utils import org.scalatest.FlatSpecLike import ru.maizy.cheesecake.core.utils.CollectionsUtils import ru.maizy.cheesecake.core.tests.BaseSpec /** * Copyright (c) Nikita Kovaliov, maizy.ru, 2016 * See LICENSE.txt for details. */ class CollectionsSpec extends BaseSpec with Flat...
maizy/cheesecake
core/src/test/scala/ru/maizy/cheesecake/core/tests/utils/CollectionsSpec.scala
Scala
apache-2.0
522
package scroll.internal /** This package contains interfaces and traits for reflective access and role-based dispatch. */ package object dispatch
max-leuthaeuser/SCROLL
core/src/main/scala/scroll/internal/dispatch/package.scala
Scala
lgpl-3.0
149
package play.filters.csrf import play.api.libs.ws.WS.WSRequestHolder import scala.concurrent.Future import play.api.libs.ws.{WS, Response} import play.api.mvc._ /** * Specs for the Scala per action CSRF actions */ object ScalaCSRFActionSpec extends CSRFCommonSpecs { def buildCsrfCheckRequest(configuration: (Stri...
michaelahlers/team-awesome-wedding
vendor/play-2.2.1/framework/src/play-filters-helpers/src/test/scala/play/filters/csrf/ScalaCSRFActionSpec.scala
Scala
mit
1,129
package scorex.network import akka.actor.{ActorRef, Props} import akka.testkit.TestProbe import org.h2.mvstore.MVStore import scorex.ActorTestingCommons import scorex.block.Block import scorex.block.Block._ import scorex.network.NetworkController.DataFromPeer import scorex.settings.SettingsMock import scorex.transacti...
B83YPoj/Waves
src/test/scala/scorex/network/BlockchainSynchronizerSpecification.scala
Scala
apache-2.0
10,718
package io.really.coffeescript /** * Created by asoliman on 4/28/15. */ class CompilerError { }
reallylabs/coffeescript-compiler
src/main/scala/io/really/coffeescript/CompilerError.scala
Scala
apache-2.0
100
/* * 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 ...
brad-kaiser/spark
mllib/src/test/scala/org/apache/spark/ml/regression/GeneralizedLinearRegressionSuite.scala
Scala
apache-2.0
69,237
/* * Copyright (C) 2013-2014 by Michael Hombre Brinkmann */ package net.twibs.util import com.ibm.icu.util.ULocale import net.twibs.testutil.TwibsTest class LocaleUtilsTest extends TwibsTest { test("Locale lookup") { val locales = ULocale.GERMAN :: ULocale.US :: ULocale.UK :: Nil LocaleUtils.lookupLocale...
hombre/twibs
twibs-util-test/src/test/scala/net/twibs/util/LocaleUtilsTest.scala
Scala
apache-2.0
683
package funsets import org.scalatest.FunSuite import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner /** * This class is a test suite for the methods in object FunSets. To run * the test suite, you can either: * - run the "test" command in the SBT console * - right-click the file in eclipse and...
gvamos/MilanOpera
done/funsets/src/test/scala/funsets/FunSetSuite.scala
Scala
gpl-2.0
5,645
package com.blinkbox.books.storageservice import akka.actor._ import akka.util.Timeout import com.blinkbox.books.config.Configuration import com.blinkbox.books.logging.{DiagnosticExecutionContext, Loggers} import com.blinkbox.books.spray.Directives._ import com.blinkbox.books.spray.{HealthCheckHttpService, HttpServer,...
blinkboxbooks/storage-service
src/main/scala/com/blinkbox/books/storageservice/API.scala
Scala
mit
4,027
/** * Copyright (C) 2015 Orbeon, Inc. * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. * * This program i...
ajw625/orbeon-forms
builder/src/builder/scala/org/orbeon/builder/FormBuilderApp.scala
Scala
lgpl-2.1
991
/* * Copyright 2019 ACINQ SAS * * 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...
ACINQ/eclair
eclair-core/src/test/scala/fr/acinq/eclair/UInt64Spec.scala
Scala
apache-2.0
3,183
/* * 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 ...
kimoonkim/spark
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/rest/kubernetes/PemsToKeyStoreConverter.scala
Scala
apache-2.0
5,698
/* * MUSIT is a museum database to archive natural and cultural history data. * Copyright (C) 2016 MUSIT Norway, part of www.uio.no (University of Oslo) * * 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 Softw...
kpmeen/musit
service_storagefacility/test/repositories/storage/old_dao/event/EventDaoSpec.scala
Scala
gpl-2.0
10,112
package org.template.recommendation import org.apache.predictionio.controller.IEngineFactory import org.apache.predictionio.controller.Engine case class Query(user: String, num: Int, creationYear: Option[Int] = None) case class PredictedResult(itemScores: Array[ItemScore]) // HOWTO: added movie creation year to pre...
alex9311/PredictionIO
examples/scala-parallel-recommendation/custom-query/src/main/scala/Engine.scala
Scala
apache-2.0
615
package org.apress.prospark import org.apache.spark.SparkContext import org.apache.spark.SparkConf import org.apache.spark.streaming.{ Milliseconds, Seconds, StreamingContext } import org.apache.hadoop.io.{ Text, LongWritable, IntWritable } import org.apache.hadoop.fs.Path import org.apache.hadoop.mapreduce.lib.input....
ZubairNabi/prosparkstreaming
Chap3/src/main/scala/org/apress/prospark/L3-DStreamMapping.scala
Scala
apache-2.0
2,501
package pureconfig.module.catseffect2 import scala.language.higherKinds import scala.reflect.ClassTag import cats.effect.{Blocker, ContextShift, Sync} import pureconfig.module.catseffect2 import pureconfig.{ConfigReader, ConfigSource} package object syntax { implicit class CatsEffectConfigSource(private val cs: ...
pureconfig/pureconfig
modules/cats-effect2/src/main/scala/pureconfig/module/catseffect2/syntax/package.scala
Scala
mpl-2.0
522
/* * 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 ...
haohui/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/sources/CsvTableSource.scala
Scala
apache-2.0
10,318
package mot.dump import mot.protocol.Frame import java.net.ServerSocket import java.net.InetSocketAddress import mot.util.Util.FunctionToRunnable import java.net.Socket import java.net.SocketException import com.typesafe.scalalogging.slf4j.StrictLogging import scala.util.control.NonFatal import java.io.PrintStream imp...
marianobarrios/mot
src/main/scala/mot/dump/Dumper.scala
Scala
bsd-2-clause
6,125
package tests.rescala.fullmv.mirrors import java.util.concurrent.atomic.AtomicReference import org.scalatest.funsuite.AnyFunSuite import rescala.fullmv._ import DistributedFullMVApi.{FullMVEngine, FullMVTurnLocalClone, SerializationGraphTracking, FullMVTurnImpl} import rescala.parrp.Backoff import tests.rescala.testt...
guidosalva/REScala
Code/Extensions/MultiversionDistributed/multiversion/src/test/scala/tests/rescala/fullmv/mirrors/LockMirrorStressTest.scala
Scala
apache-2.0
4,777
/* * 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 ...
paulcastro/openwhisk
tests/src/test/scala/whisk/core/containerpool/test/ContainerProxyTests.scala
Scala
apache-2.0
25,085
package com.outr.arango import cats.effect.IO import com.outr.arango.core.{ArangoDBCollection, CreateResult, DeleteResult, NotFoundException} import fabric.Value import fabric.rw._ case class DatabaseStore(collection: ArangoDBCollection) { def get[T: ReaderWriter](key: String): IO[Option[T]] = collection .get(i...
outr/scarango
driver/src/main/scala/com/outr/arango/DatabaseStore.scala
Scala
mit
1,020
/* * Copyright 2012 OneCalendar * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
mdia/OneCalendar
app/dao/EventDao.scala
Scala
apache-2.0
2,531
/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package swave.compat.akka import akka.actor.ActorSystem import akka.stream.ActorMaterializer import akka.stre...
sirthias/swave
compat-akka/src/test/scala/swave/compat/akka/AkkaCompatSpec.scala
Scala
mpl-2.0
1,870
package bad.robot.radiate.ui object FrameRate { val videoFramesPerSecond: FrameRate = framesPerSecond(24) private[ui] def framesPerSecond(framesPerSecond: Int): FrameRate = { new FrameRate(framesPerSecond) } } class FrameRate(framesPerSecond: Int) { if (framesPerSecond < 1) throw new IllegalArgumentExcep...
tobyweston/radiate
src/main/scala/bad/robot/radiate/ui/FrameRate.scala
Scala
apache-2.0
566
package controllers.api import play.api.mvc._ import models._ import settings.Global import org.joda.time.DateTime object ViewsApiController extends BaseApiController { def getViews = Action { implicit request => val monthViews = Global.views.search(ViewQuery(start_date = Option(new DateTime().minusMonths(1))...
grahamar/Giles
app/controllers/api/ViewsApiController.scala
Scala
apache-2.0
616
/* * Copyright (c) 2013 Snowplow Analytics Ltd. All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org...
devagorilla/spark-code-challenge
project/Dependencies.scala
Scala
apache-2.0
1,746
/* * Copyright 2014-2021 Netflix, 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...
brharrington/atlas
atlas-wiki/src/main/scala/com/netflix/atlas/wiki/pages/VSpan.scala
Scala
apache-2.0
1,465
/* - Coeus web framework ------------------------- * * Licensed under the Apache License, Version 2.0. * * Ported from Apache Jakarta Commons Validator, * http://commons.apache.org/validator/ * * Author: Spiros Tzavellas */ package com.tzavellas.coeus.validation.vspec.constraint import org.junit.Test class I...
sptz45/coeus
src/test/scala/com/tzavellas/coeus/validation/vspec/constraint/IsbnConstraintTest.scala
Scala
apache-2.0
1,133
package org.fs.utility import org.junit.runner.RunWith import org.scalatest.Spec import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class RichGeneralImplicitsSpec extends Spec { object `rich throwable -` { import RichGeneralImplicits.RichThrowable def `stackTraceString ` = { val t...
frozenspider/fs-common-utils
src/test/scala/org/fs/utility/RichGeneralImplicitsSpec.scala
Scala
mit
896
package org.scalatra import org.scalatra.test.specs2.ScalatraSpec class EnvironmentFilter extends ScalatraFilter { get("/*/environment") { environment } get("/*/is-development-mode") { isDevelopmentMode } } class EnvironmentFilterSpec extends ScalatraSpec { def is = "The dev filter should" ^ ...
dozed/scalatra
core/src/test/scala/org/scalatra/EnvironmentSpec.scala
Scala
bsd-2-clause
1,195
package com.truecar.mleap.core.regression import com.truecar.mleap.core.linalg.Vector import com.truecar.mleap.core.tree.{DecisionTree, Node} /** * Created by hwilkins on 11/8/15. */ case class DecisionTreeRegression(rootNode: Node, numFeatures: Int) extends DecisionTree { def predict(features: Vector): Double = ...
TrueCar/mleap
mleap-core/src/main/scala/com/truecar/mleap/core/regression/DecisionTreeRegression.scala
Scala
apache-2.0
374
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
WangTaoTheTonic/flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/stream/table/OverWindowITCase.scala
Scala
apache-2.0
11,838
/** * 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...
gf53520/kafka
core/src/test/scala/unit/kafka/integration/KafkaServerTestHarness.scala
Scala
apache-2.0
6,098
package dpla.ingestion3.executors import java.time.LocalDateTime import com.databricks.spark.avro._ import dpla.ingestion3.confs.i3Conf import dpla.ingestion3.dataStorage.OutputHelper import dpla.ingestion3.harvesters.Harvester import dpla.ingestion3.harvesters.file.NaraDeltaHarvester import dpla.ingestion3.harvester...
dpla/ingestion3
src/main/scala/dpla/ingestion3/executors/HarvestExecutor.scala
Scala
mit
5,218
/** * Copyright (C) 2015 Stratio (http://stratio.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
pfcoperez/spark-mongodb
spark-mongodb-examples/src/main/scala/com/stratio/datasource/mongodb/examples/DataFrameAPIExample.scala
Scala
apache-2.0
1,556
package com.karasiq.scalajsbundler.dsl import java.io.File import java.net.URL import java.nio.file.Path import scala.language.implicitConversions import com.karasiq.scalajsbundler.ScalaJSBundler._ trait BundlerImplicits { self: BundlerDsl ⇒ import PageContentBuilders._ final implicit class BuilderOps[+T <: Pa...
Karasiq/sbt-scalajs-bundler
src/main/scala/com/karasiq/scalajsbundler/dsl/BundlerImplicits.scala
Scala
mit
1,101
package s99 object P15 { def duplicateN[E](n: Int, l: List[E]): List[E] = { l.flatMap(List.fill(n)(_)) } def duplicateNRec[E](n: Int, l: List[E]): List[E] = { duplicateNRec(n, l, List.empty[E]) } private[this] def duplicateNRec[E](n: Int, l: List[E], result: List[E]): List[E] = { l match { ...
qilab-/algorithm-problems
s-99/src/main/scala/s99/P15.scala
Scala
unlicense
583
package io.buoyant.test.h2 import com.twitter.finagle.buoyant.h2.{Frame, Stream} import com.twitter.util.Future object StreamTestUtils { /** * Read a [[Stream]] to the end, [[Frame.release release()]]ing each * [[Frame]] before reading the next one. * * The value of each frame is discarded, but assertio...
denverwilliams/linkerd
finagle/h2/src/test/scala/io/buoyant/test/h2/StreamTestUtils.scala
Scala
apache-2.0
1,169
package com.anchortab.snippet import scala.xml.NodeSeq import java.text.SimpleDateFormat import net.liftweb._ import sitemap._ import common._ import http._ import SHtml._ import js._ import JsCmds._ import LiftRules._ import json._ import Extraction._ import util._ import Helpers...
farmdawgnation/anchortab
src/main/scala/com/anchortab/snippet/Subscription.scala
Scala
apache-2.0
11,194