Skip to content

Instantly share code, notes, and snippets.

@savadev
savadev / grokking_to_leetcode.md
Created October 3, 2022 15:16 — forked from tykurtz/grokking_to_leetcode.md
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@savadev
savadev / run.sh
Created February 9, 2022 00:12 — forked from luminousmen/run.sh
Big Data file formats
#!/bin/bash
END=3
FUNC="stats"
for ((i=1;i<=END;i++)); do
for fmt in csv json avro parquet; do
spark-submit --packages org.apache.spark:spark-avro_2.11:2.4.0 script.py $fmt $FUNC
done
done
Run this on your postgres instance
CREATE EXTENSION aws_s3 CASCADE;
Run this on your EC2 instance
First-
@savadev
savadev / backtracking_template.py
Created July 29, 2021 02:59 — forked from RuolinZheng08/backtracking_template.py
[Algo] Backtracking Template & N-Queens Solution
def is_valid_state(state):
# check if it is a valid solution
return True
def get_candidates(state):
return []
def search(state, solutions):
if is_valid_state(state):
solutions.append(state.copy())
@savadev
savadev / it-ebooks.md
Created June 15, 2021 18:44 — forked from baiwfg2/it-ebooks.md
Download ebooks as you want
@savadev
savadev / Big List of Real Estate APIs.md
Created June 7, 2021 16:25 — forked from patpohler/Big List of Real Estate APIs.md
Evolving list of Real Estate APIs by Category

Big List of Real Estate APIs

Listings / Property Data

####Rets Rabbit http://www.retsrabbit.com

Rets Rabbit removes the nightmare of importing thousands of real estate listings and photos from RETS or ListHub and gives you an easy to use import and Web API server so you can focus on building your listing search powered website or app.

# Source: https://gist.github.com/419032bc714cc31cd2f72d45ebef07c7
######################
# Creating A Cluster #
######################
# Docker Desktop: https://gist.github.com/f753c0093a0893a1459da663949df618 (docker.sh)
# Minikube: https://gist.github.com/ddc923c137cd48e18a04d98b5913f64b (minikube.sh)
# GKE: https://gist.github.com/2351032b5031ba3420d2fb9a1c2abd7e (gke.sh)
# EKS: https://gist.github.com/be32717b225891b69da2605a3123bb33 (eks.sh)
# Source: https://gist.github.com/vfarcic/868bf70ac2946458f5485edea1f6fc4c
######################
# Create The Cluster #
######################
# Make sure that you're using eksctl v0.1.5+.
# Follow the instructions from https://github.com/weaveworks/eksctl to intall eksctl.
cd k8s-specs
git pull
helm install prometheus-adapter \
stable/prometheus-adapter \
--version 1.4.0 \
--namespace metrics \
--set metricsRelistInterval=90s \
--set prometheus.url=http://prometheus-server.metrics.svc \
# Source: https://gist.github.com/48f44d3974db698d3127f52b6e7cd0d3
###########################################################
# Automation of Everything #
# How To Combine Argo Events, Workflows, CD, and Rollouts #
# https://youtu.be/XNXJtxkUKeY #
###########################################################
# Requirements:
# - k8s v1.19+ cluster with nginx Ingress