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
import org.scalatest.{Matchers, FunSuite} /** @version 1.0.0 */ class ArmstrongNumbersTest extends FunSuite with Matchers { test("Single digit numbers are Armstrong numbers") { ArmstrongNumbers.isArmstrongNumber(5) should be (true) } test("There are no 2 digit Armstrong numbers") { pending Armstron...
exercism/xscala
exercises/practice/armstrong-numbers/src/test/scala/ArmstrongNumbersTest.scala
Scala
mit
1,219
// Databricks notebook source exported at Thu, 7 Jul 2016 04:38:56 UTC // MAGIC %md // MAGIC // MAGIC # [Scalable Data Science](http://www.math.canterbury.ac.nz/~r.sainudiin/courses/ScalableDataScience/) // MAGIC // MAGIC // MAGIC ### Course Project by [Akinwande Atanda](https://nz.linkedin.com/in/akinwande-atanda) ...
lamastex/scalable-data-science
db/studentProjects/02_AkinwandeAtanda/Tweet_Analytics/041_TA01_02_Filtered_Tweets_Collector_Set-up_by_Keywords_and_Hashtags.scala
Scala
unlicense
12,409
/* * 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 ...
bhoppi/zen
ml/src/test/scala/com/github/cloudml/zen/ml/neuralNetwork/StackedRBMSuite.scala
Scala
apache-2.0
1,274
/* Copyright 2017-19, Emmanouil Antonios Platanios. 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 ...
eaplatanios/tensorflow_scala
modules/api/src/main/scala/org/platanios/tensorflow/api/ops/metrics/package.scala
Scala
apache-2.0
16,961
package org.vaadin.addons.vaactor.demo import org.vaadin.addons.vaactor._ import org.vaadin.addons.vaactor.chat.ChatComponent import com.vaadin.flow.component.orderedlayout.VerticalLayout import com.vaadin.flow.component.page.Push import com.vaadin.flow.router.Route import com.vaadin.flow.shared.communication.PushMode...
otto-ringhofer/vaactor
demo/src/main/scala/org/vaadin/addons/vaactor/demo/SessionUI.scala
Scala
apache-2.0
1,720
package coursera import scala.concurrent.{ExecutionContext, Future} import scala.util.{Failure, Success, Try} package object extensions { implicit class ListExtensions[T](val source: List[T]) extends AnyVal { def sumBy(keySelector: T => Int): Int = ??? private def sumBy[B](keySelector: T => B)(implicit nu...
mitochon/hexercise
src/mooc/reactive/week4.codesamples/src/test/scala/coursera/Extensions.scala
Scala
mit
1,358
package at.logic.gapt.grammars import at.logic.gapt.expr._ import at.logic.gapt.expr.fol.folSubTerms import at.logic.gapt.expr.fol.Utils.numeral import at.logic.gapt.expr.hol.{ atoms, lcomp, simplify, toNNF } import at.logic.gapt.provers.maxsat.{ MaxSATSolver, bestAvailableMaxSatSolver } import at.logic.gapt.utils.Log...
gebner/gapt
core/src/main/scala/at/logic/gapt/grammars/induction.scala
Scala
gpl-3.0
5,204
package com.dominikgruber.fpinscala.chapter03 import org.scalatest._ class Exercise25Spec extends FlatSpec with Matchers { "size" should "count correctly" in { val b = Branch(Branch(Leaf(1), Leaf(2)), Leaf(3)) Tree.size(b) should be (5) } }
TheDom/functional-programming-in-scala
src/test/scala/com/dominikgruber/fpinscala/chapter03/Exercise25Spec.scala
Scala
mit
255
/* __ *\\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2002-2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\\___/_/...
felixmulder/scala
src/library/scala/Boolean.scala
Scala
bsd-3-clause
5,343
import com.bizo.mighty.csv.CSVReader import java.net.URLEncoder import org.apache.jena.riot.RDFFormat import org.apache.jena.riot.RDFDataMgr import java.io.FileOutputStream import org.apache.jena.rdf.model.ResourceFactory import org.apache.jena.rdf.model.Resource import org.apache.jena.rdf.model.ModelFactory import org...
jiemakel/anything2rdf
src/main/scala/schoenbergcsv2rdf.scala
Scala
mit
19,726
//package scray.querying.source // //import scray.querying.description.Row //import scray.querying.queries.DomainQuery //import scray.querying.description.TableIdentifier //import scray.querying.description.Column //import scala.reflect.ClassTag //import scray.querying.description.ColumnOrdering //import scray.querying...
scray/scray
scray-querying/modules/scray-querying/src/main/scala/scray/querying/source/AbstractRangeSetHashJoinSource.scala
Scala
apache-2.0
3,466
/* * Copyright 2015 Foundational Development * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
rssvihla/datastax_work
spark_commons/benchmarks/low_latency_spark/src/main/scala/pro/foundev/calculations/LogCalculatorImpl.scala
Scala
apache-2.0
1,403
import Dependencies._ import Merging._ import Testing._ import Version._ import sbt.Keys.{scalacOptions, _} import sbt._ import sbtassembly.AssemblyPlugin.autoImport._ import org.scalafmt.sbt.ScalafmtPlugin.autoImport.scalafmtOnCompile object Settings { lazy val artifactory = "https://artifactory.broadinstitute.org/...
broadinstitute/sam
project/Settings.scala
Scala
bsd-3-clause
4,211
package org.ai4fm.proofprocess.core.store import org.ai4fm.proofprocess.ProofEntry import org.eclipse.core.runtime.CoreException /** * @author Andrius Velykis */ trait IProofEntryTracker { @throws(classOf[CoreException]) def initTrackLatestEntry(f: ProofEntry => Unit) def dispose() }
andriusvelykis/proofprocess
org.ai4fm.proofprocess.core/src/org/ai4fm/proofprocess/core/store/IProofEntryTracker.scala
Scala
epl-1.0
302
/* # Copyright 2016 Georges Lipka # # 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 wri...
glipka/Easy-React-With-ScalaJS
src/main/scala/com/glipka/easyReactJS/react/jsx/ElementAttributesProperty.scala
Scala
apache-2.0
1,077
package com.twitter.finagle.exp.mysql import com.twitter.finagle.exp.mysql._ import com.twitter.finagle.{Service, ServiceFactory} import com.twitter.util.{Await, Closable, Future, Time} import org.junit.runner.RunWith import org.mockito.Matchers.any import org.mockito.Mockito.{times, verify, when} import org.scalatest...
jpederzolli/finagle
finagle-mysql/src/test/scala/com/twitter/finagle/mysql/unit/PreparedStatementTest.scala
Scala
apache-2.0
1,439
import sbt._ class TLFProject(info: ProjectInfo) extends DefaultProject(info) { val newReleaseToolsRepository = "Scala Tools Repository" at " http://nexus.scala-tools.org/content/repositories/snapshots/" val scalatest = "org.scalatest" % "scalatest" % "1.2-for-scala-2.8.0.RC6-SNAPSHOT" override def managedStyl...
benb/tlf
project-old/build/src/Tlf.scala
Scala
mit
444
package solarsystemscalemodel.mithril //A Mithril implementation of scalatags (based on the scalatags DOM implemention) trait Tags extends scalatags.generic.Tags[MithrilBuilder, MithrilElement, MithrilNode] { // Root Element val html = "html".tag[MithrilElement] // Document Metadata val head = "head".tag[Mith...
thomasrynne/SolarSystemScaleModel
base/src/main/scala/solarsystemscalemodel/mithril/Tags.scala
Scala
mit
3,589
/** * Copyright (C) 2016-2017 Lightbend Inc. <https://www.lightbend.com> */ package lagom case class CliOption[T](private val value: T) { def get: T = value } object CliOption { def apply[T](path: String, default: T)(implicit ev: CliOptionParser[T]): CliOption[T] = ev.parse(path, default) implicit class Bool...
edouardKaiser/lagom
project/CliOptions.scala
Scala
apache-2.0
776
package odelay.netty class Netty3TimerSpec extends odelay.testing.TimerSpec { def newTimer = NettyTimer.newTimer def timerName = "Netty3Timer" }
softprops/odelay
odelay-netty3/src/test/scala/NettyTimerSpec.scala
Scala
mit
150
package com.nhlreplay.parser.playbyplay trait Trimmer { def preserve(text: String): String = text def removeCounts(text: String): String = text.replaceAll("""\\(\\d+\\)""", "") def removeDots(text: String): String = text.replaceAll("""\\.""", "") def toInt(text: String): Int = text.toInt def trimWhitespace(t...
peruukki/NHLReplay
app/com/nhlreplay/parser/playbyplay/Trimmer.scala
Scala
mit
1,171
package alexsmirnov.pbconsole import alexsmirnov.scalafx.ObservableImplicits package object print extends ObservableImplicits { }
alexsmirnov/printrbot-g2-console
src/main/scala/alexsmirnov/pbconsole/print/package.scala
Scala
bsd-3-clause
133
/* * Copyright 2013 Toshiyuki Takahashi * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this lis...
igor-borisov/JSCORM
valamis-slick-support/src/main/scala/com/arcusys/valamis/persistence/common/joda/JodaDateTimeMapper.scala
Scala
gpl-3.0
2,626
package nested_objects_yaml import org.scalacheck.Gen import org.scalacheck.Arbitrary import play.api.libs.json.scalacheck.JsValueGenerators import Arbitrary._ object Generators extends JsValueGenerators { def createNestedObjectsNestedGenerator = _generate(NestedObjectsNestedGenerator) def createNe...
zalando/play-swagger
play-scala-generator/src/test/resources/expected_results/test_data/nested_objects_yaml.scala
Scala
mit
2,380
package org.tuubes.core.engine /** * An actor is a basic isolated "entity" that reacts to the messages it receives. The only way to * interact with an actor is to send it an [[ActorMessage]]. * * @author TheElectronWill */ trait Actor { /** * Sends a message to this actor. * * @param msg the message */...
mcphoton/Photon-Server
core/src/main/scala/org/tuubes/core/engine/Actor.scala
Scala
lgpl-3.0
1,059
package com.v_standard.scalikejdbc.orm.dao import com.v_standard.scalikejdbc.orm.{DBSpecBase, PagingSeq} import com.v_standard.scalikejdbc.orm.condition.{Condition, LogicalExpressionCondition} import com.v_standard.scalikejdbc.orm.definition.{AbstractEntityDefinition, Column, EntityBase, ReferenceTable} import com.v_s...
VanishStandard/scalikejdbc-orm
src/test/scala/com/v_standard/scalikejdbc/orm/dao/ReadDaoSpec.scala
Scala
bsd-3-clause
49,395
/* * 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
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
Scala
apache-2.0
12,402
/** * Copyright 2015 Thomson Reuters * * 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...
thomsonreuters/CM-Well
server/cmwell-formats/src/main/scala/cmwell/formats/Formatter.scala
Scala
apache-2.0
22,866
package org.http4s.server.middleware.authentication import java.util.LinkedHashMap import scala.annotation.tailrec private[authentication] object NonceKeeper { sealed abstract class Reply case object StaleReply extends Reply case object OKReply extends Reply case object BadNCReply extends Reply } /** ...
ZizhengTai/http4s
server/src/main/scala/org/http4s/server/middleware/authentication/NonceKeeper.scala
Scala
apache-2.0
2,698
/* * Protein.scala * A protein class, which is an Element[AminoAcidSequence]. * * Created By: Brian Ruttenberg ([email protected]) * Creation Date: Oct 1, 2012 * * Copyright 2013 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email [email protected] for information. * ...
bruttenberg/figaro
FigaroExamples/src/main/scala/com/cra/figaro/example/dosage/Protein.scala
Scala
bsd-3-clause
1,663
package mesosphere.marathon.integration.facades import MesosFacade.{ ITResourcePortValue, ITResourceScalarValue, ITResources } object MesosFormats { import MesosFacade._ import mesosphere.marathon.api.v2.json.Formats.FormatWithDefault import play.api.libs.functional.syntax._ import play.api.libs.json._ imp...
ss75710541/marathon
src/test/scala/mesosphere/marathon/integration/facades/MesosFormats.scala
Scala
apache-2.0
2,282
/* * Copyright 2015 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 agreed t...
jasimmk/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/model/ArrayTimeSeqSuite.scala
Scala
apache-2.0
929
package nodes.images import breeze.linalg.DenseVector import pipelines._ import utils.{ImageMetadata, ChannelMajorArrayVectorizedImage, Image} import workflow.Transformer import utils.external.NativeRoutines /** * This node takes an image and performs pooling on regions of the image. * based on Pooler and Symmetri...
Vaishaal/ckm
keystone_pipeline/src/main/scala/nodes/NativePoolingSymmetricRectifier.scala
Scala
apache-2.0
812
/* * 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/test/scala/uk/gov/hmrc/ct/accounts/frs10x/boxes/AC15Spec.scala
Scala
apache-2.0
1,216
/* NSC -- new Scala compiler * Copyright 2005-2013 LAMP/EPFL * @author Martin Odersky */ package scala.tools.nsc package symtab import classfile.ClassfileParser import java.io.IOException import scala.reflect.internal.MissingRequirementError import scala.reflect.internal.util.Statistics import scala.reflect.io.{A...
jvican/scala
src/compiler/scala/tools/nsc/symtab/SymbolLoaders.scala
Scala
bsd-3-clause
13,759
package model import org.bson.types.ObjectId import org.joda.time.{Interval, LocalDate, DateTime} case class Donation( id: ObjectId = new ObjectId, posted: DateTime, donation: String, location: String, collectDate...
foodcloud/bonobo
app/model/Donation.scala
Scala
apache-2.0
509
/* Copyright 2009-2021 EPFL, Lausanne */ package stainless package ast trait TypeOps extends inox.ast.TypeOps { protected val trees: Trees import trees._ import symbols.{given, _} def unapplyAccessorResultType(id: Identifier, inType: Type): Option[Type] = lookupFunction(id) .filter(_.params.size ==...
epfl-lara/stainless
core/src/main/scala/stainless/ast/TypeOps.scala
Scala
apache-2.0
3,142
package com.twitter.finagle.context import com.twitter.finagle.benchmark.StdBenchAnnotations import org.openjdk.jmh.annotations.{Benchmark, Level, Param, Scope, Setup, State} import org.openjdk.jmh.infra.Blackhole // ./sbt 'project finagle-benchmark' 'jmh:run LocalContextBenchmark -prof gc' @State(Scope.Benchmark) cl...
twitter/finagle
finagle-benchmark/src/main/scala/com/twitter/finagle/context/LocalContextBenchmark.scala
Scala
apache-2.0
1,776
/* ____ __ ____ ____ ____,,___ ____ __ __ ____ * ( _ \\ /__\\ (_ )(_ _)( ___)/ __) ( _ \\( )( )( _ \\ Read * ) / /(__)\\ / /_ _)(_ )__) \\__ \\ )___/ )(__)( ) _ < README.txt * (_)\\_)(__)(__)(____)(____)(____)(___/ (__) (______)(____/ LICENSE.txt */ package ...
razie/diesel-rx
diesel/src/main/scala/razie/diesel/engine/exec/EECtx.scala
Scala
apache-2.0
24,422
/** * Copyright (c) 2014 Marco Sarti <marco.sarti at gmail.com> * * 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, ...
elogiclab/guardbee
modules/core/test/com/elogiclab/guardbee/core/authz/AuthzSpec.scala
Scala
mit
4,154
package models.generator.android import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers class AndroidJavaUtilTest extends AnyFlatSpec with Matchers with AndroidJavaUtil{ "toParameterName" should "convert array" in { toParamName("[some_param]", false) should be("SomeParam"...
mbryzek/apidoc-generator
android-generator/src/test/scala/models/generator/android/AndroidJavaUtilTest.scala
Scala
mit
5,612
package java.time.chrono import java.time.temporal._ import java.{util => ju} trait ChronoLocalDate extends Temporal with TemporalAdjuster with Comparable[ChronoLocalDate] { import ChronoField._ def getChronology(): Chronology def getEra(): Era = getChronology().eraOf(get(ERA)) def isLeapYear(): Boolea...
sjrd/scala-js-java-time
src/main/scala/java/time/chrono/ChronoLocalDate.scala
Scala
bsd-3-clause
3,476
/* * 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 ...
SarathChandran/squbs
squbs-pattern/src/test/scala/org/squbs/pattern/orchestration/OrchestratorStressTest.scala
Scala
apache-2.0
8,686
package com.themillhousegroup.sses import play.api.mvc._ import sun.misc.BASE64Decoder import scala.concurrent.Future object BasicAuthProtected { private lazy val unauthResult = Results.Unauthorized.withHeaders(("WWW-Authenticate", "Basic realm=\\"myRealm\\"")) private lazy val challenge = Future.successful(Some...
themillhousegroup/sses
src/main/scala/com/themillhousegroup/sses/BasicAuthProtected.scala
Scala
mit
3,128
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
intel-analytics/BigDL
scala/dllib/src/test/scala/com/intel/analytics/bigdl/dllib/nn/ops/IndicatorColSpec.scala
Scala
apache-2.0
2,419
/* * Copyright 2015-2016 David R. Bild * * 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...
nscala-money/nscala-money
core/src/main/scala/com/github/nscala_money/money/Conversions.scala
Scala
apache-2.0
894
import java.io.File import testgen.TestSuiteBuilder.{toString, _} import testgen._ object ConnectTestGenerator { def main(args: Array[String]): Unit = { val file = new File("src/main/resources/connect.json") def toString(expected: CanonicalDataParser.Expected): String = { expected match { cas...
ricemery/xscala
testgen/src/main/scala/ConnectTestGenerator.scala
Scala
mit
1,776
package BIDMat abstract class CLSpec extends BIDMatSpec { override def beforeAll { super.beforeAll Mat.useOpenCL = true Mat.checkOpenCL(true) } override def afterAll { Mat.clHandle.free() } }
phlip9/BIDMat
src/test/scala/BIDMat/CLSpec.scala
Scala
bsd-3-clause
221
// demonstrates selection on non-path types. Needs to be fleshed out to // become a real test. object Test { class C { type T val f: T => T = ??? } var x = new C val y = x.f }
densh/dotty
tests/pending/pos/depsel.scala
Scala
bsd-3-clause
196
/* * Copyright 2017 Datamountaineer. * * 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...
CodeSmell/stream-reactor
kafka-connect-pulsar/src/main/scala/com/datamountaineer/streamreactor/connect/pulsar/source/PulsarSourceConnector.scala
Scala
apache-2.0
2,770
package com.ubirch.avatar.core.device import com.ubirch.avatar.core.test.model.DummyDeviceHistory import com.ubirch.avatar.core.test.util.DeviceHistoryTestUtil import com.ubirch.avatar.model.rest.device.DeviceHistory import com.ubirch.avatar.test.base.ElasticsearchSpec import com.ubirch.util.json.MyJsonProtocol import...
ubirch/ubirch-avatar-service
core/src/test/scala/com/ubirch/avatar/core/device/DeviceHistoryManagerSpec.scala
Scala
apache-2.0
19,788
class S { J.foo(null) // Java static methods are also nullified }
som-snytt/dotty
tests/explicit-nulls/pos/interop-static-src/S.scala
Scala
apache-2.0
71
/* * 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/main/scala/org/apache/spark/sql/execution/datasources/v2/csv/CSVScanBuilder.scala
Scala
apache-2.0
2,155
package org.eichelberger.sfc.utils import com.typesafe.scalalogging.slf4j.LazyLogging import org.junit.runner.RunWith import org.specs2.mutable.Specification import org.specs2.runner.JUnitRunner import BitManipulations._ @RunWith(classOf[JUnitRunner]) class BitManipulationsTest extends Specification with LazyLogging...
cne1x/sfseize
src/test/scala/org/eichelberger/sfc/utils/BitManipulationsTest.scala
Scala
apache-2.0
1,293
package com.gilesc package arrow import cats.Monad import cats.data.Kleisli abstract class Service[F[_]: Monad, Req, Resp] { def apply(): Kleisli[F, Req, Resp] = Kleisli.apply(run) def run(req: Req): F[Resp] def andThen[C]( service: Service[F, Resp, C] ): Kleisli[F, Req, C] = this.apply().andThen(service...
CraigGiles/mynab
arrow/src/main/scala/com/gilesc/arrow/Service.scala
Scala
mit
518
package com.cloudray.scalapress.plugin.ecommerce.tag import org.scalatest.{FlatSpec, OneInstancePerTest} import org.scalatest.mock.MockitoSugar import com.cloudray.scalapress.plugin.ecommerce.tags.BasketLineVariationTag import com.cloudray.scalapress.plugin.ecommerce.domain.BasketLine import com.cloudray.scalapress.it...
vidyacraghav/scalapress
src/test/scala/com/cloudray/scalapress/plugin/ecommerce/tag/BasketLineVariationTagTest.scala
Scala
apache-2.0
1,635
package service import com.google.inject.Inject import models.Teaser import play.api.i18n.Lang import scala.concurrent.{ExecutionContext, Future} trait CarouselService { def carousel(implicit lang: Lang, ec: ExecutionContext): Future[Seq[Teaser]] } class CarouselServiceImpl @Inject()(ws: WsConsumer) extends Carou...
splink/pagelets-seed
app/service/CarouselService.scala
Scala
apache-2.0
484
package modulo_app import core_app._ import config_app._ import errores_app._ import java.io.{File, FileInputStream, FileOutputStream} import scala.swing.TextArea import scala.util.{Try, Success, Failure} import java.util.regex.{Matcher, Pattern} trait Modulo { def startFunction : Unit /** * Funcion = getF...
EricQuinterX/ordenador-de-archivos
src/main/scala/funciones.scala
Scala
apache-2.0
5,845
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js API ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-lang.org/ ** ** /____/\\...
cedricviaccoz/scala-native
javalib/src/main/scala/niocharset/StandardCharsets.scala
Scala
bsd-3-clause
1,396
package uk.co.turingatemyhamster package owl2 package ast /** * * * @author Matthew Pocock */ trait ObjectPropertyCardinalityRestrictionsModuleImpl extends owl2.ObjectPropertyCardinalityRestrictionsModule { importedModules : owl2.EntitiesLiteralsAnonymousIndividualsModule with owl2.IriModule { type Unlimite...
drdozer/owl2
core/src/main/scala/uk/co/turingatemyhamster/owl2/ast/PropertyCardinalityRestrictionsModuleAst.scala
Scala
apache-2.0
1,347
/* * Copyright (c) 2014 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...
mdavid/lessig-bigdata
lib/snowplow/3-enrich/scala-hadoop-shred/src/main/scala/com.snowplowanalytics.snowplow.enrich/hadoop/outputs/ShreddedPartition.scala
Scala
mit
2,098
import sbt._ import Keys._ object MacrosActivatorBuild extends Build { import BuildSettings._ lazy val root: Project = Project( "root", file("."), settings = buildSettings) aggregate (macros, demo) lazy val macros: Project = Project( "macros", file("macros"), settings = buildSettings ++...
eigengo/activator-macros
project/build.scala
Scala
apache-2.0
2,021
package beyond import beyond.config.BeyondConfiguration import play.api.libs.concurrent.Promise import play.api.mvc._ import play.api.mvc.Results.InternalServerError import scala.concurrent.ExecutionContext import scala.concurrent.Future object TimeoutFilter extends Filter { import ExecutionContext.Implicits.global...
SollmoStudio/beyond
core/app/beyond/TimeoutFilter.scala
Scala
apache-2.0
753
import scala.io._ import scala.actors._ import Actor._ object PageLoader { def getPageSize(url : String) = Source.fromURL(url).mkString.length def getPageText(url : String) = Source.fromURL(url).mkString } var urls = List("http://gmail.google.com", "https://www.linkedin.com/", "http://www.twitter.com") def t...
brice/seven-adventure
Week4/day3/sizer_links.scala
Scala
gpl-3.0
1,082
package org.scalameta.invariants import scala.compat.Platform.EOL class InvariantFailedException(message: String) extends Exception(message) object InvariantFailedException { def raise(invariant: String, failures: List[String], debuggees: Map[String, Any]): Nothing = { val mandatory = s""" |invariant failed...
scalameta/scalameta
scalameta/common/shared/src/main/scala/org/scalameta/invariants/Exceptions.scala
Scala
bsd-3-clause
828
package akka.persistence.hbase.journal import org.apache.hadoop.conf.Configuration import org.apache.hadoop.hbase.client._ import org.apache.hadoop.hbase.util.Bytes import com.typesafe.config._ import org.apache.hadoop.hbase.{ HColumnDescriptor, HTableDescriptor } import akka.persistence.hbase.common.Const._ object H...
hossx/akka-persistence-hbase
src/main/scala/akka/persistence/hbase/journal/HBaseJournalInit.scala
Scala
apache-2.0
3,653
package sky.dispatcher.example.Dispatcher import akka.actor.{Props, ActorSystem} import akka.routing.RoundRobinRouter import com.typesafe.config.ConfigFactory import sky.MsgEchoActor /** * Created by szekai on 22/08/2014. */ object Example1 { def main(args: Array[String]): Unit = { val _system = ActorSystem.c...
szekai/akka-example
AkkaDispatcherExample/src/main/scala/sky/dispatcher/example/Dispatcher/Example1.scala
Scala
apache-2.0
633
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
jedesah/Quasar
blueeyes/src/main/scala/quasar/precog/common/Metadata.scala
Scala
apache-2.0
8,365
given { def foo = 1 // error }
som-snytt/dotty
tests/neg/empty-given.scala
Scala
apache-2.0
33
/** * 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...
stealthly/mirror-maker-mesos
src/main/scala/ly/stealth/mesos/mirrormaker/Util.scala
Scala
apache-2.0
8,173
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
pgandhi999/spark
streaming/src/main/scala/org/apache/spark/streaming/api/java/JavaStreamingContext.scala
Scala
apache-2.0
29,080
package com.example import java.util.concurrent.TimeUnit import akka.actor.{Actor, ActorSystem, Props} import akka.io.IO import spray.can.Http import spray.can.server.Stats import scala.concurrent.duration._ object Boot extends App { // we need an ActorSystem to host our application in implicit val system = Ac...
rafax/c100k
spray/src/main/scala/com/example/Boot.scala
Scala
gpl-2.0
1,114
package im.actor.server.email import im.actor.config.ActorConfig import scala.util.Try import com.github.kxbmap.configs.syntax._ import com.typesafe.config.Config private[email] case class Sender(address: String, name: String, prefix: String) private[email] case class Smtp(host: String, port: Int, username: String, ...
EaglesoftZJ/actor-platform
actor-server/actor-email/src/main/scala/im/actor/server/email/EmailConfig.scala
Scala
agpl-3.0
600
import scala.quoted.* object Macros { inline def test(): String = ${ testImpl } private def testImpl(using Quotes) : Expr[String] = { import quotes.reflect.* val classSym = TypeRepr.of[Function1].classSymbol.get classSym.declaredMethod("apply") classSym.declaredMethods classSym.memberMethod("...
lampepfl/dotty
tests/run-macros/i6518/Macro_1.scala
Scala
apache-2.0
402
package com.datawizards.sparklocal.impl.scala.accumulator import java.lang import com.datawizards.sparklocal.accumulator.{AccumulatorV2API, LongAccumulatorAPI} class LongAccumulatorAPIScalaImpl(name: Option[String]=None) extends AccumulatorV2APIScalaImpl[java.lang.Long, java.lang.Long](name) with LongAccumulat...
piotr-kalanski/spark-local
src/main/scala/com/datawizards/sparklocal/impl/scala/accumulator/LongAccumulatorAPIScalaImpl.scala
Scala
apache-2.0
1,339
package debop4s.data.slick3.customtypes /** * 암호화된 문자열에 대한 사용자 정의 컬럼 수형 (Custom Column Type) 입니다. * * @author [email protected] */ case class EncryptedString(text: String) { override def equals(obj: scala.Any): Boolean = { obj != null && obj.isInstanceOf[EncryptedString] && obj.asInstanceOf[En...
debop/debop4s
debop4s-data-slick3/src/main/scala/debop4s/data/slick3/customtypes/EncryptedString.scala
Scala
apache-2.0
403
import java.io._ object LinkExtractor2 extends App { val inFile = io.Source.fromFile("./page.html") val outFile = new PrintWriter(new File("./output.txt" )) val anchor = """<a href=\\"([^"]*)\\"[^>]*>""".r val links = for (line <- inFile.getLines) { for (link <- anchor.findAllIn(line)) { ...
luzhuomi/learn_you_a_scala_for_great_good
exercise/regex/LinkExtractor2.scala
Scala
apache-2.0
404
/* * Copyright (C) Lightbend Inc. <https://www.lightbend.com> */ package play.api.mvc import org.specs2.mutable.Specification import play.api.http.HttpConfiguration import play.api.libs.typedmap.TypedEntry import play.api.libs.typedmap.TypedKey import play.api.libs.typedmap.TypedMap import play.api.mvc.request.Defa...
wegtam/playframework
core/play/src/test/scala/play/api/mvc/RequestSpec.scala
Scala
apache-2.0
4,368
/* * Copyright (C) 2017 Radicalbit * * This file is part of flink-JPMML * * flink-JPMML 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) an...
maocorte/flink-jpmml
flink-jpmml-scala/src/test/scala/io/radicalbit/flink/pmml/scala/utils/PmmlLoaderKit.scala
Scala
agpl-3.0
1,774
package com.bigchange.mllib import org.apache.spark.broadcast.Broadcast import org.apache.spark.mllib.classification.NaiveBayes import org.apache.spark.mllib.evaluation.MulticlassMetrics import org.apache.spark.mllib.feature.{HashingTF, IDF, Word2Vec} import org.apache.spark.mllib.linalg.SparseVector import org.apache...
bigchange/AI
src/main/scala/com/bigchange/mllib/NewsGroups.scala
Scala
apache-2.0
6,739
// // MessagePack for Java // // 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...
suzukaze/msgpack-java
msgpack-core/src/test/scala/org/msgpack/core/MessagePackTest.scala
Scala
apache-2.0
13,102
/* * 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...
alessandrolulli/reforest
src/main/scala/reforest/util/GCInstrumented.scala
Scala
apache-2.0
3,209
/* * 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 ...
SarathChandran/squbs
squbs-zkcluster/src/test/scala/org/squbs/cluster/ZkClusterInitTest.scala
Scala
apache-2.0
4,238
/* * Copyright 2014-2020 Rik van der Kleij * * 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...
rikvdkleij/intellij-haskell
src/main/scala/intellij/haskell/editor/formatter/settings/HaskellLanguageCodeStyleSettingsProvider.scala
Scala
apache-2.0
1,799
import io.gatling.core.Predef._ import io.gatling.http.Predef._ import scala.concurrent.duration._ object PatientMenu { def graphs(patientId: String) = exec(http("Patient graphs").get("/patient/" + patientId + "/graphs")) }
silverbullet-dk/opentele-performance-tests
src/test/scala/user-files/simulations/processes/clinician/PatientMenu.scala
Scala
apache-2.0
227
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
pgandhi999/spark
mllib/src/test/scala/org/apache/spark/ml/recommendation/ALSSuite.scala
Scala
apache-2.0
46,620
/* 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...
patverga/factorie
src/main/scala/cc/factorie/util/DoubleArrayBuffer.scala
Scala
apache-2.0
10,930
package rubiz package syntax import scalaz.{ -\\/, \\/, \\/- } import scalaz.concurrent.Task import scala.util.{ Try, Success, Failure } import either._ trait TrySyntax { implicit final def tryOps[A](t: Try[A]): TryOps[A] = new TryOps[A](t) } final class TryOps[A](val t: Try[A]) extends AnyVal { def toDisjunctio...
rubicon-project/rubiz
src/main/scala/rubiz/syntax/try.scala
Scala
bsd-2-clause
461
/* * 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 java.util import scala.annotation.tai...
scala-js/scala-js
javalib/src/main/scala/java/util/HashMap.scala
Scala
apache-2.0
20,315
package com.classification import io.prediction.controller.PPreparator import org.apache.spark.SparkContext import org.apache.spark.rdd.RDD import org.apache.spark.mllib.regression.LabeledPoint class PreparedData( val labeledPoints: RDD[LabeledPoint] ) extends Serializable class Preparator extends PPreparator[Tra...
PredictionIO/open-academy
AminManna/MyClassification/src/main/scala/Preparator.scala
Scala
apache-2.0
480
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundatio...
HuangLS/neo4j
community/cypher/cypher-compiler-2.3/src/test/scala/org/neo4j/cypher/internal/compiler/v2_3/commands/PropertyValueComparisonTest.scala
Scala
apache-2.0
1,863
/* * 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 ...
trueyao/spark-lever
mllib/src/test/scala/org/apache/spark/mllib/util/TestingUtilsSuite.scala
Scala
apache-2.0
8,205
package rd.main import java.io.File import java.io.FileFilter import java.text.SimpleDateFormat import java.util.ArrayList import java.util.Random import scala.collection.mutable.ListBuffer import scala.io.Source import org.bson.Document import com.mongodb.MongoClient import com.mongodb.client.MongoCollection impo...
amachwe/Scala-Machine-Learning
src/main/scala/rd/main/GeoTrailsLoader.scala
Scala
gpl-3.0
5,325
package com.twitter.finagle import com.twitter.conversions.DurationOps._ import com.twitter.finagle import com.twitter.finagle.http.{Request, Response} import com.twitter.finagle.http.ssl.HttpSslTestComponents import com.twitter.finagle.param.OppTls import com.twitter.finagle.ssl.{ClientAuth, OpportunisticTls, Snoopin...
twitter/finagle
finagle-http/src/test/scala/com/twitter/finagle/TlsSnoopingEndToEndTest.scala
Scala
apache-2.0
3,490
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-fs/geomesa-fs-storage/geomesa-fs-storage-orc/src/main/scala/org/locationtech/geomesa/fs/storage/orc/utils/OrcOutputFormatWriter.scala
Scala
apache-2.0
24,916
/** * Copyright (C) 2010-2012 LShift Ltd. * * 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...
aprescott/diffa
agent/src/test/scala/net/lshift/diffa/agent/itest/config/EtagTest.scala
Scala
apache-2.0
2,179
package com.markfeeney.circlet import javax.servlet.http.{HttpServletRequest, HttpServletResponse} import com.markfeeney.circlet.JettyOptions.ClientAuth.{Need, Want} import com.markfeeney.circlet.JettyOptions.SslStoreConfig.{Instance, Path} import org.eclipse.jetty.server.handler.{AbstractHandler, ContextHandler, Han...
overthink/circlet
src/main/scala/com/markfeeney/circlet/JettyAdapter.scala
Scala
mit
7,106
/* * 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/box/CtValidation.scala
Scala
apache-2.0
890
package model.validation import play.api.libs.json._ import play.api.libs.json.Reads._ import play.api.libs.json.Writes._ import play.api.libs.functional.syntax._ import model.{Recipe, Ingredient} /** * @author knm */ object RecipeValidator { implicit val ingredientWrites: Writes[Ingredient] = ( (__ \\ "amou...
linuxswords/play-recipes
app/model/validation/RecipeValidator.scala
Scala
apache-2.0
1,678
package f0 case class EffectW[+F]() { def erase: EffectW[Nothing] = this.asInstanceOf[EffectW[Nothing]] } case class EffectR[-F]() { def erase: EffectR[Any] = this.asInstanceOf[EffectR[Any]] } object Effects { private val _effectW = EffectW() private val _effectR = EffectR() def effectW[F] = _effectW.asInstance...
khalen/f0
src/main/scala/f0/Effects.scala
Scala
mit
390