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 strata
import java.io.File
import java.util.concurrent._
import org.joda.time.DateTime
import strata.data._
import strata.tasks._
import strata.util.ColoredOutput._
import strata.util.IO
import scala.util.Random
/**
* Driver for a full run of strata. Takes care of deciding what to run next.
*/
class Driv... | StanfordPL/strata | src/main/scala/strata/Driver.scala | Scala | apache-2.0 | 11,573 |
package filodb.memory
import org.scalatest.{FunSpec, Matchers, BeforeAndAfterAll}
import org.scalatest.prop.PropertyChecks
import filodb.memory.format.UnsafeUtils.ZeroPointer
class UTF8StringTest extends FunSpec with Matchers with BeforeAndAfterAll with PropertyChecks {
import UTF8StringMedium._
val nativeMem =... | velvia/FiloDB | memory/src/test/scala/filodb.memory/UTF8StringTest.scala | Scala | apache-2.0 | 3,604 |
package com.softwaremill.clippy
sealed trait ColorsConfig
object ColorsConfig {
case object Disabled extends ColorsConfig
case class Enabled(
diff: fansi.Attrs,
comment: fansi.Attrs,
`type`: fansi.Attrs,
literal: fansi.Attrs,
keyword: fansi.Attrs,
reset: fansi.Attrs
) extend... | softwaremill/scala-clippy | plugin/src/main/scala/com/softwaremill/clippy/ColorsConfig.scala | Scala | apache-2.0 | 510 |
package connectors.cortex.services
import java.nio.file.Files
import java.util.Date
import scala.concurrent.duration.FiniteDuration
import scala.concurrent.{ExecutionContext, Future, Promise}
import scala.util.{Success, Try}
import scala.util.control.NonFatal
import play.api.Logger
import play.api.libs.json._
import ... | CERT-BDF/TheHive | thehive-cortex/app/connectors/cortex/services/CortexAnalyzerSrv.scala | Scala | agpl-3.0 | 17,166 |
/*
* 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 ... | Dax1n/spark-core | core/src/main/scala/org/apache/spark/util/ClosureCleaner.scala | Scala | apache-2.0 | 10,219 |
package org.jetbrains.plugins.scala.lang.typeInference
package generated
class TypeInferenceBugs2Test extends TypeInferenceTestBase {
//This class was generated by build script, please don't change this
override def folderPath: String = super.folderPath + "bugs2/"
def testConstructorPatternComplex(): Unit = {do... | JetBrains/intellij-scala | scala/scala-impl/test/org/jetbrains/plugins/scala/lang/typeInference/generated/TypeInferenceBugs2Test.scala | Scala | apache-2.0 | 1,410 |
/*
* 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 ... | ddna1021/spark | sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/json/JsonSuite.scala | Scala | apache-2.0 | 81,086 |
package com.github.filipelenfers.thinkgear
object Main {
def main(args: Array[String]): Unit = {
val iter = new ThinkgearIterator(new ThinkgearConnector)
for( i <- 0 to 10) {
val input = iter.next
println(input)
}
}
} | filipelenfers/thinkgear-scala | src/main/scala/com/github/filipelenfers/thinkgear/Main.scala | Scala | mit | 237 |
/*
* 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/test/scala/com/intel/analytics/bigdl/nn/tf/Conv3DBackpropFilterSpec.scala | Scala | apache-2.0 | 1,313 |
package glint.cypher
import glint.database.RESTProvider
import glint.model.{Model,Node}
import org.specs2.mutable.Specification
import scala.concurrent.Await
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.duration.Duration
import scala.util.{Success,Failure}
/**
* Running of simple... | AlexCAB/Glint | src/test/scala/glint/cypher/RunStatement.scala | Scala | mit | 1,689 |
import java.bla
import scala.horst
import AgentTypes._
import akka.actor.{Actor, ActorLogging, ActorRef, ActorRefFactory, ActorSystem, Props, Stash, Terminated}
class Bar
| ruchee/vimrc | vimfiles/bundle/vim-scala/spec/fixtures/no_package.expected.scala | Scala | mit | 173 |
import org.scalatest.FunSuite
import org.scalatest.matchers.ShouldMatchers._
import org.modiphy.math._
import org.modiphy.tree._
import org.modiphy.math.EnhancedMatrix._
import org.modiphy.sequence._
import ModelData._
import scala.actors.Actor
import scala.actors.Actor._
class ActorModelSuite extends FunSuite {
va... | benb/modiphy | src/test/scala/ActorModelTest.scala | Scala | mit | 1,797 |
/**
* Copyright (C) 2012 Typesafe, Inc. <http://www.typesafe.com>
*/
package org.pantsbuild.zinc
import java.io.File
import java.util.{ List => JList, Map => JMap }
import sbt.Logger
import sbt.Path._
import sbt.compiler.IC
import sbt.inc.{ Analysis, Locate }
import scala.collection.JavaConverters._
import xsbti.co... | laurentgo/pants | src/scala/org/pantsbuild/zinc/Inputs.scala | Scala | apache-2.0 | 7,944 |
package com.twitter.finatra.http.tests.integration.doeverything.main
import com.twitter.finatra.http.routing.HttpWarmup
import com.twitter.finatra.httpclient.RequestBuilder._
import com.twitter.inject.Logging
import com.twitter.inject.utils.Handler
import javax.inject.{Inject, Singleton}
@Singleton
class DoEverything... | syamantm/finatra | http/src/test/scala/com/twitter/finatra/http/tests/integration/doeverything/main/DoEverythingWarmupHandler.scala | Scala | apache-2.0 | 982 |
/*
* 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 ... | vjagadish/samza-clone | samza-core/src/main/scala/org/apache/samza/metrics/reporter/MetricsSnapshotReporterFactory.scala | Scala | apache-2.0 | 4,552 |
package org.scaladebugger.language.parsers.grammar
import org.parboiled2._
import org.scaladebugger.language.models
/**
* Contains function-related grammars.
*/
trait FunctionGrammar extends Parser with ConditionGrammar
with OperationsGrammar with ValueGrammar with WhiteSpaceGrammar
{
val context: models.Contex... | chipsenkbeil/scala-debugger | scala-debugger-language/src/main/scala/org/scaladebugger/language/parsers/grammar/FunctionGrammar.scala | Scala | apache-2.0 | 3,370 |
package models.sunerp
import dtos.{TrangThaiNhanVienDto, ExtGirdDto, PagingDto}
import models.core.{AbstractQuery, AbstractTable, WithId}
import models.sunerp.HeSoLuongs._
import play.api.data.Form
import play.api.data.Forms._
import play.api.db.slick.Config.driver.simple._
import play.api.libs.json.{Json, Writes}
im... | SunriseSoftVN/sunerp | app/models/sunerp/TrangThaiNhanVien.scala | Scala | apache-2.0 | 4,026 |
/* __ *\\
** ________ ___ / / ___ __ ____ 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/util/regex/RegexMatcherTest.scala | Scala | bsd-3-clause | 10,562 |
package sqltyped
private[sqltyped] class Timer(enabled: Boolean) {
def apply[A](msg: => String, indent: Int, a: => A) =
if (enabled) {
val start = System.currentTimeMillis
println((" " * indent) + msg)
val aa = a
println((" " * indent) + (System.currentTimeMillis - start) + "ms")
a... | jonifreeman/sqltyped | core/src/main/scala/timer.scala | Scala | apache-2.0 | 424 |
/*
* Twitter Korean Text - Scala library to process Korean text
*
* Copyright 2015 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/... | nlpenguin/twitter-korean-text | src/main/scala/com/twitter/penguin/korean/tokenizer/KoreanDetokenizer.scala | Scala | apache-2.0 | 2,416 |
package org.scalawiki.dto.markup
case class Table(
headers: Iterable[String],
data: Iterable[Iterable[String]],
title: String = "",
cssClass: String = "wikitable sortable") {
def asWiki = {
"{|" +
(if (cssClass.nonEmpty) s" class='$c... | intracer/scalawiki | scalawiki-core/src/main/scala/org/scalawiki/dto/markup/Table.scala | Scala | apache-2.0 | 1,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 ... | goldmedal/spark | mllib/src/main/scala/org/apache/spark/ml/feature/VectorAssembler.scala | Scala | apache-2.0 | 12,636 |
/*
Copyright 2016-17, Hasso-Plattner-Institut fuer Softwaresystemtechnik GmbH
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicab... | bpn1/ingestion | src/main/scala/de/hpi/ingestion/textmining/tokenizer/CleanWhitespaceTokenizer.scala | Scala | apache-2.0 | 2,319 |
package chapter9
import org.scalacheck.Properties
import org.scalacheck.Prop.forAll
object ParserSpec extends Properties("Parser") {
property("char parser succeeds with char") = forAll { (c: Char) =>
// run(char(c))(c.toString) == Right(c)
c == c
}
property("string parser succeeds with string"... | RaphMad/FPInScala | src/test/scala/chapter9/ParserSpec.scala | Scala | mit | 1,224 |
package scalaz.stream
import scala.collection.immutable.{IndexedSeq,SortedMap,Queue,Vector}
import scala.concurrent.duration._
import scalaz.{Catchable,Functor,Monad,Cobind,MonadPlus,Monoid,Nondeterminism,Semigroup}
import scalaz.concurrent.{Strategy, Task}
import scalaz.Leibniz.===
import scalaz.{\/,-\/,\/-,~>,Leibn... | Spinoco/scalaz-stream | src/main/scala/scalaz/stream/Process.scala | Scala | mit | 62,859 |
package com.sksamuel.elastic4s.validate
import com.sksamuel.elastic4s.Executable
import com.sksamuel.elastic4s.searches.QueryBuilderFn
import org.elasticsearch.action.admin.indices.validate.query.ValidateQueryResponse
import org.elasticsearch.client.Client
import scala.concurrent.Future
trait ValidateExecutables {
... | tyth/elastic4s | elastic4s-tcp/src/main/scala/com/sksamuel/elastic4s/validate/ValidateExecutables.scala | Scala | apache-2.0 | 870 |
package com.arcusys.learn.liferay.update.version300.certificate3004
import com.arcusys.valamis.certificate.model.goal.GoalType
import com.arcusys.valamis.model.PeriodTypes
import com.arcusys.valamis.model.PeriodTypes._
import com.arcusys.valamis.persistence.common.DbNameUtils._
import com.arcusys.valamis.persistence.c... | igor-borisov/valamis | learn-portlet/src/main/scala/com/arcusys/learn/liferay/update/version300/certificate3004/CertificateGoalTableComponent.scala | Scala | gpl-3.0 | 1,823 |
/*
* 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 ... | proprogres/sentiment | src/main/scala/org/apache/spark/ml/feature/PorterStemmer.scala | Scala | unlicense | 10,327 |
package hr.element.geom
import scala.math._
object Rectangle extends Rectangle(Point, Dimension){
def apply(pMin: Point): Rectangle =
Rectangle(pMin, Dimension)
def apply(p1: Point, p2: Point): Rectangle =
Rectangle(
Point(min(p1.x, p2.x), min(p1.y, p2.y))
, Dimension(abs(p1.x - p2.x), abs(p1.y... | melezov/ocd-transform | src/main/scala/hr/element/geom/Rectangle.scala | Scala | bsd-3-clause | 1,097 |
package dsentric.contracts
import cats.data.NonEmptyList
import dsentric.codecs.std.DCodecs
import dsentric.{
Available,
DNull,
DObject,
DeltaEmpty,
DeltaFailed,
DeltaReduce,
DeltaReduced,
DeltaRemove,
DeltaRemoving,
Failed,
Found,
NotFound,
Path,
Raw,
RawArray,
RawObject,
RawObjectOp... | HigherState/dsentric | maps/src/main/scala/dsentric/contracts/DeltaReduceOps.scala | Scala | apache-2.0 | 27,149 |
/*
* Copyright (c) 2019. Yuriy Stul
*/
package com.stulsoft.first.steps
import cats.instances.int._
import cats.instances.string._
import cats.syntax.show._
import com.typesafe.scalalogging.LazyLogging
/** Importing Interface Syntax
*
* @author Yuriy Stul
*/
object ShowEx2 extends App with LazyLogging {
print... | ysden123/poc | cats-examples/first-steps/src/main/scala/com/stulsoft/first/steps/ShowEx2.scala | Scala | mit | 399 |
package gapt.provers.maxsat
import gapt.formats.dimacs.DIMACS.{ Model, Clause, CNF }
object bestAvailableMaxSatSolver extends MaxSATSolver {
val actualSolver =
Seq( OpenWBO, QMaxSAT ).
find( _.isInstalled ).
getOrElse( MaxSat4j )
override def solve( hard: CNF, soft: Seq[( Clause, Int )] ): Option... | gapt/gapt | core/src/main/scala/gapt/provers/maxsat/bestAvailableMaxSatSolver.scala | Scala | gpl-3.0 | 369 |
/***********************************************************************
* Copyright (c) 2013-2020 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... | aheyne/geomesa | geomesa-cassandra/geomesa-cassandra-tools/src/main/scala/org/locationtech/geomesa/cassandra/tools/commands/CassandraIngestCommand.scala | Scala | apache-2.0 | 1,730 |
/*
* 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/iht-frontend | app/iht/controllers/application/assets/properties/PropertiesOverviewController.scala | Scala | apache-2.0 | 2,893 |
package org.jetbrains.plugins.scala.annotator.element
import org.jetbrains.plugins.scala.ScalaVersion
import org.jetbrains.plugins.scala.annotator.ScalaHighlightingTestBase
abstract class ReferenceToStableAndNonStableTypeTestBase extends ScalaHighlightingTestBase {
def testValType(): Unit =
assertNoErrors(
... | JetBrains/intellij-scala | scala/scala-impl/test/org/jetbrains/plugins/scala/annotator/element/ReferenceToStableAndNonStableTypeTestBase.scala | Scala | apache-2.0 | 18,189 |
package dao.sitedata.joined
import scala.concurrent.Future
import javax.inject.Inject
import play.api.db.slick.DatabaseConfigProvider
import play.api.db.slick.HasDatabaseConfigProvider
import play.api.libs.concurrent.Execution.Implicits.defaultContext
import slick.driver.JdbcProfile
import slick.jdbc.GetResult
import ... | tnddn/iv-web | portal/rest-portal/app/dao/sitedata/joined/ZoneInfoDao.scala | Scala | apache-2.0 | 1,088 |
import scala.io.{Source, BufferedSource}
/**
* Created by Variant on 16/3/27.
*/
trait Reader{
type In <: java.io.Serializable
type Content
def read(in : In) : Content
}
class FileReader extends Reader{
type In =String
type Content = BufferedSource
override def read(name :In) =Source.fromFile(name)
}
... | sparkLiwei/ProgrammingNote | scalaLearning/scalaTypeParameteriza/Abstract_Type.scala | Scala | cc0-1.0 | 920 |
package scala.collection.convert
import org.scalacheck.{Properties, Test}
import org.scalacheck.Prop._
import scala.collection.immutable
object WrapperProperties extends Properties("Wrappers") {
override def overrideParameters(p: Test.Parameters): Test.Parameters = p.withInitialSeed(42L)
property("JSetWrappe... | martijnhoekstra/scala | test/scalacheck/scala/collection/convert/WrapperProperties.scala | Scala | apache-2.0 | 669 |
package paddy
import java.nio.ByteBuffer
import java.io.InputStream
/**
* A buffer for reading bytes from an InputStream. At any time, the buffer is partitioned into three sections,
* from left to right: consumed, pending and free.
* Consumed bytes were read from the InputStream and also passed to the application.... | despegar/paddy | src/main/scala/paddy/ReadBuffer.scala | Scala | bsd-2-clause | 3,027 |
package org.terkwood.pathfinding.core.models
/** Represents a potentially walkable space
* on a 2D grid.
*
* @param x the x coordinate
* @param y the y coordinate
* @param walkable Can this node be walked on?
*/
case class Node(x: Int,
y: Int,
walkable: Boolean... | felixt-cake/Pathfinding.scala | src/main/scala/org/terkwood/pathfinding/core/models/Node.scala | Scala | mit | 444 |
/***
* Copyright 2017 Rackspace US, 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... | rackerlabs/api-checker | core/src/test/scala/com/rackspace/com/papi/components/checker/util/TenantUtilSuite.scala | Scala | apache-2.0 | 14,059 |
/*
* Copyright 2009-2017. DigitalGlobe, 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 ... | ngageoint/mrgeo | mrgeo-core/src/main/scala/org/mrgeo/quantiles/Quantiles.scala | Scala | apache-2.0 | 16,285 |
package archery
import org.scalacheck.Arbitrary._
import org.scalatest._
import prop._
import Check._
class JoinedCheck extends PropSpec with Matchers with GeneratorDrivenPropertyChecks {
property("laws for one value") {
forAll { (j1: Joined[Int]) =>
j1.isEmpty shouldBe j1.iterator.isEmpty
val v1 ... | non/archery | core/src/test/scala/archery/JoinedCheck.scala | Scala | mit | 1,025 |
package xyztr
import com.twitter.util.{Await, Future}
import org.scalatest.{FlatSpec, Matchers}
class FutureTest extends FlatSpec with Matchers {
"Futures of Some" can "be handled in one way or the other" in {
val f1 = Future(Some(1))
Await.result(f1.onSuccess {
option => if (option.isDefined) option.... | matshenricson/xyztr | src/test/scala/xyztr/FutureTest.scala | Scala | gpl-3.0 | 1,358 |
package skinny.controller
import skinny.engine.SkinnyEngineFilter
/**
* Skinny controller.
*/
class SkinnyController
extends SkinnyEngineFilter
with SkinnyControllerBase
with SkinnyWebPageControllerFeatures
| holycattle/skinny-framework | framework/src/main/scala/skinny/controller/SkinnyController.scala | Scala | mit | 217 |
/**
* Copyright (c) 2016, Yuriy Stul. All rights reserved
*/
package com.stulsoft.ysps.plist
import scala.collection.mutable.ListBuffer
/**
* Playing with List: ListBuffer.
*
* @author Yuriy Stul
*
*/
object PlayingWithList {
def main(args: Array[String]): Unit = {
println("==>main")
val b1 = new Li... | ysden123/ysps | src/main/scala/com/stulsoft/ysps/plist/PlayingWithList.scala | Scala | mit | 1,333 |
/**
*
* BigIconAlertDialog
* Ledger wallet
*
* Created by Pierre Pollastri on 23/01/15.
*
* The MIT License (MIT)
*
* Copyright (c) 2015 Ledger
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* ... | Morveus/ledger-wallet-android | app/src/main/scala/com/ledger/ledgerwallet/base/BigIconAlertDialog.scala | Scala | mit | 3,908 |
package juan.ddd.proto.util.redis
import juan.ddd.proto.util.GZipper
import org.scalatest.FunSpec
/**
*/
case class TestCaseClass(intField: Int, stringField: String, boolField: Boolean)
class RedisAccessObjectSpec extends FunSpec {
describe ("A RedisDataObject[String]") {
val orig = Seq(("1" -> "one"), ("2" ... | juan62/ddd-proto | src/test/scala/juan/ddd/proto/util/redis/RedisAccessObjectSpec.scala | Scala | mit | 2,912 |
package org.apache.spark.examples.streaming.IBMKafkaStream
import org.apache.spark.SparkConf
import org.apache.spark.streaming.Seconds
import org.apache.spark.streaming.StreamingContext
import org.apache.spark.streaming.kafka.KafkaUtils
import org.apache.spark.HashPartitioner
import org.apache.spark.streaming.Duration... | tophua/spark1.52 | examples/src/main/scala/org/apache/spark/examples/streaming/IBMKafkaStream/WebPagePopularityValueCalculator.scala | Scala | apache-2.0 | 7,127 |
package problem
object CountNegatives
{
def main(args: Array[String]) {
println("Hello")
val matrix = Array(
Array(-5, -4, -2, 0, 3, 8),
Array(-3, -1, 0, 1, 5, 10),
Array(-2, 0, 4, 7, 10, 11),
Array(1, 2, 5, 12, 15, 17)
)
val arr = matrix(0)
binarySearch(arr, 50, 0, arr... | defpearlpilot/webcrawler | src/main/scala/problem/CountNegatives.scala | Scala | gpl-3.0 | 994 |
trait A {
type Node <: NodeImpl;
implicit def coerce(n : NodeImpl) = n.self;
trait NodeImpl {
def self : Node;
}
}
trait B extends A {
type Parent <: ParentImpl;
implicit def coerce(p : ParentImpl) = p.self;
trait ParentImpl;
type Symbol;
trait SymbolImpl {
def scope : Int;
}
implicit def ... | som-snytt/dotty | tests/untried/neg/t712.scala | Scala | apache-2.0 | 407 |
package com.cloudera.hue.livy.yarn
import java.io.{BufferedReader, InputStreamReader}
import java.lang.ProcessBuilder.Redirect
import com.cloudera.hue.livy.{LivyConf, Logging, Utils}
import org.apache.hadoop.yarn.api.records.{ApplicationId, FinalApplicationStatus, YarnApplicationState}
import org.apache.hadoop.yarn.c... | nvoron23/hue | apps/spark/java/livy-yarn/src/main/scala/com/cloudera/hue/livy/yarn/Client.scala | Scala | apache-2.0 | 5,692 |
package com.crobox.clickhouse.dsl
import com.crobox.clickhouse.dsl.JoinQuery.AllLeftJoin
package object parallel {
implicit class ParallelizableQuery(operationalQuery: OperationalQuery) {
/**
* Merging 2 queries will retaining all grouping and selection of both queries and join them using the grouped col... | crobox/clickhouse-scala-client | dsl/src/main/scala/com.crobox.clickhouse/dsl/parallel/package.scala | Scala | lgpl-3.0 | 3,051 |
case class TwentyThree(
_1: Int,
_2: Int,
_3: Int,
_4: Int,
_5: Int,
_6: Int,
_7: Int,
_8: Int,
_9: Int,
_10: Int,
_11: Int,
_12: Int,
_13: Int,
_14: Int,
_15: Int,
_16: Int,
_17: Int,
_18: Int,
_19: Int,
_20: Int,
_21: Int,
_22: Int,
_23: Int
)
object TwentyThree {
def ... | scala/scala | test/files/neg/case-class-23-unrelated-unapply.scala | Scala | apache-2.0 | 1,211 |
package com.github.aselab.activerecord.scalatra
import org.scalatra.LifeCycle
import javax.servlet.ServletContext
import com.github.aselab.activerecord._
trait ActiveRecordLifeCycle extends LifeCycle {
val schemas = Config.loadSchemas()
override def init(context: ServletContext): Unit = {
schemas.foreach(_.i... | aselab/scala-activerecord | scalatra/src/main/scala/ActiveRecordLifeCycle.scala | Scala | mit | 483 |
package org.jetbrains.plugins.scala
package lang
package parser
package parsing
package types
import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder
import org.jetbrains.plugins.scala.lang.parser.parsing.expressions._
/**
* @author Alexander Podkhalyuzin
* Date: 06.02.2008
*/
/*
* AnnotType... | triggerNZ/intellij-scala | src/org/jetbrains/plugins/scala/lang/parser/parsing/types/AnnotType.scala | Scala | apache-2.0 | 1,048 |
package com.seanshubin.schulze.server
//this class is here to remind you that you not to move the SchulzeClassLoaderHandler away from the module that contains the resources you want to serve
class SchulzeClassLoaderAnchor
| SeanShubin/schulze | server/src/main/scala/com/seanshubin/schulze/server/SchulzeClassLoaderAnchor.scala | Scala | unlicense | 223 |
/*
* 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 | store/src/com/treode/store/paxos/PaxosAccessor.scala | Scala | apache-2.0 | 2,634 |
package org.scalacoin.marshallers
import org.scalacoin.marshallers.transaction.TransactionInputMarshaller.TransactionInputFormatter
import org.scalacoin.util.TestUtil
import org.scalatest.{FlatSpec, MustMatchers}
import spray.json.JsArray
/**
* Created by chris on 3/31/16.
*/
class MarshallerUtilTest extends FlatSp... | TomMcCabe/scalacoin | src/test/scala/org/scalacoin/marshallers/MarshallerUtilTest.scala | Scala | mit | 702 |
/**
* 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-recorder/src/main/scala/io/gatling/recorder/http/flows/SecuredNoProxyMitmActor.scala | Scala | apache-2.0 | 3,042 |
package gg.uhc.hosts
sealed trait AppActorSystem
sealed trait RedditApiSystem
sealed trait DatabaseSystem
sealed trait HttpSystem | Eluinhost/hosts.uhc.gg | src/main/scala/gg/uhc/hosts/AppActorSystems.scala | Scala | mit | 131 |
/*
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 not use this f... | mandar2812/DynaML | dynaml-core/src/main/scala/io/github/tailhq/dynaml/evaluation/Metrics.scala | Scala | apache-2.0 | 1,899 |
/**
* Copyright (C) 2014 TU Berlin (peel@dima.tu-berlin.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required... | peelframework/peel | peel-extensions/src/main/scala/org/peelframework/spark/beans/experiment/SparkExperiment.scala | Scala | apache-2.0 | 3,971 |
package scroll.internal.dispatch.impl
import scroll.internal.dispatch.Dispatchable
import scroll.internal.errors.SCROLLErrors.IllegalRoleInvocationDispatch
import scroll.internal.errors.SCROLLErrors.InvocationError
import scroll.internal.util.ReflectiveHelper
import java.lang.reflect.InvocationTargetException
import ... | max-leuthaeuser/SCROLL | core/src/main/scala/scroll/internal/dispatch/impl/SCROLLDispatchable.scala | Scala | lgpl-3.0 | 1,013 |
package app.circumstances
import utils.LightFakeApplication
import utils.pageobjects.{PageObjects, XmlPage, TestData, Page}
import utils.pageobjects.xml_validation.{XMLCircumstancesBusinessValidation, XMLBusinessValidation}
import app.FunctionalTestCommon
import utils.pageobjects.circumstances.start_of_process.GReport... | Department-for-Work-and-Pensions/ClaimCapture | c3/test/app/circumstances/FunctionalTestCase33Spec.scala | Scala | mit | 1,241 |
// code-examples/Traits/ui2/button.scala
package ui2
import ui.Widget
class Button(val label: String) extends Widget with Clickable {
println("Button is created.")
def click() = {
// Logic to give the appearance of clicking a button...
println("Button is clicked.")
}
}
| foomango/scalaex | minimalscala/src/main/scala/Traits/ui2/button.scala | Scala | mit | 287 |
package dpla.ingestion3.mappers.providers
import dpla.ingestion3.mappers.utils.Document
import dpla.ingestion3.messages.{IngestMessage, MessageCollector}
import dpla.ingestion3.model.{SkosConcept, _}
import dpla.ingestion3.utils.FlatFileIO
import org.scalatest.{BeforeAndAfter, FlatSpec}
import scala.xml.{NodeSeq, XML... | dpla/ingestion3 | src/test/scala/dpla/ingestion3/mappers/providers/TxMappingTest.scala | Scala | mit | 6,572 |
package ru.avhaliullin.whatever.backend
/**
* @author avhaliullin
*/
case class AccessModifiers(public: Boolean, static: Boolean, fnl: Boolean = false) {
import org.apache.bcel.Constants._
def flags: Short = {
(if (public) ACC_PUBLIC else ACC_PRIVATE) |
(if (static) ACC_STATIC else 0) |
(if (... | avhaliullin/whatever-compiler | compiler/src/main/scala/ru/avhaliullin/whatever/backend/AccessModifiers.scala | Scala | mit | 357 |
/*
* Copyright (C) 2015 Stratio (http://stratio.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 app... | fjsc/sparta | serving-api/src/main/scala/com/stratio/sparta/serving/api/actor/LocalLauncherActor.scala | Scala | apache-2.0 | 3,914 |
package com.tristanpenman.chordial.core
import java.net.InetSocketAddress
import akka.actor.{Actor, ActorLogging, ActorRef, Props, Stash}
import akka.io.{IO, Udp}
import akka.serialization.{Serialization, SerializationExtension}
import akka.util.ByteString
/**
* Actor class that routes messages to local or remote ... | tristanpenman/chordial | modules/core/src/main/scala/com/tristanpenman/chordial/core/Router.scala | Scala | bsd-3-clause | 3,610 |
/*
* Copyright (c) 2014-2020 by The Monix Project Developers.
* See the project homepage at: https://monix.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache... | alexandru/monifu | monix-reactive/shared/src/test/scala/monix/reactive/internal/operators/DropUntilSuite.scala | Scala | apache-2.0 | 3,217 |
package com.twitter.finagle.netty4.ssl.server
import com.twitter.finagle.Stack
import com.twitter.finagle.ssl.KeyCredentials
import com.twitter.finagle.ssl.server.{
SslServerConfiguration,
SslServerEngineFactory,
SslContextServerEngineFactory
}
import com.twitter.finagle.transport.Transport
import com.twitter.io... | mkhq/finagle | finagle-netty4/src/test/scala/com/twitter/finagle/netty4/ssl/server/Netty4ServerSslChannelInitializerTest.scala | Scala | apache-2.0 | 2,510 |
package knot.net.http.models
import java.net.URI
import knot.core.stream.graphs.SourceGraph
import knot.data.ByteNode
import knot.net.http.{HttpMethod, HttpProtocol}
import scala.collection.immutable
sealed trait ParserSignal
sealed trait RequestSignal extends ParserSignal
case class RequestStart(method: HttpMeth... | defvar/knot | knot-net/src/main/scala/knot/net/http/models/ParserSignal.scala | Scala | mit | 1,182 |
/*
Copyright 2014 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... | zirpins/summingbird | summingbird-batch-hadoop/src/main/scala/com/twitter/summingbird/batch/state/Versioning.scala | Scala | apache-2.0 | 1,113 |
/**
* Recursive binary search algorithm
* @param list the integer array which is being searched (sorted list)
* @param l lower value for partition
* @param r upper value for partition
* @param num number which is being searched for
* @return the index of the element that matches the search term, returns -1 if not foun... | Deepak345/al-go-rithms | search/binary_search/scala/binary_search.scala | Scala | mit | 884 |
package models
import javax.validation.constraints.{ NotNull, Size }
import java.util.{ List => JList }
import org.bson.types.ObjectId
import org.mongodb.morphia.annotations.{ Transient, Entity, Indexed }
import scala.beans.BeanProperty
import scala.language.postfixOps
/**
* Created by pengyt on 2015/7/8.
*/
@Enti... | Lvxingpai/Hedylogos-Server | app/models/Conversation.scala | Scala | apache-2.0 | 2,271 |
/*
* Copyright 1998-2019 Linux.org.ru
* 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... | maxcom/lorsource | src/main/scala/ru/org/linux/section/SectionService.scala | Scala | apache-2.0 | 2,780 |
// Generated by the Scala Plugin for the Protocol Buffer Compiler.
// Do not edit!
//
// Protofile syntax: PROTO3
package com.google.protobuf.source_context
/** `SourceContext` represents information about the source of a
* protobuf element, like the file in which it is defined.
*
* @param fileName
* The pa... | scalapb/ScalaPB | scalapb-runtime/src/main/js-native/com/google/protobuf/source_context/SourceContext.scala | Scala | apache-2.0 | 6,081 |
package colossus.protocols.http.streaming
import colossus.controller.{ControllerDownstream, Encoding, FatalErrorAction}
import colossus.protocols.http.{HttpMessageHead, HttpRequestHead, HttpResponseHead}
import colossus.service.Protocol
import colossus.streaming._
import scala.language.higherKinds
object GenEncoding... | tumblr/colossus | colossus/src/main/scala/colossus/protocols/http/streaming/StreamService.scala | Scala | apache-2.0 | 4,371 |
/*
* 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 ... | rahul003/mxnet | scala-package/examples/src/test/scala/org/apache/mxnetexamples/multitask/MultiTaskSuite.scala | Scala | apache-2.0 | 2,115 |
package feh.tec.cvis.db
import java.nio.ByteBuffer
import java.util.UUID
import feh.util._
import feh.tec.cvis.DescriptorsSupport.{ADescriptor, IDescriptor}
import feh.tec.cvis.common.cv.Helper._
import feh.tec.cvis.common.cv.describe.{CallDescriptor, ArgDescriptor, CallHistory}
import org.opencv.core.{Size, Point}
i... | fehu/comp-vis | harris-app/src/main/scala/feh/tec/cvis/db/SingleChannelDescriptorsWithStats.scala | Scala | mit | 10,748 |
package com.sksamuel.elastic4s.mappings
import com.sksamuel.elastic4s.searches.suggestion.CompletionSuggestionDefinition
import com.sksamuel.exts.OptionImplicits._
case class CompletionFieldDefinition(name: String,
analyzer: Option[String] = None,
... | aroundus-inc/elastic4s | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/mappings/CompletionFieldDefinition.scala | Scala | apache-2.0 | 4,571 |
package ammonite.runtime
import ammonite.util.{ImportData, Name}
import scala.reflect.NameTransformer
import scala.tools.nsc._
import scala.tools.nsc.plugins.{Plugin, PluginComponent}
import scala.reflect.internal.util.{BatchSourceFile, OffsetPosition}
/**
* Used to capture the names in scope after every execution,... | coderabhishek/Ammonite | amm/interp/src/main/scala/ammonite/runtime/AmmonitePlugin.scala | Scala | mit | 8,826 |
package io.buoyant.router.context
import com.twitter.finagle.{SimpleFilter, Service, ServiceFactory, Stack, Stackable}
import com.twitter.finagle.context.Contexts
object LocalKey {
private[this] class SetterFilter[T, Req, Rsp](key: Contexts.local.Key[T], value: T)
extends SimpleFilter[Req, Rsp] {
def apply... | denverwilliams/linkerd | router/core/src/main/scala/io/buoyant/router/context/LocalKey.scala | Scala | apache-2.0 | 1,247 |
package com.github.log0ymxm.mapper.examples.mnist
import org.apache.log4j.{ Level, LogManager }
import org.apache.spark.mllib.linalg.distributed.{ CoordinateMatrix, IndexedRow, IndexedRowMatrix, MatrixEntry }
import org.apache.spark.mllib.linalg.{ DenseVector, Vector, Vectors }
import org.apache.spark.{ SparkConf, Spa... | log0ymxm/spark-mapper | src/main/scala/com/github/log0ymxm/mapper/examples/mnist/MNISTDriver.scala | Scala | apache-2.0 | 3,054 |
/*
* Copyright 2001-2016 Artima, Inc.
* Copyright 2016 agido GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... | agido/pageobject | core/src/main/scala/org/pageobject/core/dsl/QueryDsl.scala | Scala | apache-2.0 | 5,378 |
package org.nd4s.ops
import org.nd4j.linalg.api.complex.IComplexNumber
import org.nd4j.linalg.api.ndarray.INDArray
import org.nd4j.linalg.api.ops.{Op, BaseScalarOp}
import org.nd4j.linalg.factory.Nd4j
import org.nd4s.Implicits._
object BitFilterOps {
def apply(x:INDArray,f:Double=>Boolean):BitFilterOps = new BitFil... | LiuShifeng/nd4s | src/main/scala/org/nd4s/ops/BitFilterOps.scala | Scala | apache-2.0 | 1,522 |
package com.mesosphere.cosmos.thirdparty.marathon.model
import com.netaporter.uri.dsl._
import org.scalatest.FreeSpec
final class AppIdSpec extends FreeSpec {
private[this] val relative: String = "cassandra/dcos"
private[this] val absolute: String = s"/$relative"
"AppId should" - {
"consistently render" ... | takirala/cosmos | cosmos-test-common/src/test/scala/com/mesosphere/cosmos/thirdparty/marathon/model/AppIdSpec.scala | Scala | apache-2.0 | 1,089 |
package ildl
package benchmark
package aos2soa
//
// You can read about this benchmark on the following wiki page:
// https://github.com/miniboxing/ildl-plugin/wiki/Sample-~-Array-of-Struct
//
/** The package object introduces the data structures and the data accessors */
object `package` {
// define the sensor rea... | miniboxing/ildl-plugin | tests/benchmarks/src/ildl/benchmark/aos2soa/package.scala | Scala | bsd-3-clause | 662 |
def f(a: Int, b: Int) = {}
println((/* offset: 4 */ f)(1, 2)) | ilinum/intellij-scala | testdata/resolve2/function/type/Parentheses.scala | Scala | apache-2.0 | 62 |
/***********************************************************************
* Copyright (c) 2013-2020 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... | aheyne/geomesa | geomesa-features/geomesa-feature-all/src/test/scala/org/locationtech/geomesa/features/SerializationTester.scala | Scala | apache-2.0 | 5,007 |
package is.hail.expr.ir
import is.hail.asm4s.AsmFunction2
import is.hail.utils.FastIndexedSeq
import org.scalatest.testng.TestNGSuite
import org.testng.annotations.{DataProvider, Test}
import scala.reflect.ClassTag
class MissingArrayBuilderSuite extends TestNGSuite {
def ordering[T <: AnyVal](f: (T, T) => Boolean)... | danking/hail | hail/src/test/scala/is/hail/expr/ir/MissingArrayBuilderSuite.scala | Scala | mit | 4,665 |
/*
* Copyright 2014–2017 SlamData Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | drostron/quasar | effect/src/main/scala/quasar/effect/Timing.scala | Scala | apache-2.0 | 2,301 |
package org.jetbrains.plugins.scala.lang.structureView.element
import javax.swing.Icon
import com.intellij.openapi.util.Iconable
import com.intellij.psi.PsiElement
import org.jetbrains.plugins.scala.extensions.{IteratorExt, PsiElementExt}
import org.jetbrains.plugins.scala.lang.psi.api.expr.ScBlockExpr
import org.jet... | jastice/intellij-scala | scala/scala-impl/src/org/jetbrains/plugins/scala/lang/structureView/element/Variable.scala | Scala | apache-2.0 | 1,803 |
package services
import javax.inject._
import play.modules.reactivemongo.ReactiveMongoApi
import scala.concurrent.{Future, ExecutionContext}
import reactivemongo.play.json.collection.JSONCollection
import play.api.libs.json.{JsNumber, JsArray, Json}
import utils.Constants
import org.joda.time.DateTime
import play.modu... | CamilleTh/goc_backend | app/services/FeelServices.scala | Scala | mit | 3,520 |
package info.amrhassan.graphs.sparse
import info.amrhassan.graphs.{Graph, Edge}
case class SparseGraph[Vertex] private(isDirected: Boolean, vertices: Set[Vertex], edges: List[Edge[Vertex]],
_edgesFrom: Map[Vertex, List[Edge[Vertex]]],
_edge... | amrhassan/scala-toygraphs | src/main/scala/info/amrhassan/graphs/sparse/SparseGraph.scala | Scala | mit | 1,628 |
import sbt._
object Version {
val scala = "2.10.5"
val json4s = "3.2.11"
val sprayJson = "1.3.2"
val scalatest = "2.2.3"
val slf4j = "1.6.4"
val commonLang = "2.6"
val commonFileUpload = "1.3.1"
val commonIO = "2.4"
val jodaConvert ... | ViLPy/Valamis | project/Dependencies.scala | Scala | lgpl-3.0 | 7,607 |
package com.twitter.querulous.evaluator
import java.sql.ResultSet
import com.twitter.querulous.query.QueryClass
abstract class QueryEvaluatorProxy(queryEvaluator: QueryEvaluator) extends QueryEvaluator {
def select[A](queryClass: QueryClass, query: String, params: Any*)(f: ResultSet => A) = {
delegate(queryEva... | kievbs/querulous210 | src/main/scala/com/twitter/querulous/evaluator/QueryEvaluatorProxy.scala | Scala | apache-2.0 | 1,344 |
package com.datastax.spark.connector.rdd.reader
import com.datastax.driver.core.Row
import com.datastax.spark.connector.{CassandraRowMetadata, ColumnRef}
/** Transforms a Cassandra Java driver `Row` into high-level row representation, e.g. a tuple
* or a user-defined case class object. The target type `T` must be s... | ponkin/spark-cassandra-connector | spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/rdd/reader/RowReader.scala | Scala | apache-2.0 | 827 |
package com.sasaki.cluster
import org.apache.spark.rdd.RDD
import org.apache.spark.mllib.regression.LabeledPoint
import org.apache.spark.mllib.clustering._
import com.sasaki.utils._
/**
* Input LabeledPoint, output LabeledSet.
*/
class ClusterWithLP(val data: RDD[NewLabeledPoint]) {
val features = data.map(_.fea... | sasakigao/seq-clustering | pack-dimred/src/main/scala/com/sasaki/cluster/ClusterWithLP.scala | Scala | apache-2.0 | 1,482 |
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.