From 89a5a70d90b27da82d6d3b63dbeb8ffddbf6d5bc Mon Sep 17 00:00:00 2001 From: abregman Date: Sun, 12 Apr 2020 19:25:24 +0300 Subject: [PATCH] Add a couple of questions --- README.md | 160 +++++++++++++++++++++++++++++++++++++++----- images/big-data.png | Bin 0 -> 2083 bytes 2 files changed, 145 insertions(+), 15 deletions(-) create mode 100644 images/big-data.png diff --git a/README.md b/README.md index b995df3..ac3768c 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ :information_source:  This repo contains questions and exercises on various technical topics, sometimes related to DevOps and SRE :) -:bar_chart:  There are currently **1035** questions +:bar_chart:  There are currently **1071** questions -:busts_in_silhouette:  [Join](https://www.facebook.com/groups/538897960007080) our [Facebook group](https://www.facebook.com/groups/538897960007080) for additional daily exercises, articles and more resources on DevOps +:busts_in_silhouette:  [Join](https://www.facebook.com/groups/538897960007080) our [Facebook group](https://www.facebook.com/groups/538897960007080) or follow us on [Twitter](https://twitter.com/devopsbit) for additional daily exercises, articles and more resources on DevOps :warning:  You can use these for preparing for an interview but most of the questions and exercises don't represent an actual interview. Please read [Q&A](common-qa.md) for more details @@ -67,6 +67,7 @@ RegEx
Regex

Beginner :baby:
Design
Design
Hardware
Hardware
+ Big Data
Big Data
you
Questions you ask
Exercises
Exercises
@@ -3656,17 +3657,13 @@ You can usually use the function hash() to check an object mutability. If an obj
-In Python, functions are first-class objects. What does it mean?
+What is the result of `"abc"*3`?
-In general, first class objects in programming languages are objects which can be assigned to variable, used as a return value and can be used as arguments or parameters.
-In python you can treat functions this way. Let's say we have the following function +abcabcabc +
-``` -def my_function(): - return 5 -``` - -You can then assign a function to a variables like this `x = my_function` or you can return functions as return values like this `return my_function` +
+What is the result of `bool("")`? What about `bool(" ")`?
@@ -3696,9 +3693,27 @@ char = input("Insert a character: ") # For readablity if lower(char[0]) in "aieou": # Takes care of multiple characters and separate cases print("It's a vowel!") ``` -
+
+How to define a function with Python?
+
+ +
+In Python, functions are first-class objects. What does it mean?
+ +In general, first class objects in programming languages are objects which can be assigned to variable, used as a return value and can be used as arguments or parameters.
+In python you can treat functions this way. Let's say we have the following function + +``` +def my_function(): + return 5 +``` + +You can then assign a function to a variables like this `x = my_function` or you can return functions as return values like this `return my_function` +
+ +
Explain inheritance and how to use it in Python
@@ -3984,6 +3999,12 @@ x = [4, 5, 6] x.extend([1, 2, 3])
+
+How to remove the first 3 items from a list?
+ +`my_list[0:3] = []` +
+
How do you get the maximum and minimum values from a list? How to get the last item from a list?
@@ -4182,6 +4203,23 @@ list(zip(nums, letters)) #### Dictionaries +
+How to create a dictionary?
+ +my_dict = dict(x=1, y=2) +OR +my_dict = {'x': 1, 'y': 2} +OR +my_dict = dict([('x', 1), ('y', 2)]) +
+ +
+How to remove an item from a dictionary?
+ +del my_dict['some_key'] +you can also use `my_dict.pop('some_key')` which returns the value of the key. +
+
How to sort a dictionary by values?
@@ -4477,7 +4515,39 @@ the_list.sort(key=lambda x: x[1]) * filter()
-#### Debugging +#### Python - Slicing + +For the following slicing exercises, assume you have the following list: `my_list = [8, 2, 1, 10, 5, 4, 3, 9]` + +
+What is the result of `my_list[0:4]`?
+
+ +
+What is the result of `my_list[5:6]`?
+
+ +
+What is the result of `my_list[5:5]`?
+
+ +
+What is the result of `my_list[::-1]`?
+
+ +
+What is the result of `my_list[::3]`?
+
+ +
+What is the result of `my_list[2:]`?
+
+ +
+What is the result of `my_list[:3]`?
+
+ +#### Python Debugging
How do you debug Python code?
@@ -7538,7 +7608,7 @@ https://idiallo.com/blog/c10k-2016 ## HR -Although the following questions are not DevOps related, they are still quite common and part of the DevOps interview process so it's better to prepare for them as well. +These are not DevOps related questions as you probably noticed, but since they are part of the DevOps interview process I've decided it might be good to keep them
Tell us little bit about yourself
@@ -7587,7 +7657,7 @@ Some ideas (some of them bad and should not be used):
-Give an example of a time you were able to change the view of a team about a particular tool/project/technology
+Give an example of a time when you were able to change the view of a team about a particular tool/project/technology
@@ -7946,6 +8016,66 @@ Raspberry Pi What types of storage are there?
+## Big Data + +
+Explain what is exactly Big Data
+ +As defined by Doug Laney: + +* Volume: Extremely large volumes of data +* Velocity: Real time, batch, streams of data +* Variety: Various forms of data, structured, semi-structured and unstructured +* Veracity or Variability: Inconsistent, sometimes inaccurate, varying data +
+ +
+Explain the different formats of data
+ +* Structured - data that has defined format and length (e.g. numbers, words) +* Semi-structured - Doesn't conform to a specific format but is self-describing (e.g. XML, SWIFT) +* Unstructured - does not follow a specific format (e.g. images, test messages) +
+ +
+What is a Data Warehouse?
+ +[Wikipedia's explanation on Data Warehouse](https://en.wikipedia.org/wiki/Data_warehouse) +[Amazon's explanation on Data Warehouse](https://aws.amazon.com/data-warehouse) +
+ +
+What is Data Lake?
+ +[Data Lake - Wikipedia](https://en.wikipedia.org/wiki/Data_lake) +
+ +#### Apache Hadoop + +
+Explain what is Hadoop
+ +[Apache Hadoop - Wikipedia](https://en.wikipedia.org/wiki/Apache_Hadoop) +
+ +
+Explain Hadoop YARN
+ +Responsible for managing the compute resources in clusters and scheduling users' applications +
+ +
+Explain Hadoop MapReduce
+ +A programming model for large-scale data processing +
+ +
+Explain Hadoop Distributed File Systems (HDFS)
+ +Distributed file system providing high aggregate bandwidth across the cluster. +
+ ## Exercises Exercises are all about: diff --git a/images/big-data.png b/images/big-data.png new file mode 100644 index 0000000000000000000000000000000000000000..7c472066676ba05b36bee4f68f76b28d000588f8 GIT binary patch literal 2083 zcmV+;2;BFHP) zt9sS%p5&&}Gw*fXs=8fu>)xu@peTx>D2k#eilQh=Ss3P80Z*6;Tm#GmE(Xp5Mgb#% ze}JvP7T^=$1K=k&YAPl<3Ai8l3OJEcz6b6_j70H_4q!2`gY+FAmfgT2bfoo$bAV52 zz2n33DKO1mHIyt|4eY^u=U3%#;BsrVQBu(Z93sEYugYQIR!enCMA7G_Zr}#s65s-4 zh#m=y0QMoC_hw{>eINKWLmAfqZvn$w);1YOfGdHumdf*vk%$wvp7h_aK42l@!6#t~ z@Mnf{OiTyor)rfFP(hYX+iAUle+TX%dW5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