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 org.jetbrains.plugins.scala
package lang
package psi
package stubs
package elements
import com.intellij.psi.PsiElement
import com.intellij.psi.stubs.{IndexSink, StubElement, StubInputStream, StubOutputStream}
import org.jetbrains.plugins.scala.lang.psi.api.toplevel.imports.ScImportSelectors
import org.jetbrai... | LPTK/intellij-scala | src/org/jetbrains/plugins/scala/lang/psi/stubs/elements/ScImportSelectorsElementType.scala | Scala | apache-2.0 | 1,466 |
/*
* 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 | mllib-local/src/main/scala/org/apache/spark/ml/stat/distribution/MultivariateGaussian.scala | Scala | apache-2.0 | 5,534 |
package org.jetbrains.plugins.scala.lang.psi.light.scala
import com.intellij.psi._
import com.intellij.psi.impl.light.LightElement
import org.jetbrains.plugins.scala.lang.psi.ScalaPsiElement
import org.jetbrains.plugins.scala.lang.psi.api.base.ScModifierList
import org.jetbrains.plugins.scala.lang.psi.api.base.types.S... | gtache/intellij-lsp | intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/psi/light/scala/ScLightFunctionDeclaration.scala | Scala | apache-2.0 | 3,235 |
import com.typesafe.sbt.packager.archetypes.JavaAppPackaging
import com.typesafe.sbt.packager.universal.UniversalPlugin
import sbt._
import sbt.Keys._
import sbt.Path._
/**
* Externalizes the resources like with Play, but as a standalone plugin.
*/
object ExternalizedResourcesMappings extends AutoPlugin {
overri... | SpongePowered/Ore | project/ExternalizedResourcesMappings.scala | Scala | mit | 3,576 |
package com.guidewire.tools.chronos.client
/**
*
*/
import org.scalatest.junit.JUnitRunner
import org.scalatest.{ParallelTestExecution, BeforeAndAfterAll, SeveredStackTraces, FunSuite}
import org.junit.runner.RunWith
import org.scalatest.matchers.ShouldMatchers
import dispatch._, Defaults._
import play.api.libs.js... | Guidewire/chronos-client | src/test/scala/com/guidewire/tools/chronos/client/BasicFunctionalitySuite.scala | Scala | apache-2.0 | 7,641 |
package monitoring
import app.ConfigProperties._
import gov.dwp.carers.CADSHealthCheck
import gov.dwp.carers.CADSHealthCheck.Result
import play.api.http.Status
import utils.HttpWrapper
import scala.language.{implicitConversions, postfixOps}
/**
* Ping ClaimService to check connection
*/
class ClaimServiceConnection... | Department-for-Work-and-Pensions/CarersAllowanceStaffAccess | casa/app/monitoring/ClaimServiceConnectionCheck.scala | Scala | mit | 943 |
package concurrency
import akka.actor.ActorSystem
import configuration.SiteSettings
import scaldi.Module
import scaldi.akka.AkkaInjectable
import spray.can.server.ServerSettings
package object actor {
val BlockingDispatcher = "akka.blocking-dispatcher"
class ActorsModule extends Module {
bind [ActorSystem] ... | onurzdg/spray-app | src/main/scala/concurrency/actor/package.scala | Scala | apache-2.0 | 641 |
package breeze.linalg
import breeze.generic.UFunc
import scala.reflect.ClassTag
import spire.implicits._
import breeze.storage.Zero
/**
* split the array
*
* @author stucchio
*/
object split extends UFunc {
implicit def implIntVec[T: ClassTag]: Impl2[DenseVector[T], Int, Seq[DenseVector[T]]] = new Impl2[DenseV... | sheide/breeze | math/src/main/scala/breeze/linalg/functions/split.scala | Scala | apache-2.0 | 4,639 |
package org.jetbrains.plugins.scala.lang.completion.lookups
import com.intellij.psi.impl.light.LightElement
import com.intellij.psi.tree.IElementType
import com.intellij.psi.{PsiElement, PsiManager}
import com.intellij.util.containers.ConcurrentWeakHashMap
import org.jetbrains.plugins.scala.ScalaFileType
import org.je... | triggerNZ/intellij-scala | src/org/jetbrains/plugins/scala/lang/completion/lookups/ScalaLightKeyword.scala | Scala | apache-2.0 | 1,557 |
package com.datamountaineer.streamreactor.connect.ftp.source
import com.typesafe.scalalogging.StrictLogging
import org.scalatest.BeforeAndAfter
import org.scalatest.funsuite.AnyFunSuite
import org.scalatest.matchers.should.Matchers
import scala.collection.JavaConverters._
class ManyFilesTest extends AnyFunSuite wi... | datamountaineer/stream-reactor | kafka-connect-ftp/src/test/scala/com/datamountaineer/streamreactor/connect/ftp/source/ManyFilesTest.scala | Scala | apache-2.0 | 1,823 |
package org.tensorframes.dsl
import java.io.{BufferedReader, InputStreamReader, File}
import java.nio.file.Files
import java.nio.charset.StandardCharsets
import org.tensorframes.Logging
import org.scalatest.Matchers
import scala.collection.JavaConverters._
object ExtractNodes extends Matchers with Logging {
def e... | databricks/tensorframes | src/test/scala/org/tensorframes/dsl/ExtractNodes.scala | Scala | apache-2.0 | 2,402 |
package com.danielwestheide.kontextfrei.rdd
import com.danielwestheide.kontextfrei.DCollectionPairFunctions
import org.apache.spark.Partitioner
import org.apache.spark.rdd.RDD
import scala.collection.Map
import scala.reflect.ClassTag
private[kontextfrei] trait RDDPairFunctions
extends DCollectionPairFunctions[RD... | dwestheide/kontextfrei | core/src/main/scala/com/danielwestheide/kontextfrei/rdd/RDDPairFunctions.scala | Scala | apache-2.0 | 2,985 |
package dotty.tools.dotc.core
def round(f: Float, digits: Int = 0): Float = ???
//@scala.annotation.targetName("roundDouble") // does not change anything
def round(d: Double, digits: Int = 0): Double = ??? // error
| dotty-staging/dotty | tests/neg/i12245.scala | Scala | apache-2.0 | 217 |
package com.twitter.finagle.netty4.channel
import io.netty.buffer.ByteBuf
import io.netty.buffer.Unpooled.wrappedBuffer
import io.netty.channel._
import java.net.InetSocketAddress
import org.junit.runner.RunWith
import org.mockito.Mockito.when
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
import... | koshelev/finagle | finagle-netty4/src/test/scala/com/twitter/finagle/netty4/channel/ChannelSnooperTest.scala | Scala | apache-2.0 | 5,654 |
package controllers
import com.google.inject.Inject
import uk.gov.dvla.vehicles.presentation.common.controllers
import uk.gov.dvla.vehicles.presentation.common.controllers.Version.Suffix
import uk.gov.dvla.vehicles.presentation.common.webserviceclients.acquire.AcquireConfig
import uk.gov.dvla.vehicles.presentation.com... | dvla/vehicles-acquire-online | app/controllers/Version.scala | Scala | mit | 1,144 |
/*
* 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 ... | jatin9896/incubator-carbondata | integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/management/CarbonInsertIntoCommand.scala | Scala | apache-2.0 | 3,582 |
/*
* 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... | yuyupapa/OpenSource | scouter.server/src/scouter/server/db/XLogWR.scala | Scala | apache-2.0 | 3,824 |
import scala.language.implicitConversions
import spray.json._
class RichJsValue(js: JsValue) {
def \ (name: String): JsValue = js match {
case JsObject(fields) =>
fields(name)
case _ =>
throw new IllegalArgumentException("Cannot select field "+ name +" from non-JsObject "+ js)
}
def hasFiel... | jan-j/functional-programming-principles-in-scala | week-7/project/RichJsValue.scala | Scala | mit | 733 |
/*
* tuProlog - Copyright (C) 2001-2002 aliCE team at deis.unibo.it
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any l... | zakski/project-soisceal | gospel-core/src/main/scala/com/szadowsz/gospel/core/data/Long.scala | Scala | lgpl-3.0 | 2,862 |
package tests
package implicitConversions2
class Methods //unexpected
{
def shouldBeImplicitlyAdded1: String
= ???
val shouldBeImplicitlyAdded2: String
= ???
class ShouldBeImplicitlyAdded3
type ShouldBeImplicitlyAdded4
}
class OuterClass //unexpected
{
implicit def conversionMethodWithOneParam(pa... | dotty-staging/dotty | scaladoc-testcases/src/tests/implicitConversions2.scala | Scala | apache-2.0 | 965 |
package pl.touk.nussknacker.engine.requestresponse.http
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.server.Directives
import akka.stream.Materializer
import com.typesafe.config.{Config, ConfigFactory}
import com.typesafe.scalalogging.LazyLogging
import de.heikoseeberger.akkah... | TouK/nussknacker | engine/lite/request-response/app/src/main/scala/pl/touk/nussknacker/engine/requestresponse/http/RequestResponseHttpApp.scala | Scala | apache-2.0 | 2,259 |
package uk.gov.dvla.iep.testing.rabbitmq
import java.text.SimpleDateFormat
import java.util.concurrent.LinkedBlockingQueue
import com.rabbitmq.client.AMQP.BasicProperties
import com.rabbitmq.client._
import org.codehaus.jackson.map.ObjectMapper
import scala.collection.JavaConversions._
import scala.collection.mutabl... | dvla/sdl-opensource | test-helpers/src/main/scala/uk/gov/dvla/iep/testing/rabbitmq/QueueUtil.scala | Scala | mit | 4,509 |
package com.github.mdr.mash.inference
import com.github.mdr.mash.ns.core.BooleanClass
import com.github.mdr.mash.parser.AbstractSyntax._
import com.github.mdr.mash.runtime.MashBoolean
sealed trait TypedArgument {
def argValueOpt: Option[ValueInfo]
}
object TypedArgument {
case class PositionArg(arg: ValueInfo... | mdr/mash | src/main/scala/com/github/mdr/mash/inference/TypedArguments.scala | Scala | mit | 1,991 |
package net.tomasherman.specus.server.api.net.session
import net.tomasherman.specus.common.api.net.Packet
/**
* This file is part of Specus.
*
* Specus 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, ei... | tomasherman/specus | server_api/src/main/scala/net/session/Session.scala | Scala | gpl-3.0 | 1,045 |
package info.armado.ausleihe.client.transport.dataobjects.entities
import javax.xml.bind.annotation.{XmlAccessType, XmlAccessorType, XmlRootElement}
object IdentityCardDTO {
def apply(barcode: String, owner: String): IdentityCardDTO = new IdentityCardDTO(barcode, owner)
def apply(barcode: String): IdentityCardDT... | Spielekreis-Darmstadt/lending | lending-client-interfaces/src/main/scala/info/armado/ausleihe/client/transport/dataobjects/entities/IdentityCardDTO.scala | Scala | apache-2.0 | 1,253 |
package howitworks.wip
import cats.data.OptionT
import rng.{Cmwc5, RNG}
class PigeonsVsEagels extends wp.Spec {
"pigeons vs eagels" in {
import cats.data.State
import cats.instances.list._
import cats.instances.option._
import cats.syntax.traverse._
type StateRNG[A] = State[RNG, A]
val... | jawp/wicked-playground | modules/server/src/test/scala/howitworks/wip/PigeonsVsEagels.scala | Scala | mit | 10,232 |
/*
* 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 ... | ytchen0323/cloud-scale-bwamem | src/main/scala/cs/ucla/edu/bwaspark/worker1/MemChain.scala | Scala | apache-2.0 | 16,117 |
package org.jetbrains.plugins.scala
package console
import com.intellij.execution.Executor
import com.intellij.execution.configurations._
import com.intellij.execution.filters.TextConsoleBuilderImpl
import com.intellij.execution.runners.ExecutionEnvironment
import com.intellij.execution.ui.ConsoleView
import com.intel... | triggerNZ/intellij-scala | src/org/jetbrains/plugins/scala/console/ScalaConsoleRunConfiguration.scala | Scala | apache-2.0 | 2,193 |
/*
* Copyright © 2014 Teo Klestrup, Carl Dybdahl
*
* This file is part of Republix.
*
* Republix is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your op... | teozkr/republix-online | republix/src/main/scala/republix/game/package.scala | Scala | agpl-3.0 | 4,200 |
package at.forsyte.apalache.tla.lir.io
import at.forsyte.apalache.tla.lir._
import at.forsyte.apalache.tla.lir.oper.{TlaControlOper, TlaFunOper, TlaOper}
import at.forsyte.apalache.tla.lir.values._
import scala.collection.immutable.HashMap
import scala.collection.mutable.LinkedHashMap
/**
* <p>A reader of TlaEx and... | konnov/apalache | tlair/src/main/scala/at/forsyte/apalache/tla/lir/io/JsonReader.scala | Scala | apache-2.0 | 12,545 |
/* __ *\\
** ________ ___ / / ___ __ ____ 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/io/CommonStreamsTests.scala | Scala | bsd-3-clause | 4,557 |
package im.actor.server.user
import akka.actor.ActorSystem
import akka.util.Timeout
import im.actor.server.{ KeyValueMappings, models, persist }
import shardakka.ShardakkaExtension
import slick.dbio.DBIO
import scala.concurrent.{ ExecutionContext, Future }
object ContactsUtils {
def localNameKey(ownerUserId: Int,... | lzpfmh/actor-platform | actor-server/actor-core/src/main/scala/im/actor/server/user/ContactsUtils.scala | Scala | mit | 2,919 |
/*
* Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com>
*/
package play.api.data.format
import java.sql.Timestamp
import java.time._
import java.time.format.DateTimeFormatter
import java.util.UUID
import play.api.data._
import annotation.implicitNotFound
/**
* Handles field binding and unbinding... | Shenker93/playframework | framework/src/play/src/main/scala/play/api/data/format/Format.scala | Scala | apache-2.0 | 13,025 |
/**
* Copyright 2011-2012 @WalmartLabs, a division of Wal-Mart Stores, 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
*
* Unl... | walmartlabs/mupd8 | src/main/scala/com/walmartlabs/mupd8/Decoder.scala | Scala | apache-2.0 | 3,298 |
/*
* Copyright 2014 http4s.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://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | http4s/http4s | blaze-core/src/main/scala/org/http4s/blazecore/websocket/Http4sWSStage.scala | Scala | apache-2.0 | 7,077 |
package unluac.decompile.statement
import java.util
import unluac.decompile.{Declaration, Output}
class Declare(val decls: util.List[Declaration]) extends Statement {
def print(out: Output) {
out.print("local ")
out.print(decls.get(0).name)
var i: Int = 1
while (i < decls.size) {
ou... | danielwegener/unluac-scala | shared/src/main/scala/unluac/decompile/statement/Declare.scala | Scala | mit | 404 |
/*
* 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/main/scala/org/apache/spark/sql/execution/streaming/continuous/shuffle/RPCContinuousShuffleReader.scala | Scala | apache-2.0 | 6,102 |
package cs.ucla.edu.bwaspark.worker1
import cs.ucla.edu.bwaspark.datatype._
import scala.collection.mutable.MutableList
import java.util.TreeSet
import java.util.Comparator
import cs.ucla.edu.bwaspark.worker1.MemChain._
import cs.ucla.edu.bwaspark.worker1.MemChainFilter._
import cs.ucla.edu.bwaspark.worker1.MemChainTo... | peterpengwei/bwa-spark-fpga | src/main/scala/cs/ucla/edu/bwaspark/worker1/BWAMemWorker1Batched.scala | Scala | gpl-2.0 | 6,948 |
package io.getquill
import io.getquill.context.cassandra.CassandraContext
import io.getquill.context.cassandra.CqlIdiom
class CassandraMirrorContextWithQueryProbing extends CassandraMirrorContext with QueryProbing
class CassandraMirrorContext[Naming <: NamingStrategy]
extends MirrorContext[CqlIdiom, Naming] with C... | jcranky/quill | quill-cassandra/src/main/scala/io/getquill/CassandraMirrorContext.scala | Scala | apache-2.0 | 343 |
package com.twitter.bijection.twitter_util
import scala.concurrent.ExecutionContext
import com.twitter.util.{FuturePool, Future, Try, Return, Throw, Promise}
/**
* FuturePool adapter for ExecutionContext
*
* @author
* Moses Nakamura
*/
class ScalaFuturePool(context: ExecutionContext) extends FuturePool {
... | twitter/bijection | bijection-util/src/main/scala/com/twitter/bijection/twitter_util/ScalaFuturePool.scala | Scala | apache-2.0 | 701 |
package uk.co.morleydev.zander.client.test.unit.data.map
import java.io.File
import uk.co.morleydev.zander.client.data.map.GetCachedSourceLocation
import uk.co.morleydev.zander.client.test.gen.GenModel
import uk.co.morleydev.zander.client.test.unit.UnitTest
class GetCacheSourceLocationTests extends UnitTest {
desc... | MorleyDev/zander.client | src/test/scala/uk/co/morleydev/zander/client/test/unit/data/map/GetCacheSourceLocationTests.scala | Scala | mit | 798 |
/*
* 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 ... | spark-test/spark | core/src/main/scala/org/apache/spark/internal/config/UI.scala | Scala | apache-2.0 | 7,178 |
package org.opensplice.mobile.dev.leader.event
import org.opensplice.mobile.dev.common.DAbstractionEvent
abstract class LeaderElectionEvent(val groupId: String, val epoch: Int) extends DAbstractionEvent {
} | levitha/levitha | src/main/scala/org/opensplice/mobile/dev/leader/event/LeaderElectionEvent.scala | Scala | apache-2.0 | 209 |
package com.arcusys.valamis.slide.service.export
import java.io.{ByteArrayInputStream, File, FileInputStream, InputStream}
import javax.servlet.ServletContext
import com.arcusys.learn.liferay.util.SearchEngineUtilHelper.{SearchContentFileCharset, SearchContentFileName}
import com.arcusys.valamis.content.model.Questio... | igor-borisov/JSCORM | valamis-slide/src/main/scala/com/arcusys/valamis/slide/service/export/SlideSetPublisher.scala | Scala | gpl-3.0 | 18,029 |
package com.seanshubin.utility.filesystem
import org.scalatest.FunSuite
import scala.collection.mutable.ArrayBuffer
class BranchesTest extends FunSuite {
import FileSystemIntegrationFake._
test("create with one named branch") {
val actual = Tree.createBranches("foo")
val expected = Branches(List(Tree("... | SeanShubin/utility | file-system/src/test/scala/com/seanshubin/utility/filesystem/BranchesTest.scala | Scala | unlicense | 4,540 |
/**
* Copyright (c) 2002-2012 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j 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 Foundati... | dksaputra/community | cypher/src/main/scala/org/neo4j/cypher/internal/mutation/CreateUniqueAction.scala | Scala | gpl-3.0 | 8,111 |
package com.github.luzhuomi.regex.deriv.diagnosis
import scala.sys._
import scala.collection.Map._
import com.github.luzhuomi.regex.deriv.RE._
import com.github.luzhuomi.regex.deriv.Common._
import com.github.luzhuomi.regex.deriv.Parse._
object Ambiguity
{
sealed trait U
case object NilU extends U
case object Em... | luzhuomi/scala-deriv | src/main/scala/com/github/luzhuomi/regex/deriv/diagnosis/Ambiguity.scala | Scala | apache-2.0 | 17,915 |
package name.brian_gordon.securitydemo
import java.util.concurrent.atomic.AtomicInteger
import scala.concurrent.Promise
import org.joda.time.DateTime
import org.joda.time.Period
import org.joda.time.format.PeriodFormat
import org.joda.time.format.PeriodFormatterBuilder
import dispatch.Http
import grizzled.slf4j.Logg... | briangordon/securitydemo | src/main/scala/name/brian_gordon/securitydemo/ExploitTaskRunner.scala | Scala | mit | 1,269 |
package basic
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
import io.gatling.http.Headers.Names._
import scala.concurrent.duration._
import bootstrap._
import assertions._
class BasicExampleSimulation extends Simulation {
val httpConf = httpConfig
.baseURL("ht... | ksmpartners/ernie | ernie-gatling/gatling/simulations/basic/BasicExampleSimulation.scala | Scala | apache-2.0 | 3,162 |
/*
* 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 ... | witgo/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/CatalogV2Util.scala | Scala | apache-2.0 | 15,063 |
package app
import net.liftweb.common.Logger
object Control {
def logAndSuppressExceptions(logger: Logger)(f: ⇒ Unit) { try { f } catch { case e: Throwable ⇒ logger.error(e) } }
def fatalOnFailure(f: ⇒ Unit)(implicit logger: Logger) {
try {
f
} catch {
case e: Throwable ⇒
logger.error... | alltonp/reprobate | src/main/scala/app/Control.scala | Scala | apache-2.0 | 466 |
package play.boilerplate.api.server.dsl
import play.api.http.Writeable
import play.api.mvc.AnyContent
object Compat extends AbstractCompat {
implicit class AnyContentOps(val body: AnyContent) extends AnyVal {
def dataPart(key: String): Option[String] = {
body.asMultipartFormData.flatMap(_.dataParts.get(... | Romastyi/sbt-play-boilerplate | api-server/play25/src/main/scala/play/boilerplate/api/server/dsl/Compat.scala | Scala | apache-2.0 | 763 |
package com.airbnb.aerosolve.training
import java.util
import com.airbnb.aerosolve.core.models.BoostedStumpsModel
import com.airbnb.aerosolve.core.models.DecisionTreeModel
import com.airbnb.aerosolve.core.Example
import com.airbnb.aerosolve.core.ModelRecord
import com.airbnb.aerosolve.core.util.Util
import com.typesa... | ralic/aerosolve | training/src/main/scala/com/airbnb/aerosolve/training/DecisionTreeTrainer.scala | Scala | apache-2.0 | 16,237 |
/*
* 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 ... | shaoxuan-wang/flink | flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/TreeNode.scala | Scala | apache-2.0 | 3,917 |
/*
* Copyright (c) 2017 Xavier Defago (Tokyo Institute of Technology)
*
* 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 re... | xdefago/ocelot | src/main/scala/ocelot/OcelotProcessImpl.scala | Scala | apache-2.0 | 2,420 |
/*
* Copyright 2020 Precog Data
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | djspiewak/quasar | impl/src/test/scala/quasar/impl/datasources/PrefixByteStoresSpec.scala | Scala | apache-2.0 | 1,590 |
package core.material
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.all._
import scala.scalajs.js
/**
* Created by Janos on 12/9/2015.
*/
object MaterialComponent {
val rc = ReactComponentB[(ReactTag, Boolean)]("MaterialComponent")
.renderP(($, p) => {
p._1
})
.component... | b0c1/scalajs-play-core-react | client/src/main/scala/core/material/MaterialComponent.scala | Scala | apache-2.0 | 1,210 |
/* __ *\\
** ________ ___ / / ___ Scala API **
** / __/ __// _ | / / / _ | (c) 2005-2010, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
** /____/\\___/_/... | cran/rkafkajars | java/scala/actors/scheduler/ActorGC.scala | Scala | apache-2.0 | 3,406 |
package pl.touk.nussknacker.openapi.http.backend
import org.asynchttpclient.{AsyncHttpClient, DefaultAsyncHttpClient}
import pl.touk.nussknacker.engine.api.MetaData
import pl.touk.nussknacker.engine.api.runtimecontext.EngineRuntimeContext
import pl.touk.nussknacker.engine.util.sharedservice.{SharedService, SharedServi... | TouK/nussknacker | components/openapi/src/main/scala/pl/touk/nussknacker/openapi/http/backend/SharedHttpClient.scala | Scala | apache-2.0 | 1,806 |
package ru.izebit.dao
import java.util
import java.util.function.Consumer
import scala.collection.JavaConversions.{asScalaBuffer, asScalaSet}
import org.bson.Document
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.data.mongodb.core.MongoTemplate
import org.springframework.dat... | android-group/night-meet | src/main/scala/ru/izebit/dao/AccountDao.scala | Scala | apache-2.0 | 2,439 |
package cc.factorie.util.namejuggler
import java.util.regex.Pattern
/**
* Shamelessly yoinked from edu.umass.cs.iesl.scalacommons
*/
object StringUtils {
implicit def toOptionNonempty(s: String): Option[NonemptyString] = if (s.trim.isEmpty) None else Some(new NonemptyString(s.trim))
// don't make this implicit... | hlin117/factorie | src/main/scala/cc/factorie/util/namejuggler/StringUtils.scala | Scala | apache-2.0 | 5,211 |
/* __ *\\
** ________ ___ / / ___ __ ____ Scala.js Test Suite **
** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL **
** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-js.org/ **
** /____/\\___/... | jasonchaffee/scala-js | test-suite/js/src/test/scala/org/scalajs/testsuite/javalib/util/CollectionTest.scala | Scala | bsd-3-clause | 6,234 |
/* Copyright 2017-19, Emmanouil Antonios Platanios. 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 ... | eaplatanios/tensorflow_scala | modules/examples/src/main/scala/org/platanios/tensorflow/examples/package.scala | Scala | apache-2.0 | 2,486 |
extension (x: Int): // error
def foo = x
| dotty-staging/dotty | tests/neg/extension-colon.scala | Scala | apache-2.0 | 43 |
package net.shift
package engine
import org.scalatest._
import net.shift.engine.http.MultipartParser
import net.shift.engine.http.BinReader
import net.shift.engine.http.TextPart
import net.shift.engine.http.BinaryPart
import net.shift.io.LocalFileSystem
import net.shift.common.Path
import net.shift.io.IO
import net.sh... | mariusdanciu/shift | shift-engine/src/test/scala/net/shift/engine/HttpTest.scala | Scala | apache-2.0 | 3,684 |
package net.zzorn.appearance
import org.scalaprops.Bean
import simplex3d.math.float.functions._
import simplex3d.math.float._
import net.zzorn.utils.MathUtils
import util.Random
import net.zzorn.Settings
/**
*
*/
class SurfaceSettings extends Settings {
val convexity = p('convexity, 6f).editor(makeSlider(0, 20)... | zzorn/ludumdare20 | src/main/scala/net/zzorn/appearance/SurfaceSettings.scala | Scala | gpl-2.0 | 1,692 |
/**
* Copyright 2015 Thomson Reuters
*
* Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | nruppin/CM-Well | server/cmwell-grid/src/main/scala/k/grid/service/ServiceCoordinator.scala | Scala | apache-2.0 | 6,778 |
/**
* Copyright 2011-2016 GatlingCorp (http://gatling.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | thkluge/gatling | gatling-core/src/test/scala/io/gatling/core/stats/message/StatusSpec.scala | Scala | apache-2.0 | 1,209 |
/*
* Copyright (C) 2014 - 2017 Contributors as noted in the AUTHORS.md file
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option)... | Tensei-Data/tensei-agent | src/test/scala/com/wegtam/tensei/agent/SortTransformationMappingsFunctionsTest.scala | Scala | agpl-3.0 | 57,974 |
/*
* Copyright (C) 2015 Vladimir Konstantinov, Yuriy Gintsyak
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later ver... | oxy-development/util | src/main/scala/io/cafebabe/util/protocol/jsonrpc/JsonRpcResult.scala | Scala | lgpl-3.0 | 1,386 |
package org.openapitools.client.api
import argonaut._
import argonaut.EncodeJson._
import argonaut.DecodeJson._
import org.http4s.{EntityDecoder, EntityEncoder}
import org.http4s.argonaut._
import org.joda.time.DateTime
import GithubRepositorieslinks._
case class GithubRepositorieslinks (
self: Option[Link],
`cl... | cliffano/swaggy-jenkins | clients/scalaz/generated/src/main/scala/org/openapitools/client/api/GithubRepositorieslinks.scala | Scala | mit | 780 |
/*
* Copyright 2013 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... | twitter/storehaus | storehaus-algebra/src/test/scala/com/twitter/storehaus/algebra/BufferingStoreProperties.scala | Scala | apache-2.0 | 1,925 |
package skeleton.persistence
import scala.slick.driver.PostgresDriver.simple._
import scala.slick.model.ForeignKeyAction.Cascade
case class Book(id: Option[Long], title: String, storeId: Long)
class Books(tag: Tag) extends Table[Book](tag, "books") {
def id = column[Long]("id", O.AutoInc)
def title = column[St... | constantingerstberger/spray-slick-blueprint | src/main/scala/skeleton/persistence/Books.scala | Scala | mit | 903 |
package server
import org.scalatestplus.play.{OneServerPerTest, PlaySpec}
import play.api.test.{DefaultAwaitTimeout, FutureAwaits}
import play.mvc.Http.Status.NOT_FOUND
class PacksControllerTests extends PlaySpec with OneServerPerTest with FutureAwaits with DefaultAwaitTimeout {
"The view pack page" should {
"r... | notclive/backpack | test/server/PacksControllerTests.scala | Scala | mit | 692 |
package codecheck.github.events
import org.json4s.JValue
import codecheck.github.models.AbstractJson
import codecheck.github.models.PullRequest
import codecheck.github.models.PullRequestAction
case class PullRequestEvent(name: String, value: JValue) extends AbstractJson(value) with GitHubEvent {
def number = get("n... | code-check/github-api-scala | src/main/scala/codecheck/github/events/PullRequestEvent.scala | Scala | mit | 464 |
/**
* Copyright 2015 Thomson Reuters
*
* Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | nruppin/CM-Well | server/project/cmwell-build-plugin/src/main/scala/cmwell/build/CMWellBuild.scala | Scala | apache-2.0 | 10,235 |
package scala.quoted
/** Stop code generation after an error has been reported */
class StopQuotedContext extends Throwable
| som-snytt/dotty | library/src/scala/quoted/StopQuotedContext.scala | Scala | apache-2.0 | 125 |
/*
* Copyright 2016 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | ahudspith-equalexperts/ct-calculations | src/main/scala/uk/gov/hmrc/ct/ct600/v2/B1.scala | Scala | apache-2.0 | 809 |
/*
* 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 ... | ueshin/apache-flink | flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/api/batch/sql/CorrelateTest.scala | Scala | apache-2.0 | 10,704 |
package cn.changhong.core.thrift.impl
import cn.changhong.core.thrift.{User, AccountService}
import com.twitter.util.Future
import scala.collection.Map
/**
* Created by Administrator on 2014/12/29.
*/
class AccountServiceImpl extends AccountService.FutureIface{
override def create(user: User): F... | guoyang2011/myfinagle | finagle-thrift-zipkin-cluster/src/main/scala/cn/changhong/core/thrift/impl/AccountServiceImpl.scala | Scala | apache-2.0 | 1,240 |
package sangria.parser
import org.parboiled2.ParserInput
import sangria.ast.AstLocation
/** Set of functions that convert a [[AstLocation GraphQL source code location]] to human-readable
* strings.
*
* When rendering the results of a GraphQL document parse, it's helpful to describe where parsing
* failed. Thi... | OlegIlyenko/sangria | modules/core/src/main/scala/sangria/parser/SourceMapper.scala | Scala | apache-2.0 | 2,854 |
package mesosphere.marathon.integration.setup
import java.io.File
import java.util.concurrent.{ Executors, TimeUnit }
import com.google.common.util.concurrent.{ AbstractIdleService, Service }
import com.google.inject.Guice
import mesosphere.chaos.http.{ HttpConf, HttpModule, HttpService }
import mesosphere.chaos.met... | MrMarvin/marathon | src/test/scala/mesosphere/marathon/integration/setup/ProcessKeeper.scala | Scala | apache-2.0 | 7,858 |
package views.vrm_assign
object FulfilFailure {
final val ExitId = "exit"
} | dvla/vrm-assign-online | app/views/vrm_assign/FulfilFailure.scala | Scala | mit | 79 |
package sp.system
import akka.actor._
/**
* The starting object
* Created by Kristofer on 2014-06-06.
*/
object SPActorSystem {
// The actor system used by all parts of SP. Maybe we will allow remote actors in the future
implicit val system = ActorSystem("SP")
// val eventHandler = system.actorOf(Props[Du... | kristoferB/SP | sp1/src/main/scala/sp/system/SPActorSystem.scala | Scala | mit | 1,209 |
class Foo[A]
object Test {
def foo[M[_,_]](x: M[Int,Int]) = x
type Alias[X,Y] = Foo[X]
val x: Alias[Int,Int] = new Foo[Int]
foo[Alias](x) // ok
foo(x)
}
| som-snytt/dotty | tests/pos/i1181b.scala | Scala | apache-2.0 | 166 |
package mesosphere.marathon
package core.launchqueue.impl
import akka.actor.{Actor, ActorRef, Cancellable, Props}
import akka.event.LoggingReceive
import com.typesafe.scalalogging.StrictLogging
import mesosphere.marathon.core.launchqueue.impl.RateLimiterActor._
import mesosphere.marathon.core.leadership.LeaderDeferrab... | gsantovena/marathon | src/main/scala/mesosphere/marathon/core/launchqueue/impl/RateLimiterActor.scala | Scala | apache-2.0 | 3,226 |
/*
* Copyright (c) 2015,
* Ilya Sergey, Christopher Earl, Matthew Might and David Van Horn
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain t... | ilyasergey/reachability | src/org/ucombinator/scheme/cfa/kcfa/KCFAAnalysisRunner.scala | Scala | bsd-3-clause | 6,165 |
package com.phaller.rasync
package test
import java.util.concurrent.CountDownLatch
import com.phaller.rasync.cell.{ Cell, FinalOutcome, NextOutcome, NoOutcome }
import com.phaller.rasync.lattice.{ DefaultKey, Updater }
import com.phaller.rasync.pool.HandlerPool
import com.phaller.rasync.test.lattice.{ IntUpdater, Str... | phaller/reactive-async | core/src/test/scala/com/phaller/rasync/test/LazySuite.scala | Scala | bsd-2-clause | 7,014 |
package spark.broadcast
/**
* An interface for all the broadcast implementations in Spark (to allow
* multiple broadcast implementations). SparkContext uses a user-specified
* BroadcastFactory implementation to instantiate a particular broadcast for the
* entire Spark job.
*/
private[spark] trait BroadcastFactor... | koeninger/spark | core/src/main/scala/spark/broadcast/BroadcastFactory.scala | Scala | bsd-3-clause | 461 |
/*
* Copyright 2013 Akiyoshi Sugiki, University of Tsukuba
*
* 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 a... | axi-sugiki/kumoi | src/kumoi/impl/cache/CacheCommon.scala | Scala | apache-2.0 | 1,186 |
/**
* 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... | gf53520/kafka | core/src/main/scala/kafka/admin/AclCommand.scala | Scala | apache-2.0 | 29,085 |
package edu.osu.cse.groenkeb.logic.proof.rules.core
import edu.osu.cse.groenkeb.logic._
import edu.osu.cse.groenkeb.logic.proof._
import edu.osu.cse.groenkeb.logic.proof.rules._
case object NegationIntroduction extends BaseRule {
def major(sentence: Sentence) = false
def yields(conclusion: Sentence) = conclusi... | bgroenks96/AutoMoL | core/src/main/scala/edu/osu/cse/groenkeb/logic/proof/rules/core/introRules.scala | Scala | mit | 3,678 |
package io.circe.tests
import cats.kernel.Eq
import java.util.UUID
import org.scalacheck.{ Arbitrary, Gen }
import org.scalacheck.util.Buildable
import shapeless.{ :+:, ::, AdditiveCollection, CNil, Coproduct, Generic, HList, HNil, Inl, Inr, IsTuple, Nat, Sized }
import shapeless.labelled.{ FieldType, field }
import s... | travisbrown/circe | modules/tests/shared/src/main/scala/io/circe/tests/MissingInstances.scala | Scala | apache-2.0 | 3,664 |
package com.cleawing.akka.consul
import java.util.UUID
import akka.actor.{ExtendedActorSystem, Extension, ExtensionId, ExtensionIdProvider}
import akka.pattern._
import akka.util.Timeout
import scala.concurrent.Future
import scala.concurrent.duration._
object Consul
extends ExtensionId[ConsulExt]
with ExtensionI... | Cleawing/united | akka-extensions/src/main/scala/com/cleawing/akka/consul/Consul.scala | Scala | apache-2.0 | 4,330 |
package reactivemongo.core.actors
import scala.concurrent.Promise
import reactivemongo.io.netty.channel.ChannelId
import reactivemongo.core.protocol.{ Request, Response }
private[actors] class AwaitingResponse(
val request: Request,
val channelID: ChannelId,
val promise: Promise[Response],
val isGetLastErro... | ornicar/ReactiveMongo | driver/src/main/scala/core/actors/AwaitingResponse.scala | Scala | apache-2.0 | 3,436 |
package com.socrata.pg.server
class SoQLUrlTest extends SoQLTest {
test("select url") {
compareSoqlResult("""select code, url where code='LOCATION'""", "select-url.json")
}
test("text to url and equality check") {
compareSoqlResult(
"""SELECT code, url WHERE url = '<a href="http://www.socrata.com... | socrata-platform/soql-postgres-adapter | soql-server-pg/src/test/scala/com/socrata/pg/server/SoQLUrlTest.scala | Scala | apache-2.0 | 1,836 |
package text.search
/**
* @author ynupc
* Created on 2016/08/21
*/
object Horspool extends Search {
override def indexOf[T](source: Array[T], target: Array[T]): Int = {
-1
}
override def indicesOf[T](source: Array[T], target: Array[T]): Array[Int] = {
Array()
}
}
| ynupc/scalastringcourseday6 | src/main/scala/text/search/Horspool.scala | Scala | apache-2.0 | 296 |
//: ----------------------------------------------------------------------------
//: 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... | ShengC/remotely | core/src/main/scala/Values.scala | Scala | apache-2.0 | 4,568 |
import org.opencv.core.{Core, CvType, Mat, Scalar, Size}
import org.opencv.highgui.VideoCapture
package object opencv {
def using[A](m1: Mat)(f: Mat => A): A = {
try {
f(m1)
} finally {
m1.release()
}
}
def using[A](m1: Mat, m2: Mat)(f: (Mat, Mat) => A): A = {
try {
f(m1, m2)
... | okapies/isolator | src/main/scala/opencv/package.scala | Scala | bsd-2-clause | 5,371 |
/*
* Copyright (C) 2016 Vincibean <Andre Bessi>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This... | Vincibean/ScalaForTheImpatient-Solutions | src/main/scala/org/vincibean/scala/impatient/chapter10/exercise8/Tank.scala | Scala | gpl-3.0 | 1,393 |
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.