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 edu.iastate.cs.pal
/**
* Danilo Dominguez Perez
*
* Iowa State University
* Department of Computer Science
* Program Analysis Laboratory
*
*/
object AST {
sealed abstract class Expr
// Numbers are int or float
sealed abstract class Number extends Expr
case class IntNumber(number: Int) extends N... | danilo04/scheme-compiler | src/main/scala/edu/iastate/cs/pal/AST.scala | Scala | agpl-3.0 | 1,318 |
/*
* Copyright 2011-2018 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 applic... | wiacekm/gatling | gatling-http/src/main/scala/io/gatling/http/action/ws2/fsm/WsActorFSM.scala | Scala | apache-2.0 | 2,118 |
package testfeature
import feature._
import org.scalatest.FunSuite
/**
* Created by prussell on 9/30/16.
*/
class RegionEqualitySuite extends FunSuite {
equalityBlock()
equalityBlockSet()
equalityEmpty()
def equalityEmpty(): Unit = {
test("Empty equality") {
assert(Empty === Empty, "Empty shou... | pamelarussell/sgxlib | src/test/scala/testfeature/RegionEqualitySuite.scala | Scala | mit | 2,234 |
package org.atnos.site
object Installation extends UserGuidePage { def is = "Installation".title ^ s2"""
You add `eff` as an sbt dependency:
```scala
libraryDependencies += "org.atnos" %% "eff" % "$version"
// to write types like Reader[String, *]
addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.13.2" cro... | atnos-org/eff | src/test/scala/org/atnos/site/Installation.scala | Scala | mit | 3,420 |
import scalaz._, Scalaz._
package object asmfreef {
object algebra {
sealed trait AsmF[F[_]] extends Applicative[F] {
def push(v: Int): F[Unit]
def pop: F[Int]
def sum: F[Int]
def mul: F[Int]
}
}
object dsl {
import algebra._
sealed trait Dsl[A] {
def apply[F[_]... | jdegoes/scalaworld-2015 | src/main/scala/asmfreef.scala | Scala | apache-2.0 | 2,671 |
package intellijhocon.highlight
import com.intellij.openapi.editor.colors.TextAttributesKey
import com.intellij.openapi.editor.{DefaultLanguageHighlighterColors => DLHC, HighlighterColors}
import com.intellij.codeInsight.daemon.impl.HighlightInfoType
object HoconHighlighterColors {
final val BadCharacter = key("HOC... | consulo/consulo-scala | intellij-hocon/src/main/scala/intellijhocon/highlight/HoconHighlighterColors.scala | Scala | apache-2.0 | 2,193 |
/*
* 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 ... | jianran/spark | core/src/main/scala/org/apache/spark/ExecutorAllocationClient.scala | Scala | apache-2.0 | 3,966 |
package com.twitter.zipkin.storage.redis
import com.twitter.finagle.redis.Client
import com.twitter.util.{Duration, Future}
import org.jboss.netty.buffer.ChannelBuffer
trait ExpirationSupport {
val client: Client
/** Expires keys older than this many seconds. */
val defaultTtl: Option[Duration]
def expireOn... | c3p0hz/zipkin | zipkin-redis/src/main/scala/com/twitter/zipkin/storage/redis/ExpirationSupport.scala | Scala | apache-2.0 | 501 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | aokolnychyi/spark | mllib/src/test/scala/org/apache/spark/ml/tree/impl/RandomForestSuite.scala | Scala | apache-2.0 | 27,614 |
package com.github.sekruse.wordcount.scala
import org.qcri.rheem.api._
import org.qcri.rheem.core.api.{Configuration, RheemContext}
import org.qcri.rheem.core.optimizer.ProbabilisticDoubleInterval
import org.qcri.rheem.core.plugin.Plugin
import org.qcri.rheem.java.Java
import org.qcri.rheem.spark.Spark
/**
* This ... | sekruse/rheem-examples | wordcount/src/main/scala/com/github/sekruse/wordcount/scala/WordCount.scala | Scala | apache-2.0 | 3,269 |
package org.vaadin.addons.rinne
import com.vaadin.ui.{Component, CssLayout}
import org.vaadin.addons.rinne.mixins.{LayoutClickNotifierMixin, AbstractLayoutMixin}
class VCssLayout extends CssLayout with AbstractLayoutMixin with LayoutClickNotifierMixin {
private var _cssMap = Map[Component, String]()
def add[C <... | LukaszByczynski/rinne | src/main/scala/org/vaadin/addons/rinne/VCssLayout.scala | Scala | apache-2.0 | 692 |
package com.geishatokyo.diffsql.parser
import scala.util.parsing.combinator.RegexParsers
/**
* Created by takezoux2 on 15/07/02.
*/
trait SkippingParsers { self: RegexParsers =>
/**
* 先頭のWhiteSpaceを飛ばす機能を追加
*/
trait SkipHeadWhiteSpace extends Parser[String] {
abstract override def apply(in: Input) = ... | geishatokyo/diff-sql-table | parser/src/main/scala/com/geishatokyo/diffsql/parser/SkippingParsers.scala | Scala | mit | 3,024 |
/**
* Copyright (C) 2014 Kaj Magnus Lindberg (born 1979)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
... | debiki/debiki-server-old | app/debiki/SpecialContentPages.scala | Scala | agpl-3.0 | 3,062 |
package moulder
import moulder.values._
import org.specs2.mutable.Specification
import org.jsoup.Jsoup
import java.lang.String
class MoulderUseCases extends Specification {
import Values._
import Moulds._
"A complex use case" in {
val document = Jsoup.parse("<html><body><h1>[...]</h1></body></html>")
... | jawher/moulder-s | src/test/scala/moulder/UseCases.scala | Scala | mit | 2,156 |
/*
Copyright (c) 2016, Rice University
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 and the following disclaimer.
2.... | agrippa/spark-swat | swat/src/test/scala/org/apache/spark/rdd/cl/tests/Tuple2ObjectInputDirectTest.scala | Scala | bsd-3-clause | 3,092 |
package mesosphere.marathon
package integration.raml18
import mesosphere.marathon.raml._
// format: OFF
/**
* ================================= NOTE =================================
* This is a copy of [[mesosphere.marathon.raml.PodInstanceStatus]] class that doesn't the`role` field.
* This is ONLY used in Upg... | mesosphere/marathon | tests/integration/src/test/scala/mesosphere/marathon/integration/raml18/PodInstanceStatus18.scala | Scala | apache-2.0 | 8,903 |
class W[T <: AnyRef](val t: T) {
val v: T {} = t
}
object W {
def apply[T <: AnyRef](t: T) = new W[t.type](t)
}
object RightAssoc {
def ra_:[T](t: T): Unit = ()
}
object Boom {
W("fooo").v ra_: RightAssoc
}
| loskutov/intellij-scala | testdata/scalacTests/pos/shapeless-regression.scala | Scala | apache-2.0 | 219 |
package me.dribba
import akka.actor.{Actor, ActorLogging, Props}
import akka.pattern.after
import scala.concurrent.Future
import scala.concurrent.duration._
import com.pi4j.io.gpio.GpioController
import com.pi4j.io.gpio.GpioFactory
import com.pi4j.io.gpio.GpioPinDigitalOutput
import com.pi4j.io.gpio.PinState
import co... | dribba/akkaponics | src/main/scala/me/dribba/Relay1Actor.scala | Scala | mit | 1,091 |
/*
* Copyright 2016 Guy Van den Broeck and Wannes Meert (UCLA and KU Leuven)
*
* 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
*
* Un... | UCLA-StarAI/Forclift | src/test/scala/edu/ucla/cs/starai/forclift/models/TestFriendsSmokerDrinker.scala | Scala | apache-2.0 | 2,569 |
/*
* 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 ... | ahnqirage/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVInferSchema.scala | Scala | apache-2.0 | 8,004 |
package im.actor.server.session
import akka.testkit.TestProbe
import com.google.protobuf.ByteString
import im.actor.api.rpc.auth._
import im.actor.api.rpc.codecs._
import im.actor.api.rpc.collections.ApiStringValue
import im.actor.api.rpc.contacts.{ RequestGetContacts, UpdateContactRegistered }
import im.actor.api.rpc... | EaglesoftZJ/actor-platform | actor-server/actor-tests/src/test/scala/im/actor/server/session/SessionSpec.scala | Scala | agpl-3.0 | 17,377 |
package priv.sp
import collection._
import java.io._
import priv.sp.update._
object CardSpec {
val runFlag = 1
val stunFlag = 2
val invincibleFlag = 4
val blockedFlag = 8
val pausedFlag = 16
val cursedFlag = 32
val onHold = stunFlag + blockedFlag + pausedFlag
type Phase = Int
val Direct = 0
val ... | illim/freespectrogdx | core/src/main/scala/priv/sp/CardSpec.scala | Scala | gpl-3.0 | 9,553 |
package org.apache.spark.sql
import org.apache.spark.SparkContext
import org.apache.spark.sql.catalyst.encoders.ExpressionEncoder
import org.apache.spark.sql.catalyst.expressions.Expression
import org.apache.spark.sql.execution.{QueryExecution, SQLExecution}
object KarpsStubs {
def withExecutionId[T](sc: SparkConte... | krapsh/kraps-server | src/main/scala/org/apache/spark/sql/KarpsStubs.scala | Scala | apache-2.0 | 906 |
package de.tu_berlin.formic.datastructure.tree.client
import akka.actor.ActorRef
import de.tu_berlin.formic.common.datastructure.DataStructureName
import de.tu_berlin.formic.common.{ClientId, DataStructureInstanceId}
/**
* @author Ronny Bräunlich
*/
class FormicStringTreeFactory extends FormicTreeDataStructureFa... | rbraeunlich/formic | tree/shared/src/main/scala/de/tu_berlin/formic/datastructure/tree/client/FormicStringTreeFactory.scala | Scala | apache-2.0 | 795 |
package dresden.sim.crdt
import java.util.UUID
import com.typesafe.scalalogging.StrictLogging
import dresden.crdt.Ports._
import dresden.crdt.set.TwoPSet
import dresden.crdt.set.TwoPSetManager.{AddOperation, RemoveOperation}
import dresden.sim.SimUtil.DresdenTimeout
import dresden.sim.{SimUtil, SimulationResultSingle... | jarlopez/dresden | src/test/scala-2.11/dresden/sim/crdt/TwoPSetSimApp.scala | Scala | mit | 3,043 |
/*
* Copyright 2015 Matt Massie
*
* 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... | massie/avrotuples | src/main/scala/com/github/massie/avrotuples/AvroTuple12.scala | Scala | apache-2.0 | 6,566 |
package controllers
import jp.t2v.lab.play2.auth.{AuthenticityToken, AsyncIdContainer, AuthConfig}
import jp.t2v.lab.play2.auth.sample.{Role, Account}
import jp.t2v.lab.play2.auth.sample.Role._
import play.api.mvc.RequestHeader
import play.api.mvc.Results._
import scala.concurrent.{Future, ExecutionContext}
import sc... | kuenzaa/play2-auth | sample/app/controllers/BaseAuthConfig.scala | Scala | apache-2.0 | 3,886 |
package fpinscala
package parsing
import ReferenceTypes._
import scala.util.matching.Regex
object ReferenceTypes {
/** A parser is a kind of state action that can fail. */
type Parser[+A] = ParseState => Result[A]
/** `ParseState` wraps a `Location` and provides some extra
* convenience functions. The sli... | jonas/fpinscala | exercises/src/test/scala/fpinscala/parsing/Reference.scala | Scala | mit | 4,623 |
/**
* The MIT License (MIT) Copyright (c) 2014 University of Applied Sciences, Berlin, Germany
* For more detailed information, please read the licence.txt in the root directory.
**/
package org.onepercent.utils
import org.onepercent.JobResult
import sys.process._
/**
* Represents a message which is based on ... | isn0gud/onepercent | src/main/scala/org/onepercent/utils/ApacheSparkController.scala | Scala | mit | 3,740 |
package ru.maizy.cheesecake.server.tests
import akka.testkit.TestKit
import org.scalatest.{ Suite, BeforeAndAfterAll }
/**
* Copyright (c) Nikita Kovaliov, maizy.ru, 2016
* See LICENSE.txt for details.
*/
trait KillActorSystemAfterAllTests extends BeforeAndAfterAll {
this: TestKit with Suite =>
override prot... | maizy/cheesecake | server/src/test/scala/ru/maizy/cheesecake/server/tests/KillActorSystemAfterAllTests.scala | Scala | apache-2.0 | 397 |
package collins.graphs
import java.net.URLEncoder
import scala.util.control.Exception
import play.twirl.api.Content
import com.codahale.jerkson.Json.generate
import collins.models.asset.AssetView
sealed trait GraphView {
def get(asset: AssetView): Option[Content]
def isGraphable(asset: AssetView): Boolean = t... | funzoneq/collins | app/collins/graphs/GraphView.scala | Scala | apache-2.0 | 2,526 |
package com.twitter.finagle.serverset2.client
import com.twitter.io.Buf
import com.twitter.util.{Closable, Duration, Future}
private[serverset2] trait ZooKeeperClient extends Closable {
/**
* The session id for this ZooKeeper client instance. The value returned is
* not valid until the client connects to a s... | luciferous/finagle | finagle-serversets/src/main/scala/com/twitter/finagle/serverset2/client/ZooKeeperClient.scala | Scala | apache-2.0 | 7,147 |
package net.sansa_stack.rdf.flink.utils
import java.lang.Iterable
import scala.reflect.ClassTag
import org.apache.flink.api.common.functions.CoGroupFunction
import org.apache.flink.api.common.typeinfo.TypeInformation
import org.apache.flink.api.scala.DataSet
import org.apache.flink.table.runtime.IntersectCoGroupFunc... | SANSA-Stack/Spark-RDF | sansa-rdf-flink/src/main/scala/net/sansa_stack/rdf/flink/utils/DataSetUtils.scala | Scala | gpl-3.0 | 1,971 |
package tethys
package object derivation {
case class SimpleType(i: Int, s: String, d: Double)
case class SimpleTypeWithAny(i: Int, s: String, d: Double, any: Any)
case class JsonTreeTestData(a: Int, b: Boolean, c: C)
case class C(d: D)
case class D(a: Int)
case class RecursiveType(a: Int, children: Seq... | tethys-json/tethys | modules/macro-derivation/src/test/scala/tethys/derivation/package.scala | Scala | apache-2.0 | 904 |
/**
* Copyright: Copyright (C) 2016, ATS Advanced Telematic Systems GmbH
* License: MPL-2.0
*/
package org.genivi.sota.device_registry
import java.time.OffsetDateTime
import akka.http.scaladsl.model.Uri.{Path, Query}
import akka.http.scaladsl.model.{HttpRequest, StatusCodes, Uri}
import akka.http.scaladsl.server.R... | PDXostc/rvi_sota_server | device-registry/src/test/scala/org/genivi/sota/device_registry/DeviceRequests.scala | Scala | mpl-2.0 | 4,336 |
package microtools.ws
import microtools.models.{AuthRequestContext, ExtraHeaders, RequestContext, ServiceName}
import play.api.http.HeaderNames
import play.api.libs.ws.{WSClient, WSRequest}
class WSClientWithFlow(val underlying: WSClient) {
private[this] object ForwardProto extends Enumeration {
type Type = Val... | 21re/play-error-handling | src/main/scala/microtools/ws/WSClientWithFlow.scala | Scala | mit | 1,287 |
/* This is the application shown in the online tutorial.
*
* It has two small issues:
* - Without special configuration, MTurk requires that tasks
* have at least 10 HITs. For this question, the minimum
* number of HITs is 3, so this version is a little
* inefficient.
* - If AutoMan is unable to deli... | dbarowy/AutoMan | apps/simple/SuperDuperSimplest/src/main/scala/SuperDuperSimplest.scala | Scala | gpl-2.0 | 1,614 |
package org.lolhens.minechanics.common.block
import net.minecraft.block.Block
//import net.minecraft.client.renderer.texture.IIconRegister
//import net.minecraft.util.IIcon
class BlockFoliage extends BlockBase("foliage") {
setStepSound(Block.soundTypeGrass)
//private var foliage_top, foliage_bottom: IIcon = nul... | LolHens/Minechanics | src/main/scala/org/lolhens/minechanics/common/block/BlockFoliage.scala | Scala | gpl-2.0 | 794 |
/*
* 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 ... | snithish/spark-testing-base | src/test/1.3/scala/com/holdenkarau/spark/testing/PerTestSampleTest.scala | Scala | apache-2.0 | 1,276 |
// Copyright (c) 2013, Johns Hopkins University. All rights reserved.
// This software is released under the 2-clause BSD license.
// See /LICENSE.txt
// Travis Wolfe, twolfe18@gmail.com, 30 July 2013
package edu.jhu.hlt.parma.inference.topics
import scala.collection.immutable
import scala.collection.mutable
import... | hltcoe/parma | src/main/scala/edu/jhu/hlt/parma/inference/topics/Document.scala | Scala | bsd-2-clause | 3,868 |
/*
* 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 ... | aljoscha/flink | flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/metadata/FlinkRelMdColumnInterval.scala | Scala | apache-2.0 | 31,168 |
package scala.scalanative
package native
import scalanative.runtime.{divULong, remULong}
import java.lang.{Long => JLong}
/** `ULong`, a 64-bit unsigned integer. */
final class ULong private[scala] (private val underlying: Long)
extends AnyVal
with java.io.Serializable
with Comparable[ULong] {
@inline ... | cedricviaccoz/scala-native | nativelib/src/main/scala/scala/scalanative/native/ULong.scala | Scala | bsd-3-clause | 11,638 |
/**
* Swaggy Jenkins
* Jenkins API clients generated from Swagger / Open API specification
*
* The version of the OpenAPI document: 1.1.2-pre.0
* Contact: blah@cliffano.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not ed... | cliffano/swaggy-jenkins | clients/scala-httpclient-deprecated/generated/src/main/scala/org/openapitools/client/model/BranchImplpermissions.scala | Scala | mit | 590 |
package model
import org.bson.types.ObjectId
import org.joda.time.DateTime
import dao.CategoryDao
/**
* The Class Blog.
*
* @author Nguyen Duc Dung
* @since 1/7/14 12:24 PM
*
*/
case class Blog(
_id: ObjectId = new ObjectId(),
name: String,
url: String,
... | SunriseSoftVN/hayhayblog | core/app/model/Blog.scala | Scala | gpl-2.0 | 1,111 |
/*
* Copyright (c) 2015-2017 Toby Weston
*
* 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... | tobyweston/learn-scala-java-devs | src/main/scala/s4j/scala/chapter17/Timer.scala | Scala | apache-2.0 | 1,635 |
package edu.umd.mith.util
import argonaut._, Argonaut._
import java.net.URL
import org.apache.commons.lang.StringEscapeUtils.unescapeJavaScript
import scala.concurrent.duration.Duration
import scalaz.\\/
import scalaz.concurrent.Task
object ArgonautUtils {
case class ArgonautError(msg: String) extends Exception(msg... | umd-mith/hathi | util/src/main/scala/util/argonaut.scala | Scala | apache-2.0 | 962 |
/*
* 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 ... | bowenli86/flink | flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/stream/sql/agg/AggregateTest.scala | Scala | apache-2.0 | 8,453 |
package org.eigengo.scalalp.collections
import scala.io.Source
object Offline extends App {
lazy val products: List[Product] = {
val is = Source.fromInputStream(Offline.getClass.getResourceAsStream("/booze.txt"))
is.getLines().flatMap { line ⇒
line.split('|') match {
case Array(name, price, s... | eigengo/scala-launchpad | src/main/scala/org/eigengo/scalalp/collections/Offline.scala | Scala | apache-2.0 | 780 |
package edu.rice.habanero.benchmarks.banking
import edu.rice.habanero.actors.{ScalazActor, ScalazActorState, ScalazPool}
import edu.rice.habanero.benchmarks.banking.BankingConfig._
import edu.rice.habanero.benchmarks.{Benchmark, BenchmarkRunner}
import scala.concurrent.Promise
import scala.util.Random
/**
*
* @aut... | smarr/savina | src/main/scala/edu/rice/habanero/benchmarks/banking/BankingScalazActorBenchmark.scala | Scala | gpl-2.0 | 3,783 |
package org.jetbrains.plugins.scala.caches.stats
import java.util.concurrent.atomic.AtomicReference
private class MyConcurrentMap[K, V >: Null] {
private def emptyMap = java.util.Collections.emptyMap[K, V]()
private val ref: AtomicReference[java.util.Map[K, V]] = new AtomicReference(emptyMap)
def computeIfAbs... | JetBrains/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/caches/stats/MyConcurrentMap.scala | Scala | apache-2.0 | 1,383 |
package scutil.lang
import minitest._
import scutil.core.implicits._
object OrderingTest extends SimpleTestSuite {
test("seqOrdering should order by base order (same)") {
assertEquals(
Seq(Seq(1), Seq(2), Seq(1), Seq(2)) sorted Ordering.sequence[Int](true),
Seq(Seq(1), Seq(1), Seq(2), Seq(2))
)
}
test(... | ritschwumm/scutil | modules/core/src/test/scala/scutil/lang/OrderingTest.scala | Scala | bsd-2-clause | 995 |
package org.broadinstitute.clio.server.webservice
import io.circe.Json
import io.circe.syntax._
import org.broadinstitute.clio.util.model.Location
import org.broadinstitute.clio.server.service.UbamService
import org.broadinstitute.clio.transfer.model.UbamIndex
import org.broadinstitute.clio.transfer.model.ubam.UbamKey... | broadinstitute/clio | clio-server/src/test/scala/org/broadinstitute/clio/server/webservice/UbamWebServiceSpec.scala | Scala | bsd-3-clause | 988 |
package xyz.hyperreal.sprolog
import org.scalatest._
import prop.PropertyChecks
import Prolog.{program, query, queryOnce, db}
class Lists extends FreeSpec with PropertyChecks with Matchers
{
"member" in
{
query( db, "member( d, [a, b, c] )." ) shouldBe "no"
query( db, "member( b, [a, b, c] )." ) shouldBe "yes... | edadma/sprolog | src/test/scala/Lists.scala | Scala | mit | 2,760 |
/*
* Copyright (c) 2015.
* Created by MrTJP.
* All rights reserved.
*/
package mrtjp.core.fx
import mrtjp.core.fx.particles.CoreParticle
import scala.collection.mutable.{Seq => MSeq}
class SequenceAction extends ParticleAction
{
var actions = MSeq[ParticleAction]()
override def tickLife()
{
... | MrTJP/MrTJPCore | src/main/scala/mrtjp/core/fx/SequenceAction.scala | Scala | lgpl-3.0 | 1,201 |
package org.daydev.scala.bb.parse
import org.daydev.scala.bb.parse.lexer.GrammarCombinatorsBbLexer
class TokenStackBbParserSpec
extends BbParserSpec
with TokenStackBbParser
with GrammarCombinatorsBbLexer | daydev/bbcode-scala | src/test/scala/org/daydev/scala/bb/parse/TokenStackBbParserSpec.scala | Scala | mit | 211 |
/*
* 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 ... | ConeyLiu/spark | sql/core/v1.2/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFilters.scala | Scala | apache-2.0 | 12,871 |
package com.github.mdr.ascii.layout.layering
import org.scalacheck.Prop.forAll
import org.scalacheck.Properties
import com.github.mdr.ascii.graph.Graph
import com.github.mdr.ascii.graph.GraphGenerators._
object LongestDistanceToSinkSpecification extends Properties("LongestDistanceToSink") {
property("longest dist... | mdr/ascii-graphs | src/test/scala/com/github/mdr/ascii/layout/layering/LongestDistanceToSinkSpecification.scala | Scala | mit | 750 |
package wrangler.data
/** Maven style artifact with well understood versioning.*/
case class Artifact(group: String, name: String, version: Version) {
/** Produces sbt style formatting of the artifact.*/
def pretty = s"$group % $name % ${version.pretty}"
/** Convert to a generic artifact by changing the version... | CommBank/wrangler | src/main/scala/wrangler/data/Artifact.scala | Scala | apache-2.0 | 859 |
package debop4s.data.orm.jpa
import javax.persistence._
import debop4s.core.ToStringHelper
import debop4s.core.utils.Hashs
import debop4s.data.orm.model.LongEntity
import org.hibernate.{annotations => hba}
import _root_.scala.beans.BeanProperty
/**
* JpaScalaEntity
* Created by debop on 2014. 1. 29.
*/
@Entity
... | debop/debop4s | debop4s-data-orm/src/test/scala/debop4s/data/orm/jpa/ScalaJpaEntity.scala | Scala | apache-2.0 | 801 |
package utils
import org.apache.log4j.Logger
import org.apache.spark.SparkContext
import org.apache.spark.rdd.RDD
import utils.Launcher.Technique
import techniques._
/**
* Created by fabien and mathieu on 4/28/15.
*/
object TestCases {
val logger = Logger.getLogger(TestCases.getClass.getName)
// TODO: use th... | SidneyBovet/smargn | SparkCommander/src/main/scala/utils/TestCases.scala | Scala | gpl-2.0 | 10,488 |
package controller
/**
* Json戻り値保持Class.
* @param msgs メッセージ(存在しない場合、空Seq)
* @param errorMsg エラーメッセージ(存在しない場合、空Map)
* @param result 結果
*/
case class JsonResult(
msgs: Seq[String],
errorMsg: Map[String, Seq[String]],
result: AnyRef
) | nemuzuka/vss-kanban | src/main/scala/controller/JsonResult.scala | Scala | mit | 320 |
package com.emstlk.nacl4s.crypto.sign
import scala.util.control.Breaks._
object GroupElement {
@inline def equal(b: Byte, c: Byte): Byte =
(((b ^ c) - 1) >>> 31).toByte
@inline def negative(b: Byte): Byte =
(b.toLong >>> 63).toByte
@inline def cmov(t: Precomp, u: Precomp, b: Int) = {
FieldElement... | emstlk/nacl4s | src/main/scala/com/emstlk/nacl4s/crypto/sign/GroupElement.scala | Scala | mit | 10,882 |
/*
* 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 | tests/src/test/scala/org/apache/openwhisk/core/scheduler/queue/test/ElasticSearchDurationCheckerTests.scala | Scala | apache-2.0 | 14,482 |
package org.jetbrains.sbt.shell.sbt13_7
import org.jetbrains.sbt.shell.UseSbtTestRunTest
import org.junit.Ignore
/**
* Created by Roman.Shein on 13.04.2017.
*/
@Ignore
class UseSbtTestRunTest_13_7 extends UseSbtTestRunTest {
override def getPath: String = "sbt/shell/sbtTestRunTest_07"
}
| JetBrains/intellij-scala | scala/scala-impl/test/org/jetbrains/sbt/shell/sbt13_7/UseSbtTestRunTest_13_7.scala | Scala | apache-2.0 | 296 |
/**
* This file is part of agora-mixnet.
* Copyright (C) 2015-2016 Agora Voting SL <agora@agoravoting.com>
* agora-mixnet is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the L... | agoravoting/agora-mixnet | src/main/scala/accumulator/ElectionDTOData.scala | Scala | agpl-3.0 | 4,585 |
package io.skysail.api.osgi.events.impl
import io.skysail.api.osgi.events.EventsService
import org.osgi.service.event.{Event, EventAdmin, EventHandler}
import org.slf4j.LoggerFactory
import scala.collection.JavaConverters._
class DefaultEventsService(eventAdmin: EventAdmin) extends EventsService with EventHandler {
... | evandor/skysail-server | skysail.api/src/io/skysail/api/osgi/events/impl/DefaultEventsService.scala | Scala | apache-2.0 | 1,002 |
/*
* 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 ... | likithkailas/StreamingSystems | mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackend.scala | Scala | apache-2.0 | 25,069 |
package com.example
//#user-registry-actor
import akka.actor.{ Actor, ActorLogging, Props }
//#user-case-classes
final case class User(name: String, age: Int, countryOfResidence: String)
final case class Users(users: Seq[User])
//#user-case-classes
object UserRegistryActor {
final case class ActionPerformed(descri... | ddki/my_study_project | language/scala/akkahttp/test-akka/src/main/scala/com/example/UserRegistryActor.scala | Scala | mit | 1,110 |
/*
* 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/test/scala/uk/gov/hmrc/ct/computations/CP33Spec.scala | Scala | apache-2.0 | 1,061 |
/*
* 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... | JimCallahan/Graphics | external/scalatest/src/main/scala/org/scalatest/testng/TestNGSuite.scala | Scala | apache-2.0 | 20,312 |
package com.shorrockin.narrator
import org.specs._
import java.util.concurrent.TimeUnit
class ActionSpec extends Specification with IntervalCreator {
"an action" can {
val story = new Story(1, Map[String, String]())
import story._
"be constructed from a string and function" in {
val action = "ac... | shorrockin/narrator | src/test/scala/ActionSpec.scala | Scala | apache-2.0 | 2,080 |
package com.ataraxer.apps.chess.scala.pieces
import com.ataraxer.apps.chess.scala.Color._
import com.ataraxer.apps.chess.scala.{Board, Cell, Coord, Shift}
/*
* Piece is abstract class that represents single
* chess piece which can be located somewhere on the board
*
*/
object Piece {
class ImpossibleMoveExcept... | ataraxer/chess-game-scala | src/main/scala/pieces/Piece.scala | Scala | mit | 1,687 |
package extruder.laws
import cats.data._
import cats.{Eq, Monad, Monoid, Order}
import extruder.core._
import org.scalacheck.Prop.forAll
import org.scalacheck.ScalacheckShapeless._
import org.scalacheck.{Arbitrary, Prop}
import org.typelevel.discipline.Laws
trait EncoderDecoderGenericTests[F[_], S <: Settings, E, D, ... | janstenpickle/extruder | laws/src/main/scala/extruder/laws/EncoderDecoderGenericTests.scala | Scala | mit | 3,138 |
package rip.hansolo.http4s.service
import org.http4s.HttpService
import org.http4s.MediaType._
import org.http4s.dsl._
import org.http4s.headers.`Content-Type`
/**
* Created by Giymo11 on 08.02.2016.
*/
object TilService {
def apply() = service
val service = HttpService.lift( req =>
Ok(<html>
<bod... | Giymo11/http4s-hansolo.rip | hansolo/jvm/src/main/scala/rip/hansolo/http4s/service/TilService.scala | Scala | mit | 643 |
package sbt
import java.io.File
import org.specs._
import IO.{createDirectory, delete, touch, withTemporaryDirectory}
import org.apache.ivy.util.ChecksumHelper
import IfMissing.Fail
object ComponentManagerTest extends Specification
{
val TestID = "manager-test"
"Component manager" should {
"throw an exception if ... | ornicar/xsbt | ivy/src/test/scala/ComponentManagerTest.scala | Scala | bsd-3-clause | 3,301 |
/*
* 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/test/scala/com/intel/analytics/bigdl/keras/nn/GRUSpec.scala | Scala | apache-2.0 | 4,289 |
package com.sopranoworks.bolt.values
import com.sopranoworks.bolt._
import com.google.cloud.spanner.{ResultSet, ResultSets, Struct, Type, Value=>SValue, Database => SDatabase}
import org.specs2.mutable.Specification
import scala.collection.JavaConversions._
class IdentifierWithFieldValueTest extends Specification {... | OsamuTakahashi/bolt | src/test/scala/com/sopranoworks/bolt/values/IdentifierWithFieldValueTest.scala | Scala | mit | 3,524 |
package vanadis.modules.examples.scalacalc.calculator
import vanadis.ext.{Inject, Module, Expose}
import vanadis.modules.examples.scalacalc.calcservices._
@Module { val moduleType = "scalacalc-calculator" }
class CalculatorModule {
@Inject var subtractor:Subtractor = null
@Inject var adder:Adder = null
@Inje... | kjetilv/vanadis | modules/examples/scalacalc/calculator/src/main/scala/vanadis/modules/examples/scalacalc/calculator/CalculatorModule.scala | Scala | apache-2.0 | 479 |
// The MIT License (MIT)
//
// Copyright (c) 2015 David Heidrich, BowlingX <me@bowlingx.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 limit... | BowlingX/commentp | src/main/scala/com/bowlingx/commentp/Environment.scala | Scala | mit | 3,379 |
/*
* Copyright (C) 2014-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 agreed to i... | JuPfu/arktos | shared/src/main/scala/org/arktos/package.scala | Scala | apache-2.0 | 1,785 |
/*
* 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 ... | Panos-Bletsos/spark-cost-model-optimizer | sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamSuite.scala | Scala | apache-2.0 | 11,797 |
// Copyright 2018 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appl... | bazelbuild/bazel-federation | rules_scala/HelloLibTest.scala | Scala | apache-2.0 | 853 |
/**
* Copyright 2015 ICT.
*
* 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
... | DataSysLab/netflow | core/src/main/scala/cn/ac/ict/acs/netflow/loader/Loader.scala | Scala | apache-2.0 | 884 |
package spa.client.modules
import diode.Circuit
import diode.react._
import diode.react.ReactPot._
import diode.data.{Empty, Pot}
import japgolly.scalajs.react.vdom.prefix_<^._
import japgolly.scalajs.react._
import japgolly.scalajs.react.extra.router.RouterCtl
import spa.client.SPAMain._
import spa.client.components.... | IceGiant/internet-abridged | client/src/main/scala/spa/client/modules/Feedback.scala | Scala | apache-2.0 | 6,578 |
package pl.touk.nussknacker.engine.compiledgraph
import cats.data.NonEmptyList
import pl.touk.nussknacker.engine.api.MetaData
case class CompiledProcessParts(metaData: MetaData, sources: NonEmptyList[part.PotentiallyStartPart]) | TouK/nussknacker | interpreter/src/main/scala/pl/touk/nussknacker/engine/compiledgraph/CompiledProcessParts.scala | Scala | apache-2.0 | 229 |
/**
* 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... | janurag/scalate | scalate-core/src/main/scala/org/fusesource/scalate/osgi/BundleClassPathBuilder.scala | Scala | apache-2.0 | 9,175 |
/**
* A simple text based RPG
*
* @package simplerpg
* @copyright 2015
*/
package simplerpg.action
import simplerpg.Player
import simplerpg.World
final class InvalidAction extends Action {
def run(currentPlayer: Player, world: World): Option[Action] = {
printAction("Invalid action given")
}
}
| mcross1882/SimpleRPG | src/main/scala/simplerpg/action/InvalidAction.scala | Scala | mit | 320 |
/*
* 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 ... | CodingCat/spark-eventhubs | core/src/main/scala/org/apache/spark/streaming/eventhubs/checkpoint/DfsBasedOffsetStore.scala | Scala | apache-2.0 | 6,581 |
/**
* Created by Romain Reuillon on 02/11/16.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
... | ISCPIF/doors | server/src/main/scala/fr/iscpif/doors/server/Settings.scala | Scala | agpl-3.0 | 2,079 |
package scala.collection.immutable
import org.junit.Assert.{assertEquals, assertFalse, assertSame, assertTrue}
import org.junit.{Assert, Test}
object ChampMapSmokeTest {
private def emptyMap[K, V]: HashMap[K, V] =
HashMap.empty[K, V]
private def mapOf[K, V](keyValuePairs: (K, V)*): HashMap[K, V] = {
val... | scala/scala | test/junit/scala/collection/immutable/ChampMapSmokeTest.scala | Scala | apache-2.0 | 8,372 |
import com.thesamet.proto.e2e.`enum`._
import com.thesamet.proto.e2e.enum3._
import scalapb.GeneratedEnumCompanion
import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.must.Matchers
class EnumSpec extends AnyFlatSpec with Matchers with OptionValues {
val red = EnumT... | scalapb/ScalaPB | e2e/src/test/scala/EnumSpec.scala | Scala | apache-2.0 | 5,990 |
package modules
import actors.{ConsumerActor, ProcessorActor}
import com.google.inject.AbstractModule
import play.api.libs.concurrent.AkkaGuiceSupport
import schedulers.MainScheduler
/**
* Configure all akka actors related to the the scheduler
*/
class JobModule extends AbstractModule with AkkaGuiceSupport {
de... | JohnnyCosta/dataconsumer | app/modules/JobModule.scala | Scala | gpl-3.0 | 507 |
package scalarules.test.scalafmt
object Format {
def main(args: Array[String]) {
val warnings: String = "Be careful with this test. The column number is limited to 40, so it should be in new line."
}
}
| smparkes/rules_scala | test/scalafmt/unformatted/unformatted-custom-conf.scala | Scala | apache-2.0 | 210 |
package com.github.sstone.amqp
import collection.JavaConversions._
import com.rabbitmq.client.AMQP.BasicProperties
import com.rabbitmq.client.{AMQP, ShutdownSignalException, Channel, Envelope}
import akka.actor.{Actor, Props, ActorRef, ActorRefFactory}
import akka.actor.FSM.{SubscribeTransitionCallBack, CurrentS... | SayreBladesWW/amqp-client | src/main/scala/com/github/sstone/amqp/Amqp.scala | Scala | mit | 9,966 |
/*
* 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/data/model/slick/TreeNodeDataDao.scala | Scala | apache-2.0 | 10,372 |
// Project: scalanative-cocoa
// Module: Foundation
// Description: Contains all functions defined in the Foundation global scope.
package cocoa.foundation
import scala.scalanative.native._
import objc.runtime._
import cocoa.foundation._
@extern
object Foundation {
// type objc_class = Ptr[Byte]
// type ob... | jokade/scalanative-cocoa | foundation/src/main/scala/cocoa/foundation/Foundation.scala | Scala | mit | 1,531 |
package techniques
import org.apache.spark.rdd.RDD
import utils.Scaling._
import utils.TopK._
import utils.SubTechniques._
import utils.ComputationUtilities._
/**
* Created by Joanna on 4/7/15.
* @author Joanna Salathé
* Naive similarity functions that compute the similar words list of a given word based o... | SidneyBovet/smargn | SparkCommander/src/main/scala/techniques/NaiveComparisons.scala | Scala | gpl-2.0 | 9,758 |
object App {
class Foo { type A = Boo#B } // error: illegal cyclic reference: alias App.Boo#B of type A refers back to the type itself
class Boo { type B = Foo#A }
}
| som-snytt/dotty | tests/neg/i4371a.scala | Scala | apache-2.0 | 170 |
package com.sksamuel.elastic4s.search.queries
import com.sksamuel.elastic4s.testkit.SharedElasticSugar
import org.elasticsearch.action.support.WriteRequest.RefreshPolicy
import org.scalatest.{Matchers, WordSpec}
class NestedQueryTest extends WordSpec with SharedElasticSugar with Matchers {
client.execute {
cre... | aroundus-inc/elastic4s | elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/search/queries/NestedQueryTest.scala | Scala | apache-2.0 | 1,641 |
/*
* 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 ... | HuaweiBigData/carbondata | integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/detailquery/ColumnPropertyValidationTestCase.scala | Scala | apache-2.0 | 1,982 |
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.