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 rat.client.components
import org.scalajs.dom._
import scala.scalajs.js
import scala.scalajs.js.annotation.JSName
/**
* Minimal facade for JQuery. Use https://github.com/scala-js/scala-js-jquery or
* https://github.com/jducoeur/jquery-facade for more complete one.
*/
@js.native
trait JQueryEventObject e... | omidb/rat | client/src/main/scala/rat/client/components/JQuery.scala | Scala | apache-2.0 | 709 |
package io.getquill.context.spark
import org.apache.spark.sql.Dataset
sealed trait Binding
case class DatasetBinding[T](ds: Dataset[T]) extends Binding
case class ValueBinding(str: String) extends Binding | getquill/quill | quill-spark/src/main/scala/io/getquill/context/spark/Binding.scala | Scala | apache-2.0 | 208 |
package com.tribbloids.spookystuff.uav.planning.VRPOptimizers
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem
import com.graphhopper.jsprit.core.util.{FastVehicleRoutingTransportCostsMatrix, VehicleRoutingTransportCostsMatrix}
import com.graphhopper.jsprit.io.problem.VrpXMLReader
import com.tribbloids... | tribbloid/spookystuff | uav/src/test/scala/com/tribbloids/spookystuff/uav/planning/VRPOptimizers/JSpritRunnerSuite.scala | Scala | apache-2.0 | 3,869 |
/**
* 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... | slchen2014/kafka | core/src/main/scala/kafka/network/RequestChannel.scala | Scala | apache-2.0 | 10,864 |
package com.wavesplatform.state.diffs.smart.predef
import com.wavesplatform.account.{Address, Alias}
import com.wavesplatform.common.state.ByteStr
import com.wavesplatform.common.utils.EitherExt2
import com.wavesplatform.lang.Testing._
import com.wavesplatform.lang.v1.compiler.Terms.CONST_BYTESTR
import com.wavesplatf... | wavesplatform/Waves | node/src/test/scala/com/wavesplatform/state/diffs/smart/predef/CommonFunctionsTest.scala | Scala | mit | 11,217 |
import sbt.Keys._
import sbt._
import sbtstudent.AdditionalSettings
object CommonSettings {
lazy val commonSettings = Seq(
Compile / scalacOptions ++= CompileOptions.compileOptions,
Compile / javacOptions ++= Seq("--release", "8"),
Compile / unmanagedSourceDirectories := List((Compile / scalaSource).valu... | lightbend-training/course-management-tools | course-templates/scala-cmt-template-no-common/project/CommonSettings.scala | Scala | apache-2.0 | 848 |
/* __ *\\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2003-2010, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\\___/_/... | cran/rkafkajars | java/scala/collection/mutable/Buffer.scala | Scala | apache-2.0 | 1,558 |
package scheduler.kafka.manager
import java.util.Date
import org.slf4j.LoggerFactory
import play.api.Play.current
import play.api.libs.json.{JsError, JsSuccess}
import play.api.libs.ws._
import scheduler.kafka.manager.SchedulerRestClient.{AddBrokerResponse, Broker, StatusResponse}
import scheduler.models.form.Failove... | stealthly/kafka-manager | app/scheduler/kafka/manager/SchedulerRestClient.scala | Scala | apache-2.0 | 8,551 |
package play.boilerplate.parser.model
case class Schema(host: String,
basePath: String,
version: Option[String],
description: Option[String],
schemes: Iterable[String],
consumes: Iterable[String],
produces: Iter... | Romastyi/sbt-play-boilerplate | sbt-plugin/lib/src/main/scala/play/boilerplate/parser/model/Schema.scala | Scala | apache-2.0 | 2,345 |
package org.ensime.client
import java.io.{InputStreamReader, BufferedReader, InputStream}
import akka.actor.ActorSystem
import ammonite.ops._
import org.slf4j.LoggerFactory
import scala.concurrent.{ExecutionContext, Future}
import scala.util.Try
class EnsimeServerStartup(actorSystem: ActorSystem, projectRoot: Path,... | rorygraves/ensime-client | src/main/scala/org/ensime/client/EnsimeServerStartup.scala | Scala | apache-2.0 | 6,749 |
/*
Copyright (C) 2016 Mauricio Bustos ([email protected])
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.
... | mbustosorg/ebi-excelente | src/main/scala/org/bustos/ebi-excelente/EbiExcelente.scala | Scala | gpl-3.0 | 1,670 |
/*
* 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 ... | practice-vishnoi/dev-spark-1 | streaming/src/test/scala/org/apache/spark/streaming/UISeleniumSuite.scala | Scala | apache-2.0 | 7,905 |
/*
* 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.jdk
import java... | scala/scala | test/junit/scala/jdk/DurationConvertersTest.scala | Scala | apache-2.0 | 3,763 |
package inloopio.math.random
import java.util.Random
import java.util.concurrent.locks.ReentrantLock
/**
* <p>A Java version of George Marsaglia's
* <a href="http://school.anhb.uwa.edu.au/personalpages/kwessen/shared/Marsaglia03.html">Complementary
* Multiply With Carry (CMWC) RNG</a>.
* This is a very fast PRNG ... | dcaoyuan/inloopio-libs | inloopio-math/src/main/scala/inloopio/math/random/CMWC4096RNG.scala | Scala | bsd-3-clause | 2,736 |
package net.benchmark.akka.http.world
import akka.http.scaladsl.model.HttpCharsets.`UTF-8`
import akka.http.scaladsl.model.{HttpEntity, HttpResponse, MediaType}
import akka.http.scaladsl.server.Directives.{complete, path}
import akka.http.scaladsl.server.Route
object PlainTextRoute {
private val pt = HttpResponse(
... | zloster/FrameworkBenchmarks | frameworks/Scala/akka-http/akka-http-slick-postgres/src/main/scala/net/benchmark/akka/http/world/PlainTextRoute.scala | Scala | bsd-3-clause | 496 |
package com.avsystem.commons
package serialization.json
import com.avsystem.commons.serialization.{GenCodecRoundtripTest, Input, Output}
class JsonGenCodecRoundtripTest extends GenCodecRoundtripTest {
type Raw = String
def writeToOutput(write: Output => Unit): String = {
val sb = new JStringBuilder
write... | AVSystem/scala-commons | commons-core/src/test/scala/com/avsystem/commons/serialization/json/JsonGenCodecRoundtripTest.scala | Scala | mit | 455 |
package spark.util
/**
* An extractor object for parsing strings into integers.
*/
object IntParam {
def unapply(str: String): Option[Int] = {
try {
Some(str.toInt)
} catch {
case e: NumberFormatException => None
}
}
}
| ankurdave/arthur | core/src/main/scala/spark/util/IntParam.scala | Scala | bsd-3-clause | 250 |
package ohnosequences.nispero.bundles
import ohnosequences.statika._
import ohnosequences.typesets._
import ohnosequences.nispero.{Names}
import org.clapper.avsl.Logger
abstract class Resources(val configuration: Configuration, aws: AWS) extends Bundle(configuration :~: aws :~: ∅) {
val resources = configuration.... | ohnosequences/nispero | nispero-abstract/src/main/scala/ohnosequences/nispero/bundles/Resources.scala | Scala | agpl-3.0 | 2,241 |
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may... | guozhangwang/kafka | core/src/test/scala/unit/kafka/admin/ConsumerGroupServiceTest.scala | Scala | apache-2.0 | 11,003 |
package slinkydemo.http
import Web._, Api._
import scalaz._
import scalaz.http.servlet.{HttpServletRequest}
import scalaz.http.response._
import scalaz.http.request._
import scalaz.http.scapps.Route._
import scalaz.http.scapps.Scapps._
import scalaz.http.scapps.{BaseApp, Route}
// TODO Conference registration. Regist... | tomjadams/slinky-demo | src/main/scala/slinkydemo/http/SlinkyDemoApplication.scala | Scala | apache-2.0 | 966 |
package skinny.task.generator
import java.io.File
import org.joda.time.DateTime
/**
* DB migration file generator.
*/
object DBMigrationFileGenerator extends DBMigrationFileGenerator
trait DBMigrationFileGenerator extends CodeGenerator {
private[this] def showUsage = {
showSkinnyGenerator()
println(
... | seratch/skinny-framework | task/src/main/scala/skinny/task/generator/DBMigrationFileGenerator.scala | Scala | mit | 1,022 |
package com.azavea.rasterfoundry.io
import geotrellis.vector._
import geotrellis.raster._
import geotrellis.raster.io.Filesystem
import geotrellis.raster.io.geotiff._
import geotrellis.spark._
import geotrellis.spark.io.s3._
import geotrellis.spark.io.hadoop._
import geotrellis.spark.io.hadoop.formats._
import org.ap... | kdeloach/raster-foundry-tiler | mosaic/src/main/scala/com/azavea/rasterfoundry/io/TileServiceReader.scala | Scala | apache-2.0 | 2,916 |
/*
* Copyright 2022 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/vat-registration-frontend | test/controllers/BaseControllerSpec.scala | Scala | apache-2.0 | 10,692 |
/*
* 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 ... | rednaxelafx/apache-spark | sql/core/src/test/scala/org/apache/spark/sql/JoinSuite.scala | Scala | apache-2.0 | 49,156 |
package com.twitter.finagle.mux
import com.twitter.conversions.time._
import com.twitter.finagle.context.Contexts
import com.twitter.finagle.netty3.{BufChannelBuffer, ChannelBufferBuf}
import com.twitter.finagle.stats.StatsReceiver
import com.twitter.finagle.tracing.Trace
import com.twitter.finagle.transport.Transport... | rodrigodealer/finagle | finagle-mux/src/main/scala/com/twitter/finagle/mux/Client.scala | Scala | apache-2.0 | 13,122 |
package recommender
import breeze.linalg.Vector
import cmd.NameAndDescription
/**
* Created by Ondra Fiedler on 4.8.14.
*/
/**
* Distance metric between two Vectors
*/
trait DistanceMetric extends Serializable with NameAndDescription {
def getDistance(v1: Vector[Double], v2: Vector[Double]): Double
}
object D... | OndraFiedler/spark-recommender | src/main/scala/recommender/DistanceMetric.scala | Scala | mit | 1,375 |
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this fi... | xjrk58/elasticsearch-hadoop | spark/core/main/scala/org/elasticsearch/spark/serialization/ScalaMetadataExtractor.scala | Scala | apache-2.0 | 2,030 |
package com.github.jpbetz.subspace
import org.testng.Assert._
import org.testng.annotations.Test
class Vector3Test extends Asserts {
// TODO: How to handle divide by zero? Scala x/0f results in Infinity.
@Test def testMagnitude(): Unit = {
assertEquals(Vector3(0, 0, 0).magnitude, 0f)
assertEquals(Vecto... | jpbetz/subspace | subspace/src/test/scala/com/github/jpbetz/subspace/Vector3Test.scala | Scala | apache-2.0 | 4,302 |
/*
* Copyright 2016 rdbc contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | rdbc-io/rdbc-pgsql | rdbc-pgsql-core/src/main/scala/io/rdbc/pgsql/core/types/PgType.scala | Scala | apache-2.0 | 778 |
def f(a: Int = 1, b: Int) {}
/* */ f(1, 2) | ilinum/intellij-scala | testdata/resolve2/function/default/FirstAsTwo.scala | Scala | apache-2.0 | 43 |
/*
* Copyright (c) 2015-6 x.ai 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... | xdotai/typeless | src/test/scala/subset.scala | Scala | apache-2.0 | 1,125 |
/*
* Copyright 2022 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/help-to-save-frontend | app/uk/gov/hmrc/helptosavefrontend/connectors/HelpToSaveReminderConnector.scala | Scala | apache-2.0 | 5,660 |
/**
* Copyright 2011-2016 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 appli... | GabrielPlassard/gatling | gatling-http/src/main/scala/io/gatling/http/action/async/ws/WsTx.scala | Scala | apache-2.0 | 1,549 |
package slick.jdbc
import scala.concurrent.ExecutionContext
import scala.reflect.ClassTag
import scala.util.{Failure, Success}
import java.sql.DatabaseMetaData
import slick.SlickException
import slick.ast.ColumnOption
import slick.dbio._
import slick.jdbc.meta._
import slick.{model => m}
import slick.relational.Rel... | Radsaggi/slick | slick/src/main/scala/slick/jdbc/JdbcModelBuilder.scala | Scala | bsd-2-clause | 17,616 |
/*
* Copyright (C) 2016 Vincibean <Andre Bessi>
*
* 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... | Vincibean/ScalaForTheImpatient-Solutions | src/main/scala/org/vincibean/scala/impatient/chapter4/exercise2/exercise2.scala | Scala | gpl-3.0 | 1,511 |
package org.bitcoins.core.p2p
import scodec.bits._
trait InetAddress {
def bytes: ByteVector
def ipv4Bytes: ByteVector = {
require(bytes.take(12) == hex"00000000000000000000ffff",
"Cannot call ipv4Bytes for an IPv6 address")
bytes.drop(12)
}
def getAddress: Array[Byte] = bytes.toArray
}
... | bitcoin-s/bitcoin-s | core/src/main/scala/org/bitcoins/core/p2p/InetAddress.scala | Scala | mit | 1,397 |
package contadamination
import java.io.File
import contadamination.bloom.BloomFilterBuilder
import contadamination.results.{ ContaminationFilterUtils, ContaminationFilter }
import org.apache.spark.{ SparkConf, SparkContext }
import org.bdgenomics.adam.rdd.ADAMContext
import org.bdgenomics.formats.avro.AlignmentRecord... | johandahlberg/contAdamination | src/main/scala/contadamination/Contadamination.scala | Scala | apache-2.0 | 2,246 |
package domains.model.material
import java.io.File
import com.typesafe.config.ConfigFactory
/**
* 作業単位のファイル群
*
* @param tsFile TSファイル
* @param errFile エラーログファイル
* @param programFile メタデータファイル
* @param mp4File MP4ファイル
*/
case class Material(tsFile: File,
errFile: Option[File],
... | kobtea/home-theatre | app/domains/model/material/Material.scala | Scala | lgpl-2.1 | 1,526 |
/*
* 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 ... | chenc10/Spark-PAF | streaming/src/main/scala/org/apache/spark/streaming/scheduler/BatchInfo.scala | Scala | apache-2.0 | 3,001 |
package com.aergonaut.lib.manual.page
import java.util
import cofh.lib.util.helpers.ItemHelper
import com.aergonaut.lib.manual.TManual
import com.aergonaut.lib.manual.gui.{TGuiManual, GuiPositionedStack}
import com.aergonaut.lib.util.ClientUtil
import com.aergonaut.lifeaquatic.util.Logger
import cpw.mods.fml.relaunch... | aergonaut/LifeAquatic | src/main/scala/com/aergonaut/lib/manual/page/CraftingPage.scala | Scala | mit | 4,909 |
/*
* Copyright 2016 The SIRIS 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 applica... | simulator-x/core | src/simx/core/helper/Integrate.scala | Scala | apache-2.0 | 2,561 |
package com.citypay.pan.search
import com.citypay.pan.search.util.Util
import com.typesafe.config.Config
import scala.collection.JavaConverters._
/**
* A specification for matching a PAN based on a simplistic model. The spec will only cater for LUHN validated
* card numbers which may exclude schemes such as Dine... | citypay/citypay-pan-search | src/main/scala/com/citypay/pan/search/PanSpec.scala | Scala | mit | 3,426 |
/*
* 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 ... | apache/flink | flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/batch/table/validation/OverWindowValidationTest.scala | Scala | apache-2.0 | 1,999 |
package org.goingok
import akka.actor.ActorSystem
import akka.event.Logging
import akka.stream.ActorMaterializer
/**
* Created by [email protected] on 20/2/17.
*/
object GoingOkContext {
implicit val system = ActorSystem()
implicit val executor = system.dispatcher
implicit val materializer = ActorM... | GoingOK/goingok-server | src/main/scala/org/goingok/GoingOkContext.scala | Scala | apache-2.0 | 470 |
/* PrintEventsWithStreamSpec.scala
*
* Copyright (c) 2013-2014 linkedin.com
* Copyright (c) 2013-2014 zman.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.apac... | zmanio/atmos | src/test/scala/atmos/monitor/PrintEventsWithStreamSpec.scala | Scala | apache-2.0 | 1,911 |
package sparklyr
import java.nio.channels.Channels
import scala.collection.JavaConverters._
import org.apache.arrow.vector._
import org.apache.arrow.vector.ipc.message.{ArrowRecordBatch, MessageSerializer}
import org.apache.arrow.vector.ipc.WriteChannel
import org.apache.spark.sql.types._
import org.apache.spark.sql... | rstudio/sparklyr | java/spark-3.0.0/arrowbatchstreamwriter.scala | Scala | apache-2.0 | 1,274 |
package filodb.core.memstore
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.ExecutionContext
import com.typesafe.config.Config
import debox.Buffer
import java.util
import kamon.Kamon
import kamon.trace.Span
import monix.eval.Task
import monix.execution.Scheduler
import monix.reactive.{Observable,... | filodb/FiloDB | core/src/main/scala/filodb.core/memstore/OnDemandPagingShard.scala | Scala | apache-2.0 | 14,085 |
package sledtr
import scala.collection.mutable._
import scala.util.matching._
import sledtr.source._
import sledtr.section._
import sledtr.section.sites._
import net.htmlparser.jericho._
object Collections {
val SimpleExtenderSites: List[Tuple2[Regex, (Element) => Boolean]] = List(
( // はてな匿名ダイアリー
"http... | K2Da/sledtr | src/main/scala/sledtr/Collections.scala | Scala | gpl-3.0 | 1,164 |
package org.scalatest
class ConfigMapWrapperSuiteSpec extends FunSuite with SharedHelpers {
// Need a test that ensures the passed config map gets in there.
test("configMap should get passed into the wrapped Suite") {
SavesConfigMapSuite.resetConfigMap()
val wrapped = new ConfigMapWrapperSuite(classOf[Sav... | yyuu/scalatest | src/test/scala/org/scalatest/ConfigMapWrapperSuiteSpec.scala | Scala | apache-2.0 | 568 |
import sbt._
import Keys._
object SbtBowerBuild extends Build with BuildExtra {
lazy val sbtBower = Project("sbt-bower", file("."), settings = mainSettings)
lazy val mainSettings: Seq[Def.Setting[_]] = Defaults.defaultSettings ++ Seq(
sbtPlugin := true,
name := "sbt-bower",
organization := "org.mdedetrich",... | mdedetrich/sbt-bower | project/SbtBowerBuild.scala | Scala | bsd-2-clause | 1,480 |
package com.twitter.finagle.ssl.server
import com.twitter.finagle.ssl.{
ApplicationProtocols, CipherSuites, ClientAuth, KeyCredentials, Protocols, TrustCredentials}
/**
* SslServerConfiguration represents the collection of parameters that an engine factory
* should use to configure a TLS server [[Engine]].
*
* ... | spockz/finagle | finagle-core/src/main/scala/com/twitter/finagle/ssl/server/SslServerConfiguration.scala | Scala | apache-2.0 | 1,407 |
package org.ffmmx.example.akka
import akka.agent.Agent
object AkkaAgent {
import scala.concurrent.ExecutionContext.Implicits.global
def agentTest: Unit = {
val agent = Agent(5)
val result = agent()
val result2 = agent.get
println("result="+result)
println("result2="+result2)
// agent.sen... | firefoxmmx2/akka_test | src/main/scala/org/ffmmx/example/akka/AkkaAgent.scala | Scala | apache-2.0 | 1,052 |
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
/** @author John Miller
* @version 1.2
* @date Sun Sep 16 14:09:25 EDT 2012
* @see LICENSE (MIT style license file).
*/
package scalation.linalgebra
import collection.Traversable
import util.Sorting.quickSort
import scal... | mvnural/scalation | src/main/scala/scalation/linalgebra/VectorR.scala | Scala | mit | 35,939 |
package com.houseofmoran.spark.twitter
import java.io.FileReader
import java.util.Properties
import org.apache.spark.streaming.StreamingContext
import org.apache.spark.streaming.twitter.TwitterUtils
import scala.collection.JavaConversions._
object TwitterStreamSource {
def streamFromEnv()(implicit streamingContex... | mikemoraned/selfies | src/main/scala/com/houseofmoran/spark/twitter/TwitterStreamSource.scala | Scala | mit | 1,023 |
/**
* Copyright (c) 2016 Intel Corporation
*
* 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 applicabl... | dmsuehir/spark-tk | sparktk-core/src/main/scala/org/trustedanalytics/sparktk/dicom/internal/ops/Save.scala | Scala | apache-2.0 | 1,596 |
/*
* Copyright (c) 2012 Crown Copyright
* Animal Health and Veterinary Laboratories Agency
*
* 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.apach... | tsaratoon/Sampler | sampler-core/src/main/scala/sampler/r/ScriptRunner.scala | Scala | apache-2.0 | 2,088 |
/*
* Copyright (c) 2013 Elmar Athmer
*
* This file is part of SolarSystemGrandTour.
*
* SolarSystemGrandTour 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 yo... | zauberpony/solarsystem-grand-tour | src/test/scala/net/aerospaceresearch/test/jplparser/data/Ascp1950TestData.scala | Scala | gpl-3.0 | 88,804 |
/*
* Copyright (C) 2016-2017 Lightbend Inc. <https://www.lightbend.com>
*/
package com.lightbend.lagom.javadsl.testkit
import java.util.Optional
import scala.collection.JavaConverters._
import akka.testkit.TestProbe
import com.google.common.collect.ImmutableList
import com.lightbend.lagom.persistence.ActorSystemSpe... | edouardKaiser/lagom | testkit/javadsl/src/test/scala/com/lightbend/lagom/javadsl/testkit/PersistentEntityTestDriverSpec.scala | Scala | apache-2.0 | 4,091 |
/*
* 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 ... | fhueske/flink | flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/api/TableEnvironmentTest.scala | Scala | apache-2.0 | 3,104 |
// Copyright 2015,2016,2017,2018,2019,2020 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 req... | CommBank/grimlock | grimlock-core/src/test/scala/commbank/grimlock/matrix/TestMatrixNames.scala | Scala | apache-2.0 | 6,193 |
package scala.slick.driver
import java.sql.Types
import scala.slick.SlickException
import scala.slick.lifted._
import scala.slick.ast._
import scala.slick.util.MacroSupport.macroSupportInterpolation
/**
* Slick driver for <a href="http://www.hsqldb.org/">HyperSQL</a>
* (starting with version 2.0).
*
* This driver... | zefonseca/slick-1.0.0-scala.2.11.1 | src/main/scala/scala/slick/driver/HsqldbDriver.scala | Scala | bsd-2-clause | 4,867 |
/* __ *\\
** ________ ___ / / ___ __ ____ Scala.js Test Suite **
** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ **
** /____/\\___/... | lrytz/scala-js | test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/lang/BooleanTest.scala | Scala | bsd-3-clause | 2,013 |
package com.github.morikuni.locest.area.domain.repository
import com.github.morikuni.locest.area.domain.model.{Area, AreaId, Coordinate}
import com.github.morikuni.locest.util.{Repository, Session, Transaction, TransactionManager}
trait AreaRepositorySession extends Session
trait AreaRepository extends Repository[Ar... | morikuni/locest | area/app/com/github/morikuni/locest/area/domain/repository/AreaRepository.scala | Scala | mit | 1,358 |
package dotty.tools.benchmarks.tuples
import org.openjdk.jmh.annotations._
@State(Scope.Thread)
class Apply {
@Param(Array("1 0"))
var sizeAndIndex: String = _
var tuple: NonEmptyTuple = _
var index: Int = _
@Setup
def setup(): Unit = {
val size = sizeAndIndex.split(' ')(0).toInt
index = sizeAndI... | lampepfl/dotty | bench-run/src/main/scala/dotty/tools/benchmarks/tuples/Apply.scala | Scala | apache-2.0 | 629 |
package com.peterparameter.ecm.common
import com.peterparameter.ecm.common.Alias.Num
import scodec.bits._
import spire.math.SafeLong
import spire.std.bigDecimal._
import spire.syntax.nroot._
import spire.syntax.trig._
import scala.annotation.tailrec
import scala.collection.SeqView
import scala.collection.immutable.La... | pnosko/spire-ecm | src/main/scala/com/peterparameter/ecm/common/Utils.scala | Scala | mit | 1,774 |
/*
* 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.compat.java8.con... | scala/scala-java8-compat | src/main/scala-2.13-/scala/compat/java8/converterImpl/StepsRange.scala | Scala | apache-2.0 | 2,966 |
/**
* build.scala
*
* @author <a href="mailto:[email protected]">Jim Powers</a>
*
* Copyright 2011 Jim Powers
*
* 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... | corruptmemory/herding-cats | project/build.scala | Scala | apache-2.0 | 4,591 |
/**
* Copyright (c) 2013-2015 Patrick Nicolas - Scala for Machine Learning - All rights reserved
*
* The source code in this file is provided by the author for the sole purpose of illustrating the
* concepts and algorithms presented in "Scala for Machine Learning". It should not be used to
* build commercial ap... | batermj/algorithm-challenger | books/cs/machine-learning/scala-for-machine-learning/1rst-edition/original-src-from-the-book/src/main/scala/org/scalaml/ga/GASolver.scala | Scala | apache-2.0 | 5,732 |
package com.git.huanghaifeng.spark.sql
import org.apache.spark.SparkContext
import org.apache.spark.sql.SQLContext
import org.apache.spark.sql.hive.HiveContext
object SQLParseJsonFile {
def main(args: Array[String]) {
val master = args.length match {
case x: Int if x > 0 => args(0)
... | prucehuang/quickly-start-spark | src/main/scala/com/git/huanghaifeng/spark/sql/SQLParseJsonFile.scala | Scala | apache-2.0 | 834 |
package uk.co.turingatemyhamster
package owl2
/**
* An abstraction of: http://www.w3.org/TR/2012/REC-owl2-syntax-20121211/#Object_Property_Axioms
*
* @author Matthew Pocock
*/
trait ObjectPropertyAxiomsModule {
importedModules : owl2.AxiomsModule =>
type EquivalentObjectProperties <: ObjectPropertyAxiom
t... | drdozer/owl2 | core/src/main/scala/uk/co/turingatemyhamster/owl2/ObjectPropertyAxiomsModule.scala | Scala | apache-2.0 | 984 |
package com.sksamuel.elastic4s.requests.searches.aggs
import java.util.TimeZone
import com.sksamuel.elastic4s.ElasticDate
import com.sksamuel.elastic4s.requests.script.Script
import com.sksamuel.exts.OptionImplicits._
case class DateRangeAggregation(name: String,
field: Option[String]... | stringbean/elastic4s | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/requests/searches/aggs/DateRangeAggregation.scala | Scala | apache-2.0 | 2,609 |
/*
* Copyright 2014 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 agreed... | mglukh/ehub | modules/core/src/main/scala/agent/shared/WireMessage.scala | Scala | apache-2.0 | 1,636 |
package chapter.five
object ExerciseTwo extends App {
// todo: cleanup
// todo: add checks to ensure balance cant go under 0 or over max double
class BankAccount {
private var _balance = 0.0
def deposit(amount: Double) { _balance += amount }
def withdraw(amount: Double) { _balance -= amount }
... | deekim/impatient-scala | src/main/scala/chapter/five/ExerciseTwo.scala | Scala | apache-2.0 | 351 |
/*
* @author Philip Stutz
* @author Mihaela Verman
*
* Copyright 2012 University of Zurich
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/li... | gmazlami/dcop-maxsum | src/main/scala/com/signalcollect/worker/WorkerImplementation.scala | Scala | apache-2.0 | 16,717 |
/** Copyright 2014 Dropbox, 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... | cross-language-cpp/djinni-generator | src/main/scala/djinni/ObjcGenerator.scala | Scala | apache-2.0 | 20,478 |
/*
* 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/test/scala/org/apache/spark/sql/DatasetCacheSuite.scala | Scala | apache-2.0 | 9,064 |
/*
*
* * Copyright 2016 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 r... | andywhardy/address-reputation-ingester | app/addressbase/OSClassification.scala | Scala | apache-2.0 | 1,682 |
/*
* 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... | travisbrown/scalatest | examples/src/main/scala/org/scalatest/examples/freespec/getfixture/ExampleSpec.scala | Scala | apache-2.0 | 1,290 |
//
// Statistics.scala -- Scala object Statistics
// Project OrcScala
//
// Created by amp on Aug 03, 2017.
//
// Copyright (c) 2017 The University of Texas at Austin. All rights reserved.
//
// Use and redistribution of this file is governed by the license terms in
// the LICENSE file found in the project's top-level ... | orc-lang/orc | OrcScala/src/orc/ast/porc/Statistics.scala | Scala | bsd-3-clause | 4,068 |
/*
* 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 ... | aljoscha/flink | flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/stream/StreamPhysicalTemporalSort.scala | Scala | apache-2.0 | 2,618 |
package Constants
import Chisel._
object AluOpConstants{
var ORI_ALU_OP_ADD = 1
var ORI_ALU_OP_SUB = 2
var ORI_ALU_OP_SLL = 3
var ORI_ALU_OP_SLR = 4
var ORI_ALU_OP_SRL = 5
var ORI_ALU_OP_SRA = 6
var ORI_ALU_OP_AND = 7
var ORI_ALU_OP_OR = 8
var ORI_ALU_OP_XOR = 9
var ORI_ALU_OP_SLT = 10
var ORI_AL... | Coxious/MixCPU | project/const.scala | Scala | gpl-2.0 | 1,143 |
package org.apache.spot.netflow
import org.apache.spark.sql.functions._
import org.apache.spot.utilities.Quantiles
import org.apache.spot.utilities.data.validation.InvalidDataHandler
import scala.util.{Success, Try}
/**
* Pair of netflow words extracted from a netflow record - one for the source IP and one for th... | kpeiruza/incubator-spot | spot-ml/src/main/scala/org/apache/spot/netflow/FlowWordCreator.scala | Scala | apache-2.0 | 4,692 |
/**
* Created by Variant on 16/3/15.
*/
object ForFuctionLazy {
def main(args: Array[String]) {
for (i <- 1 to 2;j <-1 to 2) print(100*i +j + " ")
println
//守卫
for (i <- 1 to 2;j <-1 to 2 if i != j) print(100*i +j + " ")
println
//匿名函数非常重要,函数是有值的
def addA(x : Int) = x + 100
val add ... | sparkLiwei/ProgrammingNote | scalaLearning/scalaBase/ForFuctionLazy.scala | Scala | cc0-1.0 | 1,002 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | InnovaCo/samza | samza-core/src/main/scala/org/apache/samza/system/filereader/FileReaderSystemFactory.scala | Scala | apache-2.0 | 2,063 |
package circumflex
package markeven
import core._
import java.io.{StringWriter, Writer, Serializable}
import java.lang.StringBuilder
import java.util.regex.Pattern
import collection.mutable.HashSet
import java.util.Random
object const {
val newLine = Pattern.compile("\r\n|\n|\r")
val empty = Pattern.compile("\\s*... | inca/circumflex | markeven/src/main/scala/common.scala | Scala | bsd-2-clause | 5,093 |
/*
* 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 ... | wangmiao1981/spark | sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CsvExpressionsSuite.scala | Scala | apache-2.0 | 8,843 |
{
import scala.util.{Right => Actor}
}
import collection.mutable.HashMap
println(/* path: scala.collection.mutable.HashMap */ HashMap.getClass)
println(classOf[/* path: scala.collection.mutable.HashMap */ HashMap])
| ilinum/intellij-scala | testdata/resolve2/import/scope/clash/InnerBlock.scala | Scala | apache-2.0 | 220 |
import scala.quoted._
import scala.quoted.staging._
object Test {
given Toolbox = Toolbox.make(getClass.getClassLoader)
def main(args: Array[String]): Unit = withQuoteContext {
implicit def UnliftableInt: Unliftable[Int] = new {
def apply(n: Expr[Int])(using QuoteContext): Option[Int] = n match {
... | som-snytt/dotty | tests/run-staging/quote-valueof-list.scala | Scala | apache-2.0 | 1,874 |
/*
* 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
* distribute... | xerial/silk | silk-core/src/main/scala/xerial/silk/core/util/Guard.scala | Scala | apache-2.0 | 987 |
package blended.updater.tools.configbuilder
import org.scalatest.FreeSpec
import blended.updater.config.FeatureConfig
import scala.collection.immutable._
class FragmentResolverTest extends FreeSpec {
"test" in {
// val features = Seq(FeatureConfig(name = "a", version = "1"))
}
} | lefou/blended | blended.updater.tools/src/test/scala/blended/updater/tools/configbuilder/FragmentResolverTest.scala | Scala | apache-2.0 | 295 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | zzcclp/carbondata | mv/plan/src/main/scala/org/apache/carbondata/mv/plans/util/SQLBuildDSL.scala | Scala | apache-2.0 | 18,195 |
package fr.inria.spirals.sigma.ttc14.fixml
import fr.unice.i3s.sigma.m2t.M2T
import fr.inria.spirals.sigma.ttc14.fixml.objlang.support.ObjLang
import fr.inria.spirals.sigma.ttc14.fixml.objlang.support.ObjLang._objlang._
trait ObjLang2CSharp extends BaseObjLangMTT {
override def class2Code(p: DataType) = {
impo... | fikovnik/ttc14-fixml-sigma | ttc14-fixml-extension-2/src/fr/inria/spirals/sigma/ttc14/fixml/ObjLang2CSharp.scala | Scala | epl-1.0 | 487 |
package com.intel.ie.evaluation
import com.intel.ie.analytics.IntelConfig
import com.intel.ie.evaluation.preparation.crawl.ProxyConfig
import scala.io.Source
import scala.reflect.io.File
/**
* Created by xianyan on 8/2/16.
*/
object EvalPaths {
def rawPage(company: String) = IntelConfig.RAW_PAGE_PATH + s"raw-$... | intel-analytics/InformationExtraction | src/main/scala/com/intel/ie/evaluation/EvalPaths.scala | Scala | gpl-3.0 | 1,233 |
/*
* Copyright (C) 2011 Mathieu Mathieu Leclaire <mathieu.Mathieu Leclaire at openmole.org>
*
* This program 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
* (... | openmole/openmole | openmole/plugins/org.openmole.plugin.task.template/src/main/scala/org/openmole/plugin/task/template/TemplateFileTask.scala | Scala | agpl-3.0 | 3,142 |
/*
* Copyright 2013 Marconi Lanna
*
* 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... | ryantanner/ribbon | app/util/Query.scala | Scala | apache-2.0 | 806 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | hhbyyh/spark | external/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaContinuousTest.scala | Scala | apache-2.0 | 3,756 |
package org.bitcoins.db
import org.bitcoins.core.config.NetworkParameters
import org.bitcoins.core.protocol.blockchain.ChainParams
import java.nio.file.Path
import java.nio.file.Paths
import org.bitcoins.core.config.MainNet
import org.bitcoins.core.config.TestNet3
import org.bitcoins.core.config.RegTest
import com.ty... | bitcoin-s/bitcoin-s-core | db-commons/src/main/scala/org/bitcoins/db/AppConfig.scala | Scala | mit | 13,132 |
/*
* 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
* distribute... | xerial/silk | silk-core/src/main/scala/xerial/silk/core/SilkException.scala | Scala | apache-2.0 | 1,958 |
package org.jetbrains.plugins.scala.lang.completion.postfix.templates
import com.intellij.codeInsight.template.postfix.templates.ParenthesizedPostfixTemplate
import org.jetbrains.plugins.scala.lang.completion.postfix.templates.selector.{SelectorConditions, AncestorSelector, ScalaPostfixTemplatePsiInfo}
import org.jetb... | whorbowicz/intellij-scala | src/org/jetbrains/plugins/scala/lang/completion/postfix/templates/ScalaParenthesizedExpressionPostfixTemplate.scala | Scala | apache-2.0 | 632 |
/**
* 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-data-tools/src/main/scala/cmwell/tools/data/utils/akka/stats/IngesterStats.scala | Scala | apache-2.0 | 5,586 |
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.