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 (C) 2011 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...
martinluther/orbeon-forms
src/main/scala/org/orbeon/oxf/xforms/StaticStateGlobalOps.scala
Scala
lgpl-2.1
7,039
package scala package reflect package macros /** * <span class="badge badge-red" style="float: right;">EXPERIMENTAL</span> * * A slice of [[scala.reflect.macros.blackbox.Context the Scala macros context]] that * partially exposes the type checker to macro writers. */ trait Typers { self: blackbox.Context => ...
felixmulder/scala
src/reflect/scala/reflect/macros/Typers.scala
Scala
bsd-3-clause
7,158
/*********************************************************************** * 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-datastore/src/main/scala/org/locationtech/geomesa/accumulo/index/legacy/z3/Z3WritableIndex.scala
Scala
apache-2.0
7,187
package org.sapia.mediafire.core /** * Holds HTTP status codes as constants. * * @author yduchesne */ object HttpStatus extends Enumeration { val OK = Value(200, "OK") }
sapia-oss/mediafire_maven_plugin
core/src/main/scala/org/sapia/mediafire/core/HttpStatus.scala
Scala
apache-2.0
178
package cspom.util import java.math.RoundingMode object Infinitable { implicit object InfinitableOrdering extends Ordering[Infinitable] { def compare(i: Infinitable, j: Infinitable): Int = { i match { case MinInf => if (j == MinInf) 0 else -1 case PlusInf => if (j == P...
concrete-cp/cspom
src/main/scala/cspom/util/InfinityArithmetics.scala
Scala
lgpl-2.1
4,552
/* * 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
test/controllers/PlaLanguageControllerSpec.scala
Scala
apache-2.0
1,316
/** * Copyright (C) 2015 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/servlet/FormRunnerAuthFilter.scala
Scala
lgpl-2.1
1,925
// scalac: -deprecation // import scala.math.Ordering.Double.IeeeOrdering object Test { def time[U](b: => U): Long = { val start = System.currentTimeMillis b val end = System.currentTimeMillis end - start } def main(args: Array[String]): Unit = { val sz = 1000000000 val range = 1 to ...
scala/scala
test/files/run/t5857.scala
Scala
apache-2.0
826
package org.broadinstitute.dsde.test.api.orch import java.util.UUID import akka.http.scaladsl.model.{HttpResponse, StatusCodes} import akka.http.scaladsl.unmarshalling.Unmarshal import org.broadinstitute.dsde.rawls.model.EntityTypeMetadata import org.broadinstitute.dsde.rawls.model.WorkspaceJsonSupport.EntityTypeMetad...
broadinstitute/firecloud-orchestration
automation/src/test/scala/org/broadinstitute/dsde/test/api/orch/AsyncImportSpec.scala
Scala
bsd-3-clause
15,179
/* * Copyright 2015 – 2016 Martin Seeler * * 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...
MartinSeeler/rx-oanda
src/test/scala/rx/oanda/utils/SideDecoderSpec.scala
Scala
apache-2.0
1,324
package zeroformatter import dog._ import scalaz.std.anyVal._ sealed abstract class TestEnum(override val label: Int) extends Enum[Int] with Product with Serializable case class Enum0() extends TestEnum(1) case class Enum1() extends TestEnum(2) object EnumFormatterTest extends Base { val `serialize Enum` = TestCa...
pocketberserker/scala-zero-formatter
zero-formatter/src/test/scala/zeroformatter/EnumFormatterTest.scala
Scala
mit
716
/* * Copyright 2016 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
andywhardy/address-reputation-ingester
test/unit/controllers/SwitchoverControllerTest.scala
Scala
apache-2.0
6,521
/* * 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 ...
shuangshuangwang/spark
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/ShowPartitionsSuite.scala
Scala
apache-2.0
1,143
/* Copyright 2017-19, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
eaplatanios/tensorflow_scala
modules/api/src/main/scala/org/platanios/tensorflow/api/learn/estimators/package.scala
Scala
apache-2.0
1,518
import scala.quoted.* class LineNumber(val value: Int) { override def toString: String = value.toString } object LineNumber { implicit inline def line: LineNumber = ${lineImpl} def lineImpl(using Quotes) : Expr[LineNumber] = { import quotes.reflect.* '{new LineNumber(${Expr(Position.ofMacroExpansion.s...
dotty-staging/dotty
tests/run-macros/tasty-linenumber-2/quoted_1.scala
Scala
apache-2.0
340
package com.arcusys.learn.liferay.update.version300.migrations.scorm import com.arcusys.valamis.persistence.common.SlickProfile import com.arcusys.valamis.persistence.impl.scorm.model.ActivityDataMapModel import com.arcusys.valamis.persistence.impl.scorm.schema.ActivityDataMapTableComponent import slick.driver.JdbcPro...
igor-borisov/valamis
learn-portlet/src/main/scala/com/arcusys/learn/liferay/update/version300/migrations/scorm/ActivityDataMapMigration.scala
Scala
gpl-3.0
1,296
package org.jetbrains.plugins.scala.worksheet.actions.topmenu import java.awt.BorderLayout import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer import com.intellij.icons.AllIcons import com.intellij.openapi.actionSystem._ import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.edit...
JetBrains/intellij-scala
scala/worksheet/src/org/jetbrains/plugins/scala/worksheet/actions/topmenu/CleanWorksheetAction.scala
Scala
apache-2.0
3,986
package com.twitter.finagle.param import com.twitter.finagle.Stack import com.twitter.finagle.client.DefaultPool /** * A collection of methods for configuring the Pooling module of Finagle clients. * * @tparam A a [[Stack.Parameterized]] client to configure * * @see [[http://twitter.github.io/finagle/guide/Clien...
liamstewart/finagle
finagle-core/src/main/scala/com/twitter/finagle/param/SessionPoolingParams.scala
Scala
apache-2.0
1,896
package recfun import org.scalatest.FunSuite import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class PascalSuite extends FunSuite { import Main.pascal test("col=0,row=2") { assert(pascal(0,2) === 1) } test("col=1,row=2") { assert(pascal(1,2) ===...
keshavbashyal/playground-notes
functional-programming-principles-in-scala/recfun/src/test/scala/recfun/PascalSuite.scala
Scala
mit
1,069
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.internal.scaladsl.client import akka.NotUsed import com.lightbend.lagom.scaladsl.api.deser.DefaultExceptionSerializer import com.lightbend.lagom.scaladsl.api.{ CircuitBreaker, Descriptor, Service, ServiceCall } im...
rstento/lagom
service/scaladsl/client/src/test/scala/com/lightbend/lagom/internal/scaladsl/client/ScaladslServiceResolverSpec.scala
Scala
apache-2.0
2,526
package org.zouzias.spark.lucenerdd.examples.linkage import org.apache.spark.SparkConf import org.apache.spark.rdd.RDD import org.apache.spark.sql.{DataFrame, Row, SparkSession} import org.zouzias.spark.lucenerdd.LuceneRDD import org.zouzias.spark.lucenerdd._ import org.zouzias.spark.lucenerdd.logging.Logging /** * ...
zouzias/spark-lucenerdd-examples
src/main/scala/org/zouzias/spark/lucenerdd/examples/linkage/LinkageScholarvsDBLP.scala
Scala
apache-2.0
3,643
package org.bitcoins.zmq import grizzled.slf4j.Logging import org.bitcoins.core.protocol.blockchain.Block import org.bitcoins.core.protocol.transaction.Transaction import org.bitcoins.core.util.StartStop import org.bitcoins.crypto.DoubleSha256DigestBE import org.zeromq.{SocketType, ZMQ, ZMQException, ZMsg} import scod...
bitcoin-s/bitcoin-s
zmq/src/main/scala/org/bitcoins/zmq/ZMQSubscriber.scala
Scala
mit
5,172
package product.simulations import io.gatling.core.Predef._ import utils._ /** * Created by os-desislava.slavova on 25/09/2015. */ class addProductSimulation extends Simulation{ val config = new Configurations val scn = scenario("Add Product").exec(Actions.addProduct()) setUp(scn.inject().protocols(config.g...
desislavaSlavova/Open-Api
src/test/scala/product/simulations/addProductSimulation.scala
Scala
mit
336
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
slamdata/slamengine
impl/src/test/scala/quasar/impl/datasources/DefaultDatasourceManagerSpec.scala
Scala
apache-2.0
10,105
/* * ************************************************* * ******* BigeD - Playing with Big Data *********** * ************************************************* * * Copyright (c) 2014 - Qute Solutions Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in...
comdori/BigeD
src/qute/biged/perf/PerformanceAnalysis.scala
Scala
apache-2.0
4,924
package org.jetbrains.plugins.scala package codeInspection.unusedInspections import com.intellij.codeHighlighting.TextEditorHighlightingPass import com.intellij.codeInsight.daemon.impl.{HighlightInfo, UpdateHighlightersUtil} import com.intellij.codeInsight.intention.IntentionAction import com.intellij.codeInspection.P...
consulo/consulo-scala
src/org/jetbrains/plugins/scala/codeInspection/unusedInspections/ScalaUnusedImportPassBase.scala
Scala
apache-2.0
2,678
package org.machine.engine.graph.commands import com.typesafe.scalalogging._ import org.neo4j.graphdb._ import scala.collection.JavaConversions._ import scala.collection.mutable import org.machine.engine.exceptions._ import org.machine.engine.graph._ import org.machine.engine.graph.commands._ import org.machine.engi...
sholloway/graph-engine
src/main/scala/org/machine/engine/graph/commands/RemoveOutboundAssociations.scala
Scala
mit
1,307
class A {} class B[A] {} object Main { def main(args: Array[String]) { } }
tobast/compil-petitscala
tests/typing/good/testfile-type_parameter-1.scala
Scala
gpl-3.0
75
trait K trait L object O { type LK = K with L } object Test extends dotty.runtime.LegacyApp { local def local = { val A: O.LK = new K with L val B: O.LK = new K with L val scrut: O.LK = A scrut match { case B if "".isEmpty => ??? case A => case B => ??? } } }
yusuke2255/dotty
tests/run/t8611c.scala
Scala
bsd-3-clause
309
package com.signalcollect.dcop.graph import com.signalcollect._ import com.signalcollect.dcop.modules.Optimizer import com.signalcollect.dcop.modules.Configuration /** * The Vertex state is of type Config. */ trait DcopConvergenceDetection[AgentId, Action, Config <: Configuration[AgentId, Action, Config], UtilityTy...
flueckiger/dcop-algorithms
src/main/scala/com/signalcollect/dcop/graph/DcopConvergenceDetection.scala
Scala
apache-2.0
1,187
package utils.helpers import helpers.UnitSpec import play.api.mvc.Cookie import play.api.test.WithApplication import uk.gov.dvla.vehicles.presentation.common.clientsidesession.CookieFlags import views.vrm_assign.ConfirmBusiness.StoreBusinessDetailsCacheKey import scala.concurrent.duration.DurationInt final class Ass...
dvla/vrm-assign-online
test/utils/helpers/AssignCookieFlagsSpec.scala
Scala
mit
1,699
package singleton.twoface import singleton.twoface.math._ import org.scalacheck.Properties import singleton.TestUtils._ import shapeless.test.illTyped import singleton.ops._ class TwoFaceIntSpec extends Properties("TwoFace.Int") { property("Implicit Creation[]") = { val a = implicitly[TwoFace.Int[W.`2`.T]] ...
soronpo/singleton-ops
src/test/scala_2.13+/singleton/twoface/TwoFaceIntSpec.scala
Scala
apache-2.0
33,417
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
gioenn/xSpark
streaming/src/main/scala/org/apache/spark/streaming/StreamingContext.scala
Scala
apache-2.0
35,431
package org.jetbrains.plugins.scala package lang package psi package impl package expr import com.intellij.lang.ASTNode import org.jetbrains.plugins.scala.lang.parser.ScalaElementType import org.jetbrains.plugins.scala.lang.psi.api.base.{ScAnnotation, ScAnnotations} import org.jetbrains.plugins.scala.lang.psi.stubs.Sc...
JetBrains/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/psi/impl/expr/ScAnnotationsImpl.scala
Scala
apache-2.0
875
// - Project: scalajs-angulate (https://github.com/jokade/scalajs-angulate) // Description: Bindings for the Angular \\$resource API // // Distributed under the MIT License (see included file LICENSE) package biz.enef.angulate.ext import biz.enef.angulate.core.{HttpConfig, ProvidedService} import scala.scalajs.js ...
jokade/scalajs-angulate
src/main/scala/biz/enef/angulate/ext/Resource.scala
Scala
mit
1,119
package org.jetbrains.plugins.scala.lang.psi.api import org.jetbrains.plugins.scala.lang.psi.types.ScType import org.jetbrains.plugins.scala.lang.psi.types.nonvalue.ScMethodType import scala.annotation.tailrec /** * @author adkozlov */ package object base { implicit class ScMethodLikeExt(val method: ScMethodL...
whorbowicz/intellij-scala
src/org/jetbrains/plugins/scala/lang/psi/api/base/package.scala
Scala
apache-2.0
1,011
import org.scalatest.FunSuite class TravisTest extends FunSuite { test("An empty Set should have size 0") { assert(Set.empty.size == 0) } test("Invoking head on an empty Set should produce NoSuchElementException") { intercept[NoSuchElementException] { Set.empty.head } } }
radek1st/travis-test
src/test/scala/TravisTest.scala
Scala
apache-2.0
302
/* * Copyright 2014 Twitter inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
AndreasPetter/storehaus
project/Build.scala
Scala
apache-2.0
17,165
/* * * * Copyright 2014 websudos ltd. * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required...
nosheenzaza/phantom-data-centric
phantom-zookeeper/src/main/scala/com/websudos/phantom/zookeeper/SimpleCassandraConnector.scala
Scala
gpl-2.0
2,874
package breeze.stats.distributions /* Copyright 2009 David Hall, Daniel Ramage 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 ...
tjhunter/scalanlp-core
learn/src/main/scala/breeze/stats/distributions/Dirichlet.scala
Scala
apache-2.0
3,709
package cromwell.backend import _root_.wdl._ import com.typesafe.config.Config import cromwell.core.WorkflowOptions.WorkflowOption import cromwell.core.callcaching.MaybeCallCachingEligible import cromwell.core.labels.Labels import cromwell.core.{CallKey, WorkflowId, WorkflowOptions} import cromwell.services.keyvalue.K...
ohsu-comp-bio/cromwell
backend/src/main/scala/cromwell/backend/backend.scala
Scala
bsd-3-clause
3,479
package com.github.al.roulette.bet.impl import akka.Done import com.lightbend.lagom.scaladsl.persistence.PersistentEntity class RouletteGameBetsEntity extends PersistentEntity { override type Command = RouletteGameBetsCommand override type Event = RouletteGameBetsEvent override type State = Option[RouletteGameB...
andrei-l/reactive-roulette
roulette-bet-impl/src/main/scala/com/github/al/roulette/bet/impl/RouletteGameBetsEntity.scala
Scala
mit
1,722
/* * Copyright (c) 2014-2021 by The Monix Project Developers. * See the project homepage at: https://monix.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache...
monixio/monix
monix-tail/shared/src/test/scala/monix/tail/IterantToReactivePublisherSuite.scala
Scala
apache-2.0
11,543
package peschke.markov.utils import cats.data.NonEmptyVector import org.scalatest.{MustMatchers, OptionValues, WordSpec} class PositiveIntTest extends WordSpec with MustMatchers with OptionValues { "PositiveInt.valueOf" should { "only construct for positive integers" in { PositiveInt.valueOf(-1) mustBe No...
morgen-peschke/markov-text
scala/src/test/scala/peschke/markov/utils/PositiveIntTest.scala
Scala
mit
1,950
package cua.li.ti.vehicles import akka.actor.{Actor,ActorLogging,ActorRef,ActorSystem,Props} import scala.collection._ import scala.concurrent.Future import scala.util.Random object VehiclesSystem { def main(args :Array[String]) :Unit = { val system = ActorSystem("vehicles") system.actorOf(Props[Satel...
Alain-Bearez/actor-intro
src/main/scala/cua/li/ti/vehicles/VehiclesSystem.scala
Scala
mit
2,030
// Code generated by sbt-mavgen. Manual edits will be overwritten package scavlink.message.ardupilotmega import scavlink.message._ import scavlink.message.enums.MavCmd import scavlink.message.common.CommandLong import scavlink.coord.Coordinates import scavlink.coord.Geo /** * Mission command to perform motor test ...
nickolasrossi/scavlink
src/main/scala/scavlink/message/ardupilotmega/Commands.scala
Scala
mit
1,831
/* * 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/main/scala/org/apache/spark/sql/execution/dynamicpruning/PlanDynamicPruningFilters.scala
Scala
apache-2.0
4,525
package actors import database.DbInteractions /** * Created by Jannis on 10/5/14. */ /** * Describes the interactions users can make with the system. Abstracts over all implementation details. * It is agnostic to the backend and the client. Communications are done via serialized data formats only. * TODO static...
dadarakt/jamon
src/main/scala/actors/UserInteractions.scala
Scala
apache-2.0
2,797
package net.litola import java.io.File import play.PlayExceptions.AssetCompilationException import scala.sys.process._ object SassCompiler { def compile(sassFile: File, opts: Seq[String]): (String, Option[String], Seq[File]) = { // Filter out rjs option added by AssetsCompiler until we get clarity on what wou...
shinnya/play-sass
src/main/scala/net/litola/SassCompiler.scala
Scala
mit
2,838
class Phrase(phrase: String) { def wordCount = groupedWords.mapValues(_.size) private def groupedWords = words.groupBy(w => w) private def words = withoutPunctuation.split("\\\\s+") private def withoutPunctuation = phrase.toLowerCase.replaceAll("[^\\\\w']", " ") }
nlochschmidt/xscala
word-count/example.scala
Scala
mit
272
/* * Copyright 2022 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/http-verbs
http-verbs-common/src/test/scala/uk/gov/hmrc/http/HttpGetSpec.scala
Scala
apache-2.0
10,276
package org.randi3.randomization import org.apache.commons.math3.random.{MersenneTwister, RandomGenerator} import org.randi3.model.{TrialSubject, Trial} import collection.mutable.ListBuffer import org.randi3.randomization.AbstractBlockRandomization._ case class VariableBlockRandomization(id: Int = Int.MinValue, vers...
dschrimpf/randi3-method-block
src/main/scala/org/randi3/randomization/VariableBlockRandomization.scala
Scala
gpl-3.0
1,164
/** * 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...
cloudera/spark-timeseries
src/test/scala/com/cloudera/sparkts/RebaseSuite.scala
Scala
apache-2.0
9,473
package com.aristocrat.mandrill.services import com.aristocrat.mandrill.MandrillClient import com.aristocrat.mandrill.requests.Subaccounts._ import com.google.inject.{Inject, Singleton} import com.twitter.finagle.httpx.Response import com.twitter.util.Future @Singleton class SubaccountsService @Inject()(client: Mandr...
aristocratic/mandrill
src/main/scala/com/aristocrat/mandrill/services/SubaccountsService.scala
Scala
mit
977
/* * Copyright 2011-2018 GatlingCorp (http://gatling.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.org/licenses/LICENSE-2.0 * * Unless required by applic...
wiacekm/gatling
gatling-bundle/src/main/scala/computerdatabase/BasicSimulation.scala
Scala
apache-2.0
2,635
package spire.math.prime import spire.syntax.cfor._ /** * Fast BitSet implementation. * * This bitset is just intended to be a little bit faster than * Scala's, and to support accessing its internals, which we do in * some cases. * * The max length (~2B) is a current limit to how big individual sieve * segme...
lrytz/spire
core/src/main/scala/spire/math/prime/BitSet.scala
Scala
mit
995
/* Copyright 2013 Originate 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 ...
Bowbaq/play2-websocket
play-module/app/com/originate/play/common/CommonComponentRegistryImpl.scala
Scala
apache-2.0
754
import sbt._ import Keys._ object Common { val settings: Seq[Def.Setting[_]] = Seq( scalaVersion := "2.11.8" ) }
pfcoperez/mandelbrot_spark
project/Common.scala
Scala
gpl-3.0
124
package com.github.kfang.instagram import com.github.kfang.instagram.models.AuthResponse import spray.json._ import scalaj.http.{HttpOptions, Http} /** * http://instagram.com/developer/authentication/# */ case class InstagramAPI(clientId: String, clientSecret: String, clientRedirect: String, readTimeout: Int = 1000...
kfang/social-api-scala
src/main/scala/com/github/kfang/instagram/InstagramAPI.scala
Scala
mit
2,271
/*********************************************************************** * 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 ...
vpipkt/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/data/AccumuloFeatureSource.scala
Scala
apache-2.0
8,266
package debop4s.web.spring.listener import javax.servlet.{ServletContextEvent, ServletContextListener} import org.slf4j.LoggerFactory /** * [[ServletContextListener]] λ₯Ό κ΅¬ν˜„ν•œ κΈ°λ³Έ ν΄λž˜μŠ€μž…λ‹ˆλ‹€. * * @author Sunghyouk Bae */ abstract class AbstractServletContextListener extends ServletContextListener { private val log = ...
debop/debop4s
debop4s-web-spring/src/main/scala/debop4s/web/spring/listener/AbstractServletContextListener.scala
Scala
apache-2.0
765
package dotty.tools package dotc package core import Types._ import Contexts._ import util.SimpleIdentitySet import reporting._ import config.Config import config.Printers.constr import collection.mutable import java.lang.ref.WeakReference import util.Stats import Decorators._ import scala.annotation.internal.sharabl...
dotty-staging/dotty
compiler/src/dotty/tools/dotc/core/TyperState.scala
Scala
apache-2.0
11,041
/** * Licensed to Big Data Genomics (BDG) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The BDG licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use ...
erictu/adam
adam-core/src/main/scala/org/bdgenomics/adam/rdd/ADAMContext.scala
Scala
apache-2.0
41,018
// scalac: -Xfatal-warnings -Ywarn-value-discard // trait T { def f(): Unit = 42 def g = (42: Unit) def h = { 1 + 1 } def hh(): Unit = { 1 + 1 } def i(): Unit = { val x = 1 x + 1 } def x = 42 def j(): Unit = x + 1 class C { 42 } class D { 42 ; 17 } }
martijnhoekstra/scala
test/files/neg/t9847.scala
Scala
apache-2.0
298
/* * This file is part of CoAnSys project. * Copyright (c) 2012-2015 ICM-UW * * CoAnSys 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 Software Foundation, either version 3 of the License, or * (at your option) any...
acz-icm/coansys
citation-matching/citation-matching-core-code/src/test/scala/pl/edu/icm/coansys/citations/util/author_matchingTest.scala
Scala
agpl-3.0
1,550
package scala.in.programming.scalable /** * @author loustler * @since 01/07/2017 23:18 */ object MyClassApplication extends App { val myClazz = new MyClazz(0, "lousTler") val myKlass = new MyKlass(1, "lOuslter") println(myClazz.nameHasUpper()) println("---------------------") println(myKlass.nameHasUp...
loustler/scala
src/main/scala/scala/in/programming/scalable/MyClassApplication.scala
Scala
mit
558
package lila.tournament import play.api.libs.json._ import lila.common.LightUser import lila.common.PimpedJson._ import lila.game.{ Game, GameRepo } import lila.rating.PerfType import lila.user.User final class ScheduleJsonView( getLightUser: String => Option[LightUser]) { import JsonView._ import Condition...
clarkerubber/lila
modules/tournament/src/main/ScheduleJsonView.scala
Scala
agpl-3.0
1,763
package org.jetbrains.plugins.scala package project /** * @author Pavel Fatin */ sealed case class ScalaLanguageLevel(ordinal: Int, version: String) extends Named { def getName: String = version def >(level: ScalaLanguageLevel): Boolean = ordinal > level.ordinal def >=(level: ScalaLanguageLevel): Boolean = o...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/project/ScalaLanguageLevel.scala
Scala
apache-2.0
1,188
/* * Copyright (c) 2014-2015 by its authors. Some rights reserved. * See the project homepage at: http://www.monifu.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://...
sergius/monifu
monifu/shared/src/test/scala/monifu/reactive/internals/operators/TakeByPredicateSuite.scala
Scala
apache-2.0
2,326
import akka.actor.ActorRef import java.util.concurrent.TimeoutException import java.util.{TimerTask, Timer} import scala.collection.mutable.ListBuffer import scala.concurrent.Await import akka.pattern.ask import akka.util.Timeout import scala.concurrent.duration._ import scala.concurrent.ExecutionContext.Implicits.gl...
striges/cop5615fa13
project2/gossipWorker.scala
Scala
gpl-3.0
2,408
package org.bitcoins.core.protocol.script import org.bitcoins.core.util.{ BitcoinSLogger, TransactionTestUtil } import org.scalatest.{ FlatSpec, MustMatchers } /** * Created by chris on 3/8/16. */ class MultiSignatureScriptSignatureTest extends FlatSpec with MustMatchers { "MultiSignatureScriptSignature" must "f...
Christewart/bitcoin-s-core
src/test/scala/org/bitcoins/core/protocol/script/MultiSignatureScriptSignatureTest.scala
Scala
mit
598
package com.etsy.sahale import spray.json._ import DefaultJsonProtocol._ object JsonUtil { def encode(any: Any): JsValue = any match { case null => JsNull case b: Boolean => JsBoolean(b) case l: Long => JsNumber(l) case i: Int => JsNumber(i) case d:...
etsy/Sahale
flowtracker/src/main/scala/JsonUtil.scala
Scala
mit
1,238
def forLoop { println("for loop using java-style iteration") for(i <- 0 until args.length){ println(args(i)) } } forLoop
fbartnitzek/notes
7_languages/Scala/for_loop.scala
Scala
apache-2.0
126
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
gf53520/kafka
core/src/test/scala/unit/kafka/admin/AdminTest.scala
Scala
apache-2.0
8,331
package org.typeclassesfun object notypeclassesV5 { sealed trait Expression case class Value(value: Int) extends Expression case class Add(expression1: Expression, expression2: Expression) extends Expression case class Subtract(expression1: Expression, expression2: Expression) extends Expression sealed ...
sirocchj/typeclassesfun
src/main/scala/org/typeclassesfun/notypeclassesV5.scala
Scala
apache-2.0
3,058
/* Copyright 2017-18, Emmanouil Antonios Platanios. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
eaplatanios/tensorflow
tensorflow/scala/api/src/main/scala/org/platanios/tensorflow/api/ops/training/optimizers/schedules/WarmUpLinearSchedule.scala
Scala
apache-2.0
3,207
package org.photon.staticdata.converter.ancestra import org.photon.staticdata.converter._ import org.photon.staticdata._ import java.sql.Connection import java.util.concurrent.Executor import org.photon.common.persist.Async import org.photon.staticdata.MapPosition import scala.Some class MapDataLoader(connection: Con...
Emudofus/Photon
static-data/converter/main/src/org/photon/staticdata/converter/ancestra/MapDataLoader.scala
Scala
mit
2,301
package de.sciss.configuration import java.io.{OutputStream, PrintStream} object OutputRedirection { private lazy val instance: Unit = init() def apply(): Unit = instance private def init(): Unit = { val old = System.out System.setOut(new MyPrintStream(old, true)) } private final class MyPrintStr...
Sciss/Configuration
sound/src/main/scala/de/sciss/configuration/OutputRedirection.scala
Scala
gpl-3.0
1,436
// ticket #3432 object Test { trait B[@specialized(Int) T] { def value: T } class A[@specialized(Int) T](x: T) { def foo: B[T] = new B[T] { def value = x } } def main(args: Array[String]): Unit = { println((new A("abc")).foo.value) println((new A(10)).foo.value) // before fixin...
scala/scala
test/files/specialized/spec-ame.scala
Scala
apache-2.0
573
package info.hupel.isabelle import java.nio.file.{Path, Paths} import caseapp.core.ArgParser import info.hupel.isabelle.api.Version package object cli { implicit val pathParser: ArgParser[Path] = ArgParser.instance[Path] { s => Right(Paths.get(s)) } implicit val versionParser: ArgParser[Version] = Arg...
larsrh/libisabelle
modules/cli/src/main/scala/package.scala
Scala
apache-2.0
363
package org.dhira.core.util import lombok.NonNull import org.nd4j.linalg.dataset.DataSet import org.nd4j.linalg.dataset.api.iterator.DataSetIterator import org.slf4j.Logger import org.slf4j.LoggerFactory import java.util.concurrent.atomic.AtomicLong /** * Class that consumes DataSets with specified delays, suitable ...
Mageswaran1989/aja
src/main/scala/org/aja/dhira/src/main/scala/org/dhira/core/util/TestDataSetConsumer.scala
Scala
apache-2.0
2,134
//package com.sksamuel.avro4s.streams.output // //import java.io.ByteArrayOutputStream //import com.sksamuel.avro4s.{AvroInputStream, AvroOutputStream, AvroSchema, Decoder, Encoder, SchemaFor} //import org.apache.avro.AvroTypeException //import org.scalatest.Assertions //import org.scalatest.matchers.should.Matchers //...
sksamuel/avro4s
avro4s-core/src/test/scala/com/sksamuel/avro4s/streams/output/BinaryOutputStreamTest.scala
Scala
apache-2.0
3,210
package pl.wlodar.akka.test import akka.testkit.TestKit import org.scalatest.{BeforeAndAfterAll, Suite} /** * Created by pawel on 25.08.16. */ trait StopSystemAfterAll extends BeforeAndAfterAll{this:TestKit with Suite => override protected def afterAll(): Unit = { super.afterAll() system.terminate() ...
PawelWlodarski/blog
src/it/scala/pl/wlodar/akka/test/StopSystemAfterAll.scala
Scala
cc0-1.0
324
package io.aos.spark.mllib.util import scala.Array.canBuildFrom import org.apache.spark.SparkConf import org.apache.spark.SparkContext import org.apache.spark.mllib.evaluation.BinaryClassificationMetrics import org.apache.spark.mllib.linalg.DenseVector import org.apache.spark.mllib.linalg.Vector import org.apache.spa...
echalkpad/t4f-data
spark/mllib/src/main/scala/io/aos/spark/mllib/util/CsvUtil.scala
Scala
apache-2.0
3,146
/* * 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 l...
twitter/tormenta
tormenta-avro/src/main/scala/com/twitter/tormenta/scheme/avro/specific/SpecificAvroScheme.scala
Scala
apache-2.0
1,371
package com.example.cloud.service import com.example.cloud.logging.Logging import com.example.cloud.model.BookedCar import com.example.cloud.remote.{Car, RemoteCarService, RemoteUserService} import com.example.cloud.repository.BookedCarRepository import org.springframework.beans.factory.annotation.Autowired import org...
okharkovskyi/scala-cloud-skeleton
booking-service/src/main/scala/com/example/cloud/service/CarService.scala
Scala
apache-2.0
1,249
package com.github.kelebra.akka.js.snake import com.softwaremill.quicklens._ case class Block(x: Int, y: Int, radius: Int) trait BlockOps { def move(block: Block, direction: Direction): Block def ∩(first: Block, second: Block): Boolean } trait OpticalBlockOps extends BlockOps { def move(block: Block, direc...
kelebra/akka-js-snake
src/main/scala/com/github/kelebra/akka/js/snake/Block.scala
Scala
mit
1,014
package ws.fortytwo.experimental.akka.philosophers import scala.concurrent.duration.DurationInt import scala.concurrent.duration.FiniteDuration import akka.actor.Actor import akka.actor.ActorLogging import akka.actor.ActorRef object Philosopher { // Messages for Philosopher case object Eat case object Think } ...
42ways/akka-dining-philosophers
src/main/scala/ws/fortytwo/experimental/akka/philosophers/Philosopher.scala
Scala
apache-2.0
3,062
package com.kostassoid.materialist import com.typesafe.config.Config import scala.collection.JavaConversions._ object AppConfig { implicit class ConfigEx(c: Config) { def getStringOpt(path: String) = { if (c.hasPath(path)) Some(c.getString(path)) else None } } def getRoutes(configs: List[Config]...
Kostassoid/materialist
src/main/scala/com/kostassoid/materialist/AppConfig.scala
Scala
apache-2.0
1,436
/** Licensed to Gravity.com under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Gravity.com licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this fil...
GravityLabs/HPaste
src/main/scala/com/gravity/hbase/schema/ResultCaching.scala
Scala
apache-2.0
5,325
//package com.eharmony.aloha.models.ensemble.maxima // //import scala.collection.GenTraversableOnce //import com.eharmony.aloha.score.basic.ModelOutput //import ModelOutput.Implicits.modelOutputOrdering //import com.eharmony.aloha.models.ensemble.tie.TieBreaker //import com.eharmony.aloha.id.ModelIdentity //import com....
eHarmony/aloha
aloha-core/src/main/scala/com/eharmony/aloha/models/ensemble/maxima/Min.scala
Scala
mit
917
/** * Magmanics Licensing. This web application allows for centralized control * of client application activation, with optional configuration parameters * to control licensable features, and storage of supplementary information * about the client machine. Client applications may interface with this * central serv...
manicmonkey/licensing
Licensing-UI-Vaadin/src/main/scala/com/magmanics/licensing/ui/content/customer/CustomerComboBox.scala
Scala
gpl-3.0
2,242
package io.finch.internal import java.time.{Instant, ZoneId} import java.time.format.DateTimeFormatter import java.util.Locale object currentTime { private val formatter: DateTimeFormatter = DateTimeFormatter.ofPattern("EEE, dd MMM yyyy HH:mm:ss zzz") .withLocale(Locale.ENGLISH) .withZone(ZoneId.of...
ImLiar/finch
core/src/main/scala/io/finch/internal/currentTime.scala
Scala
apache-2.0
750
package com.softwaremill.macwire.scopes import org.scalatest.matchers.ShouldMatchers import org.scalatest.FlatSpec import com.softwaremill.macwire.Macwire /* Alternative syntax: wireScoped[Cls](scope) translated to: new Cls(a, b, c) { key = "123-123-123" override def x(y, z) = scope.getOrElse(key, new Cls(a,...
rcirka/macwire
runtime/src/test/scala/com/softwaremill/macwire/scopes/ThreadLocalScopeTest.scala
Scala
apache-2.0
2,476
/******************************************************************************* * Copyright (c) 2016-2017 Logimethods * All rights reserved. This program and the accompanying materials * are made available under the terms of the MIT License (MIT) * which accompanies this distribution, and is available at * http:/...
Logimethods/smart-meter
dockerfile-app_inject/user-files/simulations/nats/NatsStreamingInjection.scala
Scala
mit
2,286
/* * Copyright 2015 Otto (GmbH & Co KG) * * 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...
ottogroup/flink-spector
flinkspector-core/src/main/scala/io/flinkspector/util/Util.scala
Scala
apache-2.0
792
package org.sparklinedata.hive.metadata case class DbDef ( name : String, fqn : String, description : String, params : Map[String, String], owner : String )(implicit m : Model) extends Def { m.add(this) }
hbutani/hive-lineage
core/src/main/scala/org/sparklinedata/hive/metadata/DbDef.scala
Scala
apache-2.0
294
package biz.meetmatch import org.scalatest._ abstract class UnitSpec extends FlatSpec with Matchers with BeforeAndAfterAll
tolomaus/languagedetector
src/test/scala/biz/meetmatch/UnitSpec.scala
Scala
mit
124
/******************************************************************************* Copyright (c) 2013-2014, KAIST, S-Core. All rights reserved. Use is subject to license terms. This distribution may include materials developed by third parties. **********************************************************...
darkrsw/safe
src/main/scala/kr/ac/kaist/jsaf/analysis/typing/models/DOMHtml/HTMLPreElement.scala
Scala
bsd-3-clause
4,586
package scala.slick.driver import scala.collection.mutable.Builder import scala.slick.ast._ import scala.slick.ast.Util._ import scala.slick.ast.TypeUtil._ import scala.slick.util.SQLBuilder import scala.slick.profile.SqlExecutorComponent import scala.slick.lifted.{Shape, FlatShapeLevel} import scala.slick.relational....
dvinokurov/slick
src/main/scala/scala/slick/driver/JdbcExecutorComponent.scala
Scala
bsd-2-clause
1,828