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 breeze.linalg /* Copyright 2012 David Hall 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...
jaredk-porch/breeze
math/src/main/scala/breeze/linalg/Tensor.scala
Scala
apache-2.0
8,480
package com.tribbloids.spookystuff.uav import scala.concurrent.duration.Duration /** * Created by peng on 16/07/17. */ object UAVConst { import scala.concurrent.duration._ object UAVNavigation { val delayMin: Duration = 0.seconds // val blocking: Boolean = true } }
tribbloid/spookystuff
uav/src/main/scala/com/tribbloids/spookystuff/uav/UAVConst.scala
Scala
apache-2.0
288
package fr.ramiro.sfuzzy.dsl import fr.ramiro.sfuzzy._ import org.scalatest.FunSuite import MembershipFunctions.{ piecewiseLinear => l } class TipperTest extends FunSuite { //noinspection TypeAnnotation case object food extends FuzzyVar { val rancid: FuzzyTerm = l((0, 1), (1, 1), (3, 0)) val delicious: Fu...
rrramiro/sFuzzyLogic
src/test/scala/fr/ramiro/sfuzzy/dsl/TipperTest.scala
Scala
apache-2.0
4,595
class UnapplySeq { class B { def _1 = "text" def _2 = Seq(1, 2, 3) } class A { val isEmpty: Boolean = false def get: B = new B } object Z { def unapplySeq(s: String): Option[B] = None } "text" match { case Z(s, l, z) => /*start*/l/*end*/ } } //Int
katejim/intellij-scala
testdata/typeInference/newExtractors/UnapplySeq.scala
Scala
apache-2.0
294
package com.twitter.algebird.macros import com.twitter.algebird._ import com.twitter.algebird.macros.caseclass._ import com.twitter.algebird.macros.ArbitraryCaseClassMacro.arbitrary import org.scalacheck.{ Properties, Arbitrary } import org.scalacheck.Prop.forAll object CaseClassMacrosTest extends Properties("Case c...
erikerlandson/algebird
algebird-test/src/test/scala/com/twitter/algebird/macros/CaseClassMacrosTest.scala
Scala
apache-2.0
957
package lila package object learn extends PackageObject { private[learn] val logger = lila.log("learn") }
luanlv/lila
modules/learn/src/main/package.scala
Scala
mit
110
package org.eigengo.akkapatterns.domain import com.typesafe.config.ConfigFactory import com.mongodb.{ServerAddress, WriteConcern} import scala.collection.JavaConversions._ import akka.contrib.jul.JavaLogging object Settings extends JavaLogging { // https://groups.google.com/d/topic/scala-user/wzguzEJtLaI/discussio...
eigengo/akka-patterns
server/domain/src/main/scala/org/eigengo/akkapatterns/domain/settings.scala
Scala
apache-2.0
2,079
package eu.pepot.eu.spark.inputsplitter.common.file.matcher import eu.pepot.eu.spark.inputsplitter.common.file.{FileDetails, FileDetailsSet} import org.apache.log4j.Logger object FilesMatcher { val logger = Logger.getLogger(this.getClass) /** * Retrieve only the files that conform to the condition. * @p...
mauriciojost/spark-input-splitter
src/main/scala/eu/pepot/eu/spark/inputsplitter/common/file/matcher/FilesMatcher.scala
Scala
apache-2.0
938
package examples import mhtml._ import scala.scalajs.js object Timer extends Example { var interval: js.UndefOr[js.timers.SetIntervalHandle] = js.undefined def app: xml.Node = { val counter = Var(0) interval = js.timers.setInterval(1000)(counter.update(_ + 1)) <p>Seconds elapsed: {counter}</p> } o...
OlivierBlanvillain/monadic-html
examples/src/main/scala/mhtml/examples/Timer.scala
Scala
mit
422
/* * 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 ...
chuckchen/spark
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveShim.scala
Scala
apache-2.0
49,441
/* * Copyright 2016 Nicolas Rinaudo * * 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...
nrinaudo/kantan.regex
core/shared/src/test/scala/kantan/regex/CharDecoderTests.scala
Scala
apache-2.0
866
package cc.factorie.app.nlp.pos import java.io._ import java.util.{HashSet, HashMap} import cc.factorie.app.chain.Observations._ import cc.factorie.app.nlp.{Document, Sentence, Token} import cc.factorie.util.{ClasspathURL, BinarySerializer} /** * Created by Oskar Singer on 10/6/14. */ class CtbChainPosTagger exte...
hlin117/factorie
src/main/scala/cc/factorie/app/nlp/pos/CtbChainPosTagger.scala
Scala
apache-2.0
6,206
import scala.reflect.macros.blackbox.Context object Impls { def foo(c: Context)(xs: c.Expr[Int]*) = { import c.universe._ val stripped_xs = xs map (_.tree) toList match { case List(Typed(stripped, Ident(wildstar))) if wildstar == typeNames.WILDCARD_STAR => List(stripped) case _ => ??? } v...
yusuke2255/dotty
tests/disabled/macro/run/macro-expand-varargs-explicit-over-nonvarargs-good/Impls_1.scala
Scala
bsd-3-clause
439
package gameover.fwk.ai import com.badlogic.gdx.math.{Rectangle, Vector2} import com.badlogic.gdx.utils.{Array => GdxArray} trait CollisionDetector { /** * Check an area status */ def checkPosition(area: Rectangle): CollisionState.Value /** * Check a position status */ def checkPosition(x: Float...
PixelDuck/gameover-game-framework
src/main/scala/gameover/fwk/ai/CollisionDetector.scala
Scala
mit
2,181
package org.mandrake.simulation import scala.reflect.ClassTag case class SimpleAggregator[T <: Event : ClassTag]() extends StateInputAggregator { override def aggregate(events: Vector[Event]): StateInputAggregator.Result = events.iterator.collect { case event: T => event }.find(_ => true).fold[StateIn...
louis-mon/mandrake
src/main/scala/org/mandrake/simulation/SimpleAggregator.scala
Scala
mit
645
import helper.WithServer import java.io.File import net.azalea.curl.HTTP import org.apache.http.entity.mime.content.ContentBody import org.apache.http.entity.StringEntity import org.scalatra.ScalatraServlet import org.scalatra.servlet.{MultipartConfig, FileUploadSupport} import org.specs2.mutable.Specification import s...
Sunao-Yoshii/scala_curl
src/test/scala/HTTPPostSpec.scala
Scala
apache-2.0
3,347
// // Codex - a multi-language code indexer and grokker // http://github.com/samskivert/codex package codex.extract import org.junit.Assert._ import org.junit._ class ClikeTest { import ExtractorTest._ @Test def testSomeJava { val out = test(new ClikeExtractor("java"), """ package com.test public class Foo...
samskivert/codex
src/test/scala/codex/extract/ClikeTest.scala
Scala
bsd-3-clause
1,507
/* * Licensed to Cloudera, Inc. under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Cloudera, Inc. licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use thi...
azureplus/hue
apps/spark/java/livy-server/src/main/scala/com/cloudera/hue/livy/server/interactive/InteractiveWebSession.scala
Scala
apache-2.0
5,634
import collection._ import collection.concurrent.TrieMap object IteratorSpec extends Spec { def test() { "work for an empty trie" in { val ct = new TrieMap val it = ct.iterator it.hasNext shouldEqual (false) evaluating { it.next() }.shouldProduce [NoSuchElementException] } def ...
felixmulder/scala
test/files/run/ctries-new/iterator.scala
Scala
bsd-3-clause
7,120
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
HerbiePorter/your-tax-calculator-frontend
test/services/VersionCheckServiceSpec.scala
Scala
apache-2.0
1,937
package playground.typelevel import shapeless.test.illTyped object BoolTypeSpecs { implicitly[TrueType =:= TrueType] implicitly[FalseType =:= FalseType] illTyped("implicitly[TrueType =:= FalseType]") illTyped("implicitly[FalseType =:= TrueType]") // NOT implicitly[TrueType#Not =:= FalseType] implicitly...
falconepl/scala-playground
src/test/scala/playground/typelevel/BoolTypeSpecs.scala
Scala
mit
1,107
package com.github.j5ik2o.forseti.adaptor.repository trait IdConfig { val timestampBits: Int val dataCenterIdBits: Int val workerIdBits: Int val sequenceBits: Int val epoch: Long lazy val maxTimestamp: Long = -1L ^ (-1L << timestampBits) lazy val maxDataCenterId: Long = -1L ^ (-1L << dataCenterIdB...
j5ik2o/forseti
server/server-adaptor-driver/src/main/scala/com/github/j5ik2o/forseti/adaptor/repository/IdConfig.scala
Scala
mit
1,380
package org.skycastle.core.design import org.skycastle.util.grid.{GridSize, GridBounds, GridPos} import org.skycastle.util.Vec3i /** * A component of a design. * Has some shape and outside dimensions. */ trait Part { def anchorPos: GridPos def gridSize: GridSize def outerBounds: GridBounds def occupiedCel...
zzorn/skycastle
src/main/scala/org/skycastle/core/design/Part.scala
Scala
gpl-2.0
344
package mesosphere.marathon package state import mesosphere.UnitTest import mesosphere.marathon.core.instance.TestTaskBuilder import mesosphere.marathon.core.pod.{BridgeNetwork, ContainerNetwork} import mesosphere.marathon.core.task.state.NetworkInfo import mesosphere.marathon.state.Container.PortMapping import mesosp...
gsantovena/marathon
src/test/scala/mesosphere/marathon/state/AppDefinitionPortAssignmentsTest.scala
Scala
apache-2.0
10,924
package com.datastax.examples.meetup import org.joda.time.{DateTimeZone, DateTime, Duration} import org.scalatra.scalate.ScalateSupport import org.scalatra.{CorsSupport, ScalatraServlet} import scala.concurrent.Await import scala.concurrent.duration._ import org.json4s.{DefaultFormats, Formats} import org.scalatra.js...
MiguelPeralvo/spark-streaming-demo
web/src/main/scala/com/datastax/examples/meetup/EventStatsServlet.scala
Scala
apache-2.0
1,806
/* __ *\\ ** ________ ___ / / ___ __ ____ Scala.js API ** ** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL ** ** __\\ \\/ /__/ __ |/ /__/ __ |/_// /_\\ \\ http://scala-lang.org/ ** ** /____/\\___/...
xuwei-k/scala-js
library/src/main/scala/scala/scalajs/js/Function.nodoc.scala
Scala
bsd-3-clause
6,032
package mockws import java.io._ import java.util.zip.GZIPInputStream import java.util.zip.GZIPOutputStream import play.shaded.ahc.org.asynchttpclient.Response import mockws.MockWSHelpers._ import play.api.mvc.Results._ import play.api.test.Helpers._ import org.scalatest.funsuite.AnyFunSuite import org.scalatest.match...
leanovate/play-mockws
src/test/scala/mockws/GzippedResponsesTest.scala
Scala
mit
937
/** * Exercise 3: * * Repeat the preceding assignment, but produce a new array with the swapped * values. Use for/yield. * **/ // 1 val a = Array(1, 2, 3, 4, 5) val result = for(b <- a.grouped(2); c <- b.reverse) yield c result.toArray // Array(2, 1, 4, 3, 5): Array[Int] // 2 val a = Array(1, 2, 3, 4, 5) val resul...
ragmha/scala-impatient
solutions/working-with-arrays/ex3.scala
Scala
mit
486
/** * 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...
Mszak/kafka
core/src/main/scala/kafka/coordinator/GroupMetadataManager.scala
Scala
apache-2.0
44,338
package kogu.practice.fpinscala.state object Main { def main(args: Array[String]): Unit = { val inputs = List(Coin, Turn, Coin, Turn, Coin, Turn, Coin, Turn) val steps = Machine.simulateMachine(inputs) println(steps.run(Machine(locked = true, 5, 10))) println(steps.run(Machine(locked = true, 0, 10))...
kogupta/scala-playground
src/main/scala/kogu/practice/fpinscala/state/Main.scala
Scala
apache-2.0
328
package org.simpleservices import org.kakashi.simpleservices.ServiceRoutes import spray.http.StatusCodes._ import spray.testkit.ScalatestRouteTest class ServiceRoutesSpec extends AbstractServiceSpec with ScalatestRouteTest with ServiceRoutes { def actorRefFactory = system "ServiceRoutes" should { "...
freeservices/simpleservices
src/test/scala/com/kakashi/simpleservices/ServiceSpec.scala
Scala
mit
1,295
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
liquidarmour/ct-calculations
src/test/scala/uk/gov/hmrc/ct/accounts/frs102/boxes/AC5032Spec.scala
Scala
apache-2.0
2,365
package example import org.scalatest._ import csvquery._ import scalikejdbc._ import org.scalatest.funspec.AnyFunSpec import org.scalatest.matchers.should.Matchers class UsageSpec extends AnyFunSpec with Matchers { // http://support.spatialkey.com/spatialkey-sample-csv-data/ val filepath = "src/test/resources/Sa...
scalikejdbc/csvquery
src/test/scala/example/UsageSpec.scala
Scala
mit
2,275
package org.ninjatasks.spi import org.ninjatasks.UnitSpec /** * Tests for the ResultUpdater class. * Created by Gilad Ber on 6/14/2014. */ class ResultUpdaterTest extends UnitSpec { trait Updaters { val plus = ResultUpdater((a: Int, b: Int) => a + b, 0) val mult = ResultUpdater((a: Int, b: Int) => a * b, 1) ...
giladber/ninja-tasks
src/test/scala/org/ninjatasks/spi/ResultUpdaterTest.scala
Scala
apache-2.0
6,050
package sample import scala.annotation.tailrec /** * An example service for Spring to inject. Calculates Fibonacci number using tail recursion * Created by Richard Thorne (ilan toren) on 6/18/14. */ class FibonacciService { def fibonacci(n: Int) : BigInt ={ @tailrec def fib( n: Int, a:BigInt, b: BigInt) : ...
ilantoren/akka-router-scala-spring
app/sample/FibonacciService.scala
Scala
apache-2.0
437
/* * * Copyright (c) 2017 Radicalbit * * This file is part of flink-JPMML * * flink-JPMML 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) ...
maocorte/flink-jpmml
project/PublishSettings.scala
Scala
agpl-3.0
2,534
/******************************************************************************* * Copyright (c) 2014 eBay Software Foundation. * * 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 * * ...
eBay/ostara
ostara-upgrade/src/main/scala/org/ebaysf/ostara/upgrade/MigrationUtils.scala
Scala
apache-2.0
13,247
package lolchat.model case class Friend( name: String, id: String, chatMode: ChatMode, isOnline: Boolean, groupName: Vector[String], selectedChamp: Option[String], gameStatus: Option[String], level: Int, wins: Int, statusMsg: String, rankedTier: Option[String], rankedDivision: Option[String], ...
Thangiee/League-of-Legend-Chat-Lib-Scala
lib/src/main/scala/lolchat/model/Friend.scala
Scala
mit
412
package org.wselwood.teatimer.gui import javafx.scene.control.{Label, Slider, Button} import javafx.fxml.{Initializable, FXML} import java.net.URL import java.util.ResourceBundle import javafx.beans.property.{SimpleIntegerProperty, SimpleBooleanProperty} import javafx.scene.media.AudioClip import org.wselwood....
wselwood/TeaTimer
src/org/wselwood/teatimer/gui/TeaTimerController.scala
Scala
bsd-3-clause
6,861
package io.reactors package protocol import io.reactors.container.RHashSet import io.reactors.container.RRing import scala.annotation.unchecked /** Collection that stores `Valve` objects, and acts as a `Valve` itself. */ class MultiValve[@specialized(Int, Long, Double) T: Arrayable](val window: Int) { private[...
storm-enroute/reactive-collections
reactors-protocol/shared/src/main/scala/io/reactors/protocol/MultiValve.scala
Scala
bsd-3-clause
4,046
package controllers import javax.inject.Inject import play.api.i18n.MessagesApi import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import com.overviewdocs.messages.DocumentSetCommands import com.overviewdocs.models.{CloneJob,DocumentSet} import controllers.auth.AuthorizedAction i...
overview/overview-server
web/app/controllers/CloneImportJobController.scala
Scala
agpl-3.0
2,203
// // Copyright 2012-2020 Paytronix Systems, 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 ...
paytronix/utils-open
validation/src/main/scala/com/paytronix/utils/validation/reflection.scala
Scala
apache-2.0
1,918
/* * RunningSum.scala * (FScape) * * Copyright (c) 2001-2022 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU Affero General Public License v3+ * * * For further information, please contact Hanns Holger Rutz at * contact@sciss.de */ package de.sciss.fscape package s...
Sciss/FScape-next
core/shared/src/main/scala/de/sciss/fscape/stream/RunningSum.scala
Scala
agpl-3.0
1,760
package com.dataintuitive.luciuscore package api import org.apache.spark.rdd.RDD import org.apache.spark.sql.Dataset import org.apache.spark.sql.SparkSession import model.v4._ import genes._ import filters._ import signatures._ import correlations._ import lenses.CombinedPerturbationLenses.lengthLens object TopTable...
data-intuitive/LuciusCore
src/main/scala/com/dataintuitive/luciuscore/api/TopTable.scala
Scala
apache-2.0
4,058
package metabrowse import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import scala.scalajs.js import monaco.Range import monaco.Promise import monaco.Uri import monaco.editor.IActionDescriptor import monaco.editor.IEditor import monaco.editor.IEditorConstructionOptions import mona...
scalameta/metadoc
metabrowse-js/src/main/scala/metabrowse/MetabrowseEditorService.scala
Scala
apache-2.0
2,161
package se.culvertsoft.mgen.idlparser import java.io.File import scala.collection.JavaConversions.mapAsJavaMap import scala.collection.JavaConversions.seqAsJavaList import scala.xml.XML.loadFile import se.culvertsoft.mgen.api.model.Project import se.culvertsoft.mgen.idlparser.util.XmlUtils.RichXmlNode object ParseM...
culvertsoft/mgen
mgen-idlparser/src/main/scala/se/culvertsoft/mgen/idlparser/ParseModule.scala
Scala
mit
1,628
/* * Scala.js (https://www.scala-js.org/) * * Copyright EPFL. * * Licensed under Apache License 2.0 * (https://www.apache.org/licenses/LICENSE-2.0). * * See the NOTICE file distributed with this work for * additional information regarding copyright ownership. */ package org.scalajs.linker sealed abstract cl...
nicolasstucki/scala-js
linker/shared/src/main/scala/org/scalajs/linker/CheckedBehavior.scala
Scala
apache-2.0
642
/* * 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...
wvlet/airframe
airframe-http-codegen/src/test/scala/wvlet/airframe/http/codegen/ClassScannerTest.scala
Scala
apache-2.0
1,159
package org.sameersingh.mf import org.junit._ import Assert._ class MatrixTest { @Test def testPruning = { val numRows = 5 val numCols = 5 val m = new Matrix("m") for (i <- 0 until numRows) for (j <- 0 until numCols) { if (i < j) { m += new Cell { val row: ID =...
sameersingh/mf
src/test/scala/org/sameersingh/mf/MatrixTest.scala
Scala
apache-2.0
734
/* * Copyright 2017 PayPal * * 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 writin...
Harikiranvuyyuru/squbs
squbs-testkit/src/test/scala/org/squbs/testkit/TestRouteSpec.scala
Scala
apache-2.0
3,188
package org.ucf.scala /** * In computer science, a programming language is said to have first-class functions * if it treats functions as first-class citizens. This means the language supports * passing functions as arguments to other functions, returning them as the values * from other functions, and assign...
bingrao/Scala-Learning
Function/src/main/scala/org/ucf/scala/FirstClassFunction.scala
Scala
mit
2,327
/** * Copyright (C) 2012 - 101loops.com <dev@101loops.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required ...
crashnote/crashnote-java
modules/core/src/test/scala/com/crashnote/test/core/unit/report/ThrowableLogEvtSpec.scala
Scala
apache-2.0
626
package io.aos.ebnf.spl.ast sealed abstract class Operator case class ComparisonOperator(operator: String, value: String) extends Operator case class InOperator(valueList: Seq[String], negate: Boolean = false) extends Operator case class ExistsOperator(negate: Boolean = false) extends Operator
echalkpad/t4f-data
parser/ebnf/src/main/scala/io/aos/ebnf/spl/ast/Operator.scala
Scala
apache-2.0
300
/* * 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 ...
chenc10/Spark-PAF
sql/core/src/test/scala/org/apache/spark/sql/MathExpressionsSuite.scala
Scala
apache-2.0
12,382
package io.youi.communication import fabric.Value import java.util.concurrent.atomic.AtomicLong import fabric.rw._ case class Message(id: Long, `type`: MessageType, name: Option[String] = None, method: Option[String] = None, params: Option[V...
outr/youi
communication/src/main/scala/io/youi/communication/Message.scala
Scala
mit
1,567
package org.jetbrains.plugins.scala package codeInspection package collections /** * Nikolay.Tropin * 5/30/13 */ class FilterSizeTest extends OperationsOnCollectionInspectionTest { override val hint = ScalaInspectionBundle.message("filter.size.hint") def test_1(): Unit = { val selected = s"Array().${START}f...
JetBrains/intellij-scala
scala/scala-impl/test/org/jetbrains/plugins/scala/codeInspection/collections/FilterSizeTest.scala
Scala
apache-2.0
2,169
package edu.cmu.lti.nlp.amr.ConceptInvoke import edu.cmu.lti.nlp.amr._ import edu.cmu.lti.nlp.amr.Train._ import edu.cmu.lti.nlp.amr.BasicFeatureVector._ import edu.cmu.lti.nlp.amr.ConceptInvoke.PhraseConceptPair._ import scala.collection.mutable.ArrayBuffer import scala.collection.{mutable => m, immutable => i} obje...
jflanigan/jamr
src/ConceptInvoke/Concepts.scala
Scala
bsd-2-clause
18,748
/* * 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 ...
chenc10/Spark-PAF
core/src/test/scala/org/apache/spark/scheduler/MapStatusSuite.scala
Scala
apache-2.0
4,685
package sbt import java.io.PrintWriter object MainLogging { def multiLogger(config: MultiLoggerConfig): Logger = { import config._ val multi = new MultiLogger(console :: backed :: extra) // sets multi to the most verbose for clients that inspect the current level multi setLevel Level.unionAll(backingLeve...
jroper/sbt
util/log/MainLogging.scala
Scala
bsd-3-clause
1,554
package com.gilt.opm import java.util.{ConcurrentModificationException, Date, UUID} import com.gilt.opm.lock.LockManager import com.gilt.opm.query._ import com.gilt.opm.storage.MongoMapper import com.mongodb.casbah.Imports._ import com.mongodb.casbah.commons.Implicits.wrapDBObj import com.mongodb.casbah.commons.{Mong...
gilt/opm
src/main/scala/com/gilt/opm/OpmMongoStorage.scala
Scala
mit
32,410
/* * 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-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/utils/SortUtil.scala
Scala
apache-2.0
4,604
package com.yoohaemin.hufsclassroom.repository import org.scalacheck._ import org.scalatest.{FlatSpecLike, Matchers} import org.scalatest.prop.PropertyChecks import com.yoohaemin.hufsclassroom.model.{Email, User, UserName} class ConversionSpec extends UserArbitraries with FlatSpecLike with Matchers { forAll { (dto...
yoo-haemin/hufs-classroom
service/test/src/com/yoohaemin/hufsclassroom/repository/ConversionSpec.scala
Scala
agpl-3.0
708
package scorex.transaction.state.database.blockchain import org.h2.mvstore.{MVMap, MVStore} import scorex.account.Account import scorex.block.Block import scorex.block.Block.BlockId import scorex.consensus.ConsensusModule import scorex.transaction.BlockStorage._ import scorex.transaction.History.BlockchainScore import...
alexeykiselev/WavesScorex
scorex-transaction/src/main/scala/scorex/transaction/state/database/blockchain/StoredBlockchain.scala
Scala
cc0-1.0
5,294
package com.tresata.ganitha.mahout import org.apache.mahout.math.{ Vector, DenseVector } import org.scalatest.FunSpec import Implicits._ class RichVectorSpec extends FunSpec { describe("A RichVector") { it("should support apply constructors") { assert(RichVector(6, List((1, 1.0), (3, 2.0), (5, 3.0))) ...
tresata/ganitha
ganitha-mahout/src/test/scala/com/tresata/ganitha/mahout/RichVectorSpec.scala
Scala
apache-2.0
2,196
/*********************************************************************** * Copyright (c) 2013-2022 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...
locationtech/geomesa
geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/iterators/S3Iterator.scala
Scala
apache-2.0
1,212
/* * 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
sql/core/src/test/scala/org/apache/spark/sql/execution/SortSuite.scala
Scala
apache-2.0
1,875
package com.themillhousegroup.l7.xml import scala.xml._ import scala.xml.Group import scala.xml.Comment import scala.xml.NamespaceBinding /** * Knows how to write an `Elem` *just-so* to be minimally different from * a "natively-created" L7 XML file. */ object LayerSevenXMLWriter { def write(w: java.io.Writer, ...
themillhousegroup/l7-merge
src/main/scala/com/themillhousegroup/l7/xml/LayerSevenXMLWriter.scala
Scala
mit
3,966
package com.twitter.inject.server import com.google.common.net.{HttpHeaders, MediaType} import com.google.inject.Stage import com.twitter.conversions.time._ import com.twitter.finagle.builder.ClientBuilder import com.twitter.finagle.http._ import com.twitter.finagle.service.Backoff._ import com.twitter.finagle.service...
syamantm/finatra
inject/inject-server/src/test/scala/com/twitter/inject/server/EmbeddedTwitterServer.scala
Scala
apache-2.0
18,758
package org.sisioh.aws4s.core.auth import java.io.{ File, InputStream } import com.amazonaws.auth._ import org.sisioh.aws4s.PimpedType object AWSCredentialsFactory { def createAnonymous(): AWSCredentials = new AnonymousAWSCredentials() def createProperties(file: File): AWSCredentials = new PropertiesCreden...
sisioh/aws4s
aws4s-core/src/main/scala/org/sisioh/aws4s/core/auth/RichAWSCredentials.scala
Scala
mit
990
package com.github.mdr.mash.compiler import com.github.mdr.mash.compiler.BareStringify.bareStringify import com.github.mdr.mash.parser.AbstractSyntax.{ AstNode, Program } import com.github.mdr.mash.parser.{ Abstractifier, MashParser, Provenance } import org.scalatest.{ FlatSpec, Matchers } class BareStringifyTest ext...
mdr/mash
src/test/scala/com/github/mdr/mash/compiler/BareStringifyTest.scala
Scala
mit
1,942
/* * 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 ...
csantanapr/incubator-openwhisk
tests/src/test/scala/org/apache/openwhisk/core/database/s3/S3WithPrefixTests.scala
Scala
apache-2.0
1,530
/* * 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 ...
alvsanand/spark-generic-connector
sgc-ftp/src/test/scala/es/alvsanand/sgc/ftp/normal/FTPSgcConnectorFactoryTest.scala
Scala
apache-2.0
3,016
package utils import common._ /** * Libreria de funciones para Listas de enteros */ object ListIntUtils { /** * Buscar * Dada una lista y una función de comparación, devuelve el valor que cumple la condición. */ def buscar(lista: List[Int], com:(Int, Int) => Boolean): Int = if (lista...
julian-lanfranco/funcional-fcyt
funsets/src/main/scala/utils/ListIntUtils.scala
Scala
gpl-2.0
3,183
/******************************************************************************* * Copyright (c) 2014 Łukasz Szpakowski. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MP...
luckboy/Purfuncor
src/main/scala/pl/luckboy/purfuncor/frontend/resolver/Resolver.scala
Scala
mpl-2.0
24,904
package models import java.util.UUID import config.ConfigBanana import org.w3.banana.{FOAFPrefix, PointedGraph, XSDPrefix} import org.w3.banana.binder.PGBinder import play.api.libs.json.Json import scala.language.implicitConversions import scala.util.Try /** Describes a verification of a task by a user. * * @pa...
BonarBeavis/veritask
app/models/Verification.scala
Scala
apache-2.0
1,668
package com.raquo.domtypes.fixtures.tags /** Tag represents an Element builder */ class Tag[+Element]( val name: String, val void: Boolean )
raquo/scala-dom-types
shared/src/test/scala/com/raquo/domtypes/fixtures/tags/Tag.scala
Scala
mit
146
package example.herding.cats import org.scalacheck.Properties import org.scalacheck.Prop.forAll import FreeMonoids._ object FreeMonoidCheckLawsSpec extends Properties("FreeMonoids") { property("free monoid laws") = forAll { (c: Char) ⇒ f(c) == g(c) } }
stevenchen3/feed-cats
src/test/scala/cats/FreeMonoidCheckLawsSpec.scala
Scala
mit
266
package com.walmart.labs.pcs.normalize import kafka.message._ import kafka.serializer._ import kafka.utils._ import java.util.Properties import kafka.utils.Logging import scala.collection.JavaConversions._ import kafka.consumer._ class KafkaConsumer( topic: String, /** topic * The high-level API hides the de...
ArthurZhong/SparkStormKafkaTest
src/main/scala/com/walmart/labs/pcs/kafka/KafkaConsumer.scala
Scala
apache-2.0
4,267
package com.recursivity.jpa import javax.persistence.{Entity, Table, Id, Column} import reflect.BeanProperty /** * Created by IntelliJ IDEA. * User: wfaler * Date: 10/02/2011 * Time: 00:06 * To change this template use File | Settings | File Templates. */ @Entity @Table(name="test_beans") class MyBean{ @Id ...
bowler-framework/recursivity-jpa
src/test/scala/com/recursivity/jpa/MyBean.scala
Scala
bsd-3-clause
422
package cz.kamenitxan.jakon.validation.validators import java.lang.annotation.Annotation import java.lang.reflect.Field import cz.kamenitxan.jakon.validation.{ValidationResult, Validator} class PositiveOrZeroValidator extends Validator { private val error = "NOT_POSITIVE" private val nan = "NOT_A_NUMBER" overrid...
kamenitxan/Jakon
modules/backend/src/main/scala/cz/kamenitxan/jakon/validation/validators/PositiveOrZeroValidator.scala
Scala
bsd-3-clause
691
/* * 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/core/src/main/scala/org/apache/spark/sql/execution/streaming/FileStreamSource.scala
Scala
apache-2.0
22,346
// Generated by the Scala Plugin for the Protocol Buffer Compiler. // Do not edit! // // Protofile syntax: PROTO2 package com.google.protobuf.descriptor import _root_.scalapb.internal.compat.JavaConverters._ /** @param deprecated * Is this enum value deprecated? * Depending on the target platform, this can em...
scalapb/ScalaPB
scalapb-runtime/src/main/scalajvm/com/google/protobuf/descriptor/EnumValueOptions.scala
Scala
apache-2.0
10,468
package com.wixpress.petri.experiments.domain import org.joda.time.DateTime import scala.beans.BooleanBeanProperty import com.fasterxml.jackson.annotation.JsonIgnore import com.fasterxml.jackson.databind.annotation.JsonDeserialize /** * @author: talyag * @since: 7/3/14 */ @JsonDeserialize(builder = classOf[Exper...
drorweiss/petri
wix-petri-core/src/main/java/com/wixpress/petri/experiments/domain/ExperimentSnapshot.scala
Scala
bsd-3-clause
1,907
import sbt._ class BowlerParentProject(info: ProjectInfo) extends DefaultProject(info){ val jsch = "com.jcraft" % "jsch" % "0.1.44" val specs2 = "org.specs2" % "specs2_2.9.0" % "1.3" % "test" def specs2Framework = new TestFramework("org.specs2.runner.SpecsFramework") override def testFrameworks = super.test...
wfaler/ScalaSSH
project/build/ScalaSshProject.scala
Scala
bsd-3-clause
514
/* * Copyright (C) 2011 romain * * 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. * * This program is dist...
ISCPIF/PSEExperiments
openmole-src/openmole/plugins/org.openmole.plugin.domain.modifier/src/main/scala/org/openmole/plugin/domain/modifier/GroupDomain.scala
Scala
agpl-3.0
1,571
/******************************************************************************* Copyright (c) 2013, 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/DOMObject/Console.scala
Scala
bsd-3-clause
5,246
// Copyright: 2010 - 2017 https://github.com/ensime/ensime-server/graphs // License: http://www.gnu.org/licenses/gpl-3.0.en.html package org.ensime.util import Predef.{ any2stringadd => _, _ => _ } import org.scalatest._ class MapSpec extends FlatSpec with Matchers { import map._ val as = Map( 1 -> Set('a, ...
ensime/ensime-server
util/src/test/scala/org/ensime/util/MapSpec.scala
Scala
gpl-3.0
938
class Cont[A0](x0: A0) { type A = A0; val x: A = x0 } object Test { val c: { type A; val x: A } & { type A = Int } = new Cont(1) println(c.x : Int) // error: not an instance of Selectable }
som-snytt/dotty
tests/neg/i2871.scala
Scala
apache-2.0
193
/* * 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 ...
bdrillard/spark
core/src/test/scala/org/apache/spark/scheduler/TaskSetManagerSuite.scala
Scala
apache-2.0
77,025
package breeze.util /* Copyright 2010 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 by applicable law o...
wstcpyt/breeze
math/src/main/scala/breeze/util/BloomFilter.scala
Scala
apache-2.0
4,364
// https://leetcode.com/problems/roman-to-integer object Solution { def romanToInt(s: String): Int = { val t = Map( 'I' -> 1, 'V' -> 5, 'X' -> 10, 'L' -> 50, 'C' -> 100, 'D' -> 500, 'M' -> 1000 ) val xs = s map t xs zipAll (xs.tail, 0, 0) map { case (x, nx) ...
airt/codegames
leetcode/013-roman-to-integer.scala
Scala
mit
358
/* * Copyright 2013 Akiyoshi Sugiki, University of Tsukuba * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
axi-sugiki/kumoi
src/kumoi/shell/ps/Signals.scala
Scala
apache-2.0
1,338
package com.arcusys.learn.liferay.services import javax.portlet.PortletPreferences import com.liferay.portal.service.PortletPreferencesLocalServiceUtil object PortletPreferencesLocalServiceHelper { def getStrictPreferences(companyId: Long, ownerId: Long, ownerT...
arcusys/JSCORM
learn-liferay620-services/src/main/scala/com/arcusys/learn/liferay/services/PortletPreferencesLocalServiceHelper.scala
Scala
gpl-3.0
896
/** * Copyright 2013-2015, AlwaysResolve Project (alwaysresolve.org), MOYD.CO 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 * *...
Moydco/AlwaysResolveDNS
src/main/scala/records/DNSKEY.scala
Scala
apache-2.0
2,220
/* NSC -- new Scala compiler * Copyright 2005-2011 LAMP/EPFL * @author Alexander Spoon */ package spark.repl import scala.tools.nsc._ import scala.tools.nsc.interpreter._ import Predef.{ println => _, _ } import java.io.{ BufferedReader, FileReader, PrintWriter } import scala.sys.process.Process import session._ ...
prabeesh/Spark-Kestrel
repl/src/main/scala/spark/repl/SparkILoop.scala
Scala
bsd-3-clause
35,807
package breeze.linalg import operators._ import support._ import breeze.math.MutableInnerProductSpace import breeze.math.Semiring import DenseMatrix._ /** Import this to provide access to a DenseMatrix[Double] as a MutableInnerProductSpace, so it can be used in optimization. */ object MutableInnerProductSpac...
ktakagaki/breeze
src/main/scala/breeze/linalg/MutableInnerProductSpaceDenseMatrix.scala
Scala
apache-2.0
1,065
package models.hbase090 import models.hbase.{HBase, HBaseContext} /* * Copyright 2014 YMC. See LICENSE for details. */ class HBaseContext090 extends HBaseContext { override val hBase:HBase = new HBase090 override val logFileParser = new LogFileParser090 }
Connexity/hannibal
hbase/0.90/scala/models/hbase090/HBaseContext090.scala
Scala
apache-2.0
264
package com.mesosphere.universe.v2.model import com.netaporter.uri.Uri import io.circe.JsonObject case class PackageFiles( revision: String, sourceUri: Uri, packageJson: PackageDetails, marathonJsonMustache: String, commandJson: Option[Command] = None, configJson: Option[JsonObject] = None, resourceJson...
movicha/cosmos
cosmos-model/src/main/scala/com/mesosphere/universe/v2/model/PackageFiles.scala
Scala
apache-2.0
348
package com.gjos.scala.swoc.protocol import org.scalatest.{WordSpec, Matchers} import scala.io.Source import com.gjos.scala.swoc.util.{JsonConverters, Resource} import com.gjos.scala.swoc.Bot class BoardSpec extends WordSpec with Matchers { val us = Player.Black def loadBoard(resource: String) = { val lines =...
Oduig/swoc2014
Greedy/src/test/scala/com/gjos/scala/swoc/protocol/BoardSpec.scala
Scala
apache-2.0
996
package feeds.acl import com.typesafe.config.ConfigFactory import controllers.ArrivalGenerator import drt.server.feeds.acl.AclFeed import drt.server.feeds.acl.AclFeed.{arrivalsFromCsvContent, contentFromFileName, latestFileForPort, sftpClient} import drt.shared import drt.shared.FlightsApi.Flights import drt.shared.Pa...
UKHomeOffice/drt-scalajs-spa-exploration
server/src/test/scala/feeds/acl/AclFeedSpec.scala
Scala
apache-2.0
17,517