Skip to content

Instantly share code, notes, and snippets.

@leoricklin
Created February 7, 2021 04:25
Show Gist options
  • Save leoricklin/ef7c453cba5ffd11baf7167d94611eb3 to your computer and use it in GitHub Desktop.
Save leoricklin/ef7c453cba5ffd11baf7167d94611eb3 to your computer and use it in GitHub Desktop.

Scala

Scala Doc

s"Hello, ${name}"
"%s %s, age %d".format(firstName, lastName, age)
f"${row.getString(0)} $name is $age years old, and weighs $weight%.0f pounds."

All about Scala

01.Getting familiar with IntelliJ IDEA

02.Learning Scala: Fundamentals

val numberOfDonutsToBuy = if(numberOfPeople > 10) (numberOfPeople * donutsPerPerson) else defaultDonutsToBuy

03.Thinking in terms of functions

04.Object Oriented using classes

05.Traits and Dependency Injection

06.Immutable Collection

07. Mutable Collection

★★★ 08.Collection Functions

09.Futures

10.Scala Test and Cheatsheet

11.Learn SBT

12.Learn Apache Spark 2

  • Using StackOverflow dataset
  • Add Apache Spark 2 SBT dependencies
  • Bootstrap a SparkSession
  • DataFrame Introduction
  • Create DataFrame from a CSV file
  • DataFrame schema
  • Select columns
  • Filter by column value
  • Count rows
  • SQL like
  • Filter chaining
  • SQL In
  • SQL Group By

Scala Fish

for ( i <- 1 to 3) { println("Ho " + i) }
val result = for ( i <- 1 to 10 ) yield i + 2

alvin alexander

val a = if (i == 1) x else y

Articles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment