Skip to content

Instantly share code, notes, and snippets.

View rahulkumar-aws's full-sized avatar

Rahul Kumar rahulkumar-aws

View GitHub Profile
name := "data-scratchpad"
version := "0.1"
scalaVersion := "2.12.13"
val sparkVersion = "2.4.0"
// resourceDirectory in Compile := baseDirectory.value / "resources"
libraryDependencies += "org.apache.spark" %% "spark-core" % sparkVersion % "provided"
@rahulkumar-aws
rahulkumar-aws / producer.scala
Created October 4, 2019 03:39
alpakka-kafka Producer
import java.nio.file.Paths
import InsuranceJsonProtocol._
import akka.actor.ActorSystem
import akka.kafka.ProducerSettings
import akka.kafka.scaladsl.Producer
import akka.stream.scaladsl._
import akka.stream.{ActorMaterializer, Materializer}
import akka.util.ByteString
import org.apache.kafka.clients.producer.ProducerRecord
import org.apache.kafka.common.serialization.StringSerializer
$ wget http://www-eu.apache.org/dist/nutch/2.3.1/apache-nutch-2.3.1-src.tar.gz
$ tar xvfz apache-nutch-2.3.1-src.tar.gz
$ cd apache-nutch-2.3.1/conf

$NUTCH_HOME/conf/nutch-site.xml

<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
object Functions extends App {

  //
  // Function Calls
  //

  // basic function call with a single param
  println("foo")
@rahulkumar-aws
rahulkumar-aws / nyc_data_sql.md
Created November 3, 2018 15:40
NYC Data SQL
-- pickups by geography
CREATE TABLE daily_pickups_taxi AS
SELECT
 cab_type_id,
 date(pickup_datetime) AS date,
 pickup_location_id,
 COUNT(*) AS trips
FROM trips
GROUP BY cab_type_id, date(pickup_datetime), pickup_location_id
@rahulkumar-aws
rahulkumar-aws / minikube.md
Last active June 9, 2024 06:55
Install/Uninstall Minikube from Mac
minikube stop; minikube delete
docker stop $(docker ps -aq)
rm -r ~/.kube ~/.minikube
sudo rm /usr/local/bin/localkube /usr/local/bin/minikube
systemctl stop '*kubelet*.mount'
sudo rm -rf /etc/kubernetes/
docker system prune -af --volumes
https://www.google.com/url?q=https://emailapi-v2.moengage.com/v1/emailclick?em=rahulkumar.aws%40gmail.com&user_id=%40%24xy%2A%40%21h%C3%90%C2%B0lb9%C3%88%C3%A3B%C3%98-%C3%85%C2%97j%C2%B8%C3%9B%C3%A4%C2%85%C2%A3%C3%8E%C2%97+%C2%82%C3%B2%C3%A9C%01%C3%94zr%C3%95%C2%9B%0F&d=%40%24xy%2A%40%21h%C2%91%C3%A9%C3%83q%25%C2%BC%C3%B8%5B%C3%8A%C3%BB%C2%9B8%C2%9F%7D%C2%AFU%17%08&ts=1540452410&cid=%40%24xy%2A%40%21h%09%C2%82W%C3%92%17%C3%B5Z%C3%A8%C3%B4%C3%BA%C2%99M%C3%A7%C2%A6%C2%A3J%C2%A4%C2%9F%C2%AC%7E6%40%1A%05%C3%A5%C2%88%C3%A5JD_%C2%91%23%0E%5B%C3%A6%7C%07%3F5%14%C3%A7ak%40%11%2C3L%1EZM%C3%BB&ut=l&moeclickid=5bd1700a4c9720790be827e6_F_T_EM_AB_0_P_0_L_0ecli11&app_id=%40%24xy%2A%40%21h%C3%9Bc%C3%88%C3%9A%C2%8A%C2%9F6%C3%8FU%C2%88i%C3%A5+K%C3%9E%16%C3%B1%C2%84%C2%8D+%C2%86f%60%C3%84%1D%06%C3%ADQ%C3%BC%14%C3%A6%C2%9F&pl=A&c_t=ge&rlink=https://www.eventvalue.com%3Fimport_id%3D15404445116566180%26email%3Drahulkumar.aws%40gmail.com&source=gmail&ust=1540538835288000&usg=AFQjCNGm5flBZTYH-eRK-aS-0Qli-jLC6Q
@rahulkumar-aws
rahulkumar-aws / dataset.md
Last active July 13, 2018 11:52
Data set links
@rahulkumar-aws
rahulkumar-aws / The Technical Interview Cheat Sheet.md
Created July 3, 2018 05:33 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.