Skip to content

Instantly share code, notes, and snippets.

View lordlinus's full-sized avatar

Sunil Sattiraju lordlinus

View GitHub Profile

Spark HWC integration - HDP 3 Secure cluster

Prerequisites :

  • Kerberized Cluster

  • Enable hive interactive server in hive

  • Get following details from hive for spark or try this HWC Quick Test Script

@c-w
c-w / databricksParallelNotebookDriver.scala
Created January 4, 2019 20:53
Running notebooks in parallel on Azure Databricks
// define the name of the Azure Databricks notebook to run
val notebookToRun = ???
// define some way to generate a sequence of workloads to run
val jobArguments = ???
// define the number of workers per job
val workersPerJob = ???
import java.util.concurrent.Executors
@enamoria
enamoria / dataframe_reduce_memory.py
Created October 17, 2018 03:32
Reduce pandas dataframe memory usage
# This function is used to reduce memory of a pandas dataframe
# The idea is cast the numeric type to another more memory-effective type
# For ex: Features "age" should only need type='np.int8'
# Source: https://www.kaggle.com/gemartin/load-data-reduce-memory-usage
def reduce_mem_usage(df):
""" iterate through all the columns of a dataframe and modify the data type
to reduce memory usage.
"""
start_mem = df.memory_usage().sum() / 1024**2
print('Memory usage of dataframe is {:.2f} MB'.format(start_mem))
@ramiroaznar
ramiroaznar / README.md
Last active November 26, 2021 22:08
ramiroaznar meta gist

Meta Gist

  • PostgreSQL and PostGIS queries
  • CartoCSS styles
  • CARTO.js blocks
  • DI.js blocks
  • Leaflet.js blocks
  • Other blocks
  • Others

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
@hhimanshu
hhimanshu / .Functional Programming in Scala Exercises
Last active September 19, 2021 16:58
Functional Programming in Scala Exercises
All exercises are attempted on https://coderpad.io
@plastiv
plastiv / rxandroid-tuts.md
Created July 4, 2015 11:27
Links for android developers
@ericelliott
ericelliott / essential-javascript-links.md
Last active September 9, 2024 15:49
Essential JavaScript Links