Skip to content

Instantly share code, notes, and snippets.

Janis Rumnieks JRuumis

Block or report user

Report or block JRuumis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@JRuumis
JRuumis / WeatherParser.scala
Created Mar 8, 2019
parse Weather JSON, WeatherSchema case class
View WeatherParser.scala
import io.circe.Decoder
import io.circe.parser.decode
import org.joda.time.DateTime
object WeatherParser extends Serializable {
val emptyNumber = -1 // should have used None here
val emptyString = "" // should have used None here
case class WeatherSchema (
View TheCoinChangeProblem2.scala
/**
* Created by janis on 09/01/2017.
*/
object TheCoinChangeProblem2 extends App {
val requiredCoinSum = io.StdIn.readLine().split(" ")(0).toInt
val coins = io.StdIn.readLine().split(" ").toList map (_.toInt)
//val requiredCoinSum = 4
//val coins = List(1,2,3)
// 1111 112 22 13
View DataStore.scala
package rpd.load
import rpd.extract._
/**
* Created by janis on 04/10/2016.
*/
case class DataStore (
// Business Layer
businessModels: List[BusinessModel],
View TargetEntity.scala
package rpd.load
/**
* Created by janis on 01/10/2016.
*/
// todo: create type for id references. perhaps separate for primary and foreign keys
trait AddDataStore {
var dataStore: DataStore = null
View SourceExtract.scala
package rpd.extract
import rpd.load._
import scala.xml.{Elem, Node}
/**
* Created by janis on 01/10/2016.
*/
View NewTest.scala
package rpd.common
import rpd.extract._
import rpd.html.BusinessModelListHtml
import rpd.load._
/**
* Created by janis on 01/10/2016.
*/
object NewTest extends App {
@JRuumis
JRuumis / Titanic.scala
Created Aug 21, 2016
every night in my dreams
View Titanic.scala
import org.apache.log4j.{Level, Logger}
import org.apache.spark.ml.classification.RandomForestClassifier
import org.apache.spark.ml.feature.{Bucketizer, StringIndexer, VectorAssembler, VectorIndexer}
import org.apache.spark.ml.{Pipeline, PipelineStage}
import org.apache.spark.sql.functions._
import org.apache.spark.sql.{DataFrame, SparkSession}
/**
* Created by Janis Rumnieks on 19/08/2016.
*/
@JRuumis
JRuumis / Titanic.scala
Created Aug 20, 2016
every night in my dreams...
View Titanic.scala
import org.apache.log4j.{Level, Logger}
import org.apache.spark.ml.Pipeline
import org.apache.spark.ml.classification.RandomForestClassifier
import org.apache.spark.ml.feature.{StringIndexer, VectorAssembler, VectorIndexer}
import org.apache.spark.sql.SparkSession
/**
* Created by Janis Rumnieks on 19/08/2016.
*/
object Titanic {
View DigitRecognizer4.scala
import org.apache.log4j.{Level, Logger}
import org.apache.spark.ml.classification.RandomForestClassifier
import org.apache.spark.ml.linalg.Vectors
import org.apache.spark.sql.{DataFrame, SparkSession}
/**
* Created by Janis Rumnieks on 15/08/2016.
*/
object DigitRecognizer4 {
View SqlTest.scala
import org.apache.spark.sql.SparkSession
/**
* Created by Janis Rumnieks on 16/08/2016.
*/
object SqlTest {
def main(args: Array[String]): Unit = {
val sparkSession = SparkSession
You can’t perform that action at this time.