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 org.scaladebugger.api.profiles.traits.info
import org.scaladebugger.api.virtualmachines.ScalaVirtualMachine
/**
* Represents the interface that needs to be implemented to provide
* miscellaneous info functionality for a specific debug profile.
*/
trait MiscInfo {
/**
* Retrieves the Scala virtual mach... | chipsenkbeil/scala-debugger | scala-debugger-api/src/main/scala/org/scaladebugger/api/profiles/traits/info/MiscInfo.scala | Scala | apache-2.0 | 1,506 |
/*
* Copyright (c) 2011-2012, Alex McGuire, Louis Botterill
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, th... | syl20bnr/maker | maker/src/maker/task/tasks/PublishLocalTask.scala | Scala | bsd-2-clause | 2,680 |
/*
* 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 ... | michalsenkyr/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/types/MapType.scala | Scala | apache-2.0 | 3,626 |
package info.glennengstrand.news
import java.util.Date
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import info.glennengstrand.io._
/** helper functions for inbound object creation */
object Inbound {
val log = LoggerFactory.getLogger("info.glennengstrand.news.Inbound")
val reader: PersistentDataStor... | gengstrand/clojure-news-feed | server/feed2/src/main/scala/info/glennengstrand/news/Inbound.scala | Scala | epl-1.0 | 3,828 |
/*
* 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/amls-frontend | app/services/cache/MongoCacheClient.scala | Scala | apache-2.0 | 10,720 |
package info.armado.ausleihe.client.remote.services
import java.time.Year
import info.armado.ausleihe.client.transport.dataobjects.entities._
import info.armado.ausleihe.client.transport.dataobjects.inuse._
import info.armado.ausleihe.client.transport.requests.IssueIdentityCardRequestDTO
import info.armado.ausleihe.cl... | Spielekreis-Darmstadt/lending | lending-client-backend/src/test/scala/info/armado/ausleihe/client/remote/services/IssueIdentityCardsServiceTest.scala | Scala | apache-2.0 | 7,092 |
/*
* 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 | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/planning/QueryPlanner.scala | Scala | apache-2.0 | 2,752 |
/*
* Copyright 2016 rdbc contributors
*
* 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... | rdbc-io/rdbc-pgsql | rdbc-pgsql-core/src/main/scala/io/rdbc/pgsql/core/internal/typecodec/sco/ScodecPgVarcharCodec.scala | Scala | apache-2.0 | 809 |
package org.ddecap.snv
import org.bdgenomics.adam.rdd.ADAMContext
import org.bdgenomics.adam.rdd.ADAMContext._
import org.bdgenomics.adam.models.VariantContext
import org.bdgenomics.adam.models.ReferenceRegion
import org.bdgenomics.adam.rdd.ShuffleRegionJoin
import org.bdgenomics.formats.avro._
import org.apache.spark... | ddcap/rna-wxs-analysis | src/main/scala/org/ddecap/snv/analysis.scala | Scala | gpl-3.0 | 22,040 |
/*
* 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 ... | hwstreaming/flink | flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/dataset/DataSetCorrelate.scala | Scala | apache-2.0 | 4,189 |
/*
* Copyright 2016 Coursera 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... | vkuo-coursera/naptime | naptime/src/test/scala/org/coursera/naptime/router2/CourierQueryParsersTest.scala | Scala | apache-2.0 | 5,836 |
package io.getquill.context.cassandra.zio
import io.getquill.context.cassandra.QueryResultTypeCassandraSpec
class QueryResultTypeCassandraZioSpec extends ZioCassandraSpec with QueryResultTypeCassandraSpec {
val context = testZioDB
import context._
override def beforeAll = {
super.beforeAll()
result(c... | getquill/quill | quill-cassandra-zio/src/test/scala/io/getquill/context/cassandra/zio/QueryResultTypeCassandraZioSpec.scala | Scala | apache-2.0 | 775 |
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3
package com.google.protobuf.`type`
import _root_.scalapb.internal.compat.JavaConverters._
/** Enum value definition.
*
* @param name
* Enum value name.
* @param number
* Enum value number.
... | scalapb/ScalaPB | scalapb-runtime/src/main/scalajvm/com/google/protobuf/type/EnumValue.scala | Scala | apache-2.0 | 9,777 |
package pl.touk.nussknacker.engine.api
import java.util.UUID
import scala.util.Random
object Context {
// prefix is to distinguish between externally provided and internal (initially created) id
private val initialContextIdPrefix = "initial-"
/**
* For performance reasons, is used unsecure random - see UU... | TouK/nussknacker | components-api/src/main/scala/pl/touk/nussknacker/engine/api/Context.scala | Scala | apache-2.0 | 2,633 |
/*
* Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com>
*/
package com.lightbend.lagom.sbt
import com.lightbend.lagom.core.LagomVersion
import sbt.Keys._
import sbt._
object LagomImport extends LagomImportCompat {
private val moduleOrganization = "com.lightbend.lagom"
def component(id: String)... | rcavalcanti/lagom | dev/sbt-plugin/src/main/scala/com/lightbend/lagom/sbt/LagomImport.scala | Scala | apache-2.0 | 4,191 |
package com.github.utaal.m68k
import com.github.utaal.m68k.ast._
object RegisterState {
def apply(): RegisterState = RegisterState()
}
case class RegisterState(value: Long) {
require (value >= 0L && value <= 0xffffffffL)
def getMask(size: Size): Long = size match {
case Size.B => 0xffL
case Size.W => 0... | utaal/m68k-interpreter | src/main/scala/CPUState.scala | Scala | mit | 2,610 |
/*
* Licensed to STRATIO (C) under one or more contributor license agreements.
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership. The STRATIO (C) licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file... | pfcoperez/crossdata | crossdata-server/src/main/scala/com/stratio/crossdata/server/actors/CoordinatorActor.scala | Scala | apache-2.0 | 39,954 |
package sharry.common
import java.util.concurrent.ForkJoinPool
import java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory
import java.util.concurrent.ForkJoinWorkerThread
import java.util.concurrent.atomic.AtomicLong
import java.util.concurrent.{Executors, ThreadFactory}
import scala.concurrent._
import ca... | eikek/sharry | modules/common/src/main/scala/sharry/common/ThreadFactories.scala | Scala | gpl-3.0 | 2,140 |
/**
* 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... | maslovalex/scalate | scalate-jaxrs/src/main/scala/org/fusesource/scalate/rest/ScalateTemplateProvider.scala | Scala | apache-2.0 | 4,697 |
package net.sansa_stack.query.spark.graph.jena.expression
import net.sansa_stack.query.spark.graph.jena.util.Result
import org.apache.jena.graph.Node
class Lang(expr: Expression) extends FunctionOne(expr) {
private val tag = "Lang"
override def getValue(result: Map[Node, Node]): Node = {
// compiler here
... | SANSA-Stack/SANSA-RDF | sansa-query/sansa-query-spark/src/main/scala/net/sansa_stack/query/spark/graph/jena/expression/Lang.scala | Scala | apache-2.0 | 715 |
package org.broadinstitute.clio.util.model
import scala.util.Random
/**
* A unique identifier for each operation that modifies the database.
*/
final class UpsertId private (val id: String) extends AnyVal {
/**
* The filename used for persisting a document's upsert data.
*
* @return the filename wh... | broadinstitute/clio | clio-util/src/main/scala/org/broadinstitute/clio/util/model/UpsertId.scala | Scala | bsd-3-clause | 3,894 |
/**
* BasePlate API
* An API for BasePlate to connect with Loanapp.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
* Licensed u... | garywong89/PetStoreAPI | scalatra/src/main/scala/JettyMain.scala | Scala | apache-2.0 | 2,257 |
/**
* Copyright (c) 2014-2016 Tim Bruijnzeels
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* - Redistributions of source code must retain the above copyright notice,
* this list of... | timbru/rpki-ca | src/main/scala/nl/bruijnzeels/tim/rpki/common/cqrs/EventStore.scala | Scala | bsd-3-clause | 2,816 |
/*
* 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 ... | yanboliang/spark | sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveExternalCatalog.scala | Scala | apache-2.0 | 61,366 |
import scala.language.implicitConversions
trait Fooable[T]
object Fooable {
implicit def conjure[T]: Fooable[T] = {
println("conjure")
new Fooable[T]{}
}
}
object Test {
implicit def traversable[T, Coll[_] <: Iterable[_]](implicit
elem: Fooable[T]): Fooable[Coll[T]] = {
println("traversable")
... | scala/scala | test/files/run/t7291.scala | Scala | apache-2.0 | 430 |
package mesosphere.marathon
package core.base
/**
* Simple value container which is used to help things know if Marathon is on it's way down
*/
trait LifecycleState {
def isRunning: Boolean
}
object LifecycleState {
object WatchingJVM extends LifecycleState {
private[this] var running = true
/* Note ... | guenter/marathon | src/main/scala/mesosphere/marathon/core/base/LifecycleState.scala | Scala | apache-2.0 | 670 |
package mypipe.kafka
import mypipe.api.event.Mutation
import scala.reflect.runtime.universe._
import org.slf4j.LoggerFactory
import mypipe.avro.schema.GenericSchemaRepository
import org.apache.avro.Schema
import org.apache.avro.specific.SpecificRecord
import mypipe.avro.AvroVersionedRecordDeserializer
abstract class... | Asana/mypipe | mypipe-kafka/src/main/scala/mypipe/kafka/KafkaMutationAvroConsumer.scala | Scala | apache-2.0 | 3,103 |
import org.scalatest._
import java.util.Date
class Test1 extends FlatSpec {
it should "work" in {
val start = Counter.add(13)
println(s"Starting test 1 ($start)...")
Thread.sleep(2000L)
val end = Counter.get
println(s"Test 1 done ($end)")
assert(end == start, s"Expected Counter to stay at $start, but ... | pdalpra/sbt | sbt/src/sbt-test/tests/serial/sub1/src/test/scala/Test1.scala | Scala | bsd-3-clause | 346 |
package fpinscala.answers.streamingio
/*
* `Eq[A,B]` provides evidence that types `A` and `B` are equal.
* There is just one public constructor, `Eq.refl`, ensuring that
* we cannot construct an `Eq` instance in which the `A` and `B`
* differ.
*
* There is a version of this in the scala standard library,
* ... | fpinscala/fpinscala | src/main/scala/fpinscala/answers/streamingio/Eq.scala | Scala | mit | 565 |
package com.stackstate.actor
import akka.actor.{ActorRef, ActorSystem, Props}
import com.stackstate.event._
import com.stackstate.graph.Node
import com.typesafe.config.ConfigFactory
class NodeActorTest extends ActorTestBase(ActorSystem("test-tasker", ConfigFactory.load("application.conf"))) {
private val node: Nod... | sameerarora/dependency-graph | src/test/scala/com/stackstate/actor/NodeActorTest.scala | Scala | apache-2.0 | 1,425 |
package avrohugger
package input
package parsers
import reflectivecompilation._
import reflectivecompilation.schemagen._
import org.apache.avro.Protocol
import org.apache.avro.Schema
import org.apache.avro.Schema.Parser
import org.apache.avro.SchemaParseException
import org.apache.avro.compiler.idl.Idl
import org.apa... | ppearcy/avrohugger | avrohugger-core/src/main/scala/input/parsers/StringInputParser.scala | Scala | apache-2.0 | 2,378 |
package unfiltered.request
import org.specs._
object BasicAuthSpecJetty extends unfiltered.spec.jetty.Served with BasicAuthSpec {
def setup = { _.filter(unfiltered.filter.Planify(intent)) }
}
object BasicAuthSpecNetty extends unfiltered.spec.netty.Served with BasicAuthSpec {
def setup = { p =>
unfiltered.net... | softprops/Unfiltered | library/src/test/scala/BasicAuthSpec.scala | Scala | mit | 1,139 |
/*
* Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com>
*/
package play.core.utils
import util.control.Exception._
import org.specs2.mutable.Specification
import play.utils.Threads
class ThreadsSpec extends Specification {
"Threads" should {
"restore the correct class loader" in {
"if t... | Shenker93/playframework | framework/src/play/src/test/scala/play/core/utils/ThreadsSpec.scala | Scala | apache-2.0 | 1,218 |
/*
Copyright (c) 2017, Qvantel
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following di... | qvantel/jsonapi-scala | core/src/main/scala/com/qvantel/jsonapi/JsonApiResourceMacro.scala | Scala | bsd-3-clause | 6,768 |
package scodec.protocols
package ip
package v6
import scodec._
import scodec.bits._
import scodec.codecs._
import scodec.codecs.literals._
import scodec.stream._
/** Simple version of an IPv6 header. Does not support extension headers. */
case class SimpleHeader(
trafficClass: Int,
flowLabel: Int,
payloadLength... | scodec/scodec-protocols | src/main/scala/scodec/protocols/ip/v6/SimpleHeader.scala | Scala | bsd-3-clause | 1,040 |
package net.fwbrasil.radon.transaction
import scala.collection.JavaConversions.collectionAsScalaIterable
import scala.collection.mutable.ListBuffer
import scala.concurrent.Await
import scala.concurrent.ExecutionContext
import scala.concurrent.Future
import scala.concurrent.duration.Duration
import scala.util.Failure
... | fwbrasil/radon-stm | src/main/scala/net/fwbrasil/radon/transaction/Transaction.scala | Scala | lgpl-2.1 | 8,697 |
import com.weez.mercury.common._
import com.weez.mercury.product._
import com.github.nscala_time.time.Imports._ | weeztech/weez-mercury | main/src/main/scala/com/weez/mercury/stock/Stocks.scala | Scala | apache-2.0 | 111 |
package ch.bsisa.hyperbird.dao.xqs
import ch.bsisa.hyperbird.dao.{Queries,DbConfig}
import play.api.Logger
import ch.bsisa.hyperbird.CollectionsConfig
/**
* Implements Queries trait accessing database using XQS/XQJ drivers.
*
* @author Patrick Refondini
*/
object XQSQueries extends Queries {
/**
* Implemen... | bsisa/hb-api | app/ch/bsisa/hyperbird/dao/xqs/XQSQueries.scala | Scala | gpl-2.0 | 2,122 |
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2014 Adobe Systems Incorporated. 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 ... | alexanderfield/spindle | src/main/scala/queries/TopReferringDomains.scala | Scala | apache-2.0 | 2,204 |
/*
* Copyright (c) 2014 Contributor. All rights reserved.
*/
package org.scalaide.debug.internal.expression.proxies.primitives.operations.bitwise
import org.junit.Test
import org.scalaide.debug.internal.expression.Names.Java
import org.scalaide.debug.internal.expression.BaseIntegrationTest
import org.scalaide.debug.... | Kwestor/scala-ide | org.scala-ide.sdt.debug.expression.tests/src/org/scalaide/debug/internal/expression/proxies/primitives/operations/bitwise/BitwiseOrTest.scala | Scala | bsd-3-clause | 3,708 |
/*
Copyright 2012 Twitter, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distr... | MansurAshraf/scalding | scalding-repl/src/test/scala/com/twitter/scalding/ReplTest.scala | Scala | apache-2.0 | 5,794 |
package com.blogspot.ramannanda.scala.algorithms.cp3.adhoc.anagrams
import scala.collection.mutable
import scala.collection.mutable.ListBuffer
import scala.io.StdIn
//uva 00454
object FindAnagrams {
def anagramPairs(words: Seq[String]): Unit = {
val anaMap = mutable.LinkedHashMap[String, Seq[String]]()
for... | ramannanda9/algorithms-in-scala | src/main/scala/com/blogspot/ramannanda/scala/algorithms/cp3/adhoc/anagrams/FindAnagrams.scala | Scala | gpl-3.0 | 1,096 |
/*
* 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 ... | ueshin/apache-flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/nodes/datastream/DataStreamOverAggregate.scala | Scala | apache-2.0 | 12,203 |
/*
* 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 ... | Intel-bigdata/OAP | oap-shuffle/remote-shuffle/src/main/scala/org/apache/spark/shuffle/remote/RemoteShuffleReader.scala | Scala | apache-2.0 | 7,050 |
package models
import play.api.db.slick.Config.driver.simple._
case class TSVFileSampleLink(id: Option[Int], tsvFileId: Int, sampleId: Int, created: java.sql.Timestamp)
class TSVFileSampleLinkTable(tag: Tag) extends Table[TSVFileSampleLink](tag, "tsv_file_sample_link") {
val tsvFiles = TableQuery[TSVFileTable]
... | seqprodbio/restoule | app/models/TSVFileSampleLink.scala | Scala | gpl-3.0 | 844 |
/*
* 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 | scalatest/src/main/scala/org/scalatest/matchers/dsl/StartWithWord.scala | Scala | apache-2.0 | 3,368 |
package sttp.client3.httpclient.fs2
import cats.effect.IO
import cats.implicits._
import fs2.Pipe
import sttp.capabilities.fs2.Fs2Streams
import sttp.client3.impl.fs2.Fs2WebSockets
import sttp.client3.testing.websocket.{WebSocketConcurrentTest, WebSocketStreamingTest, WebSocketTest}
import sttp.ws.WebSocketFrame
clas... | softwaremill/sttp | httpclient-backend/fs2/src/test/scala/sttp/client3/httpclient/fs2/HttpClientFs2WebSocketTest.scala | Scala | apache-2.0 | 1,240 |
/*
* 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 ... | gioenn/xSpark | mllib/src/test/scala/org/apache/spark/mllib/classification/NaiveBayesSuite.scala | Scala | apache-2.0 | 13,858 |
/*
* 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 | frontend/src/main/scala/quasar/std/std.scala | Scala | apache-2.0 | 916 |
package edu.rice.habanero.benchmarks.concsll
import edu.rice.habanero.actors.{ScalazActor, ScalazActorState, ScalazPool}
import edu.rice.habanero.benchmarks.concsll.SortedListConfig.{DoWorkMessage, EndWorkMessage}
import edu.rice.habanero.benchmarks.{Benchmark, BenchmarkRunner, PseudoRandom}
/**
*
* @author <a href... | shamsmahmood/savina | src/main/scala/edu/rice/habanero/benchmarks/concsll/SortedListScalazActorBenchmark.scala | Scala | gpl-2.0 | 4,369 |
package rewriting.rules
import ir._
import ir.ast._
import lift.arithmetic.SizeVar
import opencl.executor.{Execute, TestWithExecutor}
import opencl.ir._
import org.junit.Assert._
import org.junit.Test
import rewriting.{Lower, Rewrite}
import scala.util.Random
object TestRemoveDuplicateZipArg extends TestWithExecutor... | lift-project/lift | src/test/rewriting/rules/TestRemoveDuplicateZipArg.scala | Scala | mit | 3,771 |
/*
* 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 | core/src/main/scala/org/apache/spark/api/java/JavaNewHadoopRDD.scala | Scala | apache-2.0 | 1,819 |
package games.utils
import games.Quoridor
import scala.collection.mutable.ArrayBuffer
import algorithms._
import scala.math._
import java.util.Random
object QuoridorUtils {
/**
* Get children nodes for a new node
*/
def getchildNodes(board:Quoridor, player:Int): ArrayBuffer[(String, Int, Int)] = {
getSimulat... | minhprg/mcts_in_quoridor | src/main/scala/games/utils/QuoridorUtils.scala | Scala | gpl-2.0 | 8,626 |
package de.hska.wifl1011.seminararbeit
import scala.concurrent.{ future, Future }
import scala.concurrent.ExecutionContext.Implicits.global
import scala.util.{ Failure, Success }
import scala.util.Random
object Main {
def main(args: Array[String]) {
val rateDollar: Future[Double] =
Helper.getExchangeRa... | fwilhe/hska-seminararbeit | code/holiday/Main.scala | Scala | mit | 1,257 |
package basic._03.stmt_for
import org.junit.Test
import org.junit.Assert._
import org.hamcrest.core.Is._
import scala.collection.JavaConversions._
/**
* Scalaの for文は、以下の処理機構を持っている。
* - フィルタ処理
* - 変換処理 (変数への束縛)
* - リスト変換
*/
class For_Test_S {
/**
* [Javaとの対比]
* for文 (index指定)
*
... | koooyooo/scala-java-comparison | scala-java-comparison/src/basic/_03/stmt_for/For_Test_S.scala | Scala | apache-2.0 | 5,001 |
package sbt
package std
import language.experimental.macros
import scala.reflect._
import reflect.macros._
import reflect.internal.annotations.compileTimeOnly
import Def.{ Initialize, ScopedKey }
import appmacro.ContextUtil
import complete.Parser
/** Implementation detail. The wrap methods temporarily hold inputs (... | pdalpra/sbt | main/settings/src/main/scala/sbt/std/InputWrapper.scala | Scala | bsd-3-clause | 11,752 |
package org.scaladebugger.api.profiles.swappable.requests.threads
import org.scaladebugger.api.lowlevel.JDIArgument
import org.scaladebugger.api.lowlevel.threads.ThreadStartRequestInfo
import org.scaladebugger.api.pipelines.Pipeline.IdentityPipeline
import org.scaladebugger.api.profiles.swappable.SwappableDebugProfile... | chipsenkbeil/scala-debugger | scala-debugger-api/src/main/scala/org/scaladebugger/api/profiles/swappable/requests/threads/SwappableThreadStartRequest.scala | Scala | apache-2.0 | 1,541 |
import sbt._
object Library {
// Versions
val akkaVersion = "2.2.1"
val sprayVersion = "1.2-20131004"
// Libraries
// Akka related
val akkaActor = "com.typesafe.akka" %% "akka-actor" % akkaVersion
// Spray related
val sprayRouting = "io.spray" % "spray-routing" % sprayVersion
val sprayCan = "io.... | skaphe/math-micro-services | add/project/Dependencies.scala | Scala | mit | 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 ... | sgururajshetty/carbondata | integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/dataload/TestLoadDataUseAllDictionary.scala | Scala | apache-2.0 | 2,129 |
import sbt._
import Keys._
import com.typesafe.sbt.pgp.PgpKeys._
object PublishSettings {
type Sett = Project.Setting[_]
lazy val all = Seq[Sett](
pom
, publish
, publishMavenStyle := true
, publishArtifact in Test := false
, pomIncludeRepository := { _ => false }
, licenses := Seq("BSD-3-Clause" ->... | NICTA/trackfunction | project/PublishSettings.scala | Scala | bsd-3-clause | 1,177 |
/*
* 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 ... | WindCanDie/spark | core/src/test/scala/org/apache/spark/UnpersistSuite.scala | Scala | apache-2.0 | 1,850 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | zzcclp/carbondata | integration/spark/src/test/scala/org/apache/carbondata/integration/spark/testsuite/dataload/TestLoadDataWithEmptyArrayColumns.scala | Scala | apache-2.0 | 2,371 |
/*
* 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 ... | hequn8128/flink | flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/metadata/FlinkRelMdHandlerTestBase.scala | Scala | apache-2.0 | 92,020 |
/*
* 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... | lresende/incubator-toree | protocol/src/test/scala/org/apache/toree/kernel/protocol/v5/content/ErrorContentSpec.scala | Scala | apache-2.0 | 2,492 |
/*
* RichVector2iSpec.scala
*
* Copyright (c) 2013 Lonnie Pryor III
*
* 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 r... | lpryor/fulcrum | math/src/test/scala/fulcrum/math/RichVector2iSpec.scala | Scala | apache-2.0 | 4,292 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | Panos-Bletsos/spark-cost-model-optimizer | sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionEvalHelperSuite.scala | Scala | apache-2.0 | 2,113 |
package github.keylity
import org.specs2.mutable._
class MutableOnceSpec extends Specification {
"MutableOnce behavior" should {
"Create, mute once and twice like" in {
val id = new MutableOnce(0)
id() must_== 0
id.set(1)
id() must_== 1
id.set(2) must throwA[IllegalStateException... | sorra/keylity | src/test/scala/github/keylity/MutableOnceSpec.scala | Scala | mit | 334 |
/*
* 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 | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/Statistics.scala | Scala | apache-2.0 | 1,961 |
package jsonslim
import org.scalatest.FunSpec
import org.json4s.JsonDSL._
import org.json4s.{JArray, JValue}
class SrcTest extends FunSpec {
describe("Src") {
it ("should apply to strings") {
assert(Src("[]") == Some(JArray(Nil)))
}
it ("should apply to jvalues") {
val value: JValue = ("foo"... | meetup/json-slim | src/test/scala/SrcTest.scala | Scala | mit | 399 |
package com.regblanc.sgl.board
package core
import sgl._
import geometry._
import scene._
import scene.ui._
import util._
trait ScreensComponent {
this: GraphicsProvider with InputProvider with SystemProvider with WindowProvider
with GameStateComponent with LoggingProvider with ViewportComponent =>
private im... | regb/scala-game-library | examples/board/core/src/main/scala/MainScreen.scala | Scala | mit | 1,806 |
/**
* 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... | guozhangwang/kafka | core/src/test/scala/unit/kafka/server/DescribeClusterRequestTest.scala | Scala | apache-2.0 | 4,035 |
package ru.zconstz.shortener.service
import akka.actor.{ActorRef, Props}
import ru.zconstz.shortener.Boot
trait ServiceRefs {
lazy val tokenActor: ActorRef = Boot.system.actorOf(Props[TokenActor])
lazy val linkActor: ActorRef = Boot.system.actorOf(Props[LinkActor])
lazy val clickActor: ActorRef = Boot.system.a... | konstantin-zlobin/url-shortener | src/main/scala/ru/zconstz/shortener/service/ServiceRefs.scala | Scala | apache-2.0 | 423 |
class SimpleClass {
def foo = 239
}
| scala/scala | test/files/scalap/simpleClass.scala | Scala | apache-2.0 | 38 |
/*
* Copyright 2016 Carlo Micieli
*
* 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... | CarloMicieli/hascalator | core/src/main/scala/io/hascalator/control/Applicative.scala | Scala | apache-2.0 | 1,438 |
package varys.util
/**
* Created by franklab on 15-4-3.
*/
import java.net.{DatagramPacket, InetAddress, DatagramSocket}
import akka.actor.{ActorRef, Props, Actor}
import varys.Logging
import scala.sys.process._
import varys.framework._
class DNBD (
val p: Int,
val eth: String)
extends Actor with Logging{... | frankfzw/varys | core/src/main/scala/varys/util/DNBD.scala | Scala | apache-2.0 | 6,283 |
package uk.gov.gds.common.testutil
import uk.gov.gds.common.logging.Logging
import java.lang.ProcessBuilder
import collection.JavaConversions._
import sys.process.Process
trait PlayRunner extends LazyStop with Logging {
override protected def definitionOfSoonInSeconds = 10
val playAppName: String
val playAppP... | alphagov/gds-scala-common | scala-utils/src/main/scala/uk/gov/gds/common/testutil/PlayRunner.scala | Scala | mit | 858 |
package be.studiocredo
import be.studiocredo.aws.DownloadService
import be.studiocredo.account._
import be.studiocredo.reservations.ReservationEngineMonitorService
import com.google.inject.{AbstractModule, Singleton}
import net.codingwell.scalaguice.{ScalaModule, ScalaMultibinder}
import play.api.Play
object Modules ... | studiocredo/ticket-reservation | app/be/studiocredo/Modules.scala | Scala | apache-2.0 | 3,538 |
/*
* 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 ... | jackylk/incubator-carbondata | integration/spark/src/main/scala/org/apache/spark/sql/secondaryindex/command/SIRebuildSegmentCommand.scala | Scala | apache-2.0 | 8,991 |
/*
* Copyright (c) 2021. StulSoft
*/
package com.stulsoft.areas
/**
* @author Yuriy Stul
*/
object ShapeArea {
def areaOf[A](a: A)(implicit shape: Area[A]): Double = shape.area(a)
}
| ysden123/poc | cats-examples/first-steps/src/main/scala/com/stulsoft/areas/ShapeArea.scala | Scala | mit | 190 |
package com.outr.arango.api
import com.outr.arango.api.model._
import io.youi.client.HttpClient
import io.youi.http.HttpMethod
import io.youi.net._
import io.circe.Json
import scala.concurrent.{ExecutionContext, Future}
object APIQueryProperties {
def get(client: HttpClient)(implicit ec: ExecutionContext): F... | outr/arangodb-scala | api/src/main/scala/com/outr/arango/api/APIQueryProperties.scala | Scala | mit | 689 |
/**
* Copyright (C) 2014 Stratio (http://stratio.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 by ap... | b-cuts/streaming-cep-engine | api/src/main/scala/com/stratio/streaming/api/messaging/ColumnNameType.scala | Scala | apache-2.0 | 798 |
/*
*************************************************************************************
* 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/administration/EditPolicyServerAllowedNetwork.scala | Scala | gpl-3.0 | 9,760 |
package models
import slick.session.Database
import play.api.db.DB
import play.api.Application
import slick.driver.ExtendedProfile
trait SlickDriven {
val SLICK_DRIVER = "slick.db.driver"
val DEFAULT_SLICK_DRIVER = "scala.slick.driver.H2Driver"
var isSql = false
/**
* Loads the proper database driver bas... | soupytwist/knit | app/models/SlickDriven.scala | Scala | gpl-3.0 | 875 |
package me.eax.examples.thrift.tests
import java.io.{ByteArrayInputStream, ByteArrayOutputStream}
import java.nio.charset.StandardCharsets
import me.eax.examples.thrift.game._
import me.eax.examples.thrift.tests.gen._
import org.apache.thrift.protocol._
import org.apache.thrift.transport._
import org.scalatest._
impo... | afiskon/scala-thrift-example | src/test/scala/me/eax/examples/thrift/tests/JSONProtocol.scala | Scala | mit | 997 |
/***********************************************************************
* Copyright (c) 2013-2019 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... | elahrvivaz/geomesa | geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/process/query/KNearestNeighborSearchProcessTest.scala | Scala | apache-2.0 | 9,951 |
package com.moolileo.meetup.websocket
import com.moolileo.meetup.model.MeetupRsvp
import org.apache.spark.Logging
import org.apache.spark.storage.StorageLevel
import org.apache.spark.streaming.receiver.Receiver
import org.json4s._
import org.json4s.jackson.JsonMethods._
import scalawebsocket.WebSocket
class WebSocke... | oscarruesga/utad-pebd-proyecto | src/main/scala/com/moolileo/meetup/websocket/WebSocketReader.scala | Scala | gpl-3.0 | 1,505 |
package edu.gemini.model.p1.immutable
import edu.gemini.model.p1.{mutable => M}
import scala.collection.JavaConverters._
object NiciBlueprintCoronagraphic {
def apply(m: M.NiciBlueprintCoronagraphic): NiciBlueprintCoronagraphic =
new NiciBlueprintCoronagraphic(m)
}
case class NiciBlueprintCoronagraphic(fpm: Ni... | arturog8m/ocs | bundle/edu.gemini.model.p1/src/main/scala/edu/gemini/model/p1/immutable/NiciBlueprintCoronagraphic.scala | Scala | bsd-3-clause | 1,106 |
package infcalcs
import Tree._
import Orderings._
import scala.util.Random.nextInt
/**
* Structure for input-output (dose-response) data.
*
* Both the signal and response points are entered into Vectors whose
* elements are themselves Vectors of length N, where N is the number
* of distinct signal or response ty... | ryants/EstCC | src/main/scala/infcalcs/DRData.scala | Scala | mit | 6,918 |
/*
* Copyright 2011 javaBin
* 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... | javaBin/submitit | submitit-ems-client/src/main/scala/no/java/submitit/ems/EmsConverter.scala | Scala | mit | 6,737 |
import sbt._
import Keys._
object Common {
val localMavenPath = Path.userHome.absolutePath + "/.m2/repository"
val versions = Map[String, String](
"java" -> "1.8",
"akka" -> "2.3.3",
"config" -> "1.2.1",
"grizzled" -> "1.0.2",
"logback" -> "1.1.2",
"suiryc-scala" -> "0.0.2-SNAPSHOT",
... | swhgoon/suiryc-scala | project/Common.scala | Scala | gpl-3.0 | 2,686 |
/*
* Copyright (C) FuseSource, Inc.
* http://fusesource.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 by ... | Jitendrakry/fuse | fabric/fabric-core/src/main/scala/org/fusesource/fabric/api/monitor/Monitor.scala | Scala | apache-2.0 | 1,163 |
package io.flow.build
case class Application(
organization: String,
application: String,
version: String
) {
val isLatest: Boolean = version == Application.Latest
val applicationVersionLabel: String = if (isLatest) {
s"$application:latest"
} else {
s"$application:$version"
}
val label: String... | flowcommerce/api-build | src/main/scala/io/flow/build/Application.scala | Scala | mit | 1,167 |
package fi.jori.slick.db
import scala.slick.driver.H2Driver.simple._
import java.sql.Date
object TaskExample extends App {
case class User(
name: String,
email: String
)
case class Task(
id: Int,
topic: String,
description: String,
started: Date,
finished: Option[Da... | jorilytter/slick-test | src/main/scala/fi/jori/slick/db/TaskExample.scala | Scala | mit | 3,169 |
package org.jetbrains.plugins.scala
package codeInsight.generation
import com.intellij.openapi.editor.{Editor, ScrollType}
import com.intellij.openapi.project.Project
import com.intellij.psi.codeStyle.CodeStyleManager
import com.intellij.psi.{PsiDocumentManager, PsiFile}
import org.jetbrains.plugins.scala.codeInsight.... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/codeInsight/generation/ScalaGenerateCompanionObjectAction.scala | Scala | apache-2.0 | 2,410 |
/* ___ _ ___ _ _ *\\
** / __| |/ (_) | | The SKilL Generator **
** \\__ \\ ' <| | | |__ (c) 2013-16 University of Stuttgart **
** |___/_|\\_\\_|_|____| see LICENSE ... | skill-lang/skill | src/main/scala/de/ust/skill/generator/c/model/TypeDeclarationHeaderMaker.scala | Scala | bsd-3-clause | 2,251 |
package play.api.db.evolutions
import javax.inject.{Inject, Singleton}
import play.api.{Configuration, Environment}
@Singleton
class SubFolderEvolutionsReader @Inject() (env: Environment, config: Configuration) extends EnvironmentEvolutionsReader(env) {
override def evolutions(db: String): Seq[Evolution] = {
co... | giabao/subfolder-evolutions | module/src/main/scala/play/api/db/evolutions/SubFolderEvolutionsReader.scala | Scala | apache-2.0 | 559 |
/*
* GESeq.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
package graph
... | Sciss/FScape-next | core/shared/src/main/scala/de/sciss/fscape/graph/impl/GESeq.scala | Scala | agpl-3.0 | 881 |
package slick.jdbc
import scala.concurrent.ExecutionContext
import slick.SlickException
import slick.ast._
import slick.ast.TypeUtil._
import slick.basic.Capability
import slick.dbio._
import slick.compiler.{Phase, CompilerState}
import slick.jdbc.meta.MTable
import slick.lifted._
import slick.relational.RelationalCa... | Asamsig/slick | slick/src/main/scala/slick/jdbc/DerbyProfile.scala | Scala | bsd-2-clause | 12,204 |
package com.ubirch.avatar.model.rest.device
import org.joda.time.DateTime
import org.json4s.JValue
/**
* we might use this draft in the future
*/
case class DeviceDraft(id: String,
name: Option[String],
hwType: Option[String],
hwId: Option[Strin... | ubirch/ubirch-avatar-service | model-rest/src/main/scala/com/ubirch/avatar/model/rest/device/DeviceDraft.scala | Scala | apache-2.0 | 853 |
package scodec
package protocols
package mpeg
package transport
import scodec.Codec
import scodec.codecs.uint
case class Pid(value: Int) {
require(value >= Pid.MinValue && value <= Pid.MaxValue)
}
object Pid {
val MinValue = 0
val MaxValue = 8191
implicit val codec: Codec[Pid] = uint(13).as[Pid]
}
case cla... | scodec/scodec-protocols | src/main/scala/scodec/protocols/mpeg/transport/Pid.scala | Scala | bsd-3-clause | 789 |
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.