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 dbtarzan.db.basicmetadata
import dbtarzan.db.util.ResourceManagement.using
import dbtarzan.db.util.{ExceptionToText, ResultSetReader}
import dbtarzan.db.{Schema, Schemas}
import dbtarzan.messages.TLogger
import java.sql.{DatabaseMetaData, ResultSet, SQLException}
/* to read the basic methadata (tables and co... | aferrandi/dbtarzan | src/main/scala/dbtarzan/db/basicmetadata/MetadataSchemasLoader.scala | Scala | apache-2.0 | 1,014 |
/*
* 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... | wangyixiaohuihui/spark2-annotation | core/src/main/scala/org/apache/spark/status/api/v1/SimpleDateParam.scala | Scala | apache-2.0 | 1,842 |
package org.bfn.ninetynineprobs
import org.scalatest._
class P30Spec extends UnitSpec {
// TODO
}
| bfontaine/99Scala | src/test/scala/P30Spec.scala | Scala | mit | 105 |
package kartograffel.server.infrastructure.http4s
import cats.implicits._
import eu.timepit.refined.api.RefinedType
import eu.timepit.refined.types.numeric.NonNegLong
import org.http4s.{ParseFailure, QueryParamDecoder, QueryParameterValue}
object refined {
object NonNegLongVar extends RefinedPathVar[NonNegLong, Lon... | fthomas/kartograffel | modules/server/jvm/src/main/scala/kartograffel/server/infrastructure/http4s/refined.scala | Scala | apache-2.0 | 700 |
package ru.freefry.furniture_factory.core
import akka.actor.{ActorLogging, Actor, ActorRef, ActorSystem}
import akka.testkit.{ImplicitSender, TestKit}
import akka.util.Timeout
import com.typesafe.config.{Config, ConfigFactory}
import org.scalatest._
class FactoryTestKit extends TestKit(
ActorSystem(
"FactoryAct... | freefry/furniture-factory | src/test/scala/ru/freefry/furniture_factory/core/actorSpec.scala | Scala | apache-2.0 | 966 |
/*
* Copyright (c) 2012-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.apach... | guardian/snowplow | 3-enrich/scala-common-enrich/src/main/scala/com.snowplowanalytics.snowplow.enrich/common/enrichments/EventEnrichments.scala | Scala | apache-2.0 | 3,906 |
/*
* Copyright 2012 Aclys
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wri... | jlcanela/EventTracker | app/service/MongoJson.scala | Scala | apache-2.0 | 4,618 |
/*
* Copyright (C) 2015 - 2017 Juergen Pfundt
*
* 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 ... | JuPfu/arktos | shared/src/main/scala/org/arktos/URIDecoder.scala | Scala | apache-2.0 | 2,018 |
package ee.cone.c4ui.dep
import ee.cone.c4actor._
import ee.cone.c4actor.dep._
import ee.cone.c4actor.dep.request.ContextIdRequestProtocolApp
import ee.cone.c4actor.dep_impl.AskByPKsApp
import ee.cone.c4gate.SessionDataProtocol.U_RawSessionData
import ee.cone.c4gate.deep_session.DeepSessionDataProtocol.{U_RawRoleData,... | conecenter/c4proto | extra_lib/src/main/scala/ee/cone/c4ui/dep/GateAskMix.scala | Scala | apache-2.0 | 1,103 |
package redbot.cmd
class Command[+R](val format: String, val description: String,
val action: CommandMessage => PartialFunction[String, R])
object Command {
def apply[R](format: String, description: String)
(action: CommandMessage => PartialFunction[String, R])
: Command[R] = new Co... | JamesGallicchio/RedBot | src/main/scala/redbot/cmd/Command.scala | Scala | mit | 362 |
package scommons.client.app
import io.github.shogowada.scalajs.reactjs.redux.Redux.Dispatch
import scommons.client.app.AppBrowseController.findItemAndPath
import scommons.client.app.AppBrowseControllerSpec._
import scommons.client.test.raw.MemoryRouter._
import scommons.client.ui.Buttons
import scommons.client.ui.tree... | viktor-podzigun/scommons | ui/src/test/scala/scommons/client/app/AppBrowseControllerSpec.scala | Scala | apache-2.0 | 7,775 |
package scala.collection.scalatest
import org.scalatest._
trait StringBagBehaviours extends BagBehaviours with Matchers {
this: FlatSpec =>
def stringBagBehaviour(bag: scala.collection.Bag[String]) {
it should "grow by 1 with +(elem) operation" in {
assertResult(bag.size + 1) {
val newBag = b... | nicolasstucki/multisets | src/test/scala/scala/collection/scalatest/StringBagBehaviours.scala | Scala | bsd-3-clause | 1,399 |
//
// Top.scala -- Scala object Top
// Project OrcScala
//
// $Id: Top.scala 2933 2011-12-15 16:26:02Z jthywissen $
//
// Created by dkitchin on Nov 26, 2010.
//
// Copyright (c) 2011 The University of Texas at Austin. All rights reserved.
//
// Use and redistribution of this file is governed by the license terms in
//... | laurenyew/cOrcS | src/orc/types/Top.scala | Scala | bsd-3-clause | 662 |
/*
* 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/nisp-frontend | test/uk/gov/hmrc/nisp/services/StatePensionServiceSpec.scala | Scala | apache-2.0 | 12,641 |
package test.scala
import java.nio.file.Paths
import Paths._
import org.specs2._
/**
*
*/
class HelloWorldSpec extends Specification { def is = s2"""
This is a spec to check the 'Hello world' str
Foo example
foo needs to be ... $foo
"""
def foo = Array(1, 2, 2, 3) must equalTo(Array(1,2,3))
}
| trung-msft/hello-world | src/test/scala/HelloWorldSpec.scala | Scala | mit | 311 |
package tpUtils
import scala.concurrent.Future
import scala.concurrent.Promise
import play.api.libs.concurrent.Execution.Implicits.defaultContext
import scala.util.Failure
import scala.util.Success
/**
* Object to be used in order to import helper on "try catch"
*/
object Tryer {
def tryo[T <: Any](f: => T): Opt... | TPTeam/reactive_mongo_crud | app/tpUtils/Tryer.scala | Scala | mit | 751 |
package uk.gov.gds.ier.transaction.ordinary.nino
import uk.gov.gds.ier.test.FormTestSuite
class NinoFormTests
extends FormTestSuite
with NinoForms {
it should "successfully bind to a valid nino" in {
val js = Json.toJson(
Map(
"NINO.NINO" -> "AB 12 34 56 D"
)
)
ninoForm.bind(js)... | michaeldfallen/ier-frontend | test/uk/gov/gds/ier/transaction/ordinary/nino/NinoFormTests.scala | Scala | mit | 2,473 |
package controllers
import
scalaz.{ NonEmptyList, Scalaz, ValidationNel },
Scalaz._
import
play.api.mvc.{ Action, AnyContent, Controller, Request, Result, SimpleResult }
import
controllers.action.APIAction
import
models.{ submission, util },
submission._,
util.{ ParamBundle, PlayUtil }
/**
* C... | NetLogo/SimServer | app/controllers/Submission.scala | Scala | gpl-2.0 | 7,658 |
/*
* 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/accounts/frs102/boxes/AC126A.scala | Scala | apache-2.0 | 1,165 |
package com.prezi.haskell.gradle.model.sandboxstore
import java.io.File
import com.prezi.haskell.gradle.ApiHelper._
import com.prezi.haskell.gradle.Profiling.measureTime
import com.prezi.haskell.gradle.extension.HaskellExtension
import com.prezi.haskell.gradle.external.{HaskellTools, SandFix}
import com.prezi.haskell... | prezi/gradle-haskell-plugin | src/main/scala/com/prezi/haskell/gradle/model/sandboxstore/ProjectSandboxStore.scala | Scala | apache-2.0 | 3,868 |
package com.azavea.rasterfoundry
import geotrellis.raster._
import geotrellis.raster.mosaic._
import spire.syntax.cfor._
case class OrderedImage(image: MultiBandTile, order: Tile) {
def merge(other: OrderedImage): OrderedImage = {
val bandCount = TileMath.BAND_COUNT
val bands = Array.ofDim[MutableArrayTile... | kdeloach/raster-foundry-tiler | mosaic/src/main/scala/com/azavea/rasterfoundry/OrderedImage.scala | Scala | apache-2.0 | 1,439 |
/*
* 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... | brharrington/atlas | atlas-core/src/main/scala/com/netflix/atlas/core/model/FilterVocabulary.scala | Scala | apache-2.0 | 8,776 |
/*
* Copyright 2015 the original author or authors.
* @https://github.com/scouter-project/scouter
*
* 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/... | yuyupapa/OpenSource | scouter.server/src/scouter/server/core/BatchCore.scala | Scala | apache-2.0 | 1,386 |
package edu.gemini.seqexec.server
import edu.gemini.spModel.`type`.{DisplayableSpType, LoggableSpType, SequenceableSpType}
import edu.gemini.spModel.config2.ItemEntry
/**
* Created by jluhrs on 4/27/15.
*/
object ItemEntryUtil {
def showItems(ks: Array[ItemEntry]): String = {
def width(ks: Array[ItemEntry])... | arturog8m/ocs | bundle/edu.gemini.seqexec.server/src/main/scala/edu/gemini/seqexec/server/ItemEntryUtil.scala | Scala | bsd-3-clause | 923 |
package im.actor.server.group
import java.time.{ LocalDateTime, ZoneOffset }
import im.actor.server.event.TSEvent
import scala.concurrent.Future
import scala.concurrent.forkjoin.ThreadLocalRandom
import akka.actor.Status
import akka.pattern.pipe
import com.google.protobuf.ByteString
import com.trueaccord.scalapb.Ge... | chieryw/actor-platform | actor-server/actor-peer-managers/src/main/scala/im/actor/server/group/GroupCommandHandlers.scala | Scala | mit | 21,095 |
package lila
import play.api.libs.json._
import lila.db.JsTube
import JsTube.Helpers._
package object forum extends PackageObject with WithPlay {
object tube {
private[forum] implicit lazy val categTube =
Categ.tube inColl Env.current.categColl
private[forum] implicit lazy val topicTube =
To... | bjhaid/lila | modules/forum/src/main/package.scala | Scala | mit | 500 |
/*
* 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 ... | bharathkk/samza | samza-kv-rocksdb/src/main/scala/org/apache/samza/storage/kv/RocksDbKeyValueStorageEngineFactory.scala | Scala | apache-2.0 | 3,018 |
package com.portia.models
import com.mongodb.casbah.Imports.ObjectId
import com.mongodb.casbah.commons.MongoDBObject
import com.novus.salat.dao.{SalatDAO}
import com.novus.salat.global._
/**
* Created by duytd on 07/05/2015.
*/
case class TestingUrl (_id: ObjectId = new ObjectId, urlId:ObjectId, expectedResult: Ob... | duytd/blackspider | src/main/scala/com/portia/models/TestingUrl.scala | Scala | gpl-3.0 | 686 |
package spire
package laws
import spire.algebra._
import spire.algebra.lattice._
import spire.implicits._
import org.typelevel.discipline.Laws
import org.scalacheck.{Arbitrary, Prop}
import org.scalacheck.Prop._
object LatticeLaws {
def apply[A : Eq : Arbitrary] = new LatticeLaws[A] {
def Equ = Eq[A]
def ... | tixxit/spire | laws/src/main/scala/spire/laws/LatticeLaws.scala | Scala | mit | 2,865 |
package rpm4s.data
case class NEVRA(
name: Name,
epoch: Epoch,
version: Version,
arch: Architecture,
release: Option[Release] = None,
)
| lucidd/rpm4s | shared/src/main/scala/rpm4s/data/NEVRA.scala | Scala | mit | 157 |
package io.livingston.ditto.http
import com.twitter.finagle.http.{Request, Response, Status}
import com.twitter.finagle.{Http, ListeningServer, Service}
import com.twitter.util.{Await, Future}
import com.typesafe.scalalogging.LazyLogging
import io.livingston.ditto.Responder
import scala.collection.immutable.Iterable
... | scottlivingston/ditto | ditto-http/src/main/scala/io/livingston/ditto/http/HttpResponder.scala | Scala | mit | 2,076 |
package paint.canvas
import org.scalajs.dom.CanvasRenderingContext2D
import paint.coroutine.CoRoutine
import paint.geometry.Geometry.DoublePoint
/**
* Created by nic on 06/12/2016.
*/
object CanvasCoRoutine {
def empty[A]: CoRoutine[A, CanvasRenderingContext2D => Unit] = CoRoutine.const(_ => ())
def dra... | nicmart/RandomPainter | src/main/scala/paint/canvas/CanvasCoRoutine.scala | Scala | mit | 2,460 |
/*
* 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 ... | shubhamchopra/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala | Scala | apache-2.0 | 45,509 |
/*
* Scala (https://www.scala-lang.org)
*
* Copyright EPFL and Lightbend, Inc.
*
* Licensed under Apache License 2.0
* (http://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
package scala
package reflect
... | scala/scala | src/reflect/scala/reflect/internal/SymbolTable.scala | Scala | apache-2.0 | 18,841 |
package org.shade.common.types
import org.scalatest.{Matchers, WordSpec}
class EnumCompanionSpec extends WordSpec with Matchers {
import EnumCompanionSpec._
"An EnumCompanion backed by a wrapped Int" should {
"provide an all list returning all values" in {
Animal.all shouldBe Seq(Cat, Dog, Rabbit, H... | jamesshade/common | src/test/scala/org/shade/common/types/EnumCompanionSpec.scala | Scala | apache-2.0 | 5,430 |
package proximaltest.helpers
import models._
object StandardsHelpers {
def fakeStandard: Standard = {
new Standard(
None,
"Common Core State Standards for Mathematics",
"These Standards define what students should understand and be able to do in their study of mathematics. Asking a student to ... | silbermm/proximal | test/proximaltest/helpers/StandardsHelpers.scala | Scala | apache-2.0 | 2,185 |
/*
* 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/core/src/main/scala/rx/redis/resp/dataType.scala | Scala | apache-2.0 | 2,164 |
package mylord
package services
import argonaut._, Argonaut._
import com.github.nscala_time.time.Imports._
import json.Codec._
object Wandbox {
final case class SwitchOption(name: String, displayFlags: String, displayName: String)
sealed abstract class Switch
final case class SingleSwitch(default: Boolean, op... | pocketberserker/my-lord | mylord-jvm/src/main/scala/mylord/services/Wandbox.scala | Scala | mit | 6,319 |
package io.hydrosphere.mist.master.interfaces.http
import akka.http.scaladsl.server.Directives
import akka.http.scaladsl.server.directives.ParameterDirectives
import io.hydrosphere.mist.jobs.JobDetails.Source
import io.hydrosphere.mist.master.MasterService
import io.hydrosphere.mist.master.interfaces.JsonCodecs
import... | KineticCookie/mist | src/main/scala/io/hydrosphere/mist/master/interfaces/http/HttpApiV2.scala | Scala | apache-2.0 | 4,501 |
package com.raquo.dombuilder
import com.raquo.dombuilder.generic.nodes.Node
import com.raquo.domtestutils.EventSimulator
import com.raquo.domtestutils.matching.RuleImplicits
import com.raquo.domtestutils.scalatest.MountSpec
import org.scalajs.dom
trait SimpleSpec
extends MountSpec
with RuleImplicits
with EventS... | raquo/scala-dom-builder | js/src/test/scala/com/raquo/dombuilder/SimpleSpec.scala | Scala | mit | 565 |
/**
* Copyright (C) 2009-2011 the original author or authors.
* See the notice.md file distributed with this work for additional
* information regarding copyright ownership.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Yo... | arashi01/scalate-samples | scalate-sample/src/main/scala/org/fusesource/scalate/sample/Person.scala | Scala | apache-2.0 | 867 |
/***********************************************************************
* 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-utils/src/main/scala/org/locationtech/geomesa/utils/stats/CountingInputStream.scala | Scala | apache-2.0 | 2,230 |
package at.forsyte.apalache.infra
/**
* An error that occurs when executing a sequence of passes
*
* @param message an error message
*/
class PassExecException(message: String) extends Exception(message)
/**
* An error that happened while processing options
* @param message an error message
*/
class Pas... | konnov/dach | mod-infra/src/main/scala/at/forsyte/apalache/infra/exceptions.scala | Scala | apache-2.0 | 380 |
// Copyright 2012 Mitchell Kember. Subject to the MIT License.
// Copyright 2012 Mitchell Kember. Subject to the MIT License.
package io.github.bbaker.blocksmith
/**
* A container for input that must be handled by GameState. This creates a layer
* of abstraction between the actual means of input (which key, which ... | bbarker/BlockSmith | jvm/src/main/scala/io/github/bbaker/blocksmith/GameStateInputData.scala | Scala | mpl-2.0 | 2,437 |
package chana.jpql
import chana.avro
import chana.avro.Deletelog
import chana.avro.UpdateAction
import chana.jpql.nodes._
import org.apache.avro.Schema
import org.apache.avro.generic.IndexedRecord
final class JPQLMapperDelete(val id: String, meta: JPQLDelete) extends JPQLEvaluator {
protected def asToEntity = meta... | wandoulabs/chana | src/main/scala/chana/jpql/JPQLMapperDelete.scala | Scala | apache-2.0 | 4,229 |
/*
* La Trobe University - Distributed Deep Learning System
* Copyright 2016 Matthias Langer (t3l@threelights.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.apa... | bashimao/ltudl | base/src/main/scala/edu/latrobe/io/LocalFileHandle.scala | Scala | apache-2.0 | 6,817 |
package net.danielkza.http2.stream
import scala.collection.JavaConverters._
import scala.concurrent.ExecutionContext
import scala.concurrent.duration._
import scala.util.Try
import scalaz.\\/
import scalaz.syntax.either._
import akka.util.Timeout
import akka.actor._
import akka.pattern.ask
import akka.stream._
import ... | danielkza/h2scala | core/src/main/scala/net/danielkza/http2/stream/InboundStreamDispatcher.scala | Scala | apache-2.0 | 5,790 |
/**
* 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 not us... | WillCh/cs286A | dataMover/kafka/core/src/test/scala/integration/kafka/api/ConsumerTest.scala | Scala | bsd-2-clause | 10,527 |
/**
* 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... | eribeiro/kafka | core/src/test/scala/kafka/tools/TestLogCleaning.scala | Scala | apache-2.0 | 14,062 |
package uk.gov.gds.router
import mongodb.MongoDatabase
import org.scalatest.{BeforeAndAfterEach, FunSuite}
import util.Logging
import uk.gov.gds.router.mongodb.MongoDatabase.database
abstract class MongoDatabaseBackedTest extends FunSuite with BeforeAndAfterEach with Logging {
protected val cleanOutDatabaseBeforeE... | gds-attic/scala-router | router/router/src/test/scala/uk/gov/gds/router/MongoDatabaseBackedTest.scala | Scala | mit | 537 |
import com.avsystem.scex.presentation.Attributes
import com.avsystem.scex.presentation.SymbolAttributes._
attributes {
on { s: String =>
s.charAt _ --> Attributes(
paramNames = List("index"),
documentation = "Returns character at specified index of the string (ranging from 0 to length-1)".stripMargin... | AVSystem/scex | scex-java-test/src/main/resources/symbolAttributes.scala | Scala | mit | 333 |
package org.fuckboi.ast
import org.objectweb.asm.MethodVisitor
import org.objectweb.asm.Opcodes._
import org.fuckboi.SymbolTable
case class CallReadMethodNode(returnVar: String) extends StatementNode{
def generate(mv: MethodVisitor, symbolTable: SymbolTable) = {
mv.visitTypeInsn(NEW, "java/util/Scanner");
m... | VirenMohindra/Fuckboi | src/main/scala/org/fuckboi/ast/CallReadMethodNode.scala | Scala | mit | 674 |
/*
* 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 ... | yelshater/hadoop-2.3.0 | spark-core_2.10-1.0.0-cdh5.1.0/src/main/scala/org/apache/spark/storage/BlockManagerMaster.scala | Scala | apache-2.0 | 9,644 |
/**
* 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... | peelframework/peel | peel-core/src/main/scala/org/peelframework/core/cli/command/suite/Run.scala | Scala | apache-2.0 | 7,490 |
/*
* 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... | svn2github/scalatest | src/main/scala/org/scalatest/tools/EventToPresent.scala | Scala | apache-2.0 | 4,130 |
/*
* Copyright (c) 2014-2021 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... | monixio/monix | monix-reactive/shared/src/main/scala/monix/reactive/internal/builders/RangeObservable.scala | Scala | apache-2.0 | 2,984 |
package molt.syntax.lfg
sealed abstract class AnnotatedAST[+A] {
def fDescription: (FDescription, AbsoluteIdentifier) = {
import scalaz.syntax.state._
import scalaz.State, State._
type FDescriptionState[R] = State[Set[AbsoluteIdentifier], R]
val freshID: FDescriptionState[AbsoluteIdentifier] = for {
... | julianmichael/molt | molt/shared/src/main/scala/molt/syntax/lfg/AnnotatedAST.scala | Scala | mit | 2,666 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | maropu/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalogWithListener.scala | Scala | apache-2.0 | 10,162 |
package specs.analysis
import helpers.Utils
import org.scalatest._
import utils.TestUtils
class UnknownClassesSpec extends FlatSpec {
var i = 0
def testNr: String = {
i += 1
i.toString
}
it should testNr in {
TestUtils.expectMutability(Map(List("A") -> Utils.IsShallowImmutable)) {
"""
... | luax/scala-immutability-plugin | plugin/src/test/scala/specs/analysis/UnknownClassesSpec.scala | Scala | mit | 448 |
/**
* Copyright 2011-2016 GatlingCorp (http://gatling.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 appli... | thkluge/gatling | gatling-charts/src/main/scala/io/gatling/charts/stats/buffers/ErrorsBuffers.scala | Scala | apache-2.0 | 1,970 |
/*
* Copyright 2015 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed t... | jasimmk/atlas | atlas-core/src/main/scala/com/netflix/atlas/core/model/Expr.scala | Scala | apache-2.0 | 1,426 |
package li.ues.codeego.web.routes
import li.ues.codeego.web._
import spray.routing.{PathMatcher, HttpService}
import spray.routing.directives.{PathDirectives, FileAndResourceDirectives}
import akka.actor.Actor
import spray.routing._
import spray.http._
import MediaTypes._
import StatusCodes._
import spray.routing.dire... | Codeego/codeego | src/main/scala/li/ues/codeego/web/routes/Tail.scala | Scala | lgpl-3.0 | 602 |
package com.github.rbobin.playjsonmatch.processors
import com.github.rbobin.playjsonmatch._
import play.api.libs.json._
class NullProcessorSpec extends ProcessorSpec {
override val processor = NullProcessor
val pattern = "null"
"match" should "be skipped with irrelevant patterns" in {
val maybeJsValue = S... | rbobin/play-json-match | src/test/scala/com/github/rbobin/playjsonmatch/processors/NullProcessorSpec.scala | Scala | mit | 878 |
package scutil.color
import scutil.lang._
import scutil.codec._
object RGBA {
val transparentBlack = RGBA(RGB.black, Alpha.transparent)
val transparentWhite = RGBA(RGB.white, Alpha.transparent)
def parseHex(s:String):Option[RGBA] =
Hex decodeByteString s collect { case ByteString(r,g,b,a) =>
RGBA(
RGB(
... | ritschwumm/scutil | modules/core/src/main/scala/scutil/color/RGBA.scala | Scala | bsd-2-clause | 1,362 |
package net.revenj.patterns
import scala.concurrent.Future
import scala.reflect.runtime.universe.TypeTag
trait DataContext {
def find[T <: Identifiable : TypeTag](uris: scala.collection.Seq[String]): Future[scala.collection.IndexedSeq[T]]
def find[T <: Identifiable : TypeTag](uri: String): Future[Option[... | ngs-doo/revenj | scala/revenj-core/src/main/scala/net/revenj/patterns/DataContext.scala | Scala | bsd-3-clause | 2,425 |
package scodec
package codecs
import shapeless._
import scodec.bits._
class CoproductCodecTest extends CodecSuite {
"coproduct codec support" should {
"support index based discriminators" in {
type IBS = Int :+: Boolean :+: String :+: CNil
val codec: Codec[IBS] = (int32 :+: bool(8) :+: variableSi... | alissapajer/scodec | shared/src/test/scala/scodec/codecs/CoproductCodecTest.scala | Scala | bsd-3-clause | 2,449 |
package docs
object index {
//#sample
import atto._, Atto._
int.sepBy(spaceChar).parseOnly("1 20 300").option
// res0: Option[List[Int]] = Some(List(1, 20, 300))
//#sample
} | tpolecat/atto | modules/docs/src/main/scala/index.scala | Scala | mit | 186 |
/*
* Scala.js (https://www.scala-js.org/)
*
* Copyright EPFL.
*
* Licensed under Apache License 2.0
* (https://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
package scala.scalajs.js.typedarray
import sc... | scala-js/scala-js | library/src/main/scala/scala/scalajs/js/typedarray/DataView.scala | Scala | apache-2.0 | 1,974 |
/*
* 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/utils/tf/loaders/AvgPoolGrad.scala | Scala | apache-2.0 | 2,536 |
package org.jetbrains.plugins.scala.lang.psi.types
import java.util
import com.intellij.psi.PsiClass
import org.jetbrains.plugins.scala.extensions.PsiTypeExt
import org.jetbrains.plugins.scala.lang.psi.ScalaPsiUtil
import org.jetbrains.plugins.scala.lang.psi.api.statements.params.PsiTypeParameterExt
import org.jetbra... | gtache/intellij-lsp | intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/psi/types/BaseTypes.scala | Scala | apache-2.0 | 4,979 |
package eventstore
package cluster
import java.net.InetSocketAddress
import akka.testkit.TestProbe
import akka.util.Timeout
import akka.actor.Status.Failure
import akka.pattern.ask
import org.joda.time.DateTime
import org.specs2.mock.Mockito
import ClusterDiscovererActor._
import GossipSeedsOrDns.ClusterDns
import Nod... | pawelkaczor/EventStore.JVM | src/test/scala/eventstore/cluster/ClusterDiscovererActorSpec.scala | Scala | bsd-3-clause | 13,955 |
/*
* Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com>
*/
package play.it.http.parsing
import play.api.mvc._
import play.api.libs.iteratee.Enumerator
import play.api.libs.json.{ Json, JsError }
import play.api.test._
object AnyContentBodyParserSpec extends PlaySpecification {
"The anyContent body p... | jyotikamboj/container | pf-framework/src/play-integration-test/src/test/scala/play/it/http/parsing/AnyContentBodyParserSpec.scala | Scala | mit | 2,662 |
/**
* Copyright 2015 Devon Miller
*
* 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... | aappddeevv/scala-vdom | component/src/main/scala/im/vdom/component/Component.scala | Scala | apache-2.0 | 2,652 |
/**
* Copyright (C) 2009-2017 Lightbend Inc. <http://www.lightbend.com>
*/
package akka.util
object BoxedType {
import java.{ lang ⇒ jl }
private val toBoxed = Map[Class[_], Class[_]](
classOf[Boolean] → classOf[jl.Boolean],
classOf[Byte] → classOf[jl.Byte],
classOf[Char] → classOf[jl.Character],
... | rorygraves/perf_tester | corpus/akka/akka-actor/src/main/scala/akka/util/BoxedType.scala | Scala | apache-2.0 | 675 |
package com.karasiq.bootstrap.buttons
import com.karasiq.bootstrap.context.RenderingContext
import com.karasiq.bootstrap.utils.Utils
trait ButtonGroupStyles { self: RenderingContext with Utils ⇒
import scalaTags.all._
sealed trait ButtonGroupSize extends ModifierFactory
object DefaultButtonGroupSize extends B... | Karasiq/scalajs-bootstrap | library/shared/src/main/scala/com/karasiq/bootstrap/buttons/ButtonGroupStyles.scala | Scala | mit | 877 |
package unof.cv.base
import org.scalajs.dom.raw.HTMLImageElement
import unof.cv.base.charLib.CharacterLibrary
import unof.cv.base.charLib.CMLayer
import unof.cv.base.charLib.CMImage
import unof.cv.base.charLib.AlwayVisible
import unof.cv.base.charLib.DeltaLink
import unof.cv.base.charLib.DynamicColor
import unof.cv.ba... | Hgjj/CharViewer | js/src/main/scala/unof/cv/base/CharLibBuilder.scala | Scala | bsd-3-clause | 6,604 |
/**
* 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 not... | sslavic/kafka | core/src/test/scala/kafka/server/BrokerMetadataCheckpointTest.scala | Scala | apache-2.0 | 1,094 |
package com.catinthedark.gban.units
import com.catinthedark.gban.Assets
import com.catinthedark.gban.common.Const
import com.catinthedark.gban.view._
import com.catinthedark.lib.{SimpleUnit, Deferred, MagicSpriteBatch}
import com.catinthedark.lib.constants.{FRange, Vec2Range}
abstract class EnemyView(val shared: Shar... | cat-in-the-dark/old48_34_game | src/main/scala/com/catinthedark/gban/units/EnemyView.scala | Scala | mit | 2,405 |
package mesosphere.mesos
import com.typesafe.scalalogging.StrictLogging
import mesosphere.marathon.api.serialization.SecretSerializer
import mesosphere.marathon.core.health.{ MesosCommandHealthCheck, MesosHealthCheck }
import mesosphere.marathon.core.instance.Instance
import mesosphere.marathon.core.pod._
import mesos... | janisz/marathon | src/main/scala/mesosphere/mesos/TaskGroupBuilder.scala | Scala | apache-2.0 | 18,896 |
package com.arcusys.valamis.slide.service
import com.arcusys.valamis.lrs.util.TinCanVerb
import com.arcusys.valamis.slide.model.SlideModel
trait SlideServiceContract {
def create(slideModel: SlideModel): SlideModel
def getAll: List[SlideModel]
def getBySlideSetId(slideSetId: Long): List[SlideModel]
def getTin... | ViLPy/Valamis | valamis-slide/src/main/scala/com/arcusys/valamis/slide/service/SlideServiceContract.scala | Scala | lgpl-3.0 | 423 |
/*
* Copyright 2011-2014 Chris de Vreeze
*
* 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... | EBPI/yaidom | src/main/scala/nl/ebpi/yaidom/simple/DocBuilder.scala | Scala | apache-2.0 | 3,901 |
/*
* Copyright 2009 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... | stevej/scala-stats | src/test/scala/com/twitter/stats/StatsSpec.scala | Scala | apache-2.0 | 5,760 |
package br.gov.lexml.parser.pl.util
import scala.util.matching._
case class ClassificadoresRegex[T](classificadores : List[(Regex,Proc[T])] = Nil) {
type Classificador = (Regex,Proc[T])
def +(r : Regex,p : Proc[T]) : ClassificadoresRegex[T] = {
copy(classificadores = classificadores :+ (r,p))
... | lexml/lexml-parser-projeto-lei | src/main/scala/br/gov/lexml/parser/pl/util/ClassificadorRegex.scala | Scala | gpl-2.0 | 1,466 |
package marketdata
import scala.concurrent.duration.FiniteDuration
import scala.concurrent.duration.SECONDS
import org.scalatest.Matchers
import org.scalatest.WordSpecLike
import akka.actor.ActorSystem
import akka.actor.Props
import akka.actor.actorRef2Scala
import akka.testkit.ImplicitSender
import akka.testkit.TestK... | mfahsi/btc-akka-demo | btc-trading-akka/src/test/scala/marketdata/MarketDataFeedPublisherActorSpec.scala | Scala | mit | 2,538 |
package mr.merc.unit
import org.scalatest.funsuite.AnyFunSuite
import mr.merc.players.Player
import mr.merc.map.terrain.TerrainType._
import mr.merc.map.hex.TerrainHex
import mr.merc.map.hex.TerrainHexField
import mr.merc.unit.SoldierState._
import mr.merc.unit.AttackAttribute._
class PoisonAttributeTest extends AnyF... | RenualdMarch/merc | src/test/scala/mr/merc/unit/PoisonAttributeTest.scala | Scala | gpl-3.0 | 2,166 |
/*
* 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 ... | jkbradley/spark | mllib/src/main/scala/org/apache/spark/ml/feature/LSH.scala | Scala | apache-2.0 | 14,404 |
package org.elasticsearch.plugin.river.kinesis.exception
/**
* Exception denoting that data is not properly formatted or cannot be parsed
* @param msg the message
* @param e the underlying exceptino
*
* Created by JohnDeverna on 8/9/14.
*/
class PoorlyFormattedDataException(msg: String, e: Exception) extends Run... | anreved/elasticsearch-kinesis-river | src/main/scala/org/elasticsearch/plugin/river/kinesis/exception/PoorlyFormattedDataException.scala | Scala | mit | 907 |
package org.jetbrains.plugins.scala
package lang
package parser
package parsing
package base
import com.intellij.lang.PsiBuilder
import lexer.ScalaTokenTypes
import builder.ScalaPsiBuilder
/**
* @author Alexander Podkhalyuzin
* Date: 15.02.2008
*/
/*
* AccessModifier ::= private [ '[' (id | 'this') ']' ]
* ... | consulo/consulo-scala | src/org/jetbrains/plugins/scala/lang/parser/parsing/base/AccessModifier.scala | Scala | apache-2.0 | 1,531 |
package xmppz
import org.scalatest.junit.JUnitRunner
import org.junit.runner.RunWith
import org.joda.time.DateTime
import scala.xml.pull._
import java.util.concurrent.{ Executors, CountDownLatch, TimeUnit }
import scala.concurrent.{ ExecutionContext, Future }
import util._
import packet._
import xmppz._
@RunWith(clas... | vmarquez/xmppz | src/test/scala/xmppz/XMPPTest.scala | Scala | lgpl-3.0 | 2,608 |
package go.models
import org.scalatest.funspec.AnyFunSpec
import org.scalatest.matchers.should.Matchers
class GoUtilSpec extends AnyFunSpec with Matchers {
it("quoteNameIfKeyword") {
GoUtil.quoteNameIfKeyword("foo") should be("foo")
GoUtil.quoteNameIfKeyword("int") should be("int_")
}
it("textToCommen... | mbryzek/apidoc-generator | go-generator/src/test/scala/models/GoUtilSpec.scala | Scala | mit | 1,687 |
/*
* AsyncTaskLogic.scala
* (FScape)
*
* Copyright (c) 2001-2022 Hanns Holger Rutz. All rights reserved.
*
* This software is published under the GNU Affero General Public License v3+
*
*
* For further information, please contact Hanns Holger Rutz at
* contact@sciss.de
*/
package de.sciss.fscape.strea... | Sciss/FScape-next | core/shared/src/main/scala/de/sciss/fscape/stream/impl/AsyncTaskLogic.scala | Scala | agpl-3.0 | 1,934 |
/*
*************************************************************************************
* Copyright 2011 Normation SAS
*************************************************************************************
*
* This file is part of Rudder.
*
* Rudder is free software: you can redistribute it and/or modify
* it under the... | armeniaca/rudder | rudder-web/src/main/scala/com/normation/rudder/web/snippet/node/Groups.scala | Scala | gpl-3.0 | 19,055 |
/* Title: Tools/jEdit/src/jedit_options.scala
Author: Makarius
Options for Isabelle/jEdit.
*/
package isabelle.jedit
import isabelle._
import java.awt.Color
import javax.swing.{InputVerifier, JComponent, UIManager}
import javax.swing.text.JTextComponent
import scala.swing.{Component, CheckBox, TextA... | MerelyAPseudonym/isabelle | src/Tools/jEdit/src/jedit_options.scala | Scala | bsd-3-clause | 3,379 |
/*
* Code Pulse: A real-time code coverage testing tool. For more information
* see http://code-pulse.com
*
* Copyright (C) 2014 Applied Visions - http://securedecisions.avi.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
... | secdec/codepulse | codepulse/src/main/scala/com/secdec/codepulse/util/Pluralizer.scala | Scala | apache-2.0 | 1,889 |
// -----------------------------------------------
//
// File: cd.scala (cd: count down)
//
// Running -
//
// $ scala cd.scala
//
// -----------------------------------------------
9 to (0,-1) foreach println _
| nvijayap/scala | cd.scala | Scala | apache-2.0 | 214 |
package ml.sparkling.graph.operators.measures.vertex.betweenness.flow.factory.impl
import ml.sparkling.graph.operators.measures.vertex.betweenness.flow.factory.FlowFactory
import ml.sparkling.graph.operators.measures.vertex.betweenness.flow.struct.{CFBCFlow, CFBCVertex}
import scala.util.Random
/**
* Created by mt... | sparkling-graph/sparkling-graph | operators/src/main/scala/ml/sparkling/graph/operators/measures/vertex/betweenness/flow/factory/impl/DefaultFlowFactory.scala | Scala | bsd-2-clause | 617 |
package scala.meta.internal.semanticdb.scalac
import java.io.File
import scala.meta.internal.io.PathIO
import scala.meta.io.AbsolutePath
import scala.tools.nsc.Global
import scala.tools.nsc.plugins.Plugin
class SemanticdbPlugin(val global: Global)
extends Plugin
with HijackReporter
with SemanticdbPipeline... | xeno-by/scalameta | semanticdb/scalac/library/src/main/scala/scala/meta/internal/semanticdb/scalac/SemanticdbPlugin.scala | Scala | bsd-3-clause | 1,465 |
package latis.dm
import latis.dm.implicits._
import org.junit._
import Assert._
import com.typesafe.scalalogging.LazyLogging
import latis.dm._
import latis.metadata.Metadata
import latis.time.Time
import latis.writer.AsciiWriter
import latis.writer.Writer
import latis.data.Data
import latis.data.SampledData
import lat... | dlindhol/LaTiS | src/test/scala/latis/dm/Test2D.scala | Scala | epl-1.0 | 2,264 |
package sqltyped
import schemacrawler.schema.{ColumnDataType, Schema}
import scala.reflect.runtime.universe.{Type, typeOf}
import Ast._
case class TypedValue(name: String, tpe: (Type, Int), nullable: Boolean, tag: Option[String], term: Term[Table])
case class TypedStatement(
input: List[TypedValue]
, output: L... | jonifreeman/sqltyped | core/src/main/scala/typer.scala | Scala | apache-2.0 | 18,417 |
/*
* 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... | dotty-staging/scalatest | scalactic/src/main/scala/org/scalactic/TypeCheckedTripleEquals.scala | Scala | apache-2.0 | 14,968 |
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.