Scala Cheat Sheet



Cats Typeclass Cheat Sheet Adam Rosien (adam@rosien.net) October 14, 2017 Installation In your build.sbt file: libraryDependencies += 'org.typelevel'%% 'cats-core'% '1.0.0-MF' Then in your.scala files: import cats. Defining Signatures Each typeclass is defined by a particular function signature and a set. Highly accessible through standard APIs built in Java, Scala, Python, or SQL (for interactive queries), and a rich set of machine learning libraries available out of the box. Compatibility with the existing Hadoop v1 (SIMR) and 2.x (YARN) ecosystems so companies can leverage their existing infrastructure. Scala Cheat Sheet This cheat sheet from here actually originated from the forum, credits to Laurent Poulain. We copied it and changed or added a few things. Evaluation Rules. Call by value: evaluates the function arguments before calling the function. All cheat sheets, round-ups, quick reference cards, quick reference guides and quick reference sheets in one page. Scala Cheat Sheet pdf (geekontheloose.com) Official website: scala-lang.org. Scalability W and High Availability W. Scala cheat sheet. ##Download PDF scala-cheat-sheet.pdf ##How to compile on Windows. Install Tex Live 2013, then add its bin path for example D:texlive2013binwin32 to he PATH environment variable.; Install TeXstudio.; Configure TeXstudio. Run TeXstudio, click Options-Configure Texstudio-Commands, set PdfLaTex to pdflatex.exe -synctex=1 -interaction=nonstopmode%.tex.

Having a good cheatsheet at hand can significantly speed up the development process.One of the best cheatsheet I have came across is sparklyr’s cheatsheet.

For my work, I’m using Spark’s DataFrame API in Scala to create data transformation pipelines. These are some functions and design patterns that I’ve found to be extremely useful.

Sheet

Load data

Scala Cheat Sheet

Spark Scala Cheat Sheet Pdf

Get SparkContext information

Scala cheat sheet pdf

Get Spark version

Get number of partitions

Count number of rows

Syntax

Print schema

Preview top 20 rows

Design pattern for constructing as data transformation pipeline

Spark Scala Cheat Sheet

Drop duplicate rows

Scala Cheatsheet

For an exhaustive list of the functions, you can check out the Spark’s Dataset class documentation.

Scala Cheat Sheet

Hope you’ve found this cheatsheet useful. Thank you!