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 engine;
import org.lwjgl.opengl._
import utils._
/**
* Each camera is identified by a unique-ID, this object is
* used to create them
*/
private object CamID {
private var currentId : Int = 0
def getNewID : Int = {
currentId += 1
return currentId
}
}
class Camera () {
//this is just used as a ... | julienr/scalamd5 | src/main/scala/engine/camera.scala | Scala | bsd-2-clause | 8,191 |
package controllers.application
import actors.debug.{DebugFlightsActor, MessageQuery, MessageResponse}
import actors.persistent.arrivals.{AclForecastArrivalsActor, CirriumLiveArrivalsActor, PortForecastArrivalsActor, PortLiveArrivalsActor}
import akka.actor.Props
import akka.pattern.ask
import controllers.Application
... | UKHomeOffice/drt-scalajs-spa-exploration | server/src/main/scala/controllers/application/WithDebug.scala | Scala | apache-2.0 | 6,618 |
package org.scalajs.core.compiler.test
import org.scalajs.core.compiler.test.util._
import org.junit.Test
// scalastyle:off line.size.limit
class JSExportTest extends DirectTest with TestHelpers {
override def extraArgs: List[String] =
super.extraArgs :+ "-deprecation"
override def preamble: String =
"... | xuwei-k/scala-js | compiler/src/test/scala/org/scalajs/core/compiler/test/JSExportTest.scala | Scala | bsd-3-clause | 40,737 |
/*
* Copyright 2001-2008 Artima, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | kevinwright/scalatest | src/main/scala/org/scalatest/matchers/Matchers.scala | Scala | apache-2.0 | 248,876 |
/*
* Copyright (C) 2005, The Beangle Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This... | beangle/cdi | spring/src/main/scala/org/beangle/cdi/spring/config/ReconfigReader.scala | Scala | lgpl-3.0 | 2,275 |
package com.gigaspaces.sbp.gstest
import org.scalatest.ConfigMap
/** User: jason
* Date: 5/27/14
* Time: 8:47 PM
*/
trait GetFromConfigMap {
val schemaProperty = "schema"
val spaceUrlProperty = "spaceUrl"
val numInstancesProperty = "numInstances"
val numBackupsProperty = "numBackups"
val instanceIdPr... | jasonnerothin/gs-gigaspace-api | src/test/scala/com/gigaspaces/sbp/gstest/GetFromConfigMap.scala | Scala | apache-2.0 | 817 |
package com.bizo.util.args4j
import org.kohsuke.args4j.CmdLineException
import org.kohsuke.args4j.CmdLineParser
import scala.collection.JavaConverters._
import org.kohsuke.args4j.NamedOptionDef
trait OptionsWithHelp {
import org.kohsuke.args4j.Option
@Option(name="--help", aliases=Array("-h"), usage="show this... | ogrodnek/args4j-helpers | src/main/scala/com/bizo/util/args4j/OptionsHelper.scala | Scala | apache-2.0 | 1,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"); yo... | guozhangwang/kafka | core/src/test/scala/integration/kafka/api/SaslGssapiSslEndToEndAuthorizationTest.scala | Scala | apache-2.0 | 2,304 |
/*
* Copyright (c) 2013-16 Miles Sabin
*
* 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... | clhodapp/shapeless | core/shared/src/test/scala/shapeless/lazy.scala | Scala | apache-2.0 | 7,024 |
package provingground.fol
import provingground.NlpProse._
import provingground.fol.Logic._
import provingground.TextToInt._
import provingground.fol.Theory._
import provingground.fol.Theory.Document._
// import provingground.Arithmetic._
// import provingground.Collections._
/** Translates Stanford Dependency tree to... | siddhartha-gadgil/ProvingGround | digressions/src/main/scala/provingground/fol/ParseProse.scala | Scala | mit | 9,718 |
package com.learning.akka.remoting
import akka.actor.{Props, ActorRef, Actor, ActorSystem}
import com.typesafe.config.ConfigFactory
import scala.collection.concurrent.TrieMap
case class RegisterWorker(workerId: String)
case class RegisterWorkerSuccess(message: String)
class Master(actorSystem: ActorSystem) {
val w... | lgrcyanny/LearningAkka | src/main/scala/com/learning/akka/remoting/Master.scala | Scala | gpl-2.0 | 1,100 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 Algolia
* http://www.algolia.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... | algolia/algoliasearch-client-scala | src/test/scala/algolia/dsl/TaskStatusTest.scala | Scala | mit | 1,758 |
package com.twitter.finagle.thrift
import com.twitter.finagle.Service
import com.twitter.finagle.SourcedException
import com.twitter.finagle.context.Contexts
import com.twitter.finagle.service.ReqRep
import com.twitter.finagle.service.ResponseClass
import com.twitter.finagle.service.ResponseClassifier
import com.twitt... | twitter/finagle | finagle-thrift/src/main/scala/com/twitter/finagle/thrift/ClientFunction.scala | Scala | apache-2.0 | 4,733 |
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs
// Licence: http://www.gnu.org/licenses/gpl-3.0.en.html
package org.ensime.sexp
/**
* The output is a non-standard interpretation of "pretty lisp" ---
* emacs style formatting requires counting the length of the text on
* the current line and ... | d1egoaz/ensime-sbt | src/sbt-test/sbt-ensime/ensime-server/s-express/src/main/scala/org/ensime/sexp/SexpPrettyPrinter.scala | Scala | apache-2.0 | 2,075 |
package epic.parser
/*
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 w... | langkilde/epic | src/test/scala/epic/parser/InsideOutsideTest.scala | Scala | apache-2.0 | 9,229 |
package com.github.andr83.parsek.resources
import com.github.andr83.parsek.PValue
import com.typesafe.config.Config
/**
* @author andr83
*/
abstract class ResourceLoader {
def read(config: Config): PValue
}
| andr83/parsek | core/src/main/scala/com/github/andr83/parsek/resources/ResourceLoader.scala | Scala | mit | 213 |
package io.swagger.client.model
import io.swagger.client.core.ApiModel
import org.joda.time.DateTime
case class Inline_response_200_10 (
data: Option[Credential],
success: Option[Boolean])
extends ApiModel
| QuantiModo/QuantiModo-SDK-Akka-Scala | src/main/scala/io/swagger/client/model/Inline_response_200_10.scala | Scala | gpl-2.0 | 218 |
/*
* Copyright (c) 2016. Fengguo Wei and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Detailed contribut... | arguslab/jawa-compiler | src/main/scala/org/argus/jawa/compiler/compile/Output.scala | Scala | epl-1.0 | 1,551 |
package ilc
package feature
package integers
import org.scalatest.FunSuite
import ilc.util.EvalGenerated
import ilc.language.bacchus
class IntegerSuite
extends FunSuite
with ImplicitSyntaxSugar
with Evaluation
with ToScala
with bacchus.Evaluation
with bacchus.BasicDerivation
with bacchus.ToScala
... | inc-lc/ilc-scala | src/test/scala/ilc/feature/integers/IntegerSuite.scala | Scala | mit | 1,115 |
package de.tudresden.inf.lat.tabulas.datatype
/** This models the primitive data type Decimal.
*
*/
case class DecimalType() extends PrimitiveType {
final val TypeName: String = "Decimal"
override val isList: Boolean = false
override val getTypeName: String = TypeName
override val toString: String = get... | julianmendez/tabulas | tabulas-core/src/main/scala/de/tudresden/inf/lat/tabulas/datatype/DecimalType.scala | Scala | apache-2.0 | 508 |
package chess
import chess.format.FEN
case class StartingPosition(
eco: String,
name: String,
fen: FEN,
wikiPath: String,
moves: String,
featurable: Boolean = true
) {
def url = s"https://en.wikipedia.org/wiki/$wikiPath"
val shortName = name takeWhile (':' !=)
def fullName = s"$eco $n... | ornicar/scalachess | src/main/scala/StartingPosition.scala | Scala | mit | 39,231 |
package com.harrys.orika
import ma.glasnost.orika.impl.DefaultMapperFactory
import ma.glasnost.orika.{Converter, MapperFactory}
/**
* Created by chris on 10/14/15.
*/
object OrikaUtils {
def defaultConverters : Seq[Converter[_, _]] = ScalaConverters.scalaConverters ++ DateTimeConverters.dateTimeConverters
de... | harrystech/ingestion-utils | src/main/scala/com/harrys/orika/OrikaUtils.scala | Scala | mit | 670 |
package yokohama.holdem
import akka.actor.{ PossiblyHarmful, Props }
import scopt.OptionParser
// CLI arguments are parsed to this class
case class ArgConf(action: String = "", playerCount: Int = -1, playerName: String = "")
trait Terminal {
// possiblyharmful is just a marker
sealed trait Command extends Possi... | jeffusan/yokohama-holdem | src/main/scala/yokohama/holdem/Terminal.scala | Scala | gpl-2.0 | 2,366 |
trait A extends AnyRef {
def f = 1;
val x: A;
}
trait B extends AnyRef {
def f = 2;
}
trait C extends AnyRef with A with B {
override def f = super[B].f;
val a: A;
val x: a.type = a;
}
| yusuke2255/dotty | tests/untried/pos/override.scala | Scala | bsd-3-clause | 199 |
package lila.analyse
import chess.Color
import chess.format.Nag
import org.joda.time.DateTime
case class Analysis(
id: String,
infos: List[Info],
done: Boolean,
date: DateTime) {
lazy val infoAdvices: InfoAdvices = {
(Info.start :: infos) sliding 2 collect {
case List(prev, info) => info... | danilovsergey/i-bur | modules/analyse/src/main/Analysis.scala | Scala | mit | 2,615 |
package org.jetbrains.plugins.scala
package lang
package psi
package impl
package expr
import com.intellij.lang.ASTNode
import com.intellij.psi.PsiElementVisitor
import org.jetbrains.plugins.scala.lang.psi.api.ScalaElementVisitor
import org.jetbrains.plugins.scala.lang.psi.api.expr._
import scala.collection.Seq
/** ... | LPTK/intellij-scala | src/org/jetbrains/plugins/scala/lang/psi/impl/expr/ScPrefixExprImpl.scala | Scala | apache-2.0 | 928 |
object Test {
// First example with a concrete type <: AnyVal
def main(args: Array[String]): Unit = {
val coll = new java.util.ArrayList[Int]()
java.util.Collections.addAll(coll, 5, 6)
println(coll.size())
foo(5, 6)
}
// Second example with an abstract type not known to be <: AnyRef
def foo[... | dotty-staging/dotty | tests/run/i9439.scala | Scala | apache-2.0 | 469 |
package com.github.mdr.mash.ns.http
import com.github.mdr.mash.functions.{ BoundParams, Parameter }
import com.github.mdr.mash.ns.core.NoArgFunction._
import com.github.mdr.mash.ns.http.HttpFunctions.Params._
import com.github.mdr.mash.runtime.{ MashBoolean, MashObject, MashString }
object HttpFunctions {
object P... | mdr/mash | src/main/scala/com/github/mdr/mash/ns/http/HttpFunctions.scala | Scala | mit | 3,608 |
/*
* Copyright (c) 2015. All rights reserved. Author flankerhe@keencloudtech.
*/
package org.k33nteam.jade.solver
import org.k33nteam.jade.solver.Types.IntentInfo
import soot.{EquivalentValue, Body, Local, Value}
import soot.jimple._
import soot.toolkits.graph._
import soot.toolkits.scalar._
import scala.collection... | flankerhqd/JAADAS | jade/src/main/scala/org/k33nteam/jade/solver/IPCAnalysis.scala | Scala | gpl-3.0 | 14,586 |
package mavigator
import akka.actor._
import akka.http.scaladsl.marshalling.{Marshaller, ToEntityMarshaller}
import akka.http.scaladsl.model.MediaTypes._
import akka.http.scaladsl.model._
import akka.http.scaladsl.model.Uri.Path
import akka.http.scaladsl.model.ws._
import akka.http.scaladsl.server._
import akka.util._... | project-condor/mavigator | mavigator-server/src/main/scala/mavigator/Router.scala | Scala | gpl-3.0 | 2,277 |
/*
* Copyright (c) 2014-2020 by The Monix Project Developers.
* See the project homepage at: https://monix.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache... | alexandru/monifu | monix-eval/shared/src/test/scala/monix/eval/TaskConversionsSuite.scala | Scala | apache-2.0 | 15,334 |
/*
* Copyright (c) 2014-2018 by The Monix Project Developers.
* See the project homepage at: https://monix.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache... | Wogan/monix | monix-execution/jvm/src/main/scala_2.12/monix/execution/internal/FutureUtilsForPlatform.scala | Scala | apache-2.0 | 2,077 |
package info.fotm.clustering
import info.fotm.util.MathVector
object FeatureSettings {
def sqr(x: Double) = x * x
lazy val defaultFeatures = List[Feature[CharacterStatsUpdate]](
Feature[CharacterStatsUpdate]("rating", u => u.next.rating),
Feature[CharacterStatsUpdate]("ratingDerivative", u => ... | Groz/fotm-info | core/src/main/scala/info/fotm/clustering/FeatureSettings.scala | Scala | mit | 3,531 |
package unfiltered.mac
import unfiltered.request._
import unfiltered.response._
import scala.language.implicitConversions
object Mac extends Signing {
def challenge: ResponseFunction[Any] = challenge(None)
def challenge(err: Option[String]) = Unauthorized ~> WWWAuthenticate("%s%s" format("MAC", err match {
c... | benhutchison/unfiltered | mac/src/main/scala/mac.scala | Scala | mit | 5,864 |
package test.scala.MineSweeper
import org.scalatest.BeforeAndAfterEach
import main.scala.MineSweeper.MineReader
import test.scala.UnitSuite
class MineReaderAcceptance extends UnitSuite with BeforeAndAfterEach {
val dir = "src/test/resources/"
val maybeFields = MineReader(dir + "minesweeper_acceptance.txt")
val... | ollielo/ScalaKata | src/test/scala/MineSweeper/MineReaderAcceptance.scala | Scala | mit | 1,152 |
package ch2
import scala.annotation.tailrec
object Exercise2 {
@tailrec def isSorted[A](as: Array[A], ordered: (A,A) => Boolean) : Boolean = as match {
case Array() | Array(_) => true
case Array(x, y, _*) if !ordered(x,y) => false
case Array(x, y, _*) => isSorted(as.tail, ordered)
}
}
... | rucka/fpinscala | src/main/scala/fpinscala/ch2/Exercise2.scala | Scala | gpl-2.0 | 714 |
package it.svjm.textanalysis
import org.junit.Test
@Test
class ScalaAnalyzedTextProcessorTest extends AnalyzedTextProcessorTest {
override def getProcessor() = new ScalaAnalyzedTextProcessor
}
| vraffy/scalaVsJavaMeetup | svjm-scala/src/test/it/svjm/textanalysis/ScalaAnalyzedTextProcessorTest.scala | Scala | apache-2.0 | 201 |
import sbt._
import Keys._
import Tests._
import com.twitter.scrooge.ScroogeSBT
import com.typesafe.sbt.SbtSite.site
import com.typesafe.sbt.site.SphinxSupport.Sphinx
import pl.project13.scala.sbt.JmhPlugin
import sbtunidoc.Plugin.UnidocKeys._
import sbtunidoc.Plugin.{ScalaUnidoc, unidocSettings}
import scoverage.Scove... | jay-johnson/finagle | project/Build.scala | Scala | apache-2.0 | 20,502 |
package org.elasticsearch.plugin.river.kinesis.config
import org.elasticsearch.river.RiverSettings
import org.elasticsearch.plugin.river.kinesis.parser.KinesisDataParser
import org.elasticsearch.plugin.river.kinesis.parser.impl.PassThruDataParser
import org.elasticsearch.plugin.river.kinesis.util.Logging
/**
* Confi... | anreved/elasticsearch-kinesis-river | src/main/scala/org/elasticsearch/plugin/river/kinesis/config/ParserConfig.scala | Scala | mit | 1,737 |
package exam.national_center_test.xml.choice
/**
* <pre>
* Created on 5/23/15.
* </pre>
*
* @author K.Sakamoto
*/
object ChoiceTerm {
def apply(choice: collcetion.ChoiceSingleton): ChoiceTerm = {
new ChoiceTerm(choice.singleton)
}
}
class ChoiceTerm(override val choice: String) extends Choice[String](ch... | ktr-skmt/FelisCatusZero | src/main/scala/exam/national_center_test/xml/choice/ChoiceTerm.scala | Scala | apache-2.0 | 579 |
package otos.service
import java.sql.DriverManager
import akka.actor.Actor
import com.typesafe.config.ConfigFactory
case class IdRequest(id: Int)
case class NameRequest(name: String)
case class NearRequest(id: Int, params: NearParams)
case class NearParams(minRange: Option[Int], maxRange: Option[Int], minPopulation:... | andystanton/opt-loc | src/main/scala/otos/service/PostgresPlacesService.scala | Scala | apache-2.0 | 4,418 |
/*
* 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 ... | mahak/spark | resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/features/DriverKubernetesCredentialsFeatureStepSuite.scala | Scala | apache-2.0 | 6,774 |
/* sbt -- Simple Build Tool
* Copyright 2010 Mark Harrah
*/
package sbt
package std
import Types._
import Task._
import TaskExtra.{all,existToAny}
import Execute._
object Transform
{
def fromDummy[T](original: Task[T])(action: => T): Task[T] = Task(original.info, Pure(action _, false))
def fromDummyStrict[T](orig... | olove/xsbt | tasks/standard/src/main/scala/sbt/std/System.scala | Scala | bsd-3-clause | 2,402 |
package controllers
import play.api.libs.json._
import play.api.mvc._
import models._
import scalikejdbc.DB
import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global
class Index extends Controller {
implicit val userWriter = Json.writes[User]
implicit val projectWriter = Json.writ... | tak-onda/play-macwire-scalikejdbc | app/controllers/Index.scala | Scala | apache-2.0 | 977 |
/**
* Copyright 2015, deepsense.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | deepsense-io/seahorse-workflow-executor | deeplang/src/it/scala/io/deepsense/deeplang/doperables/spark/wrappers/estimators/CountVectorizerEstimatorSmokeTest.scala | Scala | apache-2.0 | 1,338 |
package gameover.fwk.libgdx.gfx
import com.badlogic.gdx.graphics.TextureData
import com.badlogic.gdx.math.Rectangle
import gameover.fwk.gdx.GdxTest
import org.scalatest.FlatSpec
class GraphicsLoaderTest extends FlatSpec {
GdxTest.initializeLibGdx()
val graphicsLoader = new GraphicsLoader()
"GraphicsLoader" sh... | PixelDuck/gameover-game-framework | src/test/scala/gameover/fwk/libgdx/gfx/GraphicsLoaderTest.scala | Scala | mit | 2,705 |
package com.lambtors.poker_api.module.poker.application.turn
import com.lambtors.poker_api.infrastructure.command_bus.Command
case class AddTurnCardToTableCommand(gameId: String) extends Command
| lambtors/poker-api | src/main/scala/com/lambtors/poker_api/module/poker/application/turn/AddTurnCardToTableCommand.scala | Scala | mit | 197 |
/*
* Copyright 2021 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | hmrc/ct-calculations | src/main/scala/uk/gov/hmrc/ct/computations/CP100.scala | Scala | apache-2.0 | 913 |
package com.flipkart.connekt.callback.topologies
import akka.stream.scaladsl.{Sink, Source}
import com.flipkart.connekt.busybees.tests.streams.TopologyUTSpec
import com.flipkart.connekt.commons.iomodels.SmsCallbackEvent
import com.flipkart.connekt.commons.metrics.Instrumented
import com.flipkart.connekt.firefly.flows.... | Flipkart/connekt | firefly/src/test/scala/com/flipkart/connekt/callback/topologies/LatencyMetricsTopologyTest.scala | Scala | mit | 3,636 |
package org.jetbrains.plugins.scala.testingSupport.scalatest.scala2_10.scalatest2_2_1
import org.jetbrains.plugins.scala.testingSupport.scalatest.SpecialCharactersTest
/**
* @author Roman.Shein
* @since 18.01.2015.
*/
class Scalatest2_10_2_2_1_SpecialCharactersTest extends Scalatest2_10_2_2_1_Base with SpecialChar... | triggerNZ/intellij-scala | test/org/jetbrains/plugins/scala/testingSupport/scalatest/scala2_10/scalatest2_2_1/Scalatest2_10_2_2_1_SpecialCharactersTest.scala | Scala | apache-2.0 | 336 |
package com.kolor.docker.api
import dispatch._
import Defaults._
import play.api.libs.json._
import org.joda.time.DateTime
import play.api.libs.iteratee._
import org.slf4j.LoggerFactory
import java.io._
import scala.concurrent.Future
import com.ning.http.client.generators.InputStreamBodyGenerator
import play.api.libs.... | waveinch/reactive-docker | src/main/scala/com/kolor/docker/api/DockerApi.scala | Scala | mit | 46,429 |
/*
* 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 t... | Flipkart/zipkin | zipkin-cassandra/src/test/scala/com/twitter/zipkin/storage/cassandra/CassandraStorageTest.scala | Scala | apache-2.0 | 4,455 |
package pl.newicom.eventstore
import akka.event.LoggingAdapter
import akka.stream.scaladsl.Source
import eventstore.{ResolvedEvent, EventRecord, EsConnection}
import eventstore.EventNumber.Exact
import pl.newicom.dddd.aggregate.BusinessEntity
import pl.newicom.dddd.messaging.event.EventMessageEntry
trait EventSourceP... | odd/akka-ddd | eventstore-akka-persistence/src/main/scala/pl/newicom/eventstore/EventSourceProvider.scala | Scala | mit | 1,239 |
package dpla.ingestion3.reports.summary
import org.apache.commons.lang.StringUtils
/**
* Provides utility functions for formatting strings in a report of
* ingestion operations.
*
*/
object ReportFormattingUtils {
/**
* Pads two strings with a delimiter out to the specified width (default is 80)
* I... | dpla/ingestion3 | src/main/scala/dpla/ingestion3/reports/summary/ReportFormattingUtils.scala | Scala | mit | 1,735 |
/*
* 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 ... | tzulitai/flink | flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/batch/BatchExecRank.scala | Scala | apache-2.0 | 12,548 |
/*
* The MIT License (MIT)
* <p>
* Copyright (c) 2017-2020
* <p>
* 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,... | amannocci/streamy | plugin-syslog/src/main/scala/io/techcode/streamy/syslog/util/parser/SyslogParser.scala | Scala | mit | 12,268 |
import scala.reflect.api.{Universe => ApiUniverse}
import scala.reflect.macros.Context
trait QuasiquoteCompat {
val c: Context
object quasiquoteCompat {
val u: c.universe.type = c.universe
import u._
import Flag._
// ================= LIFTABLES =================
trait Liftable[T] {
def... | sirmax/scala-maven-plugin | src/it/test_macroparadise/macro/src/main/scala/Compat.scala | Scala | unlicense | 16,944 |
object CompileOptions {
lazy val options = Seq(
"-target:jvm-1.8",
"-deprecation",
"-encoding", "UTF-8",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-language:experimental.macros",
"-unchecked",
//"-Ywarn-unused-import",
... | hyronx/matter | project/CompileOptions.scala | Scala | apache-2.0 | 452 |
def flatten[A](mma: M[M[A]]): M[A] | hmemcpy/milewski-ctfp-pdf | src/content/3.4/code/scala/snippet12.scala | Scala | gpl-3.0 | 34 |
/*
* 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 ... | StephanEwen/incubator-flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/metadata/FlinkRelMdUniqueKeys.scala | Scala | apache-2.0 | 22,250 |
package realworld.domain
import akka.actor.ActorRef
import juju.domain.Saga
import juju.domain.resolvers.CorrelationIdField
import realworld.domain.Manager.{OrderNotValidatedByManager, OrderValidatedByManager}
import realworld.domain.Order.{RejectOrder, AcceptOrder, OrderPlaced}
class OrderProcessor(orderId: String, ... | brokersquare/juju.realworldcqrs | src/main/scala/realworld/domain/OrderProcessor.scala | Scala | gpl-2.0 | 1,446 |
/*
* Copyright 2012 Emil Hellman
*
* This file is part of SortableChallenge.
*
* SortableChallenge 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 optio... | archevel/SortableCodingChallenge | src/test/scala/sortablechallenge/probability/ProbabilitySpecs.scala | Scala | gpl-3.0 | 10,548 |
package k2b6s9j.singingKIA.Songs
object WhatsMyName {
}
| kepler0/singingKIA | src/main/scala/k2b6s9j/singingKIA/Songs/WhatsMyName.scala | Scala | mit | 58 |
/*
* Copyright (C) 2011-2017 Interfaculty Department of Geoinformatics, University of
* Salzburg (Z_GIS) & Institute of Geological and Nuclear Sciences Limited (GNS Science)
* in the SMART Aquifer Characterisation (SAC) programme funded by the New Zealand
* Ministry of Business, Innovation and Employment (MBIE) and... | ZGIS/smart-portal-backend | app/models/rdf/ResearchPGHolder.scala | Scala | apache-2.0 | 4,160 |
/*
* ____ ____ _____ ____ ___ ____
* | _ \\ | _ \\ | ____| / ___| / _/ / ___| Precog (R)
* | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data
* | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, In... | precog/platform | yggdrasil/src/test/scala/com/precog/yggdrasil/table/DistinctSpec.scala | Scala | agpl-3.0 | 5,323 |
/*
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... | oeddyo/scalding | scalding-core/src/main/scala/com/twitter/scalding/IterableSource.scala | Scala | apache-2.0 | 2,915 |
package com.twitter.finagle.mux
import com.twitter.io.Buf
/** A mux response. */
sealed trait Response {
/** The payload of the response. */
def body: Buf
/** The contexts of the response. */
def contexts: Seq[(Buf, Buf)]
}
object Response {
private case class Impl(contexts: Seq[(Buf, Buf)], body: Buf) e... | twitter/finagle | finagle-mux/src/main/scala/com/twitter/finagle/mux/Response.scala | Scala | apache-2.0 | 858 |
/*
* Copyright 2007-2011 WorldWide Conferencing, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | sortable/framework | web/webkit/src/main/scala/net/liftweb/http/LiftRules.scala | Scala | apache-2.0 | 78,751 |
package codechicken.multipart
import java.util.Random
/**
* Interface for parts that need random display ticks (torches)
*
* Marker interface for TRandomDisplayTickTile
*/
trait IRandomDisplayTick
{
/**
* Called on a random display tick.
*/
def randomDisplayTick(random:Random)
} | Chicken-Bones/ForgeMultipart | src/codechicken/multipart/IRandomDisplayTick.scala | Scala | lgpl-2.1 | 304 |
package scalaz.stream
import org.scalacheck.Properties
import org.scalacheck.Prop._
import scalaz.concurrent.Task
import scalaz.{Nondeterminism, -\\/, \\/-, \\/}
import java.lang.Exception
import scalaz.syntax.monad._
import scala.concurrent.SyncVar
import scalaz.stream.async.mutable.Signal
import scalaz.stream.Proce... | jedws/scalaz-stream | src/test/scala/scalaz/stream/AsyncSignalSpec.scala | Scala | mit | 6,165 |
package org.dynfabdoc
import scalajs.js
import scalajs.js.JSApp
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.prefix_<^._
import org.scalajs.dom
import org.dynfabdoc.styles.Presentation
import scalacss.ScalatagsCss._
import scalacss.ScalatagsJsDomImplicits
import scalacss.Defaults._
import scalata... | math85360/dynFabDoc | src/main/scala/org/dynfabdoc/Main.scala | Scala | gpl-3.0 | 815 |
/*
mls: basic machine learning algorithms for Scala
Copyright (C) 2014 Davi Pereira dos Santos
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 opt... | Crespo911/elm-scala | src/main/scala/ml/models/RandomRank.scala | Scala | gpl-3.0 | 1,445 |
package mr.merc.economics
import mr.merc.army.WarriorViewNames
import mr.merc.economics.Culture.{CultureAlignment, FrenchHuman, LatinHuman}
import mr.merc.economics.Culture.CultureAlignment.{ColorAlignment, PriorityAlignment}
import mr.merc.economics.PopulationType.{Aristocrats, Capitalists, Traders}
import mr.merc.ec... | RenualdMarch/merc | src/test/scala/mr/merc/economics/ElectionTest.scala | Scala | gpl-3.0 | 5,291 |
/*
* Copyright 2012 Jonathan Anderson
*
* 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... | nasrallahmounir/Footlights | API/src/test/scala/me/footlights/api/ajax/json-test.scala | Scala | apache-2.0 | 2,748 |
package hubs
import signalJ.services.Hub
/**
* Implements a singleton SignalJ hub that supports notification of scheduled events to client-side listeners.
*/
class EventHub extends Hub[EventSink]{
/*
* Implements the "getInterface" method mandated by the SignalJ architecture.
*/
override def getInterface... | aquisio/quartz-scheduler-scala | app/hubs/EventHub.scala | Scala | unlicense | 363 |
package io.scalding.approximations.BloomFilter
import com.twitter.algebird._
import com.twitter.scalding._
import com.twitter.scalding.source.TypedSequenceFile
/**
* We generate 100.000 user ids ( 1 .. 100000 ) and add them into a BloomFilter
* with a small estimation error. Then we execute membership queries on so... | LeeRisk/social-media-analytics | src/main/scala/io/scalding/approximations/BloomFilter/SimpleBFAggregator.scala | Scala | apache-2.0 | 2,109 |
/**
* Copyright (c) 2012 Alexey Aksenov [email protected]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | ezh/digi-lib-ctrl | src/main/scala/org/digimead/digi/lib/ctrl/declaration/DHistoryProvider.scala | Scala | apache-2.0 | 2,588 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | tophua/spark1.52 | core/src/test/scala/org/apache/spark/scheduler/DAGSchedulerSuite.scala | Scala | apache-2.0 | 60,938 |
/**
* Copyright (c) 2015, Cloudera, Inc. All Rights Reserved.
*
* Cloudera, Inc. licenses this file 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/LIC... | samklr/spark-timeseries | src/main/scala/com/cloudera/sparkts/models/GARCH.scala | Scala | apache-2.0 | 9,684 |
package edu.gemini.sp.vcs2
import edu.gemini.pot.sp.Conflict.Moved
import edu.gemini.pot.sp.{DataObjectBlob, ISPNode, SPNodeKey}
import edu.gemini.shared.util.VersionComparison._
import edu.gemini.sp.vcs2.MergeNode._
import edu.gemini.spModel.rich.pot.sp._
import scalaz.\\&/.{Both, That, This}
import scalaz._
import ... | spakzad/ocs | bundle/edu.gemini.sp.vcs/src/main/scala/edu/gemini/sp/vcs2/PreliminaryMerge.scala | Scala | bsd-3-clause | 12,149 |
package com.twitter.finagle.kestrel.integration
import com.twitter.conversions.time._
import com.twitter.finagle.Service
import com.twitter.finagle.builder.ClientBuilder
import com.twitter.finagle.kestrel.Server
import com.twitter.finagle.kestrel.protocol._
import com.twitter.finagle.memcached.util.ChannelBufferUtils.... | stevegury/finagle | finagle-kestrel/src/test/scala/com/twitter/finagle/kestrel/integration/InterpreterServiceSpec.scala | Scala | apache-2.0 | 1,718 |
package net.magik6k.lxcadmin.panel
import java.util.UUID
import net.magik6k.jwwf.core.User
import net.magik6k.jwwf.enums.Type
import net.magik6k.jwwf.handlers.UserDataHandler
import net.magik6k.jwwf.widgets.basic.panel.{NamedPanel, Row}
import net.magik6k.lxcadmin.widget.{LocalMemMon, LocalCPUMon}
class MainPanel(us... | magik6k/LxcAdmin | src/main/scala/net/magik6k/lxcadmin/panel/MainPanel.scala | Scala | mit | 1,026 |
/**
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | abersnaze/RxJava | rxjava-contrib/rxjava-scalaz/src/test/scala/rx/lang/scala/scalaz/ImplicitsForTest.scala | Scala | apache-2.0 | 1,488 |
package com.arcusys.valamis.social.model
import com.arcusys.valamis.model.SkipTake
case class CommentFilter(
companyId: Long,
userId: Option[Long] = None,
activityId: Option[Long] = None,
sortBy: Option[CommentSortBy] = None,
skipTake: Option[SkipTake] = None)
| ViLPy/Valamis | valamis-social/src/main/scala/com/arcusys/valamis/social/model/CommentFilter.scala | Scala | lgpl-3.0 | 273 |
package cromwell.engine.io.gcs
import scala.language.implicitConversions
import scala.util.{Failure, Success, Try}
/** Represents a Google Cloud Storage path, like gs://bucket/path/to/object.txt
*
* @param bucket - should adhere to https://cloud.google.com/storage/docs/bucket-naming?hl=en#requirements
* @param ... | dgtester/cromwell | src/main/scala/cromwell/engine/io/gcs/GcsPath.scala | Scala | bsd-3-clause | 1,292 |
/*
* 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 ... | wangmiao1981/spark | sql/core/src/test/scala/org/apache/spark/sql/execution/SQLViewSuite.scala | Scala | apache-2.0 | 35,843 |
package org.http4s.client.middleware
import cats.effect.{Clock, Resource, Sync}
import cats.implicits._
import java.util.concurrent.TimeUnit
import cats.effect.concurrent.Ref
import org.http4s.{Request, Response, Status}
import org.http4s.client.Client
import org.http4s.metrics.MetricsOps
import org.http4s.metrics.Te... | aeons/http4s | client/src/main/scala/org/http4s/client/middleware/Metrics.scala | Scala | apache-2.0 | 3,009 |
package scan
import java.nio.file._
import scala.compat.java8.StreamConverters._
import scala.collection.SortedSet
import cats._
import cats.implicits._
import monix.eval._
import monix.execution._
import scala.concurrent.duration._
object Scanner {
implicit val s = Scheduler(ExecutionModel.BatchedExecution(3... | benhutchison/GettingWorkDoneWithExtensibleEffects | solutions/exerciseTask/src/main/scala/scan/Scanner.scala | Scala | apache-2.0 | 3,479 |
/*
* 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/executor/ProcfsMetricsGetter.scala | Scala | apache-2.0 | 7,793 |
/*
* 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 ... | matthewfranglen/spark | mllib/src/test/scala/org/apache/spark/ml/feature/ANOVASelectorSuite.scala | Scala | mit | 9,710 |
package org.scalamock.scalatest
import org.scalamock.clazz.{Mock => MacroMock}
import org.scalamock.proxy.ProxyMockFactory
import scala.reflect.ClassTag
/**
* allows combining of macro mocks wih proxy mocks in the same Suite
* {{{
* val macroMock = mock[Foo]
* val proxyMock = Proxy.mock[Bar]
* }}}
*/
tra... | paulbutcher/ScalaMock | shared/src/main/scala/org/scalamock/scalatest/MixedMockFactory.scala | Scala | mit | 577 |
package hephaestus
package lunarg
package tutorial
import hephaestus.platform._
object Step03 extends Utils {
def main(args: Array[String]): Unit = {
val instance = initInstance()
val physicalDevices = vk.enumeratePhysicalDevices(instance)
val physicalDevice = physicalDevices(0)
val qfps = vk.getP... | to-ithaca/hephaestus | samples/src/main/scala/hephaestus/lunarg/tutorial/Step03.scala | Scala | apache-2.0 | 1,723 |
package offGridOrcs
sealed trait Model
object Model {
final case class Title() extends Model
final case class Map(world: World, isPaused: Boolean, camera: Camera, cursor: Cursor.Map, previousInspectionMode: InspectionMode) extends Model
final case class Inspection(topLeft: Vec2, selection: Vec2, mode: Inspectio... | dcecile/off-grid-orcs | src/Model.scala | Scala | mit | 804 |
package com.github.diegopacheco.scala.idiomatic.typeclasses
object NumbersMainApp extends App {
trait NumberLike[T] {
def plus(x: T, y: T): T
def divide(x: T, y: T): T
def minus(x: T, y: T): T
def multiply(x: T, y: T): T
}
object NumberLike {
implicit object NumberLikeDouble extends NumberL... | diegopacheco/scala-playground | idiomatic-scala/src/main/scala/com/github/diegopacheco/scala/idiomatic/typeclasses/NumbersMainApp.scala | Scala | unlicense | 1,389 |
package com.github.pedrovgs.kuronometer.mothers
import com.github.pedrovgs.kuronometer.free.domain.{Config, Platform}
object ConfigMother {
val anyConfig: Config = Config(Platform.Java,
reportProjectInfo = true,
reportDataRemotely = true,
... | pedrovgs/Kuronometer | kuronometer-core/src/test/scala/com/github/pedrovgs/kuronometer/mothers/ConfigMother.scala | Scala | apache-2.0 | 617 |
package service.notifications
import java.io.{BufferedWriter, File, FileWriter}
import dao.SundialDaoFactory
import dto.DisplayModels
import model.{EmailNotification, ProcessStatus}
import software.amazon.awssdk.services.ses.SesClient
import scala.sys.process._
class DevelopmentEmailNotifications(daoFactory: Sundia... | gilt/sundial | app/service/notifications/DevelopmentEmailNotifications.scala | Scala | mit | 1,123 |
/*
* Copyright 2021 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | hmrc/gmp-frontend | app/models/upscan/UpscanInitiateRequest.scala | Scala | apache-2.0 | 1,176 |
package de.htwg.zeta.server.model.modelValidator.validator.rules.nullChecks
import de.htwg.zeta.common.models.project.instance.GraphicalDslInstance
import de.htwg.zeta.server.model.modelValidator.validator.rules.ModelRule
/**
* This file was created by Tobias Droth as part of his master thesis at HTWG Konstanz (03/2... | Zeta-Project/zeta | api/server/app/de/htwg/zeta/server/model/modelValidator/validator/rules/nullChecks/EdgeSourcesNotNull.scala | Scala | bsd-2-clause | 737 |
package io.github.mandar2812.dynaml.kernels
import breeze.linalg._
import io.github.mandar2812.dynaml.analysis.VectorField
import io.github.mandar2812.dynaml.analysis.implicits._
import io.github.mandar2812.dynaml.DynaMLPipe._
import io.github.mandar2812.dynaml.pipes.DataPipe
import org.scalatest.{FlatSpec, Matchers}
... | transcendent-ai-labs/DynaML | dynaml-core/src/test/scala/io/github/mandar2812/dynaml/kernels/KernelSpec.scala | Scala | apache-2.0 | 8,169 |
/*
* Copyright 2015 - 2016 Red Bull Media House GmbH <http://www.redbullmediahouse.com> - 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... | ianclegg/eventuate | eventuate-core/src/test/scala/com/rbmhtechnology/eventuate/ConcurrentVersionsSpec.scala | Scala | apache-2.0 | 6,856 |
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.