code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
pncampbell/ct-calculations
src/main/scala/uk/gov/hmrc/ct/computations/CP36.scala
Scala
apache-2.0
917
package org.jetbrains.plugins.scala.testingSupport.test.structureView import java.util import com.intellij.execution.PsiLocation import com.intellij.ide.util.FileStructureNodeProvider import com.intellij.ide.util.treeView.smartTree.{ActionPresentation, ActionPresentationData, TreeElement} import com.intellij.openapi....
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/testingSupport/test/structureView/TestNodeProvider.scala
Scala
apache-2.0
29,401
import scala.language.experimental.macros class Bundle { def impl = ??? } object Macros { def foo = Bundle.impl }
felixmulder/scala
test/files/neg/macro-bundle-noncontext.scala
Scala
bsd-3-clause
119
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.api.db.evolutions import java.sql.{ ResultSet, SQLException } import org.specs2.mutable.{ After, Specification } import play.api.db.{ Database, Databases } // TODO: functional test with InvalidDatabaseRevision exception class ...
wsargent/playframework
framework/src/play-jdbc-evolutions/src/test/scala/play/api/db/evolutions/EvolutionsSpec.scala
Scala
apache-2.0
6,443
package com.twitter.finagle.stats /** * BroadcastStatsReceiver is a helper object that create a StatsReceiver wrapper around multiple * StatsReceivers (n). */ object BroadcastStatsReceiver { def apply(receivers: Seq[StatsReceiver]) = receivers.filterNot(_.isNull) match { case Seq() => NullStatsReceiver ca...
travisbrown/util
util-stats/src/main/scala/com/twitter/finagle/stats/BroadcastStatsReceiver.scala
Scala
apache-2.0
3,929
package chat.tox.antox.callbacks import android.content.Context import chat.tox.antox.data.State import chat.tox.antox.utils.AntoxLog import chat.tox.antox.wrapper.FriendInfo object AntoxOnGroupInviteCallback { } class AntoxOnGroupInviteCallback(private var ctx: Context) /* extends GroupInviteCallback */ { def g...
wiiam/Antox
app/src/main/scala/chat/tox/antox/callbacks/AntoxOnGroupInviteCallback.scala
Scala
gpl-3.0
740
package io.kaitai.struct.languages import io.kaitai.struct.datatype.DataType._ import io.kaitai.struct.datatype.{DataType, EndOfStreamError, FixedEndian, InheritedEndian, KSError, UndecidedEndiannessError, NeedRaw} import io.kaitai.struct.exprlang.Ast import io.kaitai.struct.exprlang.Ast.expr import io.kaitai.struct.f...
kaitai-io/kaitai_struct_compiler
shared/src/main/scala/io/kaitai/struct/languages/PythonCompiler.scala
Scala
gpl-3.0
18,937
package org.cdlib.was.weari.pig; import java.io.{ DataOutputStream, File, IOException, InputStream, OutputStream }; import java.net.URI; import java.util.UUID; import java.util.zip.{ GZIPInputStream, GZIPOutputStream }; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.{ FSDataInputStream, FS...
cdlib/weari
src/main/scala/org/cdlib/was/weari/pig/PigUtil.scala
Scala
bsd-3-clause
7,103
package me.lachlanap.dropunit import com.badlogic.gdx.{ApplicationListener, Gdx} import me.lachlanap.dropunit.ui.{InputHandler, Renderer, Textures, UIConfig} import me.lachlanap.dropunit.world._ /** * Runs the game. */ class DropUnitCore(worldConfig: WorldConfig, uiConfig: UIConfig, blueprintLoader: BlueprintLoader...
thorinii/dropunit
src/main/scala/me/lachlanap/dropunit/DropUnitCore.scala
Scala
mit
1,352
/* * LaScala * Copyright (c) 2017. Phasmid Software */ package com.phasmid.laScala.values import scala.collection.immutable.ListMap import scala.reflect.runtime.universe.{Type, TypeTag, termNames, typeOf} import scala.util.Try object CaseClasses { /** * The following method is used by RenderableCaseClass ...
rchillyard/LaScala
src/main/scala-2.12/com/phasmid/laScala/values/CaseClasses.scala
Scala
lgpl-2.1
1,299
package com.gilt.pickling import java.util.UUID import org.joda.time.DateTime object TestObjs { case class VectorContainer(value: Vector[Int]) case class MapContainer(value: Map[Int, Int]) case class SeqContainer(value: Seq[Int]) case class SingleInt(id: Int) case class SingleLong(id: Long) case class Si...
gilt/gfc-avro
src/test/scala/com/gilt/pickling/TestObjs.scala
Scala
apache-2.0
6,876
/* Copyright (C) 2016 Luis Rodero-Merino * * This file is part of MxCompanions * * 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 2 of the License, or * (at your option) any...
lrodero/mxcompanions
src/test/scala/mxcompanions/delegate/tests/DelegateConfigurationEval.scala
Scala
gpl-2.0
2,352
/* * Copyright (c) 2010 by Alexander Grünewald * * This file is part of gruenewa-grid, a grid computing runtime. * * gruenewa-grid 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 th...
gruenewa/gruenewa-grid
src/main/scala/gruenewa/grid/Ports.scala
Scala
gpl-3.0
1,129
package breeze.linalg import breeze.numerics.{isNonfinite, sin} import org.netlib.blas.Ddot import org.scalacheck._ import org.scalatest._ import org.scalatest.funsuite._ import org.scalatestplus.scalacheck._ import breeze.math._ import breeze.stats.mean import java.util import breeze.stats.distributions.RandBasis i...
scalanlp/breeze
math/src/test/scala/breeze/linalg/DenseVectorTest.scala
Scala
apache-2.0
19,422
/* * 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 n...
richhaase/kafka
core/src/test/scala/unit/kafka/server/LogDirFailureTest.scala
Scala
apache-2.0
9,608
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
travisbrown/scalatest
src/main/scala/org/scalatest/PartialFunctionValues.scala
Scala
apache-2.0
5,968
/* * 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 ...
publicRoman/spark
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/constants.scala
Scala
apache-2.0
6,068
/* * 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 ...
ueshin/apache-flink
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/nodes/physical/FlinkPhysicalRel.scala
Scala
apache-2.0
1,635
/* * 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/forms/application/assets/BasicEstateElementFormsTest.scala
Scala
apache-2.0
1,357
/**************************************************************** * Licensed to the AOS Community (AOS) under one or more * * contributor license agreements. See the NOTICE file * * distributed with this work for additional information * * regarding copyright ownership. The AOS licenses this...
xuzhikethinker/t4f-data
pubsub/camel/src/main/scala2/SampleActors.scala
Scala
apache-2.0
3,369
/* * Copyright 2014 nidkil * * 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 ...
nidkil/scala-downloader
src/main/scala/com/nidkil/downloader/cleaner/CleanerException.scala
Scala
apache-2.0
842
package mimir.util; object ListUtils { // There's gotta be a primitive for this... // Temporary placeholder for now. def powerList[A](l: List[List[A]]): List[List[A]] = if(l.isEmpty){ List(List[A]()) } else { powerList[A](l.tail).flatMap( (rest) => l.head.map( (head) => (hea...
sophieyoung717/mimir
src/main/scala/mimir/util/ListUtils.scala
Scala
apache-2.0
357
/** * Copyright 2015 Otto (GmbH & Co KG) * * 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...
christianrichter/schedoscope
schedoscope-core/src/test/scala/org/schedoscope/test/TestableViewTest.scala
Scala
apache-2.0
7,807
/** ***************************************************************************** * This is part of ltlfo2mon (https://github.com/jckuester/ltlfo2mon). * * Copyright (c) 2013 by Jan-Christoph Kuester <kuester@sdf.org> * * Ltlfo2mon is free software: you can redistribute it and/or modify * it under the terms...
jckuester/ltlfo2mon
src/main/scala/ltlfo2mon/Main.scala
Scala
gpl-3.0
4,880
package org.jetbrains.plugins.scala.codeInsight.template.macros import com.intellij.codeInsight.CodeInsightBundle import com.intellij.codeInsight.lookup.LookupElement import com.intellij.codeInsight.template.impl.TextExpression import com.intellij.codeInsight.template.{Result, Expression, ExpressionContext} import com...
double-y/translation-idea-plugin
src/org/jetbrains/plugins/scala/codeInsight/template/macros/ScalaIterableVariableMacro.scala
Scala
apache-2.0
1,828
// scalastyle:off line.size.limit /* * Ported by Alistair Johnson from * https://github.com/gwtproject/gwt/blob/master/user/test/com/google/gwt/emultest/java/math/BigDecimalCompareTest.java */ // scalastyle:on line.size.limit package org.scalajs.testsuite.javalib.math import java.math._ import org.scalajs.jasmine...
jmnarloch/scala-js
test-suite/src/test/scala/org/scalajs/testsuite/javalib/math/BigDecimalCompareTest.scala
Scala
bsd-3-clause
15,545
package com.eharmony.aloha.models import com.eharmony.aloha.ModelSerializationTestHelper import com.eharmony.aloha.audit.impl.OptionAuditor import com.eharmony.aloha.id.ModelId import org.junit.Assert._ import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.BlockJUnit4ClassRunner /** * Creat...
eHarmony/aloha
aloha-core/src/test/scala/com/eharmony/aloha/models/ConstantModelTest.scala
Scala
mit
816
package xyz.seto.obscene import xyz.seto.obscene.GestureConstants._ import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.lang.ref.WeakReference; object GestureLibraries { def f...
chrisseto/obscene
core/src/main/scala/GestureLibraries.scala
Scala
apache-2.0
1,332
// Duplicate the arguments array. val myArgs = new Array[String](args.length) ; // Copy method 1: for (i <- 0 until args.length) myArgs.update(i,args(i)) // Syntactic sugar: // e1(e2) = e3 // ==> // e1.update(e2,e3) // Copy method 2: for (i <- 0 until args.length) myArgs(i) = args(i) // Copy method 3: (0 u...
pmsg863/xmgps
vertx3test/src/main/resources/twittleschool/read/Iteration.scala
Scala
apache-2.0
1,826
package com.twitter.finagle.memcached.unit.partitioning import com.twitter.conversions.time._ import com.twitter.finagle.loadbalancer.LoadBalancerFactory import com.twitter.finagle.memcached.partitioning.PartitioningService import com.twitter.finagle.stats.InMemoryStatsReceiver import com.twitter.finagle.{Address, _} ...
mkhq/finagle
finagle-memcached/src/test/scala/com/twitter/finagle/memcached/unit/partitioning/PartitioningServiceTest.scala
Scala
apache-2.0
8,396
package com.azavea.usace.programanalysis.geop import geotrellis.raster.Tile import geotrellis.spark.io._ import geotrellis.spark.{SpatialKey, LayerId} import geotrellis.spark.io.s3.{S3AttributeStore, S3ValueReader} import org.apache.spark.SparkContext object LayerReader { /** * Given values for zoom, x and y, ...
azavea/usace-program-analysis-geoprocessing
geop/src/main/scala/com/azavea/usace/programanalysis/geop/LayerReader.scala
Scala
apache-2.0
1,465
package io.reactors package container import org.scalacheck._ import org.scalacheck.Gen._ import org.scalacheck.Prop._ import org.scalatest._ import io.reactors.algebra._ import io.reactors.test._ class SignalCatamorphCheck extends Properties("SignalCatamorph") with ExtendedProperties { val sizes = detChoose(0...
reactors-io/reactors
reactors-container/shared/src/test/scala/io/reactors/container/signal-catamorph-spec.scala
Scala
bsd-3-clause
9,096
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.scaladsl.client import java.net.{ URI, URISyntaxException } import java.util.concurrent.atomic.AtomicInteger import akka.actor.ActorSystem import com.lightbend.lagom.internal.client.{ CircuitBreakerConfig, Circui...
rstento/lagom
service/scaladsl/client/src/main/scala/com/lightbend/lagom/scaladsl/client/ServiceLocators.scala
Scala
apache-2.0
8,741
/* * 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 ...
ArvinDevel/onlineAggregationOnSparkV2
core/src/main/scala/org/apache/spark/scheduler/StageInfo.scala
Scala
apache-2.0
3,091
package fr.laas.fape.anml.model.ir import fr.laas.fape.anml.model.abs.AbstractChronicle class IRSingletonGroup(val statement: IRStatement) extends IRStatementGroup { override def firsts: List[IRStatement] = List(statement) override def lasts: List[IRStatement] = List(statement) override def statements: List[IRS...
athy/fape
anml-parser/src/main/scala/fr/laas/fape/anml/model/ir/IRSingletonGroup.scala
Scala
bsd-2-clause
501
/* * 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 ...
fanyon/flink
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/calcite/RelTimeIndicatorConverterTest.scala
Scala
apache-2.0
10,222
package ch.wsl.box.rest import akka.actor.ActorSystem import akka.http.scaladsl.server.{ExceptionHandler, Route} import akka.http.scaladsl.Http import akka.stream.ActorMaterializer import ch.wsl.box.jdbc.Connection import ch.wsl.box.rest.routes.{BoxExceptionHandler, Preloading, Root} import ch.wsl.box.rest.runtime.Reg...
Insubric/box
server/src/main/scala/ch/wsl/box/rest/Boot.scala
Scala
apache-2.0
3,998
import tk.monnef.swsl.SWSL._ val list = generateServiceList() // getting a list of all services val descs = list.running.map(_.title) // descriptions of running services println(descs.mkString(", "))
mnn/SmallWindowsServiceLibrary
demo/ServiceList.scala
Scala
gpl-3.0
202
/* * 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 ...
mike0sv/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ScalaUDF.scala
Scala
apache-2.0
53,767
package me.abarrow.ScalaSubNet.mal import collection._ object MALIDs { //many studios are missing the list of producers is way too long val studios = mutable.Map.empty[Int, String] val genres = immutable.Map( 1 -> "Action", 2 -> "Adventure", 3 -> "Cars", 4 -> "Comedy", 5 -> "D...
Abarrowman/SubNet
ScalaSubNet/src/me/abarrow/ScalaSubNet/mal/MALIDs.scala
Scala
mit
1,360
package com.hacklanta package formality // For function->Validation conversions. import scala.language.implicitConversions import net.liftweb.http.S import net.liftweb.common._ import net.liftweb.util._ import Helpers._ /** * A Validation that validates a value of type T. It should return a * Box[String] that is...
hacklanta/lift-formality
src/main/scala/com/hacklanta/formality/Validation.scala
Scala
mit
4,862
import stainless.lang._ object Lambdas2 { val init_messages = (i: BigInt) => BigInt(0) def smallNumbers(n: BigInt, messages: BigInt => BigInt)(i: BigInt, j: BigInt) = { i < n && j < n } def intForAll2(n: BigInt, m: BigInt, p: (BigInt, BigInt) => Boolean): Boolean = { // forall ((i: BigInt, j: B...
epfl-lara/stainless
frontends/benchmarks/verification/valid/MicroTests/Lambdas2.scala
Scala
apache-2.0
743
/* * Copyright (c) 2010 e.e d3si9n * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish,...
eed3si9n/scalaxb
cli/src/main/scala/scalaxb/compiler/xsd/ContextProcessor.scala
Scala
mit
26,938
package org.jetbrains.plugins.scala.lang.parser.scala3 import org.jetbrains.plugins.scala.AssertionMatchers import org.jetbrains.plugins.scala.util.PsiSelectionUtil class EndParserTest_InTemplateDefinition extends SimpleScala3ParserTestBase with PsiSelectionUtil with AssertionMatchers { def test_end_class_empty_te...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/lang/parser/scala3/EndParserTest_InTemplateDefinition.scala
Scala
apache-2.0
11,787
package com.mohiva.play.silhouette.api.util import org.joda.time.DateTime import play.api.test._ /** * Test case for the [[com.mohiva.play.silhouette.api.util.Clock]] class. */ class ClockSpec extends PlaySpecification { "The `apply` method" should { "return a new Clock instance" in { Clock() should be...
cemcatik/play-silhouette
silhouette/test/com/mohiva/play/silhouette/api/util/ClockSpec.scala
Scala
apache-2.0
485
package uk.gov.gds.router.configuration import java.util.Properties import uk.gov.gds.router.util.Logging import java.io.{FileInputStream, File, InputStream} private[configuration] object Config extends Logging { private val developmentConfigFile = "/router-development-configuration.properties" private val produ...
gds-attic/scala-router
router/router/src/main/scala/uk/gov/gds/router/configuration/Config.scala
Scala
mit
1,573
/* * 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 ...
sh-cho/cshSpark
storage/BlockManagerId.scala
Scala
apache-2.0
4,763
package com.ebay.neutrino.channel import com.ebay.neutrino.NeutrinoCore import com.ebay.neutrino.config.{Configuration, LoadBalancer, NeutrinoSettings} import org.scalatest._ /** * Parse unit-test for Neutrino-configuration * * Note - needs echo-server running. TODO fix this... * * Notes: * - we currently use A...
eBay/Neutrino
src/test/scala/com/ebay/neutrino/channel/NeutrinoServiceTest.scala
Scala
apache-2.0
1,096
package com.lightning.walletapp.helper import rx.lang.scala.Subscription import rx.lang.scala.{Observable => Obs} abstract class ThrottledWork[T, V] { private var lastWork: Option[T] = Option.empty case class SubscriptionAndData(sub: Subscription, data: T) var subscriptionAndData: Option[SubscriptionAndData] =...
btcontract/lnwallet
app/src/main/java/com/lightning/walletapp/helper/ThrottledWork.scala
Scala
apache-2.0
1,873
package ru.imho.ddsmt import akka.actor.{Cancellable, ActorSystem} import scala.concurrent.duration.FiniteDuration /** * Created by skotlov on 11/21/14. */ class Scheduler(actorSystem: ActorSystem) { def scheduleOnce(delay: FiniteDuration)(f: => Unit): Cancellable = { actorSystem.scheduler.scheduleOnce(delay...
IMHOVi/ddsmt
ddsmt-engine/src/main/scala/ru/imho/ddsmt/Scheduler.scala
Scala
apache-2.0
355
/* * 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 ...
tillrohrmann/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/WatermarkGeneratorCodeGenerator.scala
Scala
apache-2.0
6,180
package com.wixpress.petri.petri import com.fasterxml.jackson.databind.JsonMappingException import com.natpryce.makeiteasy.MakeItEasy.{`with` => withA, _} import com.wixpress.common.specs2.JMock import com.wixpress.petri.experiments.domain.Experiment import com.wixpress.petri.laboratory.dsl.ExperimentMakers import com...
wix/petri
petri-server-core/src/test/java/com/wixpress/petri/petri/JdbcExperimentsDaoTest.scala
Scala
bsd-3-clause
1,101
package com.tripl3dogdare.discala package testbot object TestBot { def main(args:Array[String]) { val bot = new Discala().login(readFile(".auth")) } }
tripl3dogdare/discala
TestBot.scala
Scala
mit
166
package actor.salt import actor.ActorUtils import akka.actor.{Cancellable, Actor, ActorLogging, Props} import akka.event.LoggingReceive import akka.util.Timeout import scala.concurrent.Await import scala.concurrent.duration._ import akka.pattern.ask import scala.language.postfixOps import actor.salt.RefreshSpiritsAct...
sdgdsffdsfff/bugatti
app/actor/salt/RefreshSpiritsActor.scala
Scala
bsd-2-clause
1,901
/* * Copyright (c) 2016, Team Mion * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIM...
teammion/tm-morefood
src/main/scala/io/teammion/morefood/TileEntities.scala
Scala
isc
967
package com.alexitc.coinalerts.modules import com.alexitc.coinalerts.services.external.{GoogleReCaptchaService, ReCaptchaService} import com.google.inject.AbstractModule class ReCaptchaModule extends AbstractModule { override def configure(): Unit = { bind(classOf[ReCaptchaService]).to(classOf[GoogleReCaptchaS...
AlexITC/crypto-coin-alerts
alerts-server/app/com/alexitc/coinalerts/modules/ReCaptchaModule.scala
Scala
gpl-3.0
335
package breeze.linalg /* 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 to in...
wavelets/breeze
src/main/scala/breeze/linalg/CSCMatrix.scala
Scala
apache-2.0
13,734
package tables import models.{Cart, CartItem, Item} import play.api.db.slick.Config.driver.simple._ import scala.slick.lifted.ForeignKeyQuery class CartItemsTable(tag: Tag) extends Table[CartItem](tag, "CART_ITEMS") { def cartId = column[Int]("CART_ID", O.PrimaryKey) def itemId = column[Int]("ITEM_ID") def ...
SofyanHadiA/simple-rest-scala
app/tables/CartItemsTable.scala
Scala
mit
825
package io.coral.lib import org.scalatest.{Matchers, WordSpecLike} class RandomSpec extends WordSpecLike with Matchers { "The Random object" should { "provide a stream of uniformly distributed doubles" in { val source = NotSoRandom(0.3, 0.8) val random = new Random(source) val stream = rando...
daishichao/coral
runtime-api/src/test/scala/io/coral/lib/RandomSpec.scala
Scala
apache-2.0
1,021
/* * Copyright 2014 Paul Horn * * 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...
knutwalker/rx-redis
tests/src/it/scala/rx/redis/commands/it/KeyCommandsSpec.scala
Scala
apache-2.0
2,718
package edu.illinois.wala.ipa.callgraph import org.junit.Test import com.typesafe.config.ConfigFactory import org.junit.Assert class FlexibleCallGraphBuilderTest { @Test def testRegexEntrypoints { val b = FlexibleCallGraphBuilder()(ConfigFactory.load().withFallback( ConfigFactory.parseString("wala.entry.s...
cos/WALAFacade
src/test/scala/edu/illinois/wala/ipa/callgraph/FlexibleCallGraphBuilderTest.scala
Scala
epl-1.0
465
/* * Copyright 2007-2009 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 applicable law or ag...
beni55/liftweb
lift-record/src/main/scala/net/liftweb/record/field/PasswordField.scala
Scala
apache-2.0
3,440
package org.jetbrains.plugins.scala package lang.surroundWith.surrounders.scaladoc /** * User: Dmitry Naydanov * Date: 3/5/12 */ class ScalaDocWithUnderlinedSurrounder extends ScalaDocWithSyntaxSurrounder { override def getSyntaxTag = "__" override def getTemplateDescription: String = ScalaBundle.message("und...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/surroundWith/surrounders/scaladoc/ScalaDocWithUnderlinedSurrounder.scala
Scala
apache-2.0
363
/* Copyright 2016 Twitter, 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 to in writing, software distr...
twitter/algebird
algebird-core/src/main/scala/com/twitter/algebird/SetDiff.scala
Scala
apache-2.0
3,139
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writ...
rahulkavale/scalatest
scalatest-test/src/test/scala/org/scalatest/ListShouldContainOneElementOfLogicalOrSpec.scala
Scala
apache-2.0
42,733
package org.libss.util.reflection import org.scalatest.{FlatSpec, Matchers} import scala.collection.mutable /** * date: 02.06.2016 23:20 * author: Kaa * * Test for Field paths */ class FieldPathTest extends FlatSpec with Matchers with StringFieldPathConversionHelper { val NewV = "newValue" ...
kanischev/libss
libss-utils/src/test/scala/org/libss/util/reflection/FieldPathTest.scala
Scala
apache-2.0
2,774
package argon.codegen.chiselgen import argon.core._ import argon.nodes._ trait ChiselGenBoolean extends ChiselCodegen { override protected def remap(tp: Type[_]): String = tp match { case BooleanType => "Boolean" case _ => super.remap(tp) } override protected def quoteConst(c: Const[_]): String = c ma...
stanford-ppl/spatial-lang
spatial/core/src/spatial/codegen/chiselgen/ChiselGenBoolean.scala
Scala
mit
1,374
package bugs.bug2 trait AB2 { type X1 = String }
raisercostin/jedi-io
src/main/scala/bugs/bug2/AB2.scala
Scala
apache-2.0
57
/* * 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
manual/cypher/refcard-tests/src/test/scala/org/neo4j/cypher/docgen/refcard/CaseTest.scala
Scala
apache-2.0
2,279
/* * SPDX-License-Identifier: Apache-2.0 * * Copyright 2015-2021 Andre White. * * 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 * * https://www.apache.org/licenses/LICENSE...
adarro/ddo-calc
subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/feats/InspireHeroics.scala
Scala
apache-2.0
2,107
/* * Copyright 2014 Adam Rosenberger * * 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...
arosenberger/nalloc_2.10
sandbox/src/main/scala/org/nalloc/bitb/kcits/sandbox/memoryusage/ExistsMemoryUsage.scala
Scala
apache-2.0
2,421
package com.eevolution.context.dictionary.infrastructure.service import java.util.UUID import akka.NotUsed import com.eevolution.context.dictionary.domain._ import com.eevolution.context.dictionary.domain.model.AttributeValueExtend import com.eevolution.utils.PaginatedSequence import com.lightbend.lagom.scaladsl.api....
adempiere/ADReactiveSystem
dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/service/AttributeValueExtendService.scala
Scala
gpl-3.0
2,178
package spa.client.logger import scala.scalajs.js import scala.scalajs.js.annotation.JSGlobal /** * Facade for functions in log4javascript that we need */ @js.native private[logger] trait Log4JavaScript extends js.Object { def getLogger(name:js.UndefOr[String]):JSLogger = js.native def setEnabled(enabled:Bool...
IceGiant/internet-abridged
client/src/main/scala/spa/client/logger/Log4JavaScript.scala
Scala
apache-2.0
4,131
package uk.gen.shop.cart import org.scalatest.{Matchers, GivenWhenThen, FeatureSpec} import uk.gen.shop.products.{Orange, Apple} /** * Created by PJAYARAT on 11/08/2016. */ class SimpleShoppingCartSpec extends FeatureSpec with GivenWhenThen with Matchers{ feature("Simple shopping cart") { scenario("Test add...
prasadveltech/shop-test
src/test/scala/uk/gen/shop/cart/SimpleShoppingCartSpec.scala
Scala
gpl-3.0
1,383
/* * Copyright (C) 2012 Pavel Fatin <http://pavelfatin.com> * * 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. * ...
pavelfatin/toyfs
src/main/scala/com/pavelfatin/fs/manager/configuration/ConfigurationWindow.scala
Scala
gpl-3.0
2,899
package de.tobbra.syringe import scala.reflect.runtime.universe.{ Type, TypeTag, typeOf } import scala.collection.mutable trait Scope { /** * Get a remembered instance or construct and remember a new one. */ final def get[T: TypeTag](construct: => T): T = get(typeOf[T], construct).asInstanceOf[T] ...
TobBrandt/syringe
source/scala/de.tobbra.syringe/src/de/tobbra/syringe/modules/Scope.scala
Scala
bsd-2-clause
1,114
package com.siqueries.zion.exceptions /** * Created by ebot on 12/18/16. */ class MLException { }
siqueries/zion
src/main/scala/com/siqueries/zion/exceptions/MLException.scala
Scala
apache-2.0
102
/* * Copyright (c) 2014 Dufresne Management Consulting LLC. */ package com.nickelsoftware.bettercare4me.hedis.hedis2014; import org.joda.time.LocalDate import org.scalatestplus.play.OneAppPerSuite import org.scalatestplus.play.PlaySpec import com.nickelsoftware.bettercare4me.hedis.HEDISRulesTestSpec import com.nick...
reactivecore01/bettercare4.me
play/test/com/nickelsoftware/bettercare4me/hedis/hedis2014/CIS_IPV_RuleTestSpec.scala
Scala
apache-2.0
1,674
/* * 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-node/src/main/scala/fr/acinq/eclair/api/directives/ErrorDirective.scala
Scala
apache-2.0
1,941
package modules import com.google.inject.{ AbstractModule, Provides } import com.mohiva.play.silhouette.api.repositories.AuthInfoRepository import com.mohiva.play.silhouette.api.services._ import com.mohiva.play.silhouette.api.util._ import com.mohiva.play.silhouette.api.{ Environment, EventBus } import com.mohiva.pla...
jasonzoladz/play-silhouette-reactivemongo-seed
app/modules/SilhouetteModule.scala
Scala
apache-2.0
12,146
package thangiee.riotapi.team case class TeamMemberInfo(inviteDate: Long = 0, joinDate: Long = 0, playerId: Long = 0, status: String = "")
Thangiee/Riot-API-Scala
src/main/scala/thangiee/riotapi/team/TeamMemberInfo.scala
Scala
mit
139
/** * This file is part of SensApp [ http://sensapp.modelbased.net ] * * Copyright (C) 2011- SINTEF ICT * Contact: SINTEF ICT <nicolas.ferry@sintef.no> * * Module: net.modelbased.sensapp * * SensApp is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public L...
SINTEF-9012/sensapp
_attic/net.modelbased.sensapp.rrd/src/main/scala/net/modelbased/sensapp/rrd/datamodel/RRDBase.scala
Scala
lgpl-3.0
2,748
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
tejasapatil/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/regexpExpressions.scala
Scala
apache-2.0
16,745
package com.faacets.polyta package gallery import spire.algebra.CRing import scalin.immutable.{Mat, Vec} import scalin.immutable.dense._ object Cube { def inV[A:CRing](dim: Int): VPolytope[A] = { def gen(d: Int): List[List[A]] = if (d == 0) List(Nil) else for { rest <- gen(d - 1) x <- List(CRi...
denisrosset/polyta
src/main/scala/com/faacets/polyta/gallery/Cube.scala
Scala
gpl-3.0
714
package example import com.datastax.driver.core.Cluster import com.typesafe.scalalogging.slf4j.Logging import scala.collection.JavaConversions._ class CassandraConnector(client : String, logit : Boolean) extends Logging { val cluster = Cluster.builder() .addContactPoint( Configurator.conf.g...
johanprinsloo/akka-cassandra-cluster-test
src/main/scala/example/CassandraConnector.scala
Scala
apache-2.0
690
/* * 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
mllib/src/test/scala/org/apache/spark/mllib/feature/StandardScalerSuite.scala
Scala
apache-2.0
15,603
/* * Copyright 2011 Twitter, 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...
thirstycrow/scrooge
scrooge-generator/src/main/scala/com/twitter/scrooge/backend/ScalaGenerator.scala
Scala
apache-2.0
8,457
package sparklyr import org.apache.spark._ import org.apache.spark.rdd.RDD import org.apache.spark.sql._ import org.apache.spark.sql.types._ import org.apache.spark.sql.catalyst.encoders.RowEncoder object ApplyUtils { def groupBy(rdd: RDD[Row], colPosition: Array[Int]): RDD[Row] = { rdd.groupBy( r => colP...
rstudio/sparklyr
java/spark-1.6.0/applyutils.scala
Scala
apache-2.0
411
/** This file is part of TextCompose, a program for producing PDF from text files. * Copyright 2014 Jesper S Villadsen <jeschvi@gmail.com> * License: GNU Affero General Public License version 3 or later. * For full license text see LICENSE.txt or <http://www.gnu.org/licenses/>. */ package textcompose.startup ...
jvilladsen/TextCompose
src/main/scala/startup/SpecialitiesMacOSX.scala
Scala
agpl-3.0
2,097
import scala.language.experimental.macros import scala.reflect.macros.blackbox.Context trait Bundle { val c: Context = ??? def impl = ??? } object Macros { def foo = macro Bundle.impl }
folone/dotty
tests/untried/neg/macro-bundle-trait.scala
Scala
bsd-3-clause
194
package xyz.nabijaczleweli.scala_game_of_life.engine.rendering import xyz.nabijaczleweli.lonning.Logger import xyz.nabijaczleweli.lonning.loutput.ConsoleLOutput /** Used to hold additional data for screen. * * @author Jędrzej * @since 27.04.14 */ trait ExtendedScreenData[stored_type] extends Logger[ConsoleLO...
nabijaczleweli/Scala-Game-of-Life
src/main/scala/xyz/nabijaczleweli/scala_game_of_life/engine/rendering/ExtendedScreenData.scala
Scala
mit
777
package org.jetbrains.plugins.scala package findUsages.apply import com.intellij.psi.PsiReference import com.intellij.psi.search.searches.ReferencesSearch import com.intellij.psi.search.searches.ReferencesSearch.SearchParameters import com.intellij.util.{Processor, QueryExecutor} import org.jetbrains.plugins.scala.ext...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/findUsages/apply/ApplyUnapplyMethodSearcherBase.scala
Scala
apache-2.0
2,030
package uk.gov.homeoffice.io import java.io.IOException import java.net.URL import scala.io.Source.fromURL import scala.util.{Failure, Success, Try} import org.specs2.mutable.Specification class ClasspathToURLSpec extends Specification { "Classpath resource" should { "give a URL from root of classpath" in { ...
UKHomeOffice/rtp-io-lib
src/test/scala/uk/gov/homeoffice/io/ClasspathToURLSpec.scala
Scala
mit
2,011
package org.ensime.fixture import akka.actor.ActorSystem import org.ensime.api._ import org.ensime.indexer.{ EnsimeVFS, SearchService } import scala.concurrent._ import scala.concurrent.duration._ trait IsolatedSearchServiceFixture extends IsolatedSourceResolverFixture { def withSearchService(testCode: (EnsimeConf...
eddsteel/ensime
core/src/it/scala/org/ensime/fixture/SearchServiceFixture.scala
Scala
gpl-3.0
1,351
/* * 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/vectorized/ArrowColumnVectorSuite.scala
Scala
apache-2.0
13,138
package scala.slick.lifted import scala.language.{existentials, implicitConversions} import scala.annotation.implicitNotFound import scala.annotation.unchecked.uncheckedVariance import scala.slick.SlickException import scala.slick.util.{ProductWrapper, TupleSupport} import scala.slick.ast._ /** A type class that enco...
retronym/slick
src/main/scala/scala/slick/lifted/Shape.scala
Scala
bsd-2-clause
12,866
package writerexample import scala.concurrent.{Await, ExecutionContext, Future} import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration.Duration import scalaz.{MonadTell, WriterT} import scalaz.std.list._ import scalaz.std.scalaFuture._ import scalaz.syntax.traverse._ /** * soluti...
taojang/scalaz-playground
src/main/scala/writerexample/Solution.scala
Scala
bsd-3-clause
1,672
package recipestore.nlp import java.io.InputStream import com.google.common.io.Resources import com.google.inject.Provides import com.twitter.storehaus.cache.{MapCache, Memoize} import net.codingwell.scalaguice.ScalaModule import org.apache.lucene.analysis.Analyzer import recipestore.graph.GraphModule import recipest...
prad-a-RuntimeException/semantic-store
src/main/scala/recipestore/nlp/NlpModule.scala
Scala
mit
1,737
package extracells.common.inventory trait TInventoryUpdateReceiver { /** * Called when the inventory is changed. */ def onInventoryChanged(): Unit }
ruifung/ExtraCells2
src/main/scala/extracells/common/inventory/TInventoryUpdateReceiver.scala
Scala
mit
160
package exercise import org.scalatest.{FlatSpec, Matchers} import akka.actor.ActorSystem import akka.testkit.TestActorRef import akka.util.Timeout import akka.pattern.ask import scala.concurrent.duration._ import scala.language.postfixOps /** * Created by guisil on 18/01/2017. */ class ExpressionEvaluatorSpec ext...
guisil/scala-akka-http-calculator
src/test/scala/exercise/ExpressionEvaluatorSpec.scala
Scala
mit
6,488