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
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala.collection packa...
scala/scala
src/library/scala/collection/mutable/CollisionProofHashMap.scala
Scala
apache-2.0
30,458
package com.ovoenergy.comms.helpers import com.ovoenergy.comms.model.{CancellationRequested, LoggableEvent} import org.slf4j.{LoggerFactory, MDC} trait TraceTokenProvider[E] { def traceToken(e: E): String } trait EventLogger[E] { def debug(e: E, message: String): Unit def info(e: E, message: String): Unit de...
ovotech/comms-kafka-serialisation
modules/helpers/src/main/scala/com/ovoenergy/comms/helpers/LoggingWithMDC.scala
Scala
mit
3,801
/** * 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...
wangcy6/storm_app
frame/kafka-0.11.0/kafka-0.11.0.1-src/core/src/test/scala/unit/kafka/api/RequestResponseSerializationTest.scala
Scala
apache-2.0
11,560
import io.gatling.recorder.GatlingRecorder import io.gatling.recorder.config.RecorderPropertiesBuilder object Recorder extends App { val props = new RecorderPropertiesBuilder props.simulationOutputFolder(IDEPathHelper.recorderOutputDirectory.toString) props.simulationPackage("de.utkast.ozark.loadtests") props...
lefloh/ozark-viewengine-loadtests
test/src/test/scala/Recorder.scala
Scala
apache-2.0
457
package shared.model case class Timing(val upper:Int, val lower: Int)
rak4music/My-Musical-Flip-Card
shared/src/main/scala/shared/model/Timing.scala
Scala
apache-2.0
70
package net.usersource.twitpipe import org.scalatest.matchers.MustMatchers import org.scalatest.mock.MockitoSugar import org.scalatest.{BeforeAndAfterEach, FeatureSpec, GivenWhenThen} import org.mockito.Mockito import org.mockito.stubbing.Answer import org.mockito.invocation.InvocationOnMock import akka.actor.Actor im...
glenford/TwitterPipeline
src/test/scala/net/usersource/twitpipe/SampleIngestEndpointHandlingSpec.scala
Scala
apache-2.0
4,326
package text.similarity /** * @author K.Sakamoto * Created on 2016/05/23 */ object DirectionTurner { def reciprocal(score: Double): Double = { if (score == 0) { 1D } else { 1 / score } } def oneMinus(score: Double): Double = { 1D - score } }
ktr-skmt/FelisCatusZero
src/main/scala/text/similarity/DirectionTurner.scala
Scala
apache-2.0
294
package org.beaucatcher.bobject import org.beaucatcher.bson._ import org.beaucatcher.mongo._ import org.beaucatcher.caseclass._ abstract class CollectionAccessWithEntityBObject[IdType]()(implicit val idEncoder: IdEncoder[IdType]) extends CollectionAccessWithOneEntityType[BObject, BObject, IdType, BValue] { o...
havocp/beaucatcher
bobject/src/main/scala/org/beaucatcher/bobject/CollectionAccess.scala
Scala
apache-2.0
1,897
/* * 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 ...
maropu/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/command/MsckRepairTableSuiteBase.scala
Scala
apache-2.0
1,665
/* * 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 ...
zhangminglei/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/join/NonWindowLeftRightJoinWithNonEquiPredicates.scala
Scala
apache-2.0
5,050
package com.zinnia.ml.spark.logisticregression import org.apache.spark.mllib.classification.{LogisticRegressionWithSGD, LogisticRegressionModel} import org.apache.spark.rdd.RDD import org.jblas.DoubleMatrix import org.apache.spark.mllib.regression.LabeledPoint import java.lang.Math import org.apache.spark.mllib.optimi...
echalkpad/t4f-data
spark/mllib/src/main/tmp1/com/zinnia/ml/spark/logisticregression/LogisticRegression.scala
Scala
apache-2.0
9,547
package scala.reflect.macros package contexts trait Internals extends scala.tools.nsc.transform.TypingTransformers { self: Context => import global._ lazy val internal: ContextInternalApi = new global.SymbolTableInternal with ContextInternalApi { val enclosingOwner = callsiteTyper.context.owner class ...
felixmulder/scala
src/compiler/scala/reflect/macros/contexts/Internals.scala
Scala
bsd-3-clause
2,092
package colang.ast.parsed import colang.ast.parsed.expression.{Expression, ImplicitDereferencing, InvalidExpression, TypeReference} import colang.ast.raw import colang.ast.raw.TypeDefinition import colang.issues.{Issue, Issues, Terms} /** * Represents a type. Different type aspects are defined in separate traits to...
psenchanka/colang
src/main/scala/colang/ast/parsed/Type.scala
Scala
mit
7,792
/** * This file is part of the TA Buddy project. * Copyright (c) 2013-2014 Alexey Aksenov ezh@ezh.msk.ru * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Global License version 3 * as published by the Free Software Foundation with the addition...
digimead/digi-TABuddy-desktop
part-core/src/main/scala/org/digimead/tabuddy/desktop/core/operation/OperationInfo.scala
Scala
agpl-3.0
5,334
package org.openurp.edu.eams.teach.planaudit.service.listeners import java.util.Date import org.beangle.commons.collection.Collections import org.beangle.data.model.dao.EntityDao import org.beangle.data.jpa.dao.OqlBuilder import org.beangle.commons.lang.Strings import org.openurp.edu.base.Course import org.openurp.edu...
openurp/edu-eams-webapp
core/src/main/scala/org/openurp/edu/eams/teach/planaudit/service/listeners/PlanAuditCourseTakeListener.scala
Scala
gpl-3.0
5,196
package ch.epfl.yinyang import language.experimental.macros import scala.reflect.macros.blackbox.Context /** * Default implementation of virtualized Scala control structures. * * This trait is adapted from the `EmbeddedControls` trait in * Scala Virtualized. See also * [[https://raw.github.com/namin/scala/topic...
vjovanov/scala-yinyang
components/paradise/src/EmbeddedControls.scala
Scala
bsd-3-clause
7,641
package sri.web.vdom import org.scalajs.dom import sri.core._ import sri.web.SyntheticEvent import scala.scalajs.LinkingInfo.developmentMode import scala.scalajs.js import scala.scalajs.js.Dynamic.{literal => json} import scala.scalajs.js.{`|`, undefined, UndefOr => U} trait SvgTags1 { def feTile( ...
chandu0101/sri
web/src/main/scala/sri/web/vdom/SvgTags1.scala
Scala
apache-2.0
391,902
package scalax.collection.constrained package mutable import scala.collection.Set import scalax.collection.GraphPredef.{EdgeLikeIn, InnerEdgeParam, InnerNodeParam, OuterEdge, OuterNode, Param} import scalax.collection.mutable.{GraphLike => SimpleGraphLike} /* Operations for mutable constrained graphs that also retur...
scala-graph/scala-graph
constrained/src/main/scala/scalax/collection/constrained/mutable/GraphOps.scala
Scala
apache-2.0
2,791
package models.daos.drivers import java.net.ConnectException import com.sendgrid.SendGrid import com.typesafe.config.ConfigFactory import play.api.Play import scala.util.{Failure, Try} import scalaj.http.Http /** * Checks if the database is connected during creation of the injector. The application will fail to st...
gitlinks/gitrank-web
app/models/daos/drivers/ElasticsearchChecker.scala
Scala
apache-2.0
1,328
import com.thesamet.proto.e2e.custom_types._ import com.thesamet.proto.e2e.custom_types.CustomMessage.Weather import com.thesamet.pb._ import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.must.Matchers class CustomTypesSpec extends AnyFlatSpec with Matchers { import CustomTypesSpec.Message "Cus...
scalapb/ScalaPB
e2e/src/test/scala/CustomTypesSpec.scala
Scala
apache-2.0
4,270
package services.forms import com.google.inject.AbstractModule import com.typesafe.config.ConfigFactory import models._ import net.codingwell.scalaguice.ScalaModule import org.specs2.specification.Scope import play.api.{ Application, Configuration } import play.api.inject.guice.GuiceApplicationBuilder import _root_.se...
vetafi/vetafi-web
test/services/forms/FormTestContext.scala
Scala
apache-2.0
2,359
package epic import epic.trees.Span /** * TODO * * @author dlwh **/ package object slab { // some type aliases type StringAnalysisFunction[I, O] = AnalysisFunction[String, Span, I, O] type StringSlab[+AnnotationTypes] = Slab[String, Span, AnnotationTypes] }
langkilde/epic
src/main/scala/epic/slab/package.scala
Scala
apache-2.0
270
package org.jetbrains.plugins.scala package lang package parser package parsing package statements import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes import org.jetbrains.plugins.scala.lang.parser.parsing.base.Ids import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder import org.jetb...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/parser/parsing/statements/VarDef.scala
Scala
apache-2.0
1,859
/** * The MIT License (MIT) * Copyright (c) 2016 Microsoft Corporation * * 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 righ...
khdang/azure-documentdb-spark
src/main/scala/com/microsoft/azure/documentdb/spark/schema/DocumentDBSchema.scala
Scala
mit
6,404
package com.sksamuel.elastic4s.search.queries import com.sksamuel.elastic4s.testkit.DockerTests import org.scalatest.FlatSpec import scala.util.Try class CountTest extends FlatSpec with DockerTests { Try { client.execute { deleteIndex("london") }.await } client.execute { bulk( indexIn...
Tecsisa/elastic4s
elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/search/queries/CountTest.scala
Scala
apache-2.0
1,100
package mvgk.moviesearch import org.openqa.selenium.firefox.FirefoxDriver /** * @author Got Hug */ case class RutrackerQuery(title: String, titleRus: Option[String], year: Int) extends MovieQuery { def doQuery(firefoxDriver: Option[FirefoxDriver] = None): MovieQueryResult = { logInfo("doQuery(): STARTED") ...
gothug/movie-geek
src/main/scala/mvgk/moviesearch/RutrackerQuery.scala
Scala
apache-2.0
1,217
import scala.deriving._ import scala.quoted._ object Macro1 { def mirrorFields[T](t: Type[T])(using qctx: QuoteContext): List[String] = t match { case '[$field *: $fields] => field.show :: mirrorFields(fields) case '[Unit] => Nil } // Demonstrates the use of quoted pattern matching // over...
som-snytt/dotty
tests/run-macros/i8007/Macro_1.scala
Scala
apache-2.0
798
package mesosphere.marathon package api import javax.servlet.http.HttpServletRequest import javax.ws.rs._ import javax.ws.rs.core.{ Context, MediaType, Request, Response, Variant } import akka.actor.ActorSystem import ch.qos.logback.classic.{ Level, Logger, LoggerContext } import com.google.inject.Inject import com.t...
janisz/marathon
src/main/scala/mesosphere/marathon/api/SystemResource.scala
Scala
apache-2.0
6,003
package metabrowse.server import io.undertow.Undertow import io.undertow.server.HttpHandler import io.undertow.server.HttpServerExchange import io.undertow.util.Headers import java.io.ByteArrayOutputStream import java.io.File import java.net.URLClassLoader import java.nio.ByteBuffer import java.nio.charset.StandardCha...
scalameta/metadoc
metabrowse-server/src/main/scala/metabrowse/server/MetabrowseServer.scala
Scala
apache-2.0
11,695
/* * 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 ...
akara/squbs
squbs-unicomplex/src/test/scala/org/squbs/stream/ThrowExceptionStream.scala
Scala
apache-2.0
2,038
/* * 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 ...
tophua/spark1.52
core/src/main/scala/org/apache/spark/util/JsonProtocol.scala
Scala
apache-2.0
43,953
package redis.actors import akka.actor.{ActorLogging, ActorRef, Actor} import akka.io.Tcp import akka.util.{ByteStringBuilder, ByteString} import java.net.InetSocketAddress import akka.io.Tcp._ import akka.io.Tcp.Connected import akka.io.Tcp.Register import akka.io.Tcp.Connect import akka.io.Tcp.CommandFailed import a...
beni55/rediscala
src/main/scala/redis/actors/RedisWorkerIO.scala
Scala
apache-2.0
4,691
import org.scalatest.FunSpec import planck.{SizeMismatchException, Vecd, Matrixd} class MatrixdTests extends FunSpec { def v(e: Double*) = Vecd(e) def m(e: Vecd*) = Matrixd(e) val m1234 = m(v(1, 2), v(3, 4)) val m2468 = m(v(2, 4), v(6, 8)) val m135975 = m(v(1, 3), v(5, 9), v(7, 5)) val m126790 = m(v(1, 2,...
noryb009/planck
test/src/planck/MatrixdTests.scala
Scala
mit
2,060
class S { class O { def f(s: String | Null): String | Null = ??? def f(ss: Array[String] | Null): Array[String] | Null = ??? def g(s: String): String = ??? def g(ss: Array[String]): Array[String] = ??? def h(ts: String => String): String = ??? def h(ts: Array[String] => Array[String]): Array...
dotty-staging/dotty
tests/explicit-nulls/unsafe-common/unsafe-overload.scala
Scala
apache-2.0
1,452
/* * 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/ct600/v2/RSQ7.scala
Scala
apache-2.0
1,167
package blended.updater.config import java.io.File import scala.collection.JavaConverters._ import scala.util.Success import blended.testsupport.TestFile import blended.testsupport.TestFile.{ DeletePolicy, DeleteWhenNoFailure } import blended.updater.config.util.ConfigPropertyMapConverter import blended.util.logging...
lefou/blended
blended.updater.config/jvm/src/test/scala/blended/updater/config/overlayTest.scala
Scala
apache-2.0
10,734
package mesosphere.marathon package core.task.tracker.impl import akka.Done import akka.actor.{ ActorRef, Status } import akka.event.EventStream import akka.testkit.TestProbe import ch.qos.logback.classic.Level import com.google.inject.Provider import mesosphere.AkkaUnitTest import mesosphere.marathon.core.CoreGuiceMo...
janisz/marathon
src/test/scala/mesosphere/marathon/core/task/tracker/impl/InstanceOpProcessorImplTest.scala
Scala
apache-2.0
20,282
package cmd import org.rogach.scallop._ import recommender.DistanceMetric /** * Parse arguments (from command line) that can be later accessed as values of the Conf instance * @param arguments Command line arguments */ class Conf(arguments: Seq[String]) extends ScallopConf(arguments) { val datasetTypes = DataH...
litaoran/spray-sample
src/main/scala/cmd/Conf.scala
Scala
mit
4,054
package dhg.ccg.tag import dhg.util.CollectionUtil._ import dhg.util.FileUtil._ import dhg.util.StringUtil._ import scalaz._ import scalaz.Scalaz._ trait TagDictionary[Word, Tag] extends (Word => Set[Tag]) { def allWords: Set[Word]; def allTags: Set[Tag] def startWord: Word; def startTag: Tag; def endWord: Word; ...
dhgarrette/2014-ccg-supertagging
src/main/scala/dhg/ccg/tag/TagDictionary.scala
Scala
apache-2.0
4,640
import exceptions._ class Account(val bank: Bank, initialBalance: Double) { class Balance(var amount: Double) {} val balance = new Balance(initialBalance) val uid = bank.generateAccountId def withdraw(amount: Double): Unit = { balance.synchronized { if (balance.amount - amount < 0) throw new NoSu...
DagF/tdt4165_progspraak_project_h15
part2-exercise/src/main/scala/Account.scala
Scala
mit
776
package ui import com.beust.jcommander.Parameter import com.beust.jcommander.ParameterException import AST.TypeDecl import AST.GenericTypeDecl // importing names COVARIANT, CONTRAVARIANT, ... import AST.ASTNode._ object ComputeStats { def computeStats(typeDecls:Seq[TypeDecl]):LibStats = { val libstats = new LibSta...
jgaltidor/VarJ
src/VarJFrontend/ui/ComputeStats.scala
Scala
mit
3,012
object VersionKeys { import sbt.settingKey val snapshotScalaBinaryVersion = settingKey[String]("The Scala binary version to use when building against Scala SNAPSHOT.") def deriveBinaryVersion(sv: String, snapshotScalaBinaryVersion: String) = sv match { case snap_211 if snap_211.startsWith("2.11") && ...
som-snytt/scala-xml
project/keys.scala
Scala
bsd-3-clause
456
/* * 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/main/scala/fr/acinq/eclair/payment/send/MultiPartPaymentLifecycle.scala
Scala
apache-2.0
22,288
package com.aergonaut.lifeaquatic.block.storage import com.aergonaut.lifeaquatic.block.BlockBase import com.aergonaut.lifeaquatic.constants.Names class PearlBlock extends BlockBase(Names.Blocks.Storage.Pearl)
aergonaut/LifeAquatic
src/main/scala/com/aergonaut/lifeaquatic/block/storage/PearlBlock.scala
Scala
mit
211
package com.eevolution.context.dictionary.domain.api.repository import com.eevolution.context.dictionary._ /** * Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Publi...
adempiere/ADReactiveSystem
dictionary-api/src/main/scala/com/eevolution/context/dictionary/domain/api/repository/OrganizationInfoRepository.scala
Scala
gpl-3.0
1,151
/* * Copyright (C) 2016 Vincibean <Andre Bessi> * * 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...
Vincibean/ScalaForTheImpatient-Solutions
src/main/scala/org/vincibean/scala/impatient/chapter6/exercise3/Origin.scala
Scala
gpl-3.0
1,028
package pl.edu.icm.ceon.scala_commons.math import org.apache.commons.math.distribution.TDistributionImpl import org.apache.commons.math.stat.descriptive.SummaryStatistics import Math.sqrt /** * @author Michal Oniszczuk (m.oniszczuk@icm.edu.pl) * Created: 29.08.2013 11:36 */ package object confidenceInterva...
pdendek/CoAnSys
ceon-scala-commons-lite/src/main/scala/pl/edu/icm/ceon/scala_commons/math/confidenceInterval/package.scala
Scala
agpl-3.0
927
package org.nkvoll.javabin.routing.directives import spray.http.HttpHeaders.Accept import spray.http._ import spray.routing._ trait JsonDirectives extends Directives { def preferJsonResponsesForBrowsers: Directive0 = { (isBrowser & preferJsonResponses) | pass } def preferJsonResponses: Directive0 = { m...
nkvoll/javabin-rest-on-akka
src/main/scala/org/nkvoll/javabin/routing/directives/JsonDirectives.scala
Scala
mit
960
// Copyright (c) 2013-2020 Rob Norris and Contributors // This software is licensed under the MIT License (MIT). // For more information see LICENSE or https://opensource.org/licenses/MIT package doobie.postgres.syntax import cats._ import cats.syntax.all._ import doobie.implicits._ import doobie.postgres.sqlstate._ ...
tpolecat/doobie
modules/postgres/src/main/scala/doobie/postgres/syntax/syntax.scala
Scala
mit
32,624
package org.rebeam.boxes.core import org.rebeam.boxes.core._ import scalaz._ import Scalaz._ import BoxTypes._ import scala.annotation.tailrec import scala.collection.immutable.Set import BoxDelta._ import scala.language.implicitConversions import scalaz._ import Scalaz._ object BoxScriptImports { //These meth...
trepidacious/boxes-core
src/main/scala/org/rebeam/boxes/core/BoxScriptImports.scala
Scala
gpl-2.0
7,174
package base import org.scalatest.time.{Seconds, Span} import scala.concurrent.Future trait AsyncSpec { self: TestBaseDefinition => final def async[R](future: Future[R]): (R => Unit) => Unit = whenReady(future, timeout(Span(5, Seconds))) }
THK-ADV/lwm-reloaded
test/base/AsyncSpec.scala
Scala
mit
247
package bulu.actor.query import akka.actor.ActorLogging import akka.actor.Actor import bulu.util.HitCell import akka.actor.ActorRef import bulu.core.MeasureType import bulu.core.BitKey import bulu.util.Query import bulu.util.CacheFinished import bulu.util.QueryPartFinished import scala.collection.mutable.Ar...
hwzhao/bulu
src/main/scala/bulu/actor/query/DispatchCache.scala
Scala
apache-2.0
3,322
package scalariform.formatter import scalariform.parser._ import scalariform.formatter._ import scalariform.formatter.preferences._ // format: OFF class IndentWithTabsTest extends AbstractFormatterTest { implicit val formattingPreferences = FormattingPreferences.setPreference(IndentWithTabs, true) """class A { ...
daniel-trinh/scalariform
scalariform/src/test/scala/com/danieltrinh/scalariform/formatter/IndentWithTabsTest.scala
Scala
mit
3,038
/*********************************************************************** * Copyright (c) 2013-2017 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...
ronq/geomesa
geomesa-memory/geomesa-cqengine/src/main/scala/org/locationtech/geomesa/memory/cqengine/utils/CQEngineQueryVisitor.scala
Scala
apache-2.0
20,246
package sbt.extra.dsl import sbt._ import Scoped._ import Project.{richInitializeTask,richInitialize} object SimpleTasks { final def task(name: String) = new TaskId(name) final def setting(name: String) = new SettingId(name) }
etorreborre/sbt-extras
src/main/scala/SimpleDsl.scala
Scala
bsd-3-clause
233
package org.fayalite.ml.yahoo.finance import java.io.File import com.sksamuel.scrimage.Image import fa.{homeDir, readCSV} object ImgLoader { val path = new File(homeDir, "nerv") val train = new File(path, "train") val masks = readCSV(new File(path, "train_masks.csv").getCanonicalPath).tail def main(args: ...
ryleg/fayalite
ml/src/main/scala/org/fayalite/ml/yahoo/finance/ImgLoader.scala
Scala
mit
704
/* * Copyright 2011-2017 Chris de Vreeze * * 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...
dvreeze/yaidom
jvm/src/test/scala/eu/cdevreeze/yaidom/integrationtest/XmlToFlatFileTest.scala
Scala
apache-2.0
3,087
/* * Copyright 2001-2008 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...
vivosys/scalatest
src/main/scala/org/scalatest/tools/JUnitXmlReporter.scala
Scala
apache-2.0
15,917
package scife package enumeration package benchmarks import dependent._ import memoization._ import scife.{ enumeration => e } import scife.util._ import scife.util.logging._ import structures.riff._ import RiffFormat._ import org.scalatest._ import org.scalameter.api._ import scala.language.existentials class Ri...
kaptoxic/SciFe
src/bench/test/scala/scife/enumeration/benchmarks/RiffImage.scala
Scala
gpl-2.0
3,401
import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ import org.apache.spark.SparkConf import org.apache.spark.rdd.cl._ import Array._ import scala.math._ import org.apache.spark.rdd._ import java.net._ import scala.io.Source import org.apache.spark.mllib.linalg.Vectors import org.apache.spark.m...
agrippa/spark-swat
dataset-transformations/census/src/main/scala/census/CensusConverter.scala
Scala
bsd-3-clause
1,620
package pep_082 import scala.collection.mutable object wip { val filename = "src/pep_082/matrix.txt" // val input = io.Source.fromFile(filename).mkString.trim.split("\\n").map(_.split(",") map (_.toInt)) val input = """ |131 673 234 103 18 |201 96 342 965 150 |63...
filippovitale/pe
pe-solution/src/main/scala/pep_082/wip.scala
Scala
mit
3,110
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
yiheng/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/visualization/TrainSummary.scala
Scala
apache-2.0
3,188
/** * Copyright 2011-2017 GatlingCorp (http://gatling.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
timve/gatling
gatling-http/src/main/scala/io/gatling/http/action/sync/AddCookieBuilder.scala
Scala
apache-2.0
3,122
// Copyright 2016 Yahoo Inc. // Licensed under the terms of the Apache 2.0 license. // Please see LICENSE file in the project root for terms. package com.yahoo.ml.caffe import org.apache.spark.SparkContext import org.apache.spark.rdd.RDD import org.apache.spark.sql.{DataFrame, SQLContext} import org.apache.spark.stora...
yahoo/CaffeOnSpark
caffe-grid/src/main/scala/com/yahoo/ml/caffe/ImageDataFrame.scala
Scala
apache-2.0
3,199
/* * 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/iht-frontend
test/iht/views/application/exemption/partner/PartnerDateOfBirthViewTest.scala
Scala
apache-2.0
2,367
package com.lucidchart.relate import java.sql.{Connection, PreparedStatement, ResultSet} import scala.collection.compat._ import scala.language.higherKinds /** * CollectionsSql is a trait for collection SQL queries. * * It provides methods for parameter insertion and query execution. * {{{ * import com.lucidchar...
lucidsoftware/relate
relate/src/main/scala/com/lucidchart/relate/CollectionsSql.scala
Scala
apache-2.0
2,514
/* * Copyright 2012 Pellucid and Zenexity * * 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...
Enalmada/datomisca
core/src/main/scala/datomisca/AsPointT.scala
Scala
apache-2.0
1,772
/* * FILE: AggregateWithinPartitons.scala * Copyright (c) 2015 - 2019 GeoSpark Development Team * * 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/...
Sarwat/GeoSpark
viz/src/main/scala/org/datasyslab/geosparkviz/sql/operator/AggregateWithinPartitons.scala
Scala
mit
3,673
package moe.pizza.auth.webapp import moe.pizza.auth.config.ConfigFile.{ AuthConfig, AuthGroupConfig, ConfigFile } import moe.pizza.auth.graphdb.EveMapDb import moe.pizza.auth.interfaces.{BroadcastService, PilotGrader, UserDatabase} import moe.pizza.auth.models.Pilot import moe.pizza.auth.tasks.Update import moe....
xxpizzaxx/pizza-auth-3
src/test/scala/moe/pizza/auth/webapp/AutocompleteSpec.scala
Scala
mit
3,552
package org.bitcoins.core.protocol.script import org.bitcoins.core.util.BytesUtil import org.bitcoins.crypto.{ECDigitalSignature, ECPublicKey} import org.bitcoins.testkitcore.util.TestUtil import org.bitcoins.testkitcore.util.BitcoinSUnitTest import scodec.bits.ByteVector /** Created by chris on 2/17/16. */ class S...
bitcoin-s/bitcoin-s
core-test/src/test/scala/org/bitcoins/core/protocol/script/ScriptSignatureFactoryTest.scala
Scala
mit
2,068
/* * Copyright 2010 LinkedIn * * 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...
tcrayford/hafka
kafka/core/src/test/scala/unit/kafka/javaapi/consumer/ZookeeperConsumerConnectorTest.scala
Scala
bsd-3-clause
12,955
package com.github.dwiechert.scala.tinyweb class TinyWeb(controllers: Map[String, Controller], filters: List[(HttpRequest) => HttpRequest]) { def handleRequest(httpRequest: HttpRequest): Option[HttpResponse] = { val composedFilter = filters.reverse.reduceLeft((composed, next) => composed.compose(next)) val f...
DWiechert/functional-programming-patterns
src/main/scala/com/github/dwiechert/scala/tinyweb/TinyWeb.scala
Scala
apache-2.0
517
/* * 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 ...
hortonworks-spark/cloud-integration
cloud-examples/src/test/scala/com/cloudera/spark/cloud/s3/commit/S3APartitionedCommitterSuite.scala
Scala
apache-2.0
6,469
package composition.webserviceclients.vrmretentioneligibility import com.tzavellas.sse.guice.ScalaModule import composition.webserviceclients.vrmretentioneligibility.Helper.createResponse import org.mockito.Matchers.any import org.mockito.Mockito.when import org.scalatest.mock.MockitoSugar import play.api.http.Status....
dvla/vrm-retention-online
test/composition/webserviceclients/vrmretentioneligibility/EligibilityWebServiceCallWithCurrentAndEmptyReplacement.scala
Scala
mit
1,482
/* import io.netty.bootstrap.Bootstrap import io.netty.channel.nio.NioEventLoopGroup import io.netty.channel.socket.nio.NioDatagramChannel import io.netty.channel._ import io.netty.channel.socket.DatagramPacket import io.netty.handler.codec.MessageToMessageDecoder import java.net.InetSocketAddress import java.util.Date...
haghard/gateway-server
perf-test/broadcast-monitor.scala
Scala
apache-2.0
2,112
package me.breidenbach.scalauth import me.breidenbach.scalauth.identifier.ScauthIdentifier /** * Date: 1/19/14 * Time: 8:29 PM * Copyright 2014 Kevin E. Breidenbach * @author Kevin E. Breidenbach */ trait UserService[T <: ScauthIdentifier] { def save(identifier: ScauthIdentifier): Either[T, Error] def find(...
kbreidenbach/scalauth
src/main/scala/me/breidenbach/scalauth/UserService.scala
Scala
mit
843
package com.twitter.finatra.json.internal.streaming import com.twitter.finatra.conversions.bytebuffer._ import com.twitter.inject.Test import com.twitter.io.Buf class ByteBufferUtilsTest extends Test { "ByteBufferUtils.append" in { val input = Buf.ByteBuffer.Shared.extract(Buf.Utf8("1")) input.get() va...
deanh/finatra
jackson/src/test/scala/com/twitter/finatra/json/internal/streaming/ByteBufferUtilsTest.scala
Scala
apache-2.0
456
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.testsuite.javalib.io impo...
scala-js/scala-js
test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/io/MockByteArrayOutputStream.scala
Scala
apache-2.0
1,303
/*********************************************************************** * Copyright (c) 2013-2019 Commonwealth Computer Research, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and...
elahrvivaz/geomesa
geomesa-kudu/geomesa-kudu-spark/src/main/scala/org/locationtech/geomesa/kudu/spark/KuduSpatialRDDProvider.scala
Scala
apache-2.0
3,496
package scalaxy.streams package test import org.junit._ import org.junit.Assert._ class TransformationClosureTest extends StreamComponentsTestBase with TransformationClosures { import global._ @Test def testNoOpTuple2 { val f = typecheck(q""" (p: (Int, Int)) => p match { case pp @ (x, y) => ...
nativelibs4java/scalaxy-streams
src/test/scala/matchers/TransformationClosuresTest.scala
Scala
bsd-3-clause
4,923
package sbt package dependencygraph object DependencyGraphSbtCompat { object Implicits }
jrudolph/sbt-dependency-graph
src/main/scala-sbt-1.0/sbt/dependencygraph/DependencyGraphSbtCompat.scala
Scala
apache-2.0
92
package com.thetestpeople.trt.jenkins.trigger import org.junit.runner.RunWith import org.scalatest._ import org.scalatest.junit.JUnitRunner import com.thetestpeople.trt.model.QualifiedName @RunWith(classOf[JUnitRunner]) class MavenParamHelperTest extends FlatSpec with ShouldMatchers { "A single test from a single ...
thetestpeople/trt
test/com/thetestpeople/trt/jenkins/trigger/MavenParamHelperTest.scala
Scala
mit
1,128
/* 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 com.jspha.maia.examples.api1 import com.jspha.maia._ import cats.Id final case class Location[F <: Dsl](...
MaiaOrg/scala-maia
maia/src/test/scala-2.12/com/jspha/maia/examples/api1/Location.scala
Scala
mpl-2.0
834
/* * 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
mllib/src/main/scala/org/apache/spark/ml/regression/RandomForestRegressor.scala
Scala
apache-2.0
8,443
package se.culvertsoft.mgen.compiler.util import scala.language.implicitConversions object SourceCodeBuffer { implicit def SourceCodeBuffer2String(s: SourceCodeBuffer) = s.toString private val cachedInstances = new ThreadLocal[SourceCodeBuffer] { override def initialValue(): SourceCodeBuffer = { new S...
culvertsoft/mgen
mgen-compiler/src/main/scala/se/culvertsoft/mgen/compiler/util/SourceCodeBuffer.scala
Scala
mit
2,128
package crea.nlp import scala.xml.XML import scala.xml.Elem import scala.util.Random import scalaz._ import scalaz.concurrent._ import scala.concurrent.duration._ import scalaz.stream._ import Scalaz._ import java.io.{PrintStream, OutputStream} import java.util.Date import java.text.SimpleDateFormat import epic.pre...
markfarrell/relation-extraction
src/main/scala/crea/nlp/Pubmed.scala
Scala
lgpl-3.0
12,308
/* * Copyright 2014 Alan Rodas Bonjour * * 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 ...
alanrodas/scaland
vcs/src/main/scala/com/alanrodas/scaland/vcs/package.scala
Scala
apache-2.0
1,854
package jsmessages import javax.inject.{Inject, Singleton} import play.api.i18n.MessagesApi import scala.collection.compat._ /** * Defines various methods returning a [[JsMessages]] instance. * * Typical usage: * * {{{ * import jsmessages.JsMessagesFactory * import play.api.i18n.{I18nSupport, MessagesApi...
julienrf/play-jsmessages
jsmessages/src/main/scala/jsmessages/JsMessagesFactory.scala
Scala
mit
1,915
package nl.dekkr.pagefetcher import akka.http.scaladsl.Http import akka.stream.ActorMaterializer import akka.stream.scaladsl.{Sink, Source} import com.typesafe.config.ConfigFactory import com.typesafe.scalalogging.Logger import nl.dekkr.pagefetcher.actors.{BootedCore, CoreActors} import nl.dekkr.pagefetcher.messages.R...
dekkr/pagefetcher
src/main/scala/nl/dekkr/pagefetcher/Boot.scala
Scala
mit
2,298
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
maropu/spark
mllib/src/test/scala/org/apache/spark/ml/feature/VarianceThresholdSelectorSuite.scala
Scala
apache-2.0
5,776
package fpinscala.gettingstarted // A comment! /* Another comment */ /** A documentation comment */ object MyModule { def abs(n: Int): Int = if (n < 0) -n else n private def formatAbs(x: Int) = { val msg = "The absolute value of %d is %d" msg.format(x, abs(x)) } def main(args: Array[String]):...
lzongren/fpinscala
exercises/src/main/scala/fpinscala/gettingstarted/GettingStarted.scala
Scala
mit
5,492
/* * Copyright 2007-2010 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
lift/lift
examples/example/src/main/scala/net/liftweb/example/snippet/Json.scala
Scala
apache-2.0
1,634
package scala.test.twitter_scrooge import scala.test.twitter_scrooge.thrift.Struct1 import scala.test.twitter_scrooge.thrift.thrift2.Struct2A import scala.test.twitter_scrooge.thrift.thrift2.Struct2B import scala.test.twitter_scrooge.thrift.thrift2.thrift3.Struct3 object JustScrooge1 { val classes = Seq(classOf[Str...
sdtwigg/rules_scala
test/src/main/scala/scala/test/twitter_scrooge/JustScrooge1.scala
Scala
apache-2.0
470
package io.skysail.app.dbviewer.resources import io.skysail.core.app.SkysailApplication import io.skysail.core.restlet.ResourceContextId import io.skysail.core.restlet.resources._ import io.skysail.queryfilter.filter.Filter import io.skysail.queryfilter.pagination.Pagination import org.json4s.DefaultFormats import jav...
evandor/skysail-notes
skysail.app.dbviewer/src/io/skysail/app/dbviewer/resources/schemasResources.scala
Scala
apache-2.0
2,164
/* * 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 ...
tophua/spark1.52
yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnAllocator.scala
Scala
apache-2.0
24,526
package org.jetbrains.plugins.scala package lang.refactoring.ui import javax.swing.Icon import com.intellij.icons.AllIcons import com.intellij.psi.{PsiElement, PsiModifierList, PsiModifierListOwner} import com.intellij.refactoring.classMembers.MemberInfoModel import com.intellij.refactoring.ui.AbstractMemberSelection...
triggerNZ/intellij-scala
src/org/jetbrains/plugins/scala/lang/refactoring/ui/ScalaMemberSelectionTableBase.scala
Scala
apache-2.0
2,799
import scala.tools.nsc.doc.base._ import scala.tools.nsc.doc.model._ import scala.tools.partest.ScaladocModelTest // scala/bug#5079 "Scaladoc can't link to an object (only a class or trait)" // scala/bug#4497 "Links in Scaladoc - Spec and implementation unsufficient" // scala/bug#4224 "Wiki-links should support method...
martijnhoekstra/scala
test/scaladoc/run/links.scala
Scala
apache-2.0
1,594
package pl.touk.nussknacker.engine.util.loader import pl.touk.nussknacker.engine.api.NamedServiceProvider import pl.touk.nussknacker.engine.util.multiplicity.{Empty, Many, Multiplicity, One} import java.util.ServiceLoader import scala.reflect.ClassTag object ScalaServiceLoader { import scala.collection.JavaConvert...
TouK/nussknacker
utils/utils-internal/src/main/scala/pl/touk/nussknacker/engine/util/loader/ScalaServiceLoader.scala
Scala
apache-2.0
1,818
package troy.driver.query.select import shapeless._ import troy.driver.schema.column.ColumnType import troy.tast._ trait BindMarkerTypesOfWhereClause[Version, Table <: TableName[_, _], Relations <: WhereClause.Relations] { type Out <: HList } object BindMarkerTypesOfWhereClause { type Aux[V, T <: TableName[_, _]...
schemasafe/troy
troy-driver/src/main/scala/troy/driver/query/select/BindMarkerTypesOfWhereClause.scala
Scala
apache-2.0
1,635
/* * 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 ...
lvdongr/spark
sql/hive/src/test/scala/org/apache/spark/sql/sources/ParquetHadoopFsRelationSuite.scala
Scala
apache-2.0
8,459