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 xyz.hyperreal.prolog import java.io._ abstract class DataStream { protected var _open = true def open = _open def file_name: Option[String] def mode: Symbol def input: Boolean def output: Boolean def alias: Option[Symbol] def position: BigInt def atEnd: Boolean def typ: Symbol ...
edadma/funl
prolog/src/main/scala/xyz/hyperreal/prolog/DataStream.scala
Scala
mit
3,787
package debop4s.timeperiod.timerange import debop4s.core.conversions.jodatime._ import debop4s.timeperiod.TimeSpec._ import debop4s.timeperiod.tests.AbstractTimeFunSuite import debop4s.timeperiod.utils.Times /** * HourRangeTest * Created by debop on 2014. 2. 16. */ class HourRangeFunSuite extends AbstractTimeFunSu...
debop/debop4s
debop4s-timeperiod/src/test/scala/debop4s/timeperiod/timerange/HourRangeFunSuite.scala
Scala
apache-2.0
4,057
case object Empty extends Stream[Nothing] case class Cons[+A](h: () => A, t: () => Stream[A]) extends Stream[A] object Stream { def cons[A](hd: => A, tl: => Stream[A]): Stream[A] = { lazy val head = hd lazy val tail = tl Cons(() => head, () => tail) } def empty[A]: Stream[A] = Empty def apply[A](...
shigemk2/functional_shibuya
chapter05/12.answer.scala
Scala
mit
1,808
object Test { val t: Tuple = Tuple.fromArray(Array("1", "2", "3")) }
lampepfl/dotty
tests/pos/i6506.scala
Scala
apache-2.0
71
/*********************************************************************** * 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-utils/src/main/scala/org/locationtech/geomesa/utils/stats/BinnedArray.scala
Scala
apache-2.0
12,673
/* * 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 ...
dbtsai/spark
examples/src/main/scala/org/apache/spark/examples/ml/ANOVATestExample.scala
Scala
apache-2.0
2,092
/******************************************************************************* * 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/ItemType.scala
Scala
gpl-3.0
983
package org.multibot import java.io.{ByteArrayOutputStream, PrintStream} import com.google.common.cache._ import scala.tools.nsc.interpreter.shell.ReplReporterImpl case class InterpretersCache(preload: List[String]) { private val stdOut = System.out private val stdErr = System.err private val conOut = new Byt...
OlegYch/multibot
src/main/scala/org/multibot/InterpretersCache.scala
Scala
apache-2.0
2,683
/* # 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/reduxForm/MetaProps.scala
Scala
apache-2.0
2,707
package special.collection import scala.reflect.ClassTag import scalan._ import scala.collection.immutable /** Indexed (zero-based) collection of elements of type `A` * @define Coll `Coll` * @define coll collection * @define colls collections * @tparam A the collection element type */ @ContainerType @Funct...
ScorexFoundation/sigmastate-interpreter
library-api/src/main/scala/special/collection/Colls.scala
Scala
mit
22,131
package com.olegych.scastie.client.components.editor import com.olegych.scastie.client.isMac import com.olegych.scastie.client.isMobile import scala.scalajs.js import org.scalajs.dom import codemirror.{Editor => CodeMirrorEditor2, CodeMirror => CM} import japgolly.scalajs.react.BackendScope object EditorOptions { ...
scalacenter/scastie
client/src/main/scala/com.olegych.scastie.client/components/editor/EditorOptions.scala
Scala
apache-2.0
3,087
/* * * ____ __ ____________ ______ * / __/______ _/ /__ /_ __/ _/ //_/_ / * _\\ \\/ __/ _ `/ / _ `// / _/ // ,< / /_ * /___/\\__/\\_,_/_/\\_,_//_/ /___/_/|_| /___/ * * A PGF/TIKZ plot library for Scala. * */ package scalatikz import scalatikz.pgf.Compiler import scalatikz.pgf.enums.{ Co...
vagmcs/ScalaTIKZ
src/main/scala/scalatikz/app/package.scala
Scala
lgpl-3.0
1,978
package com.twitter.finagle.memcached.integration import com.twitter.common.io.FileUtils._ import com.twitter.common.quantity.{Time, Amount} import com.twitter.common.zookeeper.{ZooKeeperUtils, ServerSets, ZooKeeperClient} import com.twitter.conversions.time._ import com.twitter.finagle.MemcachedClient import com.twit...
firebase/finagle
finagle-memcached/src/test/scala/com/twitter/finagle/memcached/integration/MigrationClientTest.scala
Scala
apache-2.0
9,755
object Result { type ResultF[F] = F | Errors type ResultF2[F] = F & Errors case class Errors(msgs: Seq[String]) implicit class ResultFunctions[A](val res: ResultF[A]) extends AnyVal { def map[B](f: A => B): ResultF[B] = res match { case errs: Errors => errs case x: A => f(x) } } implic...
som-snytt/dotty
tests/pos/i2741.scala
Scala
apache-2.0
438
/* * 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/pensions-lifetime-allowance-frontend
app/controllers/PlaLanguageController.scala
Scala
apache-2.0
2,064
package org.eigengo.akkapatterns.core import akka.actor.{ActorRef, Props, ActorSystem} import akka.pattern.ask import akka.util.Timeout import concurrent.Await import org.eigengo.akkapatterns.core.ApplicationActor.Start import com.github.sstone.amqp.ConnectionOwner import com.rabbitmq.client.ConnectionFactory import o...
eigengo/akka-patterns
server/core/src/main/scala/org/eigengo/akkapatterns/core/boot.scala
Scala
apache-2.0
1,443
package com.twitter.inject import scala.reflect._ /** * A factory for retrieving a Scala wrapped SLF4JLogger */ object Logger { def apply[C: ClassTag](): grizzled.slf4j.Logger = { grizzled.slf4j.Logger[C] } }
kaushik94/finatra
inject/inject-core/src/main/scala/com/twitter/inject/Logger.scala
Scala
apache-2.0
220
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
jeremiaswerner/openwhisk
tests/src/test/scala/org/apache/openwhisk/core/controller/test/ActionsApiTests.scala
Scala
apache-2.0
68,280
package org.jetbrains.plugins.scala.annotator.template import com.intellij.lang.annotation.AnnotationHolder import org.jetbrains.plugins.scala.annotator.AnnotatorPart import org.jetbrains.plugins.scala.annotator.quickfix.ImplementMethodsQuickFix import org.jetbrains.plugins.scala.annotator.quickfix.modifiers.AddModifi...
ilinum/intellij-scala
src/org/jetbrains/plugins/scala/annotator/template/NeedsToBeAbstract.scala
Scala
apache-2.0
2,089
package dhg.util import dhg.util.CollectionUtil._ import dhg.util.Pattern._ object CommandLineUtil { private[this] val OptionRegex = "--(.*)".r def parseArgs(args: Array[String]) = { val parsedArgs = ("" +: args.toVector) // prepend an empty arg so sliding will work .sliding(2).flatMap { ...
dhgarrette/2014-ccg-supertagging
src/main/scala/dhg/util/CommandLineUtil.scala
Scala
apache-2.0
1,121
package eu.reactivesystems.league.impl import com.lightbend.lagom.scaladsl.server.LocalServiceLocator import com.lightbend.lagom.scaladsl.testkit.ServiceTest import eu.reactivesystems.league.api._ import org.scalatest.{AsyncWordSpec, BeforeAndAfterAll, Matchers} class LeagueServiceSpec extends AsyncWordSpec with Matc...
reactivesystems-eu/eventsourcing-intro
league-lagom/league-impl/src/test/scala/eu/reactivesystems/league/impl/LeagueServiceSpec.scala
Scala
apache-2.0
1,085
package test package app class C { Ob.f }
yusuke2255/dotty
tests/pos/t0612/C.scala
Scala
bsd-3-clause
45
/* * 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
driver/src/test/scala/com/stratio/sparta/driver/test/stage/InputStageTest.scala
Scala
apache-2.0
6,045
package jgo.tools.compiler package parser.stmts import parser.exprs._ import parser.scoped._ import parser.funcs._ import interm._ import expr._ import expr.Combinators import types._ import symbol._ import codeseq._ import instr._ import instr.TypeConversions._ /** * Provides the grammar and semantics of statement...
thomasmodeneis/jgo
src/src/main/scala/jgo/tools/compiler/parser/stmts/Statements.scala
Scala
gpl-3.0
9,575
package com.outr.arango.api.model import io.circe.Json case class GeneralGraphVertexGetHttpExamplesRc412(error: Boolean, code: Option[Int] = None, errorMessage: Option[String] = None, ...
outr/arangodb-scala
api/src/main/scala/com/outr/arango/api/model/GeneralGraphVertexGetHttpExamplesRc412.scala
Scala
mit
366
package dtc.js import java.time.temporal.{ChronoField, ChronoUnit} import java.time.{DayOfWeek, Duration, LocalDate, LocalTime} import dtc._ import scala.language.implicitConversions import scala.scalajs.js.Date import scala.util.Try import JSDateCompatibility._ /** * Mutability safe wrapper around plain JS Date....
vpavkin/dtc
core/js/src/main/scala/dtc/js/JSDate.scala
Scala
apache-2.0
5,653
package mgoeminne.scalaggplot /** * Coordinate systems adjust the mapping from coordinates * to the 2d plane of the computer screen. */ package object coord { }
mgoeminne/scala-ggplot
src/main/scala/mgoeminne/scalaggplot/coord/package.scala
Scala
lgpl-3.0
166
/** * Copyright 2014 Gianluca Amato <gamato@unich.it> * * This file is part of JANDOM: JVM-based Analyzer for Numerical DOMains * JANDOM 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 o...
rubino22/JDBeta
core/src/test/scala/it/unich/jandom/JandomModQBenchRandomParser.scala
Scala
lgpl-3.0
10,818
package org.jetbrains.plugins.scala package lang package parameterInfo package patternParameterInfo import _root_.scala.util.Sorting import lexer.ScalaTokenTypes import collection.mutable.ArrayBuffer import com.intellij.psi.PsiElement import com.intellij.codeInsight.hint.{HintUtil, ShowParameterInfoContext} import jav...
consulo/consulo-scala
test/org/jetbrains/plugins/scala/lang/parameterInfo/patternParameterInfo/PatternParameterInfoTestBase.scala
Scala
apache-2.0
3,842
package com.twitter.finagle.filter import com.twitter.finagle.stats.StatsReceiver import com.twitter.finagle.{param, Service, ServiceFactory, SimpleFilter, Stack, Stackable} import com.twitter.util.{Stopwatch, Future} private[finagle] object HandletimeFilter { val role = Stack.Role("HandleTime") /** * Creates...
jamescway/finagle
finagle-core/src/main/scala/com/twitter/finagle/filter/HandletimeFilter.scala
Scala
apache-2.0
1,498
package filodb.coordinator import java.util.concurrent.TimeUnit import scala.concurrent.duration.FiniteDuration import scala.util.{Failure, Success} import akka.actor.ActorRef import com.typesafe.scalalogging.StrictLogging import kamon.Kamon import kamon.tag.TagSet import monix.execution.Scheduler.Implicits.{global ...
filodb/FiloDB
coordinator/src/main/scala/filodb.coordinator/TenantIngestionMetering.scala
Scala
apache-2.0
3,818
package org.ensime.server.protocol.swank import org.ensime.api._ object SwankTestData extends EnsimeTestData { val typeInfoStr = """(:arrow-type nil :name "type1" :type-id 7 :decl-as method :full-name "FOO.type1" :type-args nil :members nil :pos nil :outer-type-id 8)""" val typeInspectInfoStr = s"""(:type $type...
eddsteel/ensime
swank/src/test/scala/org/ensime/server/protocol/swank/SwankTestData.scala
Scala
gpl-3.0
4,448
/* * Copyright (C) 2009-2017 Lightbend Inc. <https://www.lightbend.com> */ package play.api.http import javax.inject import javax.inject.Inject import javax.inject.Singleton import com.typesafe.config.ConfigException import play.api.inject.{ Binding, BindingKey, Injector } import play.api.{ Configuration, Environme...
wsargent/playframework
framework/src/play/src/main/scala/play/api/http/HttpFilters.scala
Scala
apache-2.0
4,374
import akka.Done import akka.actor.ActorSystem import com.lightbend.lagom.scaladsl.playjson.JsonSerializerRegistry import com.lightbend.lagom.scaladsl.testkit.PersistentEntityTestDriver import demo.api.basket.{Basket, Item} import demo.impl.basket._ import org.scalactic.TypeCheckedTripleEquals import org.scalatest.{Bef...
tommpy/demo-lagom-checkout
exercise_020_basket_entity/basket-impl/src/test/scala/BasketSpec.scala
Scala
apache-2.0
1,441
package org.mazerunner.core.programs import org.apache.spark.graphx.{EdgeTriplet, Graph, VertexId} import org.mazerunner.core.abstractions.PregelProgram /** * The [[EdgeBetweennessProgram]] is an example graph algorithm implemented on the [[PregelProgram]] * abstraction. */ class EdgeBetweennessProgram(@transient ...
mayblue9/neo4j-mazerunner
src/spark/src/main/scala/org/mazerunner/core/programs/EdgeBetweennessProgram.scala
Scala
apache-2.0
2,816
package ryu object Ryu { /** function for building riak requests (riak default is localhost, 8098) */ def apply(host: String, port: Int) = new Ryu(host, port) /** Link extractor */ object Links { val Header = """<\\/riak\\/(\\w.+)>;\\s*(rel|riaktag)=\\"(\\w.+)\\" """.trim.r def unapply(header: Strin...
softprops/ryu
src/main/scala/ryu/Ryu.scala
Scala
mit
9,781
package models.gitbucket import org.joda.time.DateTime import scalikejdbc._ case class Account( userName: String, mailAddress: String, password: String, administrator: Boolean, url: Option[String] = None, registeredDate: DateTime, updatedDate: DateTime, lastLoginDate: Option[DateTime] = None, image...
thomaschoo/gitolite-to-gitbucket
src/main/scala/models/gitbucket/Account.scala
Scala
mit
5,229
package com.twitter.finagle.stats import com.twitter.conversions.time._ import com.twitter.finagle.builder.{ClientBuilder, ServerBuilder} import com.twitter.finagle.integration.StringCodec import com.twitter.finagle.{Service, WriteException, IndividualRequestTimeoutException} import com.twitter.util.{Await, Future, Pr...
JustinTulloss/finagle
finagle-core/src/test/scala/com/twitter/finagle/stats/StatsReceiverTest.scala
Scala
apache-2.0
6,392
/* * 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 ...
mike0sv/spark
graphx/src/main/scala/org/apache/spark/graphx/util/PeriodicGraphCheckpointer.scala
Scala
apache-2.0
4,236
package models.helper import java.util.UUID import org.joda.time.{LocalDate, LocalTime} case class TimetableDateEntry(weekday: Weekday, date: LocalDate, start: LocalTime, end: LocalTime, room: UUID, supervisor: Set[UUID])
THK-ADV/lwm-reloaded
app/models/helper/TimetableDateEntry.scala
Scala
mit
225
package mesosphere.marathon package core.task.update.impl.steps import akka.event.EventStream import mesosphere.UnitTest import mesosphere.marathon.core.base.ConstantClock import mesosphere.marathon.core.condition.Condition import mesosphere.marathon.core.event.{ InstanceHealthChanged, MarathonEvent } import mesospher...
natemurthy/marathon
src/test/scala/mesosphere/marathon/core/task/update/impl/steps/PostToEventStreamStepImplTest.scala
Scala
apache-2.0
4,888
package slamdata.engine import scalaz._ trait Error extends Throwable { def message: String override def getMessage = message val stackTrace = java.lang.Thread.currentThread.getStackTrace def fullMessage = message + "\\n" + stackTrace.map(_.toString).mkString("\\n") override def toString = fullMessage }...
mossprescott/quasar
src/main/scala/slamdata/engine/errors.scala
Scala
agpl-3.0
6,168
package uk.gov.dvla.vehicles.presentation.common.webserviceclients.common import play.api.libs.json.Json final case class DmsWebEndUserDto(endUserTeamCode: String, endUserTeamDesc: String, endUserRole: String, endUse...
dvla/vehicles-presentation-common
app/uk/gov/dvla/vehicles/presentation/common/webserviceclients/common/DmsWebEndUserDto.scala
Scala
mit
541
package mesosphere.marathon package core.externalvolume.impl.providers import mesosphere.UnitTest import mesosphere.marathon.state.{ ExternalVolume, ExternalVolumeInfo } import mesosphere.marathon.stream.Implicits._ import org.apache.mesos.Protos.{ Parameter, Parameters, Volume } class DVDIProviderVolumeToUnifiedMeso...
Caerostris/marathon
src/test/scala/mesosphere/marathon/core/externalvolume/impl/providers/DVDIProviderVolumeToUnifiedMesosVolumeTest.scala
Scala
apache-2.0
5,308
/* * Copyright 2012-2013 Eligotech BV. * * 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 ...
eligosource/eventsourced
es-journal/es-journal-leveldb/src/main/scala/org/eligosource/eventsourced/journal/leveldb/LeveldbJournalPS.scala
Scala
apache-2.0
6,285
package fpgatidbits.streams import Chisel._ // limits the amount of data passing through a stream // - when not started, the stream just passes through unhindered // - after start (must be held high), first <byteCount> bytes of the // stream pass through. afterwards, no further data is sent to the output. // the ...
maltanar/fpga-tidbits
src/main/scala/fpgatidbits/streams/StreamLimiter.scala
Scala
bsd-2-clause
1,979
package com.emstlk.nacl4s.benchmark import com.emstlk.nacl4s._ import org.openjdk.jmh.annotations._ // This approach allows you encrypt a secret message for your friend, using friend's public key. @State(Scope.Thread) class NaCl_PK_Decrypt_Benchmark { var myKeys: crypto.KeyPair = _ var friendKeys: crypto.KeyPai...
emstlk/nacl4s
src/main/scala/com/emstlk/nacl4s/benchmark/NaCl_PK_Decrypt_Benchmark.scala
Scala
mit
1,022
package com.seanshubin.detangler.report import com.seanshubin.detangler.model.Standalone class PageTemplateRulesImpl(modulesTemplateRules: ModulesTemplateRules, reasonsTemplateRules: ReasonsTemplateRules) extends PageTemplateRules { override def generate(pageTemplate: HtmlElement, contex...
SeanShubin/detangler
report/src/main/scala/com/seanshubin/detangler/report/PageTemplateRulesImpl.scala
Scala
unlicense
1,144
/* * This file is part of Apparat. * * Copyright (C) 2010 Joa Ebert * http://www.joa-ebert.com/ * * This library 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 Lice...
joa/apparat
apparat-core/src/main/scala/apparat/abc/optimization/GarbageRemoval.scala
Scala
lgpl-2.1
1,817
/* * Copyright 2012-2013 Eligotech BV. * * 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 ...
CoderPaulK/eventsourced
es-journal/es-journal-journalio/src/main/scala/org/eligosource/eventsourced/journal/journalio/JournalioJournalProps.scala
Scala
apache-2.0
5,439
package services import javax.inject.{Inject, Singleton} import models.{User, UserSession} import storage.SessionDAO import util.FutureOption import scala.concurrent.Future @Singleton class SessionService @Inject()(uuidGenerator: UUIDGenerator, sessionDAO: SessionDAO) { ...
metaxmx/FridayNightBeer
app/services/SessionService.scala
Scala
apache-2.0
883
package com.github.gtache.lsp.editor.listeners import com.intellij.openapi.editor.event.{SelectionEvent, SelectionListener} /** * Implementation of a SelectionListener */ class SelectionListenerImpl extends SelectionListener with LSPListener { override def selectionChanged(e: SelectionEvent): Unit = if (ch...
gtache/intellij-lsp
intellij-lsp/src/com/github/gtache/lsp/editor/listeners/SelectionListenerImpl.scala
Scala
apache-2.0
364
/* * Viterbi.scala * (FScape) * * Copyright (c) 2001-2022 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU Affero General Public License v3+ * * * For further information, please contact Hanns Holger Rutz at * contact@sciss.de */ package de.sciss.fscape package stre...
Sciss/FScape-next
core/shared/src/main/scala/de/sciss/fscape/stream/Viterbi.scala
Scala
agpl-3.0
11,472
package ghtorrent.models case class Label(id: Int, name: String)
PRioritizer/PRioritizer-analyzer
src/main/scala/ghtorrent/models/Label.scala
Scala
mit
66
/* * Wire * Copyright (C) 2016 Wire Swiss GmbH * * 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 License, or * (at your option) any later version. * * This progr...
wireapp/wire-android-sync-engine
zmessaging/src/main/scala/com/waz/model/AssetStatus.scala
Scala
gpl-3.0
3,585
/* * Copyright © 2015 Lukas Rosenthaler, Benjamin Geer, Ivan Subotic, * Tobias Schweizer, André Kilchenmann, and Sepideh Alassi. * This file is part of Knora. * Knora is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the Free So...
nie-ine/Knora
webapi/src/main/scala/org/knora/webapi/responders/v1/StoreResponderV1.scala
Scala
agpl-3.0
3,924
/* * 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 ...
MLnick/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/DataSourceScanExec.scala
Scala
apache-2.0
20,901
// Generated by the Scala Plugin for the Protocol Buffer Compiler. // Do not edit! // // Protofile syntax: PROTO2 package com.google.protobuf.descriptor /** Encapsulates information about the original source file from which a * FileDescriptorProto was generated. * * @param location * A Location identifies a...
scalapb/ScalaPB
scalapb-runtime/src/main/js-native/com/google/protobuf/descriptor/SourceCodeInfo.scala
Scala
apache-2.0
27,971
package gazette import gazette.Util.dateCodec import java.sql.Date import scodec.{Attempt, Codec, Err} import scodec.codecs.{uint16, utf8, variableSizeBits} import scalaz.Disjunction package object protocol { import remotely.Protocol import remotely.codecs.{list, utf8} val server = Protocol.empty. c...
adelbertc/gazette
protocol/src/main/scala/gazette/protocol/package.scala
Scala
apache-2.0
725
package options_yaml import org.scalacheck.Gen import org.scalacheck.Arbitrary import play.api.libs.json.scalacheck.JsValueGenerators import Arbitrary._ import de.zalando.play.controllers.ArrayWrapper object Generators extends JsValueGenerators { def createBasicRequiredGenerator = _generate(BasicRequir...
zalando/play-swagger
play-scala-generator/src/test/resources/expected_results/test_data/options_yaml.scala
Scala
mit
1,081
/* * 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 ...
h2oai/sparkling-water
api-generation/src/main/scala/ai/h2o/sparkling/api/generation/common/TypeExceptions.scala
Scala
apache-2.0
934
/** Copyright 2015 TappingStone, 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 ...
adamharish/PredictionIO
data/src/main/scala/io/prediction/data/storage/package.scala
Scala
apache-2.0
983
package no.vestein.purplerain.assets import com.badlogic.gdx.Gdx import com.badlogic.gdx.assets.{AssetDescriptor, AssetErrorListener, AssetManager} import com.badlogic.gdx.utils.Disposable object Assets extends Disposable with AssetErrorListener { private var assetManager: AssetManager = _ val TAG: String = getC...
WoodStone/PurpleRain
core/src/main/scala/no/vestein/purplerain/assets/Assets.scala
Scala
gpl-3.0
1,115
/** * (c) Copyright 2012 WibiData, Inc. * * See the NOTICE 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 may obtain a copy of...
alexandre-normand/kiji-schema-shell
src/main/scala/org/kiji/schema/shell/ddl/RowKeySpec.scala
Scala
apache-2.0
2,551
/* * Copyright 2011-2019 Asakusa Framework Team. * * 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 ...
ueshin/asakusafw-spark
runtime/src/test/scala/com/asakusafw/spark/runtime/SparkForAll.scala
Scala
apache-2.0
1,996
/* * 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 ...
zouzias/spark-lucenerdd
src/main/scala/org/zouzias/spark/lucenerdd/response/FieldType.scala
Scala
apache-2.0
1,063
package org.scalaide.debug.internal.ui import scala.util.Failure import scala.util.Success import org.eclipse.jdt.internal.debug.core.breakpoints.JavaLineBreakpoint import org.eclipse.jface.dialogs.MessageDialog import org.scalaide.debug.BreakpointContext import org.scalaide.debug.ContinueExecution import org.scalaide...
scala-ide/scala-ide
org.scala-ide.sdt.debug.expression/src/org/scalaide/debug/internal/ui/BreakpointEventHandler.scala
Scala
bsd-3-clause
2,534
package com.flowlikeariver.kakuro { import org.scalatest._ import Kakuro._ class TestKakuro extends UnitSpec { "An empty cell" should "draw as hyphens" in { assert(" ----- " == draw(e)) } "An across cell" should "draw" in { assert(" --\\\\ 9 " == draw(aa(9))) } "A down cell" should "...
gavilancomun/kakuro-scala
src/test/scala/com/flowlikeariver/kakuro/TestKakuro.scala
Scala
apache-2.0
2,086
package org.openurp.edu.eams.teach.grade.course.service.impl import org.openurp.edu.eams.teach.grade.service.NumPrecisionReserveMethod class More01ReserveMethod extends NumPrecisionReserveMethod { def reserve(num: Float, precision: Int): Float = { val mutilply = Math.pow(10, precision + 1).toInt var res ...
openurp/edu-eams-webapp
grade/src/main/scala/org/openurp/edu/eams/teach/grade/course/service/impl/More01ReserveMethod.scala
Scala
gpl-3.0
629
package org.soic.eac import org.apache.spark.ml.Pipeline import org.apache.spark.ml.classification.RandomForestClassifier import org.apache.spark.ml.feature.{VectorAssembler, StringIndexer} import org.apache.spark.ml.tuning.{TrainValidationSplit, ParamGridBuilder, CrossValidator} import org.apache.spark.mllib.linalg._...
vahidj/eac
src/main/scala/org/soic/eac/RF.scala
Scala
apache-2.0
8,185
package dibl.fte import org.ejml.simple.SimpleMatrix import scala.util.{ Failure, Success, Try } /** JVM API, not in src.main to allow the SBT compilation to JavaScript */ object Deltas { def apply(data: Seq[Seq[Double]], topoLinks: Seq[TopoLink], ): Try[Map[TopoLink, Delta]] = { // ...
jo-pol/GroundForge
src/test/scala/dibl/fte/Deltas.scala
Scala
gpl-3.0
1,040
package jadeutils.common import org.scalatest.junit.JUnitRunner import org.scalatest.FunSuite import org.junit.runner.RunWith import net.iharder.Base64 import org.apache.commons.lang.StringUtils.isBlank object ProxyType extends Enumeration { val NONE, HTTP, SOCKS4, SOCKS5 = Value } @RunWith(classOf[JUnitRunner]) ...
Jade-Shan/Jade-XMPP
src/test/scala/utils/commonTest.scala
Scala
gpl-3.0
1,055
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.internal.projection import scala.concurrent.duration.Duration import akka.annotation.InternalApi import com.typesafe.config.Config import java.util.concurrent.TimeUnit import scala.concurrent.duration._ @Internal...
TimMoore/lagom
projection/core/src/main/scala/com/lightbend/lagom/internal/projection/WorkerConfig.scala
Scala
apache-2.0
994
package eagerEval import leon._ import annotation._ import invariant._ import instrumentation._ object BigNums { sealed abstract class Digit case class Zero() extends Digit { @ignore override def toString = "0" } case class One() extends Digit { @ignore override def toString = "1" } s...
epfl-lara/leon
testcases/lazy-datastructures/eager/BigNums.scala
Scala
gpl-3.0
1,765
package org.rz.fps.week3.lecture3 /** * Nil class acting like an empty node for an immutable list. * * Created by rozasdev on 17/01/16. */ class Nil[T] extends List[T] { /** * Checks if a list is empty. * * @return True if the list is empty, otherwise false. */ override def isEmpty: Boolean...
rozasdev/FPS
code/Week3/src/org/rz/fps/week3/lecture3/Nil.scala
Scala
apache-2.0
580
package scalacookbook.chapter16 import org.springframework.context.support.ClassPathXmlApplicationContext import org.springframework.jdbc.core.support.JdbcDaoSupport /** * You want to connect to a database using the Spring Framework. * This gives you a nice way to add connection pooling and * other capabilitie...
liguodongIOT/java-scala-mix-sbt
src/main/scala/scalacookbook/chapter16/ScalaJdbcConnectBySpring.scala
Scala
apache-2.0
1,033
/* * Copyright 2019 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...
rossabaker/http4s
ember-server/shared/src/test/scala/org/http4s/ember/server/internal/StreamForkingSuite.scala
Scala
apache-2.0
2,073
package se.gigurra.renderer.glimpl.vbos import java.nio.FloatBuffer import javax.media.opengl.GL import javax.media.opengl.GL2ES3 import javax.media.opengl.GL3ES3 import se.gigurra.renderer.glimpl.GlIntegers import se.gigurra.renderer.glimpl.GlShaderProgram class MatrixUniformBuffer( _gl_init: GL3ES3, val pro...
GiGurra/gigurra-scala-2drenderer
src/main/scala/se/gigurra/renderer/glimpl/vbos/MatrixUniformBuffer.scala
Scala
mit
1,285
package com.twitter.finagle.memcached import _root_.java.io.ByteArrayInputStream import _root_.java.net.{SocketAddress, InetSocketAddress} import com.google.gson.GsonBuilder import com.twitter.common.io.{Codec,JsonCodec} import com.twitter.common.quantity.{Amount,Time} import com.twitter.common.zookeeper.{ServerSets, ...
stevegury/finagle
finagle-memcached/src/main/scala/com/twitter/finagle/memcached/CachePoolCluster.scala
Scala
apache-2.0
18,121
// relevant doc: // * https://developer.github.com/guides/getting-started/ // * https://developer.github.com/v3/ // A note on terminology: a repository is identified by a combination // of a user name and a repository name. The user name might be an // individual's, but is more likely an organization name. // A note...
adriaanm/scabot
github/src/main/scala/scabot/github/GithubApi.scala
Scala
bsd-3-clause
18,483
package unfiltered.kit import org.specs2.mutable._ import unfiltered.request._ object RoutesRegexSpecJetty extends Specification with unfiltered.specs2.jetty.Planned with RoutesRegexSpec object RoutesRegexSpecNetty extends Specification with unfiltered.specs2.netty.Planned with RoutesRegexSpec trait RoutesRegexSpe...
hamnis/unfiltered
library/src/test/scala/RoutesRegexSpec.scala
Scala
mit
1,695
/** * 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...
rhauch/kafka
core/src/test/scala/integration/kafka/api/ProducerCompressionTest.scala
Scala
apache-2.0
4,625
/* * 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 ...
cin/spark
sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcSourceSuite.scala
Scala
apache-2.0
9,341
/* *\\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2014, G...
non/squants
src/test/scala/squants/energy/PowerSpec.scala
Scala
apache-2.0
4,523
/** * Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0 * See accompanying LICENSE file. */ package controllers import java.util.Properties import kafka.manager.ActorModel.TopicIdentity import kafka.manager.utils.TopicConfigs import kafka.manager.{Kafka_0_8_2_1, ApiError, Kafka_0_8_2_0, Kaf...
surajacharya/kafka-manager
app/controllers/Topic.scala
Scala
apache-2.0
13,807
package com.socrata.datacoordinator.truth.sql import java.sql.Connection import scala.io.{Source, Codec} import com.rojoma.simplearm.v2._ import com.socrata.datacoordinator.util.TemplateReplacer object DatabasePopulator { private def load(template: String) = using(getClass.getResourceAsStream(template)) { str...
socrata-platform/data-coordinator
coordinatorlib/src/main/scala/com/socrata/datacoordinator/truth/sql/DatabasePopulator.scala
Scala
apache-2.0
1,489
package x7c1.wheat.macros.intent import android.content.{Context, Intent} import scala.language.experimental.macros import scala.reflect.macros.blackbox trait IntentBuilder[A]{ def build(context: Context, klass: Class[_]): Intent } object IntentBuilder { def from[A](f: A => Unit): IntentBuilder[A] = macro ...
x7c1/Linen
wheat-macros/src/main/scala/x7c1/wheat/macros/intent/IntentBuilder.scala
Scala
mit
661
package vep.app.production.reservation object ReservationMessages { val existingReservation = "Il existe déjà des réservations pour cette séance. Changer de théêtre est donc impossible." val closedReservation = "Les réservations sont dorénavant closes." val unknownPrice = "Veuillez sélectionner un tarif dans la ...
kneelnrise/vep
src/main/scala/vep/app/production/reservation/ReservationMessages.scala
Scala
mit
463
package org.sapia.mediafire.core import java.io.File import java.util.Properties import java.io.InputStream import java.io.FileInputStream /** * A factory class used to obtain MfCredentials instances. */ object CredentialsFactory { /** * Loads the Mediafire credentials from a properties file (<code>mediafire....
sapia-oss/mediafire_maven_plugin
core/src/main/scala/org/sapia/mediafire/core/CredentialsFactory.scala
Scala
apache-2.0
1,761
package parallelprogramming.week1.scalashop import org.scalameter._ import parallelprogramming.scalashop._ object VerticalBoxBlurRunner { val standardConfig = config( Key.exec.minWarmupRuns -> 5, Key.exec.maxWarmupRuns -> 10, Key.exec.benchRuns -> 10, Key.verbose -> true ) withWarmer(new Warmer.D...
tomduhourq/learning-concurrent-programming
src/main/scala/parallelprogramming/week1/scalashop/VerticalBoxBlur.scala
Scala
apache-2.0
2,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 ...
SarahMehddi/HelloWorld
repository/src/test/scala/org/apache/atlas/query/QueryTestsUtils.scala
Scala
apache-2.0
8,154
package com.spark import org.apache.log4j._ import org.apache.spark._ /** Count up how many of each star rating exists in the MovieLens 100K data set. */ object Test { /** Our main function where the action happens */ def main(args: Array[String]) { // Set the log level to only print errors Logger.getLo...
vikramkb/spark
src/main/scala/com/spark/Test.scala
Scala
apache-2.0
1,154
/** * 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...
hochgi/CM-Well
server/cmwell-data-tools/src/test/scala/cmwell/tools/data/helpers/BaseWiremockSpec.scala
Scala
apache-2.0
1,410
package integration import mocks.{MailServiceMock, AuthServiceMock, Samples} import models.Formatters._ import org.scalatestplus.play.OneAppPerSuite import play.api.Application import play.api.inject.bind import play.api.libs.json.Json import play.api.test.FakeRequest import play.api.test.Helpers._ import services.{Au...
waveinch/ses-transactional
test/integration/MailerControllerIntegration.scala
Scala
apache-2.0
1,251
package is.hail.types.physical import is.hail.annotations.{Annotation, Region} import is.hail.asm4s._ import is.hail.expr.ir.EmitCodeBuilder import is.hail.types.physical.stypes.SValue import is.hail.types.physical.stypes.concrete.{SBinaryPointer, SBinaryPointerValue} import is.hail.utils._ case object PCanonicalBina...
hail-is/hail
hail/src/main/scala/is/hail/types/physical/PCanonicalBinary.scala
Scala
mit
7,837
package ee.cone.c4actor import ee.cone.c4actor.Types.SrcId import ee.cone.c4assemble.Assemble case class SyncTxTask[D_Item<:Product]( srcId: SrcId, from: Option[D_Item], to: Option[D_Item], events: List[LEvent[D_Item]] ) object SyncTx { type NeedSrcId = SrcId } trait SyncTxFactory { def create[D_Item<:P...
wregs/c4proto
c4actor-base/src/main/scala/ee/cone/c4actor/SyncTxApi.scala
Scala
apache-2.0
497
package reopp.common.guardedcommands.chocox import reopp.common.guardedcommands._ import reopp.common.choco.genericconstraints.PredManager import _root_.choco.kernel.model.variables.integer.IntegerVariable import _root_.choco.kernel.model.constraints.{Constraint => ChocoConstr} import _root_.choco.cp.solver.CPSolver i...
joseproenca/ip-constraints
code/src/main/scala/reopp/common/guardedcommands/chocox/ChocoX.scala
Scala
mit
8,861
/* * 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 ...
apache/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/expressions/validation/ScalarOperatorsValidationTest.scala
Scala
apache-2.0
3,586
/* * Copyright (c) 2016, Innoave.com * All rights reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN...
haraldmaida/AbacusSFX
src/main/scala/com/innoave/abacus/fxui/view/RodView.scala
Scala
apache-2.0
5,827
package com.tuvistavie.scalog package repl import parsers.DatalogParser import engine.ExecutableQuery._ import com.tuvistavie.scalog.engine._ import com.tuvistavie.scalog.models._ import com.tuvistavie.scalog.models.Import import com.tuvistavie.scalog.models.Query class Repl(implicit val db: Database) extends Datalo...
tuvistavie/scalog
src/main/scala/com/tuvistavie/scalog/repl/Repl.scala
Scala
mit
1,979