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
/* Copyright 2017-18, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
eaplatanios/tensorflow
tensorflow/scala/api/src/main/scala/org/platanios/tensorflow/api/ops/variables/Reuse.scala
Scala
apache-2.0
1,806
package bifrost.transaction import com.google.common.primitives.Longs import bifrost.transaction.box.{Box, BoxUnlocker} import bifrost.transaction.box.proposition.Proposition abstract class BoxTransaction[P <: Proposition, BX <: Box[P]] extends Transaction[P] { val unlockers: Traversable[BoxUnlocker[P]] ...
Topl/Project-Bifrost
src/main/scala/bifrost/transaction/BoxTransaction.scala
Scala
mpl-2.0
620
package iota.pure.v2 import android.app.Activity import android.os.Bundle import android.view._ /** beware: * https://youtrack.jetbrains.com/issue/SCL-9888 * https://issues.scala-lang.org/browse/SI-9658 */ trait PureActivity[S] extends Activity { private[this] var state: S = _ sealed trait ActivityState[T] ...
pfn/iota-pure
src/main/scala/v2/activity.scala
Scala
apache-2.0
3,132
/* * 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...
beyond-code-github/play-auditing
src/main/scala/uk/gov/hmrc/play/audit/http/HttpAuditEvent.scala
Scala
apache-2.0
2,563
package async_http_client import core.HttpBinResponse import sttp.client._ import sttp.client.akkahttp._ import sttp.client.circe._ import scala.concurrent.duration.Duration import scala.concurrent.{Await, Future} import scala.concurrent.ExecutionContext.Implicits.global object HttpBin extends App { val backend =...
t-mochizuki/scala-study
sttp-example/slow-server-experience/async-http-client/src/main/scala/async-http-client/HttpBin.scala
Scala
mit
654
/* * Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com> */ package controllers import play.api._ import play.api.mvc._ import play.api.libs._ /** * Default actions ready to use as is from your routes file. * * Example: * {{{ * GET /google controllers.Default.redirect(to = "http://www.go...
jyotikamboj/container
pf-framework/src/play/src/main/scala/play/api/controllers/Default.scala
Scala
mit
1,409
package com.sksamuel.elastic4s object ConnectingToLocal extends App { import ElasticDsl._ import scala.concurrent.ExecutionContext.Implicits.global val local = ElasticClient.data local.execute { create index "got" } map { _ => local.execute { index into "got" fields "name" -> "tyrion" } ...
alexander-svendsen/elastic4s
elastic4s-core/src/test/scala/com/sksamuel/elastic4s/ConnectingToLocal.scala
Scala
apache-2.0
503
/* * Copyright 2012 杨博 (Yang Bo) * * 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...
Atry/commons-continuations
src/main/scala/com/dongxiguo/commons/continuations/FunctionQueue.scala
Scala
apache-2.0
1,290
package org.jetbrains.plugins.scala.lang.refactoring.rename import java.util import com.intellij.psi.PsiElement import org.jetbrains.annotations.ApiStatus import org.jetbrains.plugins.scala.ExtensionPointDeclaration @ApiStatus.Internal abstract class ScalaElementToRenameContributor { def addElements(original: PsiE...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/refactoring/rename/ScalaElementToRenameContributor.scala
Scala
apache-2.0
754
import scala.xml._ object DictXmlToTxt { def main(args: Array[String]) { val dict:Node = XML.loadFile("dict.xml") println(this(dict)) } def apply(dict:Node) = { def convertEntries = for { entry <- dict \\ "entry" val en = entry \\ "en" \\ "word" text val fr = entry \\ "fr" \\ "word" ...
grzegorzbalcerek/scala-book-examples
examples/DictXmlToTxt.scala
Scala
mit
697
package org.atnos.eff import cats._ import cats.syntax.traverse._ import cats.syntax.either._ import Eff._ import Interpret._ /** * Effect for computation which can fail */ trait EitherEffect extends EitherCreation with EitherInterpretation object EitherEffect extends EitherEffect trait EitherCreation { ty...
atnos-org/eff-cats
shared/src/main/scala/org/atnos/eff/EitherEffect.scala
Scala
mit
6,791
package org.modelfun /** * */ trait Parameters { def apply(name: Symbol, default: Double = 0.0): Double }
zzorn/modelfun
src/main/scala/org/modelfun/Parameters.scala
Scala
lgpl-3.0
115
// // Codex - a multi-language code indexer and grokker // http://github.com/samskivert/codex package codex.extract import java.io.File import scala.xml.{Node, NodeSeq, XML} import codex._ import codex.data.Depend /** Utilities for interacting with Visual Studio/MonoDevelop .csproj files. */ object CSProj { /** ...
samskivert/codex
src/main/scala/codex/extract/CSProj.scala
Scala
bsd-3-clause
1,794
package tuner.gui import akka.actor.Actor import akka.actor.Actor._ import scala.swing.BoxPanel import scala.swing.Button import scala.swing.CheckBox import scala.swing.Dialog import scala.swing.Label import scala.swing.Orientation import scala.swing.ProgressBar import scala.swing.event.ButtonClicked import scala.swin...
gabysbrain/tuner
src/main/scala/tuner/gui/SamplingProgressBar.scala
Scala
mit
2,905
package kipsigman.domain.entity import play.api.data.validation.ValidationError import play.api.libs.json._ abstract class Status(val name: String) { override def toString: String = name } object Status { // Content case object Deleted extends Status("deleted") case object Draft extends Status("draft") cas...
kipsigman/scala-domain-model
src/main/scala/kipsigman/domain/entity/Status.scala
Scala
apache-2.0
1,400
/** * Copyright (c) 2013, The National Archives <digitalpreservation@nationalarchives.gov.uk> * http://www.nationalarchives.gov.uk * * 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://mozi...
valydia/csv-validator
csv-validator-core/src/test/scala/uk/gov/nationalarchives/csv/validator/schema/v1_0/NotEmptyRuleSpec.scala
Scala
mpl-2.0
1,513
package scroll.tests.parameterized import scroll.internal.dispatch.DispatchQuery import scroll.internal.dispatch.DispatchQuery._ import scroll.tests.mocks.CompartmentUnderTest import scroll.tests.mocks.CoreA class RoleSortingTest extends AbstractParameterizedSCROLLTest { test("Adding roles and sorting them") { ...
max-leuthaeuser/SCROLL
tests/src/test/scala/scroll/tests/parameterized/RoleSortingTest.scala
Scala
lgpl-3.0
2,537
import scalaz.{ \\/, Monoid, StateT } import shapeless._ import ops.hlist.{Prepend, RightFolder, Init, Last, Length, Split} import scodec.bits._ /** * Combinator library for working with binary data. * * The primary abstraction of this library is [[Codec]], which provides the ability to encode/decode values to/from...
ceedubs/scodec
src/main/scala/scodec/package.scala
Scala
bsd-3-clause
5,565
package uk.org.nbn.nbnv.importer.darwin import uk.org.nbn.nbnv.importer.darwin.NbnFields._ import org.gbif.dwc.text.StarRecord import scala.collection.JavaConversions._ class StarRecordExtensions(starRecord: StarRecord) { //Maps NBN Field ot DWC Term def getCoreField(fieldName: NbnFields) = { FieldMaps.c...
JNCC-dev-team/nbn-importer
importer/src/main/scala/uk/org/nbn/nbnv/importer/darwin/StarRecordExtensions.scala
Scala
apache-2.0
864
package im.actor.server.presences import akka.actor.PoisonPill import akka.testkit.TestProbe import akka.util.Timeout import im.actor.server.ActorSuite import im.actor.server.db.DbExtension import org.scalatest.time.{ Seconds, Span } import scala.concurrent.ExecutionContext import scala.concurrent.duration._ class G...
actorapp/actor-platform
actor-server/actor-tests/src/test/scala/im/actor/server/presences/GroupPresenceManagerSpec.scala
Scala
agpl-3.0
3,301
package org.shapelogic.sc.imageprocessing import org.shapelogic.sc.util.Constants import org.shapelogic.sc.polygon.CPointInt import org.shapelogic.sc.image.BufferImage /** * LineVectorizer is a vectorizer using short line of default length 5. * * You do a sequence of small lines, if 2 consecutive lines are close i...
sami-badawi/shapelogic-scala
src/main/scala/org/shapelogic/sc/imageprocessing/LineVectorizer.scala
Scala
mit
1,499
package mr.merc.map.terrain import mr.merc.image.MImage import mr.merc.util.MercUtils import TerrainKind._ import mr.merc.map.objects.view.{Keep, Simple, WallStructure} object TerrainType { def helperTypesList:List[TerrainType] = List(BankInside, BankOutside) case object GreenGrass extends TerrainType("green", ...
RenualdMarch/merc
src/main/scala/mr/merc/map/terrain/TerrainType.scala
Scala
gpl-3.0
6,682
package org.nlogo.extensions.webview import java.io.File import java.net.URL import javafx.embed.swing.JFXPanel class WebViewStateManager(bridge: JavascriptBridge, browserFactory: WebViewFactory = JavaFXWebView) { val _ = new JFXPanel() var container: Option[Container] = None val webView ...
NetLogo/webview
src/main/scala/WebViewStateManager.scala
Scala
cc0-1.0
1,484
/* * Copyright 2017 Workday, Inc. * * This software is available under the MIT license. * Please see the LICENSE.txt file in this project. */ package com.workday.esclient.actions import io.searchbox.action.{AbstractMultiTypeActionBuilder, GenericResultAbstractAction} /** * Build for [[com.workday.esclient.act...
Workday/escalar
src/main/scala/com/workday/esclient/actions/SnapshotDeleteAction.scala
Scala
mit
1,586
package co.blocke.scalajack package typeadapter import model._ import scala.collection.mutable import co.blocke.scala_reflection._ import co.blocke.scala_reflection.impl.Clazzes._ import co.blocke.scala_reflection.info._ object SealedTraitTypeAdapterFactory extends TypeAdapterFactory: def matches(concrete: RType):...
gzoller/ScalaJack
core/src/main/scala/co.blocke.scalajack/typeadapter/SealedTraitTypeAdapter.scala
Scala
mit
4,396
package com.neilconcepts.battlespace.domain import java.util.UUID import com.neilconcepts.battlespace.domain.bst.Player import org.scalatest.{ Matchers, WordSpec } class BSTSpec extends WordSpec with Matchers { "BattleSpaceTypes" when { "generating a player" should { "create a unique player" in { ...
bneil/battlespace
src/test/scala/com/neilconcepts/battlespace/domain/BSTSpec.scala
Scala
mit
497
package temportalist.esotericraft.emulation.common.ability import net.minecraft.entity.EntityLivingBase import net.minecraft.nbt.NBTTagByte import temportalist.esotericraft.api.emulation.IAbility import temportalist.esotericraft.api.emulation.IAbility.Ability import temportalist.esotericraft.api.emulation.ability.IAbi...
TheTemportalist/EsoTeriCraft
src/main/scala/temportalist/esotericraft/emulation/common/ability/AbilityFloat.scala
Scala
apache-2.0
1,553
package uk.ac.surrey.xw.extension.prim import org.nlogo.api.Argument import org.nlogo.api.Context import org.nlogo.api.Reporter import org.nlogo.core.Syntax.StringType import org.nlogo.core.Syntax.reporterSyntax trait SimpleStringReporter extends Reporter { override def getSyntax = reporterSyntax(ret = StringType) ...
CRESS-Surrey/eXtraWidgets
xw/src/main/scala/uk/ac/surrey/xw/extension/prim/SimpleStringReporter.scala
Scala
mit
413
package views.vrm_retention import composition.TestHarness import helpers.vrm_retention.CookieFactoryForUISpecs import org.openqa.selenium.By import org.openqa.selenium.WebDriver import org.openqa.selenium.WebElement import org.scalatest.concurrent.Eventually import org.scalatest.concurrent.IntegrationPatience import ...
dvla/vrm-retention-online
test/views/vrm_retention/ConfirmIntegrationSpec.scala
Scala
mit
4,452
/* * Copyright (C) 2011-2016 Mathias Doenitz * Adapted and extended in 2016 by Eugene Yokota * * 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...
eed3si9n/sjson-new
support/spray/src/test/scala/sjsonnew/support/spray/PrimitiveFormatsSpec.scala
Scala
apache-2.0
5,524
/* * 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 ...
Intel-bigdata/OAP
oap-native-sql/core/src/main/scala/com/intel/oap/expression/ColumnarSubquery.scala
Scala
apache-2.0
4,504
package com.twitter.finagle.netty3.param import com.twitter.finagle.{util, Stack} import org.jboss.netty.util.Timer /** * A class eligible for configuring a netty3 timer. */ private[finagle] case class Netty3Timer(timer: Timer) { def mk(): (Netty3Timer, Stack.Param[Netty3Timer]) = (this, Netty3Timer.param) } ...
sveinnfannar/finagle
finagle-core/src/main/scala/com/twitter/finagle/netty3/param/Params.scala
Scala
apache-2.0
433
package insult import _root_.vocab._ abstract class SingleItem extends ItemSet { override def get = Seq(this) def getWord: String } abstract class SingleVocabItem(vocab: Vocab) extends SingleItem { override def getWord = vocab.get } object NounThing extends SingleVocabItem(NounGenericableVocab) object Noun...
HiinoFW/InsultGenerator
insult/insult/SingleItem.scala
Scala
mit
938
package org.openstack.api.restful /** * Exception that's thrown when the json syntax is malformed * @author Antonio Murgia * @version 09/11/14 */ class MalformedJsonException(s: String = "Malformed Json") extends java.text.ParseException(s, 0)
tmnd1991/ceilometerAPI4s
src/main/scala/org/openstack/api/restful/MalformedJsonException.scala
Scala
apache-2.0
250
package mesosphere.marathon package raml import mesosphere.UnitTest import mesosphere.marathon.test.SettableClock import mesosphere.marathon.core.health.{MesosCommandHealthCheck, MesosHttpHealthCheck, PortReference} import mesosphere.marathon.core.instance.{Goal, Reservation} import mesosphere.marathon.core.pod.{Conta...
gsantovena/marathon
src/test/scala/mesosphere/marathon/raml/PodStatusConversionTest.scala
Scala
apache-2.0
24,272
/* * 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...
viktorklang/akka-sse
akka-sse/src/test/scala/de/heikoseeberger/akkasse/BaseSpec.scala
Scala
apache-2.0
1,214
package controllers import com.bryzek.apidoc.api.v0.models.{Original, OriginalType, Validation} import com.bryzek.apidoc.api.v0.models.json._ import core.ServiceFetcher import lib.{DatabaseServiceFetcher, OriginalUtil, ServiceConfiguration} import javax.inject.{Inject, Singleton} import builder.OriginalValidator impor...
Seanstoppable/apidoc
api/app/controllers/Validations.scala
Scala
mit
1,387
package gapt.examples.tip.prod import gapt.expr._ import gapt.expr.ty.TBase import gapt.proofs.context.update.InductiveType import gapt.proofs.Sequent import gapt.proofs.gaptic._ import gapt.provers.viper.aip.AnalyticInductionProver object prop_07 extends TacticsProof { // Sorts ctx += TBase( "sk" ) // Induct...
gapt/gapt
examples/tip/prod/prop_07.scala
Scala
gpl-3.0
2,211
/* * 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/ct600e/v3/E80.scala
Scala
apache-2.0
845
package scaps.evaluation import scaps.settings.Settings import scaps.searchEngine.SearchEngine import java.io.File import scaps.scala.featureExtraction.JarExtractor import scaps.scala.featureExtraction.CompilerUtils import scaps.scala.featureExtraction.ExtractionError import scaps.utils.Logging import scalaz.std.strea...
scala-search/scaps
evaluation/src/main/scala/scaps/evaluation/Interactive.scala
Scala
mpl-2.0
2,372
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
pgandhi999/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StreamingQueryWrapper.scala
Scala
apache-2.0
3,197
/* * Copyright 2018 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/worldpay-downloader
app/model/emisReportModel.scala
Scala
apache-2.0
4,185
package com.sksamuel.scrimage.canvas import java.awt.{AlphaComposite, RenderingHints, Graphics2D} import com.sksamuel.scrimage.{Image, Color, Filter} /** * Places a watermark at a given location. */ class WatermarkFilter(text: String, x: Int, y: Int, ...
carlosFattor/scrimage
scrimage-core/src/main/scala/com/sksamuel/scrimage/canvas/WatermarkFilter.scala
Scala
apache-2.0
1,164
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
tophua/spark1.52
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuite.scala
Scala
apache-2.0
31,404
// Copyright (c) 2016 Marco Marini, marco.marini@mmarini.org // // Licensed under the MIT License (MIT); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://opensource.org/licenses/MIT // // Permission is hereby granted, free of charge, to any per...
m-marini/actd
src/main/scala/org/mmarini/actd/samples/WallStatus.scala
Scala
mit
14,199
package org.scalaprops import java.util.logging.Logger import reflect.Manifest import serialization.{StandardSerializers, Serializers} /** * Can be used to create beans of registered types. */ class BeanFactory { type BeanConstructor = () => _ <: Bean type BeanCreator = Symbol => _ <: Option[Bean] /** True i...
zzorn/scalaprops
src/main/scala/org/scalaprops/BeanFactory.scala
Scala
bsd-3-clause
3,633
package com.github.sorhus.webalytics.akka.domain import java.util.concurrent.TimeUnit import akka.actor.{ActorRef, Props} import com.github.sorhus.webalytics.akka.event._ import akka.pattern.ask import akka.persistence.SnapshotOffer import akka.util.Timeout import com.github.sorhus.webalytics.model.Query import scal...
sorhus/webalytics
service/src/main/scala/com/github/sorhus/webalytics/akka/domain/ReadOnlyDomainActor.scala
Scala
gpl-3.0
2,279
package se.lu.nateko.cp.meta.onto.labeler import org.semanticweb.owlapi.model.{IRI => OwlIri} import org.semanticweb.owlapi.model.OWLOntology import se.lu.nateko.cp.meta.instanceserver.InstanceServer import se.lu.nateko.cp.meta.instanceserver.InstanceServerUtils import se.lu.nateko.cp.meta.utils.rdf4j._ import org.ecl...
ICOS-Carbon-Portal/meta
src/main/scala/se/lu/nateko/cp/meta/onto/labeler/UniversalLabeler.scala
Scala
gpl-3.0
1,048
/* * Copyright 2001-2013 Artima, 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 agre...
travisbrown/scalatest
src/test/scala/org/scalatest/ShouldBeReadableSpec.scala
Scala
apache-2.0
7,030
package parser.json.detail import parser.json.GenericJsonParser import play.api.libs.json.JsValue import models.Skimbo import parser.json.providers.GoogleplusWallParser object GoogleplusDetails extends GenericJsonParser { override def asSkimbo(json: JsValue): Option[Skimbo] = GoogleplusWallParser.asSkimbo(json) ...
Froggies/Skimbo
app/parser/json/detail/GoogleplusDetails.scala
Scala
agpl-3.0
372
/* * 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 ...
caneGuy/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/jsonExpressions.scala
Scala
apache-2.0
27,575
/*********************************************************************** * Copyright (c) 2013-2018 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...
jahhulbert-ccri/geomesa
geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/geotools/GenerateFeatureWrappers.scala
Scala
apache-2.0
6,163
/* scala-stm - (c) 2009-2011, Stanford University, PPL */ package scala.concurrent.stm import actors.threadpool.TimeUnit /** `object TxnExecutor` manages the system-wide default `TxnExecutor`. */ object TxnExecutor { @volatile private var _default: TxnExecutor = impl.STMImpl.instance /** Returns the default `T...
djspiewak/scala-stm
src/main/scala/scala/concurrent/stm/TxnExecutor.scala
Scala
bsd-3-clause
7,743
/* * Copyright 2009 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 t...
yonglehou/ostrich
src/test/scala/com/twitter/ostrich/admin/AdminHttpServiceTest.scala
Scala
apache-2.0
15,176
// Copyright (C) 2011-2012 the original author or authors. // See the LICENCE.txt file distributed with this work for additional // information regarding copyright ownership. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You ...
chrisjwwalker/cjww-diagnostics
app/models/NewDevice.scala
Scala
apache-2.0
1,323
package appenginehelpers import com.google.appengine.api.utils.SystemProperty import net.sf.ehcache.CacheManager import com.google.appengine.api.memcache._ import net.sf.ehcache.config.{CacheConfiguration, Configuration} import java.util.logging.Logger trait HybridCache { private val logger = Logger.getLogger(class...
gklopper/Appengine-Helpers
cache/src/main/scala/appenginehelpers/HybridCache.scala
Scala
mit
2,166
package ohnosequences.db.rnacentral.test import org.scalatest.FunSuite import ohnosequences.test._ import ohnosequences.db.rnacentral._ import org.scalatest.EitherValues._ class Entries extends FunSuite { test("parse all", ReleaseOnlyTest) { Version.all foreach { v => data.rnacentralData(v).left.foreach...
ohnosequences/db.rnacentral
src/test/scala/entries.scala
Scala
agpl-3.0
546
/* * Copyright 2016 OSBI Ltd * * 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 writ...
OSBI/meteorite-core
security-scala/src/main/scala/bi/meteorite/core/security/UserManager.scala
Scala
apache-2.0
1,461
package org.scalaide.ui.editor import scala.reflect.io.AbstractFile import org.scalaide.core.compiler.InteractiveCompilationUnit import org.scalaide.core.resources.EclipseResource import org.eclipse.core.resources.IFile import org.eclipse.jface.text.IDocument abstract class CompilationUnit(override val workspaceFile:...
Kwestor/scala-ide
org.scala-ide.sdt.core/src/org/scalaide/ui/editor/CompilationUnit.scala
Scala
bsd-3-clause
754
package dotty.tools package dotc package ast import core._ import Names._, Types._ , Symbols._, StdNames._, Flags._, Contexts._ import org.junit.Test import org.junit.Assert._ class DesugarTests extends DottyTest { import tpd._ private def validSym(sym: Symbol)(implicit ctx: Context): Unit = { assert( ...
som-snytt/dotty
compiler/test/dotty/tools/dotc/ast/DesugarTests.scala
Scala
apache-2.0
1,429
/* # Copyright 2016 Georges Lipka # # 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 wri...
glipka/Easy-React-With-ScalaJS
src/main/scala/com/glipka/easyReactJS/reactRouter/RouterContextElement.scala
Scala
apache-2.0
932
/** * 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...
ollie314/kafka
core/src/test/scala/integration/kafka/api/ProducerCompressionTest.scala
Scala
apache-2.0
4,091
/* * Copyright 2008-present MongoDB, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
rozza/mongo-scala-driver
driver/src/main/scala/org/mongodb/scala/Observable.scala
Scala
apache-2.0
2,405
package repositories import java.util.UUID import com.omis.EmpDetails import scala.concurrent.Future trait EmployeeRepository extends Repository { import ctx._ val employees = quote(querySchema[Employee]("employees")) val empDet = quote(querySchema[EmpDetails]("emp_details")) def createEmpWithRole(employee:...
iriddhi/mis
server/src/main/scala/repositories/EmployeeRepository.scala
Scala
apache-2.0
555
package cilib import zio.prelude._ import zio.prelude.newtypes.Natural sealed abstract class Position[+A] { import Position._ def map[B](f: A => B): Position[B] = Point(pos.map(f), boundary) def flatMap[B](f: A => Position[B]): Position[B] = Point(pos.flatMap(f(_).pos), boundary) def zip[B](other: ...
cirg-up/cilib
core/src/main/scala/cilib/Position.scala
Scala
apache-2.0
5,930
package chandu0101.scalajs.react.components.demo.routes import chandu0101.scalajs.react.components.demo.routes.AppRouter.Page import japgolly.scalajs.react.ReactElement abstract class LeftRoute(val name : String,val route : String,val render : () => ReactElement)
coreyauger/scalajs-react-components
demo/src/main/scala/chandu0101/scalajs/react/components/demo/routes/LeftRoute.scala
Scala
apache-2.0
267
/*********************************************************************** * 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 ...
tkunicki/geomesa
geomesa-features/geomesa-feature-all/src/main/scala/org/locationtech/geomesa/features/SerializationType.scala
Scala
apache-2.0
734
/** * 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...
themarkypantz/kafka
core/src/test/scala/unit/kafka/server/LogOffsetTest.scala
Scala
apache-2.0
11,758
import sbt._ import Keys._ import sbtrelease.ReleaseStateTransformations._ import sbtrelease.ReleasePlugin.autoImport._ import xerial.sbt.Sonatype._ import com.typesafe.sbt.pgp.PgpKeys import dog.DogPlugin.autoImport._ object Common { private def gitHash: String = scala.util.Try( sys.process.Process("git rev-pa...
pocketberserker/dog-analyzer
project/Common.scala
Scala
mit
3,418
package com.github.novamage.svalidator.validation.simple import com.github.novamage.svalidator.validation.simple.internals.SimpleValidationRuleStructureContainer import testUtils.Observes class SimpleListValidationRuleStarterBuilderSpecs extends Observes { case class SampleValidatedClass(a: String, b: Long) { } ...
NovaMage/SValidator
src/test/scala/com/github/novamage/svalidator/validation/simple/SimpleListValidationRuleStarterBuilderSpecs.scala
Scala
mit
1,538
/* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
hmrc/amls-frontend
test/connectors/cache/DataCacheConnectorSpec.scala
Scala
apache-2.0
3,327
/******************************************************************************* * Copyright (c) 2019. Carl Minden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the ...
carlminden/anathema-roguelike
src/com/anathema_roguelike/entities/items/armor/Armor.scala
Scala
gpl-3.0
2,512
/* Copyright 2009-2016 EPFL, Lausanne */ package leon package synthesis package rules import purescala.Path import purescala.Expressions._ import purescala.ExprOps._ import purescala.Constructors._ import purescala.Types._ case object InputSplit extends Rule("In. Split") { def instantiateOn(implicit hctx: SearchCo...
regb/leon
src/main/scala/leon/synthesis/rules/InputSplit.scala
Scala
gpl-3.0
1,598
package svstm.transactions import svstm.exceptions.WriteOnReadTransactionException import svstm.vbox.VBox class ReadTransaction(number: Int, parent: ReadTransaction = null) extends Transaction(number, parent) { def this(parent: ReadTransaction) = this(parent.number, parent) def getBoxValue[T](vbox: VBox[T]): T ...
fcristovao/SVSTM
src/main/scala/svstm/transactions/ReadTransaction.scala
Scala
apache-2.0
583
/* * Copyright 2009-2010 LinkedIn, 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 ...
linkedin/norbert
network/src/test/scala/com/linkedin/norbert/network/client/NetworkClientSpec.scala
Scala
apache-2.0
12,143
/* * Copyright (C) 2013 Alcatel-Lucent. * * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * Licensed to you 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 cop...
molecule-labs/molecule
molecule-core/src/main/scala/molecule/request/package.scala
Scala
apache-2.0
1,045
package gust.util import breeze.util.SerializableLogging import scala.reflect.ClassTag import org.bridj.{PointerIO, Pointer} import jcuda.runtime.{cudaStream_t, JCuda} import jcuda.jcublas.{cublasOperation, JCublas2, cublasHandle} import jcuda.driver.{JCudaDriver, CUcontext, CUfunction, CUstream} import jcuda.NativeP...
dlwh/gust
src/main/scala/gust/util/cuda/package.scala
Scala
apache-2.0
4,711
/* * Copyright 2001-2008 Artima, 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 la...
svn2github/scalatest
src/test/scala/org/scalatest/tools/ScalaTestRunnerSuite.scala
Scala
apache-2.0
7,777
/* * Seldon -- open source prediction engine * ======================================= * Copyright 2011-2015 Seldon Technologies Ltd and Rummble Ltd (http://www.seldon.io/) * ********************************************************************************************** * * Licensed under the Apache License, Vers...
SeldonIO/seldon-server
offline-jobs/spark/src/main/scala/io/seldon/spark/mllib/SimilarItems.scala
Scala
apache-2.0
10,772
/* * 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 ...
guoxiaolongzte/spark
core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala
Scala
apache-2.0
46,212
package com.twitter.finagle.tracing import com.twitter.finagle.util.ByteArrays import com.twitter.util.RichU64String import com.twitter.util.{Try, Return, Throw} import java.lang.{Boolean => JBool} import scala.util.control.NonFatal /** * Defines trace identifiers. Span IDs name a particular (unique) * span, while...
spockz/finagle
finagle-core/src/main/scala/com/twitter/finagle/tracing/Id.scala
Scala
apache-2.0
6,786
/* * Copyright 2020 Precog Data * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
djspiewak/quasar
foundation/src/main/scala/quasar/RateLimiter.scala
Scala
apache-2.0
5,321
package com.nefariouszhen.khronos.websocket import com.google.inject.{ConfigurationException, Inject, Injector} import org.atmosphere.cpr.{AtmosphereFramework, AtmosphereObjectFactory} class GuiceObjectFactory @Inject()(injector: Injector) extends AtmosphereObjectFactory { override def newClassInstance[T, U <: T](f...
khronos-metrics/khronos
khronos-websocket-core/src/main/scala/com/nefariouszhen/khronos/websocket/GuiceObjectFactory.scala
Scala
apache-2.0
590
/* * 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
core/sj-engine-core/src/main/scala/com/bwsw/sj/engine/core/output/types/es/ElasticSearchTypes.scala
Scala
apache-2.0
8,789
package com.twitter.finagle.thriftmux import com.twitter.finagle.{Path, Failure, Dtab, ThriftMuxUtil} import com.twitter.finagle.mux.transport.{BadMessageException, Message, Netty3Framer} import com.twitter.finagle.netty3.BufChannelBuffer import com.twitter.finagle.stats.{NullStatsReceiver, StatsReceiver} import com.t...
lukiano/finagle
finagle-thriftmux/src/main/scala/com/twitter/finagle/thriftmux/Netty3.scala
Scala
apache-2.0
13,967
package com.lucius.shu.dao import com.lucius.shu.base.{Constants, Contexts} import com.lucius.shu.util.Utils import org.apache.spark.Logging import org.apache.spark.rdd.RDD import org.apache.spark.sql.Row import org.apache.spark.sql.types.{StringType, StructField, StructType} import scala.language.implicitConversions ...
zj-lingxin/spark_hbase_shu
src/main/scala/com/lucius/shu/dao/Dao.scala
Scala
mit
3,659
package org.jetbrains.plugins.scala package lang package psi package impl package statements import lexer.ScalaTokenTypes import stubs.ScFunctionStub import com.intellij.lang.ASTNode import com.intellij.psi._ import org.jetbrains.plugins.scala.lang.psi.api.statements._ import org.jetbrains.plugins.scala.lang.psi.api.e...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/lang/psi/impl/statements/ScFunctionDefinitionImpl.scala
Scala
apache-2.0
4,259
/* * Copyright 2012 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 ...
coursera/zipkin
zipkin-common/src/main/scala/com/twitter/zipkin/common/Span.scala
Scala
apache-2.0
7,175
/** * Original work: SecureSocial (https://github.com/jaliss/securesocial) * Copyright 2013 Brian Porter (poornerd at gmail dot com) - twitter: @poornerd * * Derivative work: Silhouette (https://github.com/mohiva/play-silhouette) * Modifications Copyright 2015 Mohiva Organisation (license at mohiva dot com) * * ...
mohiva/play-silhouette
silhouette/app/com/mohiva/play/silhouette/impl/providers/oauth2/InstagramProvider.scala
Scala
apache-2.0
4,757
/* * (c) Copyright 2016 Hewlett Packard Enterprise Development LP * * 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 b...
hpe-cct/cct-core
src/main/scala/cogx/compiler/codegenerator/opencl/fragments/InputFieldFragment.scala
Scala
apache-2.0
5,802
package riftwarp.std import scala.reflect.ClassTag import scalaz._, Scalaz._ import scalaz.Validation.FlatMap._ import almhirt.common._ import almhirt.almvalidation.kit._ import riftwarp._ trait PackageBuilderFuns { def toWarpPrimitive[A](what: A)(implicit conv: WarpPrimitiveConverter[A]): WarpPrimitive...
chridou/almhirt
riftwarp/src/main/scala/riftwarp/std/PackageBuilder.scala
Scala
apache-2.0
19,402
package sangria.util import org.scalatest.Matchers import sangria.parser.QueryParser import sangria.schema._ import sangria.validation.{AstNodeViolation, RuleBasedQueryValidator, ValidationRule} import scala.util.Success trait ValidationSupport extends Matchers { type TestField = Field[Unit, Unit] val Being = I...
narahari92/sangria
src/test/scala/sangria/util/ValidationSupport.scala
Scala
apache-2.0
8,969
package quizleague.web.site.season import rxscalajs._ import rxscalajs.subjects._ import quizleague.web.site.ApplicationContextService import quizleague.web.model.Season trait SeasonWatchService { private val seasonSubj:Subject[Season] = ReplaySubject() ApplicationContextService.get().subscribe(_.currentSea...
gumdrop/quizleague-maintain
js/src/main/scala/quizleague/web/site/season/SeasonWatchService.scala
Scala
mit
390
inline def scaffolding(inline op: Unit): Unit = val _ = op def test = scaffolding { println("foo") }
dotty-staging/dotty
tests/pos/i9626.scala
Scala
apache-2.0
104
/* * LambdaExpressionLatexExporter.scala * */ package at.logic.gapt.formats.latex import at.logic.gapt.formats.{ HOLTermExporter, OutputExporter } import at.logic.gapt.expr._ import at.logic.gapt.expr._ import at.logic.gapt.language.schema.indexedOmegaVar trait HOLTermLatexExporter extends OutputExporter with HOL...
gisellemnr/gapt
src/main/scala/at/logic/gapt/formats/latex/HOLTermLatexExporter.scala
Scala
gpl-3.0
3,900
package crochet import scala.collection.mutable.{Map=>MMap} import javax.servlet.http.{HttpServletResponse, HttpServletRequest, HttpServlet} import util.matching.Regex /** * The basic dispatcher for Chrochet servlet requests * * @author Xavier Llora * @date Jan 13, 2010 at 3:15:21 PM * */ protected trait Cro...
xllora/Crochet
src/main/scala/CrochetDispatcher.scala
Scala
bsd-3-clause
7,685
package scala.test object Exported { def message: String = { // terrible, don't do this in real code: val msg = Class.forName("scala.test.Runtime") .newInstance .toString "you all, everybody. " + msg } }
sdtwigg/rules_scala
test/Exported.scala
Scala
apache-2.0
233
/* * 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.tools.testkit.as...
lrytz/scala
src/testkit/scala/tools/testkit/async/AsyncStateMachine.scala
Scala
apache-2.0
1,406
/** * 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 ...
tdanford/adam
adam-core/src/test/scala/org/bdgenomics/adam/algorithms/consensus/ConsensusGeneratorFromReadsSuite.scala
Scala
apache-2.0
1,540
/* * 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 ...
michalsenkyr/spark
core/src/main/scala/org/apache/spark/TaskContext.scala
Scala
apache-2.0
8,620