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 com.datastax.spark.connector.types
import scala.language.existentials
import scala.reflect.runtime.universe._
trait CollectionColumnType[T] extends ColumnType[T] {
def isCollection = true
protected def nestedElementTypeName(elemType: ColumnType[_]): String = elemType match {
case _: UserDefinedType ... | datastax/spark-cassandra-connector | driver/src/main/scala/com/datastax/spark/connector/types/CollectionColumnType.scala | Scala | apache-2.0 | 2,132 |
/*
* IJ-Plugins
* Copyright (C) 2002-2021 Jarek Sacha
* Author's email: jpsacha at gmail dot com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the ... | ij-plugins/ijp-toolkit | src/test/scala/ij_plugins/toolkit/ui/progress/ProgressReporterSpec.scala | Scala | lgpl-2.1 | 2,005 |
package mesosphere.mesos
import mesosphere.marathon.core.launcher.impl.ResourceLabels
import mesosphere.marathon.core.task.Task
import mesosphere.marathon.state.{ AppDefinition, ResourceRole }
import mesosphere.marathon.tasks.{ PortsMatch, PortsMatcher }
import mesosphere.mesos.protos.Resource
import org.apache.mesos.... | ss75710541/marathon | src/main/scala/mesosphere/mesos/ResourceMatcher.scala | Scala | apache-2.0 | 8,175 |
/*
* Copyright (C) 2005, The OpenURP Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This... | openurp/api | code/src/main/scala/org/openurp/code/geo/model/mapping.scala | Scala | lgpl-3.0 | 1,207 |
package es.upm.oeg.epnoi.matching.metrics.similarity
import breeze.linalg.DenseVector
import es.upm.oeg.epnoi.matching.metrics.feature.LuceneTokenizer
import es.upm.oeg.epnoi.matching.metrics.utils.SparkWrapper
import org.apache.spark.mllib.feature.{Word2Vec, Word2VecModel}
import org.apache.spark.mllib.linalg
import ... | cbadenes/epnoi-matching-metrics | src/test/scala/es/upm/oeg/epnoi/matching/metrics/similarity/WordVecCorpusExample.scala | Scala | apache-2.0 | 2,082 |
package chapter.four
object ExerciseEight extends App {
//todo: preconditions and generic
def minmax(values: Array[Int]) = {
(values.min, values.max)
}
}
| deekim/impatient-scala | src/main/scala/chapter/four/ExerciseEight.scala | Scala | apache-2.0 | 168 |
package com.github.eerohele.expek
import net.sf.saxon.s9api._
import org.w3c.dom.{Node => DomNode}
/** A trait that contains XPath-related methods. */
trait XPathSupport {
import utils.Tap
val xpathCompiler: XPathCompiler
val builder: DocumentBuilder
object XPath {
/** Evaluate the given XP... | eerohele/expek | src/main/scala/com/github/eerohele/expek/XPathSupport.scala | Scala | mit | 2,159 |
/**
* 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/test/scala/nl/bruijnzeels/tim/rpki/ca/provisioning/MyIdentityTest.scala | Scala | bsd-3-clause | 2,672 |
/* Copyright 2017-19, Emmanouil Antonios Platanios. 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 ... | eaplatanios/tensorflow_scala | modules/api/src/main/scala/org/platanios/tensorflow/api/learn/hooks/ModelDependentHook.scala | Scala | apache-2.0 | 1,827 |
package yandex.metrika
import org.specs2.mutable._
import org.specs2.specification._
import play.api.libs.json._
class MetrikaSpec extends Specification with AllExpectations {
//initialize Metrika with FAKE parameters
var user_login = "api-metrika2" //fake login
var token = "05dd3dd84ff948fdae2bc4fb91f13e22" ... | krispo/yandex-metrika | src/test/scala/yandex/metrika/MetrikaSpec.scala | Scala | mit | 6,437 |
/*
* Copyright (C) 2014 GRNET S.A.
*
* 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 distrib... | grnet/snf-vmcatcher | src/main/scala/gr/grnet/egi/vmcatcher/image/handler/JustLogHandler.scala | Scala | gpl-3.0 | 939 |
package net.selenate.server
import scala.collection.mutable.HashMap
object MapCache {
def empty[K, V] = new MapCache[K, V]()
}
class MapCache[K, V]() {
private case object Lock
private val cache = HashMap.empty[K, V]
def add(key: K, value: V) = Lock.synchronized {
cache.put(key, value)
}
def remove... | tferega/selenate | code/Server/src/main/scala/net/selenate/server/MapCache.scala | Scala | bsd-3-clause | 443 |
package org.akoshterek.backgammon.eval
object Gammons {
/* gammon possible by side on roll */
val G_POSSIBLE: Int = 0x1
/* backgammon possible by side on roll */
val BG_POSSIBLE: Int = 0x2
/* gammon possible by side not on roll */
val OG_POSSIBLE: Int = 0x4
/* backgammon possible by side not on roll */
... | akoshterek/MultiGammonJava | multi-gammon-core/src/main/java/org/akoshterek/backgammon/eval/Gammons.scala | Scala | gpl-3.0 | 350 |
/***********************************************************************
* Copyright (c) 2013-2018 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and... | boundlessgeo/geomesa | geomesa-fs/geomesa-fs-tools/src/main/scala/org/locationtech/geomesa/fs/tools/stats/FsStatsBoundsCommand.scala | Scala | apache-2.0 | 1,295 |
package com.productfoundry.akka.cqrs.publish
import com.productfoundry.akka.cqrs.AggregateEventRecord
import com.productfoundry.akka.messaging.MessageSubscriber
/**
* Indicates this actor receives event publications.
*/
trait EventSubscriber extends MessageSubscriber {
type ReceiveEventRecord = PartialFunction[A... | odd/akka-cqrs | core/src/main/scala/com/productfoundry/akka/cqrs/publish/EventSubscriber.scala | Scala | apache-2.0 | 895 |
/*
* OpenURP, Open University Resouce Planning
*
* Copyright (c) 2013-2014, OpenURP Software.
*
* OpenURP 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 ... | openurp/edu-attendance-core | attendance/src/main/scala/org/openurp/ws/services/teach/attendance/domain/SigninData.scala | Scala | gpl-3.0 | 1,256 |
package com.lookout.borderpatrol.auth
import com.lookout.borderpatrol.ServiceIdentifier
import com.lookout.borderpatrol.sessionx.SessionId
import com.twitter.finagle.Service
/**
* The purpose of this module is to transpose an incoming identified request into a request that the `AccessIssuer`
* understands, send tha... | jamescway/borderpatrol | core/src/main/scala/com/lookout/borderpatrol/auth/Access.scala | Scala | mit | 2,733 |
package info.armado.ausleihe.admin.transport.dataobjects
import javax.xml.bind.annotation.{XmlAccessType, XmlAccessorType, XmlRootElement}
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
case class GameDTO(var barcode: String,
var title: String,
var author: String,
... | Spielekreis-Darmstadt/lending | lending-admin-interfaces/src/main/scala/info/armado/ausleihe/admin/transport/dataobjects/GameDTO.scala | Scala | apache-2.0 | 704 |
package com.socrata.bq.soql.bqreps
import com.rojoma.json.v3.ast.{JNumber, JString, JNull, JValue}
import com.socrata.bq.soql.{BigqueryType, BBQRep}
import com.socrata.soql.types.{SoQLNull, SoQLDouble, SoQLType, SoQLValue}
class DoubleRep extends BBQRep[SoQLType, SoQLValue] {
override def repType: SoQLType = SoQLD... | socrata-platform/soql-bigquery-adapter | common-bq/src/main/scala/com/socrata/bq/soql/bqreps/DoubleRep.scala | Scala | apache-2.0 | 829 |
/*
,i::,
:;;;;;;;
;:,,::;.
1ft1;::;1tL
t1;::;1,
:;::; _____ __ ___ __
fCLff ;:: tfLLC / ___/ / |/ /____ _ _____ / /_
CLft11 :,, i1tffLi \\__ \\ ____ / /|_/... | S-Mach/s_mach.concurrent | src/test/scala/s_mach/concurrent/Tuple18AsyncTaskRunnerTest.scala | Scala | mit | 6,195 |
import org.specs2.execute.FailureException
import scalaxb.compiler.Config
import scalaxb.compiler.ConfigEntry._
import scala.io.Source
class UseListsTest extends TestBase {
val schema = resource("useLists.xsd")
lazy val generatedWithSeqs = module.processFiles(
List(schema),
Config.default.update(PackageN... | eed3si9n/scalaxb | integration/src/test/scala/UseListsTest.scala | Scala | mit | 1,532 |
package com.lonelyplanet.openplanet.client.apis
import com.lonelyplanet.openplanet.client.{Annotate, IncludeParameter, OpenPlanetClient}
import spray.json.JsValue
import scala.collection.immutable.Seq
trait OpAnnotate extends Annotate {
val client: OpenPlanetClient
override def annotationRequest(body: String): ... | lonelyplanet/open-planet-scala-client | src/main/scala/com/lonelyplanet/openplanet/client/apis/OpAnnotate.scala | Scala | mit | 534 |
// Copyright 2014 Foursquare Labs Inc. All Rights Reserved.
package io.fsq.twofishes.indexer.importers.geonames
import io.fsq.twofishes.indexer.util.FsqSimpleFeatureImplicits._
import io.fsq.twofishes.indexer.util.ShapefileIterator
import java.io.FileWriter
import org.slf4s.Logging
// Tool to flatten NaturalEarth Pop... | foursquare/fsqio | src/jvm/io/fsq/twofishes/indexer/importers/geonames/NaturalEarthAttributesFlattener.scala | Scala | apache-2.0 | 1,984 |
/*
* 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 | external/kafka-0-10/src/test/scala/org/apache/spark/streaming/kafka010/KafkaRDDSuite.scala | Scala | apache-2.0 | 9,481 |
package at.logic.gapt.formats.llk
import at.logic.gapt.formats.llk.ast.LambdaAST
import at.logic.gapt.expr._
import at.logic.gapt.formats.ClasspathInputFile
import org.specs2.mutable._
class LLKTest extends Specification {
val p1 =
"""\\AX{T,MON(h_1,\\alpha)}{MON(h_1,\\alpha) }
|\\AX{ NOCC(h_1,\\alpha,\\s... | gebner/gapt | tests/src/test/scala/at/logic/gapt/formats/llk/HybridLatexParserTest.scala | Scala | gpl-3.0 | 6,440 |
package improbable.bridgesettings
import improbable.fapi.bridge._
import improbable.fapi.network.RakNetLinkSettings
import improbable.unity.fabric.AuthoritativeEntityOnly
import improbable.unity.fabric.bridge.FSimAssetContextDiscriminator
import improbable.unity.fabric.engine.EnginePlatform
import improbable.unity.fab... | timtroendle/spatial-cimo | workers/gsim/src/main/scala/improbable/bridgesettings/UnityFSimBridgeSettings.scala | Scala | mit | 932 |
package test;
trait Test3 {
trait MatchableImpl {
trait MatchImpl;
}
trait BracePairImpl {
trait BraceImpl extends MatchableImpl {
private object MyMatch1 extends MatchImpl;
protected def match0 : MatchImpl = MyMatch1;
}
}
}
| yusuke2255/dotty | tests/untried/pos/t651.scala | Scala | bsd-3-clause | 260 |
package org.jetbrains.plugins.scala
package lang
package psi
package stubs
package elements
import com.intellij.psi.PsiElement
import com.intellij.psi.stubs._
import org.jetbrains.plugins.scala.lang.psi.api.statements.ScValue
import org.jetbrains.plugins.scala.lang.psi.stubs.impl.ScValueStubImpl
import org.jetbrains.p... | jastice/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/stubs/elements/ScValueElementType.scala | Scala | apache-2.0 | 1,903 |
/*
* Scala.js (https://www.scala-js.org/)
*
* Copyright EPFL.
*
* Licensed under Apache License 2.0
* (https://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
package java.util
abstract class AbstractSequ... | scala-js/scala-js | javalib/src/main/scala/java/util/AbstractSequentialList.scala | Scala | apache-2.0 | 1,346 |
package com.faacets
package consolidate
import org.scalatest.{FunSuite, Inside, Matchers}
import cats.data.{Validated, ValidatedNel, NonEmptyList => NEL}
import Result.{Failed, Same, Updated}
import cats.implicits._
import com.faacets.consolidate.implicits._
class PersonSuite extends FunSuite with Matchers with Insi... | denisrosset/consolidate | src/test/scala/com.faacets/consolidate/PersonSuite.scala | Scala | mit | 1,873 |
/*
* 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 ... | hongyuhong/flink | flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/DataSetFinalAggFunction.scala | Scala | apache-2.0 | 2,886 |
package com.infinitemule.hopperhack.poursquare.service
import com.infinitemule.hopperhack.poursquare.data.PoursquareDaoMongo
import org.springframework.stereotype.Component
import org.springframework.beans.factory.annotation.Autowired
import com.infinitemule.hopperhack.poursquare.domain._
/*
* A service that in t... | infinitemule/poursquare-client | src/main/scala/com/infinitemule/hopperhack/poursquare/service/PoursquareService.scala | Scala | mit | 1,143 |
/*
* 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/ConnectedComponents.scala | Scala | apache-2.0 | 1,526 |
package se.lu.nateko.cp.data.streams.geo
import scala.collection.mutable.Buffer
import scala.collection.mutable.Map
class PointReducerState{
val lats, lons = Buffer.empty[Double]
val bbox = new BBox
val shortList = Buffer.empty[Int]
val costs = Map.empty[Int, Double]
val inheritedCosts = Map.empty[Int, Double]... | ICOS-Carbon-Portal/data | src/main/scala/se/lu/nateko/cp/data/streams/geo/PointReducerState.scala | Scala | gpl-3.0 | 379 |
package org.jetbrains.plugins.scala
package lang
package parser
package parsing
package statements
import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes
import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder
import org.jetbrains.plugins.scala.lang.parser.parsing.types.Type
/**
* @autho... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/lang/parser/parsing/statements/FunDcl.scala | Scala | apache-2.0 | 1,366 |
package me.axiometry.blocknet.minecraft.net
trait Message {
def name: String
def direction: Direction
}
object Message {
object ToClient {
}
object ToServer {
}
} | Axiometry/Blocknet | blocknet-minecraft/src/main/scala/me/axiometry/blocknet/minecraft/net/Message.scala | Scala | bsd-2-clause | 177 |
package com.netscout.aion2
import com.github.racc.tscg.TypesafeConfigModule
import com.google.inject.{AbstractModule, Guice}
import com.netscout.aion2.inject._
import com.netscout.aion2.model.DataSource
import javax.ws.rs.core.{Application => JAXRSApplication, Response}
import net.codingwell.scalaguice.ScalaModule
... | FlukeNetworks/aion | src/test/scala/com/netscout/aion2/ApplicationSpec.scala | Scala | apache-2.0 | 9,580 |
/*
* 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 ... | lincoln-lil/flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/batch/BatchPhysicalRel.scala | Scala | apache-2.0 | 1,069 |
package com.twitter.finagle.zipkin.core
import com.twitter.conversions.time._
import com.twitter.finagle.stats.NullStatsReceiver
import com.twitter.finagle.tracing.{SpanId, TraceId}
import com.twitter.util.{Future, MockTimer, Time}
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.juni... | koshelev/finagle | finagle-zipkin-core/src/test/scala/com/twitter/finagle/zipkin/core/DeadlineSpanMapTest.scala | Scala | apache-2.0 | 1,108 |
/*
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, software
distr... | sengt/summingbird-batch | summingbird-builder/src/main/scala/com/twitter/summingbird/scalding/ScaldingEnv.scala | Scala | apache-2.0 | 6,805 |
package at.nonblocking.cliwix.integrationtest
import at.nonblocking.cliwix.core.ExecutionContext
import at.nonblocking.cliwix.core.command.{CompanyInsertCommand, SiteInsertCommand}
import at.nonblocking.cliwix.core.handler._
import at.nonblocking.cliwix.core.util.GroupUtil
import at.nonblocking.cliwix.integrationtest.... | nonblocking/cliwix | cliwix-test-integration/src/test/scala/at/nonblocking/cliwix/integrationtest/GroupUtilIntegrationTest.scala | Scala | agpl-3.0 | 1,360 |
package de.ftrossbach.dcos.config.reader.parser
case class Parse(name: String, version: String, json: String) | ftrossbach/dcos-config-tool | src/main/scala/de/ftrossbach/dcos/config/reader/parser/Common.scala | Scala | apache-2.0 | 110 |
package com.gw.events.json
import org.joda.time.DateTime
import play.api.libs.json.Reads._
import play.api.libs.json._
import play.api.libs.functional.syntax._
import com.gw.events._
object Parsers {
import Storage._
val eventAttributesReads: Reads[EventAttribute] = (
(JsPath \ "key").read[String] and (JsPa... | grzesiekw/events | events-store/src/main/scala/com/gw/events/json/Parsers.scala | Scala | apache-2.0 | 1,963 |
/*
* Copyright 2017 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... | liquidarmour/ct-calculations | src/main/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/AC45.scala | Scala | apache-2.0 | 1,121 |
/*
* 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 ... | mylog00/flink | flink-libraries/flink-table/src/main/scala/org/apache/flink/table/util/TableConnectorUtil.scala | Scala | apache-2.0 | 1,225 |
package com.wavesplatform.it.sync.grpc
import com.google.protobuf.ByteString
import com.typesafe.config.Config
import com.wavesplatform.api.grpc.BlockRangeRequest
import com.wavesplatform.block.Block
import com.wavesplatform.common.state.ByteStr
import com.wavesplatform.crypto
import com.wavesplatform.it.api.SyncGrpcA... | wavesplatform/Waves | node-it/src/test/scala/com/wavesplatform/it/sync/grpc/BlockV5GrpcSuite.scala | Scala | mit | 4,084 |
/* sbt -- Simple Build Tool
* Copyright 2010 Mark Harrah
*/
package sbt
import java.io.{File, PrintWriter}
final case class GlobalLogging(full: Logger, backed: ConsoleLogger, backing: GlobalLogBacking)
final case class GlobalLogBacking(file: File, last: Option[File], newLogger: (PrintWriter, GlobalLogBacking) => G... | harrah/xsbt | util/log/src/main/scala/sbt/GlobalLogging.scala | Scala | bsd-3-clause | 1,312 |
package no.mesan.hipchatparse.utils
import org.junit.runner.RunWith
import org.scalatest._
import Tools._
import org.scalatest.junit.JUnitRunner
@RunWith(classOf[JUnitRunner])
class ToolsSpec extends FlatSpec with Matchers {
"ToolsSpec.urlParse" should "handle empty strings" in {
urlParse("") shouldBe empty
... | lre-mesan/hipchatparse | src/test/scala/no/mesan/hipchatparse/utils/ToolsSpec.scala | Scala | mit | 1,997 |
/**
* Copyright 2009 Google 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 agree... | railscook/etherpad | infrastructure/net.appjet.bodylock/compressor.scala | Scala | apache-2.0 | 9,723 |
package eu.inn.binders.value
import java.util.Date
import eu.inn.binders.core.Serializer
import eu.inn.binders.naming.Converter
import scala.language.experimental.macros
class ValueSerializeException(message: String) extends RuntimeException(message)
trait ValueSerializerBaseTrait[C <: Converter] extends Serializer... | InnovaCo/binders | src/main/scala/eu/inn/binders/value/ValueSerializer.scala | Scala | bsd-3-clause | 2,432 |
package com.classification
import io.prediction.controller.EngineFactory
import io.prediction.controller.Engine
class Query(
val attr0 : Double,
val attr1 : Double,
val attr2 : Double
) extends Serializable
class PredictedResult(
val label: Double
) extends Serializable
class ActualResult(
val label: Doub... | PredictionIO/open-academy | AminManna/MyClassification/src/main/scala/Engine.scala | Scala | apache-2.0 | 568 |
package com.rasterfoundry
import com.rasterfoundry.database.filter.Filterables
import com.rasterfoundry.database.meta.RFMeta
import com.rasterfoundry.datamodel.Credential
import com.rasterfoundry.datamodel.ExportAssetType
import cats.data.NonEmptyList
import doobie.Get
import doobie.Meta
import doobie.Put
package ob... | raster-foundry/raster-foundry | app-backend/db/src/main/scala/package.scala | Scala | apache-2.0 | 1,118 |
package com.argcv.valhalla.ml.common
//import spire.syntax.std.{ArrayOps => SArrayOps}
import spire.implicits.cfor
import scala.collection.{ AbstractSeq, Iterable, Seq, Traversable, TraversableOnce, immutable, mutable }
import scala.reflect.ClassTag
/**
*
* @author Yu Jing <yu@argcv.com> on 10/9/16
*/
@SerialVer... | yuikns/valhalla | src/main/scala/com/argcv/valhalla/ml/common/Vec.scala | Scala | mit | 5,038 |
package mesosphere.marathon.api.v2
import mesosphere.marathon.api.TestAuthFixture
import mesosphere.marathon.core.group.GroupManager
import mesosphere.marathon.state.{ AppDefinition, Group, PathId }
import mesosphere.marathon.test.{ MarathonSpec, Mockito }
import mesosphere.marathon.upgrade.DeploymentManager.Deploymen... | timcharper/marathon | src/test/scala/mesosphere/marathon/api/v2/DeploymentsResourceTest.scala | Scala | apache-2.0 | 2,736 |
package instrumentti
import processing.core.PVector
object NodeO {
val nodeDisplayRadius = 10
}
class Node(var location: PVector) extends Element(ElementCollection.getNextNodeId) {
ElementCollection.addNode(this)
val main = InstrumenttiMain
def display = {
main.stroke(0)
main.noFill()
main.e... | transfluxus/PublicInstrumentti | src/instrumentti/Node.scala | Scala | mit | 820 |
/***********************************************************************
* Copyright (c) 2013-2016 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 ... | tkunicki/geomesa | geomesa-accumulo/geomesa-accumulo-gs-plugin/src/main/scala/org/locationtech/geomesa/plugin/security/SpringAuditProvider.scala | Scala | apache-2.0 | 2,037 |
import sbt._
import Keys._
import play.Project._
object ApplicationBuild extends Build {
val appName = "optionometer"
val appVersion = "1.0.1"
val appDependencies = Seq(
jdbc,
anorm,
"postgresql" % "postgresql" % "9.1-901.jdbc4",
"com.github.nscala-time" %% "nscala-time" % "0.6.0"
... | Exupery/optionometer | project/Build.scala | Scala | mit | 436 |
package com.twitter.finagle.netty3.codec
import com.twitter.finagle.Failure
import com.twitter.io.{Buf, Charsets}
import org.jboss.netty.buffer.{ChannelBuffer, ChannelBuffers}
import org.jboss.netty.handler.codec.embedder.{CodecEmbedderException, DecoderEmbedder, EncoderEmbedder}
import org.junit.runner.RunWith
import... | adriancole/finagle | finagle-core/src/test/scala/com/twitter/finagle/netty3/codec/BufCodecTest.scala | Scala | apache-2.0 | 1,169 |
package io.sqooba.oss.timeseries.immutable
import io.sqooba.oss.timeseries.TimeSeriesTestBench
import org.scalatest.matchers.should.Matchers
import org.scalatest.flatspec.AnyFlatSpec
class VectorTimeSeriesSpec extends AnyFlatSpec with Matchers with TimeSeriesTestBench {
"A VectorTimeSeries (unsafe)" should behave ... | Shastick/scala-timeseries-lib | src/test/scala/io/sqooba/oss/timeseries/immutable/VectorTimeSeriesSpec.scala | Scala | apache-2.0 | 11,363 |
package edu.gemini.p2checker.util
import edu.gemini.p2checker.api.ObservationElements
import edu.gemini.spModel.target.offset.OffsetPosBase
import edu.gemini.spModel.target.offset.OffsetPosList
import edu.gemini.spModel.target.offset.OffsetUtil
import scala.collection.JavaConverters._
/**
* Created with IntelliJ ID... | arturog8m/ocs | bundle/edu.gemini.p2checker/src/main/scala/edu/gemini/p2checker/util/PositionOffsetChecker.scala | Scala | bsd-3-clause | 1,152 |
package com.stulsoft.serialization
/**
* @author Yuriy Stul.
*/
case class Message2(content:String)
| ysden123/poc | pserialization/src/main/scala/com/stulsoft/serialization/Message2.scala | Scala | mit | 105 |
package weeks.second
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
import weeks.second.HighOrderFun._
@RunWith(classOf[JUnitRunner])
class HighOrderFunSuite extends FunSuite {
private def id(x: Int) = x
private def square(x: Int) = x * x
test("sum of num... | unbowed/progfun | src/test/scala/weeks/second/HighOrderFunSuite.scala | Scala | mit | 847 |
package tests.test
private[test] trait Private {
def /*caret*/foo = ???
}
class Public extends Private
| triplequote/intellij-scala | scala/scala-impl/testdata/rename3/privatePackageClassInheritor/before/tests/test/Private.scala | Scala | apache-2.0 | 107 |
/*
* 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 ... | tillrohrmann/flink | flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/metadata/FlinkRelMdPopulationSizeTest.scala | Scala | apache-2.0 | 21,124 |
package org.airpnp.ui
import javax.swing.JPanel
import java.awt.BorderLayout
import org.airpnp.upnp.Device
import javax.swing.JLabel
import javax.swing.JTree
import javax.swing.tree.TreeModel
import javax.swing.JSplitPane
import javax.swing.tree.DefaultTreeModel
import java.awt.Dimension
import javax.swing.event.TreeM... | provegard/ScAirPnp | src/main/scala/org/airpnp/ui/AirPnpPanel.scala | Scala | mit | 1,626 |
package levd
import leon._
import mem._
import lang._
import annotation._
import instrumentation._
import invariant._
import collection._
object LevenshteinDistance {
@ignore
var xstring = Array[BigInt]()
@ignore
var ystring = Array[BigInt]()
@extern
def lookup(i: BigInt, j: BigInt) = {
(xstring(i.to... | epfl-lara/leon | testcases/web/memresources/02_LevenshteinDistance.scala | Scala | gpl-3.0 | 3,394 |
package org.jetbrains.plugins.scala
package lang
package psi
package impl
package expr
import com.intellij.lang.ASTNode
import org.jetbrains.plugins.scala.lang.psi.api.expr._
/**
* @author Alexander Podkhalyuzin
* Date: 06.03.2008
*/
class ScMethodCallImpl(node: ASTNode) extends ScExpressionImplBase(nod... | triplequote/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/expr/ScMethodCallImpl.scala | Scala | apache-2.0 | 972 |
package com.ignition.frame
import org.junit.runner.RunWith
import org.specs2.runner.JUnitRunner
@RunWith(classOf[JUnitRunner])
class KafkaInputSpec extends FrameFlowSpecification {
"KafkaInput" should {
"construct with defaults" in {
val step = KafkaInput("zk", "topic", "group")
step.zkUrl === "zk... | uralian/ignition | src/test/scala/com/ignition/frame/KafkaInputSpec.scala | Scala | apache-2.0 | 2,835 |
/*
* 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 | core/src/test/scala/org/apache/spark/serializer/GenericAvroSerializerSuite.scala | Scala | apache-2.0 | 3,380 |
package com.blinkbox.books.marvin.ui
import akka.actor.ActorRefFactory
import com.blinkbox.books.config.ApiConfig
import com.blinkbox.books.logging.DiagnosticExecutionContext
import com.blinkbox.books.spray.v2.Implicits.throwableMarshaller
import com.blinkbox.books.spray.{Directives => CommonDirectives, _}
import com.... | blinkboxbooks/marvin-frontend.js | src/main/scala/com/blinkbox/books/marvin/ui/PublicApi.scala | Scala | mit | 1,407 |
/*
* Copyright (c) 2014-2021 by The Monix Project Developers.
* See the project homepage at: https://monix.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache... | monixio/monix | monix-execution/jvm/src/main/scala/monix/execution/internal/Platform.scala | Scala | apache-2.0 | 6,360 |
/**
* Licensed to Big Data Genomics (BDG) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The BDG licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use ... | massie/adam | adam-core/src/test/scala/org/bdgenomics/adam/rdd/variant/GenotypeRDDSuite.scala | Scala | apache-2.0 | 8,474 |
/*
* Scala.js (https://www.scala-js.org/)
*
* Copyright EPFL.
*
* Licensed under Apache License 2.0
* (https://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
package org.scalajs.linker.backend.emitter
im... | scala-js/scala-js | linker/shared/src/main/scala/org/scalajs/linker/backend/emitter/CoreJSLib.scala | Scala | apache-2.0 | 80,727 |
package toguru.impl
import java.util.concurrent.Executors
import net.jodah.failsafe.CircuitBreaker
import org.mockito.Mockito._
import org.mockito.scalatest.IdiomaticMockito
import org.scalatest.OptionValues
import org.scalatest.matchers.must.Matchers
import org.scalatest.wordspec.AnyWordSpec
import sttp.client.testin... | AutoScout24/toguru-scala-client | core/src/test/scala/toguru/impl/RemoteActivationsProviderSpec.scala | Scala | mit | 8,371 |
/*
* Copyright ixias.net All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license
* For the full copyright and license information,
* please view the LICENSE file that was distributed with this source code.
*/
package ixias.mail
import java.util.ArrayList
import javax.inject.Singleto... | sp1rytus/ixias | framework/ixias-mail/src/main/scala/ixias/EmailClientViaTwillio.scala | Scala | mit | 1,995 |
package org.jetbrains.plugins.scala.scalai18n.codeInspection.i18n.internal
import com.intellij.codeInspection.LocalInspectionTool
import org.jetbrains.plugins.scala.DependencyManagerBase.RichStr
import org.jetbrains.plugins.scala.base.libraryLoaders.{IvyManagedLoader, LibraryLoader}
import org.jetbrains.plugins.scala.... | JetBrains/intellij-scala | scala/integration/properties/test/org/jetbrains/plugins/scala/scalai18n/codeInspection/i18n/internal/DynamicPropertyKeyInspectionTest.scala | Scala | apache-2.0 | 2,118 |
package de.htwg.zeta.server.module
import javax.inject.Singleton
import com.google.inject.Provides
import de.htwg.zeta.common.format.entity.BondedTaskFormat
import de.htwg.zeta.common.format.entity.EventDrivenTaskFormat
import de.htwg.zeta.common.format.entity.FileFormat
import de.htwg.zeta.common.format.entity.Filte... | Zeta-Project/zeta | api/server/app/de/htwg/zeta/server/module/JsonFormatModule.scala | Scala | bsd-2-clause | 5,547 |
package sbt
package inc
import xsbti.api.Source
import xsbt.api.SameAPI
import java.io.File
private final class IncrementalDefaultImpl(log: Logger, options: IncOptions) extends IncrementalCommon(log, options) {
// Package objects are fragile: if they inherit from an invalidated source, get "class file needed by pa... | som-snytt/xsbt | compile/inc/src/main/scala/sbt/inc/IncrementalDefaultImpl.scala | Scala | bsd-3-clause | 2,882 |
package org.jetbrains.plugins.scala.testingSupport.utest.scala2_12.utest_0_7_4
import org.jetbrains.plugins.scala.testingSupport.utest.UTestNewSyntaxSimpleTest
class UTestSimpleTest_2_12_0_7_4 extends UTestTestBase_2_12_0_7_4 with UTestNewSyntaxSimpleTest | JetBrains/intellij-scala | scala/scala-impl/test/org/jetbrains/plugins/scala/testingSupport/utest/scala2_12/utest_0_7_4/UTestSimpleTest_2_12_0_7_4.scala | Scala | apache-2.0 | 257 |
package java.lang
trait AutoCloseable {
def close(): Unit
}
| cedricviaccoz/scala-native | javalib/src/main/scala/java/lang/AutoCloseable.scala | Scala | bsd-3-clause | 63 |
package demo
package pages
import demo.components.LeftNavPage
import demo.routes.{LeftRoute, ReactTreeViewRouteModule}
import japgolly.scalajs.react._
import japgolly.scalajs.react.extra.router.RouterCtl
object ReactTreeViewPage {
val component = ScalaComponent
.builder[Props]("ReactTreeViewPage")
.renderBa... | aparo/scalajs-react-components | demo/src/main/scala/demo/pages/ReactTreeViewPage.scala | Scala | apache-2.0 | 684 |
// Copyright (C) 2011 Dmitri Nikulin
//
// This file is part of Vijil.
//
// Vijil is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later ve... | dnikulin/vijil | src/main/scala/com/dnikulin/vijil/tools/TryOrNone.scala | Scala | agpl-3.0 | 1,190 |
/*
* Copyright 2011-2018 GatlingCorp (http://gatling.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... | wiacekm/gatling | gatling-jms/src/main/scala/io/gatling/jms/check/JmsCheckSupport.scala | Scala | apache-2.0 | 2,016 |
/***********************************************************************
* Copyright (c) 2013-2016 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 ... | MutahirKazmi/geomesa | geomesa-accumulo/geomesa-accumulo-security/src/test/scala/org/locationtech/geomesa/accumulo/security/TestAuthorizationsProvider.scala | Scala | apache-2.0 | 1,201 |
/*
* Copyright (C) 2016 Department for Business, Energy and Industrial Strategy
*
* 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) an... | UKGovernmentBEIS/rifs-frontend-play | src/main/scala/forms/DateTimeRangeField.scala | Scala | gpl-3.0 | 2,666 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | BryanCutler/spark | core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala | Scala | apache-2.0 | 47,326 |
package com.wavesplatform.state.diffs
import com.google.common.primitives.Ints
import com.wavesplatform.account.KeyPair
import com.wavesplatform.common.utils.EitherExt2
import com.wavesplatform.db.WithDomain
import com.wavesplatform.db.WithState.AddrWithBalance
import com.wavesplatform.features.BlockchainFeatures
impo... | wavesplatform/Waves | node/src/test/scala/com/wavesplatform/state/diffs/SetScriptTransactionDiffTest.scala | Scala | mit | 14,386 |
/***********************************************************************
* 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 ... | giserh/geomesa | geomesa-convert/geomesa-convert-text/src/test/scala/org/locationtech/geomesa/convert/text/DelimitedTextConverterTest.scala | Scala | apache-2.0 | 10,537 |
package example
object Issue2144/*<=example.Issue2144.*/ {
class Test/*<=example.Issue2144.Test#*/(a/*<=example.Issue2144.Test#a.*/: Boolean/*=>scala.Boolean#*/, b/*<=example.Issue2144.Test#b.*/: Int/*=>scala.Int#*/ = 1, c/*<=example.Issue2144.Test#c.*/: Int/*=>scala.Int#*/ = 2)
val x/*<=example.Issue2144.x.*/ = ne... | scalameta/scalameta | tests/jvm/src/test/resources/example/Issue2144.scala | Scala | bsd-3-clause | 461 |
package com.geishatokyo.diffsql.parser
import scala.annotation.tailrec
import scala.util.matching.Regex
import scala.util.parsing.combinator.RegexParsers
import com.geishatokyo.diffsql.{Name, Definition}
import scala.language.implicitConversions
/**
* Created by takeshita on 14/02/14.
*/
trait SQLParser extends Reg... | geishatokyo/diff-sql-table | parser/src/main/scala/com/geishatokyo/diffsql/parser/SQLParser.scala | Scala | mit | 3,980 |
package org.randi3.model
object TrialSubjectIdentificationCreationType extends Enumeration {
val EXTERNAL, CONTINUOUS_COUNTER, TRIAL_ARM_COUNTER = Value
}
| dschrimpf/randi3-core | src/main/scala/org/randi3/model/TrialSubjectIdentificationCreationType.scala | Scala | gpl-3.0 | 161 |
/*
* Copyright 2001-2011 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... | yyuu/scalatest | src/main/scala/org/scalatest/PartialFunctionValues.scala | Scala | apache-2.0 | 5,890 |
package com.seanshubin.templater.domain
import java.nio.file.Path
case class CopyFileCommand(origin: Path, destination: Path)
| SeanShubin/generate-from-template | domain/src/main/scala/com/seanshubin/templater/domain/CopyFileCommand.scala | Scala | unlicense | 128 |
/*
* Copyright 2014–2018 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... | slamdata/matryoshka | tests/shared/src/test/scala/matryoshka/instances/fixedpoint/partial.scala | Scala | apache-2.0 | 4,006 |
/*
* Copyright 2017 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... | VlachJosef/bforms | app/uk/gov/hmrc/bforms/repositories/FormTemplateRepository.scala | Scala | apache-2.0 | 1,803 |
/* __ *\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL **
** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\___/_/ |_/... | felixmulder/scala | src/library/scala/concurrent/Awaitable.scala | Scala | bsd-3-clause | 2,779 |
/*
* Copyright 2016 The BigDL Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | intel-analytics/BigDL | scala/dllib/src/test/scala/com/intel/analytics/bigdl/dllib/nn/SoftPlusSpec.scala | Scala | apache-2.0 | 1,069 |
/*
* 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 ... | cloudml/zen | ml/src/test/scala/com/github/cloudml/zen/ml/clustering/LDASuite.scala | Scala | apache-2.0 | 11,064 |
package edu.duke.oit.vw.models
import org.apache.solr.client.solrj.SolrServer
import edu.duke.oit.vw.utils._
import java.util.Date
import org.slf4j.{Logger, LoggerFactory}
object Person extends SolrModel
with AttributeParams {
def find(uri: String, solr: SolrServer): Option[Person] = {
getDocumentByIdOrAl... | OIT-ADS-Web/vivo_widgets | src/main/scala/models/Person.scala | Scala | bsd-3-clause | 6,755 |
/**
* Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com>
*/
package akka.stream.testkit
import java.io.PrintStream
import java.lang.management.{ ManagementFactory, ThreadInfo }
import java.util.Date
import java.util.concurrent.{ TimeoutException, CountDownLatch }
import org.scalatest.{ BeforeAndAfterAll... | imace/open-muvr | server/exercise/src/test/scala/akka/stream/testkit/Coroner.scala | Scala | apache-2.0 | 9,262 |
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.