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 puzzle2016.q
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
import CoinJam._
/**
* Created by pascalabaziou on 16/03/2017.
*/
@RunWith(classOf[JUnitRunner])
class CoinJamTest extends FunSuite {
test("isPrime is ok") { // calculates only for odd nu... | javathought/CodeJam | src/test/scala/puzzle2016/q/CoinJamTest.scala | Scala | apache-2.0 | 748 |
package varys.framework.master
import akka.actor.ActorRef
import scala.collection.mutable.{ArrayBuffer, HashMap, HashSet}
import varys.util.BpsInfo
private[varys] class SlaveInfo(
val id: String,
val host: String,
val port: Int,
val actor: ActorRef,
val webUiPort: Int,
val commPort: Int,
val publicAdd... | coflow/aalo | core/src/main/scala/varys/framework/master/SlaveInfo.scala | Scala | apache-2.0 | 1,711 |
package chrome.webRequest.bindings
import scala.scalajs.js
@js.native
trait WebAuthenticationChallengeDetails extends WebResponseHeadersDetails {
/**
* The authentication scheme, e.g. Basic or Digest.
*/
val scheme: String = js.native
/**
* The authentication realm provided by the server, if there ... | lucidd/scala-js-chrome | bindings/src/main/scala/chrome/webRequest/bindings/WebAuthenticationChallengeDetails.scala | Scala | mit | 599 |
package com.twitter.zipkin.aggregate
import java.util.Date
import com.twitter.algebird.{Moments, Monoid, Semigroup}
import com.twitter.scalding._
import com.twitter.util.Time
import com.twitter.zipkin.common.{Dependencies, DependencyLink, Service, Span}
final class ZipkinAggregateJob
(args: Args) extends Job(args... | cogitate/twitter-zipkin-uuid | zipkin-aggregate/src/main/scala/com/twitter/zipkin/aggregate/ZipkinAggregateJob.scala | Scala | apache-2.0 | 1,903 |
/*
* 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 ... | dbtsai/spark | sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suites.scala | Scala | apache-2.0 | 47,799 |
package org.scala_tools.maven.plexus.converters
import org.junit.Assert._;
import org.junit.Test;
import ReflectionUtil._
/**
* Tests the reflection API for scala vars.
*/
class TestRelfectionUtil {
@Test
def mustInjectVars() {
val mojo = new DummyScalaMojo();
injectIntoVar(mojo, "dummyVar", "HAI");
as... | jsuereth/scala-mojo-support | src/test/java/org/scala_tools/maven/plexus/converters/TestRelfectionUtil.scala | Scala | bsd-3-clause | 768 |
package org.apache.spark.network.pmof
import org.apache.spark.network.BlockDataManager
import org.apache.spark.network.shuffle.BlockStoreClient
abstract class TransferService extends BlockStoreClient{
def init(blockDataManager: BlockDataManager): Unit
def close(): Unit
def hostname: String
def port: Int
}
| Intel-bigdata/OAP | oap-shuffle/RPMem-shuffle/core/src/main/scala/org/apache/spark/network/pmof/TransferService.scala | Scala | apache-2.0 | 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 ... | brad-kaiser/spark | core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala | Scala | apache-2.0 | 37,907 |
package com.atomist.rug.runtime.js
import com.atomist.project.archive.{AtomistConfig, DefaultAtomistConfig}
import com.atomist.rug.RugArchiveReader
import com.atomist.rug.TestUtils.contentOf
import com.atomist.rug.ts.TypeScriptBuilder
import com.atomist.source.{SimpleFileBasedArtifactSource, StringFileArtifact}
import... | atomist/rug | src/test/scala/com/atomist/rug/runtime/js/JavaScriptUtilsTest.scala | Scala | gpl-3.0 | 1,802 |
/*
* 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 ... | bravo-zhang/spark | sql/core/src/main/scala/org/apache/spark/sql/api/python/PythonSQLUtils.scala | Scala | apache-2.0 | 2,123 |
package com.mgu.csp
/**
* This `VariableOrdering` selects the unassigned [[Variable]] that has the fewest legal values
* left. It is also known as the "most-constrained value" or "fail-first" heuristic, because it
* select a variable that is most likely to cause a failure soon, thereby pruning the search tree.
*
... | mguenther/csp-solver-scala | csp-core/src/main/scala/com/mgu/csp/MinimumRemainingValue.scala | Scala | mit | 752 |
/*
* Copyright 2015 Shao Tian-Chen (Austin)
*
* 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 ag... | au9ustine/org.au9ustine.puzzles.s99 | src/main/scala/org/au9ustine/puzzles/s99/P15.scala | Scala | apache-2.0 | 983 |
/*
* Copyright (C) 2016 Nikos Katzouris
*
* 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.
*
* This program is d... | nkatzz/OLED | src/main/scala/mcts/MathExchange.scala | Scala | gpl-3.0 | 5,490 |
package im.tox.antox.callbacks
import android.content.Context
import im.tox.antox.data.AntoxDB
import im.tox.antox.tox.ToxSingleton
import im.tox.antox.utils.AntoxFriend
import im.tox.tox4j.core.callbacks.FriendNameCallback
import scala.None
//remove if not needed
object AntoxOnNameChangeCallback {
private val T... | 0xPoly/Antox | app/src/main/scala/im/tox/antox/callbacks/AntoxOnNameChangeCallback.scala | Scala | gpl-3.0 | 906 |
/*******************************************************************************
Copyright (c) 2012-2014, KAIST, S-Core.
All rights reserved.
Use is subject to license terms.
This distribution may include materials developed by third parties.
**********************************************************... | darkrsw/safe | src/main/scala/kr/ac/kaist/jsaf/concolic/TypeInfo.scala | Scala | bsd-3-clause | 1,070 |
package cakesolutions
import epic.preprocess.MLSentenceSegmenter
trait EnglishParser {
def parseWords(text: String): IndexedSeq[IndexedSeq[String]] = {
val sentenceSplitter = MLSentenceSegmenter.bundled().get // load english by default
val tokenizer = new epic.preprocess.TreebankTokenizer()
sentenceSp... | carlpulley/concordance | src/main/scala/cakesolutions/EnglishParser.scala | Scala | gpl-2.0 | 382 |
package org.jetbrains.plugins.scala.lang.psi.implicits
import org.jetbrains.plugins.scala.lang.psi.types.ScType
import org.jetbrains.plugins.scala.lang.resolve.ScalaResolveResult
final case class ExtensionMethodApplication(resultType: ScType,
implicitParameters: Seq[ScalaRe... | JetBrains/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/implicits/ExtensionMethodApplication.scala | Scala | apache-2.0 | 346 |
/*
*/
package see
import org.junit._
import org.junit.Before
import org.junit.Assert._
/** Tests table handling.
*/
//@Ignore
class TableTest extends TestCase {
@Before
override def setUp() {
//TestCase.
super.setUp()
result("ta = table(0, 10->100)")
result("tb = table(0, 10->200)")
}
... | RayRacine/scee | src/test/scala/see/TableTest.scala | Scala | bsd-3-clause | 7,630 |
package io.buoyant.router.h2
import com.twitter.conversions.DurationOps._
import com.twitter.finagle.buoyant.h2.{Request, Response, param => h2Param}
import com.twitter.finagle.service.Retries
import com.twitter.finagle.{ServiceFactory, Stack, Stackable, param}
import com.twitter.util.Duration
import io.buoyant.router... | linkerd/linkerd | router/h2/src/main/scala/io/buoyant/router/h2/ClassifiedRetries.scala | Scala | apache-2.0 | 2,331 |
package me.fornever.platonus
sealed trait Word
case class PhraseBegin() extends Word
case class PhraseEnd() extends Word
case class OrdinarWord(word: String) extends Word
| ForNeVeR/platonus | src/main/scala/me/fornever/platonus/Key.scala | Scala | mit | 172 |
package com.twitter.util
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
@RunWith(classOf[JUnitRunner])
class TryTest extends FunSuite {
class MyException extends Exception
val e = new Exception("this is an exception")
test("Try.apply(): should catch excepti... | edombowsky/util | util-core/src/test/scala/com/twitter/util/TryTest.scala | Scala | apache-2.0 | 5,517 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | maropu/spark | core/src/test/scala/org/apache/spark/ui/PagedTableSuite.scala | Scala | apache-2.0 | 4,830 |
package spk
import Generators._
import spk.model._
import scala.util.Random
case object Config {
val stringLength = 10
val multivaluedLength = 5
val stringGroupLength = 5
val stringGroupCount = 10
val intGroup = 10
val rows = 100
val groups = 10
val stringGroups: Seq[String] = (readableGroups(str... | eqw3rty/solr-performance-kit | src/main/scala/spk/Config.scala | Scala | mit | 1,540 |
import sbt._
import Keys._
import sbt.contraband.ContrabandPlugin.autoImport._
object Dependencies {
// WARNING: Please Scala update versions in PluginCross.scala too
val scala212 = "2.12.15"
val scala213 = "2.13.6"
val checkPluginCross = settingKey[Unit]("Make sure scalaVersion match up")
val baseScalaVersi... | sbt/sbt | project/Dependencies.scala | Scala | apache-2.0 | 6,370 |
package edu.colorado.plv.cuanto.jsy
package common
import edu.colorado.plv.cuanto.parsing.{ParserLike, RichParsers}
import scala.util.parsing.combinator.JavaTokenParsers
import scala.util.parsing.input.Reader
/** Common trait for a JavaScripty parser.
*
* Mixes [[scala.util.parsing.combinator.JavaTokenParsers]] ... | cuplv/cuanto | src/main/scala/edu/colorado/plv/cuanto/jsy/common/JsyParserLike.scala | Scala | apache-2.0 | 636 |
package com.socrata.datacoordinator.truth.sql
package sample
sealed abstract class SampleType
case object SampleSidColumn extends SampleType
case object SampleTextColumn extends SampleType
case object SamplePointColumn extends SampleType
| socrata-platform/data-coordinator | coordinatorlib/src/main/scala/com/socrata/datacoordinator/truth/sql/sample/SampleType.scala | Scala | apache-2.0 | 239 |
package mesosphere.marathon.tasks
import mesosphere.marathon.core.launcher.impl.TaskOpFactoryHelper
import mesosphere.marathon.core.task.TaskStateOp
import mesosphere.marathon.test.{ MarathonSpec, MarathonTestHelper, Mockito }
import org.apache.mesos.{ Protos => Mesos }
import org.scalatest.{ GivenWhenThen, Matchers }... | timcharper/marathon | src/test/scala/mesosphere/marathon/tasks/TaskOpFactoryHelperTest.scala | Scala | apache-2.0 | 1,716 |
package net.hamnaberg.json.collection.data
import net.hamnaberg.json.collection.Property
trait DataExtractor[A] {
def unapply(data: List[Property]): Option[A]
}
| hamnis/scala-collection-json | src/main/scala/net/hamnaberg/json/collection/data/DataExtractor.scala | Scala | apache-2.0 | 165 |
package webshop.webservice
import webshop.webservice.OrderStatus._
sealed trait OrderStatus {
override def toString: String = this match {
case InfoPending(pending) => "info-pending:" + pending.mkString(",")
case UnavailableItems(items) => "unavailable-items:" + items.length
case PaymentFailed => "paym... | ing-bank/baker | examples/bakery-client-example/src/main/scala/webshop/webservice/OrderStatus.scala | Scala | mit | 824 |
package org.jetbrains.plugins.scala
package annotator
import com.intellij.codeInsight.intention.IntentionAction
import com.intellij.codeInspection.ProblemHighlightType
import com.intellij.psi.PsiElement
import com.intellij.openapi.util.TextRange
import com.intellij.lang.annotation.AnnotationHolder
import com.intellij.... | consulo/consulo-scala | src/org/jetbrains/plugins/scala/annotator/AnnotatorUtils.scala | Scala | apache-2.0 | 2,947 |
/*******************************************************************************
* Copyright (c) 2019. Carl Minden
*
* 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 ... | carlminden/anathema-roguelike | src/com/anathema_roguelike/fov/FOVProcessor.scala | Scala | gpl-3.0 | 1,698 |
package code.model
import _root_.net.liftweb.mapper._
import _root_.net.liftweb.util._
import _root_.net.liftweb.common._
class MessageRecipient extends LongKeyedMapper[MessageRecipient] with IdPK {
def getSingleton = MessageRecipient
object message extends MappedLongForeignKey(this, Message)
object recipient e... | scsibug/fermata | src/main/scala/code/model/MessageRecipient.scala | Scala | bsd-3-clause | 887 |
package core
import me.mtrupkin.console.{Colors, ScreenChar}
import me.mtrupkin.core.{Point, Size}
import scala.Array._
/**
* Created by mtrupkin on 12/14/2014.
*/
trait Square {
def name: String
def sc: ScreenChar
def move: Boolean = true
var cost: Int = 1
}
trait GameMap {
def size: ... | mtrupkin/flagship | src/main/scala/core/Square.scala | Scala | mit | 1,032 |
package org.mybatis.scala.infrastructure
import org.mybatis.scala.domain.User
import org.mybatis.scala.mapping._
import org.mybatis.scala.mapping.Binding._
import scala.language.postfixOps
object UserRepository {
val defaultResultMap = new ResultMap[User] {
idArg(column = "id", javaType = T[Int])
arg(column... | tempbottle/scala-1 | mybatis-scala-core/src/test/scala/org/mybatis/scala/infrastructure/UserRepository.scala | Scala | apache-2.0 | 1,221 |
/*
* 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... | asorianostratio/incubator-toree | kernel/src/main/scala/org/apache/toree/magic/builtin/RDD.scala | Scala | apache-2.0 | 2,723 |
package livehl.common.db
import java.security.Key
import java.util.Date
import com.aliyun.openservices.ots._
import com.aliyun.openservices.ots.model._
import scala.collection.JavaConversions._
class BDBEntity(val tableName: String) extends DataStorage{
private lazy val conf = ConfigFactory.load()
private lazy ... | livehl/common | src/main/scala/livehl/common/db/BDBEntity.scala | Scala | apache-2.0 | 14,829 |
/*
Copyright 2013 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, so... | zirpins/summingbird | summingbird-batch-hadoop/src/main/scala/com/twitter/summingbird/batch/state/FileVersionTracking.scala | Scala | apache-2.0 | 2,494 |
/*
* 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 ... | goldmedal/spark | sql/core/src/test/scala/org/apache/spark/sql/FileBasedDataSourceSuite.scala | Scala | apache-2.0 | 34,457 |
import play.api.ApplicationLoader.Context
import play.api.{Application, ApplicationLoader, BuiltInComponentsFromContext}
import akka.stream.OverflowStrategy
import akka.stream.scaladsl.{BroadcastHub, Keep, Source}
import command.{AccountCommandService, AccountEvent}
import play.filters.HttpFiltersComponents
import que... | srottenberg/es-cqrs-bank-account | app/MyApplicationLoader.scala | Scala | mit | 1,191 |
/*
* Implements the Delta Table used to store and find valid decompositions (grammars) of a
* term set.
*
* Implements the delta-different of a set of terms
* (E.g.: delta(f(a), f(b)) = [f(alpha)], [a, b]
*
*
* !NOTE!
* The delta-table method of cut-introduction is sound but NOT complete!
* First, a complet... | gisellemnr/gapt | src/main/scala/at/logic/gapt/proofs/lk/algorithms/cutIntroduction/DeltaTable.scala | Scala | gpl-3.0 | 6,663 |
/*
* @author Philip Stutz
* @author Mihaela Verman
*
* Copyright 2013 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.apache.org/li... | uzh/triplerush | src/main/scala/com/signalcollect/triplerush/loading/VertexCounting.scala | Scala | apache-2.0 | 1,913 |
package nl.rabobank.oss.rules.dsl.core.operators
import nl.rabobank.oss.rules.dsl.core.types.AddableValues
import scala.annotation.implicitNotFound
/**
* This type class allows values of different types to be added in the DSL.
*
* @tparam A type of the left hand side of the adding operation
* @tparam B type ... | scala-rules/scala-rules | engine/src/main/scala/nl/rabobank/oss/rules/dsl/core/operators/Addable.scala | Scala | mit | 2,050 |
/***********************************************************************
* Copyright (c) 2013-2020 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... | aheyne/geomesa | geomesa-convert/geomesa-convert-avro/src/test/scala/org/locationtech/geomesa/convert/avro/AvroPathTest.scala | Scala | apache-2.0 | 2,659 |
//
// Copyright 2013 Mirko Nasato
//
// Licensed under the Apache License, Version 2.0
// http://www.apache.org/licenses/LICENSE-2.0
//
package io.encoded.seriala
trait SerialWriter[T] {
def write(x: T)
def close()
}
| mirkonasato/seriala | seriala-core/src/main/scala/io/encoded/seriala/SerialWriter.scala | Scala | apache-2.0 | 225 |
package org.scalatest.examples.fixture.propspec.multi
import org.scalatest._
import prop.PropertyChecks
import scala.collection.mutable.ListBuffer
class ExampleSpec extends fixture.PropSpec with PropertyChecks with ShouldMatchers {
case class FixtureParam(builder: StringBuilder, buffer: ListBuffer[String])
def ... | svn2github/scalatest | examples/src/main/scala/org/scalatest/examples/propspec/multi/ExampleSpec.scala | Scala | apache-2.0 | 1,298 |
/*
* Copyright 2013 Damien Lecan
*
* 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... | swatikiran123/play2-war-plugin | project-code/core/common/src/main/scala/play/core/server/servlet/RequestHandler.scala | Scala | apache-2.0 | 15,374 |
/*
* 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 ... | greghogan/flink | flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/rules/logical/FlinkPruneEmptyRulesTest.scala | Scala | apache-2.0 | 2,577 |
package de.ahus1.bdd
import de.ahus1.bdd.calculator.CalculatorSUT
import org.scalatest.FeatureSpec
class CalculatorFeature extends FeatureSpec with GwenTrait {
val theCalculator = new CalculatorSUT();
feature("calculator") {
scenario("simple addition") {
given(theCalculator) turnedOn;
when(theC... | ahus1/bdd-examples | gwen-calculator-scalatest/src/test/java/de/ahus1/bdd/CalculatorFeature.scala | Scala | apache-2.0 | 698 |
import sbt._
object Boilerplate {
val arities = 1 to 22
val aritiesExceptOne = 2 to 22
val arityChars: Map[Int, Char] = arities.map(n => (n, ('A' + n - 1).toChar)).toMap
def write(path: File, fileContents: String): File = {
IO.write(path, fileContents)
path
}
def gen(dir: File) = {
val genera... | NeovaHealth/t4openerp-connector | project/Boilerplate.scala | Scala | agpl-3.0 | 5,050 |
import sbt._
class RyuProject(info: ProjectInfo) extends DefaultProject(info) with posterous.Publish with GrowlPlugin {
// databinder
val databinderNet = "databinder.net repository" at "http://databinder.net/repo"
def databind(p:String) = "net.databinder" %% "dispatch-%s".format(p) % "0.7.2"
val ljs = databind... | softprops/ryu | project/build/RyuProject.scala | Scala | mit | 688 |
package russoul.lib.common.math.geometry.simple
import russoul.lib.common.TypeClasses._
import russoul.lib.common.utils.Arr
import russoul.lib.common.immutable
import russoul.lib.common.Implicits._
import shapeless.Nat._
import russoul.lib.common._
import russoul.lib.common.math.geometry.simple.general.{CenteredShape,... | Russoul/UniScalaLib | src/main/scala/russoul/lib/common/math/geometry/simple/AABBOver.scala | Scala | mit | 3,996 |
package pureconfig
import com.typesafe.config.{ ConfigObject, ConfigValue, ConfigValueType }
import pureconfig.error._
import pureconfig.syntax._
/**
* A trait that can be implemented to disambiguate between the different options of a coproduct or sealed family.
*
* @tparam T the type of the coproduct or sealed fa... | derekmorr/pureconfig | core/src/main/scala/pureconfig/CoproductHint.scala | Scala | mpl-2.0 | 6,209 |
/*
* Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com>
*/
package play.api
import org.specs2.mutable.Specification
class PlayGlobalAppSpec extends Specification {
sequential
def testApp(allowGlobalApp: Boolean): PlayCoreTestApplication =
PlayCoreTestApplication(Map(
"play.allowGlob... | Shenker93/playframework | framework/src/play/src/test/scala/play/api/PlayGlobalAppSpec.scala | Scala | apache-2.0 | 3,176 |
package vggames.shared
import org.junit.runner.RunWith
import org.specs2.mutable.Specification
import vggames.shared.task.Descriptions
import org.specs2.runner.JUnitRunner
@RunWith(classOf[JUnitRunner])
class DescriptionsSpec extends Specification {
"descriptions" should {
"read description according to group ... | vidageek/games | games/game/src/test/scala/vggames/shared/DescriptionsSpec.scala | Scala | gpl-3.0 | 1,281 |
package com.socrata.datacoordinator
package truth.metadata
import com.rojoma.json.v3.util.{JsonKey, AutomaticJsonCodecBuilder}
import com.socrata.datacoordinator.id.DatasetId
import com.rojoma.json.v3.codec.{DecodeError, JsonDecode, JsonEncode}
import com.rojoma.json.v3.ast.{JString, JValue}
trait DatasetInfoLike ext... | socrata-platform/data-coordinator | coordinatorlib/src/main/scala/com/socrata/datacoordinator/truth/metadata/DatasetInfo.scala | Scala | apache-2.0 | 2,931 |
/*
* Copyright 2015 ligaDATA
*
* 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... | traytonwhite/Kamanja | trunk/Pmml/PmmlCompiler/src/main/scala/com/ligadata/pmml/transforms/xmltoraw/common/FunctionNodes.scala | Scala | apache-2.0 | 3,048 |
package mesosphere.marathon.api.v2
import java.util
import mesosphere.marathon.core.appinfo.AppInfo
import mesosphere.marathon.core.appinfo.AppInfo.Embed
import org.slf4j.LoggerFactory
/**
* Resolves AppInfo.Embed from query parameters.
*/
private[v2] object AppInfoEmbedResolver {
private[this] val log = Logge... | cgvarela/marathon | src/main/scala/mesosphere/marathon/api/v2/AppInfoEmbedResolver.scala | Scala | apache-2.0 | 2,303 |
package com.mentatlabs.nsa
package scalac
package options
/* -Y
* ==
* 2.6.0 - 2.6.1: Print a synopsis of private options
* 2.7.0 - 2.7.7: !! missing !!
* 2.8.0 - 2.8.2: Print a synopsis of private options
* 2.9.0 - 2.12.0: Print a synopsis of private options.
*/
case object ScalacY
extends Sc... | melezov/sbt-nsa | nsa-core/src/main/scala/com/mentatlabs/nsa/scalac/options/advanced/ScalacY.scala | Scala | bsd-3-clause | 368 |
package tethys.circe
import org.scalatest.matchers.should.Matchers
import org.scalatest.flatspec.AnyFlatSpec
import io.circe.{Json, JsonObject}
import tethys.commons.TokenNode
import tethys.commons.TokenNode.{value => token, _}
import tethys.circe.SimpleTokenWriterRaw._
class CirceSupportTest extends AnyFlatSpec with... | tethys-json/tethys | modules/circe/src/test/scala/tethys/circe/CirceSupportTest.scala | Scala | apache-2.0 | 4,204 |
/*
* EditAddRemoveOutput.scala
* (Mellite)
*
* Copyright (c) 2012-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.mellit... | Sciss/Mellite | app/src/main/scala/de/sciss/mellite/edit/EditAddRemoveProcOutput.scala | Scala | agpl-3.0 | 2,018 |
package net.caoticode
import akka.actor.ActorRef
package object synergy {
object MasterWorkerProtocol {
// Messages from Workers
case class WorkerCreated(worker: ActorRef)
case class WorkerRequestsWork(worker: ActorRef)
case class WorkIsDone(worker: ActorRef)
// Messages to Workers
... | mdread/synergy | src/main/scala/net/caoticode/synergy/package.scala | Scala | mit | 1,587 |
/*
* Wire
* Copyright (C) 2016 Wire Swiss GmbH
*
* 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.
*
* This progr... | wireapp/wire-android-sync-engine | zmessaging/src/main/scala/com/waz/znet2/http/Serializers.scala | Scala | gpl-3.0 | 5,418 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | tmalaska/SparkOnHBase | src/main/scala/org/apache/hadoop/hbase/spark/KeyFamilyQualifier.scala | Scala | apache-2.0 | 1,731 |
package chandu0101.scalajs.react.components.demo.pages
import chandu0101.scalajs.react.components.demo.components.LeftNavPage
import chandu0101.scalajs.react.components.demo.routes.{LeftRoute, ReactPopoverRouteModule}
import japgolly.scalajs.react.ReactComponentB
import japgolly.scalajs.react.extra.router2.RouterCtl
... | coreyauger/scalajs-react-components | demo/src/main/scala/chandu0101/scalajs/react/components/demo/pages/ReactPopoverPage.scala | Scala | apache-2.0 | 738 |
package dao
import dao.UserDao.systemIdFilter
import dao.helper.TableFilter.{abbreviationFilter, idFilter}
import dao.helper.{DBResult, TableFilter}
import database.helper.LdapUserStatus
import database.helper.LdapUserStatus._
import database.{DegreeDb, UserDb, UserTable}
import models._
import models.helper._
import ... | THK-ADV/lwm-reloaded | app/dao/UserDao.scala | Scala | mit | 8,183 |
package rpm4s.repo.data.primary
import rpm4s.repo.data.Bytes
case class SizeInfo(
pack: Bytes,
installed: Bytes,
archive: Bytes
)
| lucidd/rpm4s | repo-utils/shared/src/main/scala/rpm4s/repo/data/primary/SizeInfo.scala | Scala | mit | 137 |
package springnz.sparkplug.core
import org.apache.spark.rdd.RDD
import scala.reflect.ClassTag
object RDDPimpers {
class RDDExtensions[A: ClassTag](rdd: RDD[A]) {
def mapPartial[B: ClassTag](defaultValue: ⇒ B)(f: PartialFunction[A, B]): RDD[B] = {
rdd.map {
a ⇒ if (f.isDefinedAt(a)) f(a) else def... | springnz/sparkplug | sparkplug-core/src/main/scala/springnz/sparkplug/core/RDDPimpers.scala | Scala | mit | 697 |
package me.frmr.wepay.api {
import net.liftweb.json._
import JsonDSL._
case class WithdrawalResponse(withdrawal_id:Long, withdrawal_uri:Option[String] = None)
/**
* Represents an instance of a Withdrawal.
*
* @param account_id The WePay Account ID associated with the Withdrawal.
* @param amount ... | farmdawgnation/wepay-scala | src/main/scala/me/frmr/wepay/api/Withdrawal.scala | Scala | apache-2.0 | 2,784 |
package im.tox.antox.fragments
import android.app.{Activity, AlertDialog, Dialog}
import android.content.DialogInterface
import android.os.Bundle
import android.support.v4.app.DialogFragment
import android.view.View
import android.widget.EditText
import im.tox.antox.R
import im.tox.antox.fragments.PinDialogFragment._
... | 0xPoly/Antox | app/src/main/scala/im/tox/antox/fragments/PinDialogFragment.scala | Scala | gpl-3.0 | 1,858 |
/*
* Copyright 2015 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed t... | rspieldenner/atlas | atlas-core/src/main/scala/com/netflix/atlas/core/model/MathExpr.scala | Scala | apache-2.0 | 13,447 |
/*
* 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 n... | sslavic/kafka | core/src/test/scala/integration/kafka/api/PlaintextEndToEndAuthorizationTest.scala | Scala | apache-2.0 | 3,819 |
package scorex.transaction.state.database.blockchain
import scorex.crypto.encode.Base58
import scorex.transaction._
import scorex.transaction.assets.{AssetIssuance, BurnTransaction, IssueTransaction, ReissueTransaction}
import scorex.transaction.state.database.state.extension.StateExtension
import scorex.transaction.s... | B83YPoj/Waves | src/main/scala/scorex/transaction/state/database/blockchain/AssetsExtendedState.scala | Scala | apache-2.0 | 4,361 |
//package com.sksamuel.elastic4s
//
//import com.sksamuel.elastic4s.ElasticDsl._
//import com.sksamuel.elastic4s.mappings.FieldType.NestedType
//import org.scalatest.{FreeSpec, Matchers}
//import com.sksamuel.elastic4s.testkit.ElasticSugar
//import org.elasticsearch.common.text.Text
//import org.elasticsearch.search.hi... | aroundus-inc/elastic4s | elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/search/NestedQueryTest.scala | Scala | apache-2.0 | 3,000 |
package org.scalameta.data
import scala.language.experimental.macros
import scala.reflect.macros.blackbox.Context
import org.scalameta.adt.{Reflection => AdtReflection}
import org.scalameta.internal.MacroHelpers
// Parts of @data logic that need a typer context and can't be run in a macro annotation.
object DataTyper... | scalameta/scalameta | scalameta/common/shared/src/main/scala/org/scalameta/data/Macros.scala | Scala | bsd-3-clause | 1,238 |
package controllers.dev
import anorm._
import play.api.mvc.{Request, ChunkedResult, Action, Controller}
import models.{Schema => S, Location, SQ, User}
import play.api.db.DB
import controllers.Common
import SQ._
import play.api.Play
import java.io.File
import core.LatLng
import play.api.libs.iteratee.{Concurrent, Enum... | maackle/bartera | app/controllers/dev/Schema.scala | Scala | mit | 2,149 |
/*
* 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 | mllib/src/test/scala/org/apache/spark/mllib/regression/LinearRegressionSuite.scala | Scala | apache-2.0 | 6,512 |
/*!
* Copyright 2013-2014 Dennis Hörsch.
*
* 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 ... | dhs3000/dropwizard-scala | src/main/scala/de/dennishoersch/util/dropwizard/config/ConfiguredBundle.scala | Scala | apache-2.0 | 991 |
/*
* 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/execution/python/ExtractPythonUDFsSuite.scala | Scala | apache-2.0 | 7,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 ... | zzcclp/carbondata | integration/spark/src/test/scala/org/apache/carbondata/spark/testsuite/iud/DeleteCarbonTableTestCase.scala | Scala | apache-2.0 | 23,033 |
/*
* 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 ... | goldmedal/spark | sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/PruneHiveTablePartitions.scala | Scala | apache-2.0 | 5,209 |
package com.themillhousegroup.l7
import java.io.File
import com.typesafe.scalalogging.LazyLogging
import scala.util.Try
import com.themillhousegroup.l7.commands._
import scala.util.Failure
object Automerge {
def apply(existingDirectoryName: String, newerDirectoryName: String) = {
new Automerge(
new File(e... | themillhousegroup/l7-merge | src/main/scala/com/themillhousegroup/l7/Automerge.scala | Scala | mit | 1,243 |
/*
* Copyright 2011-2022 GatlingCorp (https://gatling.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | gatling/gatling | gatling-recorder/src/main/scala/io/gatling/recorder/ui/swing/component/DialogFileSelector.scala | Scala | apache-2.0 | 2,326 |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright © 2012 Christian Krause *
* ... | wookietreiber/ckit | client/swing/main/scala/action/Quit.scala | Scala | gpl-3.0 | 2,743 |
package org.jetbrains.plugins.scala
package lang
package psi
package stubs
package elements
import com.intellij.openapi.diagnostic.Logger
import com.intellij.psi.PsiElement
import com.intellij.psi.stubs.{IndexSink, StubElement, StubInputStream, StubOutputStream}
import com.intellij.util.io.StringRef
import org.jetbrai... | triggerNZ/intellij-scala | src/org/jetbrains/plugins/scala/lang/psi/stubs/elements/ScTemplateParentsElementType.scala | Scala | apache-2.0 | 2,535 |
/*
* Copyright (c) <2012-2013>, Amanj Sherwany <http://www.amanj.me>
* All rights reserved.
* */
package ch.usi.inf.l3.moolc.evaluator
import _root_.ch.usi.inf.l3.moolc.ast._
class MethodBank{
private var methods: List[MMethod] = Nil
private var specializedMethods:
Map[(String, List[PEValue]), MMethod... | amanjpro/mool-compiler | src/main/scala/ch/usi/inf/l3/moolc/eval/StoreUtil.scala | Scala | bsd-3-clause | 2,989 |
package amailp.intellij.robot.psi
import com.intellij.lang.ASTNode
import com.intellij.extapi.psi.ASTWrapperPsiElement
import com.intellij.psi._
import amailp.intellij.robot.psi.reference.ResourceValueReference
class ResourceValue(node: ASTNode) extends ASTWrapperPsiElement(node) {
override def getReference: Resour... | AmailP/robot-plugin | src/main/scala/amailp/intellij/robot/psi/ResourceValue.scala | Scala | gpl-3.0 | 374 |
import annotation.experimental
@main
def run(): Unit = f // error
@experimental
def f = 2
| dotty-staging/dotty | tests/neg-custom-args/no-experimental/i13848.scala | Scala | apache-2.0 | 92 |
/*
* 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 ... | chuckchen/spark | sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/DateExpressionsSuite.scala | Scala | apache-2.0 | 76,985 |
/*
* Copyright 2011-2022 GatlingCorp (https://gatling.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | gatling/gatling | gatling-recorder/src/test/scala/io/gatling/recorder/render/template/PackageSpec.scala | Scala | apache-2.0 | 1,302 |
package net.kwas.impatient.ch7
object HashMapCopier {
import java.util.{HashMap => JavaHashMap}
import collection.immutable.{HashMap => ScalaHashMap}
def copy[A, B](source: JavaHashMap[A, B]): ScalaHashMap[A, B] = {
val builder = ScalaHashMap.newBuilder[A, B]
val iterator = source.entrySet().iterator(... | dkwasny/ScalaImpatient | src/main/scala/net/kwas/impatient/ch7/HashMapCopier.scala | Scala | mit | 475 |
/*
* 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 ... | bwsw/sj-platform | core/sj-engine-core/src/main/scala/com/bwsw/sj/engine/core/testutils/benchmark/batch/BatchBenchmarkFactory.scala | Scala | apache-2.0 | 1,494 |
/*
* Copyright 2015 LG CNS.
*
* 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... | jahnaviancha/scouter | scouter.server/src/scouter/server/core/cache/XLogCache.scala | Scala | apache-2.0 | 1,225 |
/*
* 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 ... | markusthoemmes/openwhisk | common/scala/src/main/scala/org/apache/openwhisk/common/TransactionId.scala | Scala | apache-2.0 | 10,904 |
package com.feynmanliang.optala
/** The results from a run of an iterative optimization algorithm along with performance diagnostic information.
* @tparam T type of an algorithm's internal state
*/
trait RunResult[T] {
val bestSolution: Solution // best solution found in this algorithm run
val stateTrace: Seq[... | feynmanliang/optala | src/main/scala/com/feynmanliang/optala/RunResult.scala | Scala | mit | 528 |
package org.opennetworkinsight.testutils
import java.util.Date
import org.apache.spark.{SparkConf, SparkContext}
import scala.concurrent.Lock
/**
* THIS CODE WAS COPIED DIRECTLY FROM THE OPEN SOURCE PROJECT TAP (Trusted Analytics Platform)
* which has an Apache V2.0
*/
/**
* Don't use this class directly!... | Open-Network-Insight/oni-ml | src/test/scala/org/opennetworkinsight/testutils/TestingSparkContext.scala | Scala | apache-2.0 | 2,617 |
/*
* Copyright (C) 2013 The Mango 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 agre... | feijoas/mango | src/main/scala/org/feijoas/mango/common/collect/BinaryTreeTraverser.scala | Scala | apache-2.0 | 5,666 |
package edu.rice.habanero.benchmarks.apsp
import edu.rice.habanero.actors.{ScalazActor, ScalazActorState, ScalazPool}
import edu.rice.habanero.benchmarks.{Benchmark, BenchmarkRunner}
import scala.collection.mutable.ListBuffer
/**
*
* @author <a href="http://shams.web.rice.edu/">Shams Imam</a> (shams@rice.edu)
*/
... | shamsmahmood/savina | src/main/scala/edu/rice/habanero/benchmarks/apsp/ApspScalazActorBenchmark.scala | Scala | gpl-2.0 | 6,440 |
/*
* Copyright (c) 2019. Yuriy Stul
*/
package com.stulsoft.ysps.pmatch
/** Demonstrates usage of type patterns; adding variable to pattern; <i>@</i>
*
* @author Yuriy Stul
*/
object MatchWithAt extends App {
test1()
test2()
def test1(): Unit = {
println("==>test1")
val o = Option("Test")
... | ysden123/ysps | src/main/scala/com/stulsoft/ysps/pmatch/MatchWithAt.scala | Scala | mit | 1,411 |
/**
* 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... | lakshmi-kannan/kafka-sashafied | project/Build.scala | Scala | apache-2.0 | 9,046 |
package scalariform.lexer
import scala.xml.parsing.TokenTests
import scalariform.lexer.CharConstants.SU
import scalariform.lexer.Tokens._
import scalariform._
class ScalaLexer(
protected val reader: IUnicodeEscapeReader,
protected val forgiveErrors: Boolean = false,
protected val scalaVersio... | jkinkead/scalariform | scalariform/src/main/scala/scalariform/lexer/ScalaLexer.scala | Scala | mit | 7,995 |
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.