Skip to content

Instantly share code, notes, and snippets.

Michel Henrique Dib Jorge MDIB

Block or report user

Report or block MDIB

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
MDIB / comparision.scala
Last active Sep 17, 2019
Spark Schema Comparison
View comparision.scala
import org.apache.spark.sql.types._
import cats._
import cats.implicits._
sealed trait ComparationResult
case object Validated extends ComparationResult
case class Invalid(msg: String) extends ComparationResult
def safeGetColumn(dfSchema: StructType,columnName: String) =
View split-wise-parser.js
JSON.stringify($.map($('.expense .summary .involved'),
(e) => {
var negative = $(e).find('.you > .negative').text()
var positive = $(e).find('.you > .positive').text()
var date = $(e).find('.date').prop('title')
var isPositive = (negative == "")
var final = isPositive?positive:negative
var desc = $(e).find('.description').text()
return {amount: final,
desc: desc.trim(),
View get-pocket-parser.js
(e) => {
return {title: $(e).find('.title').text(),
url: $(e).find('.original_url').prop('href'),
image: $(e).find('.lazy-active').css('background-image'),
id: $(e).parent().prop('id')}
You can’t perform that action at this time.