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 almhirt.corex.spray.service import scala.language.postfixOps import almhirt.common._ import spray.routing._ import spray.http._ import spray.routing.directives._ import spray.httpx.marshalling.Marshaller import spray.httpx.unmarshalling.Unmarshaller import almhirt.akkax._ import almhirt.httpx.spray.m...
chridou/almhirt
ext/almhirt-corex-spray-service/src/main/scala/almhirt/corex/spray/service/HttpEventEndpointFactory.scala
Scala
apache-2.0
804
import scala.reflect.ClassTag import scala.runtime.BoxedUnit object Test { def main(args: Array[String]): Unit = { println(implicitly[ClassTag[Unit]] == ClassTag.Unit) println(implicitly[ClassTag[Boolean]] == ClassTag.Boolean) println(implicitly[ClassTag[Byte]] == ClassTag.Byte) println(implicitly[Cl...
lampepfl/dotty
tests/run/i4205.scala
Scala
apache-2.0
950
package com.twitter.server import com.twitter.app.GlobalFlag import com.twitter.finagle.{Addr, Resolver, Name} import com.twitter.util.Var // TODO: deprecate in favor of Wily dtabs. object resolverMap extends GlobalFlag[Map[String, String]](Map.empty, "A list mapping service names to resolvers (gizmoduck=zk!/gizmo...
travisbrown/twitter-server
src/main/scala/com/twitter/server/FlagResolver.scala
Scala
apache-2.0
1,257
/** * This file is part of agora-board. * Copyright (C) 2016 Agora Voting SL <agora@agoravoting.com> * agora-board 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....
agoravoting/agora-board
app/Filters.scala
Scala
agpl-3.0
1,755
package pl.jozwik.demo import com.typesafe.scalalogging.StrictLogging object Main extends App with StrictLogging { logger.debug(s"""Hello world ${args.mkString(",")}""") val a = 3 val b = 4 logger.debug(s"""$a + $b = ${Demo.add(a, b)}""") }
ajozwik/sbt-start
src/main/scala/pl/jozwik/demo/Main.scala
Scala
apache-2.0
252
/** * 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...
reiseburo/kafka
core/src/main/scala/kafka/controller/ControllerChannelManager.scala
Scala
apache-2.0
23,045
package dzufferey.utils import scala.language.experimental.macros import scala.reflect.macros.blackbox.Context import LogLevel._ /** Simple logger that outputs to stdout. */ object Logger { val lock = new java.util.concurrent.locks.ReentrantLock private var minPriority = Notice.priority val disallowed = scal...
dzufferey/misc-scala-utils
src/main/scala-2/dzufferey/utils/Logger.scala
Scala
apache-2.0
4,924
package org.json4s.reflect import java.sql.Timestamp import java.util.Date import org.json4s.{DateTime, DefaultFormats, Formats, JInt, JObject, JString, MappingException, Obj, Objs, reflect} import org.scalatest.Assertion import org.scalatest.wordspec.AnyWordSpec case class RRSimple(id: Int, name: String, items: Lis...
json4s/json4s
native/src/test/scala/org/json4s/reflect/ReflectorSpec.scala
Scala
apache-2.0
20,041
package ch.epfl.lamp.grading final case class GradingSummary(score: Int, maxScore: Int, feedback: String)
sbt-coursera/sbt-coursera
src/main/scala/ch/epfl/lamp/grading/GradingSummary.scala
Scala
bsd-3-clause
107
package controllers import scala.concurrent.ExecutionContext.Implicits.global import play.api.mvc.WebSocket import play.api.libs.iteratee.Concurrent import play.api.libs.iteratee.Iteratee import com.typesafe.scalalogging.Logger import org.slf4j.LoggerFactory class PortalWebSocket extends SessionConfig with PortalWebS...
richardchankiyin/sysdashboard
Portal/app/controllers/PortalWebSocket.scala
Scala
gpl-3.0
1,571
/** * Copyright (c) 2013-2016 Extended Mind Technologies Oy * * This file is part of Extended Mind. * * Extended Mind 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 * Li...
ttiurani/extendedmind
backend/src/test/scala/org/extendedmind/api/test/ItemWorstCaseSpec.scala
Scala
agpl-3.0
3,812
package scala object ArrayObjectCopySuite extends tests.Suite { class A(_i: Int) { def i = _i } class B(_i: Int, _d: Double) extends A(_i) def initB(arr: Array[B], from: Int = 0) = { var c = 0 while (c < arr.length) { arr(c) = new B(c + from, c.toDouble) c += 1 } } def initA(...
cedricviaccoz/scala-native
unit-tests/src/main/scala/scala/ArrayObjectCopySuite.scala
Scala
bsd-3-clause
4,570
import scala.concurrent.ExecutionContext.Implicits._ import scala.concurrent.Future object Example_02_FuturesAsync extends Example_00_Futures { def findFullProfile(user: String): Future[String] = { import scala.async.Async.{async, await} val fRankingForUser = fRanking(user) val fbasicProfileForUser = ...
enqae/futuresComposition
src/main/scala/Example_02_FuturesAsync.scala
Scala
apache-2.0
567
/* * Copyright (C) 2017 LREN CHUV for Human Brain Project * * This program 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 later version...
LREN-CHUV/workflow
src/main/scala/ch/chuv/lren/woken/validation/package.scala
Scala
apache-2.0
1,606
package com.github.dcapwell.scala.playground.macros import scala.reflect.ClassTag import scala.reflect.macros.{blackbox, whitebox} trait TreeLenses { self: BlackboxSupport => import c.universe._ import scalaz.Lens val modFlags = Lens.lensu[Modifiers, FlagSet]( set = (m, flags) => Modifiers(flags, m.private...
dcapwell/scala-playground
macros/src/main/scala/com/github/dcapwell/scala/playground/macros/MacroSupport.scala
Scala
mit
4,371
/* * Copyright 2011-2022 GatlingCorp (https://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 appli...
gatling/gatling
gatling-recorder/src/test/scala/io/gatling/recorder/render/RequestElementSpec.scala
Scala
apache-2.0
1,293
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
bwsw/sj-platform
core/sj-common/src/main/scala/com/bwsw/sj/common/dal/model/provider/ProviderDomain.scala
Scala
apache-2.0
5,592
package utils import com.typesafe.config.ConfigFactory object ConfigUtils { val INTERNAL_HOST_PATH = "proxy.internalHttpHost" val INTERNAL_PORT_PATH = "proxy.internalHttpPort" val DEFAULT_INTERNAL_HOST = "coordinator.elastic.l4lb.thisdcos.directory" val DEFAULT_INTERNAL_PORT = 9200 lazy val conf: com.type...
amollenkopf/dcos-iot-demo
map-webapp/app/Utils/ConfigUtils.scala
Scala
apache-2.0
1,618
package com.github.mgoeminne.sitar.parser /** * Defines a parser of a particular style of citation. */ trait StyleParser { /** * @return a citation parser for inproceedings citations */ def inProceedingsParser : CitationParser /** * @return a citation parser for article citations *...
mgoeminne/sitar
src/main/scala/com/github/mgoeminne/sitar/parser/StyleParser.scala
Scala
mit
1,847
/** 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 ...
beni55/PredictionIO
core/src/main/scala/io/prediction/controller/LDataSource.scala
Scala
apache-2.0
2,352
/* * 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...
psyyz10/BigDL
spark/dl/src/main/scala/com/intel/analytics/bigdl/nn/MarginCriterion.scala
Scala
apache-2.0
3,618
/** * 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...
prashantbh/kafka
core/src/main/scala/kafka/api/TopicMetadataRequest.scala
Scala
apache-2.0
3,835
package sbt import internals.{ DslEntry, DslSetting, DslEnablePlugins, DslDisablePlugins } package object dsl { def enablePlugins(ps: AutoPlugin*): DslEntry = DslEnablePlugins(ps) def disablePlugins(ps: AutoPlugin*): DslEntry = DslDisablePlugins(ps) }
niktrop/sbt
main/src/main/scala/sbt/dsl/package.scala
Scala
bsd-3-clause
265
package io.vertx.scala import scala.concurrent.{Future, Promise} object FutureHelper { def futurify[A](x: Promise[A] => _): Future[A] = { val p = Promise[A]() x(p) p.future } }
campudus/tableaux
src/main/scala/io/vertx/scala/FutureHelper.scala
Scala
apache-2.0
196
/* * 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/test/scala/com/intel/analytics/bigdl/dllib/nn/keras/LocallyConnected2DSpec.scala
Scala
apache-2.0
2,752
package com.typesafe.slick.examples.lifted import scala.concurrent.{Future, Await} import scala.concurrent.duration.Duration //#imports // Use H2Driver to connect to an H2 database import scala.slick.driver.H2Driver.api._ //#imports /** * A simple example that uses statically typed queries against an in-memory * H...
nuodb/slick
src/sphinx/code/GettingStartedOverview.scala
Scala
bsd-2-clause
3,143
package ecommerce.sales.app import akka.actor._ import akka.kernel.Bootable import ecommerce.sales.{Event, ReservationAggregateRoot} import pl.newicom.dddd.actor.{ActorFactory, DefaultConfig, PassivationConfig} import pl.newicom.dddd.aggregate._ import pl.newicom.dddd.coordination.ReceptorConfig import pl.newicom.dddd...
pawelkaczor/ddd-leaven-akka-v2
sales/write-back/src/main/scala/ecommerce/sales/app/SalesBackendConfiguration.scala
Scala
mit
1,221
package com.typesafe.slick.testkit.tests import org.junit.Assert._ import com.typesafe.slick.testkit.util.{RelationalTestDB, TestkitTest} class AggregateTest extends TestkitTest[RelationalTestDB] { import tdb.profile.simple._ override val reuseInstance = true def testAggregates { class T(tag: Tag) extends...
dvinokurov/slick
slick-testkit/src/main/scala/com/typesafe/slick/testkit/tests/AggregateTest.scala
Scala
bsd-2-clause
9,896
/* Copyright 2009-2016 EPFL, Lausanne */ package leon.utils import scala.collection.mutable.{Stack, Set => MSet} import scala.collection.mutable.Builder import scala.collection.{Iterable, IterableLike, GenSet} /** A stack of mutable sets with a set-like API and methods to push and pop */ class IncrementalSet[A] exte...
regb/leon
src/main/scala/leon/utils/IncrementalSet.scala
Scala
gpl-3.0
1,610
import gruenewa.grid.GridRun object Exec { def main(args: Array[String]) { val executor = gruenewa.grid.GridRun.startExecutor() try { printf("16 + 1 = %d\\n", executor.apply[Int,Int]{1+}(16)) } finally { executor.close() } } }
gruenewa/gruenewa-grid
samples/Exec.scala
Scala
gpl-3.0
261
package pl.szymonmatejczyk.subgraphsampling import com.twitter.cassovary.graph.Graph /** * Created by szymonmatejczyk on 26.03.15. */ class MHSampling(graph: Graph) { // def neighbors(subraphNodes: collection.Set[Int]): Seq[collection.Set[Int]] = { // // } }
szymonm/subgraphSampling
src/main/scala/pl/szymonmatejczyk/subgraphsampling/MHSampling.scala
Scala
apache-2.0
265
package controllers import javax.inject._ import play.api.mvc._ /** * This controller creates an `Action` to handle HTTP requests to the * application's home page. */ @Singleton class HomeController @Inject() extends Controller { /** * Create an Action to render an HTML page with a welcome message. ...
daniloradenovic/helloworld-rest
scala-play/app/controllers/HomeController.scala
Scala
mit
537
package net.liftweb.example.snippet import _root_.org.specs._ import _root_.org.specs.Sugar._ import _root_.org.specs.runner._ import _root_.net.liftweb.example.model._ import _root_.net.liftweb.http.{S, Req, LiftSession} import _root_.net.liftweb.util.{Full, Empty} // This file crashes the compiler. TODO: Investigate...
andreum/liftweb
sites/example/src/test/scala/net/liftweb/example/snippet/WikiSpec.scala
Scala
apache-2.0
5,027
import sbt._ class UseColor(info: ProjectInfo) extends DefaultProject(info) { def ivyCacheDirectory = outputPath / "ivy-cache" override def updateOptions = CacheDirectory(ivyCacheDirectory) :: super.updateOptions.toList override def managedStyle = ManagedStyle.Ivy val repo = Resolver.file("test-repo", ("repo" / ...
sbt/sbt-zero-seven
src/sbt-test/dependency-management/extra/changes/UseColor.scala
Scala
bsd-3-clause
561
package jp.sf.amateras.scala.nio import java.io._ object StreamUtils { /** * Copy contents of the input stream to the output stream. * Both of streams is not closed in this method. * * @param in the input stream * @param out the output stream */ def transfer(in: InputStream, out: OutputStream):...
takezoe/scala-nio
src/main/scala/jp/sf/amateras/scala/nio/StreamUtils.scala
Scala
apache-2.0
2,300
package org.scalaide.core.lexical import org.scalaide.ui.syntax.ScalaSyntaxClass import org.eclipse.jdt.core.JavaCore import org.eclipse.jface.preference.IPreferenceStore import org.eclipse.jface.text.Document import org.eclipse.jface.text.TextAttribute import org.eclipse.jface.text.rules.Token import org.junit.Compar...
scala-ide/scala-ide
org.scala-ide.sdt.core.tests/src/org/scalaide/core/lexical/ScaladocTokenScannerTest.scala
Scala
bsd-3-clause
8,132
package com.olegych.scastie.api package runtime import play.api.libs.json.Json protected[runtime] trait SharedRuntime { def write(instrumentations: List[Instrumentation]): String = { if (instrumentations.isEmpty) "" else Json.stringify(Json.toJson(instrumentations)) } private val maxValueLength = 500 pr...
scalacenter/scastie
runtime-scala/src/main/scala/com.olegych.scastie.api.runtime/SharedRuntime.scala
Scala
apache-2.0
760
package WorkingWithLists.P07 object P07 { def flatten(l: List[Any]): List[Any] = l.foldRight(List[Any]()) { case (el: List[Any], lr) => flatten(el):::lr case (e, lr) => e::lr } def flatten_FlatMap(l: List[Any]): List[Any] = l.flatMap { case el: List[Any] => flatten_FlatMap(el) case e => List(e) ...
ihac/Ninety-Nine-Scala-Problems
src/main/scala/WorkingWithLists/P07/P07.scala
Scala
gpl-3.0
326
package net.quasardb.spark.rdd import org.apache.spark.rdd.RDD import org.apache.spark.sql.{SparkSession, Row, DataFrame} import org.apache.spark.sql.types._ import org.apache.spark._ import java.nio.ByteBuffer import java.nio.charset.StandardCharsets.UTF_8 import java.sql.Timestamp import net.quasardb.qdb._ import ...
bureau14/qdb-spark-connector
src/main/scala/net/quasardb/spark/rdd/DoubleAggregateRDD.scala
Scala
bsd-2-clause
3,038
/* * 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/iht-frontend
test/iht/views/registration/PersonalDetailsViewBehaviour.scala
Scala
apache-2.0
3,187
/** * Created by peter_v on 22/02/15. */ package csv import base.{PredicateObject, EventByResource} import common._ import csv.EventsReader.eventByResourceReader import org.junit.runner.RunWith import org.scalatest.FunSuite import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) class EventsReaderS...
petervandenabeele/AllMyData
src/test/scala/csv/EventsReaderSuite.scala
Scala
mit
5,666
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package play.core.server import java.io.File import java.net.InetAddress import akka.Done import akka.actor.{ ActorSystem, CoordinatedShutdown } import akka.stream.ActorMaterializer import com.lightbend.lagom.devmode.ssl.LagomDevModeSSLHold...
rstento/lagom
dev/reloadable-server/src/main/scala/play/core/server/LagomReloadableDevServerStart.scala
Scala
apache-2.0
13,550
/** * Copyright (c) 2011 ScalaStuff.org (joint venture of Alexander Dvorkovyy and Ruud Diterwich) * * 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....
scalastuff/scalabeans
src/main/scala/org/scalastuff/proto/MutableField.scala
Scala
apache-2.0
2,410
package lila.simul import akka.actor._ import akka.pattern.{ ask, pipe } import play.api.libs.json.Json import scala.concurrent.duration._ import chess.Status import chess.variant.Variant import lila.common.Debouncer import lila.db.dsl.Coll import lila.game.{ Game, GameRepo } import lila.hub.actorApi.lobby.ReloadSimu...
clarkerubber/lila
modules/simul/src/main/SimulApi.scala
Scala
agpl-3.0
7,297
/** * Copyright (c) 2014-2016 Snowplow Analytics Ltd. * All rights reserved. * * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache * License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at * http:/...
bigdecisions/snowplow
4-storage/kinesis-elasticsearch-sink/src/main/scala/com.snowplowanalytics.snowplow.storage.kinesis/elasticsearch/ElasticsearchPipeline.scala
Scala
apache-2.0
2,916
/* * 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 ...
SnappyDataInc/spark
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonParser.scala
Scala
apache-2.0
17,245
package org.jetbrains.plugins.scala package lang package parser package parsing package patterns import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder import org.jetbrains.plugins.scala.lang.parser.parsing.types.{ExistentialClause, ...
jastice/intellij-scala
scala/scala-impl/src/org/jetbrains/plugins/scala/lang/parser/parsing/patterns/TypePattern.scala
Scala
apache-2.0
2,492
/////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2014 Adobe Systems Incorporated. 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 ...
adobe-research/spark-cluster-deployment
sample-application/src/main/scala/ExampleApp.scala
Scala
apache-2.0
1,542
/* * Copyright 2013 - 2017 Outworkers Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
websudos/morpheus
morpheus-dsl/src/main/scala/com/outworkers/morpheus/engine/query/SQLEngine.scala
Scala
bsd-2-clause
2,631
/* * Copyright 2013 Julian Peeters * * 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...
julianpeeters/artisanal-pickle-maker
src/main/scala/types/types/StringRef.scala
Scala
apache-2.0
1,757
package scala.collection.immutable import org.junit.Assert._ import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.JUnit4 @RunWith(classOf[JUnit4]) class SetTest { @Test def test_SI8346_toSet_soundness(): Unit = { val any2stringadd = "Disabled string conversions so as not to get confu...
felixmulder/scala
test/junit/scala/collection/immutable/SetTest.scala
Scala
bsd-3-clause
2,615
/** * Copyright (C) 2013 Stefan Niederhauser (nidin@gmx.ch) * * 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...
nidi3/simple-remote-atlassian
src/main/scala/guru/nidi/atlassian/remote/query/QueryService.scala
Scala
apache-2.0
1,272
package org.bone.ircballoon import org.bone.ircballoon.model._ import org.bone.ircballoon.actor.message._ import I18N.i18n._ import ImageUtil._ import org.eclipse.swt.widgets.{List => SWTList, _} import org.eclipse.swt.layout._ import org.eclipse.swt.events._ import org.eclipse.swt.graphics._ import org.eclipse.swt....
brianhsu/IRCBalloon
src/main/scala/ui/VoteWindow.scala
Scala
gpl-3.0
4,811
package feh.tec.cvis.common import feh.tec.cvis.common.ChannelDescriptor.Comparator import feh.tec.cvis.common.cv.Helper.Array2D import org.opencv.core.Point trait ImageDescriptor { type ADescriptor <: AreaDescriptor def name : String def originalImage : Array[Byte] def sideLength: Int def desc...
fehu/comp-vis
common/src/main/scala/feh/tec/cvis/common/Descriptors.scala
Scala
mit
2,562
package com.wavesplatform.settings import java.io.File import com.wavesplatform.common.state.ByteStr case class WalletSettings(file: Option[File], password: Option[String], seed: Option[ByteStr])
wavesplatform/Waves
node/src/main/scala/com/wavesplatform/settings/WalletSettings.scala
Scala
mit
199
package feh.tec.cvis import java.awt.image._ import java.awt.{Color, Dimension} import java.nio.ByteBuffer import java.util.UUID import feh.dsl.swing2.Var import feh.tec.cvis.DescriptorsSupport.{ADescriptor, IDescriptor} import feh.tec.cvis.common.cv.Helper._ import feh.tec.cvis.common.cv.describe.CallHistory.{TypedA...
fehu/comp-vis
harris-app/src/main/scala/feh/tec/cvis/HarrisApp.scala
Scala
mit
8,955
package com.arcusys.learn.liferay.update.migration import com.arcusys.learn.liferay.util.Base64Helper import com.arcusys.valamis.file.FileTableComponent import com.arcusys.valamis.file.model.FileRecord import scala.slick.driver.JdbcProfile import scala.slick.jdbc.{JdbcBackend, StaticQuery} class FileStorageMigration...
ViLPy/Valamis
learn-portlet/src/main/scala/com/arcusys/learn/liferay/update/migration/FileStorageMigration2303.scala
Scala
lgpl-3.0
1,103
package filodb.coordinator import scala.util.{Failure, Success, Try} import akka.actor.{ActorRef, Address} import com.typesafe.scalalogging.StrictLogging import filodb.core.DatasetRef /** * Each FiloDB dataset is divided into a fixed number of shards for ingestion and distributed in-memory * querying. The ShardMa...
tuplejump/FiloDB
coordinator/src/main/scala/filodb.coordinator/ShardMapper.scala
Scala
apache-2.0
12,868
// code-examples/Rounding/sake.scala // This chapter contains only script files. import sake.Project._ // Define some convenient variables. val libDir = "../lib/" // If true, don't actually run any commands. environment.dryRun = false // If true, show stack traces when a failure happens (doesn't affect some "erro...
XClouded/t4f-core
scala/src/tmp/Rounding/sake.scala
Scala
apache-2.0
1,140
package org.edla.tmdb.shelf import org.htmlcleaner.{CleanerProperties, DomSerializer, HtmlCleaner, TagNode} import java.net.URL import javax.xml.xpath.{XPath, XPathConstants, XPathFactory} object ImdbInfo { def getInfo(imdbId: String): (Option[BigDecimal], Option[Boolean]) = { val url = new URL(s...
newca12/TMDb-shelf
src/main/scala/org/edla/tmdb/shelf/ImdbInfo.scala
Scala
gpl-3.0
2,432
package liang.don.dzviewer.log.net import liang.don.dzviewer.log.{LogLevel, LoggerInterface} /** * File Logger using .Net (C#) libraries. * * @author Don Liang * @Version 0.1.2, 16/09/2011 */ trait FileLogger extends LoggerInterface { override def log(message: String) { sys.error("[" + getClass.getName + ...
dl2k84/DeepZoomViewer
src/liang/don/dzviewer/log/net/FileLogger.scala
Scala
mit
642
/* https://www.hackerrank.com/challenges/simple-array-sum */ package com.negrisoli.algorithms.warmup object SimpleArraySum { def main(args: Array[String]) { var it = io.Source.stdin.getLines() var size = it.next().toInt println(it.next().split(" ").take(size).map(_.toInt).sum) } }
rbatista/algorithms
challenges/hacker-rank/scala/src/main/scala/com/negrisoli/algorithms/warmup/SimpleArraySum.scala
Scala
mit
301
/* * 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 ...
xieguobin/Spark_2.0.0_cn1
ml/clustering/LDA.scala
Scala
apache-2.0
33,346
import scala.io.Source import java.io.ByteArrayInputStream object Test extends dotty.runtime.LegacyApp { val txt = "abcdef" val in = new ByteArrayInputStream(txt.getBytes()); val source = Source.fromInputStream(in); println(source.toString) // forces the BufferedSource to look at the head of the input prin...
yusuke2255/dotty
tests/run/t8690.scala
Scala
bsd-3-clause
373
/* * Copyright 2015 * * 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, ...
TouK/influxdb-reporter
core/src/main/scala/influxdbreporter/core/collectors/GaugeCollector.scala
Scala
apache-2.0
1,452
package com.geeksville.json import org.json4s.CustomSerializer import org.json4s.JsonAST._ import java.util.Date import com.geeksville.util.DateTools object DateSerializer extends CustomSerializer[Date](format => ( { case JString(s) => DateTools.fromISO8601(s) }, { case x: Date => JString(Da...
dronekit/dronekit-server
src/main/scala/com/geeksville/json/DateSerializer.scala
Scala
gpl-3.0
347
package nars.language import java.util._ import nars.io.Symbols import nars.storage.Memory import ImageExt._ import scala.reflect.{BeanProperty, BooleanBeanProperty} //remove if not needed import scala.collection.JavaConversions._ import CompoundTerm._ object ImageExt { /** * Try to make a new ImageExt. Called ...
automenta/opennars
nars_scala/src/main/scala/nars/language/ImageExt.scala
Scala
gpl-2.0
4,965
package fpscala.c03 import fpscala.datastructures.{Cons, List => FpList, Nil => FpNil} import scala.annotation.tailrec object Exercise05 { @tailrec def dropWhile[A](l: FpList[A], p: A => Boolean): FpList[A] = l match { case FpNil => FpNil case Cons(x, xs) if ( !p(x) ) => l case Cons(_, xs) => dropWh...
willtaylor/fpscala
src/main/scala/fpscala/c03/Exercise05.scala
Scala
gpl-3.0
338
package chat.tox.antox.callbacks import android.content.Context class AntoxOnGroupJoinRejectedCallback(private var ctx: Context) /* extends GroupJoinRejectedCallback */ { private var reconnecting = false /* override def groupJoinRejected(groupNumber: Int, reason: ToxGroupJoinRejected): Unit = { if (reason ==...
gale320/Antox
app/src/main/scala/chat/tox/antox/callbacks/AntoxOnGroupJoinRejectedCallback.scala
Scala
gpl-3.0
1,028
package org.mentha.tools.archimate.model import org.mentha.tools.archimate.model.view._ import scala.reflect.ClassTag /** * http://pubs.opengroup.org/architecture/archimate3-doc/chap02.html * A collection of concepts in the context of the ArchiMate language structure. * Note: The top-level language structure i...
zhuj/mentha-web-archimate
archimate-model/src/main/scala/org/mentha/tools/archimate/model/Model.scala
Scala
mit
1,989
/********************************************************************************************************************** * * * Copyright (c) 2013, Reactific Software LLC. All Rights Reserved. ...
reactific/slickery
src/main/scala/com/reactific/slickery/Schema.scala
Scala
apache-2.0
16,193
package com.arcusys.valamis.web.servlet.certificate.response import com.arcusys.valamis.user.model.User case class CertificateSuccessUsersResponse( id: Long, title: String, shortDescription: String, description: String, logo: String, succeedUsers: Seq[User])
igor-borisov/valamis
valamis-portlets/src/main/scala/com/arcusys/valamis/web/servlet/certificate/response/CertificateSuccessUsersResponse.scala
Scala
gpl-3.0
274
/* * 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 ...
actuaryzhang/spark
sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/SparkMetadataOperationSuite.scala
Scala
apache-2.0
7,390
/* * Copyright 2010-2014 Benjamin Lings * * 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...
codingwell/scala-guice
src/main/scala/net/codingwell/scalaguice/BindingExtensions.scala
Scala
apache-2.0
2,945
/* * 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://...
virtualirfan/monifu
core/shared/src/test/scala/monifu/concurrent/cancelables/SingleAssignmentCancelableSuite.scala
Scala
apache-2.0
1,901
/* * Copyright 2010-2011 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...
lzpfmh/framework-2
persistence/mapper/src/test/scala/net/liftweb/mapper/ItemsListSpec.scala
Scala
apache-2.0
2,208
/* * 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 ...
ebruchez/darius-xml.js
xerces/shared/src/main/scala/org/orbeon/apache/xerces/xni/parser/XMLDocumentScanner.scala
Scala
apache-2.0
2,214
package dk.gp.cogp.model import dk.gp.cov.CovFunc import breeze.linalg.DenseVector import breeze.linalg.DenseMatrix import dk.gp.math.invchol import breeze.linalg.cholesky import scala.util.Random import breeze.stats._ import breeze.linalg.InjectNumericOps import breeze.stats.variance.reduceDouble import dk.bayes.math...
danielkorzekwa/bayes-scala-gp
src/main/scala/dk/gp/cogp/model/CogpGPVar.scala
Scala
bsd-2-clause
1,527
package gapt.examples import gapt.expr._ import gapt.proofs.Sequent import gapt.proofs.ceres._ import gapt.proofs.context.update.{ PrimitiveRecursiveFunction => PrimRecFun } import gapt.proofs.context.update.ProofDefinitionDeclaration import gapt.proofs.context.update.ProofNameDeclaration import gapt.proofs.gaptic._ i...
gapt/gapt
examples/schema/OneStrictMonotoneRefutation.scala
Scala
gpl-3.0
9,954
object Sample { def foo(x: Int) { "stop here" } def main(args: Array[String]) { val x = 0 foo(x + 1) } }
consulo/consulo-scala
testdata/debugger/ScalaLocalVariablesEvaluation/param/src/Sample.scala
Scala
apache-2.0
125
/** * This file is part of SensApp [ http://sensapp.modelbased.net ] * * Copyright (C) 2011- SINTEF ICT * Contact: SINTEF ICT <nicolas.ferry@sintef.no> * * Module: net.modelbased.sensapp * * SensApp is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public L...
SINTEF-9012/sensapp
net.modelbased.sensapp.system.rrdtest/src/main/scala/net/modelbased/sensapp/system/sample/Boot.scala
Scala
lgpl-3.0
1,473
import scala.util.{ Failure, Success } import scala.concurrent._ import reactivemongo.api._ import reactivemongo.bson._ import reactivemongo.core.errors.GenericDatabaseException object BSONCollectionSpec extends org.specs2.mutable.Specification { "BSON collection" title import reactivemongo.api.commands.bson.Def...
charleskubicek/ReactiveMongo
driver/src/test/scala/BSONCollectionSpec.scala
Scala
apache-2.0
12,878
package org.denigma.kappa.model object Change extends Enumeration { type Change = Value val Removed, Added, Unchanged, Updated = Value }
antonkulaga/kappa-notebook
kappa-model/shared/src/main/scala/org/denigma/kappa/model/Change.scala
Scala
mpl-2.0
142
import stainless.annotation._ object LastDynAssert { @extern def dynAssert(cond: Boolean): Unit = { (??? : Unit) } ensuring(cond) def f() = { dynAssert(false) (dynAssert(false), 0) assert(false) } }
epfl-lara/stainless
frontends/benchmarks/verification/valid/LastDynAssert.scala
Scala
apache-2.0
228
package aia.faulttolerance import java.io.File import java.util.UUID import akka.actor._ import akka.actor.SupervisorStrategy.{ Stop, Resume, Restart, Escalate } import akka.actor.OneForOneStrategy import scala.concurrent.duration._ import language.postfixOps package dbstrategy2 { object LogProcessingApp extends A...
RayRoestenburg/akka-in-action
chapter-fault-tolerance/src/main/scala/aia/faulttolerance/LogProcessing2.scala
Scala
mit
6,134
/* * 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
mllib/src/test/scala/org/apache/spark/ml/feature/BinarizerSuite.scala
Scala
apache-2.0
4,294
package gh2011.models import net.liftweb.json.JsonAST.JValue case class IssueCommentEventPayload(repo: String, actor: String, issue_id: Long, comment_id: Long, actor_gravatar: String) object IssueCommentEventPayload { def apply(json: JValue): Option[IssueCommentEventPayload] = ...
mgoeminne/github_etl
src/main/scala/gh2011/models/IssueCommentEventPayload.scala
Scala
mit
888
/* * 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 ...
WindCanDie/spark
mllib/src/test/scala/org/apache/spark/mllib/feature/PCASuite.scala
Scala
apache-2.0
2,957
/* * 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 ...
wwjiang007/flink
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/runtime/utils/InMemoryLookupableTableSource.scala
Scala
apache-2.0
7,654
package chapter02 /* Implement a SyncVar class with the following interface: class SyncVar[T] { def get(): T = ??? def put(x: T): Unit = ??? } A SyncVar object is used to exchange values between two or more threads. When created, the SyncVar object is empty: * Calling get throws an exception * Calling put adds a ...
vsuharnikov/books-exercises
scala/learning-concurrent-programming-in-scala/src/main/scala/chapter02/Exercise03.scala
Scala
mit
922
package jp.co.bizreach.play2stub import java.io.File import com.typesafe.config.{ConfigRenderOptions, ConfigFactory} import play.api.Configuration import play.api.test.FakeApplication import play.api.test.Helpers._ import scala.collection.JavaConverters._ trait FakePlayHelper { def PlayApp(configs:(String, Any)*...
bizreach/play2-stub
src/test/scala/jp/co/bizreach/play2stub/FakePlayHelper.scala
Scala
apache-2.0
1,276
package com.twitter.diffy.proxy import java.net.InetSocketAddress import com.twitter.util.Duration case class Settings( datacenter: String, servicePort:InetSocketAddress, candidate: Target, primary: Target, secondary: Target, protocol: String, clientId: String, pathToThriftJar: String, serviceClass...
shaunstanislaus/diffy
src/main/scala/com/twitter/diffy/proxy/Settings.scala
Scala
apache-2.0
664
package org.jetbrains.plugins.scala.lang.completion import com.intellij.codeInsight.completion._ import com.intellij.codeInsight.lookup.{LookupElement, LookupElementWeigher} import com.intellij.patterns.PlatformPatterns import com.intellij.psi.PsiElement import com.intellij.psi.util.PsiTreeUtil import com.intellij.uti...
katejim/intellij-scala
src/org/jetbrains/plugins/scala/lang/completion/ScalaCaseClassParametersNameContributer.scala
Scala
apache-2.0
7,868
class i0 { private var main(i1: String): Unit = { class i2 extends AnyRef { def i3 = 0 } def this() = { this(i4); i3 } } }
som-snytt/dotty
tests/fuzzy/comment3.scala
Scala
apache-2.0
123
/* * Copyright 2016 Branislav Lazic * * 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...
BranislavLazic/akkabot
akkabot-ui/src/main/scala/io/akkabot/package.scala
Scala
apache-2.0
1,712
package com.nyavro.manythanks.ws.contact case class Contact(id:Long, phone:String)
nyavro/manythanks
webService/src/main/scala/com/nyavro/manythanks/ws/contact/Contact.scala
Scala
apache-2.0
84
package lila.coach import lila.common.paginator.Paginator final class CoachPager(api: CoachApi) { val maxPerPage = 10 import CoachPager._ def apply(order: Order, page: Int): Fu[Paginator[Coach.WithUser]] = api.listedWithUserList.map { all => Paginator.fromList( list = all sortWith order.pre...
clarkerubber/lila
modules/coach/src/main/CoachPager.scala
Scala
agpl-3.0
1,253
package reshapes.figures import java.awt.Color import java.awt.Graphics2D import java.awt.Point import reshapes.drawing.DrawingSpaceState class Freedraw( drawingSpaceState: DrawingSpaceState, strokeWidth: Int = 1, color: Color = Color.BLACK, current: Int = 0, path: List[Point] = List.empty) ext...
volkc/REScala
Examples/Shapes/src/main/scala/reshapes/figures/Freedraw.scala
Scala
apache-2.0
807
package de.leanovate.swaggercheck.shrinkable import com.fasterxml.jackson.core.JsonGenerator import org.scalacheck.Shrink import scala.collection.immutable.Stream._ /** * Json object. * * @param required optional set of required fields for shrinking * @param order optional order of fields * @param fields t...
leanovate/swagger-check
json-schema-gen/src/main/scala/de/leanovate/swaggercheck/shrinkable/CheckJsObject.scala
Scala
mit
2,465
import compiletime._ import compiletime.ops.int._ object Test { type TupleTypeIndex[T <: Tuple, C] <: Int = T match { case C *: t => 0 case h *: t => S[TupleTypeIndex[t, C]] } trait TupleExtractor[TT <: Tuple, C] { def get(t: TT): C } given [T <: Tuple, C, EV <: TupleTypeIndex[T, C]]: TupleExtr...
dotty-staging/dotty
tests/neg/i11985.scala
Scala
apache-2.0
585