|
2 | 2 |
|
3 | 3 | :information_source: This repo contains questions and exercises on various technical topics, sometimes related to DevOps and SRE :)
|
4 | 4 |
|
5 |
| -:bar_chart: There are currently **1035** questions |
| 5 | +:bar_chart: There are currently **1071** questions |
6 | 6 |
|
7 |
| -: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 |
| 7 | +: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 |
8 | 8 |
|
9 | 9 | :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
|
10 | 10 |
|
|
67 | 67 | <td align="center"><a href="#regex"><img src="images/regex.png" width="75ph;" height="75px;" alt="RegEx"/><br /><b>Regex</b></a><br /><sub><a href="#regex-beginner">Beginner :baby:</a></sub><br><sub></td>
|
68 | 68 | <td align="center"><a href="#design"><img src="images/design.png" width="110px;" height="75px;" alt="Design"/><br /><b>Design</b></a></td>
|
69 | 69 | <td align="center"><a href="#hardware"><img src="images/hardware.png" width="110px;" height="75px;" alt="Hardware"/><br /><b>Hardware</b></a></td>
|
| 70 | + <td align="center"><a href="#big-data"><img src="images/big-data.png" width="110px;" height="75px;" alt="Big Data"/><br /><b>Big Data</b></a></td> |
70 | 71 | <td align="center"><a href="#questions-you-ask"><img src="images/you.png" width="110px;" height="75px;" alt="you"/><br /><b>Questions you ask</b></a></td>
|
71 | 72 | <td align="center"><a href="#exercises"><img src="images/exercises.png" width="110px;" height="75px;" alt="Exercises"/><br /><b>Exercises</b></a></td>
|
72 | 73 | </tr>
|
@@ -3656,17 +3657,13 @@ You can usually use the function hash() to check an object mutability. If an obj
|
3656 | 3657 | </b></details>
|
3657 | 3658 |
|
3658 | 3659 | <details>
|
3659 |
| -<summary>In Python, functions are first-class objects. What does it mean?</summary><br><b> |
3660 |
| - |
3661 |
| -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.<br> |
3662 |
| -In python you can treat functions this way. Let's say we have the following function |
| 3660 | +<summary>What is the result of `"abc"*3`?</summary><br><b> |
3663 | 3661 |
|
3664 |
| -``` |
3665 |
| -def my_function(): |
3666 |
| - return 5 |
3667 |
| -``` |
| 3662 | +abcabcabc |
| 3663 | +</b></details> |
3668 | 3664 |
|
3669 |
| -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` |
| 3665 | +<details> |
| 3666 | +<summary>What is the result of `bool("")`? What about `bool(" ")`?</summary><br><b> |
3670 | 3667 | </b></details>
|
3671 | 3668 |
|
3672 | 3669 | <details>
|
@@ -3696,9 +3693,27 @@ char = input("Insert a character: ") # For readablity
|
3696 | 3693 | if lower(char[0]) in "aieou": # Takes care of multiple characters and separate cases
|
3697 | 3694 | print("It's a vowel!")
|
3698 | 3695 | ```
|
| 3696 | +</b></details> |
3699 | 3697 |
|
| 3698 | +<details> |
| 3699 | +<summary>How to define a function with Python?</summary><br><b> |
3700 | 3700 | </b></details>
|
3701 | 3701 |
|
| 3702 | +<details> |
| 3703 | +<summary>In Python, functions are first-class objects. What does it mean?</summary><br><b> |
| 3704 | + |
| 3705 | +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.<br> |
| 3706 | +In python you can treat functions this way. Let's say we have the following function |
| 3707 | + |
| 3708 | +``` |
| 3709 | +def my_function(): |
| 3710 | + return 5 |
| 3711 | +``` |
| 3712 | + |
| 3713 | +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` |
| 3714 | +</b></details> |
| 3715 | + |
| 3716 | + |
3702 | 3717 | <details>
|
3703 | 3718 | <summary>Explain inheritance and how to use it in Python</summary><br><b>
|
3704 | 3719 |
|
@@ -3984,6 +3999,12 @@ x = [4, 5, 6]
|
3984 | 3999 | x.extend([1, 2, 3])
|
3985 | 4000 | </b></details>
|
3986 | 4001 |
|
| 4002 | +<details> |
| 4003 | +<summary>How to remove the first 3 items from a list?</summary><br><b> |
| 4004 | + |
| 4005 | +`my_list[0:3] = []` |
| 4006 | +</b></details> |
| 4007 | + |
3987 | 4008 | <details>
|
3988 | 4009 | <summary>How do you get the maximum and minimum values from a list? How to get the last item from a list?</summary><br><b>
|
3989 | 4010 |
|
@@ -4182,6 +4203,23 @@ list(zip(nums, letters))
|
4182 | 4203 |
|
4183 | 4204 | #### Dictionaries
|
4184 | 4205 |
|
| 4206 | +<details> |
| 4207 | +<summary>How to create a dictionary?</summary><br><b> |
| 4208 | + |
| 4209 | +my_dict = dict(x=1, y=2) |
| 4210 | +OR |
| 4211 | +my_dict = {'x': 1, 'y': 2} |
| 4212 | +OR |
| 4213 | +my_dict = dict([('x', 1), ('y', 2)]) |
| 4214 | +</b></details> |
| 4215 | + |
| 4216 | +<details> |
| 4217 | +<summary>How to remove an item from a dictionary?</summary><br><b> |
| 4218 | + |
| 4219 | +del my_dict['some_key'] |
| 4220 | +you can also use `my_dict.pop('some_key')` which returns the value of the key. |
| 4221 | +</b></details> |
| 4222 | + |
4185 | 4223 | <details>
|
4186 | 4224 | <summary>How to sort a dictionary by values?</summary><br><b>
|
4187 | 4225 |
|
@@ -4477,7 +4515,39 @@ the_list.sort(key=lambda x: x[1])
|
4477 | 4515 | * filter()</summary><br><b>
|
4478 | 4516 | </b></details>
|
4479 | 4517 |
|
4480 |
| -#### Debugging |
| 4518 | +#### Python - Slicing |
| 4519 | + |
| 4520 | +For the following slicing exercises, assume you have the following list: `my_list = [8, 2, 1, 10, 5, 4, 3, 9]` |
| 4521 | + |
| 4522 | +<details> |
| 4523 | +<summary>What is the result of `my_list[0:4]`?</summary><br><b> |
| 4524 | +</b></details> |
| 4525 | + |
| 4526 | +<details> |
| 4527 | +<summary>What is the result of `my_list[5:6]`?</summary><br><b> |
| 4528 | +</b></details> |
| 4529 | + |
| 4530 | +<details> |
| 4531 | +<summary>What is the result of `my_list[5:5]`?</summary><br><b> |
| 4532 | +</b></details> |
| 4533 | + |
| 4534 | +<details> |
| 4535 | +<summary>What is the result of `my_list[::-1]`?</summary><br><b> |
| 4536 | +</b></details> |
| 4537 | + |
| 4538 | +<details> |
| 4539 | +<summary>What is the result of `my_list[::3]`?</summary><br><b> |
| 4540 | +</b></details> |
| 4541 | + |
| 4542 | +<details> |
| 4543 | +<summary>What is the result of `my_list[2:]`?</summary><br><b> |
| 4544 | +</b></details> |
| 4545 | + |
| 4546 | +<details> |
| 4547 | +<summary>What is the result of `my_list[:3]`?</summary><br><b> |
| 4548 | +</b></details> |
| 4549 | + |
| 4550 | +#### Python Debugging |
4481 | 4551 |
|
4482 | 4552 | <details>
|
4483 | 4553 | <summary>How do you debug Python code?</summary><br><b>
|
@@ -7538,7 +7608,7 @@ https://idiallo.com/blog/c10k-2016
|
7538 | 7608 |
|
7539 | 7609 | ## HR
|
7540 | 7610 |
|
7541 |
| -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. |
| 7611 | +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 |
7542 | 7612 |
|
7543 | 7613 | <details>
|
7544 | 7614 | <summary>Tell us little bit about yourself</summary><br><b>
|
@@ -7587,7 +7657,7 @@ Some ideas (some of them bad and should not be used):
|
7587 | 7657 | </b></details>
|
7588 | 7658 |
|
7589 | 7659 | <details>
|
7590 |
| -<summary>Give an example of a time you were able to change the view of a team about a particular tool/project/technology</summary><br><b> |
| 7660 | +<summary>Give an example of a time when you were able to change the view of a team about a particular tool/project/technology</summary><br><b> |
7591 | 7661 | </b></details>
|
7592 | 7662 |
|
7593 | 7663 | <details>
|
@@ -7946,6 +8016,66 @@ Raspberry Pi
|
7946 | 8016 | <summary>What types of storage are there?</summary><br><b>
|
7947 | 8017 | </b></details>
|
7948 | 8018 |
|
| 8019 | +## Big Data |
| 8020 | + |
| 8021 | +<details> |
| 8022 | +<summary>Explain what is exactly Big Data</summary><br><b> |
| 8023 | + |
| 8024 | +As defined by Doug Laney: |
| 8025 | + |
| 8026 | +* Volume: Extremely large volumes of data |
| 8027 | +* Velocity: Real time, batch, streams of data |
| 8028 | +* Variety: Various forms of data, structured, semi-structured and unstructured |
| 8029 | +* Veracity or Variability: Inconsistent, sometimes inaccurate, varying data |
| 8030 | +</b></details> |
| 8031 | + |
| 8032 | +<details> |
| 8033 | +<summary>Explain the different formats of data</summary><br><b> |
| 8034 | + |
| 8035 | +* Structured - data that has defined format and length (e.g. numbers, words) |
| 8036 | +* Semi-structured - Doesn't conform to a specific format but is self-describing (e.g. XML, SWIFT) |
| 8037 | +* Unstructured - does not follow a specific format (e.g. images, test messages) |
| 8038 | +</b></details> |
| 8039 | + |
| 8040 | +<details> |
| 8041 | +<summary>What is a Data Warehouse?</summary><br><b> |
| 8042 | + |
| 8043 | +[Wikipedia's explanation on Data Warehouse](https://en.wikipedia.org/wiki/Data_warehouse) |
| 8044 | +[Amazon's explanation on Data Warehouse](https://aws.amazon.com/data-warehouse) |
| 8045 | +</b></details> |
| 8046 | + |
| 8047 | +<details> |
| 8048 | +<summary>What is Data Lake?</summary><br><b> |
| 8049 | + |
| 8050 | +[Data Lake - Wikipedia](https://en.wikipedia.org/wiki/Data_lake) |
| 8051 | +</b></details> |
| 8052 | + |
| 8053 | +#### Apache Hadoop |
| 8054 | + |
| 8055 | +<details> |
| 8056 | +<summary>Explain what is Hadoop</summary><br><b> |
| 8057 | + |
| 8058 | +[Apache Hadoop - Wikipedia](https://en.wikipedia.org/wiki/Apache_Hadoop) |
| 8059 | +</b></details> |
| 8060 | + |
| 8061 | +<details> |
| 8062 | +<summary>Explain Hadoop YARN</summary><br><b> |
| 8063 | + |
| 8064 | +Responsible for managing the compute resources in clusters and scheduling users' applications |
| 8065 | +</b></details> |
| 8066 | + |
| 8067 | +<details> |
| 8068 | +<summary>Explain Hadoop MapReduce</summary><br><b> |
| 8069 | + |
| 8070 | +A programming model for large-scale data processing |
| 8071 | +</b></details> |
| 8072 | + |
| 8073 | +<details> |
| 8074 | +<summary>Explain Hadoop Distributed File Systems (HDFS)</summary><br><b> |
| 8075 | + |
| 8076 | +Distributed file system providing high aggregate bandwidth across the cluster. |
| 8077 | +</b></details> |
| 8078 | + |
7949 | 8079 | ## Exercises
|
7950 | 8080 |
|
7951 | 8081 | Exercises are all about:
|
|
0 commit comments