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) 2013-2018 Expedia 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 wri...
mikkokar/styx
system-tests/e2e-suite/src/test/scala/com/hotels/styx/support/generators/CookieHeaderGenerator.scala
Scala
apache-2.0
3,394
/* * MarginalMAPVEStrategy.scala * A class that solves a marginal MAP problem using VE. * * Created By: William Kretschmer (kretsch@mit.edu) * Creation Date: July 1, 2015 * * Copyright 2015 Avrom J. Pfeffer and Charles River Analytics, Inc. * See http://www.cra.com or email figaro@cra.com for information...
scottcb/figaro
Figaro/src/main/scala/com/cra/figaro/algorithm/structured/strategy/solve/MarginalMAPVEStrategy.scala
Scala
bsd-3-clause
2,113
/* 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-commons/src/main/scala/com/twitter/scalding/commons/source/LongThriftTransformer.scala
Scala
apache-2.0
1,765
/* Copyright 2009-2018 EPFL, Lausanne */ package inox package ast import scala.collection.immutable.BitSet /** Expression definitions for Pure Scala. * * Every expression in Inox inherits from [[Expressions.Expr]]. * Expressions can be manipulated with functions in [[Constructors]] and [[ExprOps]]. * * If ...
epfl-lara/inox
src/main/scala/inox/ast/Expressions.scala
Scala
apache-2.0
28,454
/*********************************************************************** * Copyright (c) 2013-2019 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...
elahrvivaz/geomesa
geomesa-tools/src/main/scala/org/locationtech/geomesa/tools/export/formats/GmlExporter.scala
Scala
apache-2.0
7,495
package org.jetbrains.plugins.scala.failed.resolve /** * Created by Anton.Yalyshev on 20/04/16. */ class MacrosTest extends FailedResolveCaretTestBase { def testSCL8507(): Unit = doResolveCaretTest( s""" |object x extends App { | import shapeless._ | case class Foo(i: Int, s: String, ...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/failed/resolve/MacrosTest.scala
Scala
apache-2.0
597
/* * 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 ...
sh-cho/cshSpark
rdd/LocalCheckpointRDD.scala
Scala
apache-2.0
2,836
object FolderSourced { override def toString = "folder-sourced" }
rvanider/scala-script
test/modules/folder-sourced.scala
Scala
mit
67
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
mike0sv/spark
mllib/src/main/scala/org/apache/spark/ml/param/shared/SharedParamsCodeGen.scala
Scala
apache-2.0
9,983
/* * 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 ...
nilbody/sparkling-water
core/src/test/scala/org/apache/spark/h2o/H2OContextLocalClusterSuite.scala
Scala
apache-2.0
2,275
object i0 { def i1(i2: Int, i3: Int, i4: Int) = i4 val i5 = null; i4(1, 2, 3): _ 'i17 = 1 val i9 = .length (i2: Int, i10: Int): (Int => (_)) => 42 def i11 = i11 type i18 = i10 { type i10 <: i1.i2 } = { i32: i0 => type i6 type i79 <: i7{type i9, i10 <: i5.i2] } val i9: i8 { type i4 = i13.i9 } val i16 = new i1 {} } impor...
som-snytt/dotty
tests/fuzzy/628b3c175445b95d9155223a2651ad97c6091657.scala
Scala
apache-2.0
484
package controllers import com.bryzek.apidoc.spec.v0.models.Method import lib.{ApiClient, Config} import models.MainTemplate import com.bryzek.apidoc.api.v0.models.User import play.api.mvc._ import play.api.mvc.Results.Redirect import scala.concurrent.{ Await, Future } import scala.concurrent.duration._ import play.ap...
Seanstoppable/apidoc
www/app/controllers/AuthenticatedRequest.scala
Scala
mit
1,835
package com.programmaticallyspeaking.ncd.nashorn import com.programmaticallyspeaking.ncd.host._ import com.programmaticallyspeaking.ncd.host.types.{ObjectPropertyDescriptor, PropertyDescriptorType} import com.programmaticallyspeaking.ncd.infra.StringAnyMap import org.scalatest.Inside import org.scalatest.prop.TableDri...
provegard/ncdbg
src/test/scala/com/programmaticallyspeaking/ncd/nashorn/ObjectPropertiesTest.scala
Scala
bsd-3-clause
15,029
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you...
Myllyenko/incubator-toree
protocol/src/main/scala/org/apache/toree/kernel/protocol/v5/content/ExecuteInput.scala
Scala
apache-2.0
1,487
package org.jetbrains.plugins.hocon package parser import com.intellij.psi.impl.DebugUtil.psiToString import org.junit.runner.RunWith import org.junit.runners.AllTests @RunWith(classOf[AllTests]) class HoconParserTest extends HoconFileSetTestCase("parser") { override protected def transform(data: Seq[String]): Str...
triplequote/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/hocon/parser/HoconParserTest.scala
Scala
apache-2.0
549
/* * Copyright 2013-2015 James Shade * * 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...
jamesshade/time8
src/test/scala/org/shade/time/InstantWrapperSpec.scala
Scala
apache-2.0
3,123
package freez.view.tfingertree package strict import annotation.tailrec object Free extends freez.view.DequeFreeComp { type Deque[R[_, _], A, B] = TFingerTree[R, A, B] }
mandubian/freez
src/main/scala/view/tfingertree_strict/Free.scala
Scala
apache-2.0
185
package org.hirosezouen.hzutil import org.scalatest.FunSuite import org.hirosezouen.hzutil._ class PackageObjectTest extends FunSuite { test("unsignedBigEndianShortBytes2Int") { assertResult(0x0000ABCD.toInt)(unsignedBigEndianShortBytes2Int(Array[Byte](0xAB.toByte,0xCD.toByte))) assertRe...
chokopapashi/HZUtils
src/test/scala/org/hirosezouen/hzutil/PackageObjectTest.scala
Scala
bsd-3-clause
4,173
/** * Copyright 2015 Thomson Reuters * * Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
nruppin/CM-Well
server/cmwell-ws/app/wsutil/RawFieldFilter.scala
Scala
apache-2.0
11,389
/* Copyright 2016 ScalABM 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 distribu...
EconomicSL/agora
src/main/scala/org/economicsl/agora/markets/tradables/Tradable.scala
Scala
apache-2.0
863
/* * Scala (https://www.scala-lang.org) * * Copyright EPFL and Lightbend, Inc. * * Licensed under Apache License 2.0 * (http://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package scala package xml pack...
scala/scala-xml
shared/src/main/scala/scala/xml/transform/BasicTransformer.scala
Scala
apache-2.0
1,679
// Copyright 2015 Foursquare Labs Inc. All Rights Reserved. package io.fsq.common.concurrent import com.twitter.util.Future import io.fsq.common.base.{Failure, Outcome, Success} /** * Inspired by [[io.fsq.common.concurrent.FutureOption]], this is a monadic wrapper * around Future[Outcome[S, F]] so you can easi...
foursquare/fsqio
src/jvm/io/fsq/common/concurrent/FutureOutcome.scala
Scala
apache-2.0
3,358
/* * Copyright 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 applicable l...
pbrant/framework
core/util/src/main/scala/net/liftweb/util/CssSelector.scala
Scala
apache-2.0
10,630
/* * Copyright 2014 – 2015 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/esclient
src/test/scala/de/knutwalker/esclient/ESClientSpec.scala
Scala
apache-2.0
2,896
/** * 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"); yo...
noslowerdna/kafka
core/src/test/scala/integration/kafka/api/TransactionsTest.scala
Scala
apache-2.0
27,503
package com.github.opengrabeso.mixtio.facade import org.scalajs.dom import scala.scalajs.js import scala.scalajs.js.annotation._ import mapboxgl_util._ import GeoJSON._ @JSGlobal @js.native object mapboxgl extends js.Any { var accessToken: String = js.native @js.native // https://github.com/mapbox/mapbox-gl-js...
OndrejSpanel/Stravamat
frontend/src/main/scala/com/github/opengrabeso/mixtio/facade/mapboxgl.scala
Scala
gpl-2.0
2,774
package org.allenai.common import org.allenai.common.testkit.UnitSpec import spray.json._ import java.io.FileInputStream import java.io.FileOutputStream import java.io.ObjectInputStream import java.io.ObjectOutputStream import java.nio.file.Files class EnumSpec extends UnitSpec { "all" should "return all registe...
allenai/common
core/src/test/scala/org/allenai/common/EnumSpec.scala
Scala
apache-2.0
3,018
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
apache/flink
flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/planner/codegen/over/MultiFieldRangeBoundComparatorCodeGenerator.scala
Scala
apache-2.0
3,030
/* * 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-scala/src/test/scala/org/apache/flink/api/scala/runtime/TupleSerializerCompatibilityTest.scala
Scala
apache-2.0
3,783
import org.clapper.classutil.ClassFinder import java.io.File import com.factor10.plugins._ object HosturApplication { def main(args: Array[String]): Unit = { println("HosturApplication") val classpath = args.map(new File(_)) val finder = ClassFinder(classpath) val classes = finder.getClasses // classes is an ...
marhel/splug
hostur/src/main/scala/Application.scala
Scala
mit
798
/* * 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 ...
jinglining/flink
flink-connectors/flink-hadoop-compatibility/src/main/scala/org/apache/flink/hadoopcompatibility/scala/HadoopInputs.scala
Scala
apache-2.0
5,380
/* * Copyright 2016 The BigDL Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
wzhongyuan/BigDL
spark/dl/src/test/scala/com/intel/analytics/bigdl/keras/nn/DenseSpec.scala
Scala
apache-2.0
2,881
package org.oc.ld32.entity.ai import org.oc.ld32.entity.EntityEnemy object Tasks { def createFromID(entity: EntityEnemy, id: String, priority: Int = 1): AITask = { if(id.equals("patrol")) { new AIPatrol(priority, entity) } else if(id.equals("wander")) { new AIWander(priority, entity) ...
OurCraft/LD32
src/main/scala/org/oc/ld32/entity/ai/AITask.scala
Scala
apache-2.0
628
package com.sksamuel.scapegoat.inspections import com.sksamuel.scapegoat.PluginRunner import org.scalatest.{FreeSpec, Matchers} /** @author Stephen Samuel */ class EmptyMethodTest extends FreeSpec with ASTSugar with Matchers with PluginRunner { override val inspections = Seq(new EmptyMethod) "empty empty" - { ...
RichardBradley/scapegoat
src/test/scala/com/sksamuel/scapegoat/inspections/EmptyMethodTest.scala
Scala
apache-2.0
806
/* * 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 * distribute...
haghard/nosql-join-stream
src/test/scala/mongo/channel/test/join/JoinMongoSpec.scala
Scala
apache-2.0
7,197
package com.twitter.finagle.serverset2.client import java.util.concurrent.LinkedBlockingDeque import com.twitter.util.{Monitor, Updatable} private[client] object EventDeliveryThread extends Thread("com.twitter.zookeeper.client.internal event delivery") { private val q = new LinkedBlockingDeque[(Updatable[WatchS...
mkhq/finagle
finagle-serversets/src/main/scala/com/twitter/finagle/serverset2/client/EventDeliveryThread.scala
Scala
apache-2.0
635
/** * 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...
wangcy6/storm_app
frame/kafka-0.11.0/kafka-0.11.0.1-src/core/src/main/scala/kafka/tools/VerifyConsumerRebalance.scala
Scala
apache-2.0
5,850
/* * 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...
jedesah/Quasar
rdbms/src/main/scala/quasar/physical/rdbms/model/TypeMapper.scala
Scala
apache-2.0
1,029
/* Copyright (c) 2016 Lucas Satabin * * 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...
satabin/lingua
fst/src/main/scala/lingua/EpsilonProof.scala
Scala
apache-2.0
1,508
package com.github.projectflink.common.als import org.jblas.FloatMatrix object ALSUtils { def outerProduct(vector: FloatMatrix, matrix: FloatMatrix, factors: Int): Unit = { val vd = vector.data val md = matrix.data var row = 0 var pos = 0 while(row < factors){ var col = 0 while(col...
mxm/flink-perf
perf-common/src/main/scala/com/github/projectflink/common/als/ALSUtils.scala
Scala
apache-2.0
1,265
package org.http4s.headers import cats.implicits._ import org.http4s.Uri class RefererSpec extends HeaderLaws { checkAll("Referer", headerLaws(`Retry-After`)) def getUri(uri: String): Uri = Uri.fromString(uri).fold(_ => sys.error(s"Failure on uri: $uri"), identity) "render" should { "format an absolut...
ZizhengTai/http4s
tests/src/test/scala/org/http4s/headers/RefererSpec.scala
Scala
apache-2.0
867
/* * 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/metrics/AUC.scala
Scala
apache-2.0
7,459
@author(AnnotatedCode.authorName) @version(major=1,minor=0) object AnnotatedCode { final val authorName = "Grzegorz Balcerek" private[this] val commentText = "needs to be a var" @todo @fixme @comment(commentText) val num1 = 2 val num2 = num1*2 : @comment("is this value correct?") def hello(@fixme("unnecessary...
grzegorzbalcerek/scala-book-examples
examples/AnnotatedCode.scala
Scala
mit
421
/* *\\ ** Squants ** ** ** ** Scala Quantities and Units of Measure Library and DSL ** ** (c) 2013-2015, G...
garyKeorkunian/squants
shared/src/main/scala/squants/radio/SpectralIrradiance.scala
Scala
apache-2.0
3,614
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
h2oai/sparkling-water
benchmarks/src/main/scala/ai/h2o/sparkling/benchmarks/TrainAlgorithmFromH2OFrameBenchmark.scala
Scala
apache-2.0
1,770
/** * 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...
wangcy6/storm_app
frame/kafka-0.11.0/kafka-0.11.0.1-src/core/src/main/scala/kafka/network/SocketServer.scala
Scala
apache-2.0
24,848
/* * 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...
mariusvniekerk/incubator-toree
kernel/src/main/scala/org/apache/toree/boot/layer/HandlerInitialization.scala
Scala
apache-2.0
9,113
package org.bitcoins.node import akka.actor.ActorSystem import org.bitcoins.chain.config.ChainAppConfig import org.bitcoins.chain.models.BlockHeaderDAO import org.bitcoins.core.api.chain.ChainApi import org.bitcoins.core.api.chain.ChainQueryApi.FilterResponse import org.bitcoins.core.api.chain.db.{ BlockHeaderDb, ...
bitcoin-s/bitcoin-s
node/src/main/scala/org/bitcoins/node/NeutrinoNode.scala
Scala
mit
6,627
package com.varunvats.practice.tree object PathsWithSum { def apply(tree: BinaryTreeNode[Int], sum: Int): Int = { val (allSums, allNodes) = apply(Some(tree)) val allPossibleSums = allSums ++: allNodes allPossibleSums.count(_ == sum) } private def apply(nodeO: Option[BinaryTreeNode[Int]]): (Seq[Int]...
varunvats/practice
jvm/src/main/scala/com/varunvats/practice/tree/PathsWithSum.scala
Scala
mit
1,115
package me.frmr.kafka.detective.util import java.util.concurrent._ import java.util.concurrent.atomic._ class PrefixNamedThreadFactory(prefix: String) extends ThreadFactory { private[this] var threadNumber = new AtomicInteger(0) private[this] def threadName: String = { val currentNumber = threadNumber.getAnd...
farmdawgnation/kafka-detective
daemon/src/main/scala/me/frmr/kafka/detective/util/PrefixNamedThreadFactory.scala
Scala
apache-2.0
458
package lila.tournament // All durations are expressed in seconds case class TournamentClock(limit: Int, increment: Int) { def limitInMinutes = chessClock.limitInMinutes def show = chessClock.show lazy val chessClock = chess.Clock(limit, increment) def hasIncrement = increment > 0 }
JimmyMow/lila
modules/tournament/src/main/TournamentClock.scala
Scala
mit
297
package cz.kamenitxan.jakon.core.dynamic.entity /** * Created by TPa on 13.04.2020. */ abstract class AbstractJsonResponse(val status: ResponseStatus, val data: Any) { }
kamenitxan/Jakon
modules/backend/src/main/scala/cz/kamenitxan/jakon/core/dynamic/entity/AbstractJsonResponse.scala
Scala
bsd-3-clause
174
/* * Copyright 2017 TWO SIGMA OPEN SOURCE, 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 applicable...
jpallas/beakerx
kernel/scala/src/test/scala/com/twosigma/beakerx/scala/chart/xychart/plotitem/LineTest.scala
Scala
apache-2.0
1,971
/* * sbt * Copyright 2011 - 2018, Lightbend, Inc. * Copyright 2008 - 2010, Mark Harrah * Licensed under Apache License 2.0 (see LICENSE) */ package sbt.internal /** * Provides extension methods that allow us to wrap FunctionN instances with another FunctionN that * delegates to the input FunctionN, but overrid...
sbt/sbt
main-command/src/main/scala/sbt/internal/LabeledFunctions.scala
Scala
apache-2.0
6,784
package me.snov.sns.model import spray.json._ case class Configuration( version: Int = 1, timestamp: Long = System.currentTimeMillis(), subscriptions: List[Subscription], topics: List[Topic] ...
s12v/sns
src/main/scala/me/snov/sns/model/Configuration.scala
Scala
apache-2.0
434
package com.antiparagon.cvexperimenter.chessscanner import org.opencv.core.{Core, Rect} import org.opencv.imgcodecs.Imgcodecs import org.scalatest._ /** * This test file is meant to test all the example chessboard images saved in the * 'CVExperimenter/images/Chess Scanner/Starting Position' folder. * * Create...
antiparagon/CVExperimenter
src/test/scala/com/antiparagon/cvexperimenter/chessscanner/ChessboardFinderTester.scala
Scala
mit
8,896
package com.trafficland.augmentsbt.distribute import com.typesafe.sbt.packager.Keys._ import com.typesafe.sbt.packager.linux.LinuxPlugin.autoImport.{Linux, daemonUser} import com.typesafe.sbt.packager.rpm.RpmPlugin.autoImport.{rpmDaemonLogFile, rpmVendor} import sbt._ import com.trafficland.augmentsbt.rpm.RPMPlugin o...
ereichert/augment-sbt
src/main/scala/com/trafficland/augmentsbt/distribute/StartupScriptPlugin.scala
Scala
apache-2.0
2,203
package controllers import play.api.mvc._ import models.{Lot, NeoStart} import play.api.libs.json.{Json, JsArray} object Application extends Controller { def index = Action { Ok(views.html.index("Welcome to Infostark", models.Lot.all)) } def search = Action { Ok(views.html.lot.search("Infostark", mode...
animotron/panimo
app/controllers/Application.scala
Scala
agpl-3.0
432
package pl.writeonly.son2.impl object Types { val CLI = "cli" val MAIN = "main" val PIPER = "piper" val STREAMER = "streamer" }
writeonly/son2
scallions-clis/scallions-main/src/test/scala/pl/writeonly/son2/impl/Types.scala
Scala
apache-2.0
137
package roc package postgresql import java.nio.charset.StandardCharsets import org.scalacheck.Gen import org.specs2.ScalaCheck /** Used for generating valid Postgresql Lexical structures * * @see http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html * for more on what constitues a valid SQL ...
finagle/roc
core/src/test/scala/roc/postgresql/PostgresqlLexicalGen.scala
Scala
bsd-3-clause
2,113
/* * 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 ...
jkbradley/spark
core/src/main/scala/org/apache/spark/util/ThreadUtils.scala
Scala
apache-2.0
13,621
package com.criteo.sre.storage.sgrastar.singularity package lucene import java.nio.file.Paths import org.apache.cassandra.config.DatabaseDescriptor import org.slf4j.LoggerFactory import scala.collection.mutable.HashMap object MetricsIndexManager { private val log = LoggerFactory.getLogger(getClass) private val m...
dpanth3r/cassandra-graphite-poc
src/main/scala/sgrastar/singularity/lucene/MetricsIndexManager.scala
Scala
apache-2.0
986
/* * SPDX-License-Identifier: Apache-2.0 * Copyright 2016-2020 Daniel Urban and contributors listed in NOTICE.txt * * 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.ap...
durban/exp-reagents
core/src/test/scala/dev/tauri/choam/kcas/EMCASSpec.scala
Scala
apache-2.0
2,949
package scalariform.formatter // format: OFF class IfExprFormatterTest extends AbstractExpressionFormatterTest { "if(x>y)(x)else(y)" ==> "if (x > y) (x) else (y)" "if (true) 3 else 4" ==> "if (true) 3 else 4" """if (true) |println("Hello world")""" ==> """if (true) | println("Hello world")""" ""...
gawkermedia/scalariform
scalariform/src/test/scala/scalariform/formatter/IfExprFormatterTest.scala
Scala
mit
5,595
package com.amazzeo.elmtactoe.actors import akka.actor._ import com.amazzeo.elmtactoe.models._ import com.amazzeo.elmtactoe.gameutils._ sealed trait GameProgress case object GameNotStarted extends GameProgress case object GameInProgress extends GameProgress case object GameFinished extends GameProgress object GameAc...
amazzeo/elmtactoe
app/actors/GameActor.scala
Scala
mit
2,823
package controllers import play.api.mvc._ import models.{Order, OrderSubmitted} import org.reactivecouchbase.eventstore.Message import es.{Broadcaster, Bootstrap} import akka.pattern.ask import akka.util.Timeout import scala.concurrent.duration._ import es.Bootstrap.ec import play.api.libs.iteratee.{Enumeratee, Concur...
ReactiveCouchbase/ReactiveCouchbase-play
samples/scala/orders/app/controllers/Application.scala
Scala
apache-2.0
1,310
/* * @author Philip Stutz * * Copyright 2014 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/licenses/LICENSE-2.0 * * U...
hicolour/triplerush
src/test/scala/com/signalcollect/triplerush/dictionary/DictionarySpec.scala
Scala
apache-2.0
6,408
package models import models.db.TransactionTypes case class TransactionType( id: Option[Long] = None, parent: Option[Long] = None, name: String, code: String, ordering: Int ) extends IdentifiableModel(id) { def formattedName: String = parent match { case Some(id) => TransactionTypes.byId(id).formattedName ...
vatt2001/finprocessor
app/models/TransactionType.scala
Scala
mit
361
package edu.rit.csh.github import java.io.FileWriter import org.apache.spark.storage.StorageLevel import org.apache.spark.streaming.{Minutes, Seconds, StreamingContext} import org.apache.spark.{SparkConf, SparkContext} object GithubStream { def main(args: Array[String]) = { val conf = new SparkConf() .se...
JDrit/WikiStreaming
src/main/scala/edu/rit/csh/github/GithubStream.scala
Scala
apache-2.0
2,405
package edu.nus.hipci.daemon import scala.collection.immutable.Map import scala.concurrent._ import scala.concurrent.duration._ import akka.actor.ActorSystem import akka.pattern._ import akka.util.Timeout import org.scalatest.FlatSpec import org.scalatest.Matchers._ import org.scalatest.concurrent.ScalaFutures._ impor...
rgoulter/hipci
src/test/edu/nus/hipci/daemon/TestExecutorSpec.scala
Scala
mit
1,738
/* * Copyright 2017 Kailuo Wang * * 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 ...
kailuowang/mainecoon
tests/src/test/scala/mainecoon/tests/autoFlatMapTests.scala
Scala
apache-2.0
3,135
package eveapi.compress import scalaz._, Scalaz._ import java.time._ import eveapi.data.crest._ case class Compress[L](implicit val lens: PathLens[L]) { trait CompressLink[T[_], IdType] { def compress(href: T[L]): IdType def decompress(id: IdType): Reader[EveServer, T[L]] } implicit def compressShortI...
scala-eveapi/eveapi
compress/src/main/scala/compress.scala
Scala
mit
8,592
/* * 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 ...
tophua/spark1.52
core/src/test/scala/org/apache/spark/ui/scope/RDDOperationGraphListenerSuite.scala
Scala
apache-2.0
12,399
package com.twitter.finatra.http.routing import com.twitter.finagle.http.{HttpMuxer, Request, Response, Status} import com.twitter.finagle.httpx.compat.NettyClientAdaptor import com.twitter.finagle.{Service, httpx} import com.twitter.finatra.json.FinatraObjectMapper import com.twitter.finatra.utils.FuturePools import ...
tom-chan/finatra
http/src/main/scala/com/twitter/finatra/http/routing/HttpWarmup.scala
Scala
apache-2.0
3,028
package com.twitter.finagle.netty3.ssl.server import com.twitter.finagle.Address import com.twitter.finagle.ssl.server.{SslServerConfiguration, SslServerSessionVerifier} import java.net.SocketAddress import java.security.cert.Certificate import javax.net.ssl.{SSLEngine, SSLSession} import org.jboss.netty.channel._ imp...
mkhq/finagle
finagle-netty3/src/test/scala/com/twitter/finagle/netty3/ssl/server/SslServerConnectHandlerTest.scala
Scala
apache-2.0
3,566
package com.rocketfuel.sdbc.postgresql class TableWithEnumSpec extends PostgreSqlSuite.Base { import postgresql._ case class TableHasEnum( id: Int, mood: String, value: String ) object TableHasEnum { object All { implicit val selectable: Selectable[All.type, TableHasEnum] = Sel...
rocketfuel/sdbc
postgresql/src/test/scala/com/rocketfuel/sdbc/postgresql/TableWithEnumSpec.scala
Scala
bsd-3-clause
949
object Test { // the existential causes a cast and the cast makes searchClass not be in tail position // can we get rid of the useless cast? @annotation.tailrec final def searchClass: Class[_] = { "packageName" match { case _ => searchClass } } }
loskutov/intellij-scala
testdata/scalacTests/pos/t6145.scala
Scala
apache-2.0
278
package com.jjabuk.bookstore import akka.actor.ActorSystem import com.jjabuk.bookstore.catalog.MongoBookCommands import com.jjabuk.bookstore.catalog.protocols.CatalogueProtocol.{Book, BookAdded} import org.slf4j.LoggerFactory import scala.concurrent.duration._ import scala.concurrent.{Await, Future} object BookAddin...
jjabuk/bookstore
src/main/scala/com/jjabuk/bookstore/BookAddingSample.scala
Scala
apache-2.0
846
/* * 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/BucketizerSuite.scala
Scala
apache-2.0
6,278
package com.twitter.scalding.typed.memory_backend import java.util.concurrent.atomic.AtomicReference class AtomicBox[T <: AnyRef](init: T) { private[this] val ref = new AtomicReference[T](init) def lazySet(t: T): Unit = ref.lazySet(t) def set(t: T): Unit = ref.set(t) def swap(t: T): T = ref.get...
jzmq/scalding
scalding-core/src/main/scala/com/twitter/scalding/typed/memory_backend/AtomicBox.scala
Scala
apache-2.0
685
object i0 { def i1(i2: Int) = 2 class i3 val i4: (i1 { type i3; val i4 = i3 }) }
som-snytt/dotty
tests/fuzzy/b39f34ce574ac51b821ab409e48fd4acee02c755.scala
Scala
apache-2.0
80
package com.github.nzyuzin.assignments.ai.apriori import java.util.Scanner import scala.collection.mutable import scala.io.Source object Apriori { def main(args: Array[String]): Unit = { val fileName = "apriori.txt" val data = readDataFromFile(fileName) val frequentSets = getFrequentSets(data, 4) ...
nzyuzin/ai-assignments
src/main/scala/com/github/nzyuzin/assignments/ai/apriori/Apriori.scala
Scala
gpl-3.0
3,421
package com.wix.fax.concordfax.model /** * @see <a href="https://developer.concordfax.com/ofd/html/4ad911b8-7eee-45a8-8a40-d288d85cccb1.htm">SimpleGetFaxStatus Method</a> */ object Statuses { val succeeded = 1L val failed = 2L val processed = 3L val invalidJobId = -5019L }
wix/libfax
libfax-concordfax-core/src/main/scala/com/wix/fax/concordfax/model/Statuses.scala
Scala
apache-2.0
296
trait LogLevelType object Test { type LogLevel = Int with LogLevelType final val ErrorLevel = 1.asInstanceOf[Int with LogLevelType] def main(args: Array[String]): Unit = { List(ErrorLevel, ErrorLevel) } }
yusuke2255/dotty
tests/run/t6126.scala
Scala
bsd-3-clause
217
package learn.danipl.model import org.scalatest.{FlatSpec, Matchers} class SimpleRecordTest extends FlatSpec with Matchers { "A SimpleRecord" should "be filled of data" in { val simpleRecord: SimpleRecord = new SimpleRecord(0, Array.emptyByteArray) simpleRecord.id shouldNot be(Nil) simpleRecord.body ...
danipl/LearnScalaProject
src/test/scala/learn/danipl/model/SimpleRecordTest.scala
Scala
gpl-3.0
344
/* * 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...
monifu/monifu
monix-reactive/shared/src/main/scala/monix/reactive/subjects/BehaviorSubject.scala
Scala
apache-2.0
6,321
package com.sksamuel.avro4s import java.nio.ByteBuffer import java.util.UUID import org.apache.avro.generic.GenericData.EnumSymbol import org.apache.avro.generic.GenericRecord import shapeless.ops.coproduct.Reify import shapeless.{:+:, CNil, Coproduct, Generic, Inl, Inr, Lazy} import scala.collection.JavaConverters....
YuvalItzchakov/avro4s
avro4s-macros/src/main/scala/com/sksamuel/avro4s/ToRecord.scala
Scala
mit
9,489
import org.scalatest.{Matchers, FunSuite} class GardenTest extends FunSuite with Matchers { test("missing child tests") { Garden.defaultGarden("RC\\nGG").getPlants("Potter") should equal(List.empty) } test("alice tests") { Garden.defaultGarden("RC\\nGG").getPlants("Alice") should equal(List(...
nlochschmidt/xscala
kindergarten-garden/src/test/scala/GardenTest.scala
Scala
mit
2,936
/** * Copyright 2017 Tristan Nixon * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
tnixon/spark-rdd-trycatch
src/main/scala/org/memeticlabs/spark/rdd/trycatch/streaming/java/JavaErrorHandlingDStream.scala
Scala
apache-2.0
1,528
// Copyright 2014 Commonwealth Bank of Australia // // 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 ap...
CommBank/omnitool
core/src/main/scala/au/com/cba/omnia/omnitool/Result.scala
Scala
apache-2.0
9,112
package repositories.conservation.dao import com.google.inject.{Inject, Singleton} import models.conservation.events._ import no.uio.musit.functional.FutureMusitResult import no.uio.musit.models.{ActorId, EventId} import no.uio.musit.repositories.DbErrorHandlers import org.joda.time.DateTime import play.api.db.slick.D...
MUSIT-Norway/musit
service_backend/app/repositories/conservation/dao/ActorRoleDateDao.scala
Scala
gpl-2.0
4,228
/* * 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 ...
ArvinDevel/onlineAggregationOnSparkV2
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetProtobufCompatibilitySuite.scala
Scala
apache-2.0
3,114
// Databricks notebook source // MAGIC %md // MAGIC // MAGIC # [SDS-2.2, Scalable Data Science](https://lamastex.github.io/scalable-data-science/sds/2/2/) // COMMAND ---------- // MAGIC %md // MAGIC Archived YouTube video of this live unedited lab-lecture: // MAGIC // MAGIC [![Archived YouTube video of this live un...
lamastex/scalable-data-science
db/2/2/029_TweetLanguageClassifier.scala
Scala
unlicense
9,901
package ionroller.aws import com.amazonaws.auth.AWSCredentialsProvider import com.amazonaws.services.s3.AmazonS3Client import scalaz.Kleisli import scalaz.concurrent.Task object S3 { val client: Kleisli[Task, AWSCredentialsProvider, AmazonS3Client] = { Kleisli { credentialsProvider => Task(new AmazonS3Cl...
browngeek666/ionroller
core/src/main/scala/ionroller/aws/S3.scala
Scala
mit
379
package pl.touk.nussknacker.engine.lite.api import cats.data.ValidatedNel import cats.{Monad, ~>} import pl.touk.nussknacker.engine.api.context.ProcessCompilationError import pl.touk.nussknacker.engine.api.process.{Sink, Source} import pl.touk.nussknacker.engine.api.typed.typing.TypingResult import pl.touk.nussknacker...
TouK/nussknacker
engine/lite/components-api/src/main/scala/pl/touk/nussknacker/engine/lite/api/customComponentTypes.scala
Scala
apache-2.0
2,337
import annotation.experimental class Class1: import language.experimental.fewerBraces // error import language.experimental.namedTypeArguments // error import language.experimental.genericNumberLiterals // error import language.experimental.erasedDefinitions // ok: only check at erased definition @experiment...
dotty-staging/dotty
tests/neg-custom-args/no-experimental/experimental-nested-imports-2.scala
Scala
apache-2.0
1,284
package scala.meta.semantic /** * @author mucianm * @since 03.06.16. */ import scala.{Seq => _} import scala.collection.immutable.Seq import scala.meta._ trait Context { def dialect: Dialect def typecheck(tree: Tree): Tree def defns(ref: Ref): Seq[Member] def members(tpe: Type): Seq[Member] def sup...
ilinum/intellij-scala
src/scala/meta/semantic/Context.scala
Scala
apache-2.0
622
package sds.classfile.constant_pool class ClassInfo(_index: Int) extends ConstantInfo { def index: Int = _index override def toString(): String = s"Class\t#$index" }
g1144146/sds_for_scala
src/main/scala/sds/classfile/constant_pool/ClassInfo.scala
Scala
apache-2.0
174
package de.leanovate.swaggercheck.schema.gen import de.leanovate.swaggercheck.TestSchema import de.leanovate.swaggercheck.schema.ValidationResultToProp._ import de.leanovate.swaggercheck.schema.model.JsonPath import de.leanovate.swaggercheck.shrinkable.CheckJsValue import org.scalacheck.Prop._ trait DefinitionChecks ...
leanovate/swagger-check
json-schema-gen/src/test/scala/de/leanovate/swaggercheck/schema/gen/DefinitionChecks.scala
Scala
mit
586
package io.getquill.context.sql import io.getquill.Spec import io.getquill.context.sql.testContext._ import io.getquill.Literal class SqlQuerySpec extends Spec { implicit val naming = new Literal {} "transforms the ast into a flatten sql-like structure" - { "inner join query" in { val q = quote { ...
mentegy/quill
quill-sql/src/test/scala/io/getquill/context/sql/SqlQuerySpec.scala
Scala
apache-2.0
21,130