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.twitter.finagle.thriftmux.service
import com.twitter.finagle.context.Contexts
import com.twitter.finagle.mux
import com.twitter.finagle.service._
import com.twitter.finagle.thrift.DeserializeCtx
import com.twitter.finagle.thrift.service.ThriftResponseClassifier
import com.twitter.io.Buf
import com.twitter.... | liamstewart/finagle | finagle-thriftmux/src/main/scala/com/twitter/finagle/thriftmux/service/ThriftMuxResponseClassifier.scala | Scala | apache-2.0 | 6,165 |
package com.mattrjacobs.rxscala
import java.util.concurrent.CountDownLatch
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
object ScalaFutureWrapper extends FutureWrapper {
def main(args: Array[String]) = {
println("Starting the ScalaFutureWrapper")
val latch = new... | mattrjacobs/RxScalaDemo | src/main/scala/demo/ScalaFutureWrapper.scala | Scala | apache-2.0 | 761 |
package com.twitter.finagle.thriftmux.ssl
import com.twitter.finagle.{Address, ListeningServer, Thrift, ThriftMux}
import com.twitter.finagle.ssl.{
ClientAuth,
KeyCredentials,
OpportunisticTls,
SnoopingLevelInterpreter,
TrustCredentials
}
import com.twitter.finagle.ssl.client.{SslClientConfiguration, SslClie... | twitter/finagle | finagle-thriftmux/src/test/scala/com/twitter/finagle/thriftmux/ssl/ThriftSmuxSslTestComponents.scala | Scala | apache-2.0 | 4,329 |
class C1 {
@scala.annotation.varargs
def f(values:String*) = println("Calling C1.f(): " + values)
}
class C2 {
@scala.annotation.varargs
def f(values:String*) = println("Calling C2.f(): " + values)
def g(): String => Int = s => s.hashCode
class C3 {
@scala.annotation.varargs
def f(values:String*... | folone/dotty | tests/pending/run/t5125b.scala | Scala | bsd-3-clause | 900 |
/*
* Copyright © 2015 Reactific Software LLC. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to us... | reactific/RxMongo | client/src/test/scala/rxmongo/client/CollectionSpec.scala | Scala | mit | 3,403 |
/**
* 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... | mt0803/streaming-cep-engine | api/src/main/scala/com/stratio/streaming/api/kafka/KafkaConsumer.scala | Scala | apache-2.0 | 1,733 |
/*
* 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 ... | tzulitai/flink | flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/api/stream/sql/GroupWindowTest.scala | Scala | apache-2.0 | 13,617 |
package com.technophobia.substeps.domain.parameter
import collection.JavaConversions._
import com.technophobia.substeps.model.parameter.Converter
object StringConverter extends Converter[String] {
val converts: java.util.Set[Class[_]] = Set[Class[_]](classOf[String])
def convert(value: String) = value
}
| G2G3Digital/substeps-scala-core | src/main/scala/com/technophobia/substeps/domain/parameter/StringConverter.scala | Scala | lgpl-3.0 | 312 |
/*
* 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... | asorianostratio/incubator-toree | scala-interpreter/src/main/scala/org/apache/toree/magic/builtin/Scala.scala | Scala | apache-2.0 | 2,243 |
/*
* 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 ... | sryza/spark | core/src/main/scala/org/apache/spark/metrics/sink/GraphiteSink.scala | Scala | apache-2.0 | 2,799 |
/*******************************************************************************
* Copyright (c) 2014 Łukasz Szpakowski.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MP... | luckboy/LogicalTerm | src/main/scala/pl/luckboy/logicalterm/Result.scala | Scala | mpl-2.0 | 1,356 |
package latis.ops
import latis.dm._
import latis.util.iterator.MappingIterator
import latis.util.LatisServiceException
import scala.collection.Map
import scala.collection.mutable.ListBuffer
import scala.math._
import latis.util.iterator.PeekIterator
import latis.time.Time
import latis.metadata.Metadata
import latis.da... | dlindhol/LaTiS | src/main/scala/latis/ops/BinAverageByWidth.scala | Scala | epl-1.0 | 7,638 |
/*
* Copyright (C) 2020-present, Wei Chou(weichou2010@gmail.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 requir... | chenakam/scala-lang | src/main/scala/hobby/chenai/nakam/tool/macros/package.scala | Scala | apache-2.0 | 863 |
import play.api.Play
import play.api.{ Application, GlobalSettings }
import play.Logger
import play.api.mvc.WithFilters
import play.filters.gzip.GzipFilter
import org.geogit.server.core.GeoGitFrontEnd
import akka.actor.{ ActorSystem, Props }
import akka.io.IO
import spray.can.Http
import com.typesafe.config.ConfigFacto... | jmarin/geogit-demo | app/Global.scala | Scala | bsd-3-clause | 1,315 |
package net.machinemuse.numina.network
/**
* Author: MachineMuse (Claire Semple)
* Created: 9:20 PM, 9/6/13
*/
object NuminaPackets {
def init() {
MusePacketHandler.packagers.put(20, MusePacketNameChangeRequest)
MusePacketHandler.packagers.put(21, MusePacketModeChangeRequest)
MusePacketHandler.package... | MachineMuse/Numina | src/main/scala/net/machinemuse/numina/network/NuminaPackets.scala | Scala | bsd-2-clause | 361 |
/*
Copyright 2016 ScalABM
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
distribu... | EconomicSL/agora | src/functional/scala/org/economicsl/agora/markets/auctions/mutable/continuous/SellersAskDoubleAuctionSpec.scala | Scala | apache-2.0 | 3,998 |
package business
import java.sql.SQLException
import models._
import test.core.BaseTestSpec
import utils.{ConversionUtils, RandomUtils}
import scala.util.{Failure, Success}
class PasteManagerTest extends BaseTestSpec {
val pasteManager: PasteManager = new PasteManager with TestDaoTrait
val contentFieldPreviewMa... | maximx1/lecarton | test/business/PasteManagerTest.scala | Scala | mit | 9,213 |
/*
* 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 ... | trueyao/spark-lever | mllib/src/main/scala/org/apache/spark/mllib/optimization/NNLS.scala | Scala | apache-2.0 | 5,210 |
/**
* 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... | crackcell/crackcell-templates | spark-maven-wordcount/src/main/scala/com/crackcell/SparkWordCount.scala | Scala | gpl-2.0 | 1,588 |
package adt.bson.mongo.async
import adt.bson.mongo.async.client._
import play.api.libs.functional.syntax._
import scala.collection.JavaConversions.collectionAsScalaIterable
import scala.concurrent.{Future, Promise}
/**
* Substitutes [[com.mongodb.async.AsyncBatchCursor]]
*/
class AsyncBatchCursor[+T](underlying: J... | jeffmay/bson-adt | bson-adt-mongo3-async/src/main/scala/adt/bson/mongo/async/AsyncBatchCursor.scala | Scala | apache-2.0 | 733 |
trait A {
type D >: Null <: C
def foo(d: D)(d2: d.type): Unit
trait C {
def bar: Unit = foo(null)(null)
}
}
object B extends A {
class D extends C
def foo(d: D)(d2: d.type): Unit = () // Bridge method required here!
}
object Test extends App {
new B.D().bar
}
| som-snytt/dotty | tests/run/t6443b.scala | Scala | apache-2.0 | 280 |
// scalac: -Xmigration:2.9 -Xfatal-warnings
//
import collection.Seq
object Test {
def f1(x: Any) = x.isInstanceOf[Seq[_]]
def f2(x: Any) = x match {
case _: Seq[_] => true
case _ => false
}
def f3(x: Any) = x match {
case _: Array[_] => true
case _ => false
}
def f4(... | som-snytt/dotty | tests/pos/t6963c.scala | Scala | apache-2.0 | 668 |
package service
import java.lang.Long.parseLong
import scala.concurrent.Future
import scalaz.syntax.applicative.ToApplyOps
import play.api.libs.concurrent.Execution.Implicits._
import scalaz._
import Scalaz._
import org.mindrot.jbcrypt.BCrypt
import utils.{Logging, Utils}
import Utils._
import entities._
/**
* ... | andrewboss/texttalk-frontend | app/service/RedisService.scala | Scala | gpl-3.0 | 1,461 |
package io.muvr.notification
import akka.actor.{Actor, ActorLogging, Props}
import akka.routing.RoundRobinPool
/**
* The notification delivery actor. It can deliver the ``PushMessagePayload`` values to the given devices.
*/
object Notification {
val name = "notification"
val props = Props(classOf[Notification])... | boonhero/muvr-server | notification/src/main/scala/io/muvr/notification/Notification.scala | Scala | bsd-3-clause | 905 |
/***********************************************************************
* Copyright (c) 2017 IBM
* Copyright (c) 2013-2017 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 ... | nagavallia/geomesa | geomesa-cassandra/geomesa-cassandra-datastore/src/main/scala/org/locationtech/geomesa/cassandra/data/CassandraFeatureWriter.scala | Scala | apache-2.0 | 2,681 |
/*
* 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/test/scala/uk/gov/hmrc/ct/ct600/v3/B860Spec.scala | Scala | apache-2.0 | 2,187 |
/*
* Copyright (C) 2005, The Beangle Software.
*
* 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 version.
*
* This... | beangle/commons | text/src/test/scala/org/beangle/commons/text/seq/HanZiSeqStyleTest.scala | Scala | lgpl-3.0 | 1,179 |
package com.twitter.finagle.pool
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
import org.scalatest.mock.MockitoSugar
import org.mockito.Mockito.{times, verify, when}
import org.mockito.Matchers._
import com.twitter.finagle.{ClientConnection, Service, ServiceFacto... | travisbrown/finagle | finagle-core/src/test/scala/com/twitter/finagle/pool/BufferingPoolTest.scala | Scala | apache-2.0 | 3,131 |
package org.dsa.iot.ignition.spark
import com.ignition.frame.SparkRuntime
import org.dsa.iot.scala.Having
/**
* Sets or drops the ignition runtime variables.
*/
class SetVariables(implicit rt: SparkRuntime) extends RxFrameTransformer {
def vars(values: (String, Any)*): SetVariables = this having (vars <~ values)... | IOT-DSA/dslink-scala-ignition | src/main/scala/org/dsa/iot/ignition/spark/SetVariables.scala | Scala | apache-2.0 | 977 |
/**
* 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... | stealthly/kafka | core/src/main/scala/kafka/server/AbstractFetcherThread.scala | Scala | apache-2.0 | 10,630 |
package models.task
import com.scalableminds.util.accesscontext.{DBAccessContext, GlobalAccessContext}
import com.scalableminds.util.mvc.Formatter
import com.scalableminds.util.tools.{Fox, FoxImplicits}
import javax.inject.Inject
import models.annotation.{Annotation, AnnotationDAO, AnnotationType}
import models.binary... | scalableminds/webknossos | app/models/task/TaskService.scala | Scala | agpl-3.0 | 4,103 |
package fr.acinq.eclair.channel
import com.softwaremill.quicklens._
import fr.acinq.bitcoin.Crypto.PublicKey
import fr.acinq.bitcoin._
import fr.acinq.eclair._
import fr.acinq.eclair.blockchain.fee.FeeratePerKw
import fr.acinq.eclair.channel.Helpers.HashToPreimage
import fr.acinq.eclair.crypto.{Generators, ShaChain}
i... | btcontract/wallet | app/src/main/java/fr/acinq/eclair/channel/Commitments.scala | Scala | apache-2.0 | 23,056 |
/*
* 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 ... | kl0u/flink | flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/catalog/CatalogTableITCase.scala | Scala | apache-2.0 | 31,291 |
package com.shocktrade.server.services
import com.shocktrade.common.events.RemoteEvent
import com.shocktrade.server.common.LoggerFactory
import io.scalajs.nodejs.http.IncomingMessage
import io.scalajs.npm.moment.Moment
import io.scalajs.npm.request.{Request, RequestOptions}
import scala.scalajs.concurrent.JSExecution... | ldaniels528/shocktrade.js | app/server/services/src/main/scala/com/shocktrade/server/services/RemoteEventService.scala | Scala | apache-2.0 | 946 |
/* Copyright (C) 2008-2014 University of Massachusetts Amherst.
This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible)
http://factorie.cs.umass.edu, http://github.com/factorie
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with... | malcolmgreaves/factorie | src/main/scala/cc/factorie/package.scala | Scala | apache-2.0 | 4,191 |
package org.vaadin.addons.rinne
import org.scalatest.FunSpec
class VTextAreaSpec extends FunSpec {
describe("A VTextArea") {
describe("should allow to set") {
it("wordwrap") {
val field = new VTextArea
field.wordwrap = true
assert(field.wordwrap === true)
}
it("row... | LukaszByczynski/rinne | src/test/scala/org/vaadin/addons/rinne/VTextAreaSpec.scala | Scala | apache-2.0 | 440 |
package com.arcusys.learn.liferay.update.version270.certificate2705
import com.arcusys.learn.liferay.update.version270.certificate.CertificateTableComponent
import com.arcusys.valamis.model.PeriodTypes
import com.arcusys.valamis.persistence.common.DbNameUtils._
import com.arcusys.valamis.persistence.common.SlickProfil... | igor-borisov/valamis | learn-portlet/src/main/scala/com/arcusys/learn/liferay/update/version270/certificate2705/PackageGoalTableComponent.scala | Scala | gpl-3.0 | 1,410 |
/*
* Copyright © 2014 TU Berlin (emma@dima.tu-berlin.de)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | emmalanguage/emma | emma-spark/src/main/scala/org/emmalanguage/api/SparkDataset.scala | Scala | apache-2.0 | 7,219 |
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
*/
package play.core.server.ssl
import java.util.Properties
import org.specs2.matcher.MustThrownExpectations
import org.specs2.mutable.After
import org.specs2.mutable.Specification
import org.specs2.mock.Mockito
import org.specs2.specification.Scope
imp... | benmccann/playframework | transport/server/play-server/src/test/scala/play/core/server/ssl/ServerSSLEngineSpec.scala | Scala | apache-2.0 | 3,477 |
/*
* Copyright (c) 2014 Contributor. All rights reserved.
*/
package org.scalaide.debug.internal.expression
import java.io.File
import scala.reflect.internal.util.ScalaClassLoader.URLClassLoader
import scala.util.Failure
import scala.util.Try
import org.scalaide.debug.internal.ScalaDebugger
import org.scalaide.deb... | Kwestor/scala-ide | org.scala-ide.sdt.debug.expression/src/org/scalaide/debug/internal/expression/JdiExpressionEvaluator.scala | Scala | bsd-3-clause | 3,305 |
/**
* Tests for the scripts in the example/scripts directory
*/
package water.sparkling.scripts
import org.apache.spark.repl.CodeResults
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
@RunWith(classOf[JUnitRunner])
class BasicInterpreterTests extends ScriptsTestHelper{
override protect... | nilbody/sparkling-water | examples/src/scriptsTest/scala/water/sparkling/scripts/ScriptsTestSuite.scala | Scala | apache-2.0 | 6,101 |
/*
* (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/filter/FileFilterManager.scala | Scala | apache-2.0 | 1,415 |
package io.shaka.http
import java.net.{HttpURLConnection, URL}
import javax.net.ssl.HttpsURLConnection
import io.shaka.http.Headers.toHeaders
import io.shaka.http.Http._
import io.shaka.http.Https.{HttpsConfig, sslFactory, hostNameVerifier}
import io.shaka.http.IO.inputStreamToByteArray
import io.shaka.http.Status._
... | stacycurl/naive-http | src/main/scala/io/shaka/http/ClientHttpHandler.scala | Scala | apache-2.0 | 2,241 |
package com.twitter.finagle.netty3
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
import org.junit.runner.RunWith
import java.util.concurrent.Executors
import org.jboss.netty.bootstrap.{ServerBootstrap, ClientBootstrap}
import org.jboss.netty.channel._
import org.jboss.netty.channel.socket.nio.Ni... | JustinTulloss/finagle | finagle-core/src/test/scala/com/twitter/finagle/netty3/Netty3AssumptionsTest.scala | Scala | apache-2.0 | 2,058 |
package api
import play.api.i18n.Messages
import play.api.libs.json._
/*
* Error representation for an ApiRequest.
* Contains the Status Code, a message information and an optional JSON data with additional information.
*/
case class ApiError(code: Int, msg: String, info: Option[JsValue]) extends ApiResult {
val st... | ygpark2/play-ain-board | app/api/ApiError.scala | Scala | bsd-3-clause | 6,774 |
package examples
import io.gatling.core.Predef._
import io.gatling.http.Predef._
/**
* @author <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
*/
class SimpleExample1 extends Simulation {
// Create a scenario with three steps:
// - first perform an HTTP GET
// - then pause for 10 seconds
// ... | keycloak/keycloak | testsuite/performance/tests/src/test/scala/examples/SimpleExample1.scala | Scala | apache-2.0 | 708 |
/*
* 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 ... | cbickel/openwhisk | core/controller/src/main/scala/org/apache/openwhisk/core/controller/actions/PrimitiveActions.scala | Scala | apache-2.0 | 30,912 |
/*
* 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 ... | manishgupta88/incubator-carbondata | integration/spark-common-test/src/test/scala/org/apache/carbondata/spark/testsuite/iud/UpdateCarbonTableTestCaseWithBadRecord.scala | Scala | apache-2.0 | 2,970 |
/**
* Copyright (C) 2010 Orbeon, Inc.
*
* 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
* 2.1 of the License, or (at your option) any later version.
*
* This program i... | orbeon/orbeon-forms | xforms-runtime/jvm/src/main/scala/org/orbeon/oxf/xforms/function/Context.scala | Scala | lgpl-2.1 | 1,882 |
package com.arcusys.valamis.util.export
import java.io.FileInputStream
import com.arcusys.valamis.util.serialization.JsonHelper
import com.arcusys.valamis.util.{FileSystemUtil, ZipBuilder}
import org.json4s.{DefaultFormats, Formats}
trait ExportProcessor[T, R] {
protected def exportItemsImpl(zip: ZipBuilder, items... | arcusys/Valamis | valamis-util/src/main/scala/com/arcusys/valamis/util/export/ExportProcessor.scala | Scala | gpl-3.0 | 782 |
/*
Copyright 2014 Twitter, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distr... | oeddyo/scalding | scalding-hadoop-test/src/test/scala/com/twitter/scalding/platform/PlatformTest.scala | Scala | apache-2.0 | 5,146 |
/**
*
* Copyright (c) 2015-present, Total Location Test Paragraph.
* All rights reserved.
*
* This file is part of Where@. Where@ is free software:
* you can redistribute it and/or modify it under the terms of
* the GNU General Public License (GPL), either version 3
* of the License, or (at your option) any lat... | whereat/whereat-server | src/test/scala/io/whereat/support/SampleData.scala | Scala | gpl-3.0 | 6,358 |
package cz.kamenitxan.jakon.core.service
import java.sql.Connection
import cz.kamenitxan.jakon.core.database.DBHelper
import cz.kamenitxan.jakon.core.model.KeyValueEntity
/**
* Created by TPa on 2019-07-03.
*/
object KeyValueService {
def getByKey(name: String)(implicit conn: Connection): Option[KeyValueEntity... | kamenitxan/Jakon | modules/backend/src/main/scala/cz/kamenitxan/jakon/core/service/KeyValueService.scala | Scala | bsd-3-clause | 752 |
package rere.driver.workers
import java.util
import akka.Done
import akka.event.LoggingAdapter
import akka.stream._
import akka.stream.stage._
import io.circe.Json
import rere.driver.connection.LogicalConnectionProtocol
import rere.driver.connection.LogicalConnectionProtocol.{RawResponse, RenderedCommand}
import rere... | pbaun/rere | modules/driver/src/main/scala/rere/driver/workers/StreamQueryWorker.scala | Scala | apache-2.0 | 7,943 |
package sampler.abc
import com.fasterxml.uuid.{EthernetAddress, Generators}
import org.scalatest.FreeSpec
class UUIDTest extends FreeSpec {
"UUID should" - {
"Give UUID equality" in {
val instance = UUID.generate()
assert(instance === instance)
}
"Generate different UUID" in {
val i... | tearne/Sampler | sampler-abc/src/test/scala/sampler/abc/UUIDTest.scala | Scala | apache-2.0 | 1,254 |
package org.qbproject.schema.internal.json.serialization
import play.api.libs.json._
import play.api.libs.json.Reads._
import play.api.libs.functional.syntax._
import org.qbproject.schema._
trait JSONSchemaReads {
object UnReadable extends Reads[QBType] {
def reads(qb: JsValue) = JsError("unmatched.reader")
... | edgarmueller/qbproject | qbschema/src/main/scala/org/qbproject/schema/internal/json/serialization/JSONSchemaReads.scala | Scala | apache-2.0 | 3,691 |
package io.finch.petstore
import _root_.argonaut._
import _root_.argonaut.Argonaut._
import org.scalatest.prop.Checkers
import org.scalatest.{FlatSpec, Matchers}
/*
Tests for the Pet class
*/
class PetSpec extends FlatSpec with Matchers with Checkers {
"The Pet codec" should "correctly decode JSON to Pet" in {
... | peel/finch | petstore/src/test/scala/io/finch/petstore/PetSpec.scala | Scala | apache-2.0 | 592 |
/*
* ReplacesSpec.scala
*
* Copyright 2017 wayfarerx <x@wayfarerx.net> (@thewayfarerx)
*
* 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-... | wayfarerx/dreamsleeve | shared/data/src/test/scala/net/wayfarerx/dreamsleeve/data/patch_data/ReplacesSpec.scala | Scala | apache-2.0 | 1,308 |
/*
* Copyright 2021 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | hmrc/ct-calculations | src/main/scala/uk/gov/hmrc/ct/accounts/frs105/boxes/AC471.scala | Scala | apache-2.0 | 1,130 |
class RR {
class A {
def foo = 123
}
class B
object D {
implicit val s: B = new B
}
object K {
implicit def i2a(i: Int)(implicit b: B): A = new A
}
import D._
import K._
123.foo
}
/*
class RR {
class A {
def foo = 123
}
class B
object D {
implicit val s: B = new B
... | ilinum/intellij-scala | testdata/optimize/implicits/SCL6650.scala | Scala | apache-2.0 | 438 |
package com.karasiq.shadowcloud.javafx
import scalafx.application.Platform
import scala.concurrent.duration.Duration
import scala.concurrent.{Await, Promise}
private[javafx] object JFXUtils {
def getResourcePath(fileName: String): String = {
getClass.getClassLoader.getResource(fileName).toString
}
def run... | Karasiq/shadowcloud | javafx/src/main/scala/com/karasiq/shadowcloud/javafx/JFXUtils.scala | Scala | apache-2.0 | 544 |
package outer
export inner.Foo
export Foo.Bar
| dotty-staging/dotty | tests/neg/i12591/Outer.scala | Scala | apache-2.0 | 46 |
package org.openurp.edu.eams.teach.election.web.action.constraint
import java.util.Date
import org.apache.commons.lang3.ArrayUtils
import org.beangle.commons.collection.Collections
import org.beangle.commons.collection.Order
import org.beangle.commons.dao.Operation
import org.beangle.commons.dao.query.builder.Condi... | openurp/edu-eams-webapp | election/src/main/scala/org/openurp/edu/eams/teach/election/web/action/constraint/StdCreditConstraintAction.scala | Scala | gpl-3.0 | 18,174 |
/***********************************************************************
* Copyright (c) 2013-2020 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and... | aheyne/geomesa | geomesa-hbase/geomesa-hbase-datastore/src/main/scala/org/locationtech/geomesa/hbase/aggregators/HBaseStatsAggregator.scala | Scala | apache-2.0 | 1,525 |
package com.example
import java.awt.Color
import scalismo.io.MeshIO
import java.io.File
import scalismo.ui.api.ScalismoUI
object ExampleApp {
def main(args: Array[String]) {
// required to initialize native libraries (VTK, HDF5 ..)
scalismo.initialize()
// Your application code goes below here.... | unibas-gravis/activator-scalismo-seed | src/main/scala/com/example/ExampleApp.scala | Scala | apache-2.0 | 668 |
package core
import org.specs2.mutable.Specification
import java.util.UUID
/**
* Created by diegoram on 3/4/14.
*/
class BundleMemoryStorageTest extends Specification{
import services.memoryStorage.BundleMemoryRepository
def mkBundle = Bundle(UUID.randomUUID().toString, "description", 0)
sequential
"save... | DiegoRam/sprayPerformanceTest | src/test/scala/core/BundleMemoryStorageTest.scala | Scala | apache-2.0 | 630 |
package scala.of.coq.parsercombinators
import scala.of.coq.parsercombinators.parser.CoqTermParser
import scala.of.coq.parsercombinators.parser.Argument
import scala.of.coq.parsercombinators.parser.BetweenParenthesis
import scala.of.coq.parsercombinators.parser.Binders
import scala.of.coq.parsercombinators.parser.Const... | JBakouny/Scallina | src/test/scala/scala/of/coq/parsercombinators/ScalaOfCoqCurrifiedFileBasedTest.scala | Scala | gpl-3.0 | 4,157 |
object HKGADT {
sealed trait Foo[F[_]]
final case class Bar() extends Foo[List]
def frob[F[_]](foo: Foo[F]) =
foo match {
case Bar() => ()
}
}
| som-snytt/dotty | tests/pos/hkgadt.scala | Scala | apache-2.0 | 164 |
package controllers
import java.io._
import play.api._
import play.api.mvc._
import play.api.data.Form
import play.api.data.Forms._
import play.api.i18n.Messages
import play.mvc.Http.MultipartFormData
import play.mvc.Http.MultipartFormData._
import models.Command.Linux
import models.Destination
import models.File
im... | KasonChan/Interface | app/controllers/Submissions.scala | Scala | mit | 17,447 |
package controllers
import java.io.File
import java.net.URLDecoder
import java.util.UUID
import akka.actor._
import akka.pattern.ask
import akka.util.Timeout
import notebook.NBSerializer.Metadata
import notebook.io.Version
import notebook.server._
import notebook.{GenericFile, NotebookResource, Repository, _}
import ... | maasg/spark-notebook | app/controllers/Application.scala | Scala | apache-2.0 | 29,856 |
package org.scalaide.ui.internal.editor
import scala.concurrent.duration._
import scala.tools.refactoring.common.{ TextChange => RTextChange }
import scala.util.Failure
import scala.util.Left
import scala.util.Right
import scala.util.Success
import org.eclipse.core.runtime.IProgressMonitor
import org.eclipse.jdt.core... | scala-ide/scala-ide | org.scala-ide.sdt.core/src/org/scalaide/ui/internal/editor/SaveActionExtensions.scala | Scala | bsd-3-clause | 10,915 |
/*
* Copyright (C) 2009-2018 Lightbend Inc. <https://www.lightbend.com>
*/
package play.it.mvc
import java.util.concurrent.CompletionStage
import java.util.function.{ Function => JFunction }
import akka.stream.Materializer
import org.specs2.mutable.Specification
import play.api.http.{ DefaultHttpErrorHandler, Http... | Shenker93/playframework | framework/src/play-integration-test/src/test/scala/play/it/mvc/FiltersSpec.scala | Scala | apache-2.0 | 15,220 |
package com.typesafe.slick.testkit.tests
import org.junit.Assert._
import com.typesafe.slick.testkit.util.{TestkitTest, TestDB}
class InsertTest(val tdb: TestDB) extends TestkitTest {
import tdb.profile.simple._
override val reuseInstance = true
def testSimple {
class TestTable(name: String) extends Tabl... | boldradius/slick | slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/InsertTest.scala | Scala | bsd-2-clause | 2,344 |
/*
* ProblemTest.scala
* Test of SFI problems.
*
* Created By: Avi Pfeffer (apfeffer@cra.com)
* Creation Date: March 1, 2015
*
* Copyright 2015 Avrom J. Pfeffer and Charles River Analytics, Inc.
* See http://www.cra.com or email figaro@cra.com for information.
*
* See http://www.github.com/p2t2/figaro ... | agarbuno/figaro | Figaro/src/test/scala/com/cra/figaro/test/experimental/structured/ProblemTest.scala | Scala | bsd-3-clause | 3,434 |
object Test {
def main(args: Array[String]): Unit = {
def f = List(1,2,3).view
assert(f.toString == "SeqView(<not computed>)")
assert(f.mkString == "123")
}
}
| lampepfl/dotty | tests/run/t4297.scala | Scala | apache-2.0 | 175 |
package kartograffel.client
import kartograffel.client.component.TagComponent
import org.scalajs.dom.window
object Client {
def main(args: Array[String]): Unit = {
val _ = TagComponent().renderIntoDOM(window.document.getElementById("app"))
}
}
| fthomas/kartograffel | modules/client/js/src/main/scala/kartograffel/client/Client.scala | Scala | apache-2.0 | 254 |
package org.scalaide.ui.internal.preferences
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer
import org.scalaide.core.IScalaPlugin
import org.eclipse.swt.widgets.Composite
import org.eclipse.swt.widgets.Control
import org.scalaide.util.eclipse.SWTUtils
class ImplicitsPreferencePage extends B... | stephenh/scala-ide | org.scala-ide.sdt.core/src/org/scalaide/ui/internal/preferences/ImplicitsPreferencePage.scala | Scala | bsd-3-clause | 1,949 |
/* Title: Pure/General/symbol.scala
Author: Makarius
Detecting and recoding Isabelle symbols.
*/
package isabelle
import scala.collection.mutable
import scala.util.matching.Regex
import scala.annotation.tailrec
object Symbol
{
type Symbol = String
// counting Isabelle symbols, starting from 1
... | wneuper/libisabelle | pide/2014/src/main/scala/General/symbol.scala | Scala | mit | 16,373 |
/*
* Scala (https://www.scala-lang.org)
*
* Copyright EPFL and Lightbend, Inc.
*
* Licensed under Apache License 2.0
* (http://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
package scala
import java.lan... | martijnhoekstra/scala | src/library/scala/StringContext.scala | Scala | apache-2.0 | 15,178 |
package codeforces.round_282_div2
import java.io.InputStream
import java.io.PrintStream
import java.util.Scanner
object B_ModularEquations {
def main(args: Array[String]) {
parseSolveAndPrint(System.in, System.out)
}
def parseSolveAndPrint(in: InputStream, out: PrintStream): Unit = {
val scanner = new... | VitalyKalinkin/stdout_sites_scala | src/main/scala/codeforces/round_282_div2/B_ModularEquations.scala | Scala | bsd-2-clause | 874 |
package antonkulaga.projects.dynamics
import org.denigma.binding.extensions._
import org.denigma.binding.views.CollectionView
import rx.Rx
import rx.core.Var
import scala.scalajs.js
case class Dimensions(rows: Int, cols: Int, side: Double){
lazy val vertical = Math.sqrt(Math.pow(side, 2) - Math.pow(side / 2, 2))... | antonkulaga/personal | app/js/src/main/scala/antonkulaga/projects/dynamics/ArrayChart.scala | Scala | mpl-2.0 | 3,496 |
package lila.relation
import play.api.libs.json._
case class Related(
user: lila.user.User,
nbGames: Int,
followable: Boolean,
relation: Option[Relation]) {
def toJson(implicit userWrites: Writes[lila.user.User]) = Json.obj(
"user" -> user,
"nbGames" -> nbGames,
"followable" -> followab... | bjhaid/lila | modules/relation/src/main/Related.scala | Scala | mit | 354 |
/**
* 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... | TRnonodename/CM-Well | server/cmwell-util/src/test/scala/cmwell/util/streams/test/GlobalVarStateHandlerTests.scala | Scala | apache-2.0 | 28,174 |
package fish.philwants
import fish.philwants.modules.GitHubModule
import org.scalatest.{FlatSpec, Matchers}
import TestCredentials._
class VimeoModuleTest extends FlatSpec with Matchers {
"Vimeo module" should "detect a successful login" in {
val creds = Credentials(VIMEO_USERNAME, VIMEO_PASSWORD)
val mod =... | philwantsfish/shard | src/test/scala/fish/philwants/VimeoModuleTest.scala | Scala | mit | 552 |
package controllers.dataset
import controllers.AssetsBuilder
object Assets extends AssetsBuilder | delving/culture-hub | modules/dataset/app/controllers/dataset/Assets.scala | Scala | apache-2.0 | 98 |
/*
* StructuredBPTest.scala
* Test of structure belief propagation algorithm.
*
* Created By: Avi Pfeffer (apfeffer@cra.com)
* Creation Date: March 1, 2015
*
* Copyright 2015 Avrom J. Pfeffer and Charles River Analytics, Inc.
* See http://www.cra.com or email figaro@cra.com for information.
*
* See htt... | NunoEdgarGub1/figaro | Figaro/src/test/scala/com/cra/figaro/test/experimental/structured/strategy/StructuredBPTest.scala | Scala | bsd-3-clause | 6,523 |
package com.twitter.finatra.tests.utils
import com.twitter.finagle.httpx.{Response, Status, Version}
import com.twitter.finatra.utils.ResponseUtils
import com.twitter.inject.Test
class ResponseUtilsTest
extends Test {
val internalServerErrorResponse = Response(
Version.Http11,
Status.InternalServerEr... | deanh/finatra | utils/src/test/scala/com/twitter/finatra/tests/utils/ResponseUtilsTest.scala | Scala | apache-2.0 | 2,922 |
package org.scalawurfl.matching.trie
import org.specs2.mutable._
import org.specs2.specification.Scope
/**
*
* @author Filippo De Luca
*/
class TrieSpec extends Specification {
"Trie" should {
"create Trie" in {
val trie = EmptyTrie + ("TEST"->5)
trie.get("TEST") must beSome
}
"add ent... | filosganga/scala-wurfl | src/test/scala/org/scalawurfl/matching/trie/TrieSpec.scala | Scala | apache-2.0 | 2,571 |
import org.scalajs.sbtplugin.ScalaJSPlugin.AutoImport._
import sbt.Keys._
import sbt._
object LauncherConfigs {
/** ================ React_native task ================ */
val fastOptMobile = Def.taskKey[File]("Generate mobile output file for fastOptJS")
lazy val mobileLauncherFast =
Seq(
artifactP... | hamazy/sri | project/LauncherConfigs.scala | Scala | apache-2.0 | 4,461 |
package skinny.engine.request
import java.io.BufferedReader
import java.security.Principal
import java.util.Locale
import javax.servlet._
import javax.servlet.http._
import skinny.engine.{ UnstableAccessException, UnstableAccessValidation }
import scala.collection.JavaConverters._
import scala.collection.concurrent.T... | holycattle/skinny-framework | engine/src/main/scala/skinny/engine/request/StableHttpServletRequest.scala | Scala | mit | 12,446 |
package org.scaladebugger.api.dsl.threads
import org.scaladebugger.api.lowlevel.events.data.JDIEventDataResult
import org.scaladebugger.api.lowlevel.requests.JDIRequestArgument
import org.scaladebugger.api.pipelines.Pipeline
import org.scaladebugger.api.profiles.traits.info.events.ThreadStartEventInfo
import org.scala... | chipsenkbeil/scala-debugger | scala-debugger-api/src/test/scala/org/scaladebugger/api/dsl/threads/ThreadStartDSLWrapperSpec.scala | Scala | apache-2.0 | 3,071 |
package com.arcusys.learn.scorm.manifest.sequencing.storage.impl.liferay
import com.arcusys.learn.persistence.liferay.service.LFConditionRuleLocalService
import com.arcusys.learn.persistence.liferay.model.LFConditionRule
import com.arcusys.learn.storage.impl.liferay.MockEntityContainer
import scala.collection.JavaCon... | ViLPy/Valamis | learn-persistence-liferay-wrapper/src/test/scala/com/arcusys/learn/scorm/manifest/sequencing/storage/impl/liferay/ConditionRuleEntityContainer.scala | Scala | lgpl-3.0 | 2,395 |
/*
* Copyright 2014–2018 SlamData Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | slamdata/matryoshka | core/shared/src/main/scala/matryoshka/package.scala | Scala | apache-2.0 | 30,664 |
package com.deleris.tetrix
sealed trait AgentMessage
case class BestMoves(s: GameState, config: Config) extends AgentMessage | ldeleris/tetrix-scala | library/src/main/scala/AgentMessage.scala | Scala | mit | 125 |
package filodb.coordinator.queryplanner
import filodb.core.DatasetRef
/**
* A provider to get failure ranges. Query engine can use failure ranges while preparing physical
* plan to reroute or skip failure ranges. Ranges are based on dataset and over all clusters.
* Provider will filter failure ranges by current... | tuplejump/FiloDB | coordinator/src/main/scala/filodb.coordinator/queryplanner/FailureProvider.scala | Scala | apache-2.0 | 1,617 |
package org.apache.spark.streaming.kafka
/*
* 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... | memsql/streamliner-examples | kafka/src/main/scala/CheckpointedDirectKafkaInputDStream.scala | Scala | apache-2.0 | 3,467 |
package ${package}
import java.io.ByteArrayOutputStream
import better.files.File
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers
class ReadmeSpec extends AnyFlatSpec with Matchers with CustomMatchers {
private val configuration = Configuration(
version = "my-version",
... | DANS-KNAW/easy-module-archetype | src/main/resources/archetype-resources/src/test/scala/ReadmeSpec.scala | Scala | apache-2.0 | 1,351 |
/*
* Copyright 2014–2017 SlamData Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | drostron/quasar | marklogic/src/main/scala/quasar/physical/marklogic/xcc/Xcc.scala | Scala | apache-2.0 | 9,623 |
object FuncionImperativa{
def main(args: Array[String]): Unit = {
procesaArgs(args)
}
//imperativo porque mutamos unha variable
//e servimonos dela e indicamos instrucion a intruccion como facelo
def procesaArgs(args: Array[String]): Unit = {
var indice = 0
while(indice < args.length){
print... | jmlb23/scala | libro_odersky/scripts_CH3/funcional/funcionImperativa.scala | Scala | gpl-3.0 | 367 |
package org.scalawiki.bots
import org.rogach.scallop.ScallopConf
case class PageGenConfig(cat: Seq[String] = Seq.empty, //,
// catR: String,
// subCats: String,
// subCats... | intracer/scalawiki | scalawiki-bots/src/main/scala/org/scalawiki/bots/PageGenerators.scala | Scala | apache-2.0 | 3,563 |
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.