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) 2013-2019 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and... | elahrvivaz/geomesa | geomesa-geojson/geomesa-geojson-api/src/main/scala/org/locationtech/geomesa/geojson/query/PropertyTransformer.scala | Scala | apache-2.0 | 805 |
package mesosphere.marathon.api.validation
import mesosphere.marathon.state.AppDefinition
import javax.validation.{ ConstraintValidator, ConstraintValidatorContext }
class PortIndicesValidator
extends ConstraintValidator[PortIndices, AppDefinition] {
def initialize(annotation: PortIndices): Unit = {}
def is... | 14Zen/marathon | src/main/scala/mesosphere/marathon/api/validation/PortIndicesValidator.scala | Scala | apache-2.0 | 427 |
package scutil.number.extension
import scutil.number.BigRational
object IntImplicits extends IntImplicits
trait IntImplicits {
implicit final class IntExt(peer:Int) {
def toBigRational:BigRational = BigRational fromLong peer
}
}
| ritschwumm/scutil | modules/core/src/main/scala/scutil/number/extension/IntImplicits.scala | Scala | bsd-2-clause | 236 |
package com.automatak.render.dnp3.enums
import com.automatak.render._
object QualityMasks {
private def comments(name: String) = List("Quality field bitmask for " + name + " values")
def enums: List[EnumModel] = List(
EnumModel("BinaryQuality", comments("binary"), EnumModel.UInt8, binaryValues, None, Hex),... | thiagoralves/OpenPLC_v2 | dnp3/generation/dnp3/src/main/scala/com/automatak/render/dnp3/enums/QualityMasks.scala | Scala | gpl-3.0 | 4,243 |
package week3
object sets {
type Set = Int => Boolean;import org.scalaide.worksheet.runtime.library.WorksheetSupport._; def main(args: Array[String])=$execute{;$skip(110);
def contains(s: Set, elem: Int): Boolean = s(elem);System.out.println("""contains: (s: Int => Boolean, elem: Int)Boolean""");$skip(56);
def... | LeanDe/coursera-scala-projects | PruebaScala/.worksheet/src/week3.sets.scala | Scala | apache-2.0 | 1,430 |
package com.github.mdr.mash.repl
import com.github.mdr.mash.repl.browser.{ ObjectBrowserStateStack, SingleObjectTableBrowserState, TwoDTableBrowserState }
import com.github.mdr.mash.repl.completions.{ BrowserCompletionState, IncrementalCompletionState }
sealed trait ReplMode
object ReplMode {
case object Normal e... | mdr/mash | src/main/scala/com/github/mdr/mash/repl/ReplMode.scala | Scala | mit | 2,109 |
package io
import cats.effect.IO
/**
* This is a root package of the Finch library, which provides an immutable layer of functions and
* types atop of Finagle for writing lightweight HTTP services.
*/
package object finch extends Outputs with ValidationRules {
type ToAsync[F[_], E[_]] = internal.ToAsync[F, E]
... | ImLiar/finch | core/src/main/scala/io/finch/package.scala | Scala | apache-2.0 | 938 |
package akka.contrib.persistence.mongodb
import com.codahale.metrics.Timer.Context
import com.codahale.metrics.{MetricRegistry, SharedMetricRegistries}
import nl.grons.metrics4.scala._
/**
* Builds timers and histograms to record metrics.
* This class uses either the [[MetricsBuilder]] specified by [[MongoSetting... | scullxbones/akka-persistence-mongo | common/src/main/scala/akka/contrib/persistence/mongodb/MongoMetrics.scala | Scala | apache-2.0 | 3,992 |
package com.github.wakfudecrypt.types.data
import com.github.wakfudecrypt._
@BinaryDecoder
case class MonsterFightBubble(
_0_int32: Int,
_1_bool: Boolean,
_2_array_composite: Array[MonsterFightBubble_2_array_composite],
_3_array_composite: Array[MonsterFightBubble_3_array_composite],
_4_array_composite: Arr... | jac3km4/wakfudecrypt | types/src/main/scala/com/github/wakfudecrypt/types/data/MonsterFightBubble.scala | Scala | mit | 673 |
/*
* Copyright 2020 Precog Data
*
* 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 ... | quasar-analytics/quasar | qscript/src/test/scala/quasar/qscript/MapFuncStdLibTestRunner.scala | Scala | apache-2.0 | 4,770 |
/*
* MultiplesOf3and5.scala
* This file is part of EulerChallenges
*
* Copyright (C) 2016 - Akuma
*
* EulerChallenges 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 2 of the License, or... | lilith645/EulerChallenges | Problem1/MultiplesOf3and5.scala | Scala | gpl-3.0 | 1,088 |
package net.sansa_stack.rdf.common.partition.schema
/**
* Subject column is string and object column is timestamp literal.
*
* @author Lorenz Buehmann
*/
case class SchemaStringTimestamp(s: String, o: java.sql.Timestamp)
| SANSA-Stack/SANSA-RDF | sansa-rdf/sansa-rdf-common/src/main/scala/net/sansa_stack/rdf/common/partition/schema/SchemaStringTimestamp.scala | Scala | apache-2.0 | 226 |
/*
Copyright 2012 Twitter, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distr... | snoble/algebird | algebird-core/src/main/scala/com/twitter/algebird/BloomFilter.scala | Scala | apache-2.0 | 10,625 |
package dhg.ccg.gen
import scala.util.matching.Regex
import dhg.util._
trait LpFeature
case class TypeLpFeature(word: String) extends LpFeature
case class TokenLpFeature(word: String, sentIdx: Int, tokenIdx: Int) extends LpFeature
case class PrevWordLpFeat(prevWord: Option[String], startWord: String) extends LpFea... | dhgarrette/2015-ccg-parsing | src/main/scala/dhg/ccg/gen/LpFeature.scala | Scala | apache-2.0 | 1,008 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | aokolnychyi/spark | external/kafka-0-8/src/main/scala/org/apache/spark/streaming/kafka/KafkaTestUtils.scala | Scala | apache-2.0 | 10,071 |
/*
* 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 ... | TiVo/samza | samza-yarn/src/main/scala/org/apache/samza/job/yarn/YarnJob.scala | Scala | apache-2.0 | 6,874 |
/*
* 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 | sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala | Scala | apache-2.0 | 54,959 |
/* Copyright (C) 2008-2016 University of Massachusetts Amherst.
This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible)
http://factorie.cs.umass.edu, http://github.com/factorie
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with... | strubell/factorie | src/main/scala/cc/factorie/app/classify/backend/Boosting.scala | Scala | apache-2.0 | 5,329 |
package manifests.queues
import controllers.ArrivalGenerator.arrival
import drt.shared.EventTypes.DC
import drt.shared.PaxTypes._
import drt.shared.Queues.Queue
import drt.shared.SplitRatiosNs.SplitSources.{ApiSplitsWithHistoricalEGateAndFTPercentages, Historical, TerminalAverage}
import drt.shared.Terminals.{T2, Term... | UKHomeOffice/drt-scalajs-spa-exploration | server/src/test/scala/manifests/queues/SplitsCalculatorSpec.scala | Scala | apache-2.0 | 26,376 |
package mimir.statistics.facet
import play.api.libs.json._
import mimir.Database
import mimir.algebra._
import mimir.util.StringUtils
import mimir.serialization.Json
class ExpectedType(column: ID, tExpected: Type)
extends Facet
{
def description = s"The column ${column} should be ${StringUtils.withDefiniteArticle... | UBOdin/mimir | src/main/scala/mimir/statistics/facet/ExpectedType.scala | Scala | apache-2.0 | 1,717 |
package com.pragmasoft.eventaggregator.streams
import akka.NotUsed
import akka.stream.actor.ActorSubscriber
import akka.stream.scaladsl.Sink
import com.pragmasoft.eventaggregator.ActorSystemProvider
import com.pragmasoft.eventaggregator.GenericRecordEventJsonConverter.{EventHeaderDescriptor, kafkaAvroEventIndexable}
i... | galarragas/event-aggregator | src/main/scala/com/pragmasoft/eventaggregator/streams/ElasticsearchEventSinkProvider.scala | Scala | apache-2.0 | 3,612 |
package ch.epfl.bluebrain.nexus.iam.marshallers
import akka.http.scaladsl.marshalling.GenericMarshallers.eitherMarshaller
import akka.http.scaladsl.marshalling._
import akka.http.scaladsl.model.MediaTypes.`application/json`
import akka.http.scaladsl.model._
import ch.epfl.bluebrain.nexus.commons.circe.syntax._
import ... | hygt/nexus-iam | src/main/scala/ch/epfl/bluebrain/nexus/iam/marshallers/instances.scala | Scala | apache-2.0 | 4,792 |
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs
// License: http://www.gnu.org/licenses/lgpl-3.0.en.html
package spray.json
/**
* The general type of a JSON AST node.
*/
sealed abstract class JsValue {
override def toString = compactPrint
def toString(printer: (JsValue => String)) = prin... | VlachJosef/ensime-server | json/src/main/scala/spray/json/JsValue.scala | Scala | gpl-3.0 | 2,113 |
/* __ *\\
** ________ ___ / / ___ __ ____ Scala.js API **
** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-lang.org/ **
** /____/\\___/... | jmnarloch/scala-js | library/src/main/scala/scala/scalajs/js/JavaScriptException.scala | Scala | bsd-3-clause | 823 |
/*
* Copyright 2014-15 Intelix Pty Ltd
*
* 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... | intelix/eventstreams | es-gauges/es-gauges-service/src/main/scala/eventstreams/gauges/GaugesInstruction.scala | Scala | apache-2.0 | 3,098 |
/**
* DigiSSHD - DigiControl component for Android Platform
* Copyright (c) 2012, Alexey Aksenov ezh@ezh.msk.ru. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public... | ezh/android-component-DigiSSHD | src/test/scala/org/digimead/digi/ctrl/sshd/Football.scala | Scala | gpl-3.0 | 4,258 |
/*
* Copyright (C) 2012 The Regents of The University California.
* 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/LICENS... | KrishnaVamsiKV/Shark | src/main/scala/shark/execution/LateralViewJoinOperator.scala | Scala | apache-2.0 | 7,407 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2015-2019 Helge Holzmann (Internet Archive) <helge@archive.org>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, incl... | helgeho/ArchiveSpark | src/main/scala/org/archive/archivespark/util/ZeppelinHelpers.scala | Scala | mit | 1,854 |
/*
Copyright (c) 2014 by Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... | dmlc/xgboost | jvm-packages/xgboost4j-example/src/main/scala/ml/dmlc/xgboost4j/scala/example/spark/SparkTraining.scala | Scala | apache-2.0 | 3,230 |
package com.arcusys.learn.liferay.update.version260
import java.sql.Connection
import com.arcusys.learn.liferay.update.version250.slide.SlideTableComponent
import com.arcusys.valamis.persistence.common.SlickDBInfo
import com.arcusys.valamis.slick.util.SlickDbTestBase
import scala.slick.driver.{JdbcDriver, JdbcProfil... | arcusys/Valamis | learn-portlet/src/test/scala/com/arcusys/learn/liferay/update/version260/UpdateSlideTemplatesTest.scala | Scala | gpl-3.0 | 3,788 |
package org.jetbrains.plugins.scala
package lang
package psi
package stubs
import com.intellij.psi.stubs.StubElement
import org.jetbrains.plugins.scala.lang.psi.api.statements.params.ScParameterClause
/**
* User: Alexander Podkhalyuzin
* Date: 19.10.2008
*/
trait ScParamClauseStub extends StubElement[ScParamete... | JetBrains/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/stubs/ScParamClauseStub.scala | Scala | apache-2.0 | 381 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | maropu/spark | core/src/main/scala/org/apache/spark/util/collection/OpenHashSet.scala | Scala | apache-2.0 | 11,306 |
package org.jetbrains.plugins.scala.lang.psi.api.base.types
import org.jetbrains.plugins.scala.lang.psi.ScalaPsiElement
import org.jetbrains.plugins.scala.lang.psi.api.statements.{ScDeclaredElementsHolder, ScTypeAlias}
/**
* @author Alexander Podkhalyuzin
* Date: 07.03.2008
*/
trait ScRefinement extends ScalaPsiElem... | gtache/intellij-lsp | intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/psi/api/base/types/ScRefinement.scala | Scala | apache-2.0 | 527 |
package models.plan.knitting
import models._
import LCarriage._
import org.specs2.mutable.Specification
import scalaz.{Success, Validation}
class LKnittingSpec extends Specification with KnittingStateMatchers {
private trait States extends StateSupport with Yarns {
val yarn = YarnPiece(red)
def lace = Stat... | knittery/knittery-ui | test/models/plan/knitting/LKnittingSpec.scala | Scala | gpl-2.0 | 5,022 |
package com.twitter.algebird
import org.scalatestplus.scalacheck.{ScalaCheckDrivenPropertyChecks, ScalaCheckPropertyChecks}
import org.scalacheck.{Arbitrary, Gen}
import scala.util.Random
import CMSHasherImplicits.CMSHasherBigInt
import org.scalatest.matchers.should.Matchers
import org.scalatest.propspec.AnyPropSpec
... | twitter/algebird | algebird-test/src/test/scala/com/twitter/algebird/CountMinSketchTest.scala | Scala | apache-2.0 | 41,554 |
package sangria.validation.rules
import sangria.util.{Pos, ValidationSupport}
import org.scalatest.wordspec.AnyWordSpec
class ExecutableDefinitionsSpec extends AnyWordSpec with ValidationSupport {
override val defaultRule = Some(new ExecutableDefinitions)
"Validate: Executable definitions" should {
"with on... | OlegIlyenko/sangria | modules/core/src/test/scala/sangria/validation/rules/ExecutableDefinitionsSpec.scala | Scala | apache-2.0 | 1,083 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | gioenn/xSpark | sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetReadSupport.scala | Scala | apache-2.0 | 12,194 |
package com.landoop.streamreactor.connect.hive
import java.util
import cats.data.NonEmptyList
import com.landoop.streamreactor.connect.hive.formats.ParquetHiveFormat
import org.apache.hadoop.hive.metastore.TableType
import org.apache.hadoop.hive.metastore.api.{FieldSchema, SerDeInfo, StorageDescriptor, Table}
import ... | CodeSmell/stream-reactor | kafka-connect-hive/connector/src/test/scala/com/landoop/streamreactor/connect/hive/HiveTest.scala | Scala | apache-2.0 | 3,533 |
package com.twitter.bijection.macros.impl
import scala.reflect.macros.Context
import scala.util.{Try => BasicTry}
import com.twitter.bijection.macros.{IsCaseClass, MacroGenerated}
object IsCaseClassImpl {
def isCaseClassImpl[T](c: Context)(implicit T: c.WeakTypeTag[T]): c.Expr[IsCaseClass[T]] = {
import c.univ... | twitter/bijection | bijection-macros/src/main/scala/com/twitter/bijection/macros/impl/IsCaseClassImpl.scala | Scala | apache-2.0 | 1,070 |
/*
* Copyright 2001-2013 Artima, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | dotty-staging/scalatest | scalatest/src/main/scala/org/scalatest/path/package.scala | Scala | apache-2.0 | 3,230 |
object Test extends App {
val x: Float = 10/3
assert(x == 3.0)
}
| som-snytt/dotty | tests/run/weakconform.scala | Scala | apache-2.0 | 69 |
package fi.pyppe.ircbot
import AkkaUtil.remoteActorSystemConfiguration
import fi.pyppe.ircbot.event._
import akka.actor._
import org.pircbotx.{Channel, Configuration, PircBotX}
import org.pircbotx.hooks.{ListenerAdapter, Listener}
import org.pircbotx.hooks.events.{PrivateMessageEvent, MessageEvent}
import org.joda.t... | Pyppe/akka-ircbot | master/src/main/scala/fi/pyppe/ircbot/MasterSystem.scala | Scala | mit | 3,237 |
package BIDMat
import scala.collection.mutable.{Map,SynchronizedMap,HashMap}
import MatFunctions._
import edu.berkeley.bid.CUMAT
@SerialVersionUID(100L)
class Dict(val cstr:CSMat) extends Serializable {
val length = cstr.length
var counts:DMat = null
var hash:HashMap[String,Int] = null
d... | phlip9/BIDMat | src/main/scala/BIDMat/Dict.scala | Scala | bsd-3-clause | 7,640 |
// Copyright 2014 Commonwealth Bank of Australia
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ap... | sriramkrishnan/scalding | scalding-core/src/test/scala/com/twitter/scalding/typed/PartitionedTextLineTest.scala | Scala | apache-2.0 | 3,745 |
package net.liftmodules.cluster.kryo
import org.scalatest.{FlatSpec, Matchers}
import java.io._
class KryoTestClass(val data: String) {
def this() = this("")
def canEqual(other: Any): Boolean = other.isInstanceOf[KryoTestClass]
override def equals(other: Any): Boolean = other match {
case that: KryoTestC... | joescii/lift-cluster | kryo/src/test/scala/net/liftmodules/cluster/kryo/KryoSpec.scala | Scala | apache-2.0 | 1,815 |
/*
* Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com>
*/
package play.core.j
import java.util.concurrent.Executor
import play.mvc.Http
import scala.compat.java8.FutureConverters
import scala.concurrent.{ ExecutionContext, ExecutionContextExecutor }
object HttpExecutionContext {
/**
* Creat... | Shenker93/playframework | framework/src/play/src/main/scala/play/core/j/HttpExecutionContext.scala | Scala | apache-2.0 | 2,847 |
//
// scalac: -Werror -deprecation -optimise -Xexperimental -Xfuture
//
// Deprecated options are announced before compilation.
| martijnhoekstra/scala | test/files/neg/deprecated-options.scala | Scala | apache-2.0 | 128 |
package kvstore
import akka.actor.{ActorRef, Actor}
import scala.collection.immutable
object Arbiter {
case object Join
case object JoinedPrimary
case object JoinedSecondary
/**
* This message contains all replicas currently known to the arbiter, including the primary.
*/
case class Replicas(replica... | vasnake/Principles-of-Reactive-Programming | w6/kvstore/src/main/scala/kvstore/Arbiter.scala | Scala | gpl-3.0 | 753 |
package controllers
import play.api._
import play.api.data.Forms._
import play.api.data.Form
import play.api.libs.json._
import play.api.libs.json.Json
import play.api.libs.functional.syntax._
import play.api.mvc._
import utils.Validator._
import java.net.URLDecoder
import domain._
import domain.entity._
import domain... | maruLoop/VoiceBankActivity | app/controllers/Application.scala | Scala | mit | 5,379 |
package test
import scala.tools.nsc.interpreter._
import scala.tools.nsc.Settings
/**
* Dotty requires a mangled bootclasspath to start. It means that `console` mode of sbt doesn't work for us.
* At least I(Dmitry) wasn't able to make sbt fork in console
*/
object DottyRepl {
def main(args: Array[String]): Unit =... | folone/dotty | test/test/DottyRepl.scala | Scala | bsd-3-clause | 658 |
/*
*
* * Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com>
*
*/
package play.api.libs.ws
import javax.inject.{ Singleton, Inject, Provider }
import play.api.libs.ws.ssl.{ DefaultSSLConfigParser, SSLConfig }
import play.api.{ Environment, Configuration }
/**
* A WSConfiguration trait. This provid... | jyotikamboj/container | pf-framework/src/play-ws/src/main/scala/play/api/libs/ws/Config.scala | Scala | mit | 2,760 |
package org.rebeam.tree.view
import japgolly.scalajs.react.vdom.html_<^._
import org.rebeam.tree.view.MaterialColor._
import org.rebeam.tree.view.View._
object MaterialSwatch {
val shades: Seq[Int] = Seq(50, 100, 200, 300, 400, 500, 600, 700, 800, 900)
def swatches(name: String, colors: Seq[(String, Color)]) = ... | trepidacious/tree-material-ui | js/src/main/scala/org/rebeam/tree/view/MaterialSwatch.scala | Scala | gpl-3.0 | 1,383 |
package com.seanshubin.builder.domain
object ProjectOverrides {
private val projectsNotToBuild = Set(
"learn-java-module",
"parser",
"kotlin-tryme"
)
private val projectsNotToUpgrade = Set("learn-spark")
def shouldBuild(projectName: String): Boolean = {
!projectsNotToBuild.contains(projectNam... | SeanShubin/builder | domain/src/main/scala/com/seanshubin/builder/domain/ProjectOverrides.scala | Scala | unlicense | 436 |
/*
* Copyright 2015 Nicolas Rinaudo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed... | nrinaudo/scala-csv | core/shared/src/main/scala/kantan/csv/package.scala | Scala | mit | 5,641 |
package de.sciss.stadtpark
import java.awt.EventQueue
import de.sciss.mellite.{Document, EphemeralDocument, ConfluentDocument, Mellite}
import de.sciss.mellite.gui.MenuBar
import de.sciss.desktop.{KeyStrokes, Menu}
import de.sciss.lucre.stm.Cursor
import de.sciss.lucre.synth.Sys
import java.awt.event.KeyEvent
object ... | Sciss/Stadtpark | src/main/scala/de/sciss/stadtpark/Application.scala | Scala | gpl-2.0 | 1,593 |
/*
active-learning-scala: Active Learning library for Scala
Copyright (c) 2014 Davi Pereira dos Santos
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
... | active-learning/active-learning-scala | src/main/scala/al/strategies/ExpErrorReductionMarginFixo.scala | Scala | gpl-2.0 | 6,306 |
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
*/
// DO NOT EDIT MANUALLY
package sbt.internal.langserver.codec
import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError }
trait PublishDiagnosticsParamsFormats { self: sbt.internal.langserver.codec.Dia... | sbt/sbt | protocol/src/main/contraband-scala/sbt/internal/langserver/codec/PublishDiagnosticsParamsFormats.scala | Scala | apache-2.0 | 1,356 |
package pimpathon
import scala.language.implicitConversions
import org.junit.Test
import pimpathon.builder._
import pimpathon.tuple._
import pimpathon.util._
class TupleTest {
@Test def tap(): Unit = strings().run(ss ⇒ (1, "foo").tap(i ⇒ s ⇒ ss += (s + i))) === List("foo1")
@Test def calc(): Unit = ("123", ... | raymanoz/pimpathon | src/test/scala/pimpathon/tuple.scala | Scala | apache-2.0 | 1,163 |
/*
* Copyright 2013 Commonwealth Computer Research, 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 applica... | jwkessi/geomesa | geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/geohash/BoundingBoxTest.scala | Scala | apache-2.0 | 1,793 |
package connection
import com.redis._
import java.net.URI
object RedisConnectionFactory {
private val redisUri = new URI(System.getenv("REDIS_URL"))
private val host = redisUri.getHost
private val port = redisUri.getPort
private val secret = redisUri.getUserInfo.split(":", 2)(1)
private val clients = new Re... | soulofpeace/FareHound | app/connection/Redis.scala | Scala | apache-2.0 | 1,052 |
/*
* 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 | mllib/src/main/scala/org/apache/spark/ml/param/shared/sharedParams.scala | Scala | apache-2.0 | 18,956 |
package com.gilt.gfc.guava.cache
import com.google.common.cache.LoadingCache
import scala.collection.JavaConversions._
/**
* Utils for Guava Cache
*/
@deprecated("Use BulkLoadingCache", "0.0.9")
object CacheUtils {
/** Refresh all keys in cache (the refresh happens asynchronously)
*/
def refreshAll[K](cach... | gheine/gfc-guava | src/main/scala/com/gilt/gfc/guava/cache/CacheUtils.scala | Scala | apache-2.0 | 415 |
/**
* 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 ... | tdanford/bdg-utils | utils-metrics/src/test/scala/org/bdgenomics/utils/instrumentation/SparkMetricsSuite.scala | Scala | apache-2.0 | 6,097 |
/*
* Copyright 2013 Commonwealth Computer Research, 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 applica... | jwkessi/geomesa | geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geohash/BoundingBoxGeoHashIterator.scala | Scala | apache-2.0 | 2,642 |
/*
* Copyright (C) 2011 Mathias Doenitz
*
* 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... | veact/scala-ssh | src/test/scala/com/decodified/scalassh/SshClientSpec.scala | Scala | apache-2.0 | 3,278 |
/**
* Created by oji on 7/10/16.
*/
/**
* This is a pure object-oriented implementation of a very simplified Natural Numbers implementation
* From quick in-lecture quiz (Lecture 4.1 - Objects Everywhere from the 'Functional Programming Principles in Scala' course from Coursera)
* This approach is named Peano... | ojizero/random_stuff | ScalaTests/naturals.scala | Scala | gpl-3.0 | 1,627 |
package com.sksamuel.avro4s.streams.output
import java.util.UUID
import org.apache.avro.generic.GenericData
import org.apache.avro.util.Utf8
class UUIDOutputStreamTest extends OutputStreamTest {
import scala.collection.JavaConverters._
test("write out uuids") {
val a = UUID.randomUUID()
case class Test... | 51zero/avro4s | avro4s-core/src/test/scala/com/sksamuel/avro4s/streams/output/UUIDOutputStreamTest.scala | Scala | mit | 1,385 |
package org.jetbrains.plugins.scala.codeInsight.intention.controlflow
import com.intellij.codeInsight.intention.PsiElementBaseIntentionAction
import com.intellij.openapi.project.Project
import com.intellij.openapi.editor.Editor
import com.intellij.psi.{PsiDocumentManager, PsiElement}
import org.jetbrains.plugins.scala... | consulo/consulo-scala | src/org/jetbrains/plugins/scala/codeInsight/intention/controlflow/SplitElseIfIntention.scala | Scala | apache-2.0 | 2,960 |
/**
* This code is generated using [[https://www.scala-sbt.org/contraband/ sbt-contraband]].
*/
// DO NOT EDIT MANUALLY
package sbt.protocol.codec
import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError }
trait TerminalSetEchoResponseFormats { self: sjsonnew.BasicJsonProtocol =>
implicit lazy v... | sbt/sbt | protocol/src/main/contraband-scala/sbt/protocol/codec/TerminalSetEchoResponseFormats.scala | Scala | apache-2.0 | 982 |
package stainless
package testgen
import io.circe.Json
import stainless.extraction._
import stainless.extraction.xlang.{trees => xt}
import stainless.verification._
import stainless.verification.VerificationComponent.{Analysis, Report}
import scala.concurrent.Future
object ScalaTestGenComponent extends Component {
... | epfl-lara/stainless | core/src/main/scala/stainless/testgen/ScalaTestGenComponent.scala | Scala | apache-2.0 | 1,910 |
/*******************************************************************************
Copyright (c) 2013-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/analysis/typing/models/DOMHtml/HTMLTableColElement.scala | Scala | bsd-3-clause | 5,999 |
/*
* Copyright 2017 Alexey Kuzin <amkuzink@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | leviathan941/choiceroulette | guiapp/src/main/scala/choiceroulette/gui/roulette/data/TextDataGrabber.scala | Scala | apache-2.0 | 2,427 |
/*
* Copyright 2012-2020 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | Netflix/edda | src/main/scala/com/netflix/edda/RecordMatcher.scala | Scala | apache-2.0 | 867 |
/*
* 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 ... | zouzias/spark-lucenerdd | src/main/scala/org/zouzias/spark/lucenerdd/testing/Person.scala | Scala | apache-2.0 | 904 |
/*
* 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 ... | StephanEwen/incubator-flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/utils/IntervalJoinUtil.scala | Scala | apache-2.0 | 18,048 |
package net.liftweb.markdown
/*
* Copyright 2013-2017 WorldWide Conferencing, LLC
*
* 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
*... | lift/framework | core/markdown/src/main/scala/net/liftweb/markdown/TimeTest.scala | Scala | apache-2.0 | 4,708 |
package scalaparsers
import scalaparsers.Document.{ fillSep, text, punctuate, nest, line, oxford }
import scala.collection.immutable.List
import scalaz.Functor
sealed trait ParseResult[+S,+A] extends Functorial[ParseResult[S,+?], A] {
def self = this
}
object ParseResult {
implicit def parseResultFunctor[S]: Fun... | JexCheng/ermine-parser | src/main/scala/scalaparsers/ParseResult.scala | Scala | bsd-2-clause | 3,429 |
package is.hail.io.fs
import java.io.{InputStream, OutputStream}
import org.apache.log4j.Logger
import scala.collection.mutable.ArrayBuffer
import is.hail.services.memory_client.MemoryClient
import is.hail.services.ClientResponseException
import is.hail.utils._
trait ServiceCacheableFS extends FS {
def sessionID:... | hail-is/hail | hail/src/main/scala/is/hail/io/fs/ServiceCacheableFS.scala | Scala | mit | 1,772 |
/*
* Copyright (c) 2013-2016 Snowplow Analytics Ltd. All rights reserved.
*
* This program is licensed to you under the Apache License Version 2.0, and
* you may not use this file except in compliance with the Apache License
* Version 2.0. You may obtain a copy of the Apache License Version 2.0 at
* http://www.... | bigdecisions/snowplow | 3-enrich/stream-enrich/src/test/scala/com.snowplowanalytics.snowplow.enrich.kinesis/SpecHelpers.scala | Scala | apache-2.0 | 9,139 |
val x: AnyRef = (x: Int) => x
//True | ilinum/intellij-scala | testdata/typeConformance/function/ToAnyRef.scala | Scala | apache-2.0 | 36 |
/*
* Copyright 2014 Treode, 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... | Treode/store | core/src/com/treode/buffer/DeprecationCorral.scala | Scala | apache-2.0 | 948 |
package eu.akkamo
/**
* @author jubu
*/
trait LogModule extends Module with Initializable with Publisher {
override def publish(ds: TypeInfoChain): TypeInfoChain = ds.&&[LoggingAdapterFactory]
}
| akkamo/akkamo | akkamoLog/api/src/main/scala/eu/akkamo/LogModule.scala | Scala | unlicense | 203 |
/*
* Happy Melly Teller
* Copyright (C) 2013 - 2014, Happy Melly http://www.happymelly.com
*
* This file is part of the Happy Melly Teller.
*
* Happy Melly Teller 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 Fo... | HappyMelly/teller | app/utils/EnumUtils.scala | Scala | gpl-3.0 | 2,072 |
package openquant.yahoofinance
import org.slf4j.{Logger, LoggerFactory}
trait Logging {
val log: Logger = LoggerFactory.getLogger(this.getClass)
}
| openquant/YahooFinanceScala | src/main/scala/openquant/yahoofinance/Logging.scala | Scala | mit | 151 |
/*
* 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 ... | himanshudhami/PredictionIO | core/src/main/scala/org/apache/predictionio/core/BaseServing.scala | Scala | apache-2.0 | 1,880 |
package org.soic.eac
import org.apache.spark.SparkConf
import org.apache.spark.SparkContext
import org.apache.spark.ml.Pipeline
import org.apache.spark.ml.classification.RandomForestClassifier
import org.apache.spark.ml.feature.{VectorAssembler, StringIndexer}
import org.apache.spark.ml.tuning.{TrainValidationSplit, P... | vahidj/eac | src/main/scala/org/soic/eac/carReader.scala | Scala | apache-2.0 | 3,641 |
/*
* Copyright University of Basel, Graphics and Vision Research Group
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... | unibas-gravis/scalismo | src/test/scala/scalismo/common/LinearInterpolatorTest.scala | Scala | apache-2.0 | 3,303 |
package com.fpis.ch04
/**
* EXERCISE 1: We'll explore when you'd use each of these next. But first, as an
* exercise, implement all of the above functions on Option. As you implement
* each function, try to think about what it means and in what situations you'd use it.
* Here are a few hints:
* - It is fine ... | avinash-anand/FuncProgInScalaExAns | src/main/scala/com/fpis/ch04/options.scala | Scala | gpl-2.0 | 6,774 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | Panos-Bletsos/spark-cost-model-optimizer | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/SubstituteUnresolvedOrdinals.scala | Scala | apache-2.0 | 2,407 |
package org.jetbrains.plugins.scala.lang
import com.intellij.lang.PsiBuilder
import com.intellij.psi.tree.IElementType
import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes
import org.jetbrains.plugins.scala.lang.parser.parsing.builder.{ScalaPsiBuilder, ScalaPsiBuilderImpl}
import scala.annotation.tailrec
pa... | jastice/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/lang/parser/package.scala | Scala | apache-2.0 | 2,747 |
package elcurto99.scalaquestrade.models
/**
* Models the response from an Account Positions request
*
* @see http://www.questrade.com/api/documentation/rest-operations/account-calls/accounts-id-positions
*/
case class PositionsResponse (
positions: List[Position]
)
case class Position (
symbol: String,
... | elcurto99/scala-questrade | src/main/scala/elcurto99/scalaquestrade/models/Position.scala | Scala | mit | 601 |
package scalanlp.stats
package distributions;
/*
Copyright 2009 David Hall, Daniel Ramage
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
Unle... | MLnick/scalanlp-core | learn/src/main/scala/scalanlp/stats/distributions/Gaussian.scala | Scala | apache-2.0 | 3,880 |
package io.gatling.tcp.action
import akka.actor.ActorDSL._
import akka.actor.ActorRef
import io.gatling.core.action.{ Failable, Interruptable }
import io.gatling.core.session.{ Expression, Session }
import io.gatling.core.util.TimeHelper._
import io.gatling.core.validation.Validation
import io.gatling.tcp._
class Tcp... | thorbenlouw/gatling-tcp-extensions | src/main/scala/io/gatling/tcp/action/TcpConnectAction.scala | Scala | mit | 1,178 |
package ch.megard.akka.http.cors.scaladsl
import akka.http.scaladsl.model.HttpMethod
import akka.http.scaladsl.model.headers.HttpOrigin
import akka.http.scaladsl.server.Rejection
import ch.megard.akka.http.cors.javadsl
import scala.collection.JavaConverters._
import scala.collection.immutable.Seq
/** Rejection creat... | lomigmegard/akka-http-cors | akka-http-cors/src/main/scala/ch/megard/akka/http/cors/scaladsl/CorsRejection.scala | Scala | apache-2.0 | 2,034 |
package scopt.immutable
import scopt.generic._
import GenericOptionParser._
abstract case class OptionParser[C](
programName: Option[String] = None,
version: Option[String] = None,
errorOnUnknownArgument: Boolean = true) extends GenericOptionParser[C] {
def this() = this(None, None, true)
def this(pr... | satabin/gniehturing | util/src/main/scala/scopt/immutable/OptionParser.scala | Scala | gpl-3.0 | 11,543 |
/**
* Copyright 2015 Thomson Reuters
*
* 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... | nruppin/CM-Well | server/cmwell-stortill/src/main/scala/cmwell/stortill/Strotill.scala | Scala | apache-2.0 | 5,214 |
package org.sisioh.aws4s.s3
import com.amazonaws.ClientConfiguration
import com.amazonaws.auth.{ AWSCredentialsProvider, AWSCredentials }
import com.amazonaws.metrics.RequestMetricCollector
import com.amazonaws.services.s3.AmazonS3Client
object AmazonS3ClientFactory {
def create() = new AmazonS3Client()
def cre... | everpeace/aws4s | aws4s-s3/src/main/scala/org/sisioh/aws4s/s3/AmazonS3ClientFactory.scala | Scala | mit | 1,161 |
/*
* 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/service/otr/OtrServiceImpl.scala | Scala | gpl-3.0 | 14,143 |
package ai.skaro.server
import org.eclipse.jetty.server.Server
import org.eclipse.jetty.servlet.{DefaultServlet, ServletContextHandler}
import org.eclipse.jetty.webapp.WebAppContext
import org.scalatra.servlet.ScalatraListener
object JettyLauncher { // this is my entry object as specified in sbt project definition
... | liamstar97/DIY_Dalek | dalekserver/src/main/scala/ai/skaro/server/JettyLauncher.scala | Scala | apache-2.0 | 765 |
package org.dagre.euler.util
import org.scalatest.{FlatSpec, Matchers}
class UtilsSpec extends FlatSpec with Matchers {
"Factorial" should "return the factorial of the given number" in {
Utils.factorial(7) should be (7*6*5*4*3*2*1)
Utils.factorial(5) should be (5*4*3*2*1)
Utils.factorial(1) should be (... | dagre/euler | src/test/scala-2.12/org/dagre/euler/util/UtilsSpec.scala | Scala | apache-2.0 | 2,318 |
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.