code stringlengths 5 1M | repo_name stringlengths 5 109 | path stringlengths 6 208 | language stringclasses 1
value | license stringclasses 15
values | size int64 5 1M |
|---|---|---|---|---|---|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | Lewuathe/neurallib | src/test/scala/com/lewuathe/dllib/ActivationSpec.scala | Scala | mit | 1,715 |
/*
* 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/metrics/sink/CsvSink.scala | Scala | apache-2.0 | 2,265 |
/*
* Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com>
*/
package docs.scaladsl.mb
import akka.Done
import akka.NotUsed
//#hello-service
import com.lightbend.lagom.scaladsl.api.broker.Topic
import com.lightbend.lagom.scaladsl.api.Service
import com.lightbend.lagom.scaladsl.api.ServiceCall
import p... | rcavalcanti/lagom | docs/manual/scala/guide/broker/code/docs/scaladsl/mb/HelloService.scala | Scala | apache-2.0 | 1,144 |
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
/** @author John Miller, Zhaochong Liu
* @version 1.3
* @date Sat Jul 30 22:53:47 EDT 2016
* @see LICENSE (MIT style license file).
*/
package scalation.linalgebra
import scalation.math.double_exp
import scalation.math.Ex... | NBKlepp/fda | scalation_1.3/scalation_mathstat/src/main/scala/scalation/linalgebra/Fac_QR_H2.scala | Scala | mit | 5,668 |
/***********************************************************************
* Copyright (c) 2013-2015 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 is ... | vpipkt/geomesa | geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/iterators/IndexedSpatioTemporalFilter.scala | Scala | apache-2.0 | 1,526 |
package rpm4s.repo.data
import rpm4s.repo.data.Data.{Primary, UpdateInfo}
case class Repomd(
revision: Option[Long],
primary: Option[Primary],
updateinfo: Option[UpdateInfo]
)
object Repomd {
case class RepoMdBuilder(
revision: Option[Long],
primary: Option[Primary],
updateinfo: Option[Upd... | lucidd/rpm4s | repo-utils/shared/src/main/scala/rpm4s/repo/data/Repomd.scala | Scala | mit | 560 |
/*
* Copyright 2013 Eike Kettner
*
* 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... | eikek/publet-sharry | src/main/scala/org/eknet/publet/sharry/ui/ArchiveManage.scala | Scala | apache-2.0 | 1,919 |
package org.workcraft.gui.propertyeditor
import org.workcraft.util.Action
import org.workcraft.scala.effects.IO
trait GenericEditorProvider[T] {
def createEditor(initialValue:T, accept: IO[Unit], cancel: IO[Unit]): GenericCellEditor[T]
} | tuura/workcraft-2.2 | Gui/src/main/scala/org/workcraft/gui/propertyeditor/GenericEditorProvider.scala | Scala | gpl-3.0 | 243 |
package org.scalatra
import org.scalatest.FunSuite
import org.scalatest.Matchers
/**
* Test cases adapted from https://github.com/josh/rack-mount/blob/d44e02ec8a6318fdda8ea53a30aac654e228e07b/test/test_strexp.rb
*/
class RailsPathPatternParserTest extends FunSuite with Matchers {
test("static string") {
val... | etorreborre/scalatra | core/src/test/scala/org/scalatra/RailsPathPatternParserTest.scala | Scala | bsd-2-clause | 3,908 |
package concrete.generator.cspompatterns
import concrete.CSPOMDriver
import cspom.compiler.ConstraintCompiler.{addCtr, applyDomain, removeCtr, replace}
import cspom.compiler.{ConstraintCompiler, Delta, Functions}
import cspom.util.{Finite, Infinitable, IntInterval, RangeSet}
import cspom.variable.IntExpression.implici... | concrete-cp/concrete | src/main/scala/concrete/generator/cspompatterns/AllDiffConstant.scala | Scala | lgpl-2.1 | 2,836 |
package com.github.tminglei.slickpg
import java.sql.{Date, Time, Timestamp}
import java.util.UUID
import org.scalatest.funsuite.AnyFunSuite
import slick.jdbc.GetResult
import scala.collection.mutable.Buffer
import scala.concurrent.Await
import scala.concurrent.duration._
class PgArraySupportSuite extends AnyFunSuit... | tminglei/slick-pg | src/test/scala/com/github/tminglei/slickpg/PgArraySupportSuite.scala | Scala | bsd-2-clause | 13,013 |
package scorex.api.http
import akka.actor.ActorRefFactory
import akka.http.scaladsl.model.headers.RawHeader
import akka.http.scaladsl.model.{ContentTypes, HttpEntity, StatusCode}
import akka.http.scaladsl.server.{Directive0, Directives, Route}
import akka.util.Timeout
import play.api.libs.json.JsValue
import scorex.cr... | B83YPoj/Waves | src/main/scala/scorex/api/http/ApiRoute.scala | Scala | apache-2.0 | 2,360 |
package org.apache.activemq.apollo.broker.store
/**
* 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... | chirino/activemq-apollo | apollo-broker/src/test/scala/org/apache/activemq/apollo/broker/store/StoreFunSuiteSupport.scala | Scala | apache-2.0 | 4,141 |
import sbt._
import Keys._
import play.Project._
object ApplicationBuild extends Build {
val appName = "scalabitz"
val appVersion = "1.0-SNAPSHOT"
val appDependencies = Seq(
"org.reactivemongo" %% "play2-reactivemongo" % "0.8"
)
val main = play.Project(appName, appVersion, appDependencie... | sandermak/scalabitz | project/Build.scala | Scala | mit | 441 |
/*
* Copyright 2016 Groupon, 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... | groupon/sparklint | src/main/scala/com/groupon/sparklint/common/SparkConfSparklintConfig.scala | Scala | apache-2.0 | 881 |
package com.harrys.hyppo.worker.actor.queue
import java.time.LocalDateTime
import java.util.UUID
import akka.testkit.{TestActorRef, TestProbe}
import com.harrys.hyppo.util.TimeUtils
import com.harrys.hyppo.worker.actor.amqp.{RabbitQueueStatusActor, SingleQueueDetails}
import com.harrys.hyppo.worker.actor.{RabbitMQTes... | harrystech/hyppo-worker | worker/src/test/scala/com/harrys/hyppo/worker/actor/queue/WorkerDelegatorActorTests.scala | Scala | mit | 4,156 |
package net.rrm.ehour.ui.manage.lock
import java.util.Locale
import org.joda.time.DateTime
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import org.scalatest.{Matchers, WordSpec}
@RunWith(classOf[JUnitRunner])
class LockAdminBackingBeanSpec extends WordSpec with Matchers {
"Lock Admin Back... | momogentoo/ehour | eHour-wicketweb/src/test/scala/net/rrm/ehour/ui/manage/lock/LockAdminBackingBeanSpec.scala | Scala | gpl-2.0 | 1,462 |
package io.getquill.norm
import io.getquill.ast.BinaryOperation
import io.getquill.ast.BooleanOperator
import io.getquill.ast.Filter
import io.getquill.ast.FlatMap
import io.getquill.ast.Map
import io.getquill.ast.Query
import io.getquill.ast.Union
import io.getquill.ast.UnionAll
object AdHocReduction {
def unappl... | mentegy/quill | quill-core/src/main/scala/io/getquill/norm/AdHocReduction.scala | Scala | apache-2.0 | 1,482 |
package com.github.dcapwell.netty.examples.block
trait BlockStore[Key] {
def apply(key: Key): Option[Array[Byte]]
def add(key: Key, value: Array[Byte]): Unit
}
| dcapwell/netty-examples | src/main/scala/com/github/dcapwell/netty/examples/block/BlockStore.scala | Scala | mit | 166 |
package a39
case class Item(name: String)
trait Number1
case class Number1Positive(tail: Number1, head: Item) extends Number1
case class Number1Zero(tail: () => Number2) extends Number1
trait Number2
case class Number2Positive(tail: Number2, head: Item) extends Number2
case class Number2Zero(tail: () => Nu... | djx314/ubw | a39-双头龙/src/main/scala/a39/Number1.scala | Scala | bsd-3-clause | 353 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | pronix/spark | sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilterSuite.scala | Scala | apache-2.0 | 14,436 |
/*
* 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 ... | dmlc/mxnet | scala-package/examples/src/main/scala/org/apache/mxnetexamples/imclassification/util/Trainer.scala | Scala | apache-2.0 | 5,144 |
object main extends App{
abstract class Expr
case class Var(name: String) extends Expr
case class Number(num: Double) extends Expr
case class UnOp(operator: String,
arg: Expr) extends Expr
case class BinOp(operator: String,
left: Expr,
right: Expr) exten... | arcyfelix/Courses | 18-10-18-Programming-in-Scala-by-Martin-Odersky-Lex-Spoon-and-Bill-Venners/42-RecursivePatternMatching/src/main.scala | Scala | apache-2.0 | 922 |
package org.improving.scalify
import Scalify._
import org.eclipse.jdt.core._
import org.eclipse.jdt.core.dom
import org.eclipse.jdt.core.compiler._
// the java model in eclipse is all the IJavaElement business
trait JavaModel
{
def getICU(cu: dom.CompilationUnit): ICU = cu.getJavaElement.asInstanceOf[ICU]
}
object J... | mbana/scalify | src/main/eclipse/JavaModel.scala | Scala | isc | 2,327 |
package org.personal.durdina.s3dr.io
/**
* Created by misko on 26/04/2016.
*/
case class S3File(val bucket: String, val key: String)
| durdina/s3-dist-reader | src/main/scala/org/personal/durdina/s3dr/io/S3File.scala | Scala | apache-2.0 | 138 |
/*
* 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 ... | techaddict/spark | sql/core/src/test/scala/org/apache/spark/sql/streaming/FileStreamSinkSuite.scala | Scala | apache-2.0 | 19,859 |
/**
* Copyright 2013 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 ... | jbripley/RxScala | examples/src/test/scala/examples/Olympics.scala | Scala | apache-2.0 | 5,486 |
package filters
import akka.stream.Materializer
import javax.inject._
import play.api.mvc._
import scala.concurrent.{ExecutionContext, Future}
import models.LoginSession
@Singleton
class LoginSessionFilter @Inject()(
implicit override val mat: Materializer,
exec: ExecutionContext
) extends Filter {
override def... | ruimo/blog | app/filters/LoginSessionFilter.scala | Scala | apache-2.0 | 810 |
/*
* Copyright 2015 Nicolas Rinaudo
*
* 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... | nrinaudo/tabulate | generic/shared/src/test/scala/kantan/csv/generic/DerivedRowCodecTests.scala | Scala | mit | 1,576 |
package akashic.storage.service
import akka.http.scaladsl.server.Route
trait Runnable {
def run: Route
}
| akiradeveloper/fss3 | src/main/scala/akashic/storage/service/Runnable.scala | Scala | apache-2.0 | 109 |
/*
* Copyright 2015 Michael Gnatz.
*
* 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... | micgn/timetracker | TimeTrackerWeb/src/main/scala/de/mg/tt/service/dao/TTMgmtDao.scala | Scala | apache-2.0 | 2,526 |
/*
* 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 ... | ueshin/apache-spark | sql/core/src/test/scala/org/apache/spark/sql/streaming/StateStoreMetricsTest.scala | Scala | apache-2.0 | 7,661 |
package com.pointr.util
import java.io.FileInputStream
import org.yaml.snakeyaml.Yaml
import com.pointr.tcp.util.Logger._
import com.pointr.tensorflow.{AnyMap, MapMap, StringMap}
class AppConfig(yamlPath: String, os: String) {
val yamlConf = YamlStruct(yamlPath)
val envmap = yamlConf.getMap("environments").apply... | OpenChaiSpark/OCspark | tf/src/main/scala/com/pointr/util/YamlStruct.scala | Scala | apache-2.0 | 2,789 |
/**
* @author Yuuto
*/
package yuuto.enhancedinventories.config.json
import yuuto.enhancedinventories.config.EIConfiguration
import java.io.File
import java.io.FilenameFilter
import com.google.gson.JsonObject
import com.google.gson.JsonParser
import yuuto.enhancedinventories.util.LogHelperEI
import java.io.FileReade... | Joccob/EnhancedInventories | src/main/scala/yuuto/enhancedinventories/config/json/JsonFrameFactory.scala | Scala | gpl-2.0 | 7,020 |
package org.fayalite.util.dsl
/**
* Created by aa on 7/2/2016.
*/
trait CollectLike {
implicit class SeqHelpSimpleMethod[T](s: Seq[T]) {
def allContainsNot(f: T => Boolean) = {
// s.forall()
}
}
}
| ryleg/fayalite | common/src/main/scala/org/fayalite/util/dsl/CollectLike.scala | Scala | mit | 220 |
class A {
def apply(xs: Int*) = 42
}
/* name clash between defined and inherited member:
class B extends A {
def apply(xs: Seq[Int]) = 27
}
*/
/* method apply overrides nothing.
*/
class C extends A {
override def apply(xs: Seq[Int]) = 17
}
// ok because different return type
class D extends A {
def apply... | scala/scala | test/files/neg/t7052b.scala | Scala | apache-2.0 | 344 |
/**
* 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... | chirino/activemq-apollo | apollo-amqp/src/test/scala/org/apache/activemq/apollo/amqp/test/AmqpConnectionTest.scala | Scala | apache-2.0 | 2,847 |
package com.xuanyuansen.algo.params
/**
* Created by wangshuai on 16/7/28.
*/
class GRULayerParam extends LayerParam {
}
| xuanyuansen/scalaLSTM | src/main/scala/com/xuanyuansen/algo/params/GRULayerParam.scala | Scala | apache-2.0 | 125 |
package com.ponkotuy.value
/**
*
* @author ponkotuy
* Date: 15/07/24.
*/
object ShipIds {
val Akebono = 15
val Mochizuki = 31
val Hibiki = 35
val Yudachi = 45
val Tenryu = 51
val Sendai = 54
val Naka = 56
val Chokai = 69
val Tone = 71
val Kirishima = 85
val Sazanami = 94
val Mikuma = 120
... | ponkotuy/MyFleetGirls | library/src/main/scala/com/ponkotuy/value/ShipIds.scala | Scala | mit | 1,381 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | ArvinDevel/onlineAggregationOnSparkV2 | core/src/main/scala/org/apache/spark/shuffle/ShuffleMemoryManager.scala | Scala | apache-2.0 | 8,511 |
package io.arabesque
import io.arabesque.conf.{Configuration, SparkConfiguration}
import org.apache.spark.{SparkConf, SparkContext}
import org.scalatest.{BeforeAndAfterAll, FunSuite}
class CubeGraphSuite extends FunSuite with BeforeAndAfterAll {
private val master = "local[2]"
private val appName = "arabesque-sp... | dccspeed/Arabesque | src/test/scala/CubeGraphSuite.scala | Scala | apache-2.0 | 2,503 |
/* Generated File */
package controllers.admin.store
import com.kyleu.projectile.controllers.{BaseController, ServiceAuthController}
import com.kyleu.projectile.models.module.Application
import com.kyleu.projectile.models.result.RelationCount
import com.kyleu.projectile.models.result.orderBy.OrderBy
import com.kyleu.p... | KyleU/boilerplay | app/controllers/admin/store/InventoryRowController.scala | Scala | cc0-1.0 | 10,492 |
package monocle.function
import monocle.MonocleSuite
import monocle.std._
import monocle.syntax._
class InitExample extends MonocleSuite {
test("init creates a Lens from a 2-6 tuple to its tail") {
((2, false) applyLens init get) shouldEqual 2
(('r', false, "lala", 5.6, 7, 4) applyLens... | malcolmgreaves/Monocle | example/src/test/scala/monocle/function/InitExample.scala | Scala | mit | 471 |
package api
import play.api.libs.json._
import model.ComputerSet
import model.FreeStyleBuild
import model.FreeStyleProject
import model.Hudson
import model.ListView
import model.Queue
@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2022-02-13T02... | cliffano/swaggy-jenkins | clients/scala-play-server/generated/app/api/RemoteAccessApi.scala | Scala | mit | 4,222 |
package com.wlangiewicz.workouttracker.services
import com.github.nscala_time.time.Imports._
import com.wlangiewicz.workouttracker.WorkoutTrackerSpec
import com.wlangiewicz.workouttracker.domain.{WorkoutId, SuccessfulRecordWorkoutResponse, RecordWorkoutRequest}
import org.scalatest.BeforeAndAfter
class WorkoutService... | wlk/workout-tracker-akka-http | src/test/scala/com/wlangiewicz/workouttracker/services/WorkoutServiceSpec.scala | Scala | mit | 1,233 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | pgandhi999/spark | sql/core/src/test/scala/org/apache/spark/sql/execution/SparkSqlParserSuite.scala | Scala | apache-2.0 | 14,866 |
package com.jayway.saaloop.dsl
import org.apache.hadoop.mapreduce.Reducer
/**
* Copyright 2012 Amir Moulavi (amir.moulavi@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the Licen... | amir343/saaloop | saaloop-core/src/main/scala/com/jayway/saaloop/dsl/SaaloopReducer.scala | Scala | apache-2.0 | 2,519 |
/*
* Copyright © 2014 TU Berlin (emma@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 by app... | aalexandrov/emma | emma-examples/emma-examples-library/src/main/scala/org/emmalanguage/examples/graphs/EnumerateTriangles.scala | Scala | apache-2.0 | 1,183 |
package uk.ac.cdrc.mintsearch.index
import uk.ac.cdrc.mintsearch.WeightedLabelSet
import scala.pickling._
import Defaults._
import json._
/**
* Describe the label structure
*/
trait LabelTypeContext {
type L
def labelEncode(label: L): String
def labelEncodeQuery(label: L): String
def JSONfy(wls: WeightedL... | spacelis/mint-search | neo4j-plugin/src/main/scala/uk/ac/cdrc/mintsearch/index/LabelTypeContext.scala | Scala | apache-2.0 | 918 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | andrewor14/iolap | core/src/main/scala/org/apache/spark/metrics/MetricsSystem.scala | Scala | apache-2.0 | 8,432 |
package net.kemuridama.kafcon.model
import org.joda.time.DateTime
case class BrokerMetricsLog(
clusterId: Int,
brokerId: Int,
messageInPerSec: MeterMetric = new MeterMetric,
bytesInPerSec: MeterMetric = new MeterMetric,
bytesOutPerSec: MeterMetric = new MeterMetric,
system: SystemMetrics = new SystemMetri... | kemuridama/kafcon | src/main/scala/net/kemuridama/kafcon/model/BrokerMetricsLog.scala | Scala | mit | 705 |
// package ohnosequences.mg7.tests
//
// import ohnosequences.mg7._
// import ohnosequences.ncbitaxonomy._, api.{ Taxa => TaxaOps, Taxon => _, _ }
// import ohnosequences.mg7.loquats.countDataProcessing._
// import ohnosequences.mg7.tests.taxonomy._
//
//
// case object countsCtx {
//
// val realCounts = Map[AnyNode,... | ohnosequences/mg7 | src/test/scala/mg7/counts.scala | Scala | agpl-3.0 | 1,621 |
/*
* Copyright 2001-2013 Artima, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | travisbrown/scalatest | src/test/scala/org/scalatest/DeprecatedTimesOnIntSpec.scala | Scala | apache-2.0 | 1,584 |
package wakfutcp.protocol.messages.server
import wakfutcp.protocol.{Codec, ServerMessage}
final case class CharacterEnterPartitionMessage(worldX: Int, worldY: Int)
extends ServerMessage {
override val id = 4125
}
object CharacterEnterPartitionMessage {
import Codec._
import cats.syntax.apply._
implicit ... | OpenWakfu/wakfutcp | protocol/src/main/scala/wakfutcp/protocol/messages/server/CharacterEnterPartitionMessage.scala | Scala | mit | 427 |
/**
* Angles
* Copyright (C) 2014 Sebastian Schelter
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Thi... | sscdotopen/angles | src/main/scala/io/ssc/angles/pipeline/http/TrustEverybodyStrategy.scala | Scala | gpl-3.0 | 983 |
/* __ *\\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\\___/_/... | cran/rkafkajars | java/scala/Function0.scala | Scala | apache-2.0 | 1,329 |
/*
* 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 | project/SparkBuild.scala | Scala | apache-2.0 | 24,970 |
package service
import org.junit.Test;
import org.junit.Assert.assertEquals
class HelloServiceIT
{
@Test
def test1() = assertEquals("Hello2", HelloService.hello2)
}
| scoverage/scoverage-maven-samples | integration-tests/src/test/scala/service/HelloServiceIT.scala | Scala | apache-2.0 | 176 |
/*
* Copyright 2014-2022 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... | Netflix/atlas | atlas-chart/src/main/scala/com/netflix/atlas/chart/graphics/Block.scala | Scala | apache-2.0 | 1,654 |
package net.sansa_stack.rdf.flink.qualityassessment.metrics
import net.sansa_stack.rdf.flink.io._
import org.apache.flink.api.scala.ExecutionEnvironment
import org.scalatest.FunSuite
class FlinkLicensingTests extends FunSuite {
import net.sansa_stack.rdf.flink.qualityassessment._
val env = ExecutionEnvironment.... | SANSA-Stack/SANSA-RDF | sansa-rdf/sansa-rdf-flink/src/test/scala/net/sansa_stack/rdf/flink/qualityassessment/metrics/FlinkLicensingTests.scala | Scala | apache-2.0 | 893 |
/*
* MUSIT is a museum database to archive natural and cultural history data.
* Copyright (C) 2016 MUSIT Norway, part of www.uio.no (University of Oslo)
*
* 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 ... | kpmeen/musit | musit-service/src/test/scala/no/uio/musit/healthcheck/StopWatchSpec.scala | Scala | gpl-2.0 | 1,500 |
package org.joda.time
import org.joda.time.format.DateTimeFormatter
import web.moment._
class DateTime(datetime:Moment) {
def this(l: Long) = this(moment.moment.apply(l))
def this(year: Int, month: Int, day: Int, hour: Int = 0, minutes: Int = 0, seconds: Int = 0, milliseconds: Int = 0) = {
this(moment.moment... | easel/play-json-extra | scalajs-joda-time/src/main/scala/org/joda/time/DateTime.scala | Scala | apache-2.0 | 1,724 |
/*
* 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/controllers/auth/ExternalUrls.scala | Scala | apache-2.0 | 1,483 |
package java.util.concurrent.locks
import java.util.concurrent.TimeUnit
class ReentrantLock {
def lock() = ()
def unlock() = ()
def tryLock(timeout: Long, unit: TimeUnit): Boolean = true
}
| jmnarloch/akka.js | akka-js-actor/js/src/main/scala/java/util/concurrent/locks/ReentrantLock.scala | Scala | bsd-3-clause | 197 |
package org.jetbrains.plugins.scala.annotator
import com.intellij.psi.PsiFileFactory
import org.intellij.lang.annotations.Language
import org.jetbrains.plugins.scala.ScalaFileType
import org.jetbrains.plugins.scala.base.ScalaLightPlatformCodeInsightTestCaseAdapter
import org.jetbrains.plugins.scala.lang.psi.api.ScalaF... | JetBrains/intellij-scala-historical | test/org/jetbrains/plugins/scala/annotator/SingleAbstractMethodTest.scala | Scala | apache-2.0 | 15,837 |
/* Copyright (C) 2008-2014 University of Massachusetts Amherst.
This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible)
http://factorie.cs.umass.edu, http://github.com/factorie
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with... | patverga/factorie | src/main/scala/cc/factorie/app/nlp/hcoref/package.scala | Scala | apache-2.0 | 1,969 |
package ch.epfl.yinyang
package api
import language.experimental.macros
import scala.reflect.macros.blackbox.Context
/**
* Member method-based virtualization of the `AnyRef` API.
*
* This trait provides implementations of the infix methods
* corresponding to the `AnyRef` API that delegate to virtualized
* method... | vjovanov/scala-yinyang | components/yin-yang/src/api/VirtualAnyRef.scala | Scala | bsd-3-clause | 3,527 |
/*
* Copyright 2014–2017 SlamData 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... | drostron/quasar | yggdrasil/src/main/scala/quasar/yggdrasil/bytecode/Instructions.scala | Scala | apache-2.0 | 7,171 |
package com.github.btmorr
package tutorials.spark.stream
/* This version of the app makes repeated requests to the API on a timer and processes the result as a stream.
*/
object NewsStream extends App {
import tutorials.spark.step0.ApiOps._
import tutorials.spark.step0.SparkInit
import tutorials.spark.step1.Sch... | btmorr/scala-boost | src/main/scala/tutorials/spark/stream/NewsStream.scala | Scala | mit | 1,718 |
package be.cmpg.walk
import org.junit.runner.RunWith
import org.specs2.mutable.Specification
import be.cmpg.graph.Gene
import be.cmpg.graph.Interaction
import org.specs2.runner.JUnitRunner
@RunWith(classOf[JUnitRunner])
class PathSpecification extends Specification {
"A Path" should {
"represent a randomwalk s... | spulido99/SSA | src/test/scala/be/cmpg/walk/PathSpecification.scala | Scala | gpl-2.0 | 2,515 |
package object hatedabot{
type BLOG_URL = String
}
| xuwei-k/hatedabot | src/main/scala/package.scala | Scala | mit | 58 |
package colang.ast.parsed.expression
import colang.ast.parsed.{Function, LocalContext, Scope, Type}
import colang.ast.raw.{expression => raw}
import colang.issues.{Issue, Issues, Terms}
/**
* Represents a function call.
* @param function called function
* @param arguments function arguments
*/
case class Func... | psenchanka/colang | src/main/scala/colang/ast/parsed/expression/FunctionCall.scala | Scala | mit | 4,191 |
/*
* @author Philip Stutz
* @author Mihaela Verman
*
* Copyright 2015 University of Zurich
*
* 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... | elaverman/cuilt | src/main/scala/com/signalcollect/dcop/algorithms/AlgorithmsGenerator.scala | Scala | apache-2.0 | 9,435 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | aokolnychyi/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/objects.scala | Scala | apache-2.0 | 18,323 |
/***********************************************************************
* Copyright (c) 2013-2022 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... | locationtech/geomesa | geomesa-kafka/geomesa-kafka-datastore/src/main/scala/org/locationtech/geomesa/kafka/index/KafkaListeners.scala | Scala | apache-2.0 | 2,506 |
/**
* Copyright 2016 The TensorFlow 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... | tensorflow/ecosystem | spark/spark-tensorflow-connector/src/main/scala/org/tensorflow/spark/datasources/tfrecords/DefaultSource.scala | Scala | apache-2.0 | 7,799 |
package gitbucket.core.controller
import gitbucket.core.issues.milestones.html
import gitbucket.core.service.{RepositoryService, MilestonesService, AccountService}
import gitbucket.core.util.{ReferrerAuthenticator, WritableUsersAuthenticator}
import gitbucket.core.util.Implicits._
import io.github.gitbucket.scalatra.f... | nobusugi246/gitbucket | src/main/scala/gitbucket/core/controller/MilestonesController.scala | Scala | apache-2.0 | 3,782 |
/*
JPA Scala Support for Play Framework 2
Copyright (C) 2014 Radim Kolar
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 op... | hsn10/playjpa | src/main/scala/jpa/package.scala | Scala | agpl-3.0 | 951 |
/*
* Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com>
*/
package play.api.test
import java.util.concurrent.TimeUnit
import akka.stream.Materializer
import akka.util.ByteString
import play.api.inject.guice.GuiceApplicationBuilder
import play.api.libs.json.Json
import play.api.mvc.Results._
import ... | Shenker93/playframework | framework/src/play-specs2/src/test/scala/play/api/test/FakesSpec.scala | Scala | apache-2.0 | 2,929 |
/*
* Copyright (C) 2015 Noorq, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | mailrest/mailrest | app/modules/DalModule.scala | Scala | apache-2.0 | 2,505 |
/*
* 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 ... | manishgupta88/carbondata | integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonShowLoadsCommand.scala | Scala | apache-2.0 | 3,429 |
/*
* Copyright 2014 Frugal Mechanic (http://frugalmechanic.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required... | Gesto/fm-sbt-s3-resolver | src/main/scala/fm/sbt/S3ResolverPlugin.scala | Scala | apache-2.0 | 3,568 |
package com.twitter.finagle.http
import org.specs.SpecificationWithJUnit
import org.jboss.netty.handler.codec.http.DefaultCookie
class CookieSetSpec extends SpecificationWithJUnit {
"CookieSet" should {
"no cookies" in {
val request = Request()
request.cookies must beEmpty
}
"request cook... | joshbedo/finagle | finagle-http/src/test/scala/com/twitter/finagle/http/CookieSetSpec.scala | Scala | apache-2.0 | 2,685 |
package net.randallalexander.restaurant.chooser.model
import io.circe.HCursor
object Validation {
def state(hCursor: HCursor): Boolean = {
hCursor.downField("state").focus.flatMap(_.asString) match {
case Some(value) => (value.size == 2) //Good enough for now
case _ => false
}
}
def zip(hCu... | randallalexander/restaurant-chooser | service/src/main/scala/net/randallalexander/restaurant/chooser/model/Validation.scala | Scala | mit | 1,029 |
/* sbt -- Simple Build Tool
* Copyright 2008 Mark Harrah */
package sbt.internal.util
import org.scalacheck._
import Prop._
import scala.collection.mutable.HashSet
object DagSpecification extends Properties("Dag") {
property("No repeated nodes") = forAll { (dag: TestDag) => isSet(dag.topologicalSort) }
propert... | Duhemm/util | internal/util-collection/src/test/scala/DagSpecification.scala | Scala | bsd-3-clause | 1,763 |
package org.bitcoins.core.protocol.script
import org.bitcoins.core.protocol.CompactSizeUInt
import org.bitcoins.core.script.constant._
import org.bitcoins.core.util.BytesUtil
import org.bitcoins.crypto.{CryptoUtil, Sha256Digest, Sha256Hash160Digest}
import scala.util.{Failure, Success, Try}
/** Created by chris on 1... | bitcoin-s/bitcoin-s | core/src/main/scala/org/bitcoins/core/protocol/script/WitnessVersion.scala | Scala | mit | 4,694 |
package scala.tools.nsc
package transform.patmat
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
import scala.tools.asm.Opcodes._
import scala.tools.nsc.backend.jvm.AsmUtils._
import scala.tools.testkit.ASMConverters.Instruction
import scala.tools.testkit.BytecodeTesting
import s... | scala/scala | test/junit/scala/tools/nsc/transform/patmat/PatmatBytecodeTest.scala | Scala | apache-2.0 | 6,815 |
package io.github.tpartyka.testapp
import com.typesafe.config.ConfigFactory
import net.ceedubs.ficus.Ficus
import net.ceedubs.ficus.readers.ArbitraryTypeReader
trait Config {
import ArbitraryTypeReader._
import Ficus._
protected case class HttpConfig(interface: String, port: Int)
private val config ... | tpartyka/test-app | src/main/scala/io/github/tpartyka/testapp/Config.scala | Scala | mit | 426 |
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
*/
package com.lightbend.lagom.internal.scaladsl.broker.kafka
import akka.util.ByteString
import com.lightbend.lagom.scaladsl.api.deser.MessageSerializer.NegotiatedDeserializer
import com.lightbend.lagom.scaladsl.api.deser.MessageSerializer.NegotiatedSer... | lagom/lagom | service/scaladsl/kafka/client/src/main/scala/com/lightbend/lagom/internal/scaladsl/broker/kafka/KafkaSerializers.scala | Scala | apache-2.0 | 1,574 |
package com.banno.salat.avro
import test.models._
import scala.collection.immutable.{Map => IMap}
import scala.collection.mutable.{Map => MMap}
package object test {
def ed() = Edward(a = "hello", b = 1, c = 1.1, aa = Some("there"), bb = Some(2), cc = Some(2.2))
def graph() = Alice("x", Some("y"),
... | Banno/salat-avro | src/test/scala/test.scala | Scala | apache-2.0 | 520 |
package jsky.app.ot.gemini.editor.targetComponent
import edu.gemini.spModel.obs.context.ObsContext
import jsky.app.ot.ags.AgsContext
import scala.swing._
class GuidingControls extends GridBagPanel {
opaque = false
private object guiderLabel extends Label {
text = "Auto Guide Search:"
hor... | spakzad/ocs | bundle/jsky.app.ot/src/main/scala/jsky/app/ot/gemini/editor/targetComponent/GuidingControls.scala | Scala | bsd-3-clause | 1,158 |
package core.formatter.marketplace.order
import com.fasterxml.jackson.core.JsonGenerator
import com.fasterxml.jackson.databind.{ JsonSerializer, SerializerProvider }
import com.lvxingpai.model.marketplace.order.OrderActivity
import core.misc.Utils
import scala.collection.JavaConversions._
/**
* Created by pengyt on ... | Lvxingpai/Hanse | app/core/formatter/marketplace/order/OrderActivitySerializer.scala | Scala | apache-2.0 | 1,414 |
package sbtazurepack.settings
trait CsPackageSettings {
override val toString = "not defined"
}
| kostrse/sbt-azurepack | src/main/scala/sbtazurepack/settings/CsPackageSettings.scala | Scala | mit | 100 |
/*
* Copyright 2016 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... | ahudspith-equalexperts/ct-calculations | src/main/scala/uk/gov/hmrc/ct/computations/calculations/TradingLossesThisAndLaterPeriodCalculation.scala | Scala | apache-2.0 | 869 |
/*
* 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 ... | ueshin/apache-spark | sql/core/src/test/scala/org/apache/spark/sql/QueryTest.scala | Scala | apache-2.0 | 15,424 |
/*
* Copyright (c) 2015 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.apache.org... | janeefting/snowplow | 4-storage/kinesis-lzo-s3-sink/src/main/scala/com.snowplowanalytics.snowplow.storage.kinesis/s3/SinkApp.scala | Scala | apache-2.0 | 5,262 |
package com.edinhodzic.service.controller
import java.net.URI
import javax.ws.rs._
import javax.ws.rs.core.MediaType._
import javax.ws.rs.core.Response
import javax.ws.rs.core.Response.Status.{NOT_FOUND, NO_CONTENT}
import com.edinhodzic.service.domain.Identifiable
import com.edinhodzic.service.repository.AbstractPar... | edinhodzic/jersey-rest-service | src/main/scala/com/edinhodzic/service/controller/AbstractPartialRestController.scala | Scala | apache-2.0 | 2,247 |
package pio.refactor
import io.prediction.controller.IEngineFactory
import io.prediction.controller.Engine
import io.prediction.controller._
//import io.prediction.workflow.CoreWorkflow
import grizzled.slf4j.Logger
case class Query(q: Int) extends Serializable
case class PredictedResult(p: Int) extends Serializable
... | ch33hau/PredictionIO | examples/experimental/scala-refactor-test/src/main/scala/Engine.scala | Scala | apache-2.0 | 1,162 |
package net.mentalarray.doozie.Tasks
/**
* Created by kdivincenzo on 1/5/2015.
*/
abstract class AbstractCollectionTask(name: String) extends WorkflowTask(name) with Traversable[WorkflowTask] {
private var _tasks: TasksSequence = new TasksSequence
private var _continueOnError: Boolean = false
def addTask(tas... | antagonist112358/tomahawk | workflow-engine/src/net/mentalarray/doozie/Tasks/AbstractCollectionTask.scala | Scala | apache-2.0 | 705 |
import language.experimental.macros
import scala.reflect.macros.blackbox.Context
object Macro {
def apply(a: Any): Any = macro impl
def impl(c: Context)(a: c.Tree): c.Tree = {
import c.universe._
q"{$a; true}"
}
}
| AlexSikia/dotty | tests/pending/pos/t8064b/Macro_1.scala | Scala | bsd-3-clause | 230 |
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.