code stringlengths 5 1M | repo_name stringlengths 5 109 | path stringlengths 6 208 | language stringclasses 1
value | license stringclasses 15
values | size int64 5 1M |
|---|---|---|---|---|---|
package com.datastax.spark.connector.rdd.partitioner
import java.net.{InetAddress, InetSocketAddress}
import com.datastax.oss.driver.api.core.CqlIdentifier
import com.datastax.spark.connector.ColumnSelector
import com.datastax.spark.connector.cql.CassandraConnector
import com.datastax.spark.connector.util._
import co... | datastax/spark-cassandra-connector | connector/src/main/scala/com/datastax/spark/connector/rdd/partitioner/ReplicaPartitioner.scala | Scala | apache-2.0 | 4,356 |
/*
* 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 ... | ptkool/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/CreateNamespaceExec.scala | Scala | apache-2.0 | 2,261 |
package dk.tennis.compare.rating.multiskill.infer.outcome
import dk.bayes.math.gaussian.Gaussian
import dk.tennis.compare.rating.multiskill.model.perfdiff.Score
import scala.math._
import Gaussian._
object InferOutcomeGivenPerfDiff {
def totalLoglik(perfDiffs: Array[Gaussian], scores: Array[Score], filter: (Score... | danielkorzekwa/tennis-player-compare | multiskill/src/main/scala/dk/tennis/compare/rating/multiskill/infer/outcome/InferOutcomeGivenPerfDiff.scala | Scala | bsd-2-clause | 2,492 |
package scodec.protocols.pcap
import scodec.Err
import scodec.bits.{ BitVector, ByteOrdering }
import scodec.{ Attempt, Codec, DecodeResult, SizeBound }
import scodec.codecs._
case class GlobalHeader(
ordering: ByteOrdering,
versionMajor: Int,
versionMinor: Int,
thiszone: Int,
sigfigs: Long,
snaplen: Long... | scodec/scodec-protocols | src/main/scala/scodec/protocols/pcap/GlobalHeader.scala | Scala | bsd-3-clause | 1,579 |
package reopp.workers.connectors
import actors.OutputChannel
import reopp.workers.Node
import reopp.common.guardedcommands.{Formula, GCSolution}
import reopp.common.guardedcommands.dataconnectors.GCLossy
/**
* Created with IntelliJ IDEA.
* User: jose
* Date: 09/05/12
* Time: 15:37
* To change this template use F... | joseproenca/ip-constraints | code/src/main/scala/reopp/workers/connectors/Lossy.scala | Scala | mit | 1,274 |
package com.seancheatham
package object chess {
//
// Piece-type Constants
//
/**
* An "invalid" square, or "out-of-bounds"
*/
final val _I: Byte =
0
/**
* An "empty" square
*/
final val _E: Byte =
1
/**
* Black Pawn
*/
final val BP: Byte =
2
/**
* Black ... | SeanCheatham/chess-scala | src/main/scala/com/seancheatham/chess/package.scala | Scala | apache-2.0 | 3,853 |
package controllers
import scala.util.{ Try, Success, Failure }
import play.api.mvc._
import play.twirl.api.Html
import lila.api.Context
import lila.app._
import lila.puzzle.PuzzleId
import lila.puzzle.{ Generated, Puzzle => PuzzleModel }
import lila.user.{ User => UserModel, UserRepo }
import views._
import views.h... | danilovsergey/i-bur | app/controllers/Puzzle.scala | Scala | mit | 5,782 |
package spark
import org.apache.spark.SparkContext
import org.apache.spark.SparkContext._
import org.apache.spark.SparkConf
object ScalaWordCount {
def main(args: Array[String]) {
val conf = new SparkConf().setAppName("Scala Word Count").setMaster("yarn-client")
val sc = new SparkContext(conf)
val file ... | gaoxuesong/HDPLAB | Java_Rev3/workspace/Spark/src/main/scala/spark/ScalaWordCount.scala | Scala | apache-2.0 | 593 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | tillrohrmann/flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/nodes/FlinkConventions.scala | Scala | apache-2.0 | 2,303 |
package unfiltered.jetty
import org.eclipse.jetty.server.{NCSARequestLog, Handler}
import unfiltered.util.{ PlanServer, RunnableServer }
import javax.servlet.Filter
import org.eclipse.jetty.server.handler.{ContextHandlerCollection, RequestLogHandler, HandlerCollection}
/** Holds port bindings for selected ports and ... | omarkilani/unfiltered | jetty/src/main/scala/Server.scala | Scala | mit | 4,376 |
/*
* 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 | core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala | Scala | apache-2.0 | 26,584 |
/*
* Copyright 2015 the original author or authors.
* @https://github.com/scouter-project/scouter
*
* 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/... | scouter-project/scouter | scouter.server/src/main/scala/scouter/server/netio/service/handle/AlertService.scala | Scala | apache-2.0 | 6,594 |
package jdub.async
import com.github.mauricio.async.db.ResultSet
trait RawQuery[A] {
def sql: String
def values: Seq[Any] = Seq.empty
def handle(results: ResultSet): A
}
trait Query[A] extends RawQuery[A] {
def handle(results: ResultSet) = reduce(results.toIterator.map(rd => new Row(rd)))
def reduce(rows: ... | KyleU/jdub-async | src/main/scala/jdub/async/Query.scala | Scala | mit | 789 |
package org.automanlang.core.question
import org.automanlang.core.AutomanAdapter
import org.automanlang.core.answer.AbstractAnswer
import org.automanlang.core.policy.aggregation.MetaAggregationPolicy
import org.automanlang.core.scheduler.MetaScheduler
import scala.concurrent._
import scala.concurrent.ExecutionC... | dbarowy/AutoMan | libautoman/src/main/scala/org/automanlang/core/question/MetaQuestion.scala | Scala | gpl-2.0 | 773 |
import scala.io.Source
import fileIO._
/**
* Yaml辞書よりIndex辞書を構築
*/
object createYamlIndex {
//パラメータ
val infile: String = "yaml/new_argframes.yaml"
val outfile: String = "yaml/new_argframes.dic"
def main(args: Array[String]): Unit = {
println("-start-")
val yaml = Source.fromFile(infile).getLines
val index... | Takeuchi-Lab-LM/scala_asa3 | ASA/src/main/scala/createYamlIndex.scala | Scala | mit | 1,365 |
package com.arcusys.valamis.persistence.impl.scorm.storage
import com.arcusys.valamis.lesson.scorm.model.tracking.GlobalObjectiveState
import com.arcusys.valamis.lesson.scorm.storage.tracking.GlobalObjectiveStorage
import com.arcusys.valamis.persistence.common.SlickProfile
import com.arcusys.valamis.persistence.impl.s... | igor-borisov/valamis | valamis-slick-persistence/src/main/scala/com/arcusys/valamis/persistence/impl/scorm/storage/GlobalObjectiveStorageImpl.scala | Scala | gpl-3.0 | 2,696 |
package com.twitter.algebird
import org.specs._
import org.scalacheck.Arbitrary
import org.scalacheck.Arbitrary.arbitrary
import org.scalacheck.Properties
import org.scalacheck.Gen.choose
object BloomFilterLaws extends Properties("BloomFilter") {
import BaseProperties._
val NUM_HASHES = 6
val WIDTH = 32
val... | snoble/algebird | algebird-test/src/test/scala/com/twitter/algebird/BloomFilterTest.scala | Scala | apache-2.0 | 2,311 |
package preact.dsl.symbol
import preact.Preact
import scala.scalajs.js
sealed trait Entry
object Entry {
case class Attribute(value: (String, js.Any)) extends Entry
case class Child(value: Preact.Child) extends Entry
case class Children(value: Iterable[Preact.Child]) extends Entry
case object EmptyAttribute ... | LMnet/scala-js-preact | dsl/symbol/src/main/scala/preact/dsl/symbol/Entry.scala | Scala | mit | 1,664 |
package sri.test
import sri.web.router.{History, HistoryOptions}
import scala.scalajs.js
package object router {
def memoryHistory(options: js.UndefOr[HistoryOptions] = js.undefined) = if (options.isDefined && options.get.basename.isDefined) History.useQueries(History.useBasename(History.createHashHistory))(optio... | chandu0101/sri | test/src/main/scala/sri/test/router/package.scala | Scala | apache-2.0 | 390 |
package com.wavesplatform.lang.v1.testing
import com.wavesplatform.common.state.ByteStr
import com.wavesplatform.common.utils.Base58
import com.wavesplatform.lang.v1.parser.BinaryOperation
import com.wavesplatform.lang.v1.parser.BinaryOperation._
import com.wavesplatform.lang.v1.parser.Expressions.Pos.AnyPos
import co... | wavesplatform/Waves | lang/testkit/src/main/scala/com/wavesplatform/lang/v1/testing/ScriptGen.scala | Scala | mit | 6,606 |
package com.evecentral.util
object ActorNames {
val statCache = "StatCache"
val statCapture = "statcapture"
val http_quicklookquery = "http_quicklookquery"
val http_marketstat = "http_marketstat"
val http_oldupload = "http_oldupload"
val routefinder = "routefinder"
val getorders = "getorders"
val uploa... | theatrus/eve-central.com | core/src/main/scala/com/evecentral/util/ActorNames.scala | Scala | agpl-3.0 | 488 |
/*
* This file is part of AckCord, licensed under the MIT License (MIT).
*
* Copyright (c) 2019 Katrix
*
* 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, including ... | Katrix-/AckCord | data/src/main/scala-2.13/ackcord/SnowflakeMap.scala | Scala | mit | 11,999 |
/*
* ModelResource.scala
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package pt.cnbc.wikimodels.rest
import java.io.InputStream
import java.lang.annotation._
import java.net.URI
import javax.ws.rs.GET
import javax.ws.rs.POST
import javax.ws.rs.PUT
impor... | alexmsmartins/WikiModels | wm_server/src/main/scala/pt/cnbc/wikimodels/rest/CompartmentResource.scala | Scala | mit | 8,538 |
package monocle.syntax
import monocle.function._
import monocle.macros.GenLens
import monocle.std._
import monocle.{Lens, MonocleSuite, Prism}
class SymbolicSyntaxExample extends MonocleSuite {
case class Store(articles: List[Article])
sealed trait Article
case class Table(wood: String) extends Article
case... | malcolmgreaves/Monocle | example/src/test/scala/monocle/syntax/SymbolicSyntaxExample.scala | Scala | mit | 1,251 |
/*
* Copyright (C) 2016 DANS - Data Archiving and Networked Services ([email protected])
*
* 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-process-sip | src/main/scala/nl.knaw.dans.easy.multideposit/SplitMultiDepositApp.scala | Scala | apache-2.0 | 4,532 |
/*
* 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/frsse2008/calculations/PeriodCalculator.scala | Scala | apache-2.0 | 1,829 |
#!/bin/bash
exec scala \
-Djava.library.path="../lib/linux_x86" \
-classpath "../bin:../lib:../lib/linux_x86/com.google.ortools.jar" \
"$0" "$@"
!#
/** USAGE: ./coeffTest1.scala DIM_A DIM_B
*/
import scala.collection.mutable.HashSet
import polytope._
/** Print extremal edges for given dimensions
*/
object ExtEdge... | expz/polytope | scripts/edges.scala | Scala | gpl-3.0 | 710 |
package exemples
import helpers.sorus._
import helpers.sorus.SorusDSL._
import scala.concurrent.Future
import scalaz._
class BasicExemple extends Sorus {
// Sample User class
case class User(id: Option[Long], email: String, validate: Boolean)
def doSomething(): Future[Fail \\/ User] = {
for {
user ... | Driox/sorus | test/examples/BasicExemple.scala | Scala | apache-2.0 | 1,071 |
package org.squeryl.test.arrays
import _root_.org.squeryl.framework._
import org.squeryl.test.PrimitiveTypeModeForTests._
abstract class PrimitiveArrayTest extends SchemaTester with RunTestsInsideTransaction {
self: DBConnector =>
val schema = PrimitiveArraySchema
import PrimitiveArraySchema._
... | wukaikailive/squeryl | src/test/scala/org/squeryl/test/arrays/PrimitiveArrayTest.scala | Scala | apache-2.0 | 2,930 |
/*
* Copyright 2011 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
*
* Unless required by applicable l... | lift/lift | framework/lift-base/lift-webkit/src/main/scala/net/liftweb/mockweb/MockWeb.scala | Scala | apache-2.0 | 7,091 |
/*
* Copyright 2014 JHC Systems Limited
*
* 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... | DavidGregory084/sqlest | sqlest/src/main/scala/sqlest/ast/syntax/InsertSyntax.scala | Scala | apache-2.0 | 2,532 |
import org.apache.spark.SparkContext
import org.apache.spark.SparkContext._
import org.apache.spark.SparkConf
import org.apache.spark.rdd.RDD
import org.slf4j.LoggerFactory
import org.apache.spark.mllib.linalg.Vectors
import org.apache.spark.mllib.clustering.dbscan.DBSCAN
object DBSCAN_acute_infl {
val log = LoggerF... | neurodev-thesis/notebooks | DBSCAN/DBSCAN_acute_infl.scala | Scala | apache-2.0 | 3,885 |
/*
* 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 ... | iiisthu/sparkSdn | core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala | Scala | apache-2.0 | 16,827 |
/*
* Copyright 2008-present MongoDB, 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 ag... | rozza/mongo-scala-driver | driver/src/main/scala/org/mongodb/scala/internal/ZipObservable.scala | Scala | apache-2.0 | 3,962 |
/*
Copyright (C) 2013-2019 Expedia 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 wri... | mikkokar/styx | system-tests/e2e-suite/src/test/scala/com/hotels/styx/proxy/https/HttpsSpec.scala | Scala | apache-2.0 | 2,656 |
package org.jetbrains.plugins.scala
package decompiler
import java.io.IOException
import com.intellij.lang.LanguageParserDefinitions
import com.intellij.openapi.project.{DefaultProjectFactory, Project, ProjectManager}
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.psi.compiled.ClsStubBuilder
import c... | whorbowicz/intellij-scala | src/org/jetbrains/plugins/scala/decompiler/ScClsStubBuilder.scala | Scala | apache-2.0 | 4,664 |
/**
* Copyright 2011-2017 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... | timve/gatling | gatling-http/src/main/scala/io/gatling/http/ahc/HttpEngine.scala | Scala | apache-2.0 | 4,258 |
package io.buoyant.linkerd
import com.fasterxml.jackson.annotation.JsonSubTypes.Type
import com.fasterxml.jackson.annotation.{JsonIgnore, JsonSubTypes}
import com.twitter.conversions.time._
import com.twitter.finagle.Stack
import com.twitter.finagle.loadbalancer.LoadBalancerFactory.EnableProbation
import com.twitter.f... | hhtpcd/linkerd | linkerd/core/src/main/scala/io/buoyant/linkerd/LoadBalancerConfig.scala | Scala | apache-2.0 | 2,237 |
package pureconfig
import com.typesafe.config._
import pureconfig.error.{CannotConvert, KeyNotFound, WrongType}
class ConfigCursorSuite extends BaseSuite {
val defaultPath = List("key2", "key1")
val defaultPathStr = "key1.key2"
def conf(confStr: String): ConfigValue = {
ConfigFactory.parseString(s"aux = ... | pureconfig/pureconfig | tests/src/test/scala/pureconfig/ConfigCursorSuite.scala | Scala | mpl-2.0 | 11,430 |
/*
* 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/reactivemongo-test | src/test/scala/uk/gov/hmrc/mongo/FailOnUnindexedQueriesSpec.scala | Scala | apache-2.0 | 3,654 |
package ch.epfl.bigdata.btc.crawler.btc
import org.apache.http.client.fluent._;
object RequestFactory {
var mock: Request = _
def Get(uri: String) : Request = mock match {
case _ : Request => mock
case _ => Request.Get(uri)
}
def Post(uri: String) : Request = mock match {
case _ : Request => mock
... | cheseaux/BitcoinTradingSystem | crawl-framework/src/main/scala/ch/epfl/bigdata/btc/crawler/btc/RequestFactory.scala | Scala | gpl-2.0 | 402 |
package example.gql_server
import java.time.ZonedDateTime
import java.time.format.DateTimeFormatter
import java.util.Date
import sangria.ast.StringValue
import sangria.marshalling.DateSupport
import sangria.schema._
import sangria.validation.ValueCoercionViolation
import scala.util.{Failure, Success, Try}
package obj... | t-mochizuki/scala-study | circleci-example/gql-server/src/main/scala/example/gql_server/schema/package.scala | Scala | mit | 1,276 |
/*
* 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 ... | mashin-io/rich-spark | streaming/src/main/scala/org/apache/spark/streaming/dstream/FileInputDStream.scala | Scala | apache-2.0 | 16,914 |
package skinny.task.generator
import skinny.controller.Params
/**
* Scaffold generator with ssp template.
*/
object ScaffoldSspGenerator extends ScaffoldSspGenerator
/**
* Scaffold generator with ssp template.
*/
trait ScaffoldSspGenerator extends ScaffoldGenerator {
val packageImportsWarning =
s"""<%-- B... | holycattle/skinny-framework | task/src/main/scala/skinny/task/generator/ScaffoldSspGenerator.scala | Scala | mit | 14,857 |
package vu.ml
import shapeless._
import shapeless.labelled._
import shapeless.nat._
import shapeless.ops.nat.ToInt
import vu.ml.Weka._
import weka.core.{Attribute, Instance}
/**
* Polymorphic functions on Weka primitives for generalisation of the Weka algoritms
*
* @author v.uspenskiy
* @since 18/03/15
*/
obje... | vuspenskiy/shapeless-weka | src/main/scala/vu/ml/Functions.scala | Scala | mit | 3,399 |
package models.team
import scalaz._
import Scalaz._
import scalaz.effect.IO
import scalaz.Validation
import scalaz.Validation.FlatMap._
import scalaz.NonEmptyList._
import scalaz.syntax.SemigroupOps
import cache._
import db._
import models.Constants._
import io.megam.auth.funnel.FunnelErrors._
import com.datastax.dr... | indykish/vertice_gateway | app/models/team/Organizations.scala | Scala | mit | 5,141 |
/***********************************************************************
* Copyright (c) 2013-2018 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and... | ddseapy/geomesa | geomesa-utils/src/test/scala/org/locationtech/geomesa/utils/stats/Z3FrequencyTest.scala | Scala | apache-2.0 | 4,247 |
/* 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/chain/Chain.scala | Scala | apache-2.0 | 8,273 |
package controllers.addons
import scalaz._
import Scalaz._
import scalaz.NonEmptyList._
import scalaz.Validation._
import io.megam.auth.funnel._
import io.megam.auth.funnel.FunnelErrors._
import models.billing._
import play.api.mvc._
import controllers.stack.Results
import net.liftweb.json._
import net.liftweb.json.J... | indykish/vertice_gateway | app/controllers/addons/Addons.scala | Scala | mit | 2,734 |
object Test {
for {
x1 <- List(1, 2)
x2 <- Iterator(3, 4)
x3 <- Seq(5, 6).iterator
x4 <- LazyList(7, 8)
} yield x1 + x2 + x3 + x4
}
| som-snytt/dotty | tests/pos/iterator-traversable-mix.scala | Scala | apache-2.0 | 152 |
/*
* OpenSRS -- a Scala library for using the OpenSRS API
* Copyright (C) 2016 James Edwin Cain (user opensrs, domain jcain.net)
*
* This file is part of the net.jcain.opensrs library. This Library is free
* software; you may redistribute it or modify it under the terms of the
* license contained in the file LIC... | jec/OpenSRS | src/test/scala/net/jcain/opensrs/RegistrySpec.scala | Scala | bsd-3-clause | 2,637 |
//: ----------------------------------------------------------------------------
//: Copyright (C) 2014 Verizon. 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 Licen... | oncue/remotely | core/src/main/scala/Protocol.scala | Scala | apache-2.0 | 3,982 |
package database
import akka.actor.{Actor, ActorRef, Props}
import com.mongodb.casbah.Imports._
import com.mongodb.casbah.commons.{MongoDBObject, Imports}
import database.BusRouteDefinitionsDB.ROUTE_DEFINITION_DOCUMENT
import database.BusRouteDefinitionsDB.ROUTE_DEFINITION_DOCUMENT.STOP_SEQUENCE_DEFINITION
import data... | chrischivers/London-Bus-Tracker-Play-Framework | app/database/BusRouteDefinitionsDB.scala | Scala | mit | 6,238 |
/*
* 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 ... | ashokblend/incubator-carbondata | integration/spark/src/main/scala/org/apache/spark/sql/CarbonCatalystOperators.scala | Scala | apache-2.0 | 4,417 |
package chandu0101.scalajs.react.components.optionselectors
import japgolly.scalajs.react._
import scala.scalajs.js
import scala.scalajs.js.Dynamic.{literal => json}
import scala.scalajs.js.{Array => JArray}
/**
* key: PropTypes.string,
ref: PropTypes.String,
allowCreate: React.PropTypes.bool,
asyncOptions: Reac... | coreyauger/scalajs-react-components | core/src/main/scala/chandu0101/scalajs/react/components/optionselectors/ReactSelect.scala | Scala | apache-2.0 | 5,696 |
package de.khamrakulov.play.metrics.ganglia
import org.scalatest.{FlatSpec, Matchers}
import play.api.{Configuration, Environment}
import scala.collection.JavaConversions._
/**
* @author Timur Khamrakulov <[email protected]>.
*/
class ConfigCheckSpec extends FlatSpec with Matchers {
val env = Environ... | htimur/metrics-reporter-play | ganglia/src/test/scala/de/khamrakulov/play/metrics/ganglia/ConfigCheckSpec.scala | Scala | mit | 555 |
package com.karasiq.mapdb.transaction
import java.util.concurrent.Executors
import com.karasiq.mapdb.MapDbProvider
import scala.concurrent.duration._
import scala.concurrent.{Await, ExecutionContext, Future}
import scala.util.Try
trait TransactionScheduler { self: MapDbProvider ⇒
protected final val txSchedulerEx... | Karasiq/mapdbutils | src/main/scala/com/karasiq/mapdb/transaction/TransactionScheduler.scala | Scala | mit | 1,778 |
/*
* 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... | wzhongyuan/BigDL | spark/dl/src/main/scala/com/intel/analytics/bigdl/optim/AbstractOptimizer.scala | Scala | apache-2.0 | 11,022 |
package com.hypertino.binders.json.internal
import java.io.Writer
import com.hypertino.binders.util.MacroAdapter
import MacroAdapter.Context
import scala.language.experimental.macros
private [json] object JsonMacro {
def parseJson[O: c.WeakTypeTag]
(c: Context): c.Expr[O] = {
val c0: c.type = c
val bu... | hypertino/json-binders | jsonBinders/shared/src/main/scala/com/hypertino/binders/json/internal/JsonMacro.scala | Scala | bsd-3-clause | 1,078 |
object Test extends App {
import collection._
val xs: SeqView[(String, Int), Seq[_]] = List("x").view.zip(Stream.from(0))
println(xs)
val ys = List(1, 2, 3).view map { x => println("mapping "+x); x + 1 }
println("ys defined")
println(ys.head)
println(ys.tail)
println(ys(2))
println(ys)
println(ys.f... | felixmulder/scala | test/files/run/viewtest.scala | Scala | bsd-3-clause | 1,520 |
package zeroadv.position
import zeroadv.{IBeaconBeacon, GimbalBeacon, DimM, BeaconSpotting}
class BeaconDistance {
def distanceToBeacon(spotting: BeaconSpotting): DimM = {
val txPower = spotting.beacon match {
case g: GimbalBeacon => -69
case IBeaconBeacon(_, _, _, tp) => tp
}
DimM(distance... | adamw/zeroadv | collector/src/main/scala/zeroadv/position/BeaconDistance.scala | Scala | gpl-2.0 | 709 |
/*
* 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 | resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/KubernetesClusterSchedulerBackend.scala | Scala | apache-2.0 | 9,970 |
/*
* Copyright (c) 2014 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.apache.org... | mdavid/lessig-bigdata | lib/snowplow/3-enrich/scala-hadoop-shred/src/main/scala/com.snowplowanalytics.snowplow.enrich/hadoop/ShredJobConfig.scala | Scala | mit | 3,005 |
package avrohugger
package format
object FieldRenamer {
// Reserved words from https://www.scala-lang.org/files/archive/spec/2.13/01-lexical-syntax.html#identifiers
private val RESERVED_WORDS: Set[String] = Set("abstract", "case", "catch", "class", "def", "do", "else", "extends", "final", "finally",
"for", "fo... | julianpeeters/avrohugger | avrohugger-core/src/main/scala/format/FieldRenamer.scala | Scala | apache-2.0 | 840 |
package uk.co.mattthomson.coursera.ggp.gresley.gdl
import com.twitter.util.Memoize
case class GameState(game: GameDescription, trueFacts: Set[Fact]) {
lazy val legalActions = Memoize(legalActionsUnmemoized)
private def legalActionsUnmemoized(role: String) = {
game.actions.getOrElse(role, List()).filter(isLeg... | matt-thomson/gresley | src/main/scala/uk/co/mattthomson/coursera/ggp/gresley/gdl/GameState.scala | Scala | mit | 1,234 |
/*
* Copyright 2021 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | spotify/scio | scio-extra/src/main/scala-2.13/com/spotify/scio/extra/sparkey/instances/SparkeySetBase.scala | Scala | apache-2.0 | 932 |
package module2
class HelloScala2 {
case class TryOut(some: String, fields: List[String])
def test = "Hello"
def someOther = 42
} | RadoBuransky/sonar-scoverage-plugin | samples/maven/combined-scala-java-multi-module-sonar/module2/src/main/scala/module2/HelloScala2.scala | Scala | lgpl-3.0 | 139 |
package com.twitter.finagle
private[finagle] object IOExceptionStrings {
/** Strings that commonly signal a broken socket connection */
val ChannelClosedStrings: Set[String] = Set(
"Connection reset by peer", // Found on linux
"Broken pipe", // Found on linux
"An existing connection was forcibly close... | koshelev/finagle | finagle-core/src/main/scala/com/twitter/finagle/IOExceptionStrings.scala | Scala | apache-2.0 | 886 |
/*
* 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 ... | databricks/spark-tfocs | src/test/scala/org/apache/spark/mllib/optimization/tfocs/SolverSLPSuite.scala | Scala | apache-2.0 | 5,432 |
package com.twitter.finagle.protobuf.rpc
class RpcControllerWithOnFailureCallback extends RpcController {
private var cancelRequested = false
private var callaback: RpcCallback[Throwable] = null
def reset(): Unit = {
cancelRequested = false
}
def failed(): Boolean = { throw new RuntimeException("Not ... | firebase/finagle | finagle-protobuf/src/main/scala/com/twitter/finagle/protobuf/rpc/RpcControllerWithOnFailureCallback.scala | Scala | apache-2.0 | 1,246 |
package com.github.mdr.mash.runtime
import scala.PartialFunction.condOpt
sealed trait MashBoolean extends MashValue with Comparable[MashBoolean] {
import MashBoolean._
def value: Boolean = this == True
def negate: MashBoolean = this match {
case True ⇒ False
case False ⇒ True
}
override def toS... | mdr/mash | src/main/scala/com/github/mdr/mash/runtime/MashBoolean.scala | Scala | mit | 871 |
/*
* Copyright 2012-2013 Stephane Godbillon (@sgodbillon)
*
* 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 appl... | duncancrawford/Play-Json-ReactiveMongo | src/main/scala/play/modules/reactivemongo/findandmodify.scala | Scala | apache-2.0 | 2,569 |
package yuuto.yuutogates.miltipart
import java.util
import java.lang.Iterable
import codechicken.lib.vec.BlockCoord
import codechicken.multipart.MultiPartRegistry.IPartConverter
import codechicken.multipart.TMultiPart
import net.minecraft.block.Block
import net.minecraft.nbt.NBTTagCompound
import net.minecraft.tileen... | AnimeniacYuuto/YuutoGates | src/main/scala/yuuto/yuutogates/miltipart/MultiPartConverter.scala | Scala | lgpl-3.0 | 1,434 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | bravo-zhang/spark | sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/sources/ConsoleWriterSuite.scala | Scala | apache-2.0 | 4,296 |
package parsers
import com.github.agourlay.cornichon.json.CornichonJson
import org.openjdk.jmh.annotations.{ Benchmark, BenchmarkMode, Fork, Measurement, Mode, Scope, State, Warmup }
@State(Scope.Benchmark)
@BenchmarkMode(Array(Mode.Throughput))
@Warmup(iterations = 10)
@Measurement(iterations = 10)
@Fork(value = 1, ... | agourlay/cornichon | benchmarks/src/main/scala/parsers/CornichonJsonBench.scala | Scala | apache-2.0 | 1,531 |
package org.jetbrains.plugins.scala
package lang
package psi
package impl
package base
package types
import com.intellij.lang.ASTNode
import com.intellij.psi.PsiElement
import com.intellij.psi.util.PsiTreeUtil
import org.jetbrains.plugins.scala.extensions.ifReadAllowed
import org.jetbrains.plugins.scala.lang.parser.Sc... | triplequote/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/base/types/ScSelfTypeElementImpl.scala | Scala | apache-2.0 | 2,274 |
/**
* 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... | bluebreezecf/kafka | core/src/main/scala/kafka/api/GroupMetadataRequest.scala | Scala | apache-2.0 | 3,042 |
package edu.uci.eecs.spectralLDA.algorithm
import org.scalatest._
import org.apache.spark.SparkContext
import edu.uci.eecs.spectralLDA.testharness.Context
import breeze.linalg._
import breeze.stats.distributions._
import org.apache.commons.math3.random.MersenneTwister
class TensorLDATest extends FlatSpec with Matcher... | FurongHuang/SpectralLDA-TensorSpark | src/test/scala/edu/uci/eecs/spectralLDA/algorithm/TensorLDATest.scala | Scala | apache-2.0 | 5,559 |
package views.html
import play.twirl.api._
import play.twirl.api.TemplateMagic._
import play.api.templates.PlayMagic._
import models._
import controllers._
import java.lang._
import java.util._
import scala.collection.JavaConversions._
import scala.collection.JavaConverters._
import play.api.i18n._
import play.core.... | tarunmittal/dockerized-play-app | target/scala-2.11/twirl/main/views/html/main.template.scala | Scala | gpl-2.0 | 2,875 |
/*
* Copyright (c) 2006-2007, AIOTrade Computing Co. and Contributors
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* o Redistributions of source code must retain the above copyrigh... | wandoulabs/wandou-math | wandou-indicator-basic/src/main/scala/org/aiotrade/lib/indicator/basic/BIASIndicator.scala | Scala | apache-2.0 | 2,522 |
package org.leialearns.crystallize.item
import grizzled.slf4j.Logging
import org.leialearns.crystallize.util.LoggingConfiguration
import org.scalatest.FunSuite
class TestItems extends FunSuite with LoggingConfiguration with Logging {
test("Items") {
info("\n\nTest items")
val actions = Category.getCategory... | jeroenvanmaanen/crystallize | src/test/scala/org/leialearns/crystallize/item/TestItems.scala | Scala | lgpl-2.1 | 1,006 |
/*
* Copyright (c) 2014-2015 by its authors. Some rights reserved.
* See the project homepage at: http://www.monifu.org
*
* 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://... | sergius/monifu | monifu/shared/src/main/scala/monifu/reactive/internals/operators/switch.scala | Scala | apache-2.0 | 3,015 |
package im.tox.antox.utils
import android.util.Log
import im.tox.antox.utils.FileTransferManager._
object FileTransferManager {
private val TAG = "im.tox.antox.utils.FileTransferManager"
}
class FileTransferManager () {
private var _transfers: Map[Long, FileTransfer] = Map[Long, FileTransfer]()
private var _ke... | 0xPoly/Antox | app/src/main/scala/im/tox/antox/utils/FileTransferManager.scala | Scala | gpl-3.0 | 1,402 |
/*
* Copyright 2017 Datamountaineer.
*
* 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... | datamountaineer/stream-reactor | kafka-connect-cassandra/src/main/scala/com/datamountaineer/streamreactor/connect/cassandra/sink/CassandraSinkTask.scala | Scala | apache-2.0 | 3,212 |
package deaktator
import com.google.caliper.Benchmark
import com.google.caliper.Param
import com.google.caliper.BeforeExperiment
import org.apache.commons.vfs2.VFS
class BagOfWordsBench {
@Param(Array("32","64","128","256", "512", "1000","10000","100000","1000000")) var size: Int = _
private[this] val pi1000000 ... | deaktator/skip-grams-bench | src/test/scala/deaktator/BagOfWordsBench.scala | Scala | mit | 2,196 |
package com.exratione.sdgexample
import com.exratione.sdgexample.config._
import com.exratione.sdgexample.guice._
import com.exratione.sdgexample.service._
import com.hubspot.dropwizard.guice.GuiceBundle
import com.yammer.dropwizard.bundles.ScalaBundle
import com.yammer.dropwizard.config.{Bootstrap, Configuration, Env... | exratione/scala-dropwizard-guice-example | dropwizard-6.2/src/main/scala/com/exratione/sdgexample/SdgExampleScalaService.scala | Scala | mit | 2,020 |
package com.identityblitz.saml.action
import com.identityblitz.saml.ws.transport.{PlayResponseAdapter, PlayRequestAdapter}
import com.identityblitz.shibboleth.idp.util.HttpHelper
import com.identityblitz.saml.IdpPlayBridge._
import org.opensaml.util.storage.StorageService
import edu.internet2.middleware.shibboleth.idp... | brainysmith/idp-play-bridge | src/main/scala/com/identityblitz/saml/action/LoginContextBridge.scala | Scala | mit | 689 |
package com.lunatic.mlx.cuisines.model
/**
*
*/
case class Recipe(id: Int, cuisine: String, ingredients: List[String])
| tupol/sparx-mllib | src/main/scala/com/lunatic/mlx/cuisines/model/Recipe.scala | Scala | apache-2.0 | 123 |
/**
* 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"); yo... | guozhangwang/kafka | core/src/test/scala/unit/kafka/server/epoch/util/ReplicaFetcherMockBlockingSend.scala | Scala | apache-2.0 | 5,665 |
/*
* 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/conversation/NameUpdater.scala | Scala | gpl-3.0 | 7,445 |
package com.coinport
import com.twitter.util.Future
import com.coinport.thrift.ExchangeBackend
import akka.pattern.ask
import akka.util.Timeout
import scala.concurrent.duration._
import scala.concurrent._
import scala.concurrent.ExecutionContext.Implicits.global
import conversions.FutureConversion._
class ExchangeBac... | CryptArc/gyro | servers/src/main/scala/com.coinport/ExchangeBackendService.scala | Scala | apache-2.0 | 535 |
package com.wavesplatform.api.http
import scala.concurrent.Future
import scala.util.Success
import akka.http.scaladsl.marshalling.ToResponseMarshallable
import akka.http.scaladsl.server.Route
import cats.instances.either._
import cats.instances.list._
import cats.instances.try_._
import cats.syntax.alternative._
impo... | wavesplatform/Waves | node/src/main/scala/com/wavesplatform/api/http/TransactionsApiRoute.scala | Scala | mit | 14,483 |
package com.rasterfoundry.database
import com.rasterfoundry.database.Implicits._
import com.rasterfoundry.database.filter._
import com.rasterfoundry.datamodel._
import doobie._
import doobie.implicits._
object MetricDao extends Dao[Metric] {
val tableName = "metrics"
val selectF = sql"""SELECT
period, metric... | raster-foundry/raster-foundry | app-backend/db/src/main/scala/MetricDao.scala | Scala | apache-2.0 | 1,519 |
package latis.ops
import latis.dm.Function
import latis.dm.Tuple
import latis.dm.Variable
/**
* Splits a Function with a Tuple codomain into a Tuple
* of scalar Functions.
*
* Note: Will cause the original Function to be read.
*/
class Split extends Operation {
override def applyToFunction(function: Funct... | dlindhol/LaTiS | src/main/scala/latis/ops/Split.scala | Scala | epl-1.0 | 803 |
package net.walend.disentangle.graph.semiring.benchmark
import scalax.collection.GraphPredef.EdgeLikeIn
import net.walend.disentangle.graph.semiring.{Dijkstra, FloydWarshall, Brandes, FewestNodes, FirstStepsTrait, AllPathsFirstSteps}
import net.walend.disentangle.scalagraph.semiring.{ConvertToLabelDigraph, GraphFacto... | dwalend/Disentangle | benchmark/src/test/scala/net/walend/disentangle/graph/semiring/benchmark/TimingStudiesTest.scala | Scala | mit | 5,568 |
import sbt._
import Keys._
object ExampleBuild extends Build {
val paradiseV = "2.1.0-M5"
lazy val baseSettings = Seq(
scalaVersion := "2.11.6",
scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature", "-language:experimental.macros"),
crossScalaVersions := Seq("2.10.2", "2.10.3", "2.10.4", ... | frroliveira/metamorphic | examples/slick3-spray/shop/project/Build.scala | Scala | mit | 1,080 |
/*
* 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.
*/
// GENERATED CODE: DO NOT EDIT... | scala/scala | src/library/scala/runtime/AbstractFunction4.scala | Scala | apache-2.0 | 480 |
package models.query
case class CityCode(cityCode: String)
| LeonardoZ/SAEB | app/models/query/CityCode.scala | Scala | mit | 63 |
/*
* The MIT License
*
* Copyright (c) 2017 Fulcrum Genomics LLC
*
* 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, including without limitation the rights
* to us... | fulcrumgenomics/fgbio | src/main/scala/com/fulcrumgenomics/bam/ClipBam.scala | Scala | mit | 15,919 |
/**
* 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"); yo... | sslavic/kafka | core/src/main/scala/kafka/server/DynamicConfig.scala | Scala | apache-2.0 | 6,378 |
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.