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 example.application.resource
import javax.ws.rs.core.MediaType
import javax.ws.rs._
@Path("/basic")
@Consumes(Array(MediaType.TEXT_PLAIN))
@Produces(Array(MediaType.TEXT_PLAIN))
class BasicResource {
@GET
@Path("ping")
def ping() = "Pong"
@GET
@Path("hello")
def hello(@QueryParam("name") name: S... | jostly/scala-dropwizard | src/test/scala/example/application/resource/BasicResource.scala | Scala | mit | 552 |
/*
* 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 ... | rezasafi/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/SetCatalogAndNamespaceExec.scala | Scala | apache-2.0 | 1,827 |
/*
* 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... | Stratio/crossdata | driver/src/main/scala/com/stratio/crossdata/driver/querybuilder/dslentities/predicates.scala | Scala | apache-2.0 | 3,862 |
/*
* 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/os/HotLinux.scala | Scala | apache-2.0 | 3,658 |
package com.sksamuel.elastic4s.jackson
import com.fasterxml.jackson.core.JsonParser
import com.fasterxml.jackson.databind.module.SimpleModule
import com.fasterxml.jackson.databind.{DeserializationContext, JsonDeserializer, JsonMappingException, ObjectMapper}
import com.fasterxml.jackson.module.scala.experimental.Scala... | Tecsisa/elastic4s | elastic4s-tests/src/test/scala/com/sksamuel/elastic4s/jackson/ElasticJacksonIndexableTest.scala | Scala | apache-2.0 | 2,595 |
package hammock
import cats.~>
trait InterpTrans[F[_]] {
def trans: HttpF ~> F
}
| pepegar/hammock | core/src/main/scala/hammock/InterpTrans.scala | Scala | mit | 85 |
package controllers
import java.nio.file._
import javax.inject.Inject
import com.github.dockerjava.api.model.NetworkSettings
import com.toscaruntime.exception.UnexpectedException
import com.toscaruntime.rest.client.DockerDaemonClient
import com.toscaruntime.rest.model.{DeploymentInfoDTO, RestResponse}
import com.tosc... | vuminhkh/tosca-runtime | proxy/app/controllers/ProxyController.scala | Scala | mit | 6,084 |
package controllers.admin
import javax.inject.Inject
import controllers.admin
import models.admin.{User, UserDAO}
import play.api.data.Forms._
import play.api.data._
import play.api.i18n.{I18nSupport, MessagesApi}
import play.api.mvc._
import views.html
import play.api.i18n.Messages.Implicits._
/**
* Created by mur... | mustafin/ent-quiz-server | modules/admin/app/controllers/admin/Auth.scala | Scala | apache-2.0 | 2,820 |
package im.tox.antox.wrapper
class GroupPeer(var name: String,
var ignored: Boolean) {
override def toString: String = name
}
| Ansa89/Antox | app/src/main/scala/im/tox/antox/wrapper/GroupPeer.scala | Scala | gpl-3.0 | 146 |
package mytest.casematch
import scala.util.Random
/**
* Created by fqc on 2016/7/15.
*/
object CaseNBA extends App {
val arr = Array("kobe", "james", "jordan", "rose")
private val index: Int = Random.nextInt(arr.length)
index match {
case 0 => println("kobe")
case 1 => println("james")
case 2 ... | fqc/Scala_sidepro | src/mytest/casematch/CaseNBA.scala | Scala | mit | 667 |
package org.pinky.representation
import _root_.com.thoughtworks.xstream.XStream
import com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver
/**
* Provides Json rendering, using the Jettison lib
*
* @author peter hausel gmail com (Peter Hausel)
*/
class JsonRepresentation extends XmlRepresentation {
xs... | d5nguyenvan/pinky | src/main/scala/org/pinky/representation/JsonRepresentation.scala | Scala | bsd-3-clause | 421 |
import sbt._
class BuildProject(info: ProjectInfo) extends DefaultProject(info) {
val mavenLocal = "Local Maven Repository" at "file://"+Path.userHome+"/.m2/repository"
}
| inigo/less-scala | project/build/Build.scala | Scala | apache-2.0 | 174 |
/*
* Copyright 2008-present MongoDB, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | rozza/mongo-scala-driver | driver/src/main/scala/org/mongodb/scala/gridfs/package.scala | Scala | apache-2.0 | 4,588 |
package org.allenai.common
import org.slf4j.LoggerFactory
/** This trait is meant to be mixed into a class to provide logging.
*
* The enclosed methods provide a Scala-style logging signature where the
* message is a block instead of a string. This way the message string is
* not constructed unless the messa... | cristipp/common | core/src/main/scala/org/allenai/common/Logging.scala | Scala | apache-2.0 | 1,448 |
package com.eevolution.context.dictionary.infrastructure.repository
import com.eevolution.context.dictionary.domain.model.SchedulerLog
import com.eevolution.context.dictionary.infrastructure.db.DbContext._
/**
* Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com
* This program is f... | adempiere/ADReactiveSystem | dictionary-impl/src/main/scala/com/eevolution/context/dictionary/infrastructure/repository/SchedulerLogMapping.scala | Scala | gpl-3.0 | 1,824 |
/*
* sbt
* Copyright 2011 - 2018, Lightbend, Inc.
* Copyright 2008 - 2010, Mark Harrah
* Licensed under Apache License 2.0 (see LICENSE)
*/
package sbt.internal.util
package complete
import java.lang.Character.{ toLowerCase => lower }
/** @author Paul Phillips */
object EditDistance {
/**
* Translated fro... | sbt/sbt | internal/util-complete/src/main/scala/sbt/internal/util/complete/EditDistance.scala | Scala | apache-2.0 | 1,463 |
/*
* 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 ... | GJL/flink | flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/api/stream/table/stringexpr/CalcStringExpressionTest.scala | Scala | apache-2.0 | 5,761 |
/*
* 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 ... | hequn8128/flink | flink-tests/src/test/scala/org/apache/flink/api/scala/operators/UnionITCase.scala | Scala | apache-2.0 | 4,154 |
package org.jetbrains.plugins.scala.traceLogViewer.selection
import com.intellij.util.ui.{ColumnInfo, ListTableModel}
import org.jetbrains.plugins.scala.traceLogger.TraceLog
import java.nio.file.attribute.BasicFileAttributes
import java.nio.file.{Files, Path}
import java.time.format.DateTimeFormatter
import java.time... | JetBrains/intellij-scala | scala/traceLogViewer/src/org/jetbrains/plugins/scala/traceLogViewer/selection/TraceLogSelectionModel.scala | Scala | apache-2.0 | 2,267 |
package play.api.libs.iteratee
import scala.concurrent.Future
import scala.concurrent.Promise
import scala.util.{Try, Failure, Success}
import Enumerator.Pushee
import java.util.concurrent.{ TimeUnit }
import play.api.libs.iteratee.internal.defaultExecutionContext
/**
* Utilities for concurrent usage of iteratees, ... | noel-yap/setter-for-catan | play-2.1.1/framework/src/iteratees/src/main/scala/play/api/libs/iteratee/Concurrent.scala | Scala | apache-2.0 | 24,979 |
/*
* Copyright 2021 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | hmrc/amls-frontend | test/views/businessdetails/correspondence_addressNonUkSpec.scala | Scala | apache-2.0 | 3,271 |
package com.twitter.finatra.http.integration.tweetexample.main.services
import com.twitter.concurrent.exp.AsyncStream
import com.twitter.finatra.http.integration.tweetexample.main.domain.Tweet
import com.twitter.util.Future
trait TweetsRepository {
def getById(id: Long): Future[Option[Tweet]]
def getByIds(ids: A... | deanh/finatra | http/src/test/scala/com/twitter/finatra/http/integration/tweetexample/main/services/TweetsRepository.scala | Scala | apache-2.0 | 360 |
package com.bizo.mighty.csv
/** Settings for CSVWriter */
trait CSVWriterSettings {
val separator: Char
val quotechar: Char
val escapechar: Char
val lineEnd: String
val encoding: String
}
object CSVWriterSettings{
import au.com.bytecode.opencsv.{ CSVWriter => OpenCSVWriter }
import OpenCSVWriter._
val... | t-pleasure/mighty-csv | src/main/scala/com/bizo/mighty/csv/CSVWriterSettings.scala | Scala | apache-2.0 | 1,003 |
package scala.meta.internal.scalacp
import scala.meta.internal.{semanticdb => s}
import scala.meta.internal.semanticdb.{Language => l}
import scala.meta.internal.semanticdb.Scala._
import scala.meta.internal.semanticdb.Scala.{Descriptor => d}
import scala.meta.internal.semanticdb.Scala.{Names => n}
import scala.meta.i... | scalameta/scalameta | semanticdb/metacp/src/main/scala/scala/meta/internal/scalacp/Synthetics.scala | Scala | bsd-3-clause | 2,164 |
import sbt.Keys._
import sbt._
import scala.scalajs.sbtplugin.ScalaJSPlugin.ScalaJSKeys._
import scala.scalajs.sbtplugin.ScalaJSPlugin._
object ScalajsReact extends Build {
type PE = Project => Project
lazy val commonSettings: PE = _.settings(
organization := "net.bblfish",
scalaVersion := "2.11.2",
... | bblfish/akka.http.model.Uri | project/Build.scala | Scala | apache-2.0 | 4,362 |
package pl.touk.nussknacker.engine.api.context.transformation
import cats.data.ValidatedNel
import com.typesafe.scalalogging.LazyLogging
import pl.touk.nussknacker.engine.api.context.ProcessCompilationError.{CannotCreateObjectError, WrongParameters}
import pl.touk.nussknacker.engine.api.context.{ProcessCompilationErro... | TouK/nussknacker | components-api/src/main/scala/pl/touk/nussknacker/engine/api/context/transformation/GenericNodeTransformation.scala | Scala | apache-2.0 | 7,122 |
/*
* 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 ... | jackylk/incubator-carbondata | mv/core/src/test/scala/org/apache/carbondata/mv/plans/Tpcds_1_4_BenchmarkSuite.scala | Scala | apache-2.0 | 3,471 |
/**
* Copyright (C) 2014 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 ap... | Stratio/streaming-cep-engine | siddhi/src/test/scala/com/stratio/decision/unit/siddhi/query/model/OrderStream.scala | Scala | apache-2.0 | 3,022 |
package com.bot4s.telegram.marshalling
import akka.http.scaladsl.marshalling.{ Marshaller, Marshalling, ToEntityMarshaller }
import akka.http.scaladsl.model._
import akka.http.scaladsl.unmarshalling.{ FromEntityUnmarshaller, Unmarshaller }
import com.bot4s.telegram.marshalling
import com.bot4s.telegram.methods.{ JsonR... | mukel/telegrambot4s | akka/src/com/bot4s/telegram/marshalling/AkkaHttpMarshalling.scala | Scala | apache-2.0 | 2,853 |
package com.codacy.client.bitbucket.client
sealed trait RequestResponse[+A] {
@deprecated("This should be removed or re-implemented to support pagination", "12.0.0")
def map[B](f: A => B): RequestResponse[B] = {
flatMap(a => RequestResponse.success(f(a)))
}
@deprecated("This should be removed or re-imple... | codacy/bitbucket-scala-client | src/main/scala/com/codacy/client/bitbucket/client/RequestResponse.scala | Scala | apache-2.0 | 1,738 |
package nestor
package domain
import scalaz._, Scalaz._
import org.joda.time.DateTime
case class Person(
id: Int,
firstName: String,
lastName: String,
country: Country,
document: String,
email: Option[String] = None,
phone: Option[String] = None,
notes: Option[String] = None,
creat... | ornicar/nestor | app/domain/Person.scala | Scala | mit | 1,911 |
/*
* Copyright 2014 Lars Edenbrandt
*
* 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... | slicebox/slicebox | src/main/scala/se/nimsa/sbx/log/LogProtocol.scala | Scala | apache-2.0 | 2,070 |
package com.ee.assets
import com.ee.assets.deployment.Deployer
import com.ee.assets.models.{SimpleAssetsInfo, Suffix, AssetsLoaderConfig, AssetsInfo}
import com.ee.assets.paths.PathResolver
import com.ee.assets.transformers._
import com.ee.log.Logger
import com.google.javascript.jscomp.CompilerOptions
import java.io.F... | edeustace/assets-loader | plugin/app/com/ee/assets/Loader.scala | Scala | mit | 7,001 |
package com.github.j5ik2o.spetstore.adaptor.http
case class CreateItemTypeJson(
categoryId: String,
name: String,
description: Option[String]
)
| j5ik2o/spetstore-cqrs-es-akka | write-interface/src/main/scala/com/github/j5ik2o/spetstore/adaptor/http/CreateItemTypeJson.scala | Scala | mit | 159 |
/*
* 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 scala.scalajs.js
import scala.scalajs... | nicolasstucki/scala-js | library/src/main/scala/scala/scalajs/js/IterableOps.scala | Scala | apache-2.0 | 570 |
/*
* Copyright 2014 Adam Rosenberger
*
* 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... | arosenberger/nalloc_2.10 | sandbox/src/main/scala/org/nalloc/bitb/kcits/sandbox/flatMap/BlockInlineLambda.scala | Scala | apache-2.0 | 1,481 |
/*
* Copyright (c) 2014-2018 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... | ddworak/monix | monix-tail/shared/src/main/scala/monix/tail/internal/IterantReduce.scala | Scala | apache-2.0 | 3,616 |
package com.awesomesauce.minecraft.forge.openautomation.common.lasers.packets
import com.awesomesauce.minecraft.forge.openautomation.api.lasers.LaserPacket
import net.minecraft.entity.EntityLivingBase
import net.minecraft.world.World
import net.minecraftforge.common.util.ForgeDirection
class EntityPacket(var entity: ... | AwesomeSauceMods/OpenAutomation | main/scala/com/awesomesauce/minecraft/forge/openautomation/common/lasers/packets/EntityPacket.scala | Scala | mit | 817 |
/* ************************************************************** *
* *
* Copyright (c) 2016-, Kota Mizushima, All rights reserved. *
* *
* ... | onionlang/onion | src/main/scala/onion/compiler/CodeGeneration.scala | Scala | bsd-3-clause | 62,216 |
class CSuper {
object A
}
class C extends CSuper {
def f = (A: AnyRef) match { case _: A.type => "joepie" }
}
object Test extends C with App {
println(f)
}
| yusuke2255/dotty | tests/run/t4897.scala | Scala | bsd-3-clause | 164 |
/**
* 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... | dchenbecker/kafka-sbt | core/src/main/scala/kafka/consumer/ConsumerFetcherThread.scala | Scala | apache-2.0 | 3,634 |
import scala.collection.mutable
object Solution {
private val distance = 6
private def minReach(adj: Array[Array[Boolean]], s: Int, n: Int): Array[Int] = {
val indices = 0 until n
def go(q: mutable.Queue[Int], dist: Array[Int], visited: Array[Boolean], iter: Int): Array[Int] = {
val src = q.dequeue... | marcos-sb/hacker-rank | algorithms/graph-theory/bfsshortreach/Solution.scala | Scala | apache-2.0 | 1,548 |
/*
* 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 ... | h2oai/sparkling-water | utils/src/main/scala/ai/h2o/sparkling/utils/FinalizingOutputStream.scala | Scala | apache-2.0 | 1,319 |
package pureconfig
import scala.collection.JavaConverters._
import scala.language.higherKinds
import com.typesafe.config._
/** A trait signaling that a `ConfigWriter` can write missing (undefined) values.
*
* `ConfigWriter`s always produce a valid `ConfigValue` with their `to` method. This trait adds an extra `t... | melrief/pureconfig | core/src/main/scala/pureconfig/CollectionWriters.scala | Scala | mpl-2.0 | 1,973 |
package notebook.kernel.pfork
import java.io.File
import java.net.{ServerSocket, Socket, URLClassLoader, URLDecoder}
import java.util.concurrent.atomic.AtomicBoolean
import org.apache.commons.exec._
import org.slf4j.LoggerFactory
import scala.collection.JavaConversions._
import scala.collection.mutable
/**
* I am ... | caiomsouza/spark-notebook | modules/subprocess/src/main/scala/notebook/kernel/pfork/ProcessFork.scala | Scala | apache-2.0 | 5,680 |
/*
* 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 u... | knockdata/spark-highcharts | src/test/scala/com/knockdata/spark/highcharts/model/ModelAnalyzer.scala | Scala | apache-2.0 | 6,309 |
package com.twitter.finagle
/**
* Codecs provide protocol encoding and decoding via netty pipelines
* as well as a standard filter stack that are applied to services
* from this codec.
*/
import java.net.SocketAddress
import org.jboss.netty.channel.{ChannelPipelineFactory, ChannelPipeline}
import com.twitter.util... | enachb/finagle_2.9_durgh | finagle-core/src/main/scala/com/twitter/finagle/Codec.scala | Scala | apache-2.0 | 1,732 |
package com.twitter.finagle.http.codec
import com.twitter.conversions.StorageUnitOps._
import com.twitter.finagle.ChannelBufferUsageException
import com.twitter.finagle.stats.{NullStatsReceiver, StatsReceiver}
import com.twitter.util.StorageUnit
/**
* ChannelBufferUsageTracker tracks the channel buffer used by outst... | twitter/finagle | finagle-base-http/src/main/scala/com/twitter/finagle/http/codec/ChannelBufferUsageTracker.scala | Scala | apache-2.0 | 2,080 |
package lila.app
package mashup
import chess.Color
import org.joda.time.Period
import lila.api.Context
import lila.bookmark.BookmarkApi
import lila.forum.PostApi
import lila.game.{ GameRepo, Game, Crosstable, PlayTime }
import lila.relation.RelationApi
import lila.security.Granter
import lila.user.{ User, Trophy, Tro... | TangentialAlan/lila | app/mashup/UserInfo.scala | Scala | mit | 3,264 |
package com.socrata.tileserver
package util
import org.scalatest.mockito.MockitoSugar
import com.socrata.http.client.{RequestBuilder, Response}
import com.socrata.http.server.util.RequestId.ReqIdHeader
import com.socrata.soql.types.SoQLText
import com.socrata.testcommon
class GeoProviderTest extends TestBase with Un... | socrata-platform/tileserver | src/test/scala/com.socrata.tileserver/util/GeoProviderTest.scala | Scala | apache-2.0 | 8,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 ... | jackylk/incubator-carbondata | integration/spark/src/main/scala/org/apache/spark/sql/EnvHelper.scala | Scala | apache-2.0 | 1,430 |
package com.softwaremill.macwire
import com.softwaremill.macwire.internals.*
import scala.quoted.*
object MacwireMacros {
private val log = new Logger()
def wireImpl[T: Type](using q: Quotes): Expr[T] = {
import q.reflect.*
val dependencyResolver = DependencyResolver.throwErrorOnResolutionFailure[q.type... | adamw/macwire | macros/src/main/scala-3/com/softwaremill/macwire/MacwireMacros.scala | Scala | apache-2.0 | 3,550 |
package org.jetbrains.plugins.scala.failed.annotator
import com.intellij.testFramework.fixtures.CodeInsightTestFixture
import org.jetbrains.plugins.scala.PerfCycleTests
import org.junit.experimental.categories.Category
/**
* @author Anton Yalyshev
*/
@Category(Array(classOf[PerfCycleTests]))
class OverloadingBadC... | ilinum/intellij-scala | test/org/jetbrains/plugins/scala/failed/annotator/OverloadingBadCodeGreenTest.scala | Scala | apache-2.0 | 1,267 |
package com.chaordicsystems.cactus
import com.chaordicsystems.cactus.Operator._
import com.chaordicsystems.cactus.Validator._
import com.sksamuel.elastic4s.ElasticDsl.{bool, must, should}
import com.sksamuel.elastic4s._
import org.json4s._
import org.json4s.jackson.JsonMethods._
object Parser {
implicit val formats... | chaordic/cactus | src/main/scala/com/chaordicsystems/cactus/Parser.scala | Scala | mit | 2,326 |
package de.is24.play.orientdb
import scala.language.implicitConversions
sealed trait Operation
case class UpdateOperation(record: Map[String, String]) extends Operation
case class DeleteOperation(record: Map[String, String]) extends Operation
case class CreateOperation(record: Map[String, String]) extends Operatio... | ImmobilienScout24/play-orientdb-client | app/de/is24/play/orientdb/Operation.scala | Scala | apache-2.0 | 1,435 |
/**
* The MIT License (MIT)
* <p/>
* Copyright (c) 2016 ScalateKids
* <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 ... | ScalateKids/Actorbase | src/main/scala/com/actorbase/actorsystem/actors/main/Main.scala | Scala | mit | 16,302 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | fhueske/flink | flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/api/batch/sql/JoinTest.scala | Scala | apache-2.0 | 9,078 |
/*
* 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 | test/iht/views/registration/CompletedRegistrationViewTest.scala | Scala | apache-2.0 | 3,381 |
/*
* 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/helpers/ExtractorHelpersTest.scala | Scala | agpl-3.0 | 17,447 |
/*
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 in writing, software... | nabarunnag/Summingbird_dev | summingbird-core-test/src/main/scala/com/twitter/summingbird/TestGraphs.scala | Scala | apache-2.0 | 25,386 |
/**
* 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... | noslowerdna/kafka | core/src/test/scala/unit/kafka/log/LogCleanerParameterizedIntegrationTest.scala | Scala | apache-2.0 | 15,484 |
package org.jetbrains.plugins.scala
package lang.psi.applicability
import lang.psi.types._
/**
* Pavel.Fatin, 18.05.2010
*/
class NamedTest extends ApplicabilityTestBase {
def testFine {
assertProblems("(a: A)", "(a = A)") {
case Nil =>
}
assertProblems("(a: A, b: B)", "(a = A, b = B)") {
... | consulo/consulo-scala | test/org/jetbrains/plugins/scala/lang/psi/applicability/NamedTest.scala | Scala | apache-2.0 | 4,247 |
/**
* Copyright (C) 2009-2011 the original author or authors.
* See the notice.md 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.
* Yo... | maslovalex/scalate | scalate-core/src/test/scala/org/fusesource/scalate/scuery/support/CssParserTestSupport.scala | Scala | apache-2.0 | 2,782 |
package com.tribbloids.spookystuff.actions
import java.util.Date
import com.tribbloids.spookystuff.{QueryException, SpookyEnvFixture}
/**
* Created by peng on 08/09/15.
*/
//TODO: test independently for each cache type (after switch for different cache is implemented)
class TestWayback extends SpookyEnvFixture {... | tribbloid/spookystuff | core/src/test/scala/com/tribbloids/spookystuff/actions/TestWayback.scala | Scala | apache-2.0 | 3,135 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | chenc10/Spark-PAF | core/src/main/scala/org/apache/spark/storage/MemoryStore.scala | Scala | apache-2.0 | 24,107 |
package scalajsclient
import org.scalajs.dom
import scala.scalajs.js
import scala.scalajs.js.timers._
import scala.scalajs.js.Dynamic.global
import org.singlespaced.d3js.d3
import org.singlespaced.d3js.Ops._
import scala.concurrent.duration._
import upickle.default._
import shared._
/////////////////////////////... | serversideapps/silhmojs | client/src/main/scala/scalajsclient/ScalaJSUtils.scala | Scala | apache-2.0 | 9,616 |
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2015-2021 Andre White.
*
* 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
*
* https://www.apache.org/licenses/LICENSE... | adarro/ddo-calc | subprojects/common/ddo-core/src/main/scala/io/truthencode/ddo/model/feats/BelovedOfTheUndyingCourt.scala | Scala | apache-2.0 | 1,139 |
/*
* Copyright (C) 2005 - 2019 Schlichtherle IT Services.
* All rights reserved. Use is subject to license terms.
*/
package global.namespace.truelicense.tests.v2.json
import global.namespace.truelicense.api.LicenseManagementContextBuilder
import global.namespace.truelicense.tests.core.ExtraMapTestContext
import gl... | christian-schlichtherle/truelicense | tests/src/test/scala/global/namespace/truelicense/tests/v2/json/V2JsonTestContext.scala | Scala | apache-2.0 | 590 |
package com.lorandszakacs.sg.exporter
import com.lorandszakacs.sg.exporter.html.HTMLGeneratorAssembly
import com.lorandszakacs.sg.exporter.impl.SGExporterImpl
import com.lorandszakacs.sg.exporter.indexwriter.HTMLIndexWriterAssembly
import com.lorandszakacs.sg.model.SGRepoAssembly
/**
*
* @author Lorand Szakacs, l... | lorandszakacs/sg-downloader | sg-harvester/src/main/scala/com/lorandszakacs/sg/exporter/SGExporterAssembly.scala | Scala | apache-2.0 | 688 |
/*
* 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 | sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisErrorSuite.scala | Scala | apache-2.0 | 26,492 |
package pl.touk.nussknacker.engine.process.runner
import pl.touk.nussknacker.engine.graph.EspProcess
import pl.touk.nussknacker.engine.marshall.ScenarioParser
import pl.touk.nussknacker.engine.util.Implicits.SourceIsReleasable
import java.nio.charset.StandardCharsets
import scala.util.Using
trait FlinkRunner {
pr... | TouK/nussknacker | engine/flink/executor/src/main/scala/pl/touk/nussknacker/engine/process/runner/FlinkRunner.scala | Scala | apache-2.0 | 621 |
/*
* 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 ... | dbtsai/spark | core/src/main/scala/org/apache/spark/deploy/worker/ExecutorRunner.scala | Scala | apache-2.0 | 8,358 |
package models.party
import net.scalytica.symbiotic.api.types.PartyBaseTypes.PartyId
import net.scalytica.symbiotic.api.types.PersistentType
/**
* An abstraction defining a Party (person or organisation)
*/
abstract class Party extends PersistentType {
val id: Option[PartyId]
}
| kpmeen/symbiotic | examples/symbiotic-server/app/models/party/Party.scala | Scala | apache-2.0 | 285 |
package com.criteo.dev.cluster.s3
import com.criteo.dev.cluster.config.GlobalConfig
import com.criteo.dev.cluster.{CliAction, NodeFactory, Public}
import com.criteo.dev.cluster.docker.{DockerConstants, DockerRunning, DockerUtilities}
import org.slf4j.LoggerFactory
/**
* Points a local docker dev cluster to be able ... | criteo/berilia | src/main/scala/com/criteo/dev/cluster/s3/AttachBucketLocalCliAction.scala | Scala | apache-2.0 | 1,787 |
package com.rocketfuel.sdbc.cassandra
import cats.effect.Async
import com.datastax.oss.driver.api.core.{CqlSession, CqlSessionBuilder}
import com.rocketfuel.sdbc.base.Logger
import fs2.Stream
object StreamUtils extends Logger {
/**
* Create a stream from a managed CqlSession.
*/
def session[F[_], O](
... | rocketfuel/sdbc | cassandra/src/main/scala/com/rocketfuel/sdbc/cassandra/StreamUtils.scala | Scala | bsd-3-clause | 666 |
package com.blogspot.ramannanda.scala.algorithms.cp3.medium
import scala.util.control.Breaks._
/**
* UVA 10911 Problem is to minimize the overall cost of distance between pair of points
*/
object FormingQuizTeams {
type Point = (Int, Int)
def doMatching(bitmask: Int, n: Int, distanceTable: Array[Array[Double... | ramannanda9/algorithms-in-scala | src/main/scala/com/blogspot/ramannanda/scala/algorithms/cp3/medium/FormingQuizTeams.scala | Scala | gpl-3.0 | 1,961 |
package io.scalac.amqp
import akka.util.ByteString
import com.google.common.net.MediaType
import io.scalac.amqp.Message.{PriorityMax, PriorityMin}
import org.joda.time.DateTime
import scala.concurrent.duration.Duration
object Message {
val PriorityMin = 0
val PriorityMax = 9
}
final case class Message(
/** ... | davidwrpayne/reactive-rabbit | src/main/scala/io/scalac/amqp/Message.scala | Scala | apache-2.0 | 4,741 |
package hu.frankdavid.ranking.gui
import java.util.concurrent.atomic.AtomicInteger
import javafx.beans.property.SimpleListProperty
import javafx.concurrent.Task
import javafx.scene.Group
import javafx.scene.chart.XYChart
import javafx.scene.control.Alert.AlertType
import javafx.scene.control.ButtonBar.ButtonData
impor... | frankdavid/ranking | src/main/scala/hu/frankdavid/ranking/gui/ChartScene.scala | Scala | apache-2.0 | 9,475 |
/*
* 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 ... | yzhou2001/HSpark | src/test/scala/org/apache/spark/sql/hbase/HBaseBasicOperationSuite.scala | Scala | apache-2.0 | 8,349 |
package dk.tennis.compare.rating.multiskill.model.perfdiff.skillsfactor.cov.opponentseiso
import dk.tennis.compare.rating.multiskill.model.perfdiff.skillsfactor.cov.CovFunc
import dk.tennis.compare.rating.multiskill.model.perfdiff.Player
import dk.tennis.compare.rating.multiskill.model.perfdiff.skillsfactor.cov.oppone... | danielkorzekwa/tennis-player-compare | multiskill/src/main/scala/dk/tennis/compare/rating/multiskill/model/perfdiff/skillsfactor/cov/opponentseiso/OpponentSeIsoCovFunc.scala | Scala | bsd-2-clause | 1,642 |
package synereo.client.rootmodels
// scalastyle:off
case class SessionRootModel(sessionUri: String = "")
| LivelyGig/ProductWebUI | sclient/src/main/scala/synereo/client/rootmodels/SessionRootModel.scala | Scala | apache-2.0 | 106 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | zzcclp/carbondata | integration/spark/src/main/scala/org/apache/spark/sql/parser/MVQueryParser.scala | Scala | apache-2.0 | 4,260 |
package org.bitcoins.core.util
import org.bitcoins.core.gen.NumberGenerator
import org.bitcoins.core.number.{ UInt32, UInt8 }
import org.scalacheck.{ Gen, Prop, Properties }
/**
* Created by chris on 6/20/16.
*/
class NumberUtilSpec extends Properties("NumberUtilSpec") {
private val logger = BitcoinSLogger.logger... | Christewart/bitcoin-s-core | src/test/scala/org/bitcoins/core/util/NumberUtilSpec.scala | Scala | mit | 1,524 |
/*
* Copyright (c) 2009 Sony Pictures Imageworks Inc.
*
* 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 the above copyright
* notice, thi... | imageworks/scala-migrations | src/test/scala/com/imageworks/migration/tests/duplicate_versions/Migrate_20081118191214_Foo.scala | Scala | bsd-3-clause | 1,778 |
/*
* Copyright 2014 IBM Corp.
*
* 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... | yeghishe/spark-kernel | kernel/src/main/scala/com/ibm/spark/kernel/protocol/v5/kernel/socket/SocketFactory.scala | Scala | apache-2.0 | 3,720 |
/*
* 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... | intel-analytics/BigDL | scala/dllib/src/test/scala/com/intel/analytics/bigdl/dllib/keras/objectives/MeanAbsoluteErrorSpec.scala | Scala | apache-2.0 | 1,211 |
package scala.pickling.staticonlyfail1
import scala.pickling._
import NegativeCompilation._
import org.scalatest.FunSuite
class StaticOnlyFail1Test extends FunSuite {
test("main") {
expectError("Cannot generate") {
"""
| import _root_.scala.pickling._
| import _root_.scala.pickling.Default... | scala/pickling | core/src/test/scala/scala/pickling/neg/StaticOnlyFail1Test.scala | Scala | bsd-3-clause | 612 |
package io.getquill.context.sql.norm
import io.getquill.Spec
import io.getquill.context.sql.testContext._
import io.getquill.Query
class ExpandMappedInfixSpec extends Spec {
"expand infix out of map body if first part is empty" in {
val forUpdate = quote {
q: Query[TestEntity] => infix"$q FOR UPDATE".as[Q... | getquill/quill | quill-sql/src/test/scala/io/getquill/context/sql/norm/ExpandMappedInfixSpec.scala | Scala | apache-2.0 | 892 |
/*
* Copyright 2015 Nicolas Rinaudo
*
* 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... | nrinaudo/scala-csv | scalaz/shared/src/test/scala/kantan/csv/scalaz/ErrorTests.scala | Scala | mit | 2,813 |
package com.github.swwjf
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.builder.SpringApplicationBuilder
import org.springframework.boot.context.web.SpringBootServletInitializer
import org.springframework.context.annotation.ComponentScan
@SpringBootApplication
@Com... | andrei-l/scala-webapp-with-java-frameworks | webservices/src/main/scala/com/github/swwjf/WebServicesApplication.scala | Scala | mit | 722 |
package rsyntaxEdit
import scalaExec.Interpreter.GlobalValues
// process the word under mouse cursor position for the JSyntaxPane editor,
// the behavior depends on whether we are in ScalaSci mode (last execution key stroke is F6),
object ProcessWordAtCursorJSyntaxPane {
def processWordAtCursorJSyntaxPane(wd: St... | scalalab/scalalab | source/src/main/scala/rsyntaxEdit/ProcessWordAtCursorJSyntaxPane.scala | Scala | mit | 3,685 |
package rere.ql.data
import rere.ql.types.{ReqlPoint, ReqlPolygon}
import rere.ql.values.ReqlPolygonQuery
case class GeoLinearRing(point1: GeoPoint, point2: GeoPoint, point3: GeoPoint, otherPoints: GeoPoint*)
object GeoLinearRing {
implicit def toReqlPolygon(implicit ring: GeoLinearRing): ReqlPolygon = {
new R... | pbaun/rere | modules/ql/src/main/scala/rere/ql/data/GeoLinearRing.scala | Scala | apache-2.0 | 426 |
/**
* 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 3.0 of the License, or (at your option... | zakski/project-soisceal | gospel-core/src/main/scala/com/szadowsz/gospel/core/db/DefaultLibraryManager.scala | Scala | lgpl-3.0 | 2,421 |
/*
* Copyright 2018 Analytics Zoo 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... | intel-analytics/analytics-zoo | zoo/src/test/scala/com/intel/analytics/zoo/pipeline/api/keras/layers/MaxPooling3DSpec.scala | Scala | apache-2.0 | 2,033 |
package objektwerks
import org.apache.spark.sql.{DataFrame, Dataset, Row}
import org.scalatest.funsuite.AnyFunSuite
import org.scalatest.matchers.should.Matchers
class DataframeTest extends AnyFunSuite with Matchers {
import SparkInstance._
import org.apache.spark.sql.expressions._
import org.apache.spark.sql.f... | objektwerks/spark | src/test/scala/objektwerks/DataframeTest.scala | Scala | apache-2.0 | 5,624 |
package scommons.client.app
import scommons.api.ApiResponse
import scommons.client.ui.popup._
import scommons.react._
import scommons.react.redux.task.TaskManagerUiProps
import scala.util.{Success, Try}
/**
* Displays status of running tasks.
*/
object AppTaskManagerUi extends FunctionComponent[TaskManagerUiProp... | viktor-podzigun/scommons | ui/src/main/scala/scommons/client/app/AppTaskManagerUi.scala | Scala | apache-2.0 | 1,436 |
package reactivemongo
import java.util.Arrays
import akka.util.ByteString
import org.specs2.mutable._
import reactivemongo.bson._
import reactivemongo.bson.BSONObjectID
import reactivemongo.bson.utils.Converters
import reactivemongo.core.netty._
class BsonSpec extends Specification {
val simple = Array[Byte](0x16,... | sh1ng/ReactiveMongo | driver/src/test/scala/BsonSpec.scala | Scala | apache-2.0 | 6,610 |
package org.higherstate.jameson.parsers
import org.higherstate.jameson.tokenizers.Tokenizer
import org.higherstate.jameson.{Selector, Path}
import org.higherstate.jameson.failures.Valid
import scala.collection.mutable.ListBuffer
case class Tuple2MapParser[T1, T2](s1:Selector[String, T1], s2:Selector[String, T2]) exte... | HigherState/jameson | src/main/scala/org/higherstate/jameson/parsers/TupleMapParser.scala | Scala | apache-2.0 | 4,404 |
/*
* Copyright (C) 2012 The Regents of The University California.
* 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/LICEN... | KrishnaVamsiKV/Shark | src/main/scala/shark/parse/SharkExplainSemanticAnalyzer.scala | Scala | apache-2.0 | 2,130 |
package coursier
package test
import utest._
import scala.async.Async.{async, await}
import coursier.core.{Classifier, Configuration, Extension, Type}
import coursier.graph.{Conflict, ModuleTree}
import coursier.test.compatibility._
import coursier.util.{Artifact, Print, Tree}
import scala.concurrent.Future
object ... | coursier/coursier | modules/tests/shared/src/test/scala/coursier/test/CentralTests.scala | Scala | apache-2.0 | 56,491 |
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.