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 de.sebastiankreutzer.chip8 import java.awt.BorderLayout import java.awt.Dimension import java.awt.GridLayout import java.awt.event.ActionEvent import java.awt.event.ActionListener import java.awt.event.KeyAdapter import java.awt.event.KeyEvent import java.awt.event.KeyListener import javax.swing.Butt...
sebastiankreutzer/chip8
src/main/scala/de/sebastiankreutzer/chip8/UI.scala
Scala
gpl-2.0
7,548
package cn.changhong.web.init import java.net.InetSocketAddress import java.util.concurrent.TimeUnit import cn.changhong.web.router._ import com.twitter.finagle.builder.ServerBuilder import com.twitter.finagle.http.{Request, RichHttp, Http} import com.twitter.util.Duration /** * Created by yangguo on 14-12-8. */ o...
guoyang2011/myfinagle
WebTemplate/src/main/scala/cn/changhong/web/init/Start.scala
Scala
apache-2.0
888
/* * 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...
keithhall/ct-calculations
src/main/scala/uk/gov/hmrc/ct/computations/CP35.scala
Scala
apache-2.0
898
package plob import java.nio.file.attribute.BasicFileAttributes import java.nio.file.SimpleFileVisitor import java.nio.file.WatchEvent import java.nio.file.FileSystems import java.nio.file.FileVisitResult import java.nio.file.Files import java.nio.file.LinkOption import java.nio.file.Path import java.nio.file.Standard...
davidB/plob
src/main/scala/plob/core.scala
Scala
unlicense
5,863
package com.outr.stripe.balance import com.outr.stripe.Money case class Reversal(id: String, `object`: String, amount: Money, balanceTransaction: String, created: Long, currency: String, metadata: M...
outr/scala-stripe
core/jvm/src/main/scala/com/outr/stripe/balance/Reversal.scala
Scala
mit
378
package org.orbeon.dom import org.orbeon.dom.io.{OutputFormat, XMLWriter} import org.orbeon.dom.tree.{AbstractNode, WithParent} import org.orbeon.io.{IOUtils, StringBuilderWriter} import scala.jdk.CollectionConverters._ import java.{util => ju, lang => jl} object Node { implicit class NodeOps[N <: Node](private ...
orbeon/orbeon-forms
dom/src/main/scala/org/orbeon/dom/Node.scala
Scala
lgpl-2.1
5,096
package a71.对数 import a71.MathCount object Runner { def number2FromInt(num: Int): Number2 = { lazy val genTailNext1: Number2Bottom => Number2 = num2 => { def number2(n: Int, zero: => Number2): Number2 = if (n > 0) Number2S(number2(n - 1, zero)) else zero lazy val n2Zero: Number2 ...
djx314/ubw
a71-行李箱密码锁/src/main/scala/a71/对数/Runner.scala
Scala
bsd-3-clause
1,415
package me.heaton.shortestpath import org.specs2.mock.Mockito import org.specs2.mutable.Specification class FloydSpec extends Specification with Mockito{ val graph = new Graph("AB5, BC4, CD8, DC8, DE6, AD5, CE2, EB3, AE7") val floid = new Floyd(graph) "the shortest path of A to C" should { "be 9" in { ...
heaton/hello-scala
src/test/scala/me/heaton/shortestpath/FloydSpec.scala
Scala
mit
473
// 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-auth-service
test/security/EncryptionSpec.scala
Scala
apache-2.0
1,257
package cas.web.interface import java.io.File import akka.actor.{ActorSystem, Props} import akka.io.IO import akka.pattern.ask import akka.util.Timeout import cas.analysis.estimation._ import cas.service.AProducer import cas.utils._ import cas.web.dealers.vk.VkApiDealer import com.typesafe.config.ConfigFactory import...
bk0606/CAS
src/main/scala/cas/web/interface/Boot.scala
Scala
mit
2,284
package edu.berkeley.ce.sparkrocks import breeze.linalg import breeze.linalg.{DenseMatrix, DenseVector} import org.apache.commons.lang3.builder.HashCodeBuilder object Joint { /** * Find the distance of the joint plane from the input local origin. * * @param normalVec Normal vector to the joint plane ...
cb-geo/spark-rocks
src/main/scala/edu/berkeley/ce/sparkrocks/Joint.scala
Scala
gpl-2.0
15,682
package uk.org.nbn.nbnv.importer.validation import uk.org.nbn.nbnv.importer.records.NbnRecord import collection.mutable.ListBuffer import uk.org.nbn.nbnv.importer.fidelity.{ResultLevel, Result} import uk.org.nbn.nbnv.importer.spatial.GridSquareInfoFactory import uk.org.nbn.nbnv.importer.data.Database class Gr...
JNCC-dev-team/nbn-importer
importer/src/main/scala/uk/org/nbn/nbnv/importer/validation/GridReferenceValidator.scala
Scala
apache-2.0
1,073
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
wzhongyuan/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/utils/tf/loaders/Inv.scala
Scala
apache-2.0
1,474
package io.scalac.amqp.impl import scala.concurrent.stm.Ref import scala.util.{Success, Failure, Try} import scala.util.control.NonFatal import com.rabbitmq.client.{ShutdownSignalException, ShutdownListener, Connection} import io.scalac.amqp.Delivery import org.reactivestreams.{Subscriber, Publisher} private[amqp...
iozozturk/reactive-rabbit
src/main/scala/io/scalac/amqp/impl/QueuePublisher.scala
Scala
apache-2.0
2,174
package pl.writeonly.son2.path.notations import com.jayway.jsonpath.spi.json.JsonOrgJsonProvider import com.jayway.jsonpath.spi.mapper.JsonOrgMappingProvider import pl.writeonly.son2.apis.config.Meta import pl.writeonly.son2.apis.core.Formats import pl.writeonly.son2.path.core.ProvidersPath import pl.writeonly.son2.pa...
writeonly/son2
scallions-impl/scallions-path/src/main/scala/pl/writeonly/son2/path/notations/CreatorNotationOrgJson.scala
Scala
apache-2.0
606
package fr.inria.spirals.sigma.ttc14.fixml import fr.unice.i3s.sigma.m2t.M2T import fr.inria.spirals.sigma.ttc14.fixml.objlang.support.ObjLang import fr.inria.spirals.sigma.ttc14.fixml.objlang.support.ObjLang._objlang._ class ObjLang2CEnumHeader extends BaseObjLang2Enum with ObjLang2CPP with CHeader { override def ...
fikovnik/ttc14-fixml-sigma
ttc14-fixml-extension-3/src/fr/inria/spirals/sigma/ttc14/fixml/ObjLang2CEnumHeader.scala
Scala
epl-1.0
529
/** Represents a doc comment, splitting it into `body` and `tags` * `tags` are all lines starting with an `@`, where the tag thats starts * with `@` is paired with the text that follows, up to the next * tagged line. * `body` what comes before the first tagged line */ case class DocComment(body: ...
lampepfl/dotty
tests/run/decorators/DocComment.scala
Scala
apache-2.0
1,224
package korolev import java.util.concurrent.ConcurrentLinkedQueue import scala.language.higherKinds import scala.util.{Failure, Success} abstract class StateManager[F[+_]: Async, State] { def state: State def subscribe[U](f: State => U): StateManager.Unsubscribe def onDestroy[U](f: () => U): StateManager.Unsub...
PhilAndrew/JumpMicro
JMCloner/src/main/scala/korolev/StateManager.scala
Scala
mit
2,467
/* * 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 ...
maropu/spark
mllib/src/main/scala/org/apache/spark/ml/util/HasTrainingSummary.scala
Scala
apache-2.0
1,692
package scavlink.sbt.mavgen import org.scalatest.WordSpec import scavlink.sbt.mavgen.MessageGenerator._ import scala.xml.XML class MagicSpec extends WordSpec { val xml = XML.load(getClass.getResourceAsStream("/mavgen/common.xml")) // taken from ardupilot project val sourceMagics = Map(0 -> 50, 1 -> 124, 2 -> ...
nickolasrossi/sbt-mavgen
src/test/scala/scavlink/sbt/mavgen/MagicSpec.scala
Scala
mit
2,125
package im.actor.server.presences import scala.concurrent.duration._ import scala.concurrent.{ ExecutionContext, Future } import akka.actor._ import akka.contrib.pattern.ShardRegion.Passivate import akka.contrib.pattern.{ ClusterSharding, ShardRegion } import akka.pattern.ask import akka.util.Timeout import org.joda....
supertanglang/actor-platform
actor-server/actor-presences/src/main/scala/im/actor/server/presences/PresenceManager.scala
Scala
mit
6,464
/* sbt -- Simple Build Tool * Copyright 2009, 2010 Mark Harrah */ package xsbt.boot // <boot.directory> // scala-<scala.version>/ [baseDirectoryName] // lib/ [ScalaDirectoryName] // <app.name>-<app.version>/ [appDirectoryName] // // see also ProjectProperties for the set of constants t...
kuochaoyi/xsbt
launch/BootConfiguration.scala
Scala
bsd-3-clause
3,799
/** * A simple text based RPG * * @package simplerpg * @copyright 2015 */ package simplerpg.action import simplerpg.Player import simplerpg.World final class StatsAction(categories: Array[String]) extends Action { def run(currentPlayer: Player, world: World): Option[Action] = { val builder = new S...
mcross1882/SimpleRPG
src/main/scala/simplerpg/action/StatsAction.scala
Scala
mit
912
package org.jetbrains.plugins.scala.actions import javax.swing.Icon import com.intellij.ide.fileTemplates.{FileTemplate, FileTemplateManager} import com.intellij.ide.fileTemplates.actions.CreateFromTemplateActionBase import com.intellij.openapi.project.{DumbAware, Project} import com.intellij.psi.PsiDirectory import o...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/actions/LazyFileTemplateAction.scala
Scala
apache-2.0
834
import scala.tools.nsc.doc.model._ import scala.tools.partest.ScaladocModelTest object Test extends ScaladocModelTest { override def code = """ import language.higherKinds trait T[M[_]] class C extends T[Function0] class D extends T[Tuple1] """ def scaladocSettings = "" def testM...
felixmulder/scala
test/scaladoc/run/t7876.scala
Scala
bsd-3-clause
398
/* * Copyright (c) 2014-2018 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
Wogan/monix
monix-reactive/shared/src/test/scala/monix/reactive/subjects/ProfunctorSubjectSuite.scala
Scala
apache-2.0
6,862
package com.twitter.finagle.netty4 import com.twitter.app.GlobalFlag import com.twitter.conversions.time._ import com.twitter.concurrent.NamedPoolThreadFactory import com.twitter.finagle.netty4.util.Netty4Timer import com.twitter.finagle.stats.{FinagleStatsReceiver, StatsReceiver} import com.twitter.finagle.util.Servi...
koshelev/finagle
finagle-netty4/src/main/scala/com/twitter/finagle/netty4/Netty4HashedWheelTimer.scala
Scala
apache-2.0
4,095
package models.services import java.util.UUID import javax.inject.Inject import com.mohiva.play.silhouette.api.LoginInfo import com.mohiva.play.silhouette.impl.providers.CommonSocialProfile import models.User import models.daos.UserDAO import play.api.libs.concurrent.Execution.Implicits._ import scala.concurrent.Fut...
renexdev/Play-Auth-Slick-Seed-Load-Schema
app/models/services/UserServiceImpl.scala
Scala
apache-2.0
2,004
/* * Copyright (c) 2002-2018 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j 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 Foundatio...
HuangLS/neo4j
community/cypher/cypher-compiler-2.3/src/test/scala/org/neo4j/cypher/internal/compiler/v2_3/executionplan/builders/DeleteAndPropertySetBuilderTest.scala
Scala
apache-2.0
2,548
package dhg.pos.tagdict trait StartEndTags[Tag] { def startTag: Tag def endTag: Tag def swap: StartEndTags[Tag] = SimpleStartEndTags(endTag, startTag) } case class SimpleStartEndTags[Tag](startTag: Tag, endTag: Tag) extends StartEndTags[Tag]
dhgarrette/low-resource-pos-tagging-2014
src/main/scala/dhg/pos/tagdict/StartEndTags.scala
Scala
apache-2.0
249
package protocol import java.nio.ByteBuffer import scala.Array.canBuildFrom import scala.Option.option2Iterable import scala.io.Codec import scala.util.Try import org.apache.http.entity.ContentType import org.apache.http.impl.EnglishReasonPhraseCatalog import ch.ethz.inf.vs.californium.coap.{Message => CoapMessage}...
liamjjmcnamara/sicsthsense
web/app/protocol/Translator.scala
Scala
apache-2.0
7,664
/* * Copyright (C) 2013-2015 by Michael Hombre Brinkmann */ package net.twibs.web import net.twibs.util.{Request, ResponseRequest} abstract class LoadingCacheResponder(delegate: Responder) extends CacheResponder { def respond(request: Request): Option[Response] = request.use { val requestCacheKey = req...
hombre/twibs
twibs-web/src/main/scala/net/twibs/web/LoadingCacheResponder.scala
Scala
apache-2.0
804
package freecli package core package api case class Merger[F](f: F) { def ::[F2](merger: Merger[F2])(implicit ev: CanMerge[F2, F]): ev.Out = { ev(merger.f, f) } } trait CanMerge[F1, F2] { type Out def apply(f1: F1, f2: F2): Out } object CanMerge { type Aux[F1, F2, Out0] = CanMerge[F1, F2] { type Out = ...
pavlosgi/freecli
core/src/main/scala/freecli/core/api/Merger.scala
Scala
apache-2.0
329
package org.example1.usage import org.example1.declaration.{Y, Z} import org.example1.declaration.data.{A, B, C, X} trait Usage_MergeToExisting_Imports_3_3 { val a: A = ??? val b: B = ??? val c: C = ??? val x: X = ??? }
JetBrains/intellij-scala
scala/scala-impl/testdata/move/allInOne/after/org/example1/usage/Usage_MergeToExisting_Imports_3_3.scala
Scala
apache-2.0
231
package com.cloudray.scalapress.search import org.scalatest.{OneInstancePerTest, FunSuite} import org.scalatest.mock.MockitoSugar import javax.servlet.http.HttpServletRequest import com.cloudray.scalapress.folder.Folder import com.cloudray.scalapress.search.tag.CorpusResultSnippetTag import com.cloudray.scalapress.uti...
vidyacraghav/scalapress
src/test/scala/com/cloudray/scalapress/search/CorpusResultSnippetTest.scala
Scala
apache-2.0
1,087
//package dhg.ccg.parse.pcfg // //import org.junit.Test //import org.junit.Assert._ //import dhg.ccg.parse._ //import dhg.ccg.parse.pcfg.mcmc._ //import dhg.ccg.prob._ //import dhg.ccg.cat._ //import dhg.ccg.tagdict._ //import dhg.util._ //import dhg.util._ //import dhg.ccg.util._ //import dhg.util._ //import dhg.util....
dhgarrette/2015-ccg-parsing
src/test/scala/dhg/ccg/parse/pcfg/SupPcfgTrainerITests.scala
Scala
apache-2.0
20,778
package com.twitter.finagle.mysql.transport import com.twitter.io.Buf import org.scalatest.FunSuite class PacketTest extends FunSuite { val seq = 2.toShort val bytes = Array[Byte](0x01, 0x02, 0x03, 0x04) val body = Buf.ByteArray.Owned(bytes) val packet = Packet(seq, body) test("Encode a Packet") { val ...
luciferous/finagle
finagle-mysql/src/test/scala/com/twitter/finagle/mysql/unit/transport/PacketTest.scala
Scala
apache-2.0
482
package simple_interpreter import Token.TokenType class IllegalInterpreterExpression extends Exception class Interpreter(private val lexer: Lexer) { var currentToken: Option[Token] = Option(lexer.getNextToken) def error = throw new IllegalInterpreterExpression def eat(tokenType: TokenType): Unit = { if...
CucumisSativus/simple-interpreter-scala
src/main/scala/simple_interpreter/Interpreter.scala
Scala
mit
2,373
package com.programmaticallyspeaking.ncd.boot import java.net.ConnectException import akka.actor.ActorSystem import com.programmaticallyspeaking.ncd.chrome.domains.EventEmitHook import com.programmaticallyspeaking.ncd.chrome.net.FilePublisher import com.programmaticallyspeaking.ncd.config.Conf import com.programmatic...
provegard/ncdbg
src/main/scala/com/programmaticallyspeaking/ncd/boot/Broker.scala
Scala
bsd-3-clause
3,300
/** * Clase para representar colecciones no vacias * * @param mensajeInicial * @param resto */ class TendenciaNoVacia(mensajeInicial: Tweet, resto: Tendencia) extends Tendencia { /** * Se agrega mensaje al final de la secuencia * * @param mensaje * @return */ def +(mensaje: Tweet): Ten...
fblupi/grado_informatica-NTP
Practicas/P4/src/TendenciaNoVacia.scala
Scala
gpl-2.0
1,013
// A simple nonblocking counter. Can be used to implement semaphores, // or the equivalent to asynchronous unit channels in the join calculus. package chemistry final class Counter(init: Int = 0) { private val state = Ref[java.lang.Integer](init) val get = state.upd[Int] { case i => (i, i) } val inc = state.u...
aturon/ChemistrySet
src/main/scala/data/Counter.scala
Scala
bsd-2-clause
539
package com.typesafe.scalalogging trait LazyLogging extends com.typesafe.scalalogging.slf4j.LazyLogging trait StrictLogging extends com.typesafe.scalalogging.slf4j.StrictLogging
nagavallia/geomesa
geomesa-logger/src/main/scala_2.10/com/typesafe/scalalogging/Logging.scala
Scala
apache-2.0
180
/* * Copyright (C) 2009-2013 Mathias Doenitz, Alexander Myltsev * * 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 ...
ZizhengTai/http4s
parboiled2/src/main/scala/org/http4s/internal/parboiled2/support/package.scala
Scala
apache-2.0
796
/* * 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/piuma
mina/src/main/scala/ch/usi/inf/l3/mina/store/HPEEnvironmentWrapper.scala
Scala
bsd-3-clause
7,325
/* * 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
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/MultiInstanceRelation.scala
Scala
apache-2.0
1,486
// Copyright 2017 Foursquare Labs Inc. All Rights Reserved. package io.fsq.spindle.codegen.runtime import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.databind.node.ObjectNode /* Renders thrift annotations from a [[ScalaProgram]] into json. Entry-point [[jsonBody]]. */ case class RenderJs...
foursquare/fsqio
src/jvm/io/fsq/spindle/codegen/runtime/RenderJson.scala
Scala
apache-2.0
1,828
package feh.tec.world import feh.tec.world.Simple2dDirection.Simple2dDirection trait AbstractSquareMap[Tile <: SquareTile[Tile, (Int, Int)]] extends AbstractWorld[Tile, (Int, Int)] with AbstractWorldOps[Tile, (Int, Int), Simple2dDirection] { implicit class TileCoordinatesWrapper(t: Tile){ def x = t.coordinat...
fehu/agent-tareas
agent/src/main/scala/feh/tec/world/AbstractSquareMap.scala
Scala
mit
3,381
package com.kakao.shaded.jackson.module.scala import com.kakao.shaded.jackson.module.scala.deser.EnumerationDeserializerModule import com.kakao.shaded.jackson.module.scala.ser.EnumerationSerializerModule /** * Adds serialization and deserization support for Scala Enumerations. * * @author Christopher Currie <ccurr...
kakao/mango
mango-shaded/src/main/scala/com/kakao/shaded/jackson/module/scala/EnumerationModule.scala
Scala
apache-2.0
441
package webserviceclients.fakes import pages.changekeeper.PrivateKeeperDetailsPage.{PostcodeValid, PostcodeWithoutAddresses} import play.api.http.Status.OK import play.api.i18n.Lang import play.api.libs.json.Json import play.api.libs.ws.WSResponse import uk.gov.dvla.vehicles.presentation.common.clientsidesession.Track...
dvla/vehicles-change-keeper-online
test/webserviceclients/fakes/FakeAddressLookupWebServiceImpl.scala
Scala
mit
2,535
package scala.build import aQute.bnd.osgi.Builder import aQute.bnd.osgi.Constants._ import java.util.jar.Attributes import sbt._ import sbt.Keys._ import collection.JavaConverters._ import VersionUtil.versionProperties /** OSGi packaging for the Scala build, distilled from sbt-osgi. We do not use sbt-osgi because it ...
martijnhoekstra/scala
project/Osgi.scala
Scala
apache-2.0
4,260
package octopus.async.cats import monix.eval.Task import monix.execution.Scheduler.Implicits.global import octopus.AppError import octopus.async.AsyncValidationSpec import octopus.async.cats.ToFutureImplicits._ class MonixTaskIntegrationSpec extends AsyncValidationSpec[Task] { implicit lazy val appError: AppError[T...
krzemin/octopus
octopusCats/src/test/scala/octopus/async/cats/MonixTaskIntegrationSpec.scala
Scala
apache-2.0
371
package com.atomist.project.common.template import com.atomist.source.ArtifactSource class MustacheMergeToolCreator extends MergeToolCreator { override def createMergeTool(templateContent: ArtifactSource): MergeTool = new MustacheMergeTool(templateContent) }
atomist/rug
src/main/scala/com/atomist/project/common/template/MustacheMergeToolCreator.scala
Scala
gpl-3.0
270
/* * Copyright (c) 2013-2015 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 available at * http://www.opensource.org/licenses/apache2.0.php. ...
setumaven/geomesa
geomesa-compute/src/main/scala/org/locationtech/geomesa/compute/spark/sql/GeoMesaSparkSql.scala
Scala
apache-2.0
13,765
/* * 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 ...
BryanCutler/spark
sql/core/src/test/scala/org/apache/spark/sql/CharVarcharTestSuite.scala
Scala
apache-2.0
36,053
package net.chwthewke.scala.protobuf import scalaz.ReaderWriterState package object plugin { import interface._ type IndexedSeq[+X] = scala.collection.immutable.IndexedSeq[X] type Process[X] = ReaderWriterState[CodeGeneratorRequest, Vector[String], Unit, X] type ProcessW[W, X] = ReaderWriterState[CodeGener...
chwthewke/scala-protobuf
scala-protobuf-plugin-core/src/main/scala/net/chwthewke/scala/protobuf/plugin/package.scala
Scala
apache-2.0
467
/* Copyright (c) 2008 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...
jeppenejsum/gdata-scala-client
src/com/google/xml/combinators/LinearStore.scala
Scala
apache-2.0
6,292
package builder.api_json import builder.JsonUtil import core.{ServiceFetcher, Util} import lib.{Primitives, Text} import play.api.libs.json._ /** * Just parses json with minimal validation - build to provide a way to * generate meaningful validation messages back to user. Basic flow * * JSON => InternalService =>...
movio/apidoc
core/src/main/scala/core/builder/api_json/InternalServiceForm.scala
Scala
mit
26,037
package org.jetbrains.plugins.cbt.runner.internal import com.intellij.execution.configurations.{ConfigurationFactory, ConfigurationType, RunConfiguration} import com.intellij.openapi.module.Module import com.intellij.openapi.project.Project import org.jetbrains.plugins.cbt.runner.CbtProcessListener class CbtBuildConf...
triplequote/intellij-scala
cbt/src/org/jetbrains/plugins/cbt/runner/internal/CbtBuildConfigurationFactory.scala
Scala
apache-2.0
850
/** * Copyright (c) 2015, Cloudera, Inc. All Rights Reserved. * * Cloudera, Inc. licenses this file 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 copy of the License at * * http://www.apache.org/licenses/LIC...
SeelozInc/spark-timeseries
src/test/scala/com/cloudera/sparkts/stats/AugmentedDickeyFullerSuite.scala
Scala
apache-2.0
1,582
package org.jetbrains.plugins.scala package lang package psi package stubs import com.intellij.psi.impl.java.stubs.PsiClassStub import org.jetbrains.plugins.scala.lang.psi.api.toplevel.typedef.ScTemplateDefinition /** * @author ilyas */ trait ScTemplateDefinitionStub extends PsiClassStub[ScTemplateDefinition] with ...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/stubs/ScTemplateDefinitionStub.scala
Scala
apache-2.0
624
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
hequn8128/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/expressions/NonDeterministicTests.scala
Scala
apache-2.0
2,555
package controller import java.io.File import java.nio.file.{Path, Files, Paths} import console.model.World import me.mtrupkin.console.control.{Border, Composite} import me.mtrupkin.console.controller.ControllerStateMachine import me.mtrupkin.console.layout.{Pos, Layout, Orientation} import me.mtrupkin.console.screen...
mtrupkin/console-lib
src/main/scala/controller/SaveGame.scala
Scala
mit
1,454
package co.blocke.scalajack package yaml package primitives import TestUtil._ import munit._ import munit.internal.console import java.lang.{Boolean => JBoolean, Byte => JByte, Double => JDouble, Float => JFloat, Integer => JInt, Long => JLong, Short => JShort} import java.math.{BigDecimal => JBigDecimal, BigInteger =...
gzoller/ScalaJack
core/src/test/scala/co.blocke.scalajack/yaml/primitives/JavaPrim.scala
Scala
mit
12,763
package com.blogspot.ramannanda.scala.algorithms.medium object MatrixFlip { def matrixScore(A: Array[Array[Int]]): Int = { for (i <- A.indices) { if (A(i)(0) == 0) { for (j <- A(i).indices) { A(i)(j) = 1 - A(i)(j) } } } for (j <- A(0).indices) { var zeros = 0 ...
ramannanda9/algorithms-in-scala
src/main/scala/com/blogspot/ramannanda/scala/algorithms/medium/MatrixFlip.scala
Scala
gpl-3.0
865
package org.jetbrains.plugins.scala.lang.psi.api.base.patterns import org.jetbrains.plugins.scala.lang.psi.api.base.ScStableCodeReferenceElement /** * @author Alexander Podkhalyuzin * Patterns, introduced by case classes or extractors */ trait ScConstructorPattern extends ScPattern { def args: ScPatternArgumentList...
gtache/intellij-lsp
intellij-lsp-dotty/src/org/jetbrains/plugins/scala/lang/psi/api/base/patterns/ScConstructorPattern.scala
Scala
apache-2.0
481
package dao.alertwatcherpacs import scala.concurrent.Future import javax.inject.Inject import play.api.db.slick.DatabaseConfigProvider import play.api.db.slick.HasDatabaseConfigProvider import play.api.libs.concurrent.Execution.Implicits.defaultContext import slick.driver.JdbcProfile import slick.jdbc.GetResult import...
tnddn/iv-web
portal/rest-portal/app/dao/alertwatcherpacs/AlertWatcherPACSDao.scala
Scala
apache-2.0
4,074
/* * Copyright (c) 2014 Paul Bernard * * 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...
pmularien/spectrum-old
financial/src/main/scala/org/quantintel/ql/time/DateGeneration.scala
Scala
apache-2.0
2,030
package org.bitcoins.core.protocol.script import org.bitcoins.core.crypto.ECPublicKey import org.bitcoins.core.script.constant.{ BytesToPushOntoStack, OP_0, ScriptConstant } import org.bitcoins.core.util.{BitcoinSLogger, TestUtil} import org.scalatest.{FlatSpec, MustMatchers} /** * Created by chris on 3/8/16....
bitcoin-s/bitcoin-s-core
core-test/src/test/scala/org/bitcoins/core/protocol/script/P2SHScriptSignatureTest.scala
Scala
mit
1,905
package net.atos.entng.rbs.test.integration import io.gatling.core.Predef._ import io.gatling.http.Predef._ import org.entcore.test.appregistry.Role import net.minidev.json.{ JSONValue, JSONObject } import scala.collection.JavaConverters._ import java.util.concurrent.TimeUnit import io.gatling.http.request.StringBody...
docdoku/rbs
src/test/scala/net/atos/entng/rbs/test/integration/RbsScenario.scala
Scala
agpl-3.0
32,422
/*********************************************************************** * 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 ...
nagavallia/geomesa
geomesa-accumulo/geomesa-accumulo-raster/src/main/scala/org/locationtech/geomesa/raster/package.scala
Scala
apache-2.0
4,036
/* * Copyright 2017 by Simba 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 applicable law or agree...
InitialDLab/Simba
src/main/scala/org/apache/spark/sql/simba/DataSet.scala
Scala
apache-2.0
8,578
/********************************************************************************************************************** * This file is part of Scrupal, a Scalable Reactive Web Application Framework for Content Management * * ...
scrupal/scrupal
scrupal-core/src/main/scala/scrupal/core/nodes/AnchorNode.scala
Scala
apache-2.0
2,433
/* * 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.nsc impor...
martijnhoekstra/scala
src/compiler/scala/tools/nsc/Settings.scala
Scala
apache-2.0
640
import language.implicitConversions given Conversion[Int, String] = _.toString object a: val s: String = 1 // OK object b: import language.implicitConversions as _ val s: String = 2 // error object c: import language.implicitConversions val s: String = 3 // OK again
dotty-staging/dotty
tests/neg-custom-args/feature-shadowing.scala
Scala
apache-2.0
304
/* * 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/ShouldSameInstanceAsSpec.scala
Scala
apache-2.0
8,709
package io.cumulus.persistence.stores.orderings import enumeratum.{Enum, EnumEntry} import io.cumulus.persistence.query.QueryOrderingDirection.{ASC, DESC} import io.cumulus.persistence.query.{QueryOrdering, QueryOrderingDirection, SqlOrdering} import io.cumulus.persistence.stores.SessionStore._ import scala.collectio...
Cumulus-Cloud/cumulus
server/cumulus-core/src/main/scala/io/cumulus/persistence/stores/orderings/SessionOrdering.scala
Scala
mit
1,516
/* * 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/core/src/main/scala/org/apache/spark/sql/execution/SortExec.scala
Scala
apache-2.0
8,574
/** * Copyright 2014 Andrea Esposito <and1989@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applic...
roy20021/ONJAG
src/it/unipi/thesis/andrea/esposito/onjag/core/CheckpointCondition.scala
Scala
apache-2.0
1,126
package shield.routing import org.specs2.mutable.Specification import shield.implicits.HttpImplicits._ import spray.http.HttpHeaders.RawHeader import spray.http.{Uri, HttpMethods, HttpHeaders, HttpRequest} class HttpImplicitsSpec extends Specification { "HttpImplicits" should { "Use the latest X-Forwarded-For h...
RetailMeNot/shield
src/test/scala/shield/routing/HttpImplicitsSpec.scala
Scala
mit
6,838
import scala.quoted._ import scala.quoted.staging._ object Test { def main(args: Array[String]): Unit = { given Toolbox = Toolbox.make(getClass.getClassLoader) withQuoteContext('[List]) def list(using QuoteContext) = bound('{List(1, 2, 3)}) println(withQuoteContext(list.show)) println(run(list)...
som-snytt/dotty
tests/run-staging/i5965b.scala
Scala
apache-2.0
675
package io.vamp.model.notification import java.time.OffsetDateTime import io.vamp.common.notification.Notification import io.vamp.model.artifact.{ Deployment, DeploymentCluster } import io.vamp.model.event.Event object SlaEvent { def slaTags(deployment: Deployment, cluster: DeploymentCluster): Set[String] = { ...
magneticio/vamp
model/src/main/scala/io/vamp/model/notification/SlaEvent.scala
Scala
apache-2.0
1,318
/* * 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 ...
aosagie/spark
core/src/test/scala/org/apache/spark/storage/ShuffleBlockFetcherIteratorSuite.scala
Scala
apache-2.0
28,621
package com.eevolution.context.dictionary.domain.model import ai.x.play.json.Jsonx import com.eevolution.context.dictionary.api.{ActiveEnabled, DomainModel, Identifiable, Traceable} import org.joda.time.DateTime /** * Copyright (C) 2003-2017, e-Evolution Consultants S.A. , http://www.e-evolution.com * This progra...
adempiere/ADReactiveSystem
dictionary-api/src/main/scala/com/eevolution/context/dictionary/domain/model/Browse.scala
Scala
gpl-3.0
4,976
/** * Copyright 2015 Thomson Reuters * * Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
nruppin/CM-Well
server/cmwell-data-tools/src/main/scala/cmwell/tools/data/downloader/consumer/ConsumeStateHandler.scala
Scala
apache-2.0
2,653
/* * Copyright (c) 2021, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ package com.krux.hyperion.expression case class ParameterFields( id: String, descripti...
realstraw/hyperion
core/src/main/scala/com/krux/hyperion/expression/ParameterFields.scala
Scala
bsd-3-clause
382
package models.daos.traits.core import play.api.libs.json.JsValue import scala.concurrent.Future import scala.util.Try import play.api.libs.json.OWrites import play.modules.reactivemongo.json.collection.JSONCollection import play.api.libs.json.Reads import play.api.libs.json.JsObject import play.api.libs.json.Writes i...
carlosFattor/DoceTentacaoScala
app/models/daos/traits/core/CrudDAO.scala
Scala
apache-2.0
1,000
package fr.hmil.roshttp import scala.scalajs.js private object CrossPlatformUtils { def encodeURIComponent(query: String): String = js.URIUtils.encodeURIComponent(query) def decodeURIComponent(query: String): String = js.URIUtils.decodeURIComponent(query) }
hmil/RosHTTP
js/src/main/scala/fr/hmil/roshttp/CrossPlatformUtils.scala
Scala
mit
275
trait ValueDiscard[@specialized U] { def u: U } /* Was: scalac-hash v2.11.5 -Ywarn-value-discard test/files/pos/t9020.scala test/files/pos/t9020.scala:2: warning: discarded non-Unit value def u: U ^ one warning found */ trait DiscardThis { import collection.mutable.ListBuffer val b = ListBuffer.empty[Str...
loskutov/intellij-scala
testdata/scalacTests/pos/t9020.scala
Scala
apache-2.0
363
/* * 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...
Myllyenko/incubator-toree
communication/src/test/scala/integration/security/SignatureCheckerActorSpecForIntegration.scala
Scala
apache-2.0
3,243
import org.specs2.mutable._ import org.specs2.runner._ import org.junit.runner._ import play.api.test._ import play.api.test.Helpers._ /** * add your integration spec here. * An integration test will fire up a whole play application in a real (or headless) browser */ @RunWith(classOf[JUnitRunner]) class Integratio...
JavaPosseRoundup/lightning
test/IntegrationSpec.scala
Scala
apache-2.0
577
import sbt._ object GlobalLegacyPlugin extends sbt.Plugin { import sbt.Keys._ val globalLegacyPluginSetting = SettingKey[String]("A top level setting declared by a legacy plugin") val useGlobalLegacyPluginSetting = globalLegacyPluginSetting in Global }
som-snytt/xsbt
sbt/src/sbt-test/project/global-settings/global/plugins/B.scala
Scala
bsd-3-clause
260
package xml.claim import app.ConfigProperties._ import controllers.mappings.Mappings import models.DayMonthYear import models.domain._ import org.joda.time.format.DateTimeFormat import org.joda.time.{Months, DateTime} import play.api.Logger import xml.XMLComponent import scala.xml.NodeSeq /** * Generate the XML pre...
Department-for-Work-and-Pensions/ClaimCapture
c3/app/xml/claim/AssistedDecision.scala
Scala
mit
10,275
package mesosphere.marathon.api.v2.json import mesosphere.marathon.MarathonSpec import mesosphere.marathon.state.{ AppDefinition, PathId, UpgradeStrategy, Timestamp } import mesosphere.marathon.state.PathId._ import org.scalatest.Matchers import play.api.libs.json._ class V2AppDefinitionFormatsTest extends Marat...
sepiroth887/marathon
src/test/scala/mesosphere/marathon/api/v2/json/V2AppDefinitionFormatsTest.scala
Scala
apache-2.0
5,919
package twos import java.awt.{ Color, Font } import scala.swing._ import scala.Vector import twos.game._ import twos.ai._ object TwosForm extends scala.swing.SimpleSwingApplication { trait CanvasProperties { val AIDepth = 8 val AIMaxChecks = 1 val AINeighbourWeight = 5f val AIClosenessWeig...
bch29/twos-ai
src/main/scala/twos/TwosForm.scala
Scala
gpl-2.0
1,142
/* * 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 ...
shaneknapp/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilterSuite.scala
Scala
apache-2.0
89,198
package org.viz.lightning import org.scalatest.{BeforeAndAfterAll, FunSuite} import org.viz.lightning.types.Make class LightningThreeSuite extends FunSuite with BeforeAndAfterAll { var lgn: Lightning = _ override def beforeAll() { lgn = Lightning("http://public.lightning-viz.org") lgn.createSession("tes...
lightning-viz/lightning-scala
src/test/scala/org/viz/lightning/LightningThreeSuite.scala
Scala
mit
579
/** * Copyright 2016 Rackspace US, 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 applicab...
RackerWilliams/attributeMapping
cli/attribmap2json/src/main/scala/com/rackspace/identity/components/cli/AttribMap2JSON.scala
Scala
apache-2.0
4,856
/* * Copyright 2013 http4s.org * * 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 i...
http4s/http4s
tests/shared/src/test/scala/org/http4s/parser/SimpleHeadersSpec.scala
Scala
apache-2.0
8,789
package com.twitter.zk import scala.collection.{Seq, Set} import scala.jdk.CollectionConverters._ import org.apache.zookeeper.common.PathUtils import org.apache.zookeeper.data.{ACL, Stat} import org.apache.zookeeper.{CreateMode, KeeperException, WatchedEvent} import com.twitter.concurrent.{Broker, Offer} import com....
twitter/util
util-zk/src/main/scala/com/twitter/zk/ZNode.scala
Scala
apache-2.0
13,405
//-*- coding: utf-8-unix -*- /** * (C) IT Sky Consulting GmbH 2014 * http://www.it-sky-consulting.com/ * Author: Karl Brodowsky * Date: 2014-05-20 * License: GPL v2 (See https://de.wikipedia.org/wiki/GNU_General_Public_License ) * */ import scala.annotation.tailrec object FactorialTailRecWeakPrivate { def mai...
8l/sysprogramming-examples
scala/FactorialTailRecWeakPrivate.scala
Scala
gpl-2.0
827