I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Sql} from "../providers/Sql"; | |
export class ExamplePage { | |
constructor(private sql: Sql) { | |
//sql.query(...); | |
//... | |
} | |
} |
Nothing gives you more detail about spark internals than actually reading it source code. In addition, you get to learn many design techniques and improve your scala coding skills. These are the random notes I make while reading the spark code. The best way to comprehend the notes is to load spark code into an IDE, e.g. IntelliJ, and navigate the code on the side.
The scripts for creating a spark cluster are: start-master.sh and start-slave.sh. Read them carefully, and you can see that both scripts are very similar except the values for $CLASS variable. For start-master.sh, the value is CLASS="org.apache.spark.deploy.master.Master", while the value for start-slave.sh is shown below with more context.
# NOTE: This exact class name is matched downstream by SparkSubmit.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from matplotlib import pyplot as plt | |
class LivePlotNotebook(object): | |
""" | |
Live plot using %matplotlib notebook in jupyter notebook | |
Usage: | |
``` | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mapbox_access_token = 'PASTE_YOUR_TOKEN_HERE' | |
import plotly.offline as py | |
from plotly.graph_objs import * | |
import plotly.graph_objs as go | |
import pypsa | |
py.init_notebook_mode(connected=True) | |
%matplotlib inline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import geocoder | |
import csv | |
import sys | |
import time | |
import json | |
input_csv = sys.argv[1] | |
out_provider = sys.argv[2] | |
out = open("output/output_"+out_provider+"_"+input_csv.strip('.csv')+"_"+str(time.strftime("%s", time.gmtime()))+".geojson","w") | |
output_geojson = {"type": "FeatureCollection","features": []} | |
with open(input_csv) as input_file: |
- Engine: text-davinci-003 (also works in text-davinci-002, but might require more instructions to get a correct JSON back)
- Temperature: 0.7
You must extract the following information from the phone conversation below: