code
stringlengths
5
1M
repo_name
stringlengths
5
109
path
stringlengths
6
208
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
5
1M
package games case class Resource(name: String)
joelross/scalajs-games
demo/shared/src/main/scala/games/Resource.scala
Scala
bsd-3-clause
48
package scalanlp.data; /* Copyright 2009 David Hall, Daniel Ramage Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicab...
MLnick/scalanlp-core
data/src/main/scala/scalanlp/data/Datasets.scala
Scala
apache-2.0
2,482
package sample.blog import akka.actor.SupervisorStrategy.Decider import akka.actor.{ Actor, ActorInitializationException, ActorLogging, ActorRef, ActorSystem, AllForOneStrategy, Props, SupervisorStrategy, Terminated, Timers } import com.typesafe.config.ConfigFactory import scala.concurrent.Future import scala.io.StdI...
haghard/akka-pq
src/main/scala/sample/blog/SupervisionApp.scala
Scala
apache-2.0
2,957
/* * Copyright 2020 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/vat-registration-frontend
it/controllers/registration/attachments/EmailCoverSheetControllerISpec.scala
Scala
apache-2.0
2,643
package com.seanshubin.uptodate.logic trait Reporter { def reportSummary(summary: SummaryReport) def reportByDependency(artifactToUpgrade: Map[GroupAndArtifact, List[Upgrade]]) def reportUpgradesToApply(upgrades: Seq[Upgrade]) def reportUpgradesToIgnore(upgrades: Seq[Upgrade]) def reportInconsistencies(i...
SeanShubin/up-to-date
logic/src/main/scala/com/seanshubin/uptodate/logic/Reporter.scala
Scala
unlicense
691
/********************************************************************************************************************** * This file is part of Scrupal, a Scalable Reactive Web Application Framework for Content Management * * ...
scrupal/scrupal-core
scrupal-server/src/main/scala/scrupal/core/EntityProvider.scala
Scala
apache-2.0
14,590
/* * Copyright 2012 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 agree...
jkdcdlly/zipkin
zipkin-collector-service/config/collector-dev.scala
Scala
apache-2.0
1,659
sealed trait Trait1 sealed trait Trait2 class Class1 extends Trait1 class Class2 extends Trait2
scala/scala
test/files/neg/t12414b/a_1.scala
Scala
apache-2.0
98
package com.outr.nextui import pl.metastack.metarx.{Dep, Sub} package object transition { def delay(time: Double): Delay = new Delay(time) def repeat(times: Int, transition: Transition): Repeat = new Repeat(times, transition) def forever(transition: Transition): Repeat = new Repeat(Int.MaxValue, transition) ...
outr/nextui
core/src/main/scala/com/outr/nextui/transition/package.scala
Scala
mit
785
import leon.lang._ import leon.lang.synthesis._ import leon.lang.string._ import leon.collection._ object Justify { def tokenize(ascii: collection.List[Char]): collection.List[String] = tokenize0(ascii, "") def tokenize0(ascii: collection.List[Char], wordAcc: String): collection.List[String] = ascii match { ca...
ericpony/scala-examples
testcases/verification/editor/AsciiToPos.scala
Scala
mit
1,690
package tv.camfire.media_server.test.util.e2e import org.scalatra.test.specs2.ScalatraSpec import tv.camfire.media_server.config.{Properties, ServletModule} import tv.camfire.media_server.jetty.JettyLauncher import com.redis.RedisClientPool import tv.camfire.media_server.test.util.TestUtil import tv.camfire.media_serv...
jgrowl/camfire-signaling
signaling-server/src/test/scala/tv/camfire/media_server/test/util/e2e/StandaloneScalatraSpec.scala
Scala
mit
2,021
package repositories.storage.dao.events import models.storage.event.EventTypeRegistry.TopLevelEvents.{ MoveNodeType, MoveObjectType } import models.storage.event.move.{MoveNode, MoveObject} import no.uio.musit.models._ import no.uio.musit.test.MusitSpecWithAppPerSuite import no.uio.musit.test.matchers.MusitResultV...
kpmeen/musit
service_storagefacility/test/repositories/storage/dao/events/MoveDaoSpec.scala
Scala
gpl-2.0
5,024
package webhooq.model.dao import com.hazelcast.nio.DataSerializable import webhooq.logging.WebhooqLogger import java.io.{IOException, DataOutput, DataInput} class ExchangeRef(var vhost:Option[String]=None, var exchange:Option[String]=None) extends DataSerializable with WebhooqLogger { def this() { this(None,No...
webhooq/webhooq
src/main/scala/webhooq/model/dao/ExchangeRef.scala
Scala
apache-2.0
1,249
package aims.routing import aims.core import aims.core.{ Restlet, RestletWrapActor } import aims.marshalling.MarshallingActor import aims.model.{ Event, Marshalling } import akka.actor._ import akka.http.model.HttpResponse import akka.http.model.StatusCodes._ import akka.http.server._ import scala.collection.mutable ...
aiyanbo/aims
aims-core/src/main/scala/aims/routing/RouteActor.scala
Scala
mit
1,711
/** * © 2019 Refinitiv. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
dudi3001/CM-Well
server/cmwell-grid/src/main/scala/k/grid/monitoring/ProcKiller.scala
Scala
apache-2.0
913
import sbt._ import Keys._ import sys.process.{Process => SysProc, ProcessLogger} import java.util.concurrent._ import collection.mutable.ListBuffer import scala.pickling.Defaults._ import scala.pickling.json._ final case class GradingSummary(score: Int, maxScore: Int, feedback: String) object ScalaTestRunner { cl...
amathewk/func_design_scala
week1/example/project/ScalaTestRunner.scala
Scala
lgpl-3.0
7,968
/////////////////////////////////////////////////////////////////////////////// // collection.scala // // Copyright (C) 2011-2014 Ben Wing, The University of Texas at Austin // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // ...
utcompling/textgrounder
src/main/scala/opennlp/textgrounder/util/collection.scala
Scala
apache-2.0
44,904
package controllers.rest import com.mohiva.play.silhouette.test._ import play.api.inject.guice.GuiceInjectorBuilder import play.api.inject.bind import org.scalatest._ import org.scalatest.concurrent._ import org.scalatestplus.play._ import org.scalamock.scalatest.MockFactory import play.api.mvc._ import play.api.test...
leannenorthrop/play-mantra-accumulations
test/controllers/rest/GatheringRestControllerSpec.scala
Scala
apache-2.0
12,074
package com.giyeok.gitexplorer import com.giyeok.gitexplorer.Util._ trait RepositoryPrinter { this: Application => def printAllCommits() = { for (commit <- repo.allCommits) { println(s"commit ${commit.id}") if (commit.author.isDefined) { println(s"Author: ${com...
Joonsoo/gitexplorer
src/main/scala/com/giyeok/gitexplorer/RepositoryPrinter.scala
Scala
mit
590
package com.marekkadek.scrawler.crawlers import com.marekkadek.scraper.{Browser, Document} import fs2._ final class HttpsLinksInfiniteCrawler(browser: Seq[Browser[Task]]) extends Crawler[Task, String](browser) { override protected def onDocument(document: Document): Stream[Task, Yield[String]] = { val title = Y...
KadekM/scrawler
modules/scrawler/src/test/scala/com/marekkadek/scrawler/crawlers/HttpsLinksInfiniteCrawler.scala
Scala
mit
529
package com.datlinq.datafiniti.response import com.typesafe.scalalogging.Logger /** * Created by Tom Lous on 05/09/2017. * Copyright © 2017 Datlinq B.V.. */ sealed trait DatafinitiError { def url: String def message: String def exception: Exception = new Exception(message) override def toString: Stri...
datlinq/scalafiniti
src/main/scala/com/datlinq/datafiniti/response/DatafinitiError.scala
Scala
mit
3,056
/* * Copyright (c) 2013-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.a...
mdavid/lessig-bigdata
lib/snowplow/2-collectors/scala-stream-collector/project/Dependencies.scala
Scala
mit
3,705
package top { package middle { import bottom.B.b class C { def p() = println("hello, world") def f = b // comment me to see Predef exclusion } } } package bottom { import Predef.{Set => _} object B { def b = Set(42) } }
lrytz/scala
test/files/pos/yimports-order-b.scala
Scala
apache-2.0
264
/* * The MIT License * * Copyright (c) 2015 Fulcrum Genomics LLC * * 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 us...
fulcrumgenomics/dagr
core/src/test/scala/dagr/core/cmdline/pipelines/Pipelines.scala
Scala
mit
2,850
/* * 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
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/ColumnPruningSuite.scala
Scala
apache-2.0
3,005
/* * 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 ...
RSulzmann/openwhisk
tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBArtifactStoreTests.scala
Scala
apache-2.0
6,656
/* * 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/test/scala/org/scalatest/matchers/PropertyFunSuite.scala
Scala
apache-2.0
3,671
class A { def saludar = "Saludo desde clase A" override def toString = "Clase: " + getClass.getName } class B extends A { override def saludar = "saludo desde B" } class C extends B { override def saludar = "saludo desde C y " + super.saludar } val obj1:A = new A // Obj2 es de tipo A que encapsula el tipo hijo ...
romanarranz/NTP
S3/polimorfismo.scala
Scala
mit
385
package io.github.davepkennedy.bark.state import io.github.davepkennedy.bark.TimeSource import io.github.davepkennedy.bark.ui.Displayable trait Follower extends RaftActor { this: Displayable with TimeSource => when(FollowerState) { case Event (requestVote: RequestVote, data: FollowerData) => if (shoul...
davepkennedy/bark
src/main/scala/io/github/davepkennedy/bark/state/Follower.scala
Scala
mit
1,806
/* * Copyright 2014 Commonwealth Computer Research, 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 applica...
mmatz-ccri/geomesa
geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/text/WKUtils.scala
Scala
apache-2.0
2,191
/** * Copyright 2011-2012 eBusiness Information, Groupe Excilys (www.excilys.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * *...
Tjoene/thesis
Case_Programs/gatling-1.4.0/gatling-charts/src/main/scala/com/excilys/ebi/gatling/charts/result/reader/buffers/GeneralStatsBuffers.scala
Scala
gpl-2.0
3,554
/* * 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 ...
jinglining/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/api/stream/sql/UnionTest.scala
Scala
apache-2.0
2,740
package client.handlers import client.UnitTest import client.handler.ConnectionHandler import client.rootmodel.ConnectionsRootModel import diode.RootModelRW import shared.dtos.Connection import shared.models.ConnectionsModel /** * Created by shubham.k on 14-09-2016. */ class ConnectionHandlerTest extends UnitTest...
LivelyGig/ProductWebUI
client/src/test/scala/client/handlers/ConnectionHandlerTest.scala
Scala
apache-2.0
843
package gui object ProjectAsteroidGUI { }
TarmoA/ProjectAsteroid
Documents/ohjelmointistuff/Asteroid/src/gui/ProjectAsteroidGUI.scala
Scala
gpl-3.0
45
package akashic.storage.auth object CallerId { val ANONYMOUS = "" }
akiradeveloper/akashic-storage
src/main/scala/akashic/storage/auth/CallerId.scala
Scala
apache-2.0
71
object Test { List(1) match { case Nil => 0; case (x::xs) => x } case class Foo(a: Int) val FooAlias: Foo.type = Foo Foo(0) match { case FooAlias(_) => 0 } Foo(0) match { case Foo(_) => 0 } case class Bar() val BarAlias: Bar.type = Bar Bar() match { case BarAlias() => 0 } Bar() match { case Bar() =>...
yusuke2255/dotty
tests/untried/pos/t7377b.scala
Scala
bsd-3-clause
327
package org.jetbrains.plugins.scala.dfa.lattice package specific import scala.annotation.tailrec /** * Lattice type class implementation for flat lattices * * A flat lattice has a Top, a Bottom, and possibly infinitely many unrelated other elements in between. * * Top * / / \\ \\ * A B C ...
JetBrains/intellij-scala
scala/dfa/src/org/jetbrains/plugins/scala/dfa/lattice/specific/FlatLattice.scala
Scala
apache-2.0
2,088
/* * Copyright 2014-2021 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
copperlight/atlas
atlas-core/src/test/scala/com/netflix/atlas/core/stacklang/DupSuite.scala
Scala
apache-2.0
970
package stackoverflow import org.apache.spark.{SparkConf, SparkContext} import org.apache.spark.rdd.RDD import scala.annotation.tailrec /** A raw stackoverflow posting, either a question or an answer */ case class Posting(postingType: Int, id: Int, acceptedAnswer: Option[Int], parentId: Option[QID], score: Int, tags...
alicanalbayrak/ScalaExperiments
stackoverflow/src/main/scala/stackoverflow/StackOverflow.scala
Scala
mit
9,938
/* * MilmSearch is a mailing list searching system. * * Copyright (C) 2013 MilmSearch Project. * * 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 any...
mzkrelx/milm-search-core
src/main/scala/org/milmsearch/core/domain/MLProposal.scala
Scala
gpl-3.0
4,218
/* * 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 ...
h2oai/sparkling-water
api-generation/src/main/scala/ai/h2o/sparkling/api/generation/common/ParameterSubstitutionContext.scala
Scala
apache-2.0
1,941
package controllers import java.util.Date import play.api.libs.json.Json import utils.JsonFormats._ case class ShortUrlView( short_url: String, hash: String, long_url: String, created: Date ) object ShortUrlView { implicit val shortUrlViewFormat = Json.format[ShortUrlView] } case class StatsView(clicks: ...
jriecken/shorty
app/controllers/apiViews.scala
Scala
mit
404
/* * 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 ...
andrewor14/iolap
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/ConvertToLocalRelationSuite.scala
Scala
apache-2.0
2,043
/* * 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/nn/Cropping3D.scala
Scala
apache-2.0
6,428
package de.m7w3.signal.account import java.net.URLEncoder import de.m7w3.signal.store.SignalDesktopProtocolStore import de.m7w3.signal.store.model.{Identity, Registration} import de.m7w3.signal.{Constants, Logging, TemporaryIdentity, Util} import org.whispersystems.libsignal.util.KeyHelper import org.whispersystems.s...
ayoub-benali/signal-desktop-client
src/main/scala/de/m7w3/signal/account/AccountInitializationHelperImpl.scala
Scala
apache-2.0
1,780
class Elem trait QueueSignature: type Queue def empty: Queue def append(q: Queue, e: Elem): Queue def pop(q: Queue): Option[(Elem, Queue)] val QueueModule: QueueSignature = object QueueImpl extends QueueSignature: type Queue = (List[Elem], List[Elem]) def empty = (Nil, Nil) def append(q: Queue, e:...
dotty-staging/dotty
tests/pos/opaques-queue.scala
Scala
apache-2.0
865
package rpgboss.editor.uibase import rpgboss.lib.Layout import rpgboss.lib.Utils import rpgboss.editor.Internationalized._ import rpgboss.editor.uibase.SwingUtils._ import scala.swing._ import rpgboss.lib.SizeType import rpgboss.lib.LayoutType import rpgboss.editor.Internationalized._ class PixelPercentField(initial:...
toastythought/rpgboss
editor/src/main/scala/rpgboss/editor/uibase/LayoutEditingPanel.scala
Scala
agpl-3.0
2,615
package codecheck.github.events import org.json4s.JValue import org.json4s.JArray import codecheck.github.models.AbstractJson import codecheck.github.models.PullRequest import codecheck.github.models.PullRequestAction import codecheck.github.models.Repository import codecheck.github.models.User case class PushCommit(...
code-check/github-api-scala
src/main/scala/codecheck/github/events/PushEvent.scala
Scala
mit
1,283
package com.twitter.finagle.redis.protocol import com.twitter.finagle.redis.util.GetMonadArg import com.twitter.finagle.redis.ClientError import com.twitter.finagle.redis.util.StringToChannelBuffer import org.jboss.netty.buffer.{ChannelBuffer, ChannelBuffers} case class SAdd(key: ChannelBuffer, values: Seq[ChannelBuf...
travisbrown/finagle
finagle-redis/src/main/scala/com/twitter/finagle/redis/protocol/commands/Sets.scala
Scala
apache-2.0
3,407
/* 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/tensors/ops/package.scala
Scala
apache-2.0
880
package ecommerce.sales.integration import org.scalatest.{Matchers, WordSpecLike} import ecommerce.inventory.domain.Product.ProductAdded import test.support.view.{ViewsTestSupport, Daos} import scala.slick.driver.H2Driver import infrastructure.EcommerceSettings import test.support.{RainbowLogger, TestConfig} import dd...
pawelkaczor/ddd-leaven-akka
src/test/scala/ecommerce/sales/integration/InventoryProjectionTest.scala
Scala
mit
1,065
package pep_084 import scala.util.Random import scalaz._, Scalaz._ object Solution { val DICE_SIZE = 4 val DOUBLE = DICE_SIZE * 2 type Pos = String val board: Vector[Pos] = Vector( "GO", "A1", "CC1", "A2", "T1", "R1", "B1", "CH1", "B2", "B3", "JAIL", "C1", "U1", "C2", "C3", "R2", "D1", "CC2", "D2",...
filippovitale/pe
pe-solution/src/main/scala/pep_084/Solution.scala
Scala
mit
2,238
package centaur.api import java.io.IOException import java.util.concurrent.Executors import akka.actor.ActorSystem import akka.http.scaladsl.Http import akka.http.scaladsl.model.HttpRequest import akka.stream.{ActorMaterializer, ActorMaterializerSettings, StreamTcpException} import centaur.test.metadata.WorkflowMetad...
broadinstitute/centaur
src/main/scala/centaur/api/CentaurCromwellClient.scala
Scala
bsd-3-clause
4,157
package au.com.nicta package postmark package receiving import argonaut._, Argonaut._ import com.github.nscala_time.time.Imports._ import scalaz.Equal import au.com.nicta.postmark.common.Header case class Email(from: String, fromFull: FullEmailAddress, to: List[String], toFull: List[FullEmailAddress], ...
NICTA/postmarkapp-client
src/main/scala/au/com/nicta/postmark/receiving/Email.scala
Scala
bsd-3-clause
2,748
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
liquidarmour/ct-calculations
src/main/scala/uk/gov/hmrc/ct/computations/CP248.scala
Scala
apache-2.0
931
package redmine4s.api.json import org.joda.time.DateTime import play.api.libs.functional.syntax._ import play.api.libs.json._ import redmine4s.api.model._ trait WikiJsonHelper extends AttachmentJsonHelper { implicit val wikiIndexReads: Reads[WikiIndex] = ( (__ \\ 'title).read[String] ~ ((__ \\ 'parent \\ ...
tomingtoming/redmine4s
src/main/scala/redmine4s/api/json/WikiJsonHelper.scala
Scala
apache-2.0
1,628
/* * 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 ...
minixalpha/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/trees/TreeNode.scala
Scala
apache-2.0
25,261
package com.lambtors.poker_api.module.poker.application.turn import cats.implicits._ import com.lambtors.poker_api.module.poker.domain.{PlayerRepository, PokerGameRepository} import com.lambtors.poker_api.module.poker.domain.error.{ PokerGameNotFound, TurnNotPossibleWhenFlopIsNotGiven, TurnNotPossibleWhenItIsAlr...
lambtors/poker-api
src/main/scala/com/lambtors/poker_api/module/poker/application/turn/TurnCardAdder.scala
Scala
mit
2,182
import org.specs2.mutable._ import org.specs2.runner._ import org.junit.runner._ import play.api.test._ import play.api.test.Helpers._ import models.TweetQuery import models.GeoSquare @RunWith(classOf[JUnitRunner]) class TweetQuerySpec extends Specification { "A TweetQuery" should { val query1 = TweetQuery("test...
TweetAggregator/CrossTalk
test/TweetQuerySpec.scala
Scala
gpl-2.0
1,154
package edu.knowitall.common /** Functions for managing resources. */ object Resource { /** * A using clause that uses structural typing so it can be used on * any object with a close method. * * The supplied block will run with the allocated resource. * The resource will be cleaned up when the block ...
knowitall/common-scala
src/main/scala/edu/knowitall/common/Resource.scala
Scala
bsd-3-clause
515
package domain.strategy.core import org.scalatest.FunSuite import scala.collection.mutable class MACDTest extends FunSuite { test("") { import DummyCandle._ val candles = new mutable.LinkedHashMap[Long, Bar]() candles.put(1L, new Bar(1).put(newTicker("1", 100.0))) candles.put(2L, new Bar(2).put(ne...
rysh/scalatrader
scalatrader/test/domain/strategy/core/MACDTest.scala
Scala
mit
730
/* __ *\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2002-2013, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\___/_/ |_/...
felixmulder/scala
src/library/scala/Product20.scala
Scala
bsd-3-clause
4,406
package org.flowpaint.renderer.packedsurface /** * * * @author Hans Haggstrom */ class RasterLayer extends Layer { private var channels : Map[Channel, Raster] = Map() }
zzorn/flowpaint
src/main/scala/org/flowpaint/renderer/packedsurface/RasterLayer.scala
Scala
gpl-2.0
185
/* * 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 ...
zzcclp/carbondata
integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/iud/TestUpdateAndDeleteWithLargeData.scala
Scala
apache-2.0
2,792
package jp.kobe_u /** * Provides classes for Constraint Programming in Scala. * * ==OVERVIEW== * The following is a sample program in Copris DSL (Domain Specific Language). * {{{ * object FirstStep { * import jp.kobe_u.copris._ * import jp.kobe_u.copris.dsl._ * * def main(args: Array[String]) = { * ...
vonwenm/copris
src/jp/kobe_u/package.scala
Scala
mit
535
/*********************************************************************** * Copyright (c) 2013-2018 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...
ddseapy/geomesa
geomesa-tools/src/main/scala/org/locationtech/geomesa/tools/status/VersionRemoteCommand.scala
Scala
apache-2.0
1,425
/** * 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...
hochgi/CM-Well
server/cmwell-util/src/test/scala/cmwell/util/streams/test/SortedStreamsMergeByTests.scala
Scala
apache-2.0
33,522
package org.daydev.scala.bb.rewrite.config trait RewriteConfig[A] extends Function1[String, RewriteRule[A]] { def addRule(key: String)(rule: RewriteRule[A]): RewriteConfig[A] def updateRule(key: String)(rule: RewriteRule[A]): RewriteConfig[A] def dropRule(key: String): RewriteConfig[A] def defaultRule: Rew...
daydev/bbcode-scala
src/main/scala/org/daydev/scala/bb/rewrite/config/RewriteConfig.scala
Scala
mit
336
/* * Copyright 2013 Julian Peeters * * 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...
julianpeeters/artisanal-pickle-maker
src/main/scala/methods/cls/Copy.scala
Scala
apache-2.0
1,422
/* * Copyright (C) 2012 The Regents of The University California. * 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/LICENS...
sameeragarwal/blinkdb_dev
src/main/scala/shark/execution/CommonJoinOperator.scala
Scala
apache-2.0
8,678
package peregin.gpv.gui import java.io.File import peregin.gpv.util.Logging import scala.swing._ import scala.swing.event.ButtonClicked import peregin.gpv.GpsOverlayApp import javax.swing.filechooser.FileNameExtensionFilter class FileChooserPanel(info: String, action: File => Unit, filter: FileNameExtensionFilter, o...
peregin/gps-overlay-on-video
src/main/scala/peregin/gpv/gui/FileChooserPanel.scala
Scala
mit
1,240
package org.bitcoins.spvnode.gen import org.bitcoins.core.crypto.DoubleSha256Digest import org.bitcoins.core.gen.{BlockchainElementsGenerator, CryptoGenerators} import org.bitcoins.core.protocol.blockchain.Block import org.bitcoins.core.util.BitcoinSLogger import org.bitcoins.spvnode.block.{MerkleBlock, PartialMerkleT...
bitcoin-s/bitcoin-s-spv-node
src/main/scala/org/bitcoins/spvnode/gen/MerkleGenerator.scala
Scala
mit
2,763
/* * 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
core/src/main/scala/org/apache/spark/shuffle/ShuffleBlockPusher.scala
Scala
apache-2.0
19,964
/** * Copyright 2015 Mohiva Organisation (license at mohiva dot com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless req...
cemcatik/play-silhouette
silhouette/app/com/mohiva/play/silhouette/impl/repositories/DelegableAuthInfoRepository.scala
Scala
apache-2.0
5,445
package com.twitter.finatra.kafkastreams.partitioning.internal import org.apache.kafka.streams.processor.internals.DefaultKafkaClientSupplier class StaticPartitioningKafkaClientSupplierSupplier( numApplicationInstances: Int) extends DefaultKafkaClientSupplier {}
twitter/finatra
kafka-streams/kafka-streams-static-partitioning/src/main/scala-kafka2.5/StaticPartitioningKafkaClientSupplierSupplier.scala
Scala
apache-2.0
271
/* * 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 ...
rikima/spark
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/CreateHiveTableAsSelectCommand.scala
Scala
apache-2.0
3,810
package com.rouesnel.typedsql.examples import com.rouesnel.typedsql._ @SqlQuery object WildcardExample { def query(people: Unpartitioned[Person]) = "SELECT 1 as test_int, * FROM ${people}" } @SqlQuery object WildcardChainedExample { def query(wildcard: WildcardExample.DataSource) = "SELECT 1 as test_int2...
laurencer/typedsql
examples/src/main/scala/com/rouesnel/typedsql/examples/WildcardChainedExample.scala
Scala
apache-2.0
645
package com.github.sstone.amqp import scala.jdk.CollectionConverters._ import com.rabbitmq.client.AMQP.BasicProperties import com.rabbitmq.client.{AMQP, ShutdownSignalException, Channel, Envelope} import akka.actor.{Actor, Props, ActorRef, ActorRefFactory} import java.util.concurrent.CountDownLatch object Amq...
gawkermedia/amqp-client
src/main/scala/com/github.sstone/amqp/Amqp.scala
Scala
mit
9,974
/* * Copyright (c) 2009-2010 European Molecular Biology Laboratory * * 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 versio...
swhgoon/ScalaR
src/main/scala/uk/ac/ebi/sr/model/Environment.scala
Scala
gpl-3.0
3,730
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.3 * @date Sun Oct 2 22:43:44 EDT 2011 * @see LICENSE (MIT style license file). */ package scalation.minima import scala.math.pow import scalation.calculus.Differential.FunctionV2S im...
NBKlepp/fda
scalation_1.3/scalation_modeling/src/main/scala/scalation/minima/NLPTest.scala
Scala
mit
5,055
package edu.gemini.catalog.image import java.util.concurrent.{ExecutorService, Executors, ThreadFactory, TimeUnit} import org.scalatest.{FlatSpec, Matchers} import org.scalatest.prop.PropertyChecks import scalaz._ import Scalaz._ import scalaz.NonEmptyList._ import scalaz.concurrent.Task class TaskHelperSpec extend...
spakzad/ocs
bundle/edu.gemini.catalog/src/test/scala/edu/gemini/catalog/image/TaskHelperSpec.scala
Scala
bsd-3-clause
3,144
/* * 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...
ericchang/incubator-toree
kernel/src/test/scala/org/apache/toree/kernel/protocol/v5/kernel/socket/HeartbeatSpec.scala
Scala
apache-2.0
2,188
package com.donniewest.titan.Util import javax.crypto.{KeyGenerator, Mac} import javax.crypto.spec.SecretKeySpec import com.github.kevinsawicki.http.HttpRequest.Base64 import java.security.{SecureRandom, MessageDigest} object Sign { def base64andHmacSha256(toSign: String, macKey: String) = { // takes in someth...
DonnieWest/Titan
src/main/scala/com/donniewest/titan/Util/Sign.scala
Scala
apache-2.0
1,292
/* * This file is part of the docdiff project. * * 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...
matanster/docdiff
src/main/scala/gnieh/docdiff/matching/Matcher.scala
Scala
apache-2.0
3,820
package com.redislabs.provider.redis.df.benchmark import com.redislabs.provider.redis.env.RedisClusterEnv import com.redislabs.provider.redis.util.Person import org.apache.spark.rdd.RDD /** * @author The Viet Nguyen */ trait SingleValueBenchmarkSuite extends DataframeBenchmarkSuite with RedisClusterEnv { overr...
RedisLabs/spark-redis
src/test/scala/com/redislabs/provider/redis/df/benchmark/SingleValueBenchmarkSuite.scala
Scala
bsd-3-clause
509
package lms.util import lms._ import lms.util._ import lms.testutil.FileDiffSpec import scala.lms.common._ import scala.reflect.SourceContext import scala.lms.internal.GenericCodegen import java.io.PrintWriter import java.io.StringWriter import java.io.FileOutputStream trait EitherCPSProg extends EitherCPS ...
manojo/lms-utils
util/src/test/scala/lms/util/EitherCPSSuite.scala
Scala
mit
2,670
package com.spark.scala.main import com.spark.scala.core import org.apache.spark.SparkContext import org.apache.spark.SparkConf import com.spark.scala.core.SparkWordCountJob import java.util.Properties import java.io.FileInputStream import com.spark.scala.core.SparkWordCountJob import com.spark.scala.kafka.prodcons.Sc...
rayanegouda/Spark-Scala
src/main/scala/com/spark/scala/main/Run.scala
Scala
apache-2.0
11,002
package net.acira.bexprp object Main { def main(args: Array[String]) { val e = "(not a -> b) or c" val s = e.expression.flatMap(_.evaluate) val b = e.bind("a" -> true, "b" -> false) b.get.prettyPrint println } }
leoschweizer/bexprp
src/main/scala/net/acira/bexprp/Main.scala
Scala
mit
227
package org.http4s.parser import org.http4s.{Header, Challenge} import org.http4s.internal.parboiled2._ abstract private[parser] class ChallengeParser[H <: Header](input: ParserInput) extends Http4sHeaderParser[H](input) { def ChallengeRule: Rule1[Challenge] = rule { Token ~ oneOrMore(LWS) ~ zeroOrMore(AuthPar...
ZizhengTai/http4s
core/src/main/scala/org/http4s/parser/ChallengeParser.scala
Scala
apache-2.0
712
package slick.jdbc.meta import slick.dbio.Effect import slick.jdbc.{ResultSetAction, Invoker} import slick.basic.BasicStreamingAction /** A wrapper for a row in the ResultSet returned by DatabaseMetaData.getTables(). */ case class MTable( name: MQName, tableType: String, remarks: String, typeName: Option[MQName], ...
xavier-fernandez/slick
slick/src/main/scala/slick/jdbc/meta/MTable.scala
Scala
bsd-2-clause
1,903
package upickle import derive._ object Main extends App { import Generic.ADT import Hierarchy._ import Recursive._ import Defaults._ import ADTs.ADT0 // type Data = ADT[Seq[(Int, Int)], String, A, LL, ADTc, ADT0] // // old.write[A](???) case class C(nodes: List[C]) // implicitly[upickle.old....
Voltir/upickle
upickle/shared/src/test/scala/upickle/Main.scala
Scala
mit
559
package bita import akka.actor.ActorRef import scala.collection.mutable.HashMap import akka.dispatch.Envelope /** * @author Samira Tasharofi (tasharo1@illinois.edu) */ /** * The envelope used for synchronous message response */ case class PromiseEnvelope(message: LogicalMessage, sender: ActorRef) /** * Th...
samira-t/Bita
src/main/scala/bita/Envelopes.scala
Scala
apache-2.0
1,248
package com.twitter.querulous.sql import java.sql._ import org.apache.commons.dbcp.TesterResultSet class FakeResultSet( private[this] val stmt: Statement, private[this] val data: scala.Array[scala.Array[java.lang.Object]], private[this] val resultSetType: Int, private[this] val resultSetConcurrency: Int ) e...
kievbs/querulous210
src/test/scala/com/twitter/querulous/sql/FakeResultSet.scala
Scala
apache-2.0
5,290
package se.uu.farmbio.vs.examples import java.nio.file.Paths import org.apache.commons.io.FilenameUtils import org.apache.hadoop.io.{LongWritable, Text} import org.apache.spark.Logging import org.apache.spark.{ SparkConf, SparkContext } import org.apache.spark.mllib.linalg.{ DenseVector, SparseVector } import org.apa...
laeeq80/spark-cpvs
vs.examples/src/main/scala/se/uu/farmbio/vs/examples/DockerWithML.scala
Scala
apache-2.0
10,692
/* * Copyright 2019 Spotify AB. * * 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 ...
spotify/scio
scio-examples/src/test/scala/com/spotify/scio/examples/extra/TypedStorageBigQueryTornadoesTest.scala
Scala
apache-2.0
1,536
package de.mineformers.core.util.collection import scala.collection.mutable /** * HMap * * @author PaleoCrafter */ trait MutableHMap[TypedKey[_]] { self => def get[T](key: TypedKey[T]): Option[T] def put[T](key: TypedKey[T], value: T): Unit def immutable: HMap[TypedKey] def keySet: Set[TypedKey[_]] }...
MineFormers/MFCore
src/main/scala/de/mineformers/core/util/collection/MutableHMap.scala
Scala
mit
827
package feh.tec.agent import scala.concurrent.{ExecutionContext, Await, Future} import akka.actor.{Scheduler, ActorSystem, ActorRef, Actor} import scala.concurrent.duration._ import akka.pattern._ trait AgentExecutionLoop{ type Execution def execution: Execution def pauseBetweenExecs: FiniteDuration def exec...
fehu/agent-tareas
agent/src/main/scala/feh/tec/agent/AgentExecutionLoop.scala
Scala
mit
4,856
package io.github.thedeetch.openweathermap import akka.actor.ActorSystem import akka.http.scaladsl.Http import akka.http.scaladsl.model._ import akka.http.scaladsl.server.Directives._ import akka.stream.ActorMaterializer import org.scalatest.concurrent.ScalaFutures import org.scalatest.time.{Millis, Seconds, Span} imp...
thedeetch/openweathermap-cli
src/test/scala/io/github/thedeetch/openweathermap/CurrentWeatherSuite.scala
Scala
mit
2,838
/******************************************************************************* * Copyright (c) 2014 Guillaume DUBUISSON DUPLESSIS <guillaume.dubuisson_duplessis@insa-rouen.fr>. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * ...
GuillaumeDD/scala99problems
src/main/scala/multiwayTree/P72/sol01.scala
Scala
gpl-3.0
944
package scala.annotation.internal import scala.annotation.Annotation /** An annotation produced by Namer to indicate an inline parameter */ final class InlineParam() extends Annotation
som-snytt/dotty
library/src/scala/annotation/internal/TransparentParam.scala
Scala
apache-2.0
187