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.bot4s.telegram.methods
/**
* Type of action to broadcast.
*
* Choose one, depending on what the user is about to receive:
* typing for text messages,
* upload_photo for photos,
* record_video or upload_video for videos,
* record_audio or upload_audio for audio files,
* upload_document for... | mukel/telegrambot4s | core/src/com/bot4s/telegram/methods/ChatAction.scala | Scala | apache-2.0 | 661 |
package model
import play.api.libs.functional.syntax._
import play.api.libs.json.{JsPath, Json, Reads}
//Used to post data to K8055
case class DeviceState(id:String, digitalState:Option[Boolean]=None, analogueState:Option[Int]=None,
strobeOnTime:Option[Int]=None, strobeOffTime:Option[Int]=None)... | bullimog/k8055-sequencer | app/model/DeviceState.scala | Scala | apache-2.0 | 728 |
/*
* 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 ... | davidzchen/samza | samza-core/src/main/scala/org/apache/samza/coordinator/JobCoordinator.scala | Scala | apache-2.0 | 16,329 |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\\
* @ @ *
* # # # # (c) 2017 CAB *
* # # # # # # ... | AlexCAB/MathAct | mathact_tools/src/main/scala/mathact/tools/plots/ChartRecorder.scala | Scala | mit | 6,199 |
/*
* Copyright (c) <2013>, Amanj Sherwany <http://www.amanj.me>
* All rights reserved.
* */
package ch.usi.inf.l3.mina.store
import ch.usi.inf.l3.mina.eval._
import ch.usi.inf.l3.mina._
trait HPEEnvironmentWrapper {
self: HPE =>
import self.global._
// ---------------------- Environment -------------------... | amanjpro/mina | src/main/scala/ch/usi/inf/l3/mina/store/HPEEnvironmentWrapper.scala | Scala | bsd-3-clause | 7,290 |
/***********************************************************************
* 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-fs/geomesa-fs-datastore/src/test/scala/org/locationtech/geomesa/fs/converter/ConverterDataStoreTest.scala | Scala | apache-2.0 | 5,618 |
/*
* 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/index/CarbonIndexUtil.scala | Scala | apache-2.0 | 33,261 |
/***********************************************************************
* Copyright (c) 2013-2022 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... | locationtech/geomesa | geomesa-redis/geomesa-redis-tools/src/main/scala/org/locationtech/geomesa/redis/tools/schema/RedisGetSftConfigCommand.scala | Scala | apache-2.0 | 1,422 |
/**
* SparklineData, Inc. -- http://www.sparklinedata.com/
*
* Scala based Audience Behavior APIs
*
* Copyright 2014-2015 SparklineData, 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 Lice... | cubefyre/audience-behavior-semantic-etl | etl/src/test/scala/org/sparkline/geoip/GeoIpTest.scala | Scala | apache-2.0 | 976 |
/*
* 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
* distribute... | wvlet/airframe | airframe-http/.jvm/src/test/scala/wvlet/airframe/http/HttpServerExceptionTest.scala | Scala | apache-2.0 | 4,655 |
package example
import common._
object Lists {
/**
* This method computes the sum of all elements in the list xs. There are
* multiple techniques that can be used for implementing this method, and
* you will learn during the class.
*
* For this example assignment you can use the following methods in ... | ByzanTine/Coursera-Scala | example/src/main/scala/example/Lists.scala | Scala | mit | 1,705 |
/*
* Copyright 2015 PayPal
*
* 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 ... | keshin/squbs | squbs-pattern/src/test/scala/org/squbs/pattern/timeoutpolicy/MetricsSpec.scala | Scala | apache-2.0 | 2,346 |
package scife
package enumeration
package iterable
package lzy
package testcase
import scife.{ enumeration => e }
import e.iterable._
import e.dependent._
import scife.util.logging._
import scife.util._
import org.scalatest._
import org.scalatest.prop._
import org.scalacheck.Gen
import scala.language.postfixOps
im... | kaptoxic/SciFe | src/test/scala/scife/enumeration/iterable/lzy/testcase/SortedListTest.scala | Scala | gpl-2.0 | 8,166 |
package net.pierreandrews
import org.joda.time.DateTime
import org.scalatest._
/**
* Basic test for the parser, uses the examples from the instructions
*
* User: pierre
* Date: 11/28/14
*/
class ParserTest extends FunSuite with Matchers {
//very basic unit test based on example.
test("parse line") {
val... | Mortimerp9/LogSplit | src/test/scala/net/pierreandrews/ParserTest.scala | Scala | gpl-3.0 | 1,554 |
/*
* Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com>
*/
package com.lightbend.lagom.internal.javadsl.broker.kafka
import java.net.URI
import java.util.concurrent.CompletionStage
import java.util.concurrent.atomic.AtomicInteger
import akka.Done
import akka.actor.ActorSystem
import akka.kafka.Cons... | rcavalcanti/lagom | service/javadsl/kafka/client/src/main/scala/com/lightbend/lagom/internal/javadsl/broker/kafka/JavadslKafkaSubscriber.scala | Scala | apache-2.0 | 7,889 |
import leon.lang._
import leon.lang.synthesis._
object ChurchNumerals {
sealed abstract class Num
case object Z extends Num
case class S(pred: Num) extends Num
def value(n:Num) : Int = {
n match {
case Z => 0
case S(p) => 1 + value(p)
}
} ensuring (_ >= 0)
// def add(x : Num, y : Num... | ericpony/scala-examples | testcases/synthesis/oopsla2013/Church/Add.scala | Scala | mit | 556 |
package is.hail.expr.ir
import is.hail.TestUtils._
import is.hail.types.virtual._
import is.hail.utils._
import is.hail.{ExecStrategy, HailSuite}
import org.apache.spark.sql.Row
import org.testng.annotations.Test
class IntervalSuite extends HailSuite {
implicit val execStrats = ExecStrategy.javaOnly
val tpoint1... | danking/hail | hail/src/test/scala/is/hail/expr/ir/IntervalSuite.scala | Scala | mit | 6,934 |
/*
* Copyright 2015 Matteo Ceccarello
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | Cecca/graphx-diameter | src/test/scala/it/unipd/dei/graphx/diameter/util/DatasetFetcher.scala | Scala | apache-2.0 | 4,495 |
/**
* 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... | martinluther/orbeon-forms | src/main/scala/org/orbeon/oxf/xforms/control/XFormsContainerControl.scala | Scala | lgpl-2.1 | 3,388 |
package org.jetbrains.plugins.scala
package editor.smartEnter.fixers
import com.intellij.openapi.editor.{Document, Editor}
import com.intellij.psi._
import com.intellij.psi.util.PsiTreeUtil
import org.jetbrains.plugins.scala.editor.smartEnter.ScalaSmartEnterProcessor
import org.jetbrains.plugins.scala.lang.psi.api.exp... | triggerNZ/intellij-scala | src/org/jetbrains/plugins/scala/editor/smartEnter/fixers/ScalaWhileConditionFixer.scala | Scala | apache-2.0 | 1,758 |
package com.eevolution.context.dictionary.infrastructure.repository
import com.eevolution.context.dictionary.domain.model.TaskInstance
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/TaskInstanceMapping.scala | Scala | gpl-3.0 | 1,624 |
package org.glotaran.kernel.analysisworker
import akka.actor.{PoisonPill, ActorRef, Props, Actor}
import org.glotaran.core.analysis.GlotaranAnalysis
import org.glotaran.kernel.types.messages.supervisor.WorkerDone
import org.glotaran.kernel.types.messages.worker.DoAnalysis
class AnalysisWorker() extends Actor {
ove... | glotaran/glotaran-kernel | glotaran-kernel-analysisworker/src/main/scala/org/glotaran/kernel/analysisworker/AnalysisWorker.scala | Scala | gpl-3.0 | 726 |
/*============================================================================
This Chisel source file is part of a pre-release version of the HardFloat IEEE
Floating-Point Arithmetic Package, by John R. Hauser (with some contributions
from Yunsup Lee and Andrew Waterman, mainly concerning testing).
Copyright 2010, ... | stanford-ppl/spatial-lang | spatial/core/resources/chiselgen/template-level/templates/hardfloat/primitives.scala | Scala | mit | 5,139 |
package blended.security.ssl.internal
import java.io.File
import java.security.cert.X509Certificate
import java.util.UUID
import blended.security.ssl.internal.SslContextProvider.{propTrustStore, propTrustStorePwd}
import blended.security.ssl.{CertificateHolder, MemoryKeystore}
import blended.util.logging.Logger
impor... | woq-blended/blended | blended.security.ssl/src/main/scala/blended/security/ssl/internal/TrustStoreRefresher.scala | Scala | apache-2.0 | 2,088 |
package uk.co.pollett.flink.newsreader.nlp.features
import org.scalatest.FlatSpec
class PlaceFinderSpec extends FlatSpec {
val placeFinder = new PlaceFinder
val listWithPlace = List("this","is","text","about","New","Orleans")
"A list with a place" should "return the place" in {
assert(placeFinder.parse(li... | pollett/flink-newsreader | src/test/scala/uk/co/pollett/flink/newsreader/nlp/features/PlaceFinderSpec.scala | Scala | mit | 364 |
package im.mange.driveby.pool
import im.mange.common.Wait._
import im.mange.driveby.tracking._
import im.mange.driveby.{DriveByConfig, Example}
import scala.actors.threadpool.{LinkedBlockingQueue, TimeUnit}
import scala.collection.mutable.ListBuffer
import scala.concurrent.Future
//TODO: remove disgrace
//TODO: supp... | alltonp/driveby | src/main/scala/im/mange/driveby/pool/ApplicationPool.scala | Scala | apache-2.0 | 3,342 |
/**
* Copyright (C) 2007 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 prog... | orbeon/orbeon-forms | src/test/scala/org/orbeon/oxf/util/DynamicVariableTest.scala | Scala | lgpl-2.1 | 1,241 |
/*
* Copyright 2013 Filippo De Luca - http://filippodeluca.com
*
* 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 yo... | filosganga/play-cassandra | src/main/scala/com/github/filosganga/play/cassandra/Cassandra.scala | Scala | apache-2.0 | 2,984 |
/*
* 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 ... | bwsw/sj-platform | tests/pipeline/sj-output-jdbc-test/src/main/scala/com/bwsw/sj/test/module/output/jdbc/Data.scala | Scala | apache-2.0 | 1,135 |
package com.wavesplatform.lang.v1.compiler
import cats.syntax.semigroup._
import com.wavesplatform.common.utils.EitherExt2
import com.wavesplatform.lang.Global
import com.wavesplatform.lang.contract.DApp
import com.wavesplatform.lang.directives.DirectiveSet
import com.wavesplatform.lang.directives.values.{Account, Ass... | wavesplatform/Waves | lang/testkit/src/main/scala/com/wavesplatform/lang/v1/compiler/TestCompiler.scala | Scala | mit | 2,739 |
package one.lockstep.monolock.client.pipeline
import java.security.cert.X509Certificate
import one.lockstep.lock.client.transport.TransportProvider
import one.lockstep.monolock.protocol._
import one.lockstep.util._
import one.lockstep.util.codec._
import one.lockstep.util.crypto.Ciphersuite
import one.lockstep.util.in... | lockstep-one/vault | vault-client/src/main/scala/one/lockstep/monolock/client/pipeline/TransportMessagePipeline.scala | Scala | agpl-3.0 | 2,408 |
package controllers.priv
import com.google.inject.Inject
import controllers.SurveyUrl
import uk.gov.dvla.vehicles.presentation.common.clientsidesession.ClientSideSessionFactory
import uk.gov.dvla.vehicles.presentation.common.services.DateService
import uk.gov.dvla.vehicles.presentation.common.webserviceclients.brutefo... | dvla/vehicles-online | app/controllers/priv/VehicleLookup.scala | Scala | mit | 2,175 |
/*
* Copyright 2015 Heiko Seeberger
*
* 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... | lomigmegard/akka-http-json | akka-http-jackson/src/main/scala/de/heikoseeberger/akkahttpjackson/JacksonSupport.scala | Scala | apache-2.0 | 3,090 |
trait Unapply[TC[_[_]], MA] extends Serializable {
type M[_]
type A
}
object Unapply {
type Aux1[TC[_[_]], MA, F[_], AA] = Unapply[TC, MA] {
type M[X] = F[X]
type A = AA
}
implicit def unapply1[TC[_[_]], F[_], AA](implicit tc: TC[F]): Unit = {
/*caret*/
val a: Aux1[TC,F[AA],F,AA] = new Unapp... | JetBrains/intellij-scala | scala/scala-impl/testdata/typeConformance/bug/SCL10237_Renamed.scala | Scala | apache-2.0 | 394 |
package slick.benchmark
import slick.ast._
import slick.jdbc._
import slick.relational._
import com.typesafe.slick.testkit.util.DelegateResultSet
import slick.util.TreePrinter
@deprecated("Using deprecated .simple API", "3.0")
object UnboxedBenchmark extends App {
val driver = slick.driver.H2Driver
import driver... | jkutner/slick | slick-testkit/src/test/scala/slick/benchmark/UnboxedBenchmark.scala | Scala | bsd-2-clause | 2,931 |
package org.bitcoins.crypto
import org.bitcoins.crypto.facade.Buffer
import scodec.bits.ByteVector
import scala.scalajs.js
import scala.scalajs.js.typedarray.AB2TA
object CryptoJsUtil {
def toByteVector(buffer: Buffer): ByteVector =
toByteVector(buffer, buffer.length)
def toByteVector(buffer: Buffer, len: ... | bitcoin-s/bitcoin-s | crypto/.js/src/main/scala/org/bitcoins/crypto/CryptoJsUtil.scala | Scala | mit | 1,107 |
/*
* 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 ... | mkolod/incubator-spark | core/src/main/scala/org/apache/spark/storage/StorageUtils.scala | Scala | apache-2.0 | 4,517 |
/*
* 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 ... | snithish/spark-testing-base | src/main/1.3/scala/com/holdenkarau/spark/testing/StreamingActionBase.scala | Scala | apache-2.0 | 4,326 |
package net.tomasherman.specus.common.api.plugin.definitions
import util.parsing.combinator.syntactical.StandardTokenParsers
/**
* 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 Soft... | tomasherman/specus | common_api/src/main/scala/plugin/definitions/MajorMinorBuildVersionPluginParser.scala | Scala | gpl-3.0 | 1,509 |
/*******************************************************************************
Copyright (c) 2013-2014, KAIST.
All rights reserved.
Use is subject to license terms.
This distribution may include materials developed by third parties.
******************************************************************... | darkrsw/safe | src/main/scala/kr/ac/kaist/jsaf/compiler/module/ModEnvWalker.scala | Scala | bsd-3-clause | 4,520 |
/*
* 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 ... | nchammas/spark | sql/core/src/test/scala/org/apache/spark/sql/execution/SQLViewSuite.scala | Scala | apache-2.0 | 35,915 |
/*
*************************************************************************************
* Copyright 2011 Normation SAS
*************************************************************************************
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero Ge... | Kegeruneku/rudder | rudder-core/src/main/scala/com/normation/rudder/domain/eventlog/NodeEventLog.scala | Scala | agpl-3.0 | 3,437 |
import community._
import dima._
/**
GreenTea Language
Copyright 2013 Sylvain Ductor
* */
/**
This file is part of GreenTeaObject.
GreenTeaObject is isFreed software: you can redistribute it and/or modify
it under the terms of the Lesser GNU General Public License as published by
the Free Software Foundation, eithe... | sductor/GreenTea | src/__applications/package.scala | Scala | gpl-3.0 | 1,273 |
package monocle.focus
import monocle.{Focus, Iso}
final class FocusWithDefaultTest extends munit.FunSuite {
test("Access `withDefault` directly on argument") {
val iso: Iso[Option[Int], Int] = Focus[Option[Int]](_.withDefault(555))
assertEquals(iso.get(Some(3)), 3)
assertEquals(iso.get(None), 555)
}
... | julien-truffaut/Monocle | core/shared/src/test/scala-3.x/monocle/focus/FocusWithDefaultTest.scala | Scala | mit | 2,160 |
import _root_.io.gatling.core.scenario.Simulation
import ch.qos.logback.classic.{Level, LoggerContext}
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import org.slf4j.LoggerFactory
import scala.concurrent.duration._
/**
* Performance test for the DragAndDropMapping entity.
*/
class DragAndDropMappi... | ls1intum/ArTEMiS | src/test/gatling/user-files/simulations/DragAndDropMappingGatlingTest.scala | Scala | mit | 3,710 |
package slamdata.engine
import slamdata.engine.fs._
import slamdata.engine.analysis.fixplate._
import scalaz._
import Scalaz._
object MRA {
// foo[*].bar + foo[*].baz
// foo.bar[*] + foo.baz[*]
// foo[*] + baz[*]
//
import LogicalPlan._
final case class Dims private (contracts: List[DimContract], id:... | mossprescott/slamengine | src/main/scala/slamdata/engine/mra.scala | Scala | agpl-3.0 | 7,550 |
/*
* 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 ... | darionyaphet/spark | sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala | Scala | apache-2.0 | 13,692 |
/*
* Copyright 2014 YMC. See LICENSE for details.
*/
package models.hbase092
import scala.collection.JavaConverters._
import models.hbase.{HBase, RegionServer}
import org.apache.hadoop.hbase.HBaseConfiguration
class HBase092 extends HBase {
override def eachRegionServer[T](func: RegionServer => T) = {
withAd... | Connexity/hannibal | hbase/0.92/scala/models/hbase092/HBase092.scala | Scala | apache-2.0 | 604 |
/**
* Copyright 2009 Google 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... | SeaUrchinBot/noop | core/src/main/scala/noop/types/NoopObject.scala | Scala | apache-2.0 | 1,297 |
/*
* Copyright 2010 LinkedIn
*
* 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... | jinfei21/kafka | test/unit/kafka/consumer/ZookeeperConsumerConnectorTest.scala | Scala | apache-2.0 | 6,152 |
package com.github.gtache.lsp.editor.listeners
import com.github.gtache.lsp.requests.FileEventManager
import com.intellij.openapi.vfs._
/**
* Object listening to file system changes
*/
object VFSListener extends VirtualFileListener {
/**
* Fired when a virtual file is renamed from within IDEA, or its writab... | gtache/intellij-lsp | intellij-lsp/src/com/github/gtache/lsp/editor/listeners/VFSListener.scala | Scala | apache-2.0 | 3,122 |
package com.minalien.mffs.proxy
/**
* Functionality executed only client-side.
*/
class ClientProxy extends CommonProxy {
}
| Vexatos/MFFS | src/main/scala/com/minalien/mffs/proxy/ClientProxy.scala | Scala | gpl-3.0 | 127 |
package com.rasterfoundry.database
import com.rasterfoundry.database.Implicits._
import com.rasterfoundry.datamodel.{
ToolRun,
User,
ObjectType,
GroupType,
ActionType,
ToolRunWithRelated,
PaginatedResponse
}
import com.rasterfoundry.common.ast.codec.MapAlgebraCodec._
import com.rasterfoundry.common.ast._... | azavea/raster-foundry | app-backend/db/src/main/scala/ToolRunDao.scala | Scala | apache-2.0 | 7,055 |
/*
* 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/computations/CP25.scala | Scala | apache-2.0 | 909 |
/*
* 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 ... | jeremiaswerner/openwhisk | tests/src/test/scala/org/apache/openwhisk/core/database/cosmosdb/CosmosDBArtifactStoreTests.scala | Scala | apache-2.0 | 6,654 |
package chrome.runtime
import scala.scalajs.js
trait MessageSender extends js.Object {
/*
* The tabs.Tab which opened the connection, if any. This property will
* only be present when the connection was opened from a tab (including
* content scripts), and only if the receiver is an extension, not an app.
... | erdavila/auto-steamgifts | src/main/scala/chrome/runtime/MessageSender.scala | Scala | mit | 1,028 |
// Copyright (C) 2019 MapRoulette contributors (see CONTRIBUTORS.md).
// Licensed under the Apache License, Version 2.0 (see LICENSE).
package org.maproulette.models.dal
import java.sql.Connection
import anorm.SqlParser._
import anorm._
import javax.inject.{Inject, Provider, Singleton}
import org.maproulette.Config
i... | Crashfreak/maproulette2 | app/org/maproulette/models/dal/TagDAL.scala | Scala | apache-2.0 | 10,203 |
// Copyright 2011 Foursquare Labs Inc. All Rights Reserved.
package reactiverogue.core
import reactivemongo.api.commands.WriteConcern
import reactivemongo.bson._
case class Degrees(value: Double)
case class Radians(value: Double)
case class LatLong(lat: Double, long: Double)
object QueryHelpers {
// class DBObje... | whisklabs/reactiverogue | reactiverogue-core/src/main/scala/reactiverogue/core/QueryHelpers.scala | Scala | apache-2.0 | 5,183 |
package org.sisioh.aws4s.cfn.model
import com.amazonaws.services.cloudformation.model.TemplateParameter
import org.sisioh.aws4s.PimpedType
object TemplateParameterFactory {
def create(): TemplateParameter = new TemplateParameter()
}
class RichTemplateParameter(val underlying: TemplateParameter)
extends AnyVa... | everpeace/aws4s | aws4s-cfn/src/main/scala/org/sisioh/aws4s/cfn/model/RichTemplateParameter.scala | Scala | mit | 1,607 |
/*
* Scala.js (https://www.scala-js.org/)
*
* Copyright EPFL.
*
* Licensed under Apache License 2.0
* (https://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
package org.scalajs.nscplugin
import scala.to... | scala-js/scala-js | compiler/src/main/scala/org/scalajs/nscplugin/JSDefinitions.scala | Scala | apache-2.0 | 9,153 |
package io.reactors
package concurrent
import akka.actor._
import java.util.concurrent.ForkJoinPool
import java.util.concurrent.atomic._
import org.scalameter.api._
import org.scalameter.japi.JBench
import scala.collection._
import scala.concurrent.Await
import scala.concurrent.Promise
import scala.concurrent.durati... | reactors-io/reactors | reactors-core/jvm/src/bench/scala/io/reactors/concurrent/ping-pong-bench.scala | Scala | bsd-3-clause | 3,046 |
/**
* 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 ap... | luismcl/crossdata | core/src/main/scala/org/apache/spark/sql/crossdata/execution/datasources/ddl.scala | Scala | apache-2.0 | 5,970 |
package com.scalaAsm.x86
package Instructions
package General
// Description: Conditional Move - not below/above or equal/not carry (CF=0)
// Category: general/datamov
trait CMOVAE extends InstructionDefinition {
val mnemonic = "CMOVAE"
}
object CMOVAE extends TwoOperands[CMOVAE] with CMOVAEImpl
trait CMOVAEImpl ... | bdwashbu/scala-x86-inst | src/main/scala/com/scalaAsm/x86/Instructions/General/CMOVAE.scala | Scala | apache-2.0 | 757 |
/*
Copyright 2011 Andrew Fowler <andrew.fowler@devframe.com>
This file is part of Terinology2ODM Terminology2ODMConverter.
Terminology2ODMConverter 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 v... | rwynne/ops-data-conversion | ODM_Converter/src/model/Reference.scala | Scala | bsd-3-clause | 1,096 |
package chrome.management.bindings
import scala.scalajs.js
@js.native
trait IconInfo extends js.Object {
val size: Int = js.native
val url: String = js.native
}
| lucidd/scala-js-chrome | bindings/src/main/scala/chrome/management/bindings/IconInfo.scala | Scala | mit | 169 |
/*
* 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... | diegohurtado/sparta | serving-api/src/main/scala/com/stratio/sparta/serving/api/actor/ControllerActor.scala | Scala | apache-2.0 | 6,699 |
package org.jetbrains.plugins.scala.debugger.evaluation.util
import com.intellij.debugger.engine.{DebugProcess, DebugProcessImpl, JVMName, JVMNameUtil}
import com.intellij.debugger.jdi.VirtualMachineProxyImpl
import com.intellij.debugger.{DebuggerBundle, NoDataException, SourcePosition}
import com.intellij.lang.ASTNod... | katejim/intellij-scala | src/org/jetbrains/plugins/scala/debugger/evaluation/util/DebuggerUtil.scala | Scala | apache-2.0 | 22,512 |
package edu.gemini.model.p1.dtree.inst
import edu.gemini.model.p1.immutable._
/**
*
*/
trait AltairNode {
val allGuideStarTypes: Boolean
val title = "Adaptive Optics"
val description = "Please select an adaptive optics option."
def choices = if (allGuideStarTypes) {
List(AltairNone, AltairL... | arturog8m/ocs | bundle/edu.gemini.model.p1/src/main/scala/edu/gemini/model/p1/dtree/inst/AltairNode.scala | Scala | bsd-3-clause | 630 |
package com.sk.app.proxmock.testutils
import org.scalatest.{BeforeAndAfterAll, Suite}
import org.springframework.core.annotation.{AnnotatedElementUtils, AnnotationAttributes}
import org.springframework.test.annotation.DirtiesContext
import org.springframework.test.context.support.DirtiesContextTestExecutionListener
im... | szymonkudzia/proxmock | sources/src/test/scala/com/sk/app/proxmock/testutils/SpringContext.scala | Scala | mit | 2,353 |
package io.hydrosphere.mist.master.execution.workers
import akka.testkit.TestProbe
import io.hydrosphere.mist.master.ActorSpec
import io.hydrosphere.mist.master.execution.workers.WorkerConnector.ActorBasedWorkerConnector
import scala.concurrent.Promise
class WorkerConnectorSpec extends ActorSpec("actor-based-connect... | Hydrospheredata/mist | mist/master/src/test/scala/io/hydrosphere/mist/master/execution/workers/WorkerConnectorSpec.scala | Scala | apache-2.0 | 749 |
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs
// License: http://www.gnu.org/licenses/lgpl-3.0.en.html
package org.ensime.sexp
class SexpPrettyPrinterSpec extends SexpSpec {
private val foo = SexpString("foo")
private val foosym = SexpSymbol("foo")
private val barsym = SexpSymbol("... | VC1995/ensime-server | s-express/src/test/scala/org/ensime/sexp/SexpPrettyPrinterSpec.scala | Scala | gpl-3.0 | 1,574 |
package io.buoyant.config.types
import com.fasterxml.jackson.core.{JsonGenerator, JsonParser}
import com.fasterxml.jackson.databind.{SerializerProvider, DeserializationContext}
import com.google.common.net.InetAddresses
import io.buoyant.config.{ConfigSerializer, ConfigDeserializer}
import java.net.InetAddress
class ... | denverwilliams/linkerd | config/src/main/scala/io/buoyant/config/types/InetAddressDeserializer.scala | Scala | apache-2.0 | 797 |
/*
* 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 ... | wwjiang007/flink | flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/plan/utils/RexDefaultVisitor.scala | Scala | apache-2.0 | 2,189 |
package sampleclean.clean
import org.apache.spark.{SparkContext, SparkConf}
import sampleclean.api.SampleCleanContext
import sys.process._
trait RemoteSCContext extends Serializable {
def withSampleCleanContext[T](f: SampleCleanContext => T): T = {
val master = ("cat /root/ephemeral-hdfs/conf/masters" !!).trim... | sjyk/sampleclean-async | src/test/scala/sampleclean/clean/RemoteSCContext.scala | Scala | apache-2.0 | 1,653 |
package fr.laas.fape.anml.model.concrete
import fr.laas.fape.anml.model.ParameterizedStateVariable
import fr.laas.fape.anml.pending.IntExpression
abstract class Constraint extends VariableUser
abstract class TemporalConstraint extends Constraint {
def src : TPRef
def dst : TPRef
}
case class MinDelayConstraint... | athy/fape | anml-parser/src/main/scala/fr/laas/fape/anml/model/concrete/constraints.scala | Scala | bsd-2-clause | 2,234 |
/*
* Copyright 2015 The SIRIS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | simulator-x/vrpn-io | src/simx/components/vrpn/avatar/BodyPart.scala | Scala | apache-2.0 | 3,319 |
/*
* Scala.js (https://www.scala-js.org/)
*
* Copyright EPFL.
*
* Licensed under Apache License 2.0
* (https://www.apache.org/licenses/LICENSE-2.0).
*
* See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*/
package org.scalajs.sbtplugin
import sbt._
i... | nicolasstucki/scala-js | sbt-plugin/src/main/scala/org/scalajs/sbtplugin/ScalaJSCrossVersion.scala | Scala | apache-2.0 | 1,131 |
package net.spals.appbuilder.mapstore.dynamodb
import com.amazonaws.services.dynamodbv2.AmazonDynamoDB
import com.amazonaws.services.dynamodbv2.model.ScalarAttributeType
import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.Matchers.is
import org.mockito.Mockito.mock
import org.testng.annotations.{DataProvi... | timkral/appbuilder | mapstore-dynamodb-test/src/test/scala/net/spals/appbuilder/mapstore/dynamodb/DynamoDBMapStorePluginTest.scala | Scala | bsd-3-clause | 2,054 |
package com.codacy.client.bitbucket.v1
import org.scalatest.{Matchers, _}
import play.api.libs.json.Json
class BuildStatusSpecs extends FlatSpec with Matchers {
"BuildStatusSpecs" should "successfully parse BuildStatus" in {
val input =
"""
|{
| "key": "bt28",
| "description": "... | rtfpessoa/bitbucket-scala-client | src/test/scala/com/codacy/client/bitbucket/v1/BuildStatusSpecs.scala | Scala | apache-2.0 | 2,338 |
package gust.factor
import breeze.linalg._
import gust.linalg.cuda.CuMatrix
import breeze.numerics.abs
import jcuda.jcublas.cublasHandle
import breeze.stats.distributions.Rand
/**
* TODO
*
* @author dlwh
**/
object NMF {
def euclidean(X: CuMatrix[Float], dims: Int, iters: Int = 200, eps: Float = 1E-6f)(implici... | dlwh/gust | src/main/scala/gust/factor/NMF.scala | Scala | apache-2.0 | 2,055 |
/*
* Copyright (C) Lightbend Inc. <https://www.lightbend.com>
*/
package docs.home.scaladsl.persistence
import java.time.Instant
import akka.actor.typed.ActorRef
import akka.actor.typed.Behavior
import akka.cluster.sharding.typed.scaladsl._
import akka.persistence.typed.PersistenceId
import akka.persistence.typed.... | lagom/lagom | docs/manual/scala/guide/cluster/code/docs/home/scaladsl/persistence/ShoppingCart.scala | Scala | apache-2.0 | 10,179 |
/*
* ____ ____ _____ ____ ___ ____
* | _ \\ | _ \\ | ____| / ___| / _/ / ___| Precog (R)
* | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data
* | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, In... | precog/platform | ragnarok/src/main/scala/com/precog/ragnarok/test/SitaTestSuite.scala | Scala | agpl-3.0 | 1,886 |
package com.uebercomputing.io
import java.io.FileFilter
import java.io.File
/**
* Only accept files with extensions that are not in excludeExtensions or directories.
*/
class OtherExtensionFilter(excludeExtensions: String*) extends FileFilter {
def accept(path: File): Boolean = {
val result = if (path.isDire... | medale/extension-sorter | src/main/scala/com/uebercomputing/io/OtherExtensionFilter.scala | Scala | apache-2.0 | 509 |
/*
* 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 ... | practice-vishnoi/dev-spark-1 | core/src/test/scala/org/apache/spark/io/CompressionCodecSuite.scala | Scala | apache-2.0 | 4,806 |
package lila.study
import akka.stream.scaladsl._
import akka.util.ByteString
import play.api.libs.json._
import play.api.libs.ws.JsonBodyWritables._
import play.api.libs.ws.StandaloneWSClient
import lila.base.LilaInvalid
final class GifExport(
ws: StandaloneWSClient,
url: String
)(implicit ec: scala.concurre... | luanlv/lila | modules/study/src/main/GifExport.scala | Scala | mit | 1,942 |
package io.udash.web.guide.views.rpc.demos
import io.udash._
import io.udash.bootstrap._
import io.udash.bootstrap.button.UdashButton
import io.udash.bootstrap.form.UdashInputGroup
import io.udash.web.commons.views.Component
import io.udash.web.guide.Context
import io.udash.web.guide.styles.partials.GuideStyles
import... | UdashFramework/udash-core | guide/guide/.js/src/main/scala/io/udash/web/guide/views/rpc/demos/ClientIdDemoComponent.scala | Scala | apache-2.0 | 1,852 |
package structural
import javax.crypto.{Cipher, KeyGenerator}
/**
* The decorator pattern is used to extend functionality of some object, without affecting other instances of the same class.
* Decorators provide a flexible alternative to sub-classing.
*
* To achieve this goal, Scala provides a direct way of overr... | LeonDaniel/DesignPatterns | ScalaPatterns/src/main/scala/structural/Decorator.scala | Scala | lgpl-3.0 | 1,695 |
/**
* Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0
* See accompanying LICENSE file.
*/
package models.navigation
import features.{KMTopicManagerFeature, KMClusterManagerFeature, ApplicationFeatures}
import kafka.manager.features.{KMLogKafkaFeature, ClusterFeatures}
/**
* @author hiral... | stealthly/kafka-manager | app/models/navigation/Menus.scala | Scala | apache-2.0 | 3,899 |
package reactivemongo.bson
import scala.util.{ Failure, Success, Try }
import reactivemongo.bson.buffer.{ DefaultBufferHandler, ReadableBuffer }
sealed trait BSONIterator extends Iterator[(String, BSONValue)] {
val buffer: ReadableBuffer
val startIndex = buffer.index
val documentSize = buffer.readInt
@Supp... | ornicar/ReactiveMongo | bson/src/main/scala/BSONIterator.scala | Scala | apache-2.0 | 2,631 |
/*
* 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 | connector/src/main/scala/quasar/qscript/analysis/Outline.scala | Scala | apache-2.0 | 10,113 |
/*
* Copyright 2011-2022 GatlingCorp (https://gatling.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | gatling/gatling | gatling-http/src/main/scala/io/gatling/http/engine/response/ResponseProcessor.scala | Scala | apache-2.0 | 6,508 |
package com.github.mnogu.gatling.kafka.action
import com.github.mnogu.gatling.kafka.protocol.{KafkaComponents, KafkaProtocol}
import com.github.mnogu.gatling.kafka.request.builder.KafkaAttributes
import io.gatling.core.action.Action
import io.gatling.core.action.builder.ActionBuilder
import io.gatling.core.structure.S... | mnogu/gatling-kafka | src/main/scala/com/github/mnogu/gatling/kafka/action/KafkaRequestActionBuilder.scala | Scala | apache-2.0 | 1,125 |
package com.mesosphere.universe
import com.mesosphere.universe
import com.mesosphere.cosmos.circe.Decoders._
import io.circe.JsonObject
import io.circe.Decoder
import io.circe.Encoder
import io.circe.HCursor
import io.circe.DecodingFailure
import io.circe.generic.semiauto.deriveDecoder
import io.circe.generic.semiauto... | dcos/cosmos | cosmos-common/src/main/scala/com/mesosphere/universe/Metadata.scala | Scala | apache-2.0 | 5,279 |
package skills.properties
import drawables.actors.Actor
/**
* Created by James on 1/11/14.
*/
sealed trait Effect {
def apply(actor: Actor): Unit
}
sealed trait Status extends Effect {
val p: Double
def apply(actor: Actor): Unit = {
// TODO
}
}
case class Poison(override val p: Double) extends Status
c... | jamesmuerle/Bones | src/skills/properties/Effect.scala | Scala | mit | 777 |
package mq
/**
* Created by bruce on 25/02/15.
*/
import java.util.UUID
import com.datastax.driver.core.utils.UUIDs
import java.util.Date
import com.google.common.util.concurrent.{ListenableFuture, Futures, FutureCallback}
import org.joda.time.LocalDate
import spray.json.DefaultJsonProtocol
import scala.concurrent.... | ElasticQueue/ElasticQueue | src/main/scala/mq/Queue.scala | Scala | mit | 15,503 |
package org.jetbrains.plugins.scala
package lang
package psi
package api
package base
import com.intellij.psi.PsiModifierList
import com.intellij.psi.tree.IElementType
/**
* @author Alexander Podkhalyuzin
* Date: 22.02.2008
*/
trait ScModifierList extends ScalaPsiElement with PsiModifierList {
def ha... | loskutov/intellij-scala | src/org/jetbrains/plugins/scala/lang/psi/api/base/ScModifierList.scala | Scala | apache-2.0 | 538 |
/*
* Copyright 2014 Treode, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... | Treode/store | demos/movies/server/src/movies/AnalyticsResource.scala | Scala | apache-2.0 | 1,719 |
package com.blinkbox.books.logging.gelf
import ch.qos.logback.core.{AppenderBase, Layout}
import java.io.ByteArrayInputStream
import java.net.{DatagramSocket, InetAddress}
import java.nio.charset.StandardCharsets.UTF_8
import java.util.zip.DeflaterInputStream
import scala.beans.BeanProperty
import scala.util.control.N... | blinkboxbooks/common-config.scala | src/main/scala/com/blinkbox/books/logging/gelf/UdpAppender.scala | Scala | mit | 1,608 |
/* 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... | hlin117/factorie | src/main/scala/cc/factorie/app/nlp/lemma/PorterLemmatizer.scala | Scala | apache-2.0 | 1,496 |
/**
* Licensed to Big Data Genomics (BDG) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The BDG licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use ... | FusionWorks/avocado | avocado-core/src/main/scala/org/bdgenomics/avocado/preprocessing/RealignIndels.scala | Scala | apache-2.0 | 1,306 |
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.