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) 2014-2020 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...
alexandru/monifu
monix-eval/jvm/src/test/scala/monix/eval/TaskExecuteWithLocalContextSuite.scala
Scala
apache-2.0
1,089
/* * Copyright (c) 2014-2020 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...
alexandru/monifu
monix-execution/shared/src/main/scala/monix/execution/UncaughtExceptionReporter.scala
Scala
apache-2.0
3,027
package org.pgscala package builder package converters object PGByteArrayConverterBuilder extends PGConverterBuilder { val scalaClazz = "Array[Byte]" override val imports = "" override val scalaUpperType = "ByteArray" override val javaUpperType = "ByteArray" val defaultValue = "Array.empty[Byte]" }
melezov/pgscala
builder/src/main/scala/org/pgscala/builder/converters/scala/PGByteArrayConverterBuilder.scala
Scala
bsd-3-clause
320
package com.anakiou.modbus.procimg class DefaultProcessImageFactory extends ProcessImageFactory { def createProcessImageImplementation(): ProcessImageImplementation = new SimpleProcessImage() def createDigitalIn(): DigitalIn = new SimpleDigitalIn() def createDigitalIn(state: Boolean): DigitalIn = new ...
anakiou/scamod
src/com/anakiou/modbus/procimg/DefaultProcessImageFactory.scala
Scala
apache-2.0
802
package com.cloudray.scalapress.plugin.listings.controller.renderer import com.cloudray.scalapress.util.{WizardStep, WizardRenderer} import com.cloudray.scalapress.plugin.listings.domain.ListingPackage import scala.collection.mutable.ListBuffer /** @author Stephen Samuel */ object ListingWizardRenderer { object Fo...
vidyacraghav/scalapress
src/main/scala/com/cloudray/scalapress/plugin/listings/controller/renderer/ListingWizardRenderer.scala
Scala
apache-2.0
1,319
package model import me.mtrupkin.core.Point /** * Created by mtrupkin on 4/25/2015. */ case class Vector(x: Double, y: Double) { def +(p: Vector): Vector = Vector(x + p.x, y + p.y) def +=(p: Vector): Vector = Vector(x + p.x, y + p.y) def -(p: Vector): Vector = Vector(x - p.x, y - p.y) def *(u: Do...
mtrupkin/tomorrow
src/main/scala/model/Vector.scala
Scala
mit
706
/* * 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 ...
tinkoff-dwh/zeppelin
spark/scala-2.10/src/main/scala/org/apache/zeppelin/spark/SparkScala210Interpreter.scala
Scala
apache-2.0
5,605
package com.alpha.crm.ui.menu /** * Created by pnagarjuna on 20/02/16. */ trait MenuComposer { }
pamu/alpha-crm
src/main/scala/com/alpha/crm/ui/menu/MenuComposer.scala
Scala
apache-2.0
103
/* * 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-http/src/main/scala/io/gatling/http/action/cookie/CookieActionBuilder.scala
Scala
apache-2.0
1,081
/* * Copyright 2017 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
liquidarmour/ct-calculations
src/main/scala/uk/gov/hmrc/ct/accounts/frsse2008/boxes/micro/AC435.scala
Scala
apache-2.0
1,717
package ch.wsl.fireindices.metadata import ch.wsl.fireindices.log.DataLog import java.io.File import java.text.NumberFormat import ch.wsl.fireindices.functions.Utils import scala.collection.mutable.HashMap import scala.collection.mutable.MapLike import scala.collection.generic._ import scala.collection.mutable.Muta...
Insubric/fire-calculator
fireindiceslib/src/main/scala/ch/wsl/fireindices/metadata/Parameters.scala
Scala
gpl-2.0
7,804
/** * 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...
unix1986/universe
tool/kafka-0.8.1.1-src/core/src/test/scala/unit/kafka/server/OffsetCommitTest.scala
Scala
bsd-2-clause
11,129
package io.finch.response import com.twitter.finagle.httpx.{Request, Status} import com.twitter.finagle.httpx.path.Root import com.twitter.util.Await import org.scalatest.{Matchers, FlatSpec} class RedirectSpec extends FlatSpec with Matchers { "A Redirect" should "create a service from a string url that generates ...
peel/finch
core/src/test/scala/io/finch/response/RedirectSpec.scala
Scala
apache-2.0
978
package kv.kissmetrics import scala.language.dynamics trait BaseService { def alias(person1Id: String, person2Id: String) def event(personId: String, eventName: String, properties: Map[String, String] = Map()) def properties(personId: String, properties: Map[String, String]) } trait DynamicService extends BaseSe...
kodemaniak/scala-kissmetrics
src/main/scala/kv/kissmetrics/base.scala
Scala
apache-2.0
2,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 ...
pronix/spark
sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala
Scala
apache-2.0
17,578
/** * Created by Tran Huu Cuong on 2015-11-17 18:51:00. */ import com.datastax.spark.connector._ import org.apache.spark._ object HelloCassandra { def main(args: Array[String]): Unit = { val conf = new SparkConf().setAppName("HelloCassandra") val sc = new SparkContext(conf) val hello...
tranhuucuong91/spark-cassandra-example
src/main/scala/HelloCassandra.scala
Scala
mit
441
package com.num.brain.rest.app import com.num.brain.rest.api.NumBrainServer import com.typesafe.config.ConfigFactory import akka.stream.ActorMaterializer import akka.actor.ActorSystem import akka.http.scaladsl.Http import akka.event.Logging /** * @author ramithp */ object RestServiceApp extends App with NumBrainSer...
Ra41P/NumBrain
src/main/scala/com/num/brain/rest/app/RestServiceApp.scala
Scala
mit
601
/* * 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 ...
minixalpha/spark
sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQuerySuite.scala
Scala
apache-2.0
28,872
package smarthouse.restapi.services import java.util.Date import smarthouse.restapi.models.DeviceEntity import smarthouse.restapi.models.db.DeviceEntityTable import smarthouse.restapi.utils.DatabaseService import scala.concurrent.{ExecutionContext, Future} class DevicesService(val databaseService: DatabaseService) ...
andrewobukhov/smart-house
src/main/scala/smarthouse/restapi/services/DevicesService.scala
Scala
mit
700
/* * 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...
i8run/BigDL-1
spark/dl/src/main/scala/com/intel/analytics/bigdl/optim/ValidationMethod.scala
Scala
apache-2.0
40,633
package io.taig.phoenix.models import io.circe.DecodingFailure import io.circe.syntax._ class TopicTest extends Suite { it should "have a String representation" in { Topic( "foo", "bar" ).toString shouldBe "Topic(foo:bar)" Topic( "foo" ).toString shouldBe "Topic(foo)" } it should "have a ...
Taig/phoenix-models
src/test/scala/io/taig/phoenix/models/TopicTest.scala
Scala
mit
1,483
package net.tixxit.contract.util import scalaz._ import scalaz.effect._ final object IOComonad extends Comonad[IO] { def copoint[A](p: IO[A]): A = p.unsafePerformIO def cobind[A, B](fa: IO[A])(f: IO[A] => B): IO[B] = IO(f(fa)) def map[A, B](fa: IO[A])(f: A => B): IO[B] = Functor[IO].map(fa)(f) def cojoin[A](a...
tixxit/contract
src/test/scala/net/tixxit/contract/util/IOComonad.scala
Scala
mit
351
package org.dsa.time import org.dsa.core.CloudSWASMWithTop import org.dsa.utils.ArgsDefault /** * Created by xubo on 2016/12/11. */ object CloudSWASMWithTopSubjectHDFSTime { def main(args: Array[String]) { var subject = ArgsDefault.DSWSubjectHDFS for (j <- 0 until subject.length) { for (i <- 0 un...
xubo245/CloudSW
src/main/scala/org/dsa/time/CloudSWASMWithTopSubjectHDFSTime.scala
Scala
gpl-2.0
486
package com.getjenny.starchat.entities.io /** * Created by Angelo Leto <[email protected]> on 20/11/17. */ case class UserId(id: String/** user id */)
GetJenny/starchat
src/main/scala/com/getjenny/starchat/entities/io/UserId.scala
Scala
gpl-2.0
157
package com.idyria.osi.ooxoo.db.store import com.idyria.osi.ooxoo.db.Document import com.idyria.osi.ooxoo.core.buffers.structural.ElementBuffer import scala.reflect.ClassTag /** * Base Trait for Document Store * * A Document Store is a main interface to fetch documents */ trait DocumentStore { // Container Int...
richnou/ooxoo-db
src/main/scala/com/idyria/osi/ooxoo/db/store/DocumentStore.scala
Scala
lgpl-3.0
1,509
/* * The MIT License * * Copyright (c) 2010 Vladimir Kirichenko <[email protected]> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without...
vladimirk/butter4s
lang/src/butter4s/date/Year.scala
Scala
mit
3,035
/* Copyright (c) 2014 by Contributors 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, so...
RPGOne/Skynet
xgboost-master/jvm-packages/xgboost4j-spark/src/main/scala/ml/dmlc/xgboost4j/scala/spark/params/LearningTaskParams.scala
Scala
bsd-3-clause
3,136
/* * Copyright 2017 Datamountaineer. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
datamountaineer/kafka-connect-common
src/main/scala/com/datamountaineer/streamreactor/connect/config/base/traits/AllowParallelizationSettings.scala
Scala
apache-2.0
1,026
/* * 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 ...
minixalpha/spark
core/src/main/scala/org/apache/spark/deploy/history/config.scala
Scala
apache-2.0
1,760
package org.oxyjen.test import org.scalatest.{FlatSpec, ShouldMatchers} abstract class AbstractUnitSpec extends FlatSpec with ShouldMatchers
skinny85/oxyjen
oxyjen-cli/src/test/scala/org/oxyjen/test/AbstractUnitSpec.scala
Scala
mit
143
/* * Copyright 2012-2015 Comcast Cable Communications Management, 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 re...
ipapa/money
money-core/src/test/scala/com/comcast/money/internal/EmitterSpec.scala
Scala
apache-2.0
2,511
package so.modernized.whip.sparql import org.openanzo.client.IAnzoClient import org.openanzo.glitter.query.PatternSolution import org.openanzo.rdf.{URI => AnzoURI} import scala.collection.JavaConverters._ class QueryIterator(anzo:IAnzoClient, datasets:Set[AnzoURI])(query:(Int, Int) => String, batchSize:Int=100) exte...
JackSullivan/whip
src/main/scala/so/modernized/whip/sparql/QueryIterator.scala
Scala
apache-2.0
777
package org.dagre.euler import org.scalatest.{FlatSpec, Matchers} class Euler30Spec extends FlatSpec with Matchers { "Euler 30" should "return the sum of numbers for which the sum of their digits raised to the n is equal to the number itself" in { Euler30(4) should be (1634 + 8208 + 9474) } it should "sol...
dagre/euler
src/test/scala-2.12/org/dagre/euler/Euler30Spec.scala
Scala
apache-2.0
801
package coursera import scala.concurrent.duration._ import org.junit.Test import org.scalatest.junit.JUnitSuite import _root_.rx.lang.scala.Observable import _root_.rx.lang.scala.Notification object Utils { /** * Print an observable to stdout, blocking the calling thread. */ def displayObservable[T](o: O...
ericpony/scala-examples
reactive/src/test/scala/coursera/Utils.scala
Scala
mit
1,506
package fpinscala.errorhandling import scala.{Option => _, Some => _, Either => _, _} // hide std library `Option`, `Some` and `Either`, since we are writing our own in this chapter sealed trait Option[+A] { def map[B](f: A => B): Option[B] = this match { case Some(a) => Some(f(a)) case None => None } ...
fpinscala-muc/fpinscala-abo64
exercises/src/main/scala/fpinscala/errorhandling/Option.scala
Scala
mit
2,423
package jp.seraphr.collection.builder import jp.seraphr.collection.wrapper.Wrapper trait WrapperBuilder[_Elem, _Wrapper <: Wrapper[_Elem, _Wrapper]] extends Builder[_Elem, _Wrapper] { }
seraphr/collection-wrapper
src/main/scala/jp/seraphr/collection/builder/WrapperBuilder.scala
Scala
bsd-2-clause
187
package com.tribbloids.spookystuff.uav.actions import com.tribbloids.spookystuff.actions.Export import com.tribbloids.spookystuff.doc.{Doc, DocOption, DocUID} import com.tribbloids.spookystuff.session.{NoPythonDriverException, Session} import com.tribbloids.spookystuff.uav.utils.UAVViews.SessionView import org.apache....
tribbloid/spookystuff
uav/src/main/scala/com/tribbloids/spookystuff/uav/actions/Mark.scala
Scala
apache-2.0
966
package scheduler import org.quartz.CronScheduleBuilder._ import org.quartz.JobBuilder.newJob import org.quartz.TriggerBuilder._ import org.quartz.impl.StdSchedulerFactory object Scheduler { val scheduler = StdSchedulerFactory.getDefaultScheduler() def printMessageDaily(hour: Int, minute: Int, message: String) {...
hynek-jemelik/scheduler
app/scheduler/Scheduler.scala
Scala
gpl-3.0
555
/*******************************************************************************/ /* */ /* Copyright (C) 2017 by Max Lv <[email protected]> */ /* Copyright (C) 2017 by Mygod Studio <contact-shadowsocks-android@mygod....
hangox/shadowsocks-android
mobile/src/main/scala/com/github/shadowsocks/TaskerReceiver.scala
Scala
gpl-3.0
2,200
package com.danielwestheide.kontextfrei.scalatest import org.apache.spark.rdd.RDD import org.scalatest.enablers.Collecting import org.scalatest.{Inspectors, PropSpec, PropSpecLike} import org.scalatest.prop.GeneratorDrivenPropertyChecks trait CollectingInstancesProperties[DColl[_]] extends PropSpecLike with G...
dwestheide/kontextfrei
scalatest/src/test/scala/com/danielwestheide/kontextfrei/scalatest/CollectingInstancesProperties.scala
Scala
apache-2.0
2,084
package views.html import play.twirl.api._ import play.twirl.api.TemplateMagic._ import play.api.templates.PlayMagic._ import models._ import controllers._ import java.lang._ import java.util._ import scala.collection.JavaConversions._ import scala.collection.JavaConverters._ import play.api.i18n._ import play.core....
stjokro/Project-1
target/scala-2.10/twirl/main/views/html/main.template.scala
Scala
bsd-3-clause
5,114
package wandou.math.classifier /** * * @author Caoyuan Deng */ final case class AttributeValue[+T](value: T) extends Cloneable { private var _count = 0 def count = _count def increaseOne = { _count += 1 this } def decreaseOne = { _count -= 1 this } def reset = { _count = 0 ...
wandoulabs/wandou-math
wandou-math/src/main/scala/wandou/math/classifier/AttributeValue.scala
Scala
apache-2.0
567
/* * Copyright (c) 2014 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://www.apache.org...
wesley1001/snowplow
3-enrich/scala-hadoop-shred/src/main/scala/com.snowplowanalytics.snowplow.enrich/hadoop/shredder/TypeHierarchy.scala
Scala
apache-2.0
3,186
// Master.scala // // package com.example.picalc import akka.actor.{Actor, ActorLogging, ActorRef, Props} import scala.concurrent.duration._ import scala.math.abs object Master { case object Calculate case class Work(start: Int, numberOfElements: Int) case class Result(value: Double) } class Master (...
dtinblack/Scala-AKKACluster
PiSingleWorker/src/main/scala/Master.scala
Scala
mit
1,532
package chrome.tts.bindings import scala.scalajs.js object SpeakOptions { def apply(enqueue: js.UndefOr[Boolean] = js.undefined, voiceName: js.UndefOr[String] = js.undefined, extensionId: js.UndefOr[String] = js.undefined, lang: js.UndefOr[String] = js.undefined, gen...
amsayk/scala-js-chrome
bindings/src/main/scala/chrome/tts/bindings/SpeakOptions.scala
Scala
mit
1,715
package fpinscala.laziness import Stream._ trait Stream[+A] { // The natural recursive solution def toListRecursive: List[A] = this match { case Cons(h,t) => h() :: t().toListRecursive case _ => List() } /* The above solution will stack overflow for large streams, since it's not tail-recursive....
fpinscala-muc/fpinscala-cdanning
answers/src/main/scala/fpinscala/laziness/Stream.scala
Scala
mit
8,713
package com.bigchange.config /** * Created by C.J.YOU on 2016/1/18. * 本地目录配置文件 */ object FileConfig { val ROOT_DIR = "/home/telecom/data" val test_dir = "F:\\\\datatest\\\\telecom" }
bigchange/AI
src/main/scala/com/bigchange/config/FileConfig.scala
Scala
apache-2.0
208
/* * Copyright 2012-2013 Stephane Godbillon (@sgodbillon) and Zenexity * * 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 req...
qubell/ReactiveMongo
driver/src/main/scala/api/gridfs.scala
Scala
apache-2.0
12,508
package com.rasterfoundry.database import com.rasterfoundry.datamodel._ import com.rasterfoundry.common.Generators.Implicits._ import com.rasterfoundry.common.SceneWithProjectIdLayerId import com.rasterfoundry.database.Implicits._ import doobie._, doobie.implicits._ import cats.implicits._ import doobie.postgres.impl...
azavea/raster-foundry
app-backend/db/src/test/scala/com/azavea/rf/database/SceneToLayerDaoSpec.scala
Scala
apache-2.0
7,062
/** * 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-cons/src/main/scala/ctl.scala
Scala
apache-2.0
101,173
package akka.contrib.persistence.mongodb import java.util.concurrent.atomic.AtomicBoolean import akka.actor.Actor import akka.pattern.{CircuitBreakerOpenException, CircuitBreaker} import scala.collection.immutable import akka.persistence.journal.AsyncWriteJournal import akka.persistence.{AtomicWrite, PersistentRepr}...
twillouer/akka-persistence-mongo
common/src/main/scala/akka/contrib/persistence/mongodb/MongoJournal.scala
Scala
apache-2.0
10,480
/* * Copyright 2009-2016 DigitalGlobe, 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 ag...
akarmas/mrgeo
mrgeo-mapalgebra/mrgeo-mapalgebra-costdistance/src/main/scala/org/mrgeo/mapalgebra/LeastCostPathMapOp.scala
Scala
apache-2.0
4,222
package org.jetbrains.plugins.scala package lang package autoImport import java.io.File import com.intellij.openapi.util.io.FileUtil import com.intellij.openapi.util.text.StringUtil import com.intellij.openapi.vfs.{CharsetToolkit, LocalFileSystem} import com.intellij.psi.util.PsiTreeUtil import com.intellij.testFrame...
LPTK/intellij-scala
test/org/jetbrains/plugins/scala/lang/autoImport/AutoImportTestBase.scala
Scala
apache-2.0
3,886
/** * Copyright (C) 2012 Typesafe, Inc. <http://www.typesafe.com> */ package org.pantsbuild.zinc import java.io.File import java.util.{ List => JList, Map => JMap } import sbt.compiler.IC import sbt.inc.{ Analysis, Locate } import sbt.Path._ import scala.collection.JavaConverters._ import xsbti.compile.CompileOrder...
pgroudas/pants
src/scala/org/pantsbuild/zinc/Inputs.scala
Scala
apache-2.0
9,194
package com.chrisrebert.lmvtfy.validation import java.util.regex.Pattern package object markdown { private object MarkdownMessagePart { private val uberCodeQuote = "````" private val tooManyBackticks = Pattern.compile(uberCodeQuote + "+") } implicit class MarkdownMessagePart(part: MessagePart) { imp...
cvrebert/lmvtfy
src/main/scala/com/chrisrebert/lmvtfy/validation/markdown/package.scala
Scala
mit
948
//#imports import com.twitter.zipkin.conversions.thrift._ import com.twitter.finagle.Http import com.twitter.server.TwitterServer import com.twitter.util.Await import com.twitter.zipkin.cassandra.CassandraSpanStoreFactory import com.twitter.zipkin.collector.SpanReceiver import com.twitter.zipkin.common.Span import com....
jstanier/zipkin
doc/src/sphinx/code/quickstart/WebAndCollector.scala
Scala
apache-2.0
1,403
/* Copyright (C) 2008-2016 University of Massachusetts Amherst. This file is part of "FACTORIE" (Factor graphs, Imperative, Extensible) http://factorie.cs.umass.edu, http://github.com/factorie Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
Craigacp/factorie
src/main/scala/cc/factorie/app/nlp/hcoref/Move.scala
Scala
apache-2.0
4,321
package marge.la class Scalar(d: Double) { def *[E](v: Vector[E]): Vector[E] = v * d def /[E](v: Vector[E]): Vector[E] = v * 1/d } object Scalar { def apply(d: Double) = new Scalar(d) }
mikiobraun/marge
src/main/scala/marge/la/Scalar.scala
Scala
mit
194
package com.haskforce.run.stack.task import java.io.File import java.nio.file.Files import java.util.regex.Pattern import com.haskforce.settings.HaskellBuildSettings import com.haskforce.utils.FileUtil import com.intellij.execution.configurations.{CommandLineState, GeneralCommandLine, ParametersList} import com.intel...
carymrobbins/intellij-haskforce
src/com/haskforce/run/stack/task/StackTaskCommandLineState.scala
Scala
apache-2.0
5,808
package org.jetbrains.jps.incremental.scala.local.worksheet.repl_interface import java.io.{File, Flushable, PrintWriter} import org.jetbrains.jps.incremental.scala.local.worksheet.repl_interface.ILoopWrapper import org.jetbrains.jps.incremental.scala.local.worksheet.repl_interface.ILoopWrapper213Impl._ import scala....
JetBrains/intellij-scala
scala/worksheet-repl-interface/resources/ILoopWrapper213Impl.scala
Scala
apache-2.0
2,822
/* * Copyright 2014–2018 SlamData Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
slamdata/slamengine
run/src/test/scala/quasar/RegressionQueryEvaulator.scala
Scala
apache-2.0
1,163
object K1 { class Foo[T] class Bar[F[_]] object Bar { implicit def barF[F[_]](implicit fooF: Foo[Bar[F]]): Bar[F] = null } class A[T] object A { implicit def fooA[F[_[_]]](implicit barB: F[B]): Foo[F[A]] = null } class B[T] object B { implicit def fooB[F[_[_]]]: Foo[F[B]] = null } } ...
som-snytt/dotty
tests/pos/i6238.scala
Scala
apache-2.0
1,981
/* * 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 ...
zimmermatt/flink
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/AggregateUtil.scala
Scala
apache-2.0
54,045
/* * 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
blueeyes/src/main/scala/quasar/precog/common/package.scala
Scala
apache-2.0
856
package spire package benchmark import scala.util.Random import Random._ import spire.math._ import spire.implicits._ import com.google.caliper.{ Runner, SimpleBenchmark, Param } import org.apache.commons.math3.analysis.polynomials._ import org.apache.commons.math3.analysis.UnivariateFunction object PolynomialBench...
tixxit/spire
benchmark/src/main/scala/spire/benchmark/PolynomialBenchmark.scala
Scala
mit
8,010
/* * 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 ...
witgo/spark
mllib/src/main/scala/org/apache/spark/mllib/linalg/BLAS.scala
Scala
apache-2.0
21,941
/* * Copyright (c) 2014-2018 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...
Wogan/monix
monix-eval/shared/src/test/scala/monix/eval/TaskTraverseSuite.scala
Scala
apache-2.0
2,231
package dundertext.ui.keyboard object KeyCodes { final val NumPad0 = 96 final val NumPad1 = 97 final val NumPad2 = 98 final val NumPad3 = 99 final val NumPad4 = 100 final val NumPad5 = 101 final val NumPad6 = 102 final val NumPad7 = 103 final val NumPad8 = 104 final val NumPad9 = 105 final val F...
dundertext/dundertext
ui/src/main/scala/dundertext/ui/keyboard/KeyCodes.scala
Scala
gpl-3.0
463
package org.coursera.naptime.actions import org.coursera.common.jsonformat.JsonFormats import org.coursera.common.stringkey.StringKeyFormat import play.api.libs.json.Format import scala.annotation.tailrec /** * A somewhat-human-readable identifier. This will generally look like "what-is-machine-learning". * This i...
coursera/naptime
naptime/src/test/scala/org/coursera/naptime/actions/Slug.scala
Scala
apache-2.0
2,724
package lila.socket import akka.actor._ import play.api.libs.json.JsObject import scala.collection.mutable import scala.concurrent.duration._ import actorApi.{ SocketLeave, SocketEnter } import lila.hub.actorApi.{ SendTo, SendTos, WithUserIds } private final class UserRegister extends Actor { override def preStar...
clarkerubber/lila
modules/socket/src/main/UserRegister.scala
Scala
agpl-3.0
1,408
package com.sksamuel.elastic4s import play.api.libs.json.{Json, Reads, Writes} import scala.annotation.implicitNotFound import scala.util.Try package object playjson { @implicitNotFound("No Writes for type ${T} found. Bring an implicit Writes[T] instance in scope") implicit def playJsonIndexable[T](implicit w: ...
sksamuel/elastic4s
elastic4s-json-play/src/main/scala/com/sksamuel/elastic4s/playjson/package.scala
Scala
apache-2.0
1,115
import scala.concurrent.Await import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration.Duration import bintray.BintrayCredentials import bintray.BintrayKeys.{ bintrayEnsureCredentials, bintrayOrganization, bintrayPackage } import bintry.Client import com.typesafe.sbt.packager.Keys._ i...
CERT-BDF/Cortex
project/Bintray.scala
Scala
agpl-3.0
6,205
package sharry.store.records import cats.effect.Sync import cats.implicits._ import fs2.Stream import sharry.common._ import sharry.store.doobie.DoobieMeta._ import sharry.store.doobie._ import doobie._ import doobie.implicits._ case class RAlias( id: Ident, account: Ident, name: String, validity: D...
eikek/sharry
modules/store/src/main/scala/sharry/store/records/RAlias.scala
Scala
gpl-3.0
2,931
/* * 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
web/src/main/scala/quasar/api/services/data.scala
Scala
apache-2.0
12,426
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
scalatest/scalatest
jvm/scalatest-test/src/test/scala/org/scalatest/matchers/dsl/ResultOfLengthWordApplicationSpec.scala
Scala
apache-2.0
1,028
/*********************************************************************** * Copyright (c) 2013-2018 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...
boundlessgeo/geomesa
geomesa-convert/geomesa-convert-common/src/main/scala/org/locationtech/geomesa/convert/Transformers.scala
Scala
apache-2.0
35,741
/* * Copyright 2011-2021 Asakusa Framework Team. * * 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 ...
asakusafw/asakusafw-spark
compiler/src/test/scala/com/asakusafw/spark/compiler/operator/user/ConvertOperatorCompilerSpec.scala
Scala
apache-2.0
12,045
/* sbt -- Simple Build Tool * Copyright 2010 Mark Harrah */ package sbt package inc import xsbti.api.Source import java.io.File import sbt.Util.counted trait Analysis { val stamps: Stamps val apis: APIs val relations: Relations def ++(other: Analysis): Analysis def -- (sources: Iterable[File]): Analysis de...
kuochaoyi/xsbt
compile/inc/Analysis.scala
Scala
bsd-3-clause
2,954
/* * Copyright 2014–2017 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...
drostron/quasar
frontend/src/test/scala/quasar/sql/Arbitraries.scala
Scala
apache-2.0
783
// mutable abstract class AbstractVector[A] { var as = new Array[Any](10) var size = 0 var copyCount = 0 def add(a: A):Unit = { if (size == as.length) { resize() } as(size) = a size = size + 1 copyCount = copyCount + 1 } def apply(i: Int): A = { if (size <= i) throw new Arra...
bati11/study-algorithm
catalog/vector/vector.scala
Scala
mit
1,075
package scala.meta package internal package tokenizers import scala.util.Try import LegacyToken._ import Chars._ import scala.meta.syntactic._ private[meta] trait LegacyTokenData { /** the input that is currently being tokenized */ var content: Content = null /** the next token */ var token: LegacyToken = EM...
mdemarne/scalameta
tokens/src/main/scala/scala/meta/internal/tokenizers/LegacyTokenData.scala
Scala
bsd-3-clause
3,034
package com.aergonaut.lifeaquatic.item import cofh.lib.util.helpers.ItemHelper import com.aergonaut.lib.core.TInitializer import com.aergonaut.lifeaquatic.constants.Names import com.aergonaut.lifeaquatic.item.armor.{ItemArmorBase, LinenChest, LinenHelmet, SwimTrunkFaceMask, SwimTrunkFins, SwimTrunkShorts} import com.a...
aergonaut/LifeAquatic
src/main/scala/com/aergonaut/lifeaquatic/item/ModItems.scala
Scala
mit
4,692
/* * 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 ...
caneGuy/spark
sql/core/src/test/scala/org/apache/spark/sql/util/DataFrameCallbackSuite.scala
Scala
apache-2.0
9,516
/* * Copyright 2001-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writ...
SRGOM/scalatest
scalatest-test/src/test/scala/org/scalatest/EveryShouldContainInOrderOnlyLogicalOrSpec.scala
Scala
apache-2.0
43,321
/* * Copyright (c) 2015 Miles Sabin * * 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...
wheaties/shapeless
core/src/test/scala/shapeless/generic1.scala
Scala
apache-2.0
19,848
package au.id.cxd.math.model.classification import breeze.linalg.DenseMatrix /** * A data object to contain the outputs of Model assessment for * classification * Created by cd on 10/05/2016. */ class ModelAssessment(val className:String, val mse: Double, val loglik...
cxd/scala-au.id.cxd.math
math/src/main/scala/au/id/cxd/math/model/classification/ModelAssessment.scala
Scala
mit
1,227
package org.orbeon.sbt import sbt.FileFunction.cached import sbt.FilesInfo.{exists, lastModified} import sbt.Keys._ import sbt._ object OrbeonSupport { val MatchScalaJSFileNameFormatRE = """((.+)-(fastopt|opt)).js""".r val MatchJarNameRE = """(.+)\\.jar""".r val MatchRawJarNameRE = """...
brunobuzzi/orbeon-forms
project/Project.scala
Scala
lgpl-2.1
6,830
package org.aguo.civsim.controller import org.aguo.civsim.model.World import org.aguo.civsim.view._ object HelpController { def handleInput(input: String, world: World): World = input match { case "view" => HelpViewScreen.render(world) case "examine" => HelpExamineScreen.render(world) case "jobs" => Hel...
aguo777/civ-sim
src/main/scala/org/aguo/civsim/controller/HelpController.scala
Scala
mit
394
/** * 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...
dchenbecker/kafka-sbt
core/src/main/scala/kafka/api/FetchResponse.scala
Scala
apache-2.0
7,667
/* * 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 ...
holdenk/spark
sql/core/src/test/scala/org/apache/spark/sql/execution/vectorized/ColumnVectorSuite.scala
Scala
apache-2.0
19,205
/* * Copyright 2017 Datamountaineer. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
datamountaineer/kafka-connect-common
src/main/scala/com/datamountaineer/streamreactor/connect/config/base/traits/RetryIntervalSettings.scala
Scala
apache-2.0
989
/* Copyright 2014 UniCredit S.p.A. * * 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...
unicredit/ReactiveAerospike
src/test/scala/eu/unicredit/reactive_aerospike/model/JsonMailDao.scala
Scala
apache-2.0
2,150
/* * 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/src/main/scala/org/apache/flink/table/plan/nodes/dataset/BatchScan.scala
Scala
apache-2.0
3,419
package com.lightning.walletapp.test import java.nio.ByteOrder import fr.acinq.bitcoin.Protocol import scodec.bits.ByteVector class FeaturesSpec { import com.lightning.walletapp.ln.Features._ def allTests = { { println("features compatibility") assert(isNodeSupported(Protocol.writeUInt64(1L << O...
btcontract/lnwallet
app/src/main/java/com/lightning/walletapp/test/FeaturesSpec.scala
Scala
apache-2.0
1,481
package sampler.empirical import org.scalatest.FreeSpec import org.scalatest.prop.GeneratorDrivenPropertyChecks import org.scalacheck.Arbitrary.arbitrary import org.scalacheck.Gen.posNum class EmpiricalTest extends FreeSpec with GeneratorDrivenPropertyChecks { def buildFromProbTab[A](count: Int, probTab: Map[A, Dou...
tearne/Sampler
sampler-core/src/test/scala/sampler/empirical/EmpiricalTest.scala
Scala
apache-2.0
5,159
package lt.node.scandra.pirkimai.util import android.os.Environment import android.util.Log //import lt.node.scandra.pirkimai.Constants import java.io.{BufferedReader, BufferedWriter, File, FileInputStream} import java.io.{FileOutputStream, FileReader, FileWriter, IOException} import java.nio.channels.FileChannel /*...
vytasab/scandra
pirkimai/src/main/scala/lt/node/scandra/pirkimai/util/FileUtil.scala
Scala
apache-2.0
6,200
package com.seanshubin.scala.training.sample.data import com.seanshubin.scala.training.core.Item class ItemFormatterImpl extends ItemFormatter { def format(item: Item): String = { item match { case Item(Some(color), name, sku) => s"$color $name with sku $sku" case Item(None, name, sku) => s"$name wi...
SeanShubin/scala-training
sample-data/src/main/scala/com/seanshubin/scala/training/sample/data/ItemFormatterImpl.scala
Scala
unlicense
345
import edu.vanderbilt.accre.stackex._ import org.scalatest.WordSpec /** * Created by arnold-jr on 12/21/16. */ class TestStackExApp extends WordSpec { val line = """<row Id="2435" PostTypeId="1" CreationDate="2016-12-06T19:50:13.853" |Score="-1" ViewCount="12" Body="&lt;p&gt;If I have a dataset of im...
bigdata-vandy/stack-ex
src/test/scala-2.10/TestStackExApp.scala
Scala
mit
3,116
package scalashop import common._ import org.scalameter._ object VerticalBoxBlurRunner { val standardConfig = config( Key.exec.minWarmupRuns -> 5, Key.exec.maxWarmupRuns -> 10, Key.exec.benchRuns -> 10, Key.verbose -> true ) withWarmer (new Warmer.Default) def main(args: Array[String]): Unit =...
yurii-khomenko/fpScalaSpec
c3w1scalashop/src/main/scala/scalashop/VerticalBoxBlur.scala
Scala
gpl-3.0
2,033
/* * Copyright (c) 2014. Regents of the University of California * * 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 require...
hammerlab/avocado
avocado-core/src/main/scala/org/bdgenomics/avocado/postprocessing/Postprocessor.scala
Scala
apache-2.0
1,681