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.databricks.spark.corenlp
import scala.reflect.runtime.universe.TypeTag
import com.databricks.spark.corenlp.functions._
import org.apache.spark.sql.Row
import org.apache.spark.sql.expressions.UserDefinedFunction
import org.apache.spark.sql.functions._
class functionsSuite extends SparkFunSuite {
priva... | PiotrOrzeszek/praedicatum | src/test/scala/com/databricks/spark/corenlp/functionsSuite.scala | Scala | gpl-3.0 | 3,219 |
/*
* 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 ... | u2009cf/spark-radar | project/SparkBuild.scala | Scala | apache-2.0 | 35,154 |
package api
import core.{CoreActors, Core}
import akka.actor.{ActorSystem, Props}
import spray.routing.{HttpService, RouteConcatenation}
import scala.concurrent.ExecutionContext
import ExecutionContext.Implicits.global
/**
* The REST API layer. It exposes the REST services, but does not provide any
* web server inte... | yumyai/fasta-search | src/main/scala/api/Api.scala | Scala | apache-2.0 | 735 |
package com.karasiq.shadowcloud.utils
import java.io.InputStream
import akka.util.ByteString
object ByteStringInputStream {
def apply(bytes: ByteString): ByteStringInputStream = {
new ByteStringInputStream(bytes)
}
}
class ByteStringInputStream(bytes: ByteString) extends InputStream {
private[this] var bu... | Karasiq/shadowcloud | utils/.jvm/src/main/scala/com/karasiq/shadowcloud/utils/ByteStringInputStream.scala | Scala | apache-2.0 | 1,031 |
package com.jejking.rprng.png
import akka.stream.stage.{GraphStage, GraphStageLogic, InHandler, OutHandler}
import akka.stream.{Attributes, FlowShape, Inlet, Outlet}
import akka.util.{ByteString, ByteStringBuilder}
/**
* Graph stage to emit Png IDAT chunks as [[akka.util.ByteString]] instances from a source of byte... | jejking/rprng | src/main/scala/com/jejking/rprng/png/IdatStage.scala | Scala | apache-2.0 | 3,275 |
package tu.model.knowledge.way2think
import tu.model.knowledge.{Probability, KnowledgeURI}
import tu.model.knowledge.action.ActionModel
/**
* @author max talanov
* date 2012-07-06
* time: 4:12 PM
*/
class Way2ThinkModel(_uri: KnowledgeURI, _probability: Probability = new Probability())
extends ... | keskival/2 | model.knowledge/src/main/scala/tu/model/knowledge/way2think/Way2ThinkModel.scala | Scala | gpl-3.0 | 576 |
package controllers
import securesocial.controllers.BaseLoginPage
import play.api.mvc.{ AnyContent, Action }
import play.api.Logger
import securesocial.core.RuntimeEnvironment
import models.Player
class AuthController(implicit override val env: RuntimeEnvironment[Player]) extends BaseLoginPage[Player] {
override de... | Cornichon/io | app/controllers/AuthController.scala | Scala | mit | 373 |
package suiryc.scala.sys.linux
import grizzled.slf4j.Logging
import java.io.File
import java.nio.file.{Path, Paths}
import suiryc.scala.io.{AllPassFileFilter, NameFilter, PathFinder, SourceEx}
import suiryc.scala.io.NameFilter._
import suiryc.scala.sys.{Command, CommandResult}
import suiryc.scala.util.EitherEx
class... | swhgoon/suiryc-scala | core/src/main/scala/suiryc/scala/sys/linux/Device.scala | Scala | gpl-3.0 | 3,972 |
package scala.in.programming.packazee.two
package bobsrockets
package fleets
/**
* It is possible.
*
* @author loustler
* @since 03/31/2017 20:35
*/
class Fleet {
def addShip() = new Ship
} | loustler/scala | src/main/scala/scala/in/programming/packazee/PackageEx3.scala | Scala | mit | 203 |
/*******************************************************************
* See the NOTICE file distributed with this work for additional *
* information regarding Copyright ownership. The author/authors *
* license this file to you under the terms of the Apache License *
* Version 2.0 (the "License"); you may not... | reactivecodes/scala-time | src/main/scala/codes/reactive/package.scala | Scala | apache-2.0 | 2,239 |
package org.scalaide.debug.internal.model
import java.util.concurrent.atomic.AtomicBoolean
import java.util.concurrent.atomic.AtomicReference
import scala.Left
import scala.Right
import scala.collection.JavaConverters.asScalaBufferConverter
import scala.concurrent.Future
import scala.util.Either
import org.eclipse.d... | scala-ide/scala-ide | org.scala-ide.sdt.debug/src/org/scalaide/debug/internal/model/ScalaThread.scala | Scala | bsd-3-clause | 16,660 |
package org.jetbrains.plugins.scala
package lang
package parser
package parsing
package patterns
import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder
/**
* @author Alexander Podkhalyuzin
* Date: 28.02.2008
*/
/*
* CaseClauses ::= CaseClause {CaseClause}
*/
object CaseClauses extends Case... | whorbowicz/intellij-scala | src/org/jetbrains/plugins/scala/lang/parser/parsing/patterns/CaseClauses.scala | Scala | apache-2.0 | 748 |
/*
* Copyright 2016 The BigDL Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | yiheng/BigDL | spark/dl/src/test/scala/com/intel/analytics/bigdl/nn/ops/TopKSerialTest.scala | Scala | apache-2.0 | 1,046 |
package com.twitter.util.lint
import scala.collection.immutable.{Iterable, List}
/**
* A collection of [[Rule rules]].
*
* Implementations must be thread-safe for clients to use.
*
* Most usage will be via the implementation provided
* by [[GlobalRules.get]].
*/
trait Rules {
/**
* Return all rules [[add ... | BuoyantIO/twitter-util | util-lint/src/main/scala/com/twitter/util/lint/Rules.scala | Scala | apache-2.0 | 1,190 |
package wordhunter
/**
* Defines the restrictions to make a word search
*/
class WordRegex(private val regex: String) {
def filter(word: String): Boolean = word.matches(regex)
}
object WordRegex {
def apply(str: String) = new WordRegex("^"+str.replace("*",".*").replace("?",".?").replace("_",".{1}")+"$")
}
| adrijardi/WordHunter | app/wordhunter/WordRegex.scala | Scala | apache-2.0 | 315 |
/*
* 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 ... | ueshin/apache-spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/statsEstimation/JoinEstimation.scala | Scala | apache-2.0 | 15,752 |
package graf.tp3.docs
import graf.gremlin.structure.util._
import graf.gremlin.structure.util.show._
import scala.language.postfixOps
import scalaz.Scalaz._
object TheGraphFeatures extends App {
val graph = TinkerGraphFactory.open()
graph.println
graph.features.println
graph.features.graph.supportsTransactio... | dkrieg/Graf | src/example/scala/graf/tp3/docs/TheGraphFeatures.scala | Scala | apache-2.0 | 403 |
package services.invoices
import javax.inject.Singleton
import java.io._
import models.invoice.Invoice
import controllers.viewinput.InvoiceViewInput
import javax.inject.Inject
import play.api.Configuration
import services.templates.ExternalTemplatesService
import services.translations.TranslationService
import io.gith... | marcin-lawrowski/felicia | app/services/invoices/PdfService.scala | Scala | gpl-3.0 | 3,085 |
// timber -- Copyright 2012-2021 -- Justin Patterson
//
// 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... | scalawag/timber | slf4j-over-timber/src/main/scala/org/scalawag/timber/bridge/slf4j/Slf4jBridgeLoggerAdapter.scala | Scala | apache-2.0 | 6,212 |
package scalaz.stream.mongodb.query
/** Enumerations used in Query definition **/
trait QueryEnums {
/** Enumeration to define explain verbosity **/
object ExplainVerbosity extends Enumeration {
val Normal, Verbose = Value
}
/** Enumeration to define ordering **/
object Order extends Enumeration {
... | Spinoco/scalaz-stream-mongodb | core/src/main/scala/scalaz/stream/mongodb/query/QueryEnums.scala | Scala | mit | 386 |
/*
* Copyright (C) 2016 Typesafe Inc. <http://www.typesafe.com>
*/
package akka.persistence.cassandra.query
import java.nio.ByteBuffer
import java.time.LocalDate
import java.time.LocalDateTime
import java.time.ZoneId
import java.time.ZoneOffset
import java.time.temporal.ChronoUnit
import java.util.UUID
import scala... | kpbochenek/akka-persistence-cassandra | src/test/scala/akka/persistence/cassandra/query/EventsByTagSpec.scala | Scala | apache-2.0 | 31,725 |
/*
* Copyright 2012 IL <iron9light AT gmali DOT 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 applicabl... | iron9light/ideacolorschemes-plugin | src/main/scala/com/ideacolorschemes/ideacolor/IdeaSettings.scala | Scala | apache-2.0 | 1,167 |
package sbtmoe
sealed abstract class TargetSDK {
private[sbtmoe] def xcodeName: String
private[sbtmoe] final def name: String = xcodeName
override def toString: String = name
}
object TargetSDK {
case object IPhoneOS extends TargetSDK {
def xcodeName = "iphoneos"
}
case object IPhoneSim extends Targ... | HevyLight/sbt-moe | src/main/scala/sbtmoe/TargetSDK.scala | Scala | apache-2.0 | 372 |
package org.sisioh.aws4s.eb.model
import java.util.Date
import com.amazonaws.services.elasticbeanstalk.model.{ ConfigurationOptionSetting, CreateConfigurationTemplateResult }
import org.sisioh.aws4s.PimpedType
import scala.collection.JavaConverters._
object CreateConfigurationTemplateResultFactory {
def create()... | everpeace/aws4s | aws4s-eb/src/main/scala/org/sisioh/aws4s/eb/model/RichCreateConfigurationTemplateResult.scala | Scala | mit | 3,565 |
package org.scalatra
package atmosphere
import java.util.concurrent.{ CountDownLatch, TimeUnit }
import javax.servlet.http.{ HttpServletRequest, HttpServletResponse }
import _root_.akka.actor.ActorSystem
import org.atmosphere.wasync._
import org.atmosphere.wasync.impl.{ DefaultOptions, DefaultOptionsBuilder, DefaultR... | Alefas/Scalatra | atmosphere/src/test/scala/org/scalatra/atmosphere/AtmosphereSpec.scala | Scala | bsd-2-clause | 4,626 |
/*
* Copyright (C) 2016 Christopher Batey and Dogan Narinc
*
* 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... | mikefero/cpp-driver | gtests/src/integration/scassandra/server/codec/src/test/scala/org/scassandra/codec/datatype/IntSpec.scala | Scala | apache-2.0 | 1,766 |
/*
* ____ ____ _____ ____ ___ ____
* | _ \\ | _ \\ | ____| / ___| / _/ / ___| Precog (R)
* | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data
* | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, In... | precog/platform | yggdrasil/src/main/scala/com/precog/yggdrasil/scheduling/ScheduledRunReport.scala | Scala | agpl-3.0 | 1,936 |
/*
* 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 ... | WangTaoTheTonic/flink | flink-libraries/flink-table/src/main/scala/org/apache/flink/table/expressions/composite.scala | Scala | apache-2.0 | 3,739 |
/*
*************************************************************************************
* Copyright 2011 Normation SAS
*************************************************************************************
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero Ge... | jooooooon/rudder | rudder-core/src/test/scala/com/normation/rudder/migration/TestManageMigration_10_2.scala | Scala | agpl-3.0 | 11,070 |
/*
* Copyright 2001-2013 Artima, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | travisbrown/scalatest | src/us/US.scala | Scala | apache-2.0 | 26,189 |
def compose[G[_]](G: Applicative[G]): Applicative[({type f[x] = F[G[x]]})#f] = {
val self = this
new Applicative[({type f[x] = F[G[x]]})#f] {
def unit[A](a: => A) = self.unit(G.unit(a))
override def map2[A,B,C](fga: F[G[A]], fgb: F[G[B]])(f: (A,B) => C) =
self.map2(fga, fgb)(G.map2(_,_)(f))
}
... | lucaviolanti/scala-redbook | answerkey/applicative/09.answer.scala | Scala | mit | 322 |
/*
* 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/TPCDSQuerySuite.scala | Scala | apache-2.0 | 2,836 |
package com.yetu.notification.client.model
import play.api.libs.json.{Format, Json}
case class RabbitMessage(key: String = "*", payload: String)
object RabbitMessage {
implicit val messageJsonFormat: Format[ClientMessage] = Json.format[ClientMessage]
} | yetu/yetu-notification-client-scala | src/main/scala/com/yetu/notification/client/model/RabbitMessage.scala | Scala | mit | 258 |
/*******************************************************************************
* Copyright (c) 2009 David Orme and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is availa... | writeonly/JSWT | src/main/scala/pl/writeonly/jswt/scaladsl/XScalaWTStyles.scala | Scala | unlicense | 3,449 |
/*
* Copyright 2010-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 applica... | lift/framework | core/common/src/test/scala/net/liftweb/common/ConversionsSpec.scala | Scala | apache-2.0 | 2,696 |
/*
* 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 ... | amirhyoussefi/spark-template | src/main/scala/org/apache/spark/examples/SparkHdfsLR.scala | Scala | apache-2.0 | 2,694 |
package scadla.backends
import scadla._
import dzufferey.utils.SysCmd
import java.io._
trait Viewer {
def apply(obj: Polyhedron): Unit
}
object Viewer {
def default: Viewer = {
if (MeshLab.isPresent) MeshLab
else if (x3d.X3DomViewer.isPresent) x3d.X3DomViewer
else sys.error("No viewer available")
... | dzufferey/scadla | src/main/scala/scadla/backends/Viewer.scala | Scala | apache-2.0 | 327 |
/*
Copyright (c) 2017, Robby, Kansas State University
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of cond... | sireum/v3-intellij | src/org/sireum/intellij/SireumProjectComponent.scala | Scala | bsd-2-clause | 3,144 |
package org.deepdive.settings
/* Extraction Settings */
case class ExtractionSettings(extractors: List[Extractor], parallelism: Int)
| infinitespace/deepdive | src/main/scala/org/deepdive/settings/models/ExtractionSettings.scala | Scala | apache-2.0 | 134 |
/*
* 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 ... | pgandhi999/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Count.scala | Scala | apache-2.0 | 2,775 |
package lv.addresses.indexer
import java.io.BufferedInputStream
import java.io.BufferedOutputStream
import java.io.BufferedWriter
import java.io.DataInputStream
import java.io.DataOutputStream
import java.io.File
import java.io.FileInputStream
import java.io.FileOutputStream
import java.io.OutputStreamWriter
import ja... | mrumkovskis/addresses | indexer/src/main/scala/AddressIndexLoader.scala | Scala | mit | 6,556 |
package connectorFamily.connector
import org.junit.Test
import org.junit.Assert._
import Examples._
class TestConnector {
def pp(c:Conn) = println(PP.typeAndPrint(c))
def ppe(c:Conn) = println(PP.typeAndPrintWithErrors(c))
@Test def TestComposition() {
// all should type&check
println("--- test... | joseproenca/connector-family | src/test/scala/connectorFamily/connector/TestConnector.scala | Scala | mit | 5,572 |
package opencl.generator.stencil
import ir._
import ir.ast._
import lift.arithmetic.SizeVar
import opencl.executor._
import opencl.generator.stencil.acoustic.StencilUtilities
import opencl.ir._
import opencl.ir.pattern.{MapGlb, _}
import org.junit.Assert._
import org.junit.Assume.assumeFalse
import org.junit.{Ignore, ... | lift-project/lift | src/test/opencl/generator/stencil/TestStencilRodinia.scala | Scala | mit | 27,123 |
/*
* Copyright 2001-2009 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... | yyuu/scalatest | src/main/scala/org/scalatest/BeforeAndAfterAll.scala | Scala | apache-2.0 | 10,169 |
package cucumber.api.scala
import _root_.org.junit.{Test, Assert}
import Assert._
import _root_.gherkin.I18n
import _root_.gherkin.formatter.model.Tag
import collection.JavaConverters._
import cucumber.api.Scenario
class ScalaDslTest {
object StubScenario extends Scenario{
def getSourceTagNames = null
def... | chiranjith/cucumber-jvm | scala/src/test/scala/cucumber/api/scala/ScalaDslTest.scala | Scala | mit | 3,788 |
package org.scalajs.junit
import com.novocode.junit.RunSettings
import sbt.testing._
abstract class JUnitBaseRunner(
val args: Array[String],
val remoteArgs: Array[String],
private[junit] val testClassLoader: ClassLoader,
private[junit] val runSettings: RunSettings) extends Runner {
protected def n... | nicolasstucki/scala-js-junit | runtime/src/main/scala/org/scalajs/junit/JUnitBaseRunner.scala | Scala | bsd-3-clause | 1,622 |
/*
* Copyright 2011-2022 GatlingCorp (https://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... | gatling/gatling | gatling-graphite/src/main/scala/io/gatling/graphite/sender/TcpSender.scala | Scala | apache-2.0 | 4,211 |
/**
* (C) Copyright IBM Corp. 2015 - 2017
*
* 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... | SparkTC/spark-bench | cli/src/main/scala/com/ibm/sparktc/sparkbench/workload/ml/LogisticRegressionWorkload.scala | Scala | apache-2.0 | 4,600 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | maropu/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/udaf.scala | Scala | apache-2.0 | 19,423 |
package odfi.server.api
import scala.sys.process._
import odfi.server.manager.win.WinKey
object TestRegistry extends App {
// HKEY_CLASSES_ROOT
var tclKey = new WinKey("HKEY_CLASSES_ROOT\\\\.tcl")
var tcllKey = new WinKey("HKEY_CLASSES_ROOT\\\\.tcll")
println("Exists: " + tclKey.exists)
println("Exists: "... | richnou/odfi-manager | server/src/test/scala/odfi/server/api/TestRegistry.scala | Scala | lgpl-3.0 | 645 |
package com.sksamuel.elastic4s.searches.aggs
import com.sksamuel.elastic4s.script.ScriptDefinition
import org.elasticsearch.search.aggregations.AggregationBuilders
import org.elasticsearch.search.aggregations.metrics.percentiles.PercentilesAggregationBuilder
case class PercentilesAggregationDefinition(name: String)
... | ulric260/elastic4s | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/searches/aggs/PercentilesAggregationDefinition.scala | Scala | apache-2.0 | 944 |
/*
* Part of NDLA image-api.
* Copyright (C) 2017 NDLA
*
* See LICENSE
*/
package db.migration
import com.typesafe.scalalogging.LazyLogging
import org.flywaydb.core.api.migration.{BaseJavaMigration, Context}
import org.joda.time.DateTime
import org.joda.time.format.{DateTimeFormat, DateTimeFormatter}
import org.... | NDLANO/image-api | src/main/scala/db/migration/V3__AddUpdatedColoums.scala | Scala | gpl-3.0 | 2,286 |
/*******************************************************************************
* Copyright (c) 2019. Carl Minden
*
* 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 ... | carlminden/anathema-roguelike | src/com/anathema_roguelike/environment/generation/rooms/BasicRoom.scala | Scala | gpl-3.0 | 2,333 |
package com.delprks.productservicesprototype.domain.response
import java.util.UUID
import org.joda.time.{DateTime, DateTimeZone}
case class ErrorResponse(`$schema`: String, errors: Seq[ErrorItem])
case class ErrorItem(
id: String,
href: String,
status: Int,
message: String,
replied_at: DateTime)
object Er... | delprks/product-services-prototype | src/main/scala/com/delprks/productservicesprototype/domain/response/ErrorResponse.scala | Scala | mit | 786 |
package com.radcheb.tweetkafkatostorm.utils;
import java.io.File
import java.util.Properties
import kafka.admin.AdminUtils
import kafka.server.{KafkaConfig, KafkaServerStartable}
import kafka.utils.ZKStringSerializer
import org.I0Itec.zkclient.ZkClient
import org.apache.commons.io.FileUtils
import scala.concurrent.d... | radcheb/Tweet-kafta-to-Storm | tweet-kafka-to-storm/src/main/scala/com/radcheb/tweetkafkatostorm/utils/KafkaEmbedded.scala | Scala | mit | 3,815 |
package com.arcusys.valamis.certificate.service
import com.arcusys.learn.liferay.services.{PermissionHelper, SocialActivityLocalServiceHelper}
import com.arcusys.valamis.certificate.model.{Certificate, CertificateStatus}
import com.arcusys.valamis.certificate.model.CertificateStatus._
import com.arcusys.valamis.certif... | ViLPy/Valamis | valamis-certificate/src/main/scala/com/arcusys/valamis/certificate/service/CertificateStatusCheckerImpl.scala | Scala | lgpl-3.0 | 4,974 |
package org.littlewings.tweetbot.application.lilymyu.lyrics.producer
import javax.enterprise.context.{ApplicationScoped, Dependent}
import javax.enterprise.inject.{Disposes, Produces}
import org.infinispan.Cache
import org.infinispan.configuration.cache.ConfigurationBuilder
import org.infinispan.manager.EmbeddedCache... | kazuhira-r/tweet-bot | src/main/scala/org/littlewings/tweetbot/application/lilymyu/lyrics/producer/CacheProducer.scala | Scala | mit | 1,228 |
package com.umayrh.intervalGraph
import java.io.{DataInputStream, DataOutputStream, InputStream, OutputStream}
import java.nio.ByteBuffer
import com.esotericsoftware.kryo.io.{UnsafeMemoryInput, UnsafeMemoryOutput}
import com.google.common.base.Preconditions
import org.roaringbitmap.RoaringBitmap
import sun.nio.ch.Dir... | umayrh/sketchy-polytopes | sparkScala/intervalGraph/src/main/scala/com/umayrh/intervalGraph/RoaringBitmapSerde.scala | Scala | gpl-3.0 | 5,479 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | jkbradley/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/OptimizeLocalShuffleReader.scala | Scala | apache-2.0 | 8,331 |
package com.caibowen.prma.monitor.eval
import com.caibowen.prma.api.model.EventVO
import com.caibowen.prma.core.filter.StrFilter
/**
* @author BowenCai
* @since 30/11/2014.
*/
class LoggerNameEval(filter: StrFilter) extends Evaluator {
override def eval(vo: EventVO): Response =
if (filter.accept(vo.loggerN... | xkommando/PRMA | monitor/src/main/scala/com/caibowen/prma/monitor/eval/LoggerNameEval.scala | Scala | lgpl-3.0 | 379 |
package com.twitter.finatra.http.benchmarks
import com.twitter.finagle.Filter
import com.twitter.finagle.http.{Method, Request, Response}
import com.twitter.finatra.http.internal.routing.{Route, RoutingService}
import com.twitter.inject.requestscope.{FinagleRequestScope, FinagleRequestScopeFilter}
import com.twitter.u... | syamantm/finatra | benchmarks/src/main/scala/com/twitter/finatra/http/benchmarks/FinagleRequestScopeBenchmark.scala | Scala | apache-2.0 | 1,271 |
/*
* (c) Copyright 2014 LinkedIn Corp. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ... | linkedin/RookBoom | services/src/main/scala/com/linkedin/rookboom/util/TimeUtils.scala | Scala | apache-2.0 | 1,649 |
package com.programmaticallyspeaking.ncd.chrome.domains
import com.programmaticallyspeaking.ncd.chrome.domains.PreviewGenerator.{Options, PropertyFetcher}
import com.programmaticallyspeaking.ncd.chrome.domains.Runtime.{EntryPreview, ObjectPreview, PropertyPreview, RemoteObject}
import com.programmaticallyspeaking.ncd.... | provegard/ncdbg | src/main/scala/com/programmaticallyspeaking/ncd/chrome/domains/PreviewGenerator.scala | Scala | bsd-3-clause | 7,843 |
/*
* Scala.js (https://www.scala-js.org/)
*
* Copyright EPFL.
*
* Licensed under Apache License 2.0
* (https://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
package org.scalajs.nscplugin.test
import org... | scala-js/scala-js | compiler/src/test/scala/org/scalajs/nscplugin/test/JSDynamicLiteralTest.scala | Scala | apache-2.0 | 8,069 |
// See the LICENCE.txt file distributed with this work for additional
// information regarding copyright ownership.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache... | scray/scray | scray-querying/modules/scray-querying/src/main/scala/scray/querying/source/OrderingEagerMappingSource.scala | Scala | apache-2.0 | 2,053 |
class Cafe {
def buyCoffe(cc: CreditCard) : (Coffee, Charge) = {
val cup = new Coffe()
(cup, Charge(cc, cup.price))
}
} | carlospatinos/experiments | scala/Cafe.scala | Scala | apache-2.0 | 125 |
package optimizers.local
import java.security.SecureRandom
import breeze.linalg.DenseVector
import models.{Loss, Model}
import optimizers.{LocalOptimizer, SingleCoordinateOptimizer}
import vectors.LabelledPoint
/**
* A Single Dual Coordinate Ascent based local solver
* @param scOptimizer The method used to optimize... | sforte/cacao | src/main/scala/optimizers/local/PasscodeWild.scala | Scala | apache-2.0 | 1,828 |
package xyz.hyperreal.dal
object Testing {
val tokens = "-?[0-9.]+|[-+*/%^^=<>]+|[a-z]+".r
def eval(exp: String) = {
val toks = tokens findAllMatchIn exp map (_.matched) toArray
def num(s: String) =
if (s contains '.')
DALNumber(s.toDouble)
else
DALNumber(BigInt(s) match {
... | edadma/funl | dal/src/test/scala/xyz/hyperreal/dal/Testing.scala | Scala | mit | 663 |
package com.clackjones.connectivitymap.service
import com.clackjones.connectivitymap._
import com.clackjones.connectivitymap.spark.SparkContextComponent
import org.apache.spark.SparkContext
import scala.collection.mutable.Set
trait ExperimentResultProviderComponent {
def experimentResultProvider : ExperimentResult... | hiraethus/scala-connectivity-map | src/main/scala/com/clackjones/connectivitymap/service/ExperimentResultProviderComponent.scala | Scala | gpl-3.0 | 1,329 |
/*
* 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 ... | gyfora/flink | flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/stream/sql/PartitionableSinkTest.scala | Scala | apache-2.0 | 2,430 |
package com.caibowen.prma.store.rdb
import java.sql.{Connection, PreparedStatement, SQLException, Types}
import javax.annotation.Nonnull
import javax.sql.DataSource
import akka.actor.Props
import com.caibowen.gplume.jdbc.mapper.RowMapping
import com.caibowen.gplume.jdbc.transaction.{Transaction, TransactionCallback}
i... | xkommando/PRMA | store/src/main/scala/com/caibowen/prma/store/rdb/RdbEventStore.scala | Scala | lgpl-3.0 | 3,059 |
package com.teambytes.inflatable
import java.util.concurrent.{TimeUnit, ScheduledFuture, ScheduledExecutorService}
import org.slf4j.LoggerFactory
trait SchedulingInflatableLeader extends InflatableLeader {
private lazy val log = LoggerFactory.getLogger(getClass)
def leaderExecutor: ScheduledExecutorService
... | grahamar/inflatable | src/main/scala/com/teambytes/inflatable/SchedulingInflatableLeader.scala | Scala | apache-2.0 | 1,384 |
/*
* 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 | src/test/scala/org/scalatest/fixture/FlatSpecSpec.scala | Scala | apache-2.0 | 79,327 |
/*
* Copyright 2019 ACINQ SAS
*
* 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... | ACINQ/eclair | eclair-core/src/test/scala/fr/acinq/eclair/CltvExpirySpec.scala | Scala | apache-2.0 | 1,967 |
package de.bstudios.prioritization
import scala.collection.mutable
// Some helpers
trait Helpers {
implicit def liftOps[T](f: T => Int): OrderingOps[T] = new OrderingOps(f)
implicit def lift[T](f: T => Int): Ordering[T] = new Ordering[T] {
// compares x with y.
// returns 0 if equal
// returns <... | MH42/fprio | src/main/scala/Helpers.scala | Scala | mit | 2,468 |
package com.sksamuel.elastic4s.requests.analyzers
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
class StopTokenFilterTest extends AnyWordSpec with TokenFilterApi with Matchers {
"StopTokenFilter builder" should {
"set stop words" in {
stopTokenFilter("testy").sto... | stringbean/elastic4s | elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/requests/analyzers/StopTokenFilterTest.scala | Scala | apache-2.0 | 720 |
/*
* Copyright 2013 Maurício Linhares
*
* Maurício Linhares licenses this file to you 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 ... | leosilvadev/postgresql-async | postgresql-async/src/main/scala/com/github/mauricio/async/db/postgresql/messages/frontend/CloseMessage.scala | Scala | apache-2.0 | 847 |
package org.adarro.padx.padobjects.evolution
/**
* @author creepyguy
*/
trait Evolution
| adarro/padexperience | padx-core/src/main/scala/org/adarro/padx/padobjects/evolution/evolution.scala | Scala | apache-2.0 | 92 |
/*
* Licensed to Tuplejump Software Pvt. Ltd. under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Tuplejump Software Pvt. Ltd. licenses this file
* to you under the Apache License, Version 2.0 (the
* "Li... | tuplejump/calliope | core/src/test/scala/com/tuplejump/calliope/CassandraRDDFunctionsSpec.scala | Scala | apache-2.0 | 5,638 |
/*
* 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 ... | xflin/spark | project/MimaExcludes.scala | Scala | apache-2.0 | 94,775 |
package gapt.proofs.lk.rules
import gapt.expr.formula.Formula
import gapt.expr.formula.Imp
import gapt.proofs.Ant
import gapt.proofs.HOLSequent
import gapt.proofs.IndexOrFormula
import gapt.proofs.Sequent
import gapt.proofs.SequentIndex
import gapt.proofs.Suc
import gapt.proofs.lk.LKProof
/**
* An LKProof ending wit... | gapt/gapt | core/src/main/scala/gapt/proofs/lk/rules/ImpRightRule.scala | Scala | gpl-3.0 | 2,577 |
package ranking.data
import org.json4s._
import org.json4s.native.Serialization
import ranking.common.RankingData
import scala.xml.Elem
case class Count(count: Long) extends RankingData {
override def toElem: Elem = <span>{f"$count%,d"}</span>
}
object Count {
implicit val formats = Serialization.formats(NoType... | ttdoda/MyFleetGirls | server/app/ranking/data/Count.scala | Scala | mit | 390 |
package org.jetbrains.plugins.scala
package lang
package psi
package stubs
package elements
import _root_.org.jetbrains.plugins.scala.lang.psi.impl.base.ScModifierListImpl
import com.intellij.psi.PsiElement
import com.intellij.psi.stubs.{IndexSink, StubElement, StubInputStream, StubOutputStream}
import com.intellij.ut... | LPTK/intellij-scala | src/org/jetbrains/plugins/scala/lang/psi/stubs/elements/ScModifiersElementType.scala | Scala | apache-2.0 | 1,912 |
package mesosphere.marathon
package raml
import mesosphere.UnitTest
import mesosphere.marathon.api.serialization.VolumeSerializer
import mesosphere.marathon.state.{DiskType, Volume}
import org.scalatest.prop.TableDrivenPropertyChecks
class VolumeConversionTest extends UnitTest with TableDrivenPropertyChecks {
def ... | gsantovena/marathon | src/test/scala/mesosphere/marathon/raml/VolumeConversionTest.scala | Scala | apache-2.0 | 13,035 |
package org.sbtsh
import sbt._
import sbt.CommandSupport._
object SbtShPlugin extends Plugin {
override lazy val settings = Seq(Keys.commands += shCommand)
def shCommand = Command.args("sh", "<shell command>") { (state, args) =>
val ret = args.mkString(" ") !
state
}
}
| steppenwells/sbt-sh | src/main/scala/org/sbtsh/SbtShPlugin.scala | Scala | bsd-3-clause | 295 |
/*
* Copyright 2011-2014 Chris de Vreeze
*
* 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 agree... | EBPI/yaidom | src/test/scala/nl/ebpi/yaidom/integrationtest/UpdateTest.scala | Scala | apache-2.0 | 16,016 |
object Foo {
val f0: Function0[Int]{ def foo(): Int } = () => 42 // error
val f1: Function1[Int, Int]{ def foo(): Int } = x1 => 42 // error
val f26: Function26[Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int]{ def foo(): Int }... | som-snytt/dotty | tests/neg/i2539.scala | Scala | apache-2.0 | 694 |
package com.wbillingsley.handy.mongodbasync
import com.mongodb.WriteConcern
import com.mongodb.client.model.Filters
import com.wbillingsley.handy._
import Ref._
import com.wbillingsley.handy.mongodbasync.BsonHelpers._
import org.bson.BsonDocument
import org.specs2.mutable.Specification
import play.api.libs.iteratee.It... | wbillingsley/handy | handy-mongodb-async/src/test/scala/com/wbillingsley/handy/mongodbasync/DAOSpec.scala | Scala | mit | 3,966 |
package mesosphere.marathon.api
import java.net.URI
import javax.servlet.http.{ HttpServlet, HttpServletRequest, HttpServletResponse }
import mesosphere.marathon.io.IO
import org.slf4j.LoggerFactory
class WebJarServlet extends HttpServlet {
private[this] val log = LoggerFactory.getLogger(getClass)
//scalastyle... | matsluni/marathon | src/main/scala/mesosphere/marathon/api/WebJarServlet.scala | Scala | apache-2.0 | 2,972 |
package com.bayakala.funda.fdapipes
import com.bayakala.funda.FDAPipeJoint
import fs2._
/**
* methods to output row to a Pull object
*/
object FDAJoints { //数据发送方法
/**
* send row to Pull
* @param row row to be sent
* @tparam ROW type of row
* @return new state of Pull
*/
def... | Bayakala/FunDA | src/main/scala/com/bayakala/funda/fdapipes/FDAJoints.scala | Scala | apache-2.0 | 752 |
package org.jetbrains.plugins.scala.lang.psi.impl.expr
import com.intellij.lang.ASTNode
import com.intellij.psi.util.PsiTreeUtil
import com.intellij.psi.{PsiElement, PsiElementVisitor}
import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes
import org.jetbrains.plugins.scala.lang.psi.ScalaPsiElementImpl
import o... | gtache/intellij-lsp | intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/psi/impl/expr/ScWhileStmtImpl.scala | Scala | apache-2.0 | 1,728 |
/***********************************************************************
* Copyright (c) 2013-2016 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 is ... | mdzimmerman/geomesa | geomesa-kafka/geomesa-kafka-datastore/src/test/scala/org/locationtech/geomesa/kafka/TimestampFilterSplitTest.scala | Scala | apache-2.0 | 6,651 |
package org.jetbrains.plugins.scala
package lang
package psi
package impl
package search
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.progress.ProgressManager
import com.intellij.openapi.util.Computable
import com.intellij.psi.PsiClass
import com.intellij.psi.search.GlobalSea... | SergeevPavel/intellij-scala | src/org/jetbrains/plugins/scala/lang/psi/impl/search/ScalaDirectClassInheritorsSearcher.scala | Scala | apache-2.0 | 1,799 |
// AORTA is copyright (C) 2012 Dustin Carlino, Mike Depinet, and Piyush
// Khandelwal of UT Austin
// License: GNU GPL v2
package utexas.aorta.experiments
import utexas.aorta.analysis.REPL
object Results extends PlotUtil with MetricReader with UsefulAnalytics {
def main(args: Array[String]) {
if (args(0) == "r... | dabreegster/aorta | utexas/aorta/experiments/Results.scala | Scala | gpl-2.0 | 3,380 |
package com.arcusys.learn.liferay.update.version270
import com.arcusys.learn.liferay.LiferayClasses.LUpgradeProcess
import com.arcusys.learn.liferay.update.version270.certificate.CertificateGoalStateTableComponent
import com.arcusys.valamis.persistence.common.{SlickDBInfo, SlickProfile}
import com.arcusys.valamis.web.... | igor-borisov/valamis | learn-portlet/src/main/scala/com/arcusys/learn/liferay/update/version270/DBUpdater2721.scala | Scala | gpl-3.0 | 939 |
/*
* The MIT License (MIT)
* <p>
* Copyright (c) 2020
* <p>
* 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 use, copy... | amannocci/streamy | plugin-kafka/src/main/scala/io/techcode/streamy/kafka/event/KafkaEvent.scala | Scala | mit | 2,345 |
package services.crunch
import controllers.ArrivalGenerator
import drt.shared.EventTypes.CI
import drt.shared.FlightsApi.Flights
import drt.shared.PaxTypes.EeaMachineReadable
import drt.shared.PaxTypesAndQueues._
import drt.shared.Queues._
import drt.shared.SplitRatiosNs.SplitSources.ApiSplitsWithHistoricalEGateAndFTP... | UKHomeOffice/drt-scalajs-spa-exploration | server/src/test/scala/services/crunch/VoyageManifestsSpec.scala | Scala | apache-2.0 | 21,997 |
/*
* 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 ... | tophua/spark1.52 | mllib/src/main/scala/org/apache/spark/ml/regression/DecisionTreeRegressor.scala | Scala | apache-2.0 | 5,957 |
package org.sisioh.aws4s.core
import java.io.InputStream
import java.net.URI
import com.amazonaws.DefaultRequest
import com.amazonaws.http.HttpMethodName
import com.amazonaws.util.AWSRequestMetrics
import org.sisioh.aws4s.PimpedType
import scala.collection.JavaConverters._
class RichDefaultRequest[A](val underlying... | everpeace/aws4s | aws4s-core/src/main/scala/org/sisioh/aws4s/core/RichDefaultRequest.scala | Scala | mit | 1,514 |
package io.taig.android.util.syntax
import io.taig.android.util.operation
import scala.language.implicitConversions
trait `class` {
implicit def utilClassSyntax(`class`: Class[_]): operation.`class` = {
new operation.`class`(`class`)
}
}
object `class` extends `class`
| Taig/Toolbelt | util/src/main/scala/io/taig/android/util/syntax/`class`.scala | Scala | mit | 281 |
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.