Skip to content

Instantly share code, notes, and snippets.

View yoderj's full-sized avatar

Josiah Yoder yoderj

  • @msoeSE Milwaukee School of Engineering
View GitHub Profile
anonymous
anonymous / spark-join.scala
Created August 4, 2015 00:08
def natjoin(left: DataFrame, right: DataFrame, joinType: String): DataFrame = {
// Get the left and the right columns.
val leftCols = left.columns
val rightCols = right.columns
// Find the Common Columns.
val commonCols = leftCols.toSet intersect rightCols.toSet
// TODO: Common columns must equal publishing keys. Else throw exception.
print(commonCols)
@amitchhajer
amitchhajer / Count Code lines
Created January 5, 2013 11:08
Count number of code lines in git repository per user
git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*\((.*?)\s*[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n