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 |
|---|---|---|---|---|---|
/**
* Copyright (c) 2002-2014, OnPoint Digital, Inc. All rights reserved
*
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS... | phantomspectre/timez | src/main/scala/timez/syntax/time/YearMonthSyntax.scala | Scala | bsd-3-clause | 1,113 |
/*
* Licensed to Intel Corporation under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* Intel Corporation licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use t... | SeaOfOcean/BigDL | dl/src/main/scala/com/intel/analytics/bigdl/example/loadmodel/ModelValidator.scala | Scala | apache-2.0 | 5,674 |
/*
* 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 ... | szhem/spark | core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala | Scala | apache-2.0 | 29,777 |
package ostinato.chess
import ostinato.core.{BoardSize, XY}
import scala.util.control.NoStackTrace
import scala.util.{Failure, Success, Try}
package object core {
implicit val chessBoardSize = BoardSize(8, 8)
object CastlingSide extends Enumeration {
type CastlingSide = Value
val Queenside, Kingside = V... | MarianoGappa/ostinato | shared/src/main/scala/ostinato/chess/core/package.scala | Scala | mit | 20,936 |
final object Foo // error
| som-snytt/dotty | tests/neg-custom-args/fatal-warnings/i4936.scala | Scala | apache-2.0 | 26 |
package com.github.astonbitecode.zoocache
/**
* Does the needed actions (if needed) to notify the caller
*/
private[astonbitecode] trait MessageNotifyable {
/**
* Do stuff once the message handling was successful
* @param path The path for which the operation was successful
* @return Boolean True if the s... | astonbitecode/scakka-zoo-cache | src/main/scala/com/github/astonbitecode/zoocache/MessageNotifyable.scala | Scala | mit | 1,075 |
package com.twitter.finagle.service
import com.twitter.finagle.{ServiceFactoryProxy, ServiceFactory}
import com.twitter.util.Updatable
/**
* An updatable service factory proxy.
*
* @param init The starting factory to proxy to
*/
private[finagle] class ServiceFactoryRef[Req, Rep](init: ServiceFactory[Req, Rep])
... | luciferous/finagle | finagle-core/src/main/scala/com/twitter/finagle/service/ServiceFactoryRef.scala | Scala | apache-2.0 | 622 |
/**
* Copyright (C) 2012 Orbeon, Inc.
*
* 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
* 2.1 of the License, or (at your option) any later version.
*
* This prog... | wesley1001/orbeon-forms | src/main/scala/org/orbeon/oxf/xforms/state/DynamicState.scala | Scala | lgpl-2.1 | 12,043 |
package org.scalajs.nio
import scala.scalajs.js
import js.Dynamic.{ global => g }
import org.scalajs.dom
class AdaptiveShortBuffer(cap: Int, lim: Int, pos: Int, mar: Int, mBuffer: dom.ArrayBuffer,
mBufferOffset: Int, mByteOrder: ByteOrder) extends NativeShortBuffer(cap, lim, pos, mar, mBuffer, mBufferOffset) {
pr... | storm-enroute/macrogl | src/buffer/scala/org/scalajs/nio/AdaptiveShortBuffer.scala | Scala | bsd-3-clause | 2,784 |
package object tut {
import Zed.{IO, StateT}
type Tut[A] = StateT[IO, TutState, A]
}
| tpolecat/tut | modules/core/src/main/scala/tut/package.scala | Scala | mit | 90 |
/*
This file is part of Octetoscope.
Copyright (C) 2013-2014 Octetoscope contributors (see /AUTHORS.txt)
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
... | SpecLad/Octetoscope | core/src/test/scala/ru/corrigendum/octetoscope/core/CommonConstraintsSuite.scala | Scala | gpl-3.0 | 2,560 |
/*
* Copyright (C) 2020 MapRoulette contributors (see CONTRIBUTORS.md).
* Licensed under the Apache License, Version 2.0 (see LICENSE).
*/
package org.maproulette.provider.osm.objects
import org.joda.time.DateTime
import org.maproulette.cache.CacheObject
import org.maproulette.provider.osm.OSMType
import org.maprou... | mgcuthbert/maproulette2 | app/org/maproulette/provider/osm/objects/VersionedObjects.scala | Scala | apache-2.0 | 5,087 |
package dotty.tools.dotc
package ast
import core._
import Types._, Names._, Flags._, util.Positions._, Contexts._, Constants._, SymDenotations._, Symbols._
import Denotations._, StdNames._
import annotation.tailrec
import language.higherKinds
import collection.IndexedSeqOptimized
import collection.immutable.IndexedSeq... | DarkDimius/dotty | src/dotty/tools/dotc/ast/Trees.scala | Scala | bsd-3-clause | 61,978 |
package org.akka.essentials.zeromq.example2
import akka.dispatch.Await
import akka.actor.ActorSystem
import akka.util.Timeout
import akka.actor.Props
object MyActorSystem {
def main(args: Array[String]): Unit = {
val system = ActorSystem("zeromqTest")
system.actorOf(Props[RouterActor], name = "router")
... | rokumar7/trial | AkkaWithZeroMQ/src/main/scala/org/akka/essentials/zeromq/example2/MyActorSystem.scala | Scala | unlicense | 435 |
/*
* 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/shared/src/test/scala/monix/execution/atomic/GenericAtomicSuite.scala | Scala | apache-2.0 | 59,665 |
import sbt._
class TestCompatProject(info: ProjectInfo) extends DefaultProject(info)
{
val testInterface = "org.scala-tools.testing" % "test-interface" % "0.4" % "provided"
val scalacheck = "org.scala-tools.testing" % "scalacheck" % "1.5" % "provided"
val scalatest = "org.scalatest" % "scalatest" % "1.0" % "provide... | harrah/test-compat | project/build/TestCompatProject.scala | Scala | bsd-3-clause | 891 |
package io.getquill.context.sql.dsl
import io.getquill.context.sql.SqlContext
trait SqlDsl {
this: SqlContext[_, _] =>
implicit class Like(s1: String) {
def like(s2: String) = quote(infix"$s1 like $s2".as[Boolean])
}
}
| mentegy/quill | quill-sql/src/main/scala/io/getquill/context/sql/dsl/SqlDsl.scala | Scala | apache-2.0 | 232 |
/* __ *\\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2002-2013, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\\___/_/... | rorygraves/perf_tester | corpus/scala-library/src/main/scala/Enumeration.scala | Scala | apache-2.0 | 12,889 |
package ca.pgx.common.events
import ca.pgx.common.mixins.callback.EnumeratedFunction
import net.liftweb.json.JsonAST.JValue
/**
* Type of action taken when event was processed.
*/
object EventAction extends EnumeratedFunction[String, Unit] {
type EventAction = Value
val EMAIL, LOG, REST_CALL, OS_CMD = Value
... | pgxcentre/eventhub | common/src/main/scala/ca/pgx/common/events/EventAction.scala | Scala | apache-2.0 | 615 |
package com.payu.shorturl.util
import com.typesafe.scalalogging.LazyLogging
trait Logging extends LazyLogging | felipehaack/shorturl | payu-api/app/com/payu/shorturl/util/Logging.scala | Scala | gpl-3.0 | 111 |
/************************************************************************\\
** Project **
** ______ ______ __ ______ ____ **
** / ____/ / __ / / / / __ / / __/ (c) 2011-2014 **
** / /__ / /_... | lrytz/spire | examples/src/main/scala/spire/example/ZigguratGenerator.scala | Scala | mit | 2,514 |
/*
* Copyright 2015 Daniel Spiewak
*
* 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 ... | djspiewak/sparse | src/test/scala/scalaz/stream/parsers/ParserSpecs.scala | Scala | apache-2.0 | 8,287 |
/*
* 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... | jedesah/Quasar | core/src/main/scala/quasar/db/ConnectionInfo.scala | Scala | apache-2.0 | 804 |
package controllers
import java.util.UUID
import org.specs2.matcher.JsonMatchers
import org.specs2.specification.Scope
import play.api.libs.json.Json
import scala.concurrent.Future
import controllers.backend.PluginBackend
import com.overviewdocs.models.Plugin
import com.overviewdocs.test.factories.PodoFactory
class ... | overview/overview-server | web/test/controllers/PluginControllerSpec.scala | Scala | agpl-3.0 | 5,006 |
object Test {
def main(args: Array[String]): Unit = {
println((new Foo: Bar[Boolean]).value1)
println((new Foo: Bar[Boolean]).value2())
}
}
class Foo extends Baz with Bar[Boolean]
trait Bar[T] {
def value1: T
def value2(): T
}
class Baz {
def value1: Boolean = true
def value2(): Boolean = true
}... | som-snytt/dotty | tests/run/mixin-primitive-on-generic-2.scala | Scala | apache-2.0 | 321 |
/*
* 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 ... | wowmsi/safe | safe-lang/src/main/scala/safe/safesets/SafeSetsMessageProtocol.scala | Scala | apache-2.0 | 3,034 |
package dotty.tools.lispify
import dotty.tools.dotc.ast.untpd._
import dotty.tools.dotc.core.Constants.Constant
object Lispyfy {
var shift = 0
def debug(tree: Any) = {
print(tree + " ")
}
def shiftLn(): Unit = {
println()
print(" " * shift)
}
def shiftLeft(): Unit = {
shift -= 4
}
... | spetz911/dotty | src/dotty/tools/lispify/Lispyfy.scala | Scala | bsd-3-clause | 6,620 |
package com.twitter.finagle.util
import com.twitter.finagle.core.util.InetAddressUtil
import java.net.InetAddress
import org.scalatest.funsuite.AnyFunSuite
class InetAddressUtilTest extends AnyFunSuite {
test("InetAddressUtil should isPrivateAddress") {
import InetAddressUtil.isPrivateAddress
assert(!isPri... | twitter/finagle | finagle-core/src/test/scala/com/twitter/finagle/util/InetAddressUtilTest.scala | Scala | apache-2.0 | 1,409 |
package org.mandrake.simulation
trait Event extends StateInput
| louis-mon/mandrake | src/main/scala/org/mandrake/simulation/Event.scala | Scala | mit | 64 |
/*
* Scala (https://www.scala-lang.org)
*
* Copyright EPFL and Lightbend, Inc.
*
* Licensed under Apache License 2.0
* (http://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
package scala.tools
package re... | scala/scala | src/compiler/scala/tools/reflect/ReflectGlobal.scala | Scala | apache-2.0 | 3,094 |
package org.apache.spark.ml.parity.clustering
import org.apache.spark.ml.clustering.BisectingKMeans
import org.apache.spark.ml.feature.{StringIndexer, VectorAssembler}
import org.apache.spark.ml.{Pipeline, Transformer}
import org.apache.spark.ml.parity.SparkParityBase
import org.apache.spark.sql._
/**
* Created by ... | combust/mleap | mleap-spark/src/test/scala/org/apache/spark/ml/parity/clustering/BisectingKMeansParitySpec.scala | Scala | apache-2.0 | 1,016 |
package examples3
import org.scalatest.FunSuite
import scala.runtime.ScalaRunTime
class CaseClassPersonTest extends FunSuite {
test("apply & equals") {
val pA1 = Person("Alex1", 12)
val pA2 = Person.apply("Alex", 12)
val pA3 = Person("Alex", 12)
assert(pA1 === pA1)
assert(pA1 !== pA2)
asser... | pharmpress/codingdojo | scala-case/src/test/scala/examples1/CaseClassPersonTest.scala | Scala | apache-2.0 | 2,071 |
package x7c1.wheat.macros.intent
import android.content.Context
import android.os.Bundle
import x7c1.wheat.macros.base.PublicFieldsFinder
import scala.language.experimental.macros
import scala.reflect.macros.blackbox
object ServiceCaller {
def using[A]: ServiceCaller[A] = new ServiceCaller[A]
def reify[A](conte... | x7c1/Linen | wheat-macros/src/main/scala/x7c1/wheat/macros/intent/ServiceCaller.scala | Scala | mit | 2,754 |
package metrics
import com.codahale.metrics.MetricRegistry
import nl.grons.metrics.scala.{HdrMetricBuilder, InstrumentedBuilder}
trait Instrumented extends InstrumentedBuilder {
val metricsManager: MetricsManager
override lazy protected val metricBuilder = new HdrMetricBuilder(metricBaseName, metricRegistry, res... | alexanderfefelov/area-451 | app/metrics/Instrumented.scala | Scala | mit | 422 |
/*
* Copyright 2012-2017 Johannes Rudolph
*
* 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 ... | jrudolph/json-lenses | src/main/scala/spray/json/lenses/JsonPathParser.scala | Scala | apache-2.0 | 5,039 |
/*
* 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.aws.qldb.databind
import com.fasterxml.jackson.module.scala.... | sp1rytus/ixias | framework/ixias-aws-qldb/src/main/scala/ixias/aws/qldb/databind/DatabindModule.scala | Scala | mit | 583 |
/*
* 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/main/scala/com/intel/analytics/bigdl/dllib/nn/internal/Deconvolution2D.scala | Scala | apache-2.0 | 5,654 |
package mesosphere.marathon.core.appinfo
import mesosphere.marathon.core.task.Task
import mesosphere.marathon.core.health.Health
import mesosphere.marathon.state.PathId
case class EnrichedTask(
appId: PathId,
task: Task,
healthCheckResults: Seq[Health],
servicePorts: Seq[Int] = Nil)
| timcharper/marathon | src/main/scala/mesosphere/marathon/core/appinfo/EnrichedTask.scala | Scala | apache-2.0 | 294 |
object ArrayUtils {
def filter(xs: Array[Int], pred: Int => Boolean): Array[Int] = ???
def map(xs: Array[Int], f: Int => Int): Array[Int] = ???
def filtering(pred: Int => Boolean): Array[Int] => Array[Int] =
xs => filter(xs, pred)
def mapping(f: Int => Int): Array[Int] => Array[Int] =
xs => map(... | agconti/scala-school | 04-functions-as-values/slides/slide073.scala | Scala | mit | 534 |
/*
* Copyright 2017 Frugal Mechanic (http://frugalmechanic.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required... | frugalmechanic/fm-common | jvm/src/main/scala/fm/common/UUID.scala | Scala | apache-2.0 | 15,914 |
/*
* Copyright (c) 2014 Dufresne Management Consulting LLC.
*/
package com.nickelsoftware.bettercare4me.hedis.hedis2014
import scala.util.Random
import org.joda.time.DateTime
import org.joda.time.Interval
import com.nickelsoftware.bettercare4me.hedis.HEDISRule
import com.nickelsoftware.bettercare4me.hedis.Scorecar... | reactivecore01/bettercare4.me | play/app/com/nickelsoftware/bettercare4me/hedis/hedis2014/CDC_HbA1c_TestRule.scala | Scala | apache-2.0 | 2,886 |
package io.bimble.pqgram
import org.scalacheck.Prop
import org.scalatest.PropSpec
import org.scalatest.prop.Checkers
class BoundingLaws extends PropSpec with Checkers {
implicit object BoundedString extends Bounded[String] {
override val infimum: String = "__INFIMUM"
override val supremum: String = "__SUPR... | hythloday/pqgram | src/test/scala/io/bimble/pqgram/BoundingLaws.scala | Scala | apache-2.0 | 1,386 |
package com.sksamuel.scapegoat.inspections.unnecessary
import com.sksamuel.scapegoat.inspections.unneccesary.UnusedMethodParameter
import com.sksamuel.scapegoat.{InspectionTest, Warning}
/** @author Stephen Samuel */
class UnusedMethodParameterTest extends InspectionTest {
override val inspections = Seq(new Unused... | sksamuel/scalac-scapegoat-plugin | src/test/scala/com/sksamuel/scapegoat/inspections/unnecessary/UnusedMethodParameterTest.scala | Scala | apache-2.0 | 6,989 |
package org.nisshiee.towerdefense
import org.nisshiee.towerdefensescala._
class RichPoint(val underlying: Point) extends AnyVal {
def +(p: Point) =
Point(underlying.x + p.x, underlying.y + p.y)
def +(p: (Int, Int)) = p match {
case (x, y) => Point(underlying.x + x, underlying.y + y)
}
def neighbors... | nisshiee/towerdefense-nisshiee | player/src/main/scala/util/RichPoint.scala | Scala | mit | 554 |
package suiryc.scala.akka
import akka.actor.{Actor, ActorRef, Terminated}
import com.typesafe.scalalogging.StrictLogging
import scala.collection.mutable.ArrayBuffer
/**
* Reaper companion object.
*/
object Reaper {
/** Actor message: register an Actor for watching. */
case class WatchMe(ref: ActorRef)
}
/**
... | suiryc/suiryc-scala | core/src/main/scala/suiryc/scala/akka/Reaper.scala | Scala | gpl-3.0 | 1,501 |
/**
* Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0
* See accompanying LICENSE file.
*/
package kafka
import java.nio.charset.StandardCharsets
import kafka.manager.features.{ClusterFeatures, ClusterFeature}
/**
* @author hiral
*/
package object manager {
def nodeFromPath(s: String... | xuwei-k/kafka-manager | app/kafka/manager/package.scala | Scala | apache-2.0 | 582 |
package gov.nasa.jpl.analytics.tools.stats
import gov.nasa.jpl.analytics.base.{CliTool, Loggable}
import gov.nasa.jpl.analytics.nutch.SegmentReader
import gov.nasa.jpl.analytics.util.CommonUtil
import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs.Path
import org.apache.nutch.protocol.Content
import ... | USCDataScience/nutch-analytics | src/main/scala/gov/nasa/jpl/analytics/tools/stats/DDStats.scala | Scala | apache-2.0 | 2,847 |
/*
* Copyright (c) 2014-2018 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... | ddworak/monix | monix-reactive/shared/src/main/scala/monix/reactive/Consumer.scala | Scala | apache-2.0 | 17,921 |
package net.paploo.orbital.rocket
import net.paploo.orbital.planetarysystem.Planetoid
import net.paploo.orbital.phys.{ PhysVec, State, OrbitalParameters }
import net.paploo.orbital.phys.PhysVec.{ SphericalVec, VecDouble }
import blackbox.BlackBox
import blackbox.{ RocketAnalyzer, StagedRocketAnalyzer }
import net.papl... | paploo/orbital | src/main/scala/net/paploo/orbital/rocket/Rocket.scala | Scala | bsd-3-clause | 5,464 |
/*
* Copyright 2016 Frugal Mechanic (http://frugalmechanic.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required... | frugalmechanic/fm-common | jvm/src/test/scala/fm/common/TestClassUtil.scala | Scala | apache-2.0 | 9,256 |
package codechicken.microblock
import codechicken.multipart.asm.{ScratchBitSet, ASMMixinFactory}
import java.util.BitSet
object MicroblockGenerator extends ASMMixinFactory(classOf[Microblock], classOf[Int]) with ScratchBitSet
{
trait IGeneratedMaterial
{
def addTraits(traits:BitSet, mcrClass:Microbloc... | Chicken-Bones/ForgeMultipart | src/codechicken/microblock/MicroblockGenerator.scala | Scala | lgpl-2.1 | 792 |
package scalikejdbc
import java.time.ZoneId
import com.google.cloud.bigquery.{QueryJobConfiguration, QueryParameterValue}
import scalikejdbc.bigquery.{BqParameter, BqPreparedStatement, Format}
import scala.collection.JavaConverters._
import scala.language.reflectiveCalls
object QueryRequestBuilder {
private val ... | ocadaruma/scalikejdbc-bigquery | src/main/scala/scalikejdbc/QueryRequestBuilder.scala | Scala | apache-2.0 | 4,580 |
/*
* Copyright 2016 The BigDL Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | yiheng/BigDL | spark/dl/src/test/scala/com/intel/analytics/bigdl/utils/tf/loaders/ErfSpec.scala | Scala | apache-2.0 | 858 |
/*
* 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/mocks/MockScheduler.scala | Scala | apache-2.0 | 3,238 |
/*
Copyright 2016-17, Hasso-Plattner-Institut fuer Softwaresystemtechnik GmbH
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 applicab... | bpn1/ingestion | src/main/scala/de/hpi/ingestion/deduplication/similarity/RoughlyEqualNumbers.scala | Scala | apache-2.0 | 1,349 |
/*
* 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/main/scala/com/intel/analytics/bigdl/dllib/nn/internal/Topology.scala | Scala | apache-2.0 | 12,100 |
package com.github.lavrov.xml
import cats.FlatMap
import cats.data.{Kleisli, Validated, ValidatedNel}
import scala.xml._
import scala.util.control.Exception
package object reader {
type Reader[A] = Kleisli[Result, NodeSeq, A]
case class ReaderError(path: XmlPath, message: String)
type Result[A] = ValidatedN... | lavrov/xml-reader | src/main/scala/com/github/lavrov/xml/reader/package.scala | Scala | mit | 2,295 |
/*
* 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... | 122689305/BigDL | spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/Tanh.scala | Scala | apache-2.0 | 1,849 |
package actor
import akka.actor.{Props, Actor}
import model.Cell
case object StartNew
case class GetResult(id: Int, n: Int)
case object NotFound
class CellManager extends Actor {
private val initialState: Set[Cell] = Set(
Cell(9,10), Cell(10, 10), Cell(11,10), Cell(11, 9), Cell(10, 8),
Cell(20,9), Cell(21... | semberal/good-cells | app/actor/CellManager.scala | Scala | mit | 741 |
package com.singlestore.spark
import java.sql.{Connection, PreparedStatement, Statement}
import com.singlestore.spark.SQLGen.{StringVar, VariableList}
import com.singlestore.spark.SinglestoreOptions.{TableKey, TableKeyType}
import org.apache.spark.sql.catalyst.TableIdentifier
import org.apache.spark.sql.execution.dat... | memsql/memsql-spark-connector | src/main/scala/com/singlestore/spark/JdbcHelpers.scala | Scala | apache-2.0 | 13,004 |
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
/** @author John Miller
* @version 1.2
* @date Tue Nov 29 15:46:51 EST 2011
* @see LICENSE (MIT style license file).
*
* @see www.ece.virginia.edu/~mv/edu/715/lectures/QNet.pdf
* @see hspm.sph.sc.edu/Courses/J716/pdf/71... | mvnural/scalation | src/main/scala/scalation/queueingnet/JacksonNet.scala | Scala | mit | 5,285 |
package se.ramn.bottfarmen.simulation.view
trait BotView {
val id: Int
val commanderId: Int
val row: Int
val col: Int
val hitpoints: Int
}
| ramn/bottfarmen | common/src/main/scala/simulation/view/BotView.scala | Scala | gpl-3.0 | 151 |
package org.bitcoins.core.crypto
import org.bitcoins.core.config.TestNet3
import org.bitcoins.core.gen.CryptoGenerators
import org.scalacheck.{Prop, Properties}
/**
* Created by chris on 7/25/16.
*/
class ECPrivateKeySpec extends Properties("ECPrivateKeySpec") {
property("Serialization symmetry for WIF format"... | SuredBits/bitcoin-s-sidechains | src/test/scala/org/bitcoins/core/crypto/ECPrivateKeySpec.scala | Scala | mit | 804 |
/*
* Copyright 2008, Mark Harrah
*
* This file is part of Frostbridge.
*
* Frostbridge 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 License, or
* (at your optio... | yzhhui/frostbridge | src/main/scala/net/frostbridge/out/StAXOutput.scala | Scala | lgpl-3.0 | 4,370 |
/*
* Copyright (C) 2016 DANS - Data Archiving and Networked Services (info@dans.knaw.nl)
*
* 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
... | DANS-KNAW/easy-license-creator | src/test/scala/nl/knaw/dans/easy/agreement/datafetch/DatasetLoaderSpec.scala | Scala | apache-2.0 | 3,826 |
package lila
package object relation extends PackageObject {
type Relation = Boolean
val Follow: Relation = true
val Block: Relation = false
private[relation] type ID = String
private[relation] type OnlineStudyingCache = com.github.blemale.scaffeine.Cache[ID, String]
}
| luanlv/lila | modules/relation/src/main/package.scala | Scala | mit | 285 |
package org.jetbrains.bsp.data
import com.intellij.openapi.externalSystem.model.DataNode
import com.intellij.openapi.externalSystem.model.project.ProjectData
import com.intellij.openapi.externalSystem.service.project.IdeModifiableModelsProvider
import com.intellij.openapi.module.Module
import com.intellij.openapi.proj... | JetBrains/intellij-scala | bsp/src/org/jetbrains/bsp/data/SbtBuildModuleDataBspService.scala | Scala | apache-2.0 | 1,330 |
package org.scalaide.ui.internal.actions
import org.eclipse.core.resources.IProject
import org.scalaide.core.internal.project.Nature
class AddScalaLibraryAction extends AbstractPopupAction {
def performAction(project: IProject): Unit = {
Nature.addScalaLibAndSave(project)
}
}
| Kwestor/scala-ide | org.scala-ide.sdt.core/src/org/scalaide/ui/internal/actions/AddScalaLibraryAction.scala | Scala | bsd-3-clause | 287 |
package slate
package chrome
import scala.scalajs.js
import scala.scalajs.js.annotation.{JSName, ScalaJSDefined}
import scala.scalajs.js.{UndefOr, native, undefined}
@ScalaJSDefined
class GetAuthTokenOptions(val interactive: UndefOr[Boolean] = undefined,
val account: UndefOr[AccountInfo] = u... | edmundnoble/slate | ui/src/main/scala/slate/chrome/ChromeIdentity.scala | Scala | mit | 1,525 |
// tests that a refinement subtype satisfies all constraint
// of its refinemen supertype
class Test3 {
trait A
trait B
class C { type T }
type T1 = C { type T <: A }
type T2 = T1 { type T <: B }
type U1 = C { type T <: B }
type U2 = C { type T <: A }
var x: T2 = _
val y1: U1 = ???
val y2: U2 =... | AlexSikia/dotty | tests/neg/refinedSubtyping.scala | Scala | bsd-3-clause | 365 |
/**
* 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... | TiVo/kafka | core/src/test/scala/kafka/tools/GetOffsetShellTest.scala | Scala | apache-2.0 | 7,208 |
/*
* ============= Ryft-Customized BSD License ============
* Copyright (c) 2015, Ryft Systems, Inc.
* 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... | getryft/spark-ryft-connector | spark-ryft-connector/src/main/scala/com/ryft/spark/connector/util/SparkSqlFormatConverter.scala | Scala | bsd-3-clause | 4,444 |
package org.example.usage
import org.example.declaration.{Random => Random42, X}
import scala.util._
object UsageOtherPackage1_Renamed {
def main(args: Array[String]): Unit = {
println(this.getClass)
println(classOf[Random42])
println(Properties.versionString)
println()
org.example.declaration... | JetBrains/intellij-scala | scala/scala-impl/testdata/moveScala213/moveClass_NameClashesWithOtherNamesImportedFromOtherPackageWithWithWildcard/before/org/example/usage/UsageOtherPackage1_Renamed.scala | Scala | apache-2.0 | 449 |
package org.sgine.ui
import render.ArrayBuffer
import org.powerscala.property.Property
import com.badlogic.gdx.Gdx
import com.badlogic.gdx.graphics.{GL10, Texture}
/**
* ShapeComponent is a base class for Components that need to render vertices and textures to the
* screen.
*
* @author Matt Hicks <mhicks@sgine.or... | Axiometry/sgine | ui/src/main/scala/org/sgine/ui/ShapeComponent.scala | Scala | bsd-3-clause | 1,258 |
package controllers
import java.io.{File, FileOutputStream}
import akka.ConfigurationException
import org.joda.time.{DateTime, DateTimeZone}
import play.api.Play.current
import play.api._
import play.api.libs.json.{JsObject, JsString, JsValue, Json}
import play.api.mvc._
import play.api.Logger
import buildinfo.BuildI... | strawpay/rocannon | app/controllers/Application.scala | Scala | mit | 7,031 |
package wandou.math.random
import java.util.Random
/**
* Discrete, uniformly distributed random sequence. Generates
* values between the specified minimum and maximum values (inclusive).
* @author Daniel Dyer
*/
class DiscreteUniformGenerator(minValue: Int, maxValue: Int, rng: Random) extends NumberGenerator[Int... | wandoulabs/wandou-math | wandou-math/src/main/scala/wandou/math/random/DiscreteUniformGenerator.scala | Scala | apache-2.0 | 426 |
package com.ruimo.recoeng
import play.api.Logger
import play.api.libs.json._
import play.api.libs.functional.syntax._
import org.joda.time.DateTime
import java.util.concurrent.atomic.AtomicLong
import com.ruimo.recoeng.json.Desc
import com.ruimo.recoeng.json.SortOrder
import com.ruimo.recoeng.json.ScoredItem
import co... | ruimo/recoengPlugin | app/com/ruimo/recoeng/RecoEngPlugin.scala | Scala | apache-2.0 | 6,876 |
package org.scalawiki.bots
import org.scalawiki.bots.TextLib._
import org.specs2.mutable.Specification
class ReplaceSpec extends Specification {
"parse params" should {
def parse(args: Seq[String]) = Replace.parse(args)
"empty" in {
parse(Nil) === ReplaceConfig()
}
"replacements" in {
... | intracer/scalawiki | scalawiki-bots/src/test/scala/org/scalawiki/bots/ReplaceSpec.scala | Scala | apache-2.0 | 3,200 |
/*
* MOIS: Variable Types
* Copyright (C) 2014 University of Edinburgh School of Informatics
*
* 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
* ... | edinburgh-rbm/mois | src/main/scala/uk/ac/ed/inf/mois/Types.scala | Scala | gpl-3.0 | 2,306 |
package com.mesosphere.cosmos.model
import com.mesosphere.universe.PackageDetailsVersion
case class InstallResponse(
packageName: String,
packageVersion: PackageDetailsVersion,
appId: AppId
)
| movicha/cosmos | cosmos-model/src/main/scala/com/mesosphere/cosmos/model/InstallResponse.scala | Scala | apache-2.0 | 200 |
/**
* (c) Copyright 2013 WibiData, Inc.
*
* See the NOTICE 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.
* You may obtain a copy of... | kijiproject/kiji-express | kiji-express/src/main/scala/org/kiji/express/flow/ColumnInputSpec.scala | Scala | apache-2.0 | 37,583 |
package com.criteo.sre.storage.sgrastar.singularity
package cassandra
import java.nio.ByteBuffer
import java.util.{Set => JSet}
import lucene.{MetricsIndex, MetricsIndexManager}
import org.apache.cassandra.config.ColumnDefinition
import org.apache.cassandra.cql3.CFDefinition
import org.apache.cassandra.db._
import org... | dpanth3r/cassandra-graphite-poc | src/main/scala/sgrastar/singularity/cassandra/RowIndex.scala | Scala | apache-2.0 | 3,910 |
package priv
package object sp {
def owner = 0
def opponent = 1
val playerIds :List[Int] = List(owner, opponent)
val nbSlots = 6
val baseSlotRange = 0 until nbSlots
val baseSlotList = baseSlotRange.toList
val some0 = Option(0)
def adjacents(n: Int) = List(n - 1, n + 1).filter(inSlotRange _)
def slot... | illim/freespectrogdx | core/src/main/scala/priv/sp/package.scala | Scala | gpl-3.0 | 519 |
/*
* This file is part of the diffson project.
*
* 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... | gnieh/diffson | core/src/main/scala/diffson/exceptions.scala | Scala | apache-2.0 | 731 |
/*
* 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 ... | jkbradley/spark | core/src/main/scala/org/apache/spark/scheduler/cluster/StandaloneSchedulerBackend.scala | Scala | apache-2.0 | 9,152 |
/* __ *\\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2013, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\\___/_/... | felixmulder/scala | src/library/scala/collection/mutable/SortedSet.scala | Scala | bsd-3-clause | 2,114 |
package org.jetbrains.plugins.scala.editor.selectioner
import java.util
import com.intellij.codeInsight.editorActions.ExtendWordSelectionHandlerBase
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.util.TextRange
import com.intellij.psi.{PsiElement, TokenType}
import org.jetbrains.plugins.scala.l... | ilinum/intellij-scala | src/org/jetbrains/plugins/scala/editor/selectioner/ScalaCodeBlockSelectioner.scala | Scala | apache-2.0 | 1,570 |
package scala.tools.nsc
package ast
trait Positions extends scala.reflect.internal.Positions {
self: Global =>
class ValidatingPosAssigner extends PosAssigner {
var pos: Position = _
override def traverse(t: Tree) {
if (t eq EmptyTree) ()
else if (t.pos == NoPosition) super.traverse(t setPos p... | felixmulder/scala | src/compiler/scala/tools/nsc/ast/Positions.scala | Scala | bsd-3-clause | 1,082 |
/*
* 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 ... | jkbradley/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/ShowNamespacesExec.scala | Scala | apache-2.0 | 2,179 |
package net.walend.disentangle.graph
/**
* A graph with undirected zero or one edges between any pair of nodes.
*
* @author dwalend
* @since v0.2.1
*/
trait Undigraph[Node] extends Graph[Node] {
trait UndigraphInnerNodeTrait extends InnerNodeTrait {
def innerEdges:Set[InnerEdgeType]
def outerEdg... | dwalend/Disentangle | graph/shared/src/main/scala/net/walend/disentangle/graph/Undigraph.scala | Scala | mit | 1,586 |
/*
* 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... | jedesah/Quasar | core/src/test/scala/quasar/fs/mount/ViewFileSystemSpec.scala | Scala | apache-2.0 | 28,000 |
package controllers
import play.api.i18n.{Lang, Messages, MessagesProvider}
import helpers.Forms._
import java.time.Instant
import models._
import java.util.Locale
import play.api.i18n.{Lang, Messages}
import play.api.data.Forms._
import java.sql.Connection
import javax.inject.{Inject, Singleton}
import constraints.... | ruimo/store2 | app/controllers/ProfileMaintenance.scala | Scala | apache-2.0 | 3,667 |
package com.github.tminglei.slickpg
import java.sql.{Timestamp, Time, Date}
import java.util.UUID
import org.scalatest.FunSuite
import scala.collection.mutable.Buffer
import slick.driver.PostgresDriver
import slick.jdbc.GetResult
import scala.concurrent.Await
import scala.concurrent.duration._
class PgArraySupport... | bearrito/slick-pg | src/test/scala/com/github/tminglei/slickpg/PgArraySupportSuite.scala | Scala | bsd-2-clause | 9,451 |
/*
* Copyright (C) 2010-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 di... | grnet/pithos-j | src/main/scala/gr/grnet/pithosj/core/command/GetObjectInfoCommand.scala | Scala | gpl-3.0 | 3,639 |
package gitbucket.core.controller
import gitbucket.core.model.WebHook
import gitbucket.core.pulls.html
import gitbucket.core.service.CommitStatusService
import gitbucket.core.service.MergeService
import gitbucket.core.service.IssuesService._
import gitbucket.core.service.PullRequestService._
import gitbucket.core.serv... | zhoffice/gitbucket | src/main/scala/gitbucket/core/controller/PullRequestsController.scala | Scala | apache-2.0 | 25,021 |
/**
* 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... | mihbor/kafka | core/src/test/scala/unit/kafka/utils/JaasTestUtils.scala | Scala | apache-2.0 | 10,259 |
/*
* Copyright 2021 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | hmrc/ct-calculations | src/main/scala/uk/gov/hmrc/ct/accounts/frs105/boxes/AC455.scala | Scala | apache-2.0 | 1,102 |
package it.unipd.dei.diversity.mllib
import it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap
import org.apache.spark.annotation.DeveloperApi
import org.apache.spark.broadcast.Broadcast
import org.apache.spark.ml.linalg.{SQLDataTypes, Vectors}
import org.apache.spark.ml.param._
import org.apache.spark.ml.util.{Iden... | Cecca/diversity-maximization | mllib/src/main/scala/it/unipd/dei/diversity/mllib/TfIdf.scala | Scala | gpl-3.0 | 9,726 |
package com.expedia.gps.geo.reactive101.client.scala
import java.util.concurrent.TimeUnit
import com.codahale.metrics.{ConsoleReporter, MetricRegistry, Timer}
import org.json4s.{DefaultFormats, Formats}
import org.slf4j.LoggerFactory
/**
* TODO.
*/
trait AbstractTest {
val rootLogger = LoggerFactory.getLogge... | olmartinATexpedia/reactive101 | src/test/scala/com/expedia/gps/geo/reactive101/client/scala/AbstractTest.scala | Scala | apache-2.0 | 867 |
package org.orbroker
import org.orbroker._
import callback._
import adapt._
import exception._
import java.sql._
import java.util.LinkedHashMap
import scala.collection.JavaConversions._
import scala.collection.mutable.Buffer
/** Package for enriching O/R Broker. */
package object enrich {
implici... | nilskp/orbroker | src/main/scala/org/orbroker/enrich/package.scala | Scala | mit | 3,675 |
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.