repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
msatala/wunderx
wunderx-server/app/controllers/WundeRxCtrl.scala
package controllers import akka.actor.Props import boilerplate.WunderxProtocol import jsactor.bridge.server.ServerBridgeActor import play.api.libs.concurrent.Akka import play.api.mvc._ object WundeRxCtrl extends Controller { import play.api.Play.current val taskServerActor = Akka.system.actorOf(Props(new TaskSe...
msatala/wunderx
wunderx-client/src/main/scala/boilerplate/NgOps.scala
package boilerplate import biz.enef.angulate.Scope import rx._ import rx.ops._ import scala.scalajs.js /** * Created by <NAME> * Date: 15.6.2015 * Time: 13:06 */ object NgOps { implicit class ScopeOps(s: Scope) { def dynamic = s.asInstanceOf[js.Dynamic] def safeApply(any: => Any) = { if (dynami...
msatala/wunderx
wunderx-client/src/main/scala/boilerplate/WebsocketJsActors.scala
package boilerplate import jsactor.bridge.client.SocketManager import jsactor.bridge.client.util.RemoteActorListener import jsactor.logging.impl.JsPrintlnActorLoggerFactory import jsactor.{JsActorRef, JsActorSystem} import org.scalajs.dom import scala.scalajs.js.Dynamic /** * Created by <NAME> * Date: 7.6.2015 * ...
msatala/wunderx
wunderx-server/app/controllers/TaskServerActor.scala
<gh_stars>1-10 package controllers import akka.actor.{Actor, ActorRef, Terminated} import boilerplate.Subscribe import wunderx.Task /** * Created by <NAME> * Date: 4.6.2015 * Time: 22:04 */ class TaskServerActor extends Actor { var tasksMap = Map( 1 -> Task(1, "Foo", completed = true), 2 -> Task(2, "Bar...
msatala/wunderx
wunderx-shared/src/main/scala/wunderx/Task.scala
package wunderx import scala.scalajs.js.annotation.JSExportAll /** * Created by <NAME> * Date: 4.6.2015 * Time: 17:06 */ @JSExportAll case class Task(id: Int, text: String, completed: Boolean) { def toggle = this.copy(completed = !this.completed) } object Task { type TasksMap = Map[Int, Task] implicit cl...
msatala/wunderx
wunderx-client/src/main/scala/wunderx/WunderxClient.scala
package wunderx import biz.enef.angulate._ import boilerplate.NgOps._ import boilerplate.{WebsocketJsActors, ProxyActor, Subscribe} import jsactor.{JsActor, JsProps} import rx._ import wunderx.Task._ import scala.scalajs.js import scala.scalajs.js.annotation.JSExport /** * Created by <NAME> * Date: 4.6.2015 * Tim...
msatala/wunderx
build.sbt
<filename>build.sbt import sbt.Project.projectToRef lazy val scalaVs = Seq("2.11.6") lazy val wunderxServer = (project in file("wunderx-server")).settings( crossScalaVersions := scalaVs, scalaVersion := scalaVs.head, scalaJSProjects := Seq(wunderxClient), scalacOptions ++= Settings.scalacOptions, pipelineSt...
msatala/wunderx
wunderx-shared/src/main/scala/boilerplate/WunderxProtocol.scala
<gh_stars>1-10 package boilerplate import jsactor.bridge.protocol.BridgeProtocol import jsactor.bridge.protocol.BridgeProtocol.MessageRegistry import upickle._ import wunderx.Task import scala.reflect.ClassTag /** * Created by <NAME> * Date: 7.6.2015 * Time: 20:00 */ case object Subscribe object WunderxProtoco...
OliverAbdulrahim/Sandbox
src/Happy.scala
<reponame>OliverAbdulrahim/Sandbox import scala.collection.immutable.Vector object Happy extends App { def format(v: Vector[_]) = v.mkString(", ") def testEngineerExuberance(engineers: Vector[Engineer]): Unit = { val (happy, unhappy) = engineers partition (_.isHappy) if (happy.size > unhappy.size) { ...
Jolanrensen/kotlin-spark-api
core/2.4/src/main/scala/org/jetbrains/kotlinx/spark/extensions/KSparkExtensions.scala
<reponame>Jolanrensen/kotlin-spark-api<gh_stars>0 /*- * =LICENSE= * Kotlin Spark API: Examples * ---------- * Copyright (C) 2019 - 2020 JetBrains * ---------- * 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 c...
kristoflemmens/akka-grpc
runtime/src/main/scala/akka/grpc/scaladsl/ServiceHandler.scala
/* * Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.grpc.scaladsl import scala.concurrent.Future import akka.http.scaladsl.model.HttpRequest import akka.http.scaladsl.model.HttpResponse import akka.http.scaladsl.model.StatusCodes object ServiceHandler { private val notFound ...
kristoflemmens/akka-grpc
project/Common.scala
<filename>project/Common.scala import sbt.Keys._ import sbt._ import sbt.plugins.JvmPlugin import akka.grpc.Dependencies.Versions.{ scala212, scala213 } import org.scalafmt.sbt.ScalafmtPlugin.autoImport.scalafmtOnCompile object Common extends AutoPlugin { override def trigger = allRequirements override def requi...
kristoflemmens/akka-grpc
interop-tests/src/main/scala/akka/grpc/interop/IoGrpcClient.scala
<gh_stars>0 /* * Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.grpc.interop import io.grpc.internal.testing.TestUtils import io.grpc.testing.integration2.{ GrpcJavaClientTester, Settings, TestServiceClient } object IoGrpcClient extends GrpcClient { override def run(args: Arr...
kristoflemmens/akka-grpc
codegen/src/main/scala/akka/grpc/gen/javadsl/JavaInterfaceCodeGenerator.scala
<reponame>kristoflemmens/akka-grpc<gh_stars>0 /* * Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.grpc.gen.javadsl import scala.collection.immutable import akka.grpc.gen.Logger import com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse import templates.JavaCommon.txt....
kristoflemmens/akka-grpc
runtime/src/main/scala/akka/grpc/javadsl/GrpcMarshalling.scala
<reponame>kristoflemmens/akka-grpc /* * Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.grpc.javadsl import java.util.concurrent.{ CompletableFuture, CompletionStage } import io.grpc.Status import akka.NotUsed import akka.actor.ActorSystem import akka.http.scaladsl.model.HttpEnti...
kristoflemmens/akka-grpc
codegen/src/main/scala/akka/grpc/gen/Logging.scala
<reponame>kristoflemmens/akka-grpc<filename>codegen/src/main/scala/akka/grpc/gen/Logging.scala /* * Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.grpc.gen import java.io.PrintWriter // specific to gen so that the build tools can implement their own trait Logger { def debug(te...
kristoflemmens/akka-grpc
benchmark-java/project/plugins.sbt
<reponame>kristoflemmens/akka-grpc addSbtPlugin("com.lightbend.sbt" % "sbt-javaagent" % "0.1.5") lazy val plugins = project in file(".") dependsOn ProjectRef(file("../../"), "sbt-akka-grpc") // Use this instead of above when importing to IDEA, after publishLocal and replacing the version here //addSbtPlugin("com.light...
kristoflemmens/akka-grpc
codegen/src/main/scala/akka/grpc/gen/javadsl/Serializer.scala
/* * Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.grpc.gen.javadsl import com.google.protobuf.Descriptors.Descriptor final case class Serializer(name: String, init: String, messageType: String) object Serializer { def apply(messageType: Descriptor): Serializer = Seriali...
kristoflemmens/akka-grpc
runtime/src/main/scala/akka/grpc/scaladsl/GrpcExceptionHandler.scala
<reponame>kristoflemmens/akka-grpc /* * Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.grpc.scaladsl import akka.actor.ActorSystem import akka.grpc.GrpcServiceException import akka.grpc.internal.GrpcResponseHelpers import akka.http.scaladsl.model.HttpResponse import io.grpc.Statu...
kristoflemmens/akka-grpc
runtime/src/main/scala/akka/grpc/internal/HardcodedServiceDiscovery.scala
<filename>runtime/src/main/scala/akka/grpc/internal/HardcodedServiceDiscovery.scala<gh_stars>0 /* * Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.grpc.internal import akka.discovery.{ Lookup, ServiceDiscovery } import akka.discovery.ServiceDiscovery.Resolved import scala.concur...
kristoflemmens/akka-grpc
runtime/src/main/scala/akka/grpc/scaladsl/Metadata.scala
<gh_stars>0 /* * Copyright (C) 2009-2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.grpc.scaladsl import java.util.Base64 import akka.annotation.DoNotInherit import akka.http.scaladsl.model.HttpHeader import akka.util.ByteString import scala.collection.immutable /** * Immutable representation of...
kristoflemmens/akka-grpc
codegen/src/main/scala/akka/grpc/gen/javadsl/JavaServerCodeGenerator.scala
<gh_stars>0 /* * Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.grpc.gen.javadsl import scala.collection.immutable import akka.grpc.gen.{ BuildInfo, CodeGenerator, Logger } import com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse import protocbridge.Artifact import ...
kristoflemmens/akka-grpc
runtime/src/main/scala/akka/grpc/internal/Marshaller.scala
<filename>runtime/src/main/scala/akka/grpc/internal/Marshaller.scala /* * Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.grpc.internal import java.io.{ ByteArrayInputStream, ByteArrayOutputStream, InputStream } import io.grpc.KnownLength import akka.annotation.InternalApi import ...
kristoflemmens/akka-grpc
codegen/src/main/scala/akka/grpc/gen/scaladsl/ScalaTraitCodeGenerator.scala
<gh_stars>0 /* * Copyright (C) 2009-2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.grpc.gen.scaladsl import scala.collection.immutable import akka.grpc.gen.Logger import com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse import templates.ScalaCommon.txt.ApiTrait object ScalaTraitCodeG...
kristoflemmens/akka-grpc
interop-tests/src/test/scala/akka/grpc/interop/app/AkkaHttpServerAppScala.scala
<reponame>kristoflemmens/akka-grpc<gh_stars>0 /* * Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.grpc.interop.app import akka.grpc.interop.AkkaHttpServerProviderScala /** * Scala application that starts a web server at localhost serving the test * application used for the gRP...
kristoflemmens/akka-grpc
runtime/src/main/scala/akka/grpc/Codecs.scala
/* * Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.grpc import akka.grpc.scaladsl.headers.`Message-Accept-Encoding` import akka.http.javadsl.{ model => jm } import scala.collection.immutable object Codecs { // TODO should this list be made user-extensible? val supportedCod...
kristoflemmens/akka-grpc
runtime/src/test/scala/akka/grpc/JUnitEventually.scala
/* * Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.grpc import org.scalatest.concurrent.Eventually import org.scalatestplus.junit.JUnitSuite import org.scalatest.time.{ Millis, Span } abstract class JUnitEventually extends JUnitSuite with Eventually { implicit val patience: P...
kristoflemmens/akka-grpc
codegen/src/main/scala/akka/grpc/gen/Main.scala
<filename>codegen/src/main/scala/akka/grpc/gen/Main.scala /* * Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.grpc.gen import java.io.ByteArrayOutputStream import com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest import akka.grpc.gen.javadsl.{ JavaClientCodeGenerato...
kristoflemmens/akka-grpc
runtime/src/main/scala/akka/grpc/internal/ClientState.scala
<reponame>kristoflemmens/akka-grpc /* * Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.grpc.internal import java.util.concurrent.CompletionStage import java.util.concurrent.atomic.AtomicReference import akka.Done import akka.annotation.InternalApi import akka.grpc.GrpcClientSett...
kristoflemmens/akka-grpc
runtime/src/main/scala/akka/grpc/GrpcServiceException.scala
<filename>runtime/src/main/scala/akka/grpc/GrpcServiceException.scala<gh_stars>0 /* * Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.grpc import io.grpc.Status class GrpcServiceException(val status: Status) extends RuntimeException(status.getDescription) { require(!status.isOk...
kristoflemmens/akka-grpc
codegen/src/main/scala/akka/grpc/gen/scaladsl/Method.scala
/* * Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.grpc.gen.scaladsl import com.google.protobuf.Descriptors.{ Descriptor, MethodDescriptor } import akka.grpc.gen._ import scalapb.compiler.DescriptorImplicits case class Method( name: String, grpcName: String, inputTy...
kristoflemmens/akka-grpc
runtime/src/main/scala/akka/grpc/internal/CancellationBarrierGraphStage.scala
<filename>runtime/src/main/scala/akka/grpc/internal/CancellationBarrierGraphStage.scala /* * Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.grpc.internal import akka.stream.{ Attributes, FlowShape, Inlet, Outlet } import akka.stream.stage.{ GraphStage, GraphStageLogic, InHandler,...
kristoflemmens/akka-grpc
plugin-tester-scala/src/main/scala/example/myapp/helloworld/PowerGreeterServiceImpl.scala
<reponame>kristoflemmens/akka-grpc /* * Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com> */ //#full-service-impl package example.myapp.helloworld import akka.NotUsed import akka.grpc.scaladsl.Metadata import akka.stream.Materializer import akka.stream.scaladsl.{ Sink, Source } import example.myapp...
kristoflemmens/akka-grpc
plugin-tester-java/src/test/scala/example/myapp/helloworld/ErrorReportingSpec.scala
/* * Copyright (C) 2019 Lightbend Inc. <https://www.lightbend.com> */ package example.myapp.helloworld import akka.actor.ActorSystem import akka.http.scaladsl.Http import akka.http.scaladsl.model.HttpEntity.{ Chunked, LastChunk } import akka.http.scaladsl.model.headers.RawHeader import akka.http.scaladsl.model.{ Ht...
kristoflemmens/akka-grpc
interop-tests/src/main/scala/akka/grpc/interop/AkkaGrpcClientScala.scala
<filename>interop-tests/src/main/scala/akka/grpc/interop/AkkaGrpcClientScala.scala /* * Copyright (C) 2018-2019 Lightbend Inc. <https://www.lightbend.com> */ package akka.grpc.interop import scala.concurrent.duration._ import akka.actor.ActorSystem import akka.stream.{ ActorMaterializer, Materializer } import io.gr...
clvcooke/mnist-reader-scala
MnistLoader.scala
<filename>MnistLoader.scala<gh_stars>0 import java.io.{BufferedInputStream, FileInputStream} import java.util.zip.GZIPInputStream import org.nd4j.linalg.factory.Nd4j /** * Created by clvcooke on 6/6/2016. */ object MnistLoader { private def gzipInputStream(s: String) = new GZIPInputStream(new BufferedInputStr...
lucienh/learning-spark
src/main/scala/com/javachen/spark/examples/rdd/GroupWith.scala
<reponame>lucienh/learning-spark package com.javachen.spark.examples.rdd import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ object GroupWith { def main(args: Array[String]) { val sc = new SparkContext("local[2]", "GroupWith Test") val data1 = Array[(String, Int)](("A1", 1), ("A2",...
lucienh/learning-spark
src/main/scala/com/javachen/spark/examples/rdd/Pipe.scala
<gh_stars>10-100 package com.javachen.spark.examples.rdd /** * * @author <a href="mailto:<EMAIL>">june</a>. * @date 2015-05-12 17:21. */ object Pipe { }
lucienh/learning-spark
src/main/scala/com/javachen/spark/examples/mllib/MovieLensALS.scala
<reponame>lucienh/learning-spark /* * 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...
lucienh/learning-spark
src/main/scala/com/javachen/spark/examples/rdd/Cartesian.scala
package com.javachen.spark.examples.rdd import org.apache.spark.SparkContext object Cartesian { def main(args: Array[String]) { val sc = new SparkContext("local", "Cartesian Test") val data1 = Array[(String, Int)](("A1", 1), ("A2", 2), ("B1", 3), ("B2", 4), ("C1", 5), ("C1", 6)) val data2 =...
lucienh/learning-spark
src/main/scala/com/javachen/spark/examples/rdd/Lookup.scala
package com.javachen.spark.examples.rdd import org.apache.spark.SparkContext import org.apache.spark.SparkContext._ object Lookup { def main(args: Array[String]) { val sc = new SparkContext("local", "LookUp Test") val data = Array[(String, Int)](("A", 1), ("B", 2), ("B", 3), ("C", 4), ("C", 5)...
lucienh/learning-spark
src/main/scala/com/javachen/spark/examples/rdd/PartitionBy.scala
package com.javachen.spark.examples.rdd import org.apache.spark.{RangePartitioner,HashPartitioner, SparkContext} object PartitionBy { def main(args: Array[String]) { val sc = new SparkContext("local", "ReduceByKeyToDriver Test") val data1 = Array[(String, Int)](("K", 1), ("T", 2), ("T", 3), ("W", 4),...
lucienh/learning-spark
src/main/scala/com/javachen/spark/examples/mllib/ScalaLocalALS.scala
<reponame>lucienh/learning-spark package com.javachen.grab import org.apache.spark.mllib.recommendation.{ALS, Rating} import org.apache.spark.rdd.RDD import org.apache.spark.{SparkConf, SparkContext} import org.jblas.DoubleMatrix import scala.sys.process._ import org.apache.log4j.{Level, Logger} /** * 本地模式运行 */ o...
lucienh/learning-spark
src/main/scala/com/javachen/spark/examples/mllib/EvaluateResult.scala
<reponame>lucienh/learning-spark<filename>src/main/scala/com/javachen/spark/examples/mllib/EvaluateResult.scala<gh_stars>10-100 package com.javachen.grab import org.apache.spark.mllib.recommendation.{ALS, MatrixFactorizationModel, Rating} import org.apache.spark.rdd.RDD /** * * Created by <a href="mailto:<EMAIL>">j...
lucienh/learning-spark
src/main/scala/com/javachen/spark/examples/mllib/ScalaMovieLensALS.scala
<filename>src/main/scala/com/javachen/spark/examples/mllib/ScalaMovieLensALS.scala package com.javachen.spark.examples.mllib import java.util.Random import org.apache.spark.mllib.recommendation.{ALS, MatrixFactorizationModel, Rating} import org.apache.spark.rdd._ import org.apache.spark.{SparkConf, SparkContext} /**...
lucienh/learning-spark
src/main/scala/com/javachen/spark/examples/sparksql/ScalaSparkSQLByReflection.scala
package com.javachen.spark.examples.sparksql import org.apache.spark.{SparkConf, SparkContext} object ScalaSparkSQLByReflection { // Define the schema using a case class. // Note: Case classes in Scala 2.10 can support only up to 22 fields. To work around this limit, // you can use custom classes that implemen...
lucienh/learning-spark
src/main/scala/com/javachen/spark/examples/rdd/GroupByAction.scala
<filename>src/main/scala/com/javachen/spark/examples/rdd/GroupByAction.scala package com.javachen.spark.examples.rdd import org.apache.spark.SparkContext import org.apache.spark.RangePartitioner object GroupByAction { def main(args: Array[String]) { val sc = new SparkContext("local", "GroupByAction Test") ...
flaviostutz/spark-scala-hdfs-docker-example
app/src/main/scala/app/Main.scala
<gh_stars>0 package app import org.apache.spark.SparkConf import org.apache.spark.sql.SparkSession import org.apache.spark.sql.SaveMode import org.apache.hadoop.conf.Configuration import org.apache.hadoop.fs.FileSystem import org.apache.hadoop.fs.Path object Main extends App { val hdfsPrefix = sys.env("HDFS_U...
aurlien/kafka
core/src/main/scala/kafka/log/LogValidator.scala
<gh_stars>0 /** * 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 "Licens...
objektwerks/spark.area.of.interest
src/main/scala/aoi/AreaOfInterestJob.scala
<reponame>objektwerks/spark.area.of.interest<gh_stars>0 package aoi import com.typesafe.config.{Config, ConfigFactory} import org.apache.log4j.Logger import org.apache.spark.SparkConf import org.apache.spark.sql.SparkSession import scala.util.Try object AreaOfInterestJob { import AreaOfInterest._ def main(args:...
objektwerks/spark.area.of.interest
build.sbt
name := "spark.area.of.interest" organization := "objektwerks" version := "0.1-SNAPSHOT" scalaVersion := "2.13.7" libraryDependencies ++= { val sparkVersion = "3.2.0" Seq( "org.apache.spark" %% "spark-core" % sparkVersion, "org.apache.spark" %% "spark-streaming" % sparkVersion, "org.apache.spark" %% "sp...
objektwerks/spark.area.of.interest
src/main/scala/aoi/AreaOfInterest.scala
package aoi import java.lang.Math.{atan2, cos, sin, sqrt} import java.time.{Duration, Instant} import org.apache.log4j.Logger import org.apache.spark.sql.Encoders import scala.collection.mutable case class AreaOfInterest(id: String, latitude: Double, longitude: Double) case class Hit(id: String, utc: Long, latitud...
danischroeter/kamon-prometheus
src/main/scala/kamon/prometheus/MetricOverrideReporter.scala
<gh_stars>10-100 /* ========================================================================================= * Copyright © 2013-2018 the kamon project <http://kamon.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 ob...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/kernels/AnovaKernel.scala
package io.github.mandar2812.dynaml.kernels import breeze.linalg.{DenseMatrix, DenseVector} /** * @author mandar2812 * Annova Kernel */ class AnovaKernel(si: Double = 1.0, exp: Double = 4.0, d: Double = 2.0) extends SVMKernel[DenseMatrix[Double]] with LocalSVMKernel[Dense...
amitkumarj441/DynaML
dynaml-notebook/src/main/scala-2.11/io/github/mandar2812/dynaml/zeppelin/DynaMLZeppelinInterpreter.scala
<gh_stars>0 package io.github.mandar2812.dynaml.zeppelin import java.nio.charset.Charset import java.util.Properties import ammonite.interp.{Parsers, Preprocessor} import ammonite.repl.Repl import ammonite.runtime.{History, Storage} import ammonite.util._ import ammonite.util.Util.{CodeSource, VersionedWrapperId} imp...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/tensorflow/utils/Utils.scala
<gh_stars>0 package io.github.mandar2812.dynaml.tensorflow.utils import io.github.mandar2812.dynaml.pipes.{DataPipe, MetaPipe12} import io.github.mandar2812.dynaml.tensorflow.data.AbstractDataSet import org.platanios.tensorflow.api.core.client.Fetchable import org.platanios.tensorflow.api.learn.estimators.Estimator im...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/models/statespace/StateSpaceModel.scala
package io.github.mandar2812.dynaml.models.statespace import java.io.Serializable import POMP._ import breeze.linalg.DenseVector import breeze.stats.distributions.Rand trait StateSpaceModel extends Serializable { // The observation model def observation: Eta => Rand[Observation] // the link function def link(...
amitkumarj441/DynaML
dynaml-pipes/src/main/scala-2.11/io/github/mandar2812/dynaml/pipes/DataPipe4.scala
<reponame>amitkumarj441/DynaML<filename>dynaml-pipes/src/main/scala-2.11/io/github/mandar2812/dynaml/pipes/DataPipe4.scala /* 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 ...
amitkumarj441/DynaML
dynaml-repl/src/main/scala-2.11/io/github/mandar2812/dynaml/repl/DynaMLEvaluator.scala
package io.github.mandar2812.dynaml.repl import java.nio.charset.Charset import ammonite.runtime.Evaluator.{evaluatorRunPrinter, userCodeExceptionHandler} import ammonite.runtime.{Evaluator, Frame} import ammonite.util.Util.ClassFiles import ammonite.util._ import org.apache.commons.io.output.ByteArrayOutputStream i...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/tensorflow/Learn.scala
package io.github.mandar2812.dynaml.tensorflow import io.github.mandar2812.dynaml.tensorflow.layers.{DynamicTimeStepCTRNN, FiniteHorizonCTRNN, FiniteHorizonLinear} import org.platanios.tensorflow.api.learn.StopCriteria import org.platanios.tensorflow.api.learn.layers.{Activation, Input, Layer} import org.platanios.ten...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/models/Model.scala
/* 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 not use this f...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/tensorflow/Pipe.scala
<filename>dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/tensorflow/Pipe.scala package io.github.mandar2812.dynaml.tensorflow import ammonite.ops.Path import io.github.mandar2812.dynaml.pipes.{DataPipe, DataPipe2} import io.github.mandar2812.dynaml.tensorflow.utils.{GaussianScalerTF, MinMaxScalerTF} impor...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/models/gp/AbstractGPRegressionModel.scala
/* Copyright 2015 <NAME> 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");...
amitkumarj441/DynaML
build.sbt
import sbt._ import java.io.File import Dependencies._ import sbtbuildinfo.BuildInfoPlugin.autoImport._ maintainer := "<NAME> <<EMAIL>>" packageSummary := "Scala Library/REPL for Machine Learning Research" packageDescription := "DynaML is a Scala environment for conducting research and education in Machine Learning....
amitkumarj441/DynaML
dynaml-pipes/src/main/scala-2.11/io/github/mandar2812/dynaml/pipes/MetaPipe.scala
<gh_stars>0 package io.github.mandar2812.dynaml.pipes /** * Data Pipe wrapper of a curried function of order 1 * @author mandar2812 date: 21/02/2017. * * */ trait MetaPipe[Source, Intermediate, Destination] extends DataPipe[Source, DataPipe[Intermediate, Destination]] { self => /** * This is a modi...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/models/statespace/SimData.scala
<reponame>amitkumarj441/DynaML package io.github.mandar2812.dynaml.models.statespace import breeze.numerics.{exp, log} import breeze.stats.distributions.{Exponential, Rand, Uniform} import POMP._ import akka.stream.scaladsl.Source import DataTypes._ import scala.Stream._ object SimData { /** * Stream of sde s...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/probability/package.scala
<gh_stars>0 /* 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 no...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/graphics/plot3d/package.scala
/* 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 not use this f...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/evaluation/RegressionMetricsSpark.scala
/* 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 not use this f...
amitkumarj441/DynaML
project/plugins.sbt
logLevel := Level.Info addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.4") addSbtPlugin("se.marcuslonnberg" % "sbt-docker" % "1.5.0") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.7.0") //addSbtPlugin("ch.epfl.scala.index" % "sbt-scaladex" % "0.1.3")
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/models/svm/KernelSparkModel.scala
package io.github.mandar2812.dynaml.models.svm import breeze.linalg.{DenseMatrix, DenseVector, norm} import breeze.numerics.sqrt import io.github.mandar2812.dynaml.analysis.VectorField import org.apache.log4j.Logger import org.apache.spark.mllib.linalg.Vectors import org.apache.spark.mllib.regression.LabeledPoint impo...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/utils/package.scala
<filename>dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/utils/package.scala /* 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...
amitkumarj441/DynaML
dynaml-notebook/src/main/scala-2.11/io/github/mandar2812/dynaml/DynaZeppelin.scala
<gh_stars>0 package io.github.mandar2812.dynaml import java.io.{InputStream, OutputStream} import java.nio.file.NoSuchFileException import ammonite.interp.Interpreter import ammonite.ops.{Path, read} import ammonite.repl.{RemoteLogger, Repl} import ammonite.runtime.{Frame, Storage} import ammonite.util.Util.newLine i...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/modelpipe/DLSSVMPipe.scala
/* 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 not use this f...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/evaluation/RegressionMetricsTF.scala
/* 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 not use this f...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/kernels/CoRegGraphKernel.scala
package io.github.mandar2812.dynaml.kernels import breeze.linalg.{DenseMatrix, pinv} import io.github.mandar2812.dynaml.utils /** * @author mandar2812 date: 30/08/16. * * In co-regionalization models for multi-output gaussian processes, * one comes across the graph regularizer. the class below is an implement...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/tensorflow/data/DataSet.scala
/* 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 not use this f...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/tensorflow/utils/MinMaxScalerTF.scala
/* 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 not use this f...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/models/statespace/DataTypes.scala
<reponame>amitkumarj441/DynaML<gh_stars>0 package io.github.mandar2812.dynaml.models.statespace import POMP._ object DataTypes { /** * A description containing the modelled quantities and observations * sdeState = x_t = p(x_t | x_t-1) * gamma = f(x_t) * eta = g(gamma) * observation = pi(eta) ...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/analysis/package.scala
/* 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 not use this f...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/evaluation/ClassificationMetricsTF.scala
/* 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 not use this f...
amitkumarj441/DynaML
dynaml-examples/src/main/scala-2.11/io/github/mandar2812/dynaml/examples/TestAdult.scala
/* 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 not use this f...
amitkumarj441/DynaML
dynaml-examples/src/main/scala-2.11/io/github/mandar2812/dynaml/examples/TestMagicGamma.scala
package io.github.mandar2812.dynaml.examples import java.io.File import breeze.linalg.{DenseMatrix, DenseVector} import com.github.tototoshi.csv.CSVWriter import org.apache.spark.mllib.regression.LabeledPoint import org.apache.spark.rdd.RDD import org.apache.spark.{SparkConf, SparkContext} import io.github.mandar2812...
amitkumarj441/DynaML
dynaml-pipes/src/main/scala-2.11/io/github/mandar2812/dynaml/pipes/StreamDataPipe.scala
<reponame>amitkumarj441/DynaML<gh_stars>0 /* 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...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/utils/GaussianScaler.scala
<filename>dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/utils/GaussianScaler.scala /* 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 licens...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/tensorflow/layers/StackOutputs.scala
/* 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 not use this f...
amitkumarj441/DynaML
dynaml-examples/src/main/scala-2.11/io/github/mandar2812/dynaml/examples/DaisyPowerPlant.scala
/* 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 not use this f...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/kernels/KernelOpType.scala
package io.github.mandar2812.dynaml.kernels import breeze.generic.UFunc import breeze.math.Semiring /** * @author mandar2812 date:26/10/2016. * * Marker for some kernel operation. */ sealed trait KernelOpType sealed trait KernelOpAdd extends KernelOpType sealed trait KernelOpMult extends KernelOpType sealed t...
amitkumarj441/DynaML
dynaml-pipes/src/main/scala-2.11/io/github/mandar2812/dynaml/pipes/Scaler.scala
<gh_stars>0 /* 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 no...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/optimization/ProbGPCommMachine.scala
/* 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 not use this f...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/tensorflow/data/AbstractDataSet.scala
<gh_stars>0 /* 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 no...
amitkumarj441/DynaML
dynaml-repl/src/main/scala-2.11/io/github/mandar2812/dynaml/repl/DynaMLRepl.scala
/* 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 not use this f...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/models/statespace/StateSpace.scala
package io.github.mandar2812.dynaml.models.statespace import POMP._ import breeze.stats.distributions.{Rand, Gaussian, MultivariateGaussian} import breeze.linalg.{diag, DenseVector} import breeze.numerics.{exp, sqrt} import breeze.stats.distributions.{Gaussian, Rand} object StateSpace { /** * Steps all the st...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/kernels/PeriodicKernel.scala
package io.github.mandar2812.dynaml.kernels import breeze.linalg.{norm, DenseMatrix, DenseVector} /** * @author mandar2812 * * Implementation of the periodic kernel * K(x,y) = exp(-2*sin^2(pi*omega*x-y/l^2)) * */ class PeriodicKernel(private var lengthscale: Double = 1.0, private var fr...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/models/statespace/PMMH.scala
<reponame>amitkumarj441/DynaML<filename>dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/models/statespace/PMMH.scala package io.github.mandar2812.dynaml.models.statespace import breeze.stats.distributions.{Uniform, Rand, Process, MarkovChain} import POMP._ import akka.stream.scaladsl._ case class MetropSt...
amitkumarj441/DynaML
dynaml-examples/src/main/scala-2.11/io/github/mandar2812/dynaml/examples/TestDelve.scala
/* 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 not use this f...
amitkumarj441/DynaML
dynaml-examples/src/main/scala-2.11/io/github/mandar2812/dynaml/examples/TestNNDelve.scala
/* 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 not use this f...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/evaluation/BinaryClassificationMetricsSpark.scala
<filename>dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/evaluation/BinaryClassificationMetricsSpark.scala /* 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 own...
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/tensorflow/api/Api.scala
<gh_stars>0 package io.github.mandar2812.dynaml.tensorflow.api import java.nio.ByteBuffer import io.github.mandar2812.dynaml.probability.RandomVariable import org.platanios.tensorflow.api.tensors.TensorConvertible import org.platanios.tensorflow.api.types.{DataType, SupportedType} import org.platanios.tensorflow.api....
amitkumarj441/DynaML
dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/kernels/GenericMaternKernel.scala
<reponame>amitkumarj441/DynaML /* 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 "Li...