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 |
|---|---|---|---|---|---|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | pronix/spark | sql/core/src/test/scala/org/apache/spark/sql/columnar/PartitionBatchPruningSuite.scala | Scala | apache-2.0 | 5,312 |
package cz.jenda.pidifrky.logic
import cz.jenda.pidifrky.ui.dialogs.NormalProgressDialogWrapper
/**
* @author Jenda Kolena, jendakolena@gmail.com
*/
trait ProgressListener {
def apply(percent: Int): Unit
}
object ProgressListener {
def noop(): ProgressListener = new ProgressListener {
override def apply(pe... | jendakol/pidifrky | client/src/main/scala/cz/jenda/pidifrky/logic/ProgressListener.scala | Scala | apache-2.0 | 555 |
package org.sameersingh.scalaplot
/**
* @author sameer
* @since 6/8/14.
*/
class GlobalImplicits {
def Axis(label: String = "", backward: Boolean = false, log: Boolean = false,
range: Option[(Double, Double)] = None): NumericAxis = {
val a = new NumericAxis
a.label = label
if (backward) a.b... | nightscape/scalaplot | src/main/scala/org/sameersingh/scalaplot/Implicits.scala | Scala | bsd-2-clause | 890 |
/*
* Copyright (C) 2015 Noorq, 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... | mailrest/mailrest | app/controllers/action/AccountAction.scala | Scala | apache-2.0 | 3,201 |
object SCL5222 {
class Temp {
protected[this] def foo() = "Hello"
def foo(s: String): Int = 123
}
class Temp2 extends Temp {
override def foo() = {
val str = super.foo()
/*start*/str/*end*/
""
}
}
}
//String | ilinum/intellij-scala | testdata/typeInference/bugs5/SCL5222.scala | Scala | apache-2.0 | 251 |
package org.otw.open.controllers
import com.badlogic.gdx.math.Vector2
import org.otw.open.dto.{Theme, Point}
import org.otw.open.testconfig.UnitSpec
import org.otw.open.util.UserSettings
import org.scalatest.BeforeAndAfterEach
/**
* Created by eilievska on 2/22/2016.
*/
class GameStateTest extends UnitSpec with B... | danielEftimov/OPEN | core/test/org/otw/open/controllers/GameStateTest.scala | Scala | apache-2.0 | 5,347 |
package io.getquill.context.cassandra
import java.time.{ Instant, LocalDate, ZoneId, ZonedDateTime }
import io.getquill.Query
class EncodingSpec extends EncodingSpecHelper {
"encodes and decodes types" - {
"sync" in {
import testSyncDB._
testSyncDB.run(query[EncodingTestEntity].delete)
testS... | getquill/quill | quill-cassandra/src/test/scala/io/getquill/context/cassandra/EncodingSpec.scala | Scala | apache-2.0 | 3,644 |
package authentikat.jwt
import JsonWebSignature._
import org.scalatest.FunSpec
import org.scalatest.Matchers
class JsonWebSignatureSpec extends FunSpec with Matchers {
describe("JsonWebSignature") {
it("Should generate nothing for algo = none ") {
JsonWebSignature(NONE, "someData", "secretKey") should eq... | jasongoodwin/authentikat-jwt | src/test/scala/authentikat/jwt/JsonWebSignatureSpec.scala | Scala | apache-2.0 | 1,456 |
package war.central
import settings.membership.Icon
import common.typeAliases._
import common.AlreadyExistException
import utils.Transition
import scala.util.Success
import javax.inject.Inject
import scala.util.Try
import utils.TransacTransitionExec
import utils.TransactionalTransition._
import log.LogSrv
import scala... | readren/coc-war-organizer | app/war/central/CentralPerformer.scala | Scala | apache-2.0 | 10,455 |
// Copyright 2014 Commonwealth Bank of Australia
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ap... | CommBank/edge | src/test/scala/com/cba/omnia/edge/source/compressible/CompressibleTypedDelimitedSpec.scala | Scala | apache-2.0 | 2,735 |
/*
* Copyright 2017 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/featran | numpy/src/test/scala/com/spotify/featran/numpy/NumPyTest.scala | Scala | apache-2.0 | 3,617 |
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
*/
//#api-sird-router
package api
import javax.inject.Inject
import play.api.mvc._
import play.api.routing.Router.Routes
import play.api.routing.SimpleRouter
import play.api.routing.sird._
class ApiRouter @Inject() (controller: ApiController) extends S... | benmccann/playframework | documentation/manual/working/scalaGuide/advanced/routing/code/ApiRouter.scala | Scala | apache-2.0 | 1,170 |
package org.scala_tools.maven.mojo.extractor
import org.apache.maven.plugin.descriptor.PluginDescriptor;
import org.apache.maven.project.MavenProject;
import org.apache.maven.tools.plugin.extractor.ExtractionException;
import org.apache.maven.tools.plugin.extractor.MojoDescriptorExtractor;
import org.apache.maven.tool... | jsuereth/scala-mojo-support | src/main/java/org/scala_tools/maven/mojo/extractor/ScalaMojoDescriptionExtractor.scala | Scala | bsd-3-clause | 1,898 |
package lila.challenge
import Challenge.TimeControl
import lila.game.{ Game, Pov }
import lila.user.User
final class ChallengeMaker(
userRepo: lila.user.UserRepo,
gameRepo: lila.game.GameRepo
)(implicit ec: scala.concurrent.ExecutionContext) {
def makeRematchFor(gameId: Game.ID, dest: User): Fu[Option[Chal... | luanlv/lila | modules/challenge/src/main/ChallengeMaker.scala | Scala | mit | 1,727 |
/*
* Copyright 2014-16 Intelix Pty 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 or agr... | intelix/reactiveservices | components/websocket-endpoint/src/main/scala/au/com/intelix/rs/websocket/WebsocketBinaryFrameFolder.scala | Scala | apache-2.0 | 1,953 |
package recipes
import java.util.concurrent.ThreadLocalRandom
import akka.actor.ActorSystem
import akka.stream.scaladsl.{Flow, Sink, Source, SourceQueueWithComplete}
import akka.stream.{ActorMaterializer, ActorMaterializerSettings, Materializer, OverflowStrategy}
import com.typesafe.config.ConfigFactory
import scala... | haghard/streams-recipes | src/main/scala/recipes/Betting.scala | Scala | apache-2.0 | 6,266 |
/*
* 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 | examples/spark/src/main/scala/org/apache/carbondata/benchmark/SimpleQueryBenchmark.scala | Scala | apache-2.0 | 12,820 |
/*
* BSD License
*
* Copyright (c) 2015, University of Barcelona
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright noti... | GuillermoBlasco/gmX | src/main/scala/edu/ub/guillermoblascojimenez/gmx/ClusterGraph.scala | Scala | bsd-3-clause | 3,594 |
/*
* 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... | cheeseng/scalatest | scalatest-test/src/test/scala/org/scalatest/ClueSpec.scala | Scala | apache-2.0 | 9,205 |
package no.nextgentel.oss.akkatools.testing
import java.util.concurrent.TimeUnit
import akka.actor.{ActorRef, ActorSystem}
import akka.pattern.ask
import akka.util.Timeout
import no.nextgentel.oss.akkatools.persistence.GetState
import scala.concurrent.Await
import scala.concurrent.duration.Duration
import... | zapodot/akka-tools | akka-tools-persistence/src/main/scala/no/nextgentel/oss/akkatools/testing/AggregateStateGetter.scala | Scala | mit | 1,008 |
package jsantosp.actor
import akka.actor.{ ActorRef, Props }
import jsantosp.{ Topic, Message }
class SubscriberTest extends TestKitSpec("MyActorSystem") {
val mockedQueue = systemRef
"Subscriber" should {
"subscribe to an existing queue/topic" in {
val subscriber = system.actorOf(
Props(new... | JSantosP/akka-persistent-queue | src/test/scala/jsantosp/actor/SubscriberTest.scala | Scala | apache-2.0 | 911 |
/*
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 agreed to in writing, software
distr... | nevillelyh/algebird | algebird-core/src/main/scala/com/twitter/algebird/AffineFunction.scala | Scala | apache-2.0 | 2,039 |
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
/** @author John Miller
* @version 1.2
* @date Sat Aug 20 23:20:26 EDT 2011
* @see LICENSE (MIT style license file).
*
* @see math.uc.edu/~halpern/Linear.progr.folder/Handouts.lp.02/Revisedsimplex.pdf
*/
package scalatio... | scalation/fda | scalation_1.2/src/main/scala/scalation/minima/RevisedSimplex.scala | Scala | mit | 14,987 |
package com.holdenkarau.spark.testing
import org.apache.spark.SparkContext
import org.apache.spark.sql.SQLContext
import java.util.concurrent.atomic.AtomicReference
/**
* Utility companion object to provide getOrCreate on SQLContext
*/
object SQLContext {
private val INSTANTIATION_LOCK = new Object()
/**
... | snithish/spark-testing-base | src/main/1.3-only/scala/com/holdenkarau/spark/testing/SQLContext.scala | Scala | apache-2.0 | 1,576 |
package doodle
package image
package examples
import doodle.core._
import doodle.image.Image
import doodle.random._
import cats.implicits._
object Layers {
val point =
(Random.double, Random.double).mapN((x, y) => Point(x * 800, y * 150))
val radius = Random.natural(30)
val circle =
(point, radius).ma... | underscoreio/doodle | image/shared/src/main/scala/doodle/image/examples/Layers.scala | Scala | apache-2.0 | 773 |
/**
* Copyright (c) 2015 Basho Technologies, Inc.
*
* This file is provided to you 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 ... | basho/spark-riak-connector | connector/src/main/scala/com/basho/riak/spark/SparkContextFunctions.scala | Scala | apache-2.0 | 2,208 |
package org.demo
import org.supler.{Message, Supler}
import Supler._
object RegisterDataForm {
form[RegisterData](f => List(
f.field(_.login)
.label("Login")
.validate(minLength(3)),
f.field(_.passwd)
.label("Password:")
.validate(minLength(8)),
f.field(_.confirmPasswd).label("Co... | jtjeferreira/supler | examples/src/main/scala/org/demo/RegisterDataForm.scala | Scala | apache-2.0 | 531 |
package fi.pyppe.ircbot.slave
import akka.actor._
import scala.concurrent.duration._
import fi.pyppe.ircbot.AkkaUtil.remoteActorSystemConfiguration
import fi.pyppe.ircbot.{CommonConfig, LoggerSupport}
import org.joda.time.DateTime
import scala.concurrent.Future
import org.jsoup.Jsoup
import org.jsoup.nodes.Document
im... | Pyppe/akka-ircbot | slave/src/main/scala/fi/pyppe/ircbot/slave/SlaveSystem.scala | Scala | mit | 6,863 |
package domala.tests.entity
import java.time.LocalDateTime
import java.util.Calendar
import domala._
import domala.jdbc.{Config, Result}
import domala.tests.TestConfig
import org.scalatest.{BeforeAndAfter, FunSuite}
class EmbeddableTestSuite extends FunSuite with BeforeAndAfter {
implicit val config: Config = Test... | bakenezumi/domala | paradise/src/test/scala/domala/tests/entity/EmbeddableTestSuite.scala | Scala | apache-2.0 | 2,560 |
package com.overviewdocs.ingest.model
/** State of an in-progress conversion, used to handle StepOutputFragments. */
sealed trait ConvertFragmentState
object ConvertFragmentState {
case object Start extends ConvertFragmentState
case object End extends ConvertFragmentState
case class AtChild(child: CreatedFile2) ... | overview/overview-server | worker/src/main/scala/com/overviewdocs/ingest/model/ConvertFragmentState.scala | Scala | agpl-3.0 | 351 |
package io.github.shogowada.scala.jsonrpc
import io.github.shogowada.scala.jsonrpc.Types.Id
import scala.language.experimental.macros
object Models {
case class JSONRPCMethod(jsonrpc: String, method: String)
case class JSONRPCId(jsonrpc: String, id: Id)
case class JSONRPCRequest[PARAMS]
(
jsonrpc: S... | shogowada/scala-json-rpc | shared/src/main/scala/io/github/shogowada/scala/jsonrpc/Models.scala | Scala | mit | 1,633 |
package breeze.sequences
/*
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 applicable l... | tjhunter/scalanlp-core | learn/src/main/scala/breeze/sequences/CRF.scala | Scala | apache-2.0 | 10,831 |
/*
* ____ ____ _____ ____ ___ ____
* | _ \\ | _ \\ | ____| / ___| / _/ / ___| Precog (R)
* | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data
* | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, In... | precog/platform | quirrel/src/main/scala/com/precog/quirrel/Compiler.scala | Scala | agpl-3.0 | 1,760 |
/*
* ============= Ryft-Customized BSD License ============
* Copyright (c) 2015, Ryft Systems, Inc.
* All rights reserved.
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must... | getryft/spark-ryft-connector | spark-ryft-connector/src/test/scala/com/ryft/spark/connector/WildcardMatchSpec.scala | Scala | bsd-3-clause | 3,770 |
/*
* 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/impl/PeriodicGraphCheckpointerSuite.scala | Scala | apache-2.0 | 6,982 |
package org.jetbrains.plugins.scala
package annotator
import org.intellij.lang.annotations.Language
import org.jetbrains.plugins.scala.base.SimpleTestCase
import org.jetbrains.plugins.scala.extensions._
import org.jetbrains.plugins.scala.lang.psi.api.expr.ScAssignStmt
/**
* Pavel.Fatin, 18.05.2010
*/
class Assignm... | ilinum/intellij-scala | test/org/jetbrains/plugins/scala/annotator/AssignmentAnnotatorTest.scala | Scala | apache-2.0 | 5,668 |
package org.opalj.exercise
import java.net.URL
import org.opalj.br.DeclaredMethod
import org.opalj.br.analyses.BasicReport
import org.opalj.br.analyses.DeclaredMethodsKey
import org.opalj.br.analyses.Project
import org.opalj.br.analyses.ProjectAnalysisApplication
import org.opalj.br.analyses.SomeProject
import org.op... | stg-tud/apsa | 2019/10-IFDS/Exercise/template/src/main/scala/org/opalj/exercise/Main.scala | Scala | cc0-1.0 | 1,566 |
package demo.mahout
import java.io.File
import org.apache.mahout.cf.taste.impl.model.file.FileDataModel
import org.apache.mahout.cf.taste.impl.neighborhood.NearestNUserNeighborhood
import org.apache.mahout.cf.taste.impl.recommender.GenericUserBasedRecommender
import org.apache.mahout.cf.taste.impl.similarity.PearsonC... | adamw/mahout-pres | src/main/scala/demo/mahout/MovieLens5Done.scala | Scala | apache-2.0 | 1,084 |
package services
import play.api.Logger
import play.api.libs.json._
import play.api.http.Status
import utils.HttpWrapper
import scala.language.postfixOps
import scala.language.implicitConversions
import monitoring.Counters
import app.ConfigProperties._
trait AccessControlService {
def findByUserId(userId: String): ... | Department-for-Work-and-Pensions/CarersAllowanceStaffAccess | casa/app/services/AccessControlService.scala | Scala | mit | 1,899 |
// Copyright 2016,2017,2018,2019,2020 Commonwealth Bank of Australia
//
// 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... | CommBank/grimlock | grimlock-core/src/main/scala/commbank/grimlock/framework/Statistics.scala | Scala | apache-2.0 | 8,810 |
package org.bitcoins.core.protocol
import org.bitcoins.core.number.UInt64
import org.bitcoins.crypto.{Factory, NetworkElement}
import scodec.bits.ByteVector
case class BigSizeUInt(num: UInt64) extends NetworkElement {
override val byteSize: Long = BigSizeUInt.calcSizeForNum(num)
override def bytes: ByteVector = ... | bitcoin-s/bitcoin-s | core/src/main/scala/org/bitcoins/core/protocol/BigSizeUInt.scala | Scala | mit | 2,218 |
package com.avsystem.commons
package collection
import scala.collection.compat.{immutable => scci}
import scala.collection.{immutable => sci, mutable => scm}
import scala.{collection => sc}
/**
* Aliases for Scala collections which are both concise and leave no doubt about whether the collection type is
* immutab... | AVSystem/scala-commons | commons-core/src/main/scala/com/avsystem/commons/collection/CollectionAliases.scala | Scala | mit | 4,561 |
/*
* 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 ... | aokolnychyi/spark | sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionSetSuite.scala | Scala | apache-2.0 | 9,532 |
/*
* 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 | sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionStateBuilder.scala | Scala | apache-2.0 | 4,515 |
/* Copyright (C) 2008-2016 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... | strubell/factorie | src/main/scala/cc/factorie/variable/DiscreteVariable.scala | Scala | apache-2.0 | 7,192 |
/**
* 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... | noslowerdna/kafka | core/src/test/scala/unit/kafka/log/LogCleanerTest.scala | Scala | apache-2.0 | 79,255 |
package org.igye.logic.graph.transfengine
import org.igye.logic.{Predicate, SubRule, Substitution}
case class PossibleTransformation(part: Predicate, rule: SubRule, eqLeft: Predicate, subs: Substitution) | Igorocky/logicproc | src/main/scala/org/igye/logic/graph/transfengine/PossibleTransformation.scala | Scala | mit | 205 |
object Test {
def main(args: Array[String]) {
class Singleton {
val field = ()
println("Initializing singleton.")
}
lazy val Singleton = new Singleton
var i = 0
while (i < 4) {
new Thread(new Runnable {
def run = Singleton.field
}).start
i += 1
}
}
}
| felixmulder/scala | test/files/run/lazy-concurrent.scala | Scala | bsd-3-clause | 318 |
// Copyright 2016,2017,2018,2019,2020 Commonwealth Bank of Australia
//
// 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... | CommBank/grimlock | grimlock-core/src/main/scala/commbank/grimlock/scalding/Statistics.scala | Scala | apache-2.0 | 6,694 |
package com.thetestpeople.trt.analysis
import org.junit.runner.RunWith
import org.scalatest._
import org.scalatest.junit.JUnitRunner
import java.util.concurrent.atomic.AtomicInteger
import com.thetestpeople.trt.model._
import com.thetestpeople.trt.model.impl.DummyData
import com.thetestpeople.trt.service._
import com.... | thetestpeople/trt | test/com/thetestpeople/trt/analysis/HistoricalTestAnalyserTest.scala | Scala | mit | 6,569 |
package pl.szymonmatejczyk
import akka.actor.{Cancellable, ActorSystem}
import akka.stream.scaladsl.OperationAttributes.InputBuffer
import akka.stream._
import akka.stream.scaladsl.FlowGraph.Implicits
import akka.stream.scaladsl._
import scala.concurrent.Future
import scala.concurrent.duration._
import scala.concurren... | szymonm/subgraphSampling | src/main/scala/pl/szymonmatejczyk/StreamsCheck.scala | Scala | apache-2.0 | 1,575 |
/*
* This software is licensed under the GNU Affero General Public License, quoted below.
*
* This file is a part of PowerAPI.
*
* Copyright (C) 2011-2014 Inria, University of Lille 1.
*
* PowerAPI is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public Lice... | rouvoy/powerapi | powerapi-core/src/test/scala/org/powerapi/reporter/FileDisplaySuite.scala | Scala | agpl-3.0 | 3,281 |
/**
* 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... | OpenPOWER-BigData/HDP-kafka | core/src/main/scala/kafka/tools/ProducerPerformance.scala | Scala | apache-2.0 | 14,030 |
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
/** @author John Miller
* @version 1.3
* @date Sat Aug 20 23:20:26 EDT 2011
* @see LICENSE (MIT style license file).
*/
package scalation.maxima
import scala.util.control.Breaks.{breakable, break}
import scalation.linalge... | NBKlepp/fda | scalation_1.3/scalation_modeling/src/main/scala/scalation/maxima/RevisedSimplex.scala | Scala | mit | 8,655 |
package akka.analytics.cassandra
import scala.concurrent.duration._
import akka.actor._
import akka.persistence.PersistentActor
import akka.serialization.Serializer
import akka.testkit._
import com.typesafe.config.ConfigFactory
import org.apache.spark.{SparkConf, SparkContext}
import org.apache.spark.rdd.RDD
import o... | zapletal-martin/akka-analytics | akka-analytics-cassandra/src/test/scala/akka/analytics/cassandra/CustomSerializationSpec.scala | Scala | apache-2.0 | 3,158 |
// Copyright (c) 2015, Thilo Planz.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the Apache License, Version 2.0
// as published by the Apache Software Foundation (the "License").
//
// Unless required by applicable law or agreed to in writing,
// software distribu... | thiloplanz/hat-tool-scala | src/main/scala/hatTool/NingJsonClient.scala | Scala | apache-2.0 | 9,664 |
/*
* 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 ... | davidzchen/samza | samza-hdfs/src/main/scala/org/apache/samza/system/hdfs/writer/HdfsWriter.scala | Scala | apache-2.0 | 1,795 |
/*
* 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 ... | akrabat/openwhisk | common/scala/src/main/scala/org/apache/openwhisk/common/TransactionId.scala | Scala | apache-2.0 | 12,812 |
package com.norbertsram.yamc.ui
import com.norbertsram.yamc.model.Board
trait Renderer {
def renderBoard(board: Board) : Unit
}
| snorbi07/YetAnotherMinesweeperClone | src/main/scala/com/norbertsram/yamc/ui/Renderer.scala | Scala | apache-2.0 | 136 |
package ru.stachek66.nlp.mystem
import org.slf4j._
/**
* alexeyev
* 31.08.14.
*/
object CLIRunner extends App {
val log: Logger = LoggerFactory.getLogger(getClass)
log.info("*************************************************************")
log.info("Hello, this is MyStem-for-jvm-wrapper library, it has no C... | alexeyev/mystem-scala | src/main/scala/ru/stachek66/nlp/mystem/CLIRunner.scala | Scala | mit | 435 |
package ch.megard.akka.http.cors
import java.util.concurrent.TimeUnit
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.Http.ServerBinding
import akka.http.scaladsl.model.headers.{Origin, `Access-Control-Request-Method`}
import akka.http.scaladsl.model.{HttpMethods, HttpRequest}
i... | lomigmegard/akka-http-cors | akka-http-cors-bench-jmh/src/main/scala/ch/megard/akka/http/cors/CorsBenchmark.scala | Scala | apache-2.0 | 3,042 |
/* Generated File */
package models.graphql.customer
import com.kyleu.projectile.graphql.{GraphQLContext, GraphQLSchemaHelper}
import com.kyleu.projectile.graphql.GraphQLUtils._
import models.customer.{CustomerRow, CustomerRowResult}
import models.graphql.address.AddressRowSchema
import models.graphql.payment.PaymentR... | KyleU/boilerplay | app/models/graphql/customer/CustomerRowSchema.scala | Scala | cc0-1.0 | 9,216 |
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
/** @author John Miller
* @version 1.2
* @date Mon Jan 5 14:00:12 EST 2015
* @see LICENSE (MIT style license file).
*/
package scalation.analytics
import scalation.math.FunctionS2S
import scalation.linalgebra.{MatrixD, Ve... | NBKlepp/fda | scalation_1.2/src/main/scala/scalation/analytics/GLM.scala | Scala | mit | 10,854 |
package com.mayreh.kaiyote.resource
sealed abstract class Attribute[A] {
def value: A
}
object Attribute {
case class AsIs[A](value: A) extends Attribute[A]
case class Change[A](value: A) extends Attribute[A]
}
| ocadaruma/kaiyote | core/src/main/scala/com/mayreh/kaiyote/resource/Attribute.scala | Scala | apache-2.0 | 219 |
package slamdata.engine.analysis
import scalaz.{Tree => ZTree, Validation, Semigroup, NonEmptyList, Foldable1, Show, Cord}
import scalaz.syntax.traverse._
import scalaz.std.vector._
import scalaz.std.list._
import scalaz.std.tuple._
import scala.collection.JavaConverters._
import slamdata.engine.{RenderTree, Termi... | mossprescott/quasar | src/main/scala/slamdata/engine/analysis/AnnotatedTree.scala | Scala | agpl-3.0 | 1,579 |
/*
Copyright 2016 David R. Pugh
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, soft... | ScalABM/models-library | farmer-patelli-zovko/src/main/scala-2.11/GodeSunderApp.scala | Scala | apache-2.0 | 3,651 |
package model
import scala.slick.driver.MySQLDriver.simple._
import scala.slick.ast.ColumnOption.{Default, NotNull}
import scala.slick.direct.AnnotationMapper.column
/**
*
* CREATE TABLE IF NOT EXISTS `wordnet31_snapshot`.`casedwords` (
`casedwordid` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
`wordid` MEDIUMI... | gaoyike/WordNet-Scala-Slick-Model | src/main/scala/model/casedwords.scala | Scala | bsd-2-clause | 1,394 |
package com.mark.embedding
import org.scalatest.FunSuite
import org.scalatest.matchers.ShouldMatchers
import com.mark.similarity.Distance
import scala.Predef._
/**
* Sanity tests for the Metric Embedder using a map of the world
*
* TODO: (jmunizn) I really need to sanitize this code
*/
class MetricEmbedderTest ... | joseamuniz/mark | test/com/mark/embedding/MetricEmbedderTest.scala | Scala | mit | 2,324 |
package org.pico.fp.syntax
import org.pico.fp.impl.syntax.toOps.ToFunctorOps
package object functor extends ToFunctorOps
| pico-works/pico-fp | pico-fp/src/main/scala/org/pico/fp/syntax/functor/package.scala | Scala | mit | 123 |
package app
import service._
import util._
import util.StringUtil._
import util.Directory._
import util.ControlUtil._
import ssh.SshUtil
import jp.sf.amateras.scalatra.forms._
import org.apache.commons.io.FileUtils
import org.scalatra.i18n.Messages
import org.eclipse.jgit.api.Git
import org.eclipse.jgit.lib.{FileMode,... | ihad28/gitbucket | src/main/scala/app/AccountController.scala | Scala | apache-2.0 | 17,676 |
package org.strumentiresistenti.bear
import scalikejdbc._
/**
* Database types
*/
case class Database(database: String)
object Database {
def apply(rs: WrappedResultSet): Database = {
val db = rs.string(1)
Database(db)
}
}
case class Table(name: String)
object Table {
def apply(rs: WrappedResultSet):... | StrumentiResistenti/Bear | src/main/scala/org/strumentiresistenti/bear/DBTypes.scala | Scala | gpl-2.0 | 707 |
/**
* Copyright (c) 2007-2011 Eric Torreborre <etorreborre@yahoo.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 ... | Muki-SkyWalker/specs | src/test/scala/org/specs/form/formSpec.scala | Scala | mit | 6,833 |
import akka.actor.{ActorSystem, PoisonPill}
import akka.backpressure.MasterActor
import akka.contrib.pattern.ClusterSingletonManager
import com.typesafe.config.ConfigFactory
object StartBackend {
def main(args: Array[String]): Unit = {
val port = args(0).toInt
startBackend(port)
}
def startBackend(por... | djoudjou/Quiz | app/StartBackend.scala | Scala | cc0-1.0 | 736 |
package com.olegych.scastie
package client
package components
import api.User
import japgolly.scalajs.react._, vdom.all._, extra._
import org.scalajs.dom
final case class TopBar(view: StateSnapshot[View], user: Option[User]) {
@inline def render: VdomElement = TopBar.component(this)
}
object TopBar {
implicit... | OlegYch/scastie | client/src/main/scala/com.olegych.scastie.client/components/TopBar.scala | Scala | apache-2.0 | 3,101 |
package org.openapitools.models
import io.circe._
import io.finch.circe._
import io.circe.generic.semiauto._
import io.circe.java8.time._
import org.openapitools._
import org.openapitools.models.PipelineRunImpllinks
/**
*
* @param Underscoreclass
* @param Underscorelinks
* @param durationInMillis
* @param en... | cliffano/swaggy-jenkins | clients/scala-finch/generated/src/main/scala/org/openapitools/models/PipelineRunImpl.scala | Scala | mit | 1,522 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | pronix/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/joins/SortMergeJoin.scala | Scala | apache-2.0 | 14,507 |
package org.jetbrains.plugins.scala.lang.dfa.analysis.framework
import com.intellij.codeInspection.dataFlow.jvm.problems.IndexOutOfBoundsProblem
import com.intellij.codeInspection.dataFlow.lang.UnsatisfiedConditionProblem
import com.intellij.codeInspection.dataFlow.value.DerivedVariableDescriptor
import org.jetbrains.... | JetBrains/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/lang/dfa/analysis/framework/ScalaDfaProblem.scala | Scala | apache-2.0 | 843 |
package au.com.dius.pact.provider
import org.scalatest.{Assertions, FreeSpec}
import org.scalatest.exceptions.TestFailedException
import au.com.dius.pact.model._
import au.com.dius.pact.model.dispatch.HttpClient
import scala.concurrent.{ExecutionContext, Await, Future}
import scala.concurrent.duration._
import java.ut... | caoquendo/pact-jvm | pact-jvm-provider/src/main/scala/au/com/dius/pact/provider/PactSpec.scala | Scala | apache-2.0 | 1,699 |
package lila.puzzle
import org.joda.time.DateTime
case class Vote(
_id: String, // puzzleId/userId
v: Boolean) {
def id = _id
def value = v
}
object Vote {
def makeId(puzzleId: PuzzleId, userId: String) = s"$puzzleId/$userId"
implicit val voteBSONHandler = reactivemongo.bson.Macros.handler[Vote]
... | clarkerubber/lila | modules/puzzle/src/main/Vote.scala | Scala | agpl-3.0 | 322 |
/*
* Copyright 2015 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... | scottcutts/ct-calculations | src/main/scala/uk/gov/hmrc/ct/computations/calculations/TotalExpenditureQualifyingForTheFirstYearAllowanceCalculator.scala | Scala | apache-2.0 | 992 |
/**
* Copyright (C) 2014 TU Berlin (peel@dima.tu-berlin.de)
*
* 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... | akunft/peel | peel-core/src/main/scala/org/peelframework/core/beans/data/GeneratedDataSet.scala | Scala | apache-2.0 | 2,054 |
enum Color {
case Red, Green, Blue
}
object Test {
def f(color: Color) = {
import Color.*
color match {
case Red | Green | Blue =>
}
}
}
| lampepfl/dotty | tests/patmat/enumColor.scala | Scala | apache-2.0 | 171 |
package com.datastax.spark.connector.rdd.partitioner.dht
import org.scalatest.{FlatSpec, Matchers}
import com.datastax.driver.core.{Token => DToken, TokenRange => DTokenRange}
import com.datastax.spark.connector.rdd.partitioner.dht.TokenFactory.{Murmur3TokenFactory, RandomPartitionerTokenFactory}
class TokenRangeSpe... | ponkin/spark-cassandra-connector | spark-cassandra-connector/src/test/scala/com/datastax/spark/connector/rdd/partitioner/dht/TokenRangeSpec.scala | Scala | apache-2.0 | 2,002 |
/**
* This file is part of mycollab-services.
*
* mycollab-services 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.
*
* mycolla... | maduhu/mycollab | mycollab-services/src/main/scala/com/esofthead/mycollab/schedule/email/crm/AccountRelayEmailNotificationAction.scala | Scala | agpl-3.0 | 991 |
/*
* 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/EmailDocumentsControllerISpec.scala | Scala | apache-2.0 | 1,427 |
package gapt.proofs.lk.rules
import gapt.expr.Const
import gapt.expr.formula.Bottom
import gapt.expr.formula.prop.PropFormula
import gapt.proofs.HOLSequent
/**
* An LKProof introducing ⊥ on the left:
* <pre>
* --------⊥:l
* ⊥ :-
* </pre>
*/
case object BottomAxiom extends InitialSequent {
overri... | gapt/gapt | core/src/main/scala/gapt/proofs/lk/rules/BottomAxiom.scala | Scala | gpl-3.0 | 486 |
package com.softwaremill.scalaval
trait Validateable {
def validate: Validation.Result
}
| mostr/scalaval | src/main/scala/com/softwaremill/scalaval/Validateable.scala | Scala | apache-2.0 | 95 |
/*
* Copyright 2014 – 2015 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 agree... | knutwalker/rx-redis | modules/client/src/main/scala/rx/redis/pipeline/OperatorDecode.scala | Scala | apache-2.0 | 1,623 |
package com.walmart.labs.pcs.normalize
import org.apache.spark.SparkConf
import org.apache.spark.streaming.{Seconds, StreamingContext, Minutes}
import org.apache.spark.streaming.StreamingContext._
import org.apache.spark.SparkContext._
import org.apache.spark.storage.StorageLevel
object StreamingWordCount {
def ... | ArthurZhong/SparkStormKafkaTest | src/main/scala/com/walmart/labs/pcs/normalize/StreamingWordCount.scala | Scala | apache-2.0 | 1,207 |
/*
* Copyright (c) 2015, Nightfall Group
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions a... | Nightfall/Instrumentality | mc194/src/main/scala/moe/nightfall/instrumentality/mc194/PlayerInstance.scala | Scala | bsd-2-clause | 13,287 |
package org.scalatest
import scala.collection.GenTraversable
import scala.annotation.tailrec
import org.scalatest.exceptions.StackDepthExceptionHelper.getStackDepthFun
import scala.collection.GenSeq
import Suite.indentLines
/**
* Provides nestable <em>inspector methods</em> (or just <em>inspectors</em>) that enable ... | svn2github/scalatest | src/main/scala/org/scalatest/Inspectors.scala | Scala | apache-2.0 | 20,174 |
package io.circe.parse
import cats.data.{ NonEmptyList, Validated, Xor }
import io.circe.Json
import io.circe.tests.{ CirceSuite, ParserTests }
import java.io.File
import java.nio.ByteBuffer
import org.scalacheck.Prop.forAll
import scala.io.Source
class ParserSuite extends CirceSuite {
checkAll("Parser", ParserTest... | ktoso/circe | tests/shared/src/test/scala/io/circe/parse/ParserSuite.scala | Scala | apache-2.0 | 490 |
package au.com.dius.pact.consumer
import au.com.dius.pact.model._
import org.apache.commons.lang3.StringEscapeUtils
object PactSessionResults {
val empty = PactSessionResults(Nil, Nil, Nil, Nil)
}
case class PactSessionResults(
matched: List[Interaction],
... | algra/pact-jvm | pact-jvm-consumer/src/main/scala/au/com/dius/pact/consumer/PactSession.scala | Scala | apache-2.0 | 2,805 |
package models
import java.util.Date
sealed trait Message
case class StartSearch(searchRequest:SearchRequest) extends Message
case object Pull extends Message
case class Check(searchRequest:SearchRequest, price:CheapestPrice) extends Message
case class Notify(user:User, cheapestprice:CheapestPrice, searchrequest:Sea... | soulofpeace/FareHound | app/models/Message.scala | Scala | apache-2.0 | 458 |
package corescala
// obs: conforme for executando os passos abaixo, use sempre os testes como guia para saber se tudo está como deveria ou não
// se necessário, corrija eventuais problemas gerados nos testes também
// 1. corrija a implementação dos métodos
// 2. normalize os parâmetros, de forma que todos os mét... | claudioed/scala-bootcamp | cs1-lab04/src/main/scala/corescala/Calc.scala | Scala | apache-2.0 | 746 |
package org.scaladebugger.api.profiles.java.info.events
import com.sun.jdi.event._
import com.sun.jdi._
import org.scaladebugger.api.lowlevel.JDIArgument
import org.scaladebugger.api.lowlevel.events.JDIEventArgument
import org.scaladebugger.api.lowlevel.requests.JDIRequestArgument
import org.scaladebugger.api.profiles... | chipsenkbeil/scala-debugger | scala-debugger-api/src/test/scala/org/scaladebugger/api/profiles/java/info/events/JavaMethodEntryEventInfoSpec.scala | Scala | apache-2.0 | 4,072 |
import scala.quoted._
def f(sc: quoted.Expr[StringContext]): Unit = {
sc match {
case '{ StringContext(${Varargs(parts)}: _*) } => // error
val ps: Seq[Expr[String]] = parts // error
}
} | som-snytt/dotty | tests/neg/i6436.scala | Scala | apache-2.0 | 201 |
/*
* 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 ... | greghogan/flink | flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/agg/batch/HashAggCodeGenerator.scala | Scala | apache-2.0 | 8,829 |
/*
* 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/pbik-frontend | test/views/SearchResultViewSpec.scala | Scala | apache-2.0 | 2,326 |
//import scala.language.postfixOps
/*
def printTail(): Unit = {
implicit val postfixOps = scala.language.postfixOps
//import scala.language.postfixOps
println(List(1, 2, 3) tail)
}
printTail()
*/
//import scala.language._
println(List(1, 2, 3) tail)
println(4 twice)
trait Foo {
type MyMap[A, B] <: Map[A, B]
... | kazuhira-r/scala-2.10.0-trial | modularizing-language-features/Features.scala | Scala | mit | 466 |
Subsets and Splits
Filtered Scala Code Snippets
The query filters and retrieves a sample of code snippets that meet specific criteria, providing a basic overview of the dataset's content without revealing deeper insights.