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 2018 Analytics Zoo 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...
intel-analytics/analytics-zoo
zoo/src/main/scala/com/intel/analytics/zoo/pipeline/api/keras/layers/MaxPooling1D.scala
Scala
apache-2.0
3,406
package cpup.mc.oldenMagic.api.oldenLanguage.textParsing class InvalidTransformException(msg: String) extends Exception(msg)
CoderPuppy/oldenmagic-mc
src/main/scala/cpup/mc/oldenMagic/api/oldenLanguage/textParsing/InvalidTransformException.scala
Scala
mit
125
package chapter13 /** * 13μž₯ νŒ¨ν‚€μ§€μ™€ μž„ν¬νŠΈ * * 특히 규λͺ¨κ°€ 큰 ν”„λ‘œκ·Έλž¨μ„ μž‘μ„± μ‹œ, μ»€ν”Œλ§μ„ μ΅œμ†Œν™” ν•˜λŠ” 것이 μ€‘μš”. * λͺ¨λ“ˆν™” ν•œλ‹€. 각 λͺ¨λ“ˆμ€ λ‚΄λΆ€(κ΅¬ν˜„) μ™ΈλΆ€(μΈν„°νŽ˜μ΄μŠ€)κ°€ μžˆλ‹€. μ‹€μ œ λ³€κ²½μœΌλ‘œ μΈν•œ * 영ν–₯λ„λŠ” μ™ΈλΆ€(μΈν„°νŽ˜μ΄μŠ€)에 κ±Έλ €μžˆμœΌλ‹ˆ, ν˜‘μ—…μ΄ 깔끔해진닀. * * 13μž₯은 ν”„λ‘œκ·Έλž¨μ„ λͺ¨λ“ˆν™” μŠ€νƒ€μΌλ‘œ μž‘μ„±ν•˜λŠ” 것을 λ„μ™€μ£ΌλŠ” μ—¬λŸ¬ κ΅¬μ„±μš”μ†Œλ₯Ό μ„€λͺ…ν•œλ‹€. * - νŒ¨ν‚€μ§€ μ•ˆμ— μ½”λ“œ μ±„μš°κΈ° * - μž„ν¬νŠΈλ‘œ μ™ΈλΆ€ 이름 뢈러였기 * - μ ‘κ·Ό μˆ˜μ‹μžλ₯Ό 톡해 μ ‘κ·Ό μ œμ–΄ * * μžλ°”μ™€ μœ μ‚¬ν•΄ λ³΄μ΄κ² μ§€λ§Œ 슀칼라μͺ½μ΄...
seraekim/srkim-lang-scala
src/main/java/chapter13/c13_i01.scala
Scala
bsd-3-clause
1,352
package cwe.scala.library.reasoning /** * Represents a choice on options of type T */ trait Choice[T] { /** * Adopted options of type T */ def adopted: List[T] /** * Rejected options of type T */ def rejected: List[T] }
wwwigii-system/research
cwe-scala-library/src/cwe/scala/library/reasoning/Choice.scala
Scala
gpl-3.0
234
/* * Copyright 2007-2010 WorldWide Conferencing, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
jeppenejsum/liftweb
framework/lift-base/lift-webkit/src/main/scala/net/liftweb/builtin/snippet/Msgs.scala
Scala
apache-2.0
4,461
/* Copyright 2013 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
zirpins/summingbird
summingbird-scalding/src/main/scala/com/twitter/summingbird/batch/state/storehaus/StorehausVersioningCheckpointState.scala
Scala
apache-2.0
2,018
package pl.suder.scala.auctionHouse import akka.actor._ import akka.event.LoggingReceive import pl.suder.scala.auctionHouse.Message._ import scala.concurrent.duration.`package`.DurationInt import akka.actor.SupervisorStrategy.{ Restart, Stop } import java.util.concurrent.TimeoutException class Notifier extends Actor ...
Materix/Sem7-Scala
src/main/scala/pl/suder/scala/auctionHouse/Notifier.scala
Scala
mit
672
package com.sksamuel.elastic4s.searches.queries import com.sksamuel.elastic4s.searches.queries.term.TermsLookupQueryDefinition import org.elasticsearch.index.query.{QueryBuilders, TermsQueryBuilder} object TermsLookupQueryBuilderFn { def apply(q: TermsLookupQueryDefinition): TermsQueryBuilder = { val builder = ...
aroundus-inc/elastic4s
elastic4s-tcp/src/main/scala/com/sksamuel/elastic4s/searches/queries/TermsLookupQueryBuilderFn.scala
Scala
apache-2.0
436
package definiti.core.end2end.controls import definiti.common.ast.Root import definiti.common.program.Ko import definiti.common.tests.{ConfigurationMock, LocationPath} import definiti.core.ProgramResultMatchers._ import definiti.core._ import definiti.core.end2end.EndToEndSpec import definiti.core.validation.controls....
definiti/definiti-core
src/test/scala/definiti/core/end2end/controls/VerificationIsBooleanControlSpec.scala
Scala
mit
1,695
package models import play.api.libs.json.Json case class Genre( name: String, description: Option[String] ) object Genre { implicit val jsonFormat = Json.format[Genre] }
leanovate/book-db-sample
backends/play-scala-slick/app/models/Genre.scala
Scala
mit
226
package io.datalayer.randomforest object Main extends App { /* ---------------------------------------- * Using the old data representation * ---------------------------------------- */ // Generating some data val train = dataGenerator.genLabeled(numInstances=200, numFeatures=10) val test =...
0asa/algorithm
src/main/scala/io/datalayer/randomforest/Main.scala
Scala
apache-2.0
1,168
/** * Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0 * See accompanying LICENSE file. */ package kafka.manager.utils import kafka.manager.ClusterConfig import org.scalatest.{Matchers, FunSuite} /** * @author hiral */ class TestClusterConfig extends FunSuite with Matchers { test("inva...
patricklucas/kafka-manager
test/kafka/manager/utils/TestClusterConfig.scala
Scala
apache-2.0
1,670
package org.raisercostin.own import org.scalatest._ import org.junit.runner.RunWith import org.junit.Assert._ import org.scalatest.junit.JUnitRunner import org.raisercostin.tags.raw import org.raisercostin.jedi._ import org.raisercostin.jedi.Locations import org.joda.time.DateTime import org.joda.time.DateTimeZone imp...
raisercostin/ownit
src/test/scala/org/raisercostin/own/RawTest.scala
Scala
apache-2.0
10,676
package domain.time import java.time.temporal.ChronoUnit import java.time.ZonedDateTime import scala.concurrent.duration.FiniteDuration import scala.concurrent.duration._ object ScheduleHelper { def initialDelay(interval: FiniteDuration): FiniteDuration = { initialDelay(interval, DateUtil.now()) } def in...
rysh/scalatrader
scalatrader/app/domain/time/ScheduleHelper.scala
Scala
mit
638
package tscfg.exceptions /** Exception to indicate, that there is a problem in the definition of an * object * * @param msg * Error message * @param cause * What caused the error */ final case class ObjectDefinitionException( private val msg: String = "", private val cause: Throwable = None.o...
carueda/tscfg
src/main/scala/tscfg/exceptions/ObjectDefinitionException.scala
Scala
apache-2.0
358
/* * 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-libraries/flink-gelly-scala/src/main/scala/org/apache/flink/graph/scala/utils/EdgeToTuple3Map.scala
Scala
apache-2.0
1,159
package scala.tools.nsc package backend.jvm package opt import org.junit.Assert._ import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.JUnit4 import scala.tools.asm.Opcodes._ import scala.tools.partest.ASMConverters._ import scala.tools.testing.AssertUtil._ import scala.tools.testing.Bytecod...
felixmulder/scala
test/junit/scala/tools/nsc/backend/jvm/opt/UnreachableCodeTest.scala
Scala
bsd-3-clause
9,361
package colang.ast.parsed.routines import colang.ast.parsed.statement.Statement import colang.ast.parsed.{LocalContext, Type, Variable} import colang.issues.{Issue, Terms} import colang.ast.raw import colang.tokens.StaticKeyword private[routines] object RegisterStaticVariables { /** * "Registers" static variab...
psenchanka/colang
src/main/scala/colang/ast/parsed/routines/RegisterStaticVariables.scala
Scala
mit
1,343
package $organization$ import akka.actor.{Props, ActorRef, ActorSystem} import akka.io.IO import spray.can.Http object Boot extends App { implicit val actorSystem = ActorSystem() val router: ActorRef = actorSystem.actorOf(Props[RestRouter]) val port = sys.env.get("PORT").map(_.toInt).getOrElse(8080) IO(Ht...
polymorphic/spray-svc.g8
src/main/g8/src/main/scala/$organization__packaged$/Boot.scala
Scala
apache-2.0
383
package dx.api import spray.json._ case class DxWorkflowStageDesc(id: String, executable: String, name: String, input: JsValue) // A stand in for the DxWorkflow.Stage inner class (we don't have a constructor for it) case class DxWorkflowStage(id: String) { def getId: String = id def getInputReference(inputName:...
dnanexus-rnd/dxWDL
src/main/scala/dx/api/DxWorkflow.scala
Scala
apache-2.0
6,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 ...
mahak/spark
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/ExpressionParserSuite.scala
Scala
apache-2.0
40,485
package microtools.models import java.time.format.DateTimeFormatter import java.time.{DateTimeException, Instant} import play.api.libs.json._ trait Protocol { def enumReads[E <: Enumeration](enum: E): Reads[E#Value] = implicitly[Reads[String]].flatMap { s => Reads[E#Value] { _ => try { ...
21re/play-micro-tools
src/main/scala/microtools/models/Protocol.scala
Scala
mit
1,549
/* * 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/main/scala/org/neo4j/cypher/internal/compiler/v2_3/pipes/AllNodesScanPipe.scala
Scala
apache-2.0
2,194
package mesosphere.marathon package core.launcher import org.rogach.scallop.ScallopConf trait OfferProcessorConfig extends ScallopConf { lazy val declineOfferDuration = opt[Long]( "decline_offer_duration", descr = "(Default: 120 seconds) " + "The duration (milliseconds) for which to decline offers by...
gsantovena/marathon
src/main/scala/mesosphere/marathon/core/launcher/OfferProcessorConfig.scala
Scala
apache-2.0
361
package scalax.collection /** * This package contains type constructors facilitating input (loading) from * and output (unloading) to streams and specific external data stores. * * @author Peter Empen */ package object io { }
opyate/scala-graph
core/src/main/scala/scalax/collection/io/package.scala
Scala
bsd-3-clause
232
package spire.algebra import spire.math._ import org.scalatest.FunSuite import scala.reflect.ClassTag class NRootTest extends FunSuite { def testIntegralNRoot[A: Numeric: ClassTag]: Unit = { val cls = implicitly[ClassTag[A]].runtimeClass.getSimpleName test("Integral NRoot (%s)" format cls) { val one...
woparry/spire
tests/src/test/scala/spire/algebra/NRootTest.scala
Scala
mit
1,836
/* * 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 ...
fhueske/flink
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/batch/sql/agg/WindowAggregateTest.scala
Scala
apache-2.0
10,877
package com.twitter.io import java.nio.CharBuffer import java.nio.charset.Charset /** * Buf represents a fixed, immutable byte buffer. Buffers may be * sliced and concatenated, and thus be used to implement * bytestreams. * * Note: There is a Java-friendly API for this trait: [[com.twitter.io.AbstractBuf]]. */ t...
stremlenye/util
util-core/src/main/scala/com/twitter/io/Buf.scala
Scala
apache-2.0
24,117
package com.arcusys.valamis.web.servlet.scorm import java.net.URLDecoder import com.arcusys.valamis.lesson.model.LessonType import com.arcusys.valamis.lesson.scorm.model.manifest.{LeafActivity, ResourceUrl} import com.arcusys.valamis.lesson.scorm.model.sequencing.{ProcessorResponseDelivery, ProcessorResponseEndSessio...
arcusys/Valamis
valamis-portlets/src/main/scala/com/arcusys/valamis/web/servlet/scorm/SequencingServlet.scala
Scala
gpl-3.0
7,249
import leon.lang._ object ObjectHierarchyMutation6 { case class A(var x: Int, var y: Int) case class B(a1: A, a2: A) case class C(b1: B, b2: B) def updateA(a: A): Unit = { a.x = 43 } def update(c: C): Int = { updateA(c.b2.a1) c.b2.a1.x } ensuring(res => res == 43) }
regb/leon
src/test/resources/regression/verification/xlang/valid/ObjectHierarchyMutation6.scala
Scala
gpl-3.0
298
package com.arcusys.valamis.settings.model object SettingType { val IssuerName = "IssuerName" val IssuerURL = "IssuerURL" val IssuerOrganization = "IssuerOrganization" val IssuerEmail = "IssuerEmail" val DBVersion = "DBVersion" val GoogleClientId = "GoogleClientId" val GoogleAppId = "GoogleAppId" val G...
arcusys/Valamis
valamis-core/src/main/scala/com/arcusys/valamis/settings/model/SettingType.scala
Scala
gpl-3.0
633
package com.twitter.finagle.memcached.integration import _root_.java.io.ByteArrayOutputStream import _root_.java.lang.{Boolean => JBoolean} import com.twitter.common.application.ShutdownRegistry.ShutdownRegistryImpl import com.twitter.common.zookeeper.ServerSet.EndpointStatus import com.twitter.common.zookeeper.testin...
kristofa/finagle
finagle-memcached/src/test/scala/com/twitter/finagle/memcached/integration/ClusterClientTest.scala
Scala
apache-2.0
21,541
package views.html.tv import lila.api.Context import lila.app.templating.Environment._ import lila.app.ui.ScalatagsTemplate._ import controllers.routes object side { def channels( channel: lila.tv.Tv.Channel, champions: lila.tv.Tv.Champions, baseUrl: String ): Frag = div(cls := "tv-channel...
luanlv/lila
app/views/tv/side.scala
Scala
mit
2,492
/* * 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...
intel-analytics/BigDL
scala/dllib/src/main/scala/com/intel/analytics/bigdl/dllib/tensor/DnnTensor.scala
Scala
apache-2.0
21,114
/* 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 to in writing, software distr...
twitter/scalding
scalding-core/src/main/scala/com/twitter/scalding/Operations.scala
Scala
apache-2.0
28,769
package edu.nus.systemtesting import java.nio.file.Files import java.nio.file.Path import java.nio.file.Paths import scala.sys.process.Process import org.scalatest.BeforeAndAfter import org.scalatest.FlatSpec import com.typesafe.config.ConfigException import com.typesafe.config.ConfigFactory import edu.nus.systemt...
rgoulter/system-testing
src/test/scala/edu/nus/systemtesting/DirtyRepoSpec.scala
Scala
mit
3,880
package org.bfc.streaming.twitter trait Credentials {_: org.bfc.streaming.core.util.Config => import Credentials._ System.setProperty(ConsumerKey, config.getString(ConsumerKey)) System.setProperty(ConsumerSecret, config.getString(ConsumerSecret)) System.setProperty(AccessToken, config.getString(AccessTo...
JSantosP/twitter-stream
src/main/scala/org/bfc/streaming/twitter/Credentials.scala
Scala
apache-2.0
652
package pages.disposal_of_vehicle import org.openqa.selenium.WebDriver import org.scalatest.selenium.WebBrowser import WebBrowser.find import WebBrowser.id import WebBrowser.Element import uk.gov.dvla.vehicles.presentation.common.helpers import helpers.webbrowser.{Page, WebDriverFactory} import views.disposal_of_vehic...
dvla/vehicles-online
test/pages/disposal_of_vehicle/DisposeFailurePage.scala
Scala
mit
852
/* * Copyright 2017 Datamountaineer. * * 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...
CodeSmell/stream-reactor
kafka-connect-elastic/src/main/scala/com/datamountaineer/streamreactor/connect/elastic/ElasticSinkTask.scala
Scala
apache-2.0
2,675
package com.bicou.play.json import play.api.libs.json._ package object optionoption { implicit class PlayJsonOptionOption(path: JsPath) { def readOptionOption[A](implicit r: Reads[A]): Reads[Option[Option[A]]] = OptionOption.reads[A](path)(r) def writeOptionOption[A](implicit w: Writes[A]): OWrites[Optio...
bicouy0/play-json-option-option
src/main/scala/com/bicou/play/json/package.scala
Scala
mit
491
package component import core._ import akka.actor.{Actor, ActorRefFactory, Props} import java.util.UUID import org.joda.time.DateTime import scala.collection.immutable.Map class ModelBlog(val mode: Option[String]) extends Actor { // Dummy data for illustration purposes, in ascending order by date val tableBlog =...
enpassant/jeeves
src/main/scala/component/ModelBlog.scala
Scala
apache-2.0
1,301
package com.github.mpetruska.ukmodulo.table import java.io.Reader import com.github.mpetruska.ukmodulo.Error import com.github.mpetruska.ukmodulo.digits.AccountDigits import com.github.mpetruska.ukmodulo.table.ModulusWeightRowParser._ object ModulusWeightTable extends ResourceTable { type Row = ModulusWeightRow ...
mpetruska/uk-modulo-scala
src/main/scala/com/github/mpetruska/ukmodulo/table/ModulusWeightTable.scala
Scala
mit
923
package io.pathfinder.data import com.avaje.ebean.Model import com.avaje.ebean.Model.Find /** * subclasses can use callbacks to listen to changes to models in the specified dao */ abstract class ObserverDao[V <: Model](dao: CrudDao[Long,V]) extends CrudDao[Long,V] { def this(find: Find[Long,V]) = this(new EbeanC...
CSSE497/pathfinder-server
app/io/pathfinder/data/ObserverDao.scala
Scala
mit
1,237
/* * 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 ...
WangTaoTheTonic/flink
flink-streaming-scala/src/test/scala/org/apache/flink/streaming/api/scala/ScalaStreamingMultipleProgramsTestBase.scala
Scala
apache-2.0
1,711
package dotty.tools package repl import scala.language.unsafeNulls import java.io.File import java.nio.file.{Path, Files} import java.util.Comparator import org.junit.{Test, Ignore, BeforeClass, AfterClass} import dotc.Driver import dotc.reporting.TestReporter import dotc.interfaces.Diagnostic.ERROR import vulpix.{...
dotty-staging/dotty
compiler/test/dotty/tools/repl/ShadowingTests.scala
Scala
apache-2.0
5,191
/* * 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 ...
ytchen0323/cloud-scale-bwamem
src/main/scala/cs/ucla/edu/bwaspark/FastMap.scala
Scala
apache-2.0
32,470
package se.stagehand.swing.lib import java.awt.Point import java.awt.Dimension /** * Class for standard vector operations with Integer coordinates. */ case class Vector2(x:Int,y:Int) { def this(i:Int) = this(i,i) def +(v: Vector2): Vector2 = Vector2(x + v.x, y + v.y) def -(v: Vector2): Vector2 = Vector2(x -...
evilcandybag/Stagehand-core
src/main/scala/se/stagehand/swing/lib/Vector2.scala
Scala
gpl-2.0
875
package io.iohk.ethereum.db.storage import akka.util.ByteString import boopickle.Default._ import io.iohk.ethereum.db.dataSource.DataSource import io.iohk.ethereum.db.storage.ChainWeightStorage._ import io.iohk.ethereum.domain.ChainWeight import io.iohk.ethereum.utils.ByteUtils.{byteSequenceToBuffer, compactPickledByt...
input-output-hk/etc-client
src/main/scala/io/iohk/ethereum/db/storage/ChainWeightStorage.scala
Scala
mit
1,089
import scala.compiletime.{constValueTuple, constValue} object Sums extends App: println(constValueTuple[Plus[(true, true, true), (true, true)]]) // works println(constValueTuple[Plus1[(true, true, true), (true, true)]]) // fails println(constValueTuple[ Reverse[PlusLoop[Reverse[(true, true, true)], Reverse[...
lampepfl/dotty
tests/pos/13633.scala
Scala
apache-2.0
2,060
/* * 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 ...
spark0001/spark2.1.1
external/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaSourceSuite.scala
Scala
apache-2.0
38,976
package com.lynbrookrobotics.potassium import com.lynbrookrobotics.potassium.tasks.{ContinuousTask, FiniteTask, Task} import org.scalatest.{BeforeAndAfter, FunSuite} class ParallelContinuousTaskTest extends FunSuite with BeforeAndAfter { after { Task.abortCurrentTask() } test("Parallel continuous task goes...
Team846/potassium
core/shared/src/test/scala/com/lynbrookrobotics/potassium/ParallelContinuousTaskTest.scala
Scala
mit
1,081
package support import play.api.i18n._ import play.api.mvc._ trait LangLookupSupport { implicit def lang(implicit request: RequestHeader): Lang = request.acceptLanguages.head }
bravegag/play-authenticate-usage-scala
app/support/LangLookupSupport.scala
Scala
apache-2.0
181
/* * @author Daniel Strebel * @author Philip Stutz * * Copyright 2012 University of Zurich * * 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/li...
hicolour/signal-collect
src/test/scala/com/signalcollect/GraphModificationSpec.scala
Scala
apache-2.0
4,484
package org.raml.metamodel; object Protocol extends EnumType(Str) { values("HTTP", "HTTPS") } object ParameterType extends EnumType(Str) { values("date", "string", "number", "integer", "file", "boolean"); } object ActionType extends EnumType(Str) { values("GET", "POST", "PUT", "DELETE", "PATCH", "HEAD...
petrochenko-pavel-a/raml-experimentsscala
org.raml.model.diet/src/org/raml/metamodel/modelDefinitionExample.scala
Scala
epl-1.0
2,892
package com.twitter.util import org.specs.SpecificationWithJUnit import com.twitter.conversions.storage._ class StorageUnitSpec extends SpecificationWithJUnit { "StorageUnit" should { "convert whole numbers into storage units (back and forth)" in { 1.byte.inBytes mustEqual(1) 1.kilobyte.inBytes must...
mosesn/util
util-core/src/test/scala/com/twitter/util/StorageUnitSpec.scala
Scala
apache-2.0
1,579
package controllers.conservation import models.conservation.events._ import no.uio.musit.formatters.DateTimeFormatters.dateTimeFormatter import no.uio.musit.models._ import no.uio.musit.security.BearerToken import no.uio.musit.test.matchers.DateTimeMatchers import no.uio.musit.test.{FakeUsers, MusitSpecWithServerPerSu...
MUSIT-Norway/musit
service_backend/test/controllers/conservation/ConservationReportControllerSpec.scala
Scala
gpl-2.0
21,336
class MainClass { def main(args: Array[String]) { println("Hello, World!") } }
teodorlu/ballmer
WebKomScalaTesting/src/MainClass.scala
Scala
gpl-2.0
87
/* * ========================================================================================= * Copyright Β© 2015 the khronus project <https://github.com/hotels-tech/khronus> * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You m...
despegar/khronus
khronus/src/main/scala/com/searchlight/khronus/service/KhronusService.scala
Scala
apache-2.0
1,587
package org.http4s import java.util.Locale import scalaz.scalacheck.ScalazProperties import org.http4s.parser.Rfc2616BasicRules import org.scalacheck.Prop.forAll import Http4s._ class MethodSpec extends Http4sSpec { import Method._ "parses own string rendering to equal value" in { forAll(tokens) { token =...
hvesalai/http4s
core/src/test/scala/org/http4s/MethodSpec.scala
Scala
apache-2.0
1,027
/* * Copyright 2001-2014 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 agreed to in writ...
dotty-staging/scalatest
scalactic.dotty/src/main/scala/org/scalactic/anyvals/CompileTimeAssertions.scala
Scala
apache-2.0
20,457
/** * 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...
bryaakov/CM-Well
server/cmwell-bg/src/test/scala/cmwell/bg/test/FailingFTSServiceMockup.scala
Scala
apache-2.0
2,865
/** * Generated by Scrooge * version: ? * rev: ? * built at: ? */ package com.twitter.scrooge.test.gold.thriftscala import com.twitter.io.Buf import com.twitter.scrooge.{ InvalidFieldsException, LazyTProtocol, StructBuilder, StructBuilderFactory, TFieldBlob, ThriftStruct, ThriftStructCodec3, ...
twitter/scrooge
scrooge-generator-tests/src/test/resources/gold_file_output_scala/com/twitter/scrooge/test/gold/thriftscala/Response.scala
Scala
apache-2.0
24,984
/* * Copyright 2012-2013 Stephane Godbillon (@sgodbillon) * * 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 appl...
duncancrawford/Play-Json-ReactiveMongo
src/main/scala/play/modules/reactivemongo/json.scala
Scala
apache-2.0
16,295
package nexus.typelevel import nexus._ import shapeless._ /** * Typelevel function that computes the only different element between two lists. * If the number of differences is not 1, no such evidence instance would be derived. */ trait Diff1[U, V] { type Left type Right def index: Int def left(u: U): Left...
ctongfei/nexus
tensor/src/main/scala/nexus/typelevel/Diff1.scala
Scala
mit
1,534
/* * 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 ...
hongyuhong/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/scala/StreamTableEnvironment.scala
Scala
apache-2.0
11,938
/** * Copyright (C) 2012 Orbeon, Inc. * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. * * This program i...
joansmith/orbeon-forms
src/main/scala/org/orbeon/oxf/webapp/Orbeon.scala
Scala
lgpl-2.1
3,278
package at.forsyte.apalache.tla.bmcmt.rules.aux import at.forsyte.apalache.tla.bmcmt.caches.StrValueCache import at.forsyte.apalache.tla.bmcmt.types.ConstT import at.forsyte.apalache.tla.bmcmt._ import at.forsyte.apalache.tla.bmcmt.smt.SolverContext import at.forsyte.apalache.tla.lir.{TlaEx, ValEx} import at.forsyte.ap...
konnov/apalache
tla-bmcmt/src/main/scala/at/forsyte/apalache/tla/bmcmt/rules/aux/UninterpretedConstOracle.scala
Scala
apache-2.0
3,280
package scala.meta.eden package quasiquote import dotty.tools.dotc._ import core._ import ast._ import Contexts._ import Names._ import Decorators._ import Constants._ import Types._ import Symbols._ import Trees.Typed import scala.{meta => m} import scala.compat.Platform.EOL object Quote { type Quasi = m.interna...
liufengyun/eden
src/main/scala/meta/eden/quasiquote/Quote.scala
Scala
bsd-3-clause
9,335
package net.scalytica.symbiotic.core.facades import org.scalajs.jquery.JQuery import scala.scalajs.js object Bootstrap { implicit def jquery2Bootstrap(jquery: JQuery): Bootstrap = jquery.asInstanceOf[Bootstrap] } @js.native trait Bootstrap extends JQuery { def affix(options: Option[AffixOptions] = None): t...
kpmeen/symbiotic
examples/symbiotic-client/src/main/scala/net/scalytica/symbiotic/core/facades/Bootstrap.scala
Scala
apache-2.0
2,674
package org.positronicnet.sample.contacts import org.positronicnet.ui._ import org.positronicnet.notifications.Actions._ import org.positronicnet.notifications.Future import org.positronicnet.content.PositronicContentResolver import android.util.Log import android.os.Bundle import android.content.Context import andro...
rst/positronic_net
sample/contacts_app/src/main/scala/EditContactActivity.scala
Scala
bsd-3-clause
2,220
package simple import akka.actor.ActorSystem import akka.testkit.{TestActorRef, TestKit} import org.scalatest.{Matchers, WordSpecLike} import support.TerminateAfterAll class StatefulActorTest extends TestKit(ActorSystem("testsys")) with WordSpecLike with Matchers with TerminateAfterAll { "The Stateful Actor" must ...
jvorhauer/akka-workshop
exercises/speedcam/src/test/scala/simple/StatefulActorTest.scala
Scala
apache-2.0
987
package org.sofi.deadman.component.writer import akka.actor.ActorLogging import com.rbmhtechnology.eventuate.EventsourcedWriter import org.sofi.deadman.model._ import scala.concurrent.Future trait TaskWriter[T] extends EventsourcedWriter[Long, Unit] with ActorLogging with NoTasks { // Implicit execution context ...
SocialFinance/deadman-switch
core/src/main/scala/org/sofi/deadman/component/writer/TaskWriter.scala
Scala
bsd-3-clause
1,374
/* * Copyright 2014 – 2018 Paul Horn * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
knutwalker/transducers-scala
api/src/main/scala/scalax/transducers/Reducer.scala
Scala
apache-2.0
890
trait Analyzer extends Typers with Infer { val global: Global } trait Definitions { self: SymbolTable => object definitions extends DefinitionsClass def memb: TermSymbol = null class DefinitionsClass { def Predef_??? = memb class RunDefinitions { lazy val Predef_??? = DefinitionsClass.this.Pr...
triggerNZ/intellij-scala
testdata/typeInference/dependent/DeeperSubstitution.scala
Scala
apache-2.0
1,476
package models case class AthleteDef(ageGroup: String, name: String,ussaNumber: String) extends Ordered[AthleteDef] { override def toString = name def compare ( that: AthleteDef ) = { if ( this.ageGroup == that.ageGroup ) { if ( this.name < that.name ) -1 else if ( this.name > that.name ...
saine1a/IMDRaces
app/models/AthleteDef.scala
Scala
mit
456
/* * 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 ...
dszeto/incubator-predictionio
core/src/main/scala/org/apache/predictionio/workflow/EngineServerPluginContext.scala
Scala
apache-2.0
3,438
package org.fathens.colorworks.iccprofile.tag import java.io._ import _root_.org.fathens.colorworks.binarychain._ import _root_.org.fathens.colorworks.iccprofile._ object TypeViewingConditions extends ElementBuilder[TypeViewingConditions] { val typeSignature = "view" def build(commons: TagElement.CommonHeads, ins...
sawatani/ColorWorks
src/main/scala/org/fathens/colorworks/iccprofile/tag/TypeViewingConditions.scala
Scala
mit
770
package coursier.cli.util import argonaut.Parse import utest._ object JsonReportTests extends TestSuite { val tests = Tests { test("empty JsonReport should be empty") { val report: String = JsonReport[String](Vector.empty, Map())( children = _ => Vector.empty, reconciledVersionStr = _ => "...
coursier/coursier
modules/cli/src/test/scala/coursier/cli/util/JsonReportTests.scala
Scala
apache-2.0
5,256
package com.github.aselab.activerecord private[activerecord] object MethodMacros extends Deprecations with TypeSafeAssignable with TypeSafeFinder
aselab/scala-activerecord
macro/src/main/scala-2.13/MethodMacros.scala
Scala
mit
147
package com.github.diegopacheco.sandbox.scala.akka.lifecycle import akka.actor.Actor import akka.event.Logging class LifeCycleActor extends Actor { val log = Logging(context.system, this) def receive = { case m:Any => log.info("receive unknown message {" + m + "}") } override def preStar...
diegopacheco/scala-playground
scala_11_akka_23_full_playground/src/main/scala/com/github/diegopacheco/sandbox/scala/akka/lifecycle/LifeCycleActor.scala
Scala
unlicense
1,090
package com.softwaremill package object macwire extends Tagging with Macwire { private[macwire] type InstanceFactoryMap = Map[Class[_], () => AnyRef] }
rcirka/macwire
macros/src/main/scala/com/softwaremill/macwire/package.scala
Scala
apache-2.0
155
/* * Copyright 2017 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...
pncampbell/ct-calculations
src/main/scala/uk/gov/hmrc/ct/ct600e/v2/E1030.scala
Scala
apache-2.0
1,146
/* * Copyright 2017 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...
liquidarmour/ct-calculations
src/main/scala/uk/gov/hmrc/ct/computations/CP28.scala
Scala
apache-2.0
1,106
package com.delprks.productservicesprototype.api.directives import akka.http.scaladsl.model.StatusCode import akka.http.scaladsl.server.Directives.complete import akka.http.scaladsl.server.StandardRoute import com.delprks.productservicesprototype.api.directives.ErrorResponseDirectives.ErrorResponseData import com.delp...
delprks/product-services-prototype
src/main/scala/com/delprks/productservicesprototype/api/directives/ErrorResponseDirectives.scala
Scala
mit
1,040
/* * Copyright 2013 Akiyoshi Sugiki, University of Tsukuba * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
axi-sugiki/kumoi
src/kumoi/impl/aaa/ldap/LdapColdRole.scala
Scala
apache-2.0
1,941
package com.datastax.spark.connector.writer import java.io.IOException import com.datastax.driver.core.BatchStatement.Type import com.datastax.driver.core._ import com.datastax.spark.connector._ import com.datastax.spark.connector.cql._ import com.datastax.spark.connector.metrics.OutputMetricsUpdater import com.datas...
brkyvz/spark-cassandra-connector
spark-cassandra-connector/src/main/scala/com/datastax/spark/connector/writer/TableWriter.scala
Scala
apache-2.0
8,630
@deprecated("Suppress warnings", since="2.11") object Test extends dotty.runtime.LegacyApp { println(classManifest[Int]) println(classManifest[Int] eq Manifest.Int) }
yusuke2255/dotty
tests/run/classmanifests_new_core.scala
Scala
bsd-3-clause
171
package monocle.std import monocle.MonocleSuite import monocle.law.discipline.PrismTests import monocle.law.discipline.function.{EachTests, PossibleTests} import scala.annotation.nowarn class EitherSpec extends MonocleSuite { checkAll("either left", PrismTests(stdLeft[String, Int])) checkAll("either right", Pris...
julien-truffaut/Monocle
test/shared/src/test/scala/monocle/std/EitherSpec.scala
Scala
mit
495
// a.scala // Fri Jan 13 11:31:47 PST 2012 package foo { package object bar { def duh(n: Long) = println("long") def duh(n: Double) = println("double") def duh2(n: Double) = println("double") def duh2(n: Long) = println("long") } package bar { object Main { def main(args:Array[Stri...
felixmulder/scala
test/files/run/t1987.scala
Scala
bsd-3-clause
1,173
package org.jetbrains.plugins.scala package lang package psi package api package base package types import org.jetbrains.plugins.scala.lang.psi.types.ScType import org.jetbrains.plugins.scala.lang.psi.types.result.{TypeResult, TypingContext} /** * @author Alexander Podkhalyuzin * Date: 07.03.2008 */ trait ScAnnotTy...
loskutov/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/api/base/types/ScAnnotTypeElement.scala
Scala
apache-2.0
565
/* Copyright 2013 Twitter, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
nabarunnag/Summingbird_dev
summingbird-batch/src/main/scala/com/twitter/summingbird/batch/TimeStamp.scala
Scala
apache-2.0
3,772
package ca.innovativemedicine.vcf sealed trait JoinType object JoinType { case object JoinAfter extends JoinType case object JoinBefore extends JoinType case object JoinReverseAfter extends JoinType case object JoinReverseBefore extends JoinType } case class Breakend(alt: String, chromosome: Either[VcfId, St...
innovativemedicine/vcfimp
vcfimp/src/main/scala/ca/innovativemedicine/vcf/Breakend.scala
Scala
bsd-2-clause
738
package sample.blog.stages import akka.actor.{ Actor, ActorRef, ActorSystem, Props, Stash } import akka.stream.scaladsl.{ Sink, Source } import akka.stream.stage.GraphStageLogic.StageActor import akka.stream.stage._ import akka.stream._ import org.slf4j.LoggerFactory import sample.blog.stages.ActorSource.InstallSource...
haghard/akka-pq
src/main/scala/sample/blog/stages/ActorSource.scala
Scala
apache-2.0
4,224
/* * Copyright 2015 - 2016 Red Bull Media House GmbH <http://www.redbullmediahouse.com> - 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...
RBMHTechnology/eventuate
eventuate-example-vertx/src/main/scala/com/rbmhtechnology/example/vertx/package.scala
Scala
apache-2.0
1,672
package com.campudus.test.postgresql import org.junit.Test import org.vertx.scala.core.json._ import com.campudus.test.{ BaseSqlTests, SqlTestVerticle } import org.vertx.testtools.VertxAssert class MySqlTest extends SqlTestVerticle with BaseSqlTests { val address = "campudus.asyncdb" val config = Json.obj("addre...
campudus/vertx-mysql-postgresql
src/test/scala/com/campudus/test/mysql/MySqlTest.scala
Scala
apache-2.0
1,236
/******************************************************************************* * 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/stats/effects/MultiplicativeCalculation.scala
Scala
gpl-3.0
1,137
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
darionyaphet/spark
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/OptimizeLocalShuffleReader.scala
Scala
apache-2.0
8,433
/* * 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/models/tradingpremises/TradingPremisesMsbServicesSpec.scala
Scala
apache-2.0
2,639
package works.weave.socks.aws.orders.main import org.slf4j.Logger import org.slf4j.LoggerFactory import org.springframework.context.annotation.AnnotationConfigApplicationContext import org.springframework.context.annotation.ComponentScan import scala.reflect.ClassTag import works.weave.socks.spring.aws.DynamoConfigura...
Compositional/orders-aws
src/main/scala/works.weave.socks.aws.orders/main/ServiceMain.scala
Scala
apache-2.0
1,585
/* * 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 ...
dszeto/incubator-predictionio
storage/elasticsearch/src/main/scala/org/apache/predictionio/data/storage/elasticsearch/ESAccessKeys.scala
Scala
apache-2.0
5,153