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.wordnik.client.model
import com.wordnik.client.model.Credential
case class Inline_response_200_10 (
data: Credential,
success: Boolean
)
| QuantiModo/QuantiModo-SDK-Scalatra | src/main/scala/com/wordnik/client/model/Inline_response_200_10.scala | Scala | gpl-2.0 | 156 |
package com.amathew.kidtimer.counter
import android.app.Activity
import android.os.Bundle
class DisplayMessageAc extends Activity {
override def onCreate(savedInstanceState: Bundle) {
super.onCreate(savedInstanceState)
}
}
| amathewk/kid-timer | app/src/main/scala/com.amathew.kidtimer.counter/DisplayMessageAc.scala | Scala | apache-2.0 | 233 |
package com.github.novamage.svalidator.binding
import com.github.novamage.svalidator.binding.binders.{JsonTypedBinder, TypedBinder}
import com.github.novamage.svalidator.binding.binders.special._
import com.github.novamage.svalidator.binding.binders.typed._
import com.github.novamage.svalidator.binding.hooks.{BeforeBi... | NovaMage/SValidator | src/main/scala/com/github/novamage/svalidator/binding/TypeBinderRegistry.scala | Scala | mit | 12,337 |
package org.bitcoins.rpc.common
import org.bitcoins.commons.jsonmodels.bitcoind.RpcOpts
import org.bitcoins.core.currency.Bitcoins
import org.bitcoins.core.number.UInt32
import org.bitcoins.core.protocol.script.{
P2SHScriptSignature,
ScriptPubKey,
ScriptSignature
}
import org.bitcoins.core.protocol.transaction.{... | bitcoin-s/bitcoin-s | bitcoind-rpc-test/src/test/scala/org/bitcoins/rpc/common/RawTransactionRpcTest.scala | Scala | mit | 9,644 |
import scala.quoted.*
object Macros {
inline def assert2(expr: => Boolean): Unit = ${ assertImpl('expr) }
def assertImpl(expr: Expr[Boolean])(using Quotes) = '{ println($expr) }
}
| dotty-staging/dotty | tests/run-macros/quote-sep-comp/Macro_1.scala | Scala | apache-2.0 | 185 |
package utils
import models.ZkKafka._
import play.api.libs.json.Json._
import play.api.libs.json._
object JsonFormats {
private def optionLongtoJsValue(maybeId: Option[Long]) = maybeId.map({ l => JsNumber(l) }).getOrElse(JsNull)
implicit object DeltaFormat extends Format[Delta] {
def reads(json: JsValue): ... | keenlabs/capillary | app/utils/JsonFormats.scala | Scala | mit | 897 |
/* NSC -- new Scala compiler
* Copyright 2009-2013 Typesafe/Scala Solutions and LAMP/EPFL
* @author Martin Odersky
*/
package scala
package tools.nsc
package interactive
package tests
import scala.reflect.internal.util._
import reporters._
import io.AbstractFile
import scala.collection.mutable.ArrayBuffer
class Te... | felixmulder/scala | src/interactive/scala/tools/nsc/interactive/tests/Tester.scala | Scala | bsd-3-clause | 6,360 |
package fpinscala.errorhandling
sealed trait Option[+A] {
def map[B](f: A => B): Option[B] = this match {
case None => None
case Some(a) => Some(f(a))
}
def flatMap[B](f: A => Option[B]): Option[B] = this match {
case None => None
case Some(a) => f(a)
}
def getOrElse[B >: A](default: => B):... | pluselc/fpinscala | src/main/scala/fpinscala/errorhandling/Option.scala | Scala | mit | 1,081 |
package mesosphere.marathon.upgrade
import akka.actor.{ ActorRef, ActorSystem }
import akka.testkit.{ TestActorRef, TestProbe }
import akka.util.Timeout
import mesosphere.marathon.core.launchqueue.LaunchQueue
import mesosphere.marathon.core.task.Task
import mesosphere.marathon.core.task.tracker.TaskTracker
import meso... | vivekjuneja/marathon | src/test/scala/mesosphere/marathon/upgrade/DeploymentActorTest.scala | Scala | apache-2.0 | 10,860 |
package truerss.clients
import truerss.dto.SourceStatusDto
import zio.Task
class SourcesStatusesApiHttpClient(baseUrl: String) extends BaseHttpClient(baseUrl) {
import JsonSupport._
protected val apiUrl = s"$baseUrl/$api/source-statuses"
def findAll: Task[Iterable[SourceStatusDto]] = {
get[Iterable[Sourc... | truerss/truerss | clients/src/main/scala/truerss/clients/SourcesStatusesApiHttpClient.scala | Scala | mit | 465 |
package com.temportalist.weepingangels.common
import java.util.Map.Entry
import com.google.gson.{JsonObject, JsonArray, JsonElement}
import com.temportalist.origin.api.common.lib.ConfigJson
import com.temportalist.origin.api.common.utility.Scala
import com.temportalist.origin.foundation.common.register.OptionRegister... | TheTemportalist/WeepingAngels | src/main/scala/com/temportalist/weepingangels/common/WAOptions.scala | Scala | apache-2.0 | 7,745 |
package epic.framework
/*
Copyright 2012 David Hall
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 ... | bitemyapp/epic | src/main/scala/epic/framework/EPInference.scala | Scala | apache-2.0 | 5,891 |
package com.pwootage.metroidprime.templates
import java.io.FileNotFoundException
import scala.xml.{NodeSeq, XML}
import better.files._
import com.pwootage.metroidprime.randomizer.Randomizer
object ScriptTemplates {
def loadTemplateXml(templ: String): NodeSeq = {
val path = "/templates/" + templ
val in = ge... | Pwootage/prime-patcher | src/main/scala/com/pwootage/metroidprime/templates/ScriptTemplates.scala | Scala | gpl-3.0 | 1,082 |
package io.scalac.frees.math
import freestyle._
@free trait BasicMath {
def add(a: Int, b: Int): FS[Int]
def subtract(a: Int, b: Int): FS[Int]
def multiply(a: Int, b: Int): FS[Int]
}
@free trait HighMath {
def power(a: Int, b: Int): FS[Int]
}
@module trait AllTheMath {
val basic: BasicMath
val high: H... | LGLO/freestyle-login | src/main/scala/io/scalac/frees/math/algebras.scala | Scala | apache-2.0 | 825 |
import apdl.ApdlParserException
import apdl.parser._
import org.scalacheck.Prop.forAll
import scala.util.parsing.input.CharSequenceReader
class TfExpressionTest extends ApdlFlatSpec {
import parser._
def assertEquivExpr(a: String, b: String): Unit = {
val resultA = parser.parse(tfExpr, new PackratReader[Cha... | SnipyJulmy/APDL | src/test/scala/TfExpressionTest.scala | Scala | lgpl-3.0 | 11,546 |
package com.codiply.barrio.neighbors
import akka.actor.Actor
import akka.actor.Actor.Receive
import akka.actor.Props
import com.codiply.barrio.geometry.Point
import com.codiply.barrio.geometry.Point.Coordinates
object LocationIndexActorProtocol {
final case class GetLocationRequest(id: String)
final case class G... | codiply/barrio | src/main/scala/com/codiply/barrio/neighbors/LocationIndexActor.scala | Scala | apache-2.0 | 838 |
package ammonite
/**
* Code related to invoking Ammonite from the outside world: default
* configuration, running scripts, printing error messages, etc.
*/
package object main | alexarchambault/ammonium | amm/src/main/scala/ammonite/main/package.scala | Scala | mit | 182 |
/*
* Scala classfile decoder (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 scal... | martijnhoekstra/scala | src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSig.scala | Scala | apache-2.0 | 14,587 |
package clifton.graph
import api.{Collector, Injector}
import toolkit.ValidGraphRep
/**
* Created by #GrowinScala
*/
trait ExoGraph {
val graph: ValidGraphRep
val injector: Injector
val collector: Collector
def closeGraph(): Unit
}
| exocute/Toolkit | src/main/scala/clifton/graph/ExoGraph.scala | Scala | bsd-2-clause | 251 |
object Test extends dotty.runtime.LegacyApp {
class Region { override def toString = "You got me!" }
class SymbolType
case class SymbolInfo(tp: SymbolType, regions: List[Region], x: Any)
def findRegionsWithSymbolType(rawSymbolInfos: Seq[SymbolInfo], symbolType: SymbolType): Set[Region] =
rawSymbolInfos.col... | yusuke2255/dotty | tests/run/virtpatmat_partial_backquoted.scala | Scala | bsd-3-clause | 575 |
package com.arcusys.valamis.web.servlet.file.request
import com.arcusys.valamis.web.servlet.file.FileUploading
import com.arcusys.valamis.web.servlet.request.{BaseCollectionFilteredRequestModel, BaseRequest, Parameter}
object FileExportRequest extends BaseRequest {
val CompanyId = "companyID"
val CategoryId = "c... | igor-borisov/JSCORM | valamis-portlets/src/main/scala/com/arcusys/valamis/web/servlet/file/request/FileExportRequest.scala | Scala | gpl-3.0 | 1,678 |
/**
* Copyright 2015 Peter Nerg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | pnerg/java-scala-util-converter | src/test/scala/javascalautils/converters/JavaScalaUtilConvertersSuite.scala | Scala | apache-2.0 | 1,380 |
/*
* -╥⌐⌐⌐⌐ -⌐⌐⌐⌐-
* ≡╢░░░░⌐\\░░░φ ╓╝░░░░⌐░░░░╪╕
* ╣╬░░` `░░░╢┘ φ▒╣╬╝╜ ░░╢╣Q
* ║╣╬░⌐ ` ╤▒▒▒Å` ║╢╬╣
* ╚╣╬░⌐ ╔▒▒▒▒`«╕ ╢╢╣▒
* ╫╬░░╖ .░ ╙╨╨ ╣╣╬░φ ╓φ░╢╢Å
* ╙╢░░░░⌐"░░░╜ ╙Å░░░░⌐░░░░╝`
* ``˚¬ ⌐ ˚˚⌐´
*
* ... | Flipkart/connekt | commons/src/main/scala/com/flipkart/connekt/commons/utils/NullWrapper.scala | Scala | mit | 1,519 |
/**
* For copyright information see the LICENSE document.
*/
package entice.server.utils
import shapeless._
import scala.reflect.runtime.universe._
/**
* Encapsulates functionality we need to perform certain type checks in the world.
*/
object ReflectionUtils {
import HList.ListCompat._
/**
* Ext... | entice/old-server | src/main/scala/entice/server/utils/ReflectionUtils.scala | Scala | bsd-3-clause | 2,737 |
package scalastudy.concurrent.wordstat
import java.io.File
import akka.actor.{Actor, ActorRef, PoisonPill}
import akka.event.Logging
import scala.collection.mutable.ArrayBuffer
import scalastudy.concurrent.ActorTerminationMsg
/**
* Created by lovesqcc on 16-4-2.
*/
class FetchJavaFileActor(readFileActor: ActorRef... | shuqin/ALLIN | src/main/java/scalastudy/concurrent/wordstat/FetchJavaFileActor.scala | Scala | gpl-3.0 | 1,666 |
package play.api.libs.openid
import org.specs2.mutable.Specification
import org.specs2.mock._
import java.net.URL
import play.api.http.HeaderNames
import play.api.http.Status._
import scala.concurrent.duration.Duration
import scala.concurrent.Await
import java.util.concurrent.TimeUnit
import org.specs2.control.NoStack... | michaelahlers/team-awesome-wedding | vendor/play-2.2.1/framework/src/play/src/test/scala/play/api/libs/openid/DiscoverySpec.scala | Scala | mit | 12,842 |
/****************************************************************************
* Copyright Fabien Sartor
* Contributors: Fabien Sartor (fabien.sartor@gmail.com)
* http://fasar.fr
*
* This software is a computer program whose purpose to compute differences
* between two files.
*
****************... | fasar/diffTools | model/diffTools/src/main/scala/fsart/diffTools/csvModel/CsvData.scala | Scala | apache-2.0 | 5,004 |
// 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
// distributed unde... | supriyantomaftuh/network | src/test/scala/com/cloudant/clouseau/IndexManagerServiceSpec.scala | Scala | apache-2.0 | 1,615 |
/****************************************************************************
* Copyright Fabien Sartor
* Contributors: Fabien Sartor (fabien.sartor@gmail.com)
* http://fasar.fr
*
* This software is a computer program whose purpose to compute differences
* between two files.
*
****************... | fasar/diffTools | core/console/src/main/scala/fsart/diffTools/script/Interpreter.scala | Scala | apache-2.0 | 3,384 |
/***********************************************************************
* Copyright (c) 2017-2020 IBM
* 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 ac... | aheyne/geomesa | geomesa-cassandra/geomesa-cassandra-datastore/src/main/scala/org/locationtech/geomesa/cassandra/index/Z3ColumnMapper.scala | Scala | apache-2.0 | 4,088 |
/*
* 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 | kernel/src/main/scala/org/apache/toree/kernel/protocol/v5/handler/KernelInfoRequestHandler.scala | Scala | apache-2.0 | 2,440 |
/*
* Copyright 2015 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... | scottcutts/ct-calculations | src/main/scala/uk/gov/hmrc/ct/ct600/v3/retriever/CT600BoxRetriever.scala | Scala | apache-2.0 | 4,423 |
package org.openmole.gui.server.core
import org.openmole.core.workspace.Workspace
import org.scalatra.ScalatraBase
import org.scalatra.auth.ScentryStrategy
/*
* Copyright (C) 07/11/16 // mathieu.leclaire@openmole.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of ... | openmole/openmole | openmole/gui/server/org.openmole.gui.server.core/src/main/scala/org/openmole/gui/server/core/OpenMOLEStrategy.scala | Scala | agpl-3.0 | 1,560 |
package com.arcusys.valamis.persistence.impl.scorm.storage
import com.arcusys.valamis.lesson.scorm.model.manifest.ActivityDataMap
import com.arcusys.valamis.lesson.scorm.storage.ActivityDataStorage
import com.arcusys.valamis.persistence.common.SlickProfile
import com.arcusys.valamis.persistence.impl.scorm.model.Activi... | igor-borisov/valamis | valamis-slick-persistence/src/main/scala/com/arcusys/valamis/persistence/impl/scorm/storage/ActivityDataStorageImpl.scala | Scala | gpl-3.0 | 1,732 |
/*
* 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... | jedesah/Quasar | couchbase/src/main/scala/quasar/physical/couchbase/common.scala | Scala | apache-2.0 | 5,330 |
/*§
===========================================================================
OmniEditor
===========================================================================
Copyright (C) 2015-2016 Gianluca Costa
===========================================================================
Licensed under the Apache ... | giancosta86/OmniEditor | src/main/scala/info/gianlucacosta/omnieditor/Style.scala | Scala | apache-2.0 | 1,016 |
package com.github.mdr.mash.functions
import com.github.mdr.mash.evaluator.{ EvaluationContext, Evaluator, SourceLocation }
import com.github.mdr.mash.parser.AbstractSyntax.{ Expr, FunctionDeclaration }
import com.github.mdr.mash.parser.DocComment
import com.github.mdr.mash.runtime.MashValue
import scala.PartialFunct... | mdr/mash | src/main/scala/com/github/mdr/mash/functions/UserDefinedFunction.scala | Scala | mit | 1,503 |
/*
* Copyright 2014 – 2015 Paul Horn
*
* 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... | knutwalker/rx-redis | benchmarks/src/main/scala/com/redis/ScalaRedisPingBench.scala | Scala | apache-2.0 | 1,278 |
/*
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... | chrismoulton/scalding | scalding-core/src/main/scala/com/twitter/scalding/typed/HashJoinable.scala | Scala | apache-2.0 | 2,595 |
package org.airpnp.airplay;
import org.airpnp.Util;
/**
* Base implementation of the {@link AirPlayDevice} interface, providing model,
* device ID, features and name.
*/
abstract class BaseAirPlayDevice(private val name: String, private val udn: String) extends AirPlayDevice {
private val id = Util.createDevice... | provegard/ScAirPnp | src/main/scala/org/airpnp/airplay/BaseAirPlayDevice.scala | Scala | mit | 613 |
package com.nulabinc.backlog.migration.common.service
import com.nulabinc.backlog.migration.common.domain.{
BacklogCustomFieldSetting,
BacklogStatus,
BacklogStatusName,
BacklogVersion,
Id
}
import com.nulabinc.backlog.migration.common.utils.Logging
/**
* @author
* uchida
*/
class PropertyResolverImpl(
... | nulab/backlog-migration-common | core/src/main/scala/com/nulabinc/backlog/migration/common/service/PropertyResolverImpl.scala | Scala | mit | 4,361 |
package com.twitter.finagle.util
import java.lang.{Double => JDouble, Float => JFloat}
import com.twitter.io.Buf
import org.junit.runner.RunWith
import org.scalatest.FunSuite
import org.scalatest.junit.JUnitRunner
import org.scalatest.prop.GeneratorDrivenPropertyChecks
@RunWith(classOf[JUnitRunner])
class BufReaderTe... | adriancole/finagle | finagle-core/src/test/scala/com/twitter/finagle/util/BufReaderTest.scala | Scala | apache-2.0 | 6,471 |
class A {}
class B extends A { def m(b: B) : A = { return b } }
object Main { def main(args: Array[String]) { } }
| tobast/compil-petitscala | tests/typing/good/testfile-subtype-3.scala | Scala | gpl-3.0 | 115 |
/***********************************************************************
* Copyright (c) 2013-2016 Commonwealth Computer Research, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and is ... | MutahirKazmi/geomesa | geomesa-accumulo/geomesa-accumulo-datastore/src/test/scala/org/locationtech/geomesa/accumulo/data/AccumuloDataStoreTransformsTest.scala | Scala | apache-2.0 | 14,290 |
package org.mitre.mandolin.xg
import org.mitre.mandolin.mlp.{MMLPFactor, MMLPTrainerBuilder}
import org.mitre.mandolin.util.{LocalIOAssistant, AbstractPrintWriter, Alphabet, IdentityAlphabet}
import org.mitre.mandolin.transform.FeatureExtractor
import ml.dmlc.xgboost4j.scala.{XGBoost, DMatrix}
object PrintUtils {
d... | project-mandolin/mandolin | mandolin-mx/src/main/scala/org/mitre/mandolin/xg/XGMain.scala | Scala | apache-2.0 | 8,802 |
/*
* 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/shell/vswitch/VirtualPort.scala | Scala | apache-2.0 | 2,161 |
/**
* Copyright (C) 2016 Verizon. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law o... | Verizon/trapezium | framework/src/main/scala/com/verizon/bda/trapezium/validation/ValidationConfig.scala | Scala | apache-2.0 | 3,916 |
package org.http4s
package headers
import cats.data.NonEmptyList
import java.net.InetAddress
import org.http4s.parser.HttpHeaderParser
import org.http4s.util.Writer
object `X-Forwarded-For` extends HeaderKey.Internal[`X-Forwarded-For`] with HeaderKey.Recurring {
override def parse(s: String): ParseResult[`X-Forward... | aeons/http4s | core/src/main/scala/org/http4s/headers/X-Forwarded-For.scala | Scala | apache-2.0 | 1,015 |
package swaggerboot
object Delegates {
def extract(controllers: Seq[Controller]): Seq[ControllerDelegate] = {
val delegateMethods = for {
controller <- controllers
method <- controller.methods
} yield {
method.delegate.getOrElse(getDefault(controller, method))
}
delegateMethods.gro... | conorclifford/swagger-play-boostrap | src/main/scala/swaggerboot/Delegates.scala | Scala | apache-2.0 | 679 |
package org.jetbrains.plugins.scala.lang.completion.lookups
import java.util.Set
import gnu.trove.THashSet
import com.intellij.codeInsight.lookup.{LookupElementPresentation, LookupElementDecorator}
import com.intellij.codeInsight.completion.InsertionContext
import com.intellij.psi.PsiDocumentManager
import org.jetbrai... | consulo/consulo-scala | src/org/jetbrains/plugins/scala/lang/completion/lookups/ScalaChainLookupElement.scala | Scala | apache-2.0 | 2,224 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | ueshin/apache-spark | resource-managers/yarn/src/test/scala/org/apache/spark/deploy/yarn/ClientSuite.scala | Scala | apache-2.0 | 32,128 |
import sbt._
import Keys._
object MyBuild extends Build {
import Dependencies._
val NamePrefix = "IntegrationHelper-"
}
| yfayman/integration-helper-scala | project/Build.scala | Scala | mit | 126 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | u2009cf/spark-radar | sql/core/src/test/scala/org/apache/spark/sql/streaming/test/DataStreamReaderWriterSuite.scala | Scala | apache-2.0 | 22,725 |
package org.scalajs.testsuite.niobuffer
import java.nio._
sealed abstract class BufferAdapter[BT <: Buffer, ET] {
type BufferType = BT
type ElementType = ET
def slice(): BufferType
def duplicate(): BufferType
def asReadOnlyBuffer(): BufferType
def get(): ElementType
def put(e: ElementType): BufferType
... | jmnarloch/scala-js | test-suite/src/test/scala/org/scalajs/testsuite/niobuffer/BufferAdapter.scala | Scala | bsd-3-clause | 9,313 |
package mesosphere.marathon.io
import java.math.BigInteger
import java.net.{ HttpURLConnection, URL }
import java.security.MessageDigest
import scala.collection.JavaConverters._
import scala.concurrent.Future
import org.apache.commons.io.FilenameUtils.getName
import mesosphere.util.ThreadPoolContext.context
trait P... | 14Zen/marathon | src/main/scala/mesosphere/marathon/io/PathFun.scala | Scala | apache-2.0 | 1,380 |
package org.finra.datagenerator.scaffolding.random.strategy
import org.finra.datagenerator.scaffolding.config.Configuration
import org.finra.datagenerator.scaffolding.random.Parameter
import org.finra.datagenerator.scaffolding.random.types.TypeContainer
/**
* Created by dkopel on 12/8/16.
*/
object MethodAccessor... | yukaReal/DataGenerator | rubber-scaffolding/rubber-random/src/main/scala/org/finra/datagenerator/scaffolding/random/strategy/MethodAccessorGeneratingStrategy.scala | Scala | apache-2.0 | 519 |
/*
* Copyright (c) 2014 Dufresne Management Consulting LLC.
*/
package actors
import akka.actor.Actor
import akka.actor.ActorLogging
import models.Website
import org.htmlcleaner.TagNode
import org.htmlcleaner.HtmlCleaner
import java.io.File
/**
* Agent to crawl HotHouseJazz.com for Events, Artists, and Venues
*/
... | reactivecore01/livejazznear.me | play/app/actors/EventCrawlerActor.scala | Scala | apache-2.0 | 991 |
package com.readclosely.util
/*
Copyright 2009-2010 Karl Pichotta
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 la... | kpich/readclosely | src/main/scala/com/readclosely/util/InterTextUtil.scala | Scala | apache-2.0 | 4,144 |
/* Copyright 2009-2021 EPFL, Lausanne */
package stainless
package solvers
import inox.solvers._
import inox.solvers.combinators._
import inox.transformers._
import evaluators._
object SolverFactory {
def getFromName(name: String)
(p: Program, ctx: inox.Context)
(enc: ProgramTra... | epfl-lara/stainless | core/src/main/scala/stainless/solvers/SolverFactory.scala | Scala | apache-2.0 | 2,749 |
package org.openurp.edu.eams.teach.election.service.rule.election
import org.beangle.ems.rule.Context
import org.openurp.edu.eams.teach.election.model.Enum.ElectRuleType
import org.openurp.edu.eams.teach.election.service.context.ElectMessage
import org.openurp.edu.eams.teach.election.service.context.ElectionCourseCont... | openurp/edu-eams-webapp | election/src/main/scala/org/openurp/edu/eams/teach/election/service/rule/election/LimitCountChecker.scala | Scala | gpl-3.0 | 2,447 |
package pl.jojczykp.pingpong.message
case class PingMessage(text: String)
| jojczykp/pingpong | src/main/scala/pl/jojczykp/pingpong/message/PingMessage.scala | Scala | gpl-3.0 | 75 |
package scodec
import scalaz.{\\/, -\\/, \\/-}
import \\/.{ right, left }
import scodec.bits._
import scodec.codecs._
import shapeless._
import shapeless.record._
import shapeless.union._
import shapeless.syntax.singleton._
class CodecTest extends CodecSuite {
sealed trait Parent
case class Foo(x: Int, y: Int, s... | danielwegener/scodec | src/test/scala/scodec/CodecTest.scala | Scala | bsd-3-clause | 6,995 |
package ghe
import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
import gheheaders._
object CommentOnPullReqSimulation {
val testDuration = Integer.getInteger("testDuration", 1)
val minWaitMs = 10000 milliseconds
val maxWaitMs ... | rkarthikeyan5/PerfExecercise | user-files/simulations/githubEnt/CommentOnPullReq.scala | Scala | apache-2.0 | 3,840 |
package dataaggregation
import org.joda.time.DateTime
import sp.EricaEventLogger.StateKeeper
import sp.gPubSub.API_Data.EricaEvent
import scala.collection.mutable
object PatientKindKeeper extends StateKeeper {
implicit def stringToDateTime(s: String) = DateTime.parse(s)
val timeOfFirstEvent = mutable.Map[Int, ... | edvardlindelof/ERICA-prediction | dataaggregation/src/main/scala/dataaggregation/PatientKindKeeper.scala | Scala | mit | 2,467 |
/*
* Copyright 2014 DataGenerator Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... | Brijeshrpatel9/SingleThreaderProcessingDG | dg-common/src/main/code/org/finra/datagenerator/common/Helpers/FileHelper.scala | Scala | apache-2.0 | 9,182 |
package com.github.tarao.nonempty
import org.scalatest.{FunSpec, Inside, Inspectors, Matchers, OptionValues}
import scala.collection.immutable
import scala.collection.mutable
import scala.collection.mutable.ArrayBuffer
class NonEmptySpec extends FunSpec
with Matchers with OptionValues with Inside with Inspectors ... | tarao/nonempty-scala | src/test/scala/com/github/tarao/nonempty/NonEmptySpec.scala | Scala | mit | 10,812 |
package at.logic.gapt.examples.tip.prod
import at.logic.gapt.expr._
import at.logic.gapt.formats.ClasspathInputFile
import at.logic.gapt.formats.tip.TipSmtParser
import at.logic.gapt.proofs.gaptic._
import at.logic.gapt.proofs.{ Ant, Sequent }
import at.logic.gapt.provers.viper.aip.AnalyticInductionProver
object prop... | gebner/gapt | examples/tip/prod/prop_27.scala | Scala | gpl-3.0 | 1,931 |
package com.sksamuel.elastic4s.searches.queries
case class ScriptScoreQuery(script: String) extends Query
| Tecsisa/elastic4s | elastic4s-core/src/main/scala/com/sksamuel/elastic4s/searches/queries/ScriptScoreQuery.scala | Scala | apache-2.0 | 107 |
package leo
package modules.proofCalculi.splitting
import java.util.concurrent.atomic.AtomicInteger
import leo.datastructures.blackboard.{Store, FormulaStore}
import leo.datastructures.term.Term._
import leo.datastructures.{Type}
import leo.datastructures.term.Term
import leo.datastructures._
import leo.datastructure... | cbenzmueller/LeoPARD | src/main/scala/leo/modules/proofCalculi/splitting/DomainConstrainedSplitting.scala | Scala | bsd-3-clause | 3,127 |
/*
* 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 | disk/src/com/treode/disk/Compactor.scala | Scala | apache-2.0 | 1,981 |
object Test extends App {
val emptyTuple: Tuple = Tuple()
val tuple: Tuple = ("1", "2", "3", "4", "5")
val tupleXXL: Tuple = ("11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35")
println(emptyTuple.drop(0))
prin... | dotty-staging/dotty | tests/run-deep-subtype/tuple-drop.scala | Scala | apache-2.0 | 677 |
/*
* Copyright (c) 2014-2021 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... | monixio/monix | monix-reactive/shared/src/test/scala/monix/reactive/subjects/ConcurrentReplayLimitedSubjectSuite.scala | Scala | apache-2.0 | 1,752 |
package controllers
import actions.SecureAction
import com.google.inject.Inject
import models._
import play.api.libs.concurrent.Execution.Implicits.defaultContext
import play.api.mvc.Controller
import scrapers.InfobaeScraper
import services.{InfobaeNewsService, ProspectService, ScrapingService}
import scala.concurren... | TVilaboa/Egresados | app/controllers/InfobaeNewsController.scala | Scala | gpl-3.0 | 1,301 |
// Copyright: 2010 - 2016 https://github.com/ensime/ensime-server/graphs
// Licence: http://www.gnu.org/licenses/gpl-3.0.en.html
package org.ensime.intg
import org.ensime.api._
import org.ensime.fixture._
import org.ensime.util.EnsimeSpec
import org.ensime.util.file._
/**
* This is a reproduction of https://github.c... | d1egoaz/ensime-sbt | src/sbt-test/sbt-ensime/ensime-server/core/src/it/scala-2.11/org/ensime/intg/ImplicitsWildcardImports.scala | Scala | apache-2.0 | 1,423 |
package org.akoshterek.backgammon.agent
import java.nio.file.Path
import org.akoshterek.backgammon.board.{Board, PositionClass}
import org.akoshterek.backgammon.eval.{Evaluator, Reward}
import org.akoshterek.backgammon.move.Move
trait Agent {
val fullName: String
val path: Path
var isLearnMode: Boolean = fal... | akoshterek/MultiGammonJava | multi-gammon-core/src/main/java/org/akoshterek/backgammon/agent/Agent.scala | Scala | gpl-3.0 | 2,682 |
/*
* 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 ... | matthewfranglen/spark | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/CallMethodViaReflection.scala | Scala | mit | 7,337 |
import com.alexdupre.shapeshift.models.Market
object CreateFixedOutputTransactionWithSpecialInput extends App with ShapeShift with Provider {
execute { c =>
val market = Market("XMR", "BTC")
val inputAmount = BigDecimal(args(0))
val outputAddress = btcAddress
c.createFixedOutputTransaction(... | alexdupre/shapeshift-scala | common/src/test/scala/CreateFixedOutputTransactionWithSpecialInput.scala | Scala | bsd-2-clause | 363 |
package test.util
import org.scalatest.FlatSpec
import org.scalatest.matchers.ShouldMatchers._
import tap.util.Graph
class GraphTests extends FlatSpec {
behavior of "components"
it should "identify strongly connected components" in {
val edges1 = Map(
"A" -> Set("B", "D"),
"... | garyb/tap | src/test/scala/test/util/GraphTests.scala | Scala | mit | 4,059 |
package extruder.core
import extruder.data.Validation
import org.scalatest.{EitherValues, FunSuite}
import extruder.map._
class EncodeSuite extends FunSuite with EitherValues {
import EncodeSuite._
test("Can run encoder with default monad type") {
assert(encode("test") === Map("" -> "test"))
}
test("Can... | janstenpickle/extruder | core/src/test/scala/extruder/core/EncodeSuite.scala | Scala | mit | 1,956 |
package exercises
import org.scalatest.FunSuite
import scala.util.{Try, Success, Failure}
class Exercises_E_OptionEitherTry extends FunSuite {
//Scala provide many constructs to deal with exceptional/error cases without aborting the function call
//with an Exception that may or may not be handled properly.
//... | scala-montreal/scalaxercise | src/test/scala/exercises/Exercises_E_OptionEitherTry.scala | Scala | unlicense | 996 |
package org.scalatra
import java.io.{ ByteArrayOutputStream, ObjectOutputStream }
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import org.scalatest.{ BeforeAndAfterEach, FunSuite, Matchers }
import skinny.engine.flash.FlashMap
@RunWith(classOf[JUnitRunner])
class FlashMapTest extends FunSui... | holycattle/skinny-framework | engine/src/test/scala/org/scalatra/FlashMapTest.scala | Scala | mit | 3,980 |
package lt.node.scandra.pirkimai
import android.app.Activity
import android.content.Intent
import android.os.Bundle
import android.view.View
import android.view.View._
import android.util.Log
import android.widget._
import util.{ScalaFunPro, FindView, FileUtil, OrderPurchase}
import xml.Text._
import xml._
... | vytasab/scandra | pirkimai/src/main/scala/lt/node/scandra/pirkimai/OrderMaking.scala | Scala | apache-2.0 | 17,939 |
/*
*
* * 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 "L... | eBay/Eagle | eagle-core/eagle-data-process/eagle-stream-process-api/src/main/scala/org/apache/eagle/datastream/StreamDAGExpansion.scala | Scala | apache-2.0 | 1,105 |
/*
* 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/box/Linked.scala | Scala | apache-2.0 | 715 |
class a {
def foo()(<caret>
}
/*
implicit
*/ | JetBrains/intellij-scala | scala/scala-impl/testdata/keywordCompletion/modifiers/implicit.scala | Scala | apache-2.0 | 46 |
/*
* ____ ____ _____ ____ ___ ____
* | _ \ | _ \ | ____| / ___| / _/ / ___| Precog (R)
* | |_) | | |_) | | _| | | | | /| | | _ Advanced Analytics Engine for NoSQL Data
* | __/ | _ < | |___ | |___ |/ _| | | |_| | Copyright (C) 2010 - 2013 SlamData, Inc.... | precog/platform | yggdrasil/src/main/scala/com/precog/yggdrasil/vfs/ActorVFS.scala | Scala | agpl-3.0 | 30,193 |
package com.eevolution.context.dictionary.domain.api.repository
import com.eevolution.context.dictionary._
/**
* Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Publi... | adempiere/ADReactiveSystem | dictionary-api/src/main/scala/com/eevolution/context/dictionary/domain/api/repository/MigrationScriptRepository.scala | Scala | gpl-3.0 | 1,148 |
/*
* Copyright (C) 2014-2015 Really Inc. <http://really.io>
*/
package io.really.gorilla
import akka.actor.{ ActorRef, Props }
import akka.testkit.{ TestProbe, TestActorRef }
import akka.persistence.{ Update => PersistenceUpdate }
import io.really._
import _root_.io.really.model.{ Model, FieldKey }
import _root_.io.r... | reallylabs/really | modules/really-core/src/test/scala/io/really/gorilla/SubscriptionManagerSpec.scala | Scala | apache-2.0 | 8,352 |
/**
* Copyright (C) 2012 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... | ajw625/orbeon-forms | src/main/scala/org/orbeon/oxf/xforms/analysis/ChildrenLHHAAndActionsTrait.scala | Scala | lgpl-2.1 | 1,156 |
/*
* Copyright 2016 Guy Van den Broeck and Wannes Meert (UCLA and KU Leuven)
*
* 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
*
* Un... | UCLA-StarAI/Forclift | src/test/scala/edu/ucla/cs/starai/forclift/learning/TestIMDBBug3.scala | Scala | apache-2.0 | 1,753 |
package org.jetbrains.plugins.scala.codeInsight
import com.intellij.codeInsight.daemon.impl.HintRenderer
import com.intellij.openapi.editor.Inlay
import org.jetbrains.plugins.scala.base
abstract class InlayHintsTestBase extends base.ScalaLightCodeInsightFixtureTestAdapter {
override protected final def configureFr... | JetBrains/intellij-scala | scala/codeInsight/test/org/jetbrains/plugins/scala/codeInsight/InlayHintsTestBase.scala | Scala | apache-2.0 | 892 |
package spark.util
import akka.actor.{Props, ActorSystemImpl, ActorSystem}
import com.typesafe.config.ConfigFactory
import akka.util.duration._
import akka.pattern.ask
import akka.remote.RemoteActorRefProvider
import cc.spray.Route
import cc.spray.io.IoWorker
import cc.spray.{SprayCanRootService, HttpService}
import c... | ankurdave/arthur | core/src/main/scala/spark/util/AkkaUtils.scala | Scala | bsd-3-clause | 2,880 |
package com.sparklingpandas.sparklingml.feature
import org.apache.spark.ml.param._
import org.apache.spark.ml.util.Identifiable
import org.apache.spark.sql.types._
import com.sparklingpandas.sparklingml.util.python.PythonTransformer
class NltkPosPython(override val uid: String) extends PythonTransformer {
def th... | sparklingpandas/sparklingml | src/main/scala/com/sparklingpandas/sparklingml/feature/BasicPython.scala | Scala | apache-2.0 | 2,468 |
package org.yotchang4s.ch2.thread
import org.yotchang4s.ch2._
import org.yotchang4s.ch2.board.BoardId
trait ThreadComponent {
val thread: ThreadRepository
trait ThreadRepository {
def findSubjects(boardId: BoardId)(implicit config: Ch2Config): Either[Ch2Exception, List[Thread]]
}
} | yotchang4s/gikolet | src/org/yotchang4s/ch2/thread/ThreadComponent.scala | Scala | bsd-3-clause | 295 |
/*
* 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 ... | echalkpad/t4f-data | spark/mllib/src/test/scala/org/apache/spark/mllib/classification/SVM.scala | Scala | apache-2.0 | 7,081 |
/**
* Description: Parses the simple XML format agreed on with
* Vincent Aravantinos: Trees with string-nodes.
*/
package at.logic.gapt.formats.simple
import at.logic.gapt.formats.ParsingException
import at.logic.gapt.formats.xml.XMLParser.XMLNodeParser
import at.logic.gapt.proofs.proofs.{ BinaryRuleTypeA, Nullary... | loewenheim/gapt | src/main/scala/at/logic/gapt/formats/simple/SimpleParser.scala | Scala | gpl-3.0 | 3,347 |
/*
* 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 ... | SarahMehddi/HelloWorld | typesystem/src/main/scala/org/apache/atlas/typesystem/json/Serialization.scala | Scala | apache-2.0 | 13,740 |
package org.jetbrains.plugins.scala
package lang
package psi
package stubs
package index
import api.statements.{ScFunction, ScValue, ScTypeAlias, ScVariable}
import api.toplevel.packaging.ScPackageContainer
import api.toplevel.templates.ScExtendsBlock
import com.intellij.psi.PsiClass
import com.intellij.psi.stubs.Stu... | consulo/consulo-scala | src/org/jetbrains/plugins/scala/lang/psi/stubs/index/ScalaIndexKeys.scala | Scala | apache-2.0 | 3,091 |
/*
* 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 ... | gioenn/xSpark | core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala | Scala | apache-2.0 | 27,013 |
/*
* 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... | fjsc/sparta | serving-core/src/main/scala/com/stratio/sparta/serving/core/models/dto/LoggedUserConstant.scala | Scala | apache-2.0 | 1,077 |
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.