This commit is contained in:
abregman 2020-12-10 08:56:48 +02:00
parent dd93c45a8d
commit 061f1ef6ff

View File

@ -2,7 +2,7 @@
:information_source:  This repo contains questions and exercises on various technical topics, sometimes related to DevOps and SRE :) :information_source:  This repo contains questions and exercises on various technical topics, sometimes related to DevOps and SRE :)
:bar_chart:  There are currently **1353** questions :bar_chart:  There are currently **1359** questions
:busts_in_silhouette:  [Join](https://www.facebook.com/groups/538897960007080) our [Facebook group](https://www.facebook.com/groups/538897960007080) for additional 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) for additional exercises, articles and more resources on DevOps
@ -106,16 +106,12 @@ Red Hat:
<details> <details>
<summary>What are the benefits of DevOps? What it can help us to achieve?</summary><br><b> <summary>What are the benefits of DevOps? What it can help us to achieve?</summary><br><b>
You should mention some or all of the following:
* Collaboration * Collaboration
* Improved delivery * Improved delivery
* Security * Security
* Speed * Speed
* Scale * Scale
* Reliability * Reliability
Make sure to elaborate :)
</b></details> </b></details>
<details> <details>
@ -5092,6 +5088,10 @@ SOLID is:
<summary>Explain big O notation</summary><br><b> <summary>Explain big O notation</summary><br><b>
</b></details> </b></details>
<details>
<summary>What is "Duck Typing"?</summary><br><b>
</b></details>
##### Common algorithms ##### Common algorithms
<details> <details>
@ -5916,6 +5916,20 @@ some_dict1.update(some_dict2)
``` ```
</b></details> </b></details>
<details>
<summary>Convert the string "a.b.c" to the dictionary <code>{'a': {'b': {'c': 1}}}</code></summary><br><b>
```
output = {}
string = "a.b.c"
path = string.split('.')
target = reduce(lambda d, k: d.setdefault(k, {}), path[:-1], output)
target[path[-1]] = 1
print(output)
```
</b></details>
##### Common Algorithms Implementation ##### Common Algorithms Implementation
<details> <details>
@ -6299,7 +6313,7 @@ What would be the result of is_int(2) and is_int(False)?
</summary><br><b> </summary><br><b>
</b></details> </b></details>
##### Data Structures & Types #### Python Data Structures & Types
<details> <details>
<summary>Implement Stack in Python</summary><br><b> <summary>Implement Stack in Python</summary><br><b>
@ -6309,7 +6323,7 @@ What would be the result of is_int(2) and is_int(False)?
<summary>Implement Hash table in Python</summary><br><b> <summary>Implement Hash table in Python</summary><br><b>
</b></details> </b></details>
##### Python Testing #### Python Testing
<details> <details>
<summary>What is your experience with writing tests in Python?</summary><br><b> <summary>What is your experience with writing tests in Python?</summary><br><b>
@ -6396,8 +6410,62 @@ list(zip(range(5), range(50), range(-2)))
``` ```
</b></details> </b></details>
#### Misc #### Python Descriptors
<details>
<summary>Explain Descriptors</summary><br><b>
Read about descriptors [here](https://docs.python.org/3/howto/descriptor.html)
</b></details>
<details>
<summary>What would be the result of running <code>a.num2</code> assuming the following code
```
class B:
def __get__(self, obj, objtype=None):
reuturn 10
class A:
num1 = 2
num2 = Five()
```
</summary><br><b>
10
</b></details>
<details>
<summary>What would be the result of running <code>some_car = Car("Red", 4)</code> assuming the following code
```
class Print:
def __get__(self, obj, objtype=None):
value = obj._color
print("Color was set to {}".format(valie))
return value
def __set__(self, obj, value):
print("The color of the car is {}".format(value))
obj._color = value
class Car:
color = Print()
def __ini__(self, color, age):
self.color = color
self.age = age
```
</summary><br><b>
An instance of Car class will be created and the following will be printed: "The color of the car is Red"
</b></details>
#### Python Misc
<details>
<summary>How can you spawn multiple processes with Python?</summary><br><b>
</b></details>
<details> <details>
<summary>Implement simple calculator for two numbers</summary><br><b> <summary>Implement simple calculator for two numbers</summary><br><b>
@ -6599,10 +6667,6 @@ a = f()
<summary>Explain the Buffer Protocol</summary><br><b> <summary>Explain the Buffer Protocol</summary><br><b>
</b></details> </b></details>
<details>
<summary>Explain Descriptors</summary><br><b>
</b></details>
<details> <details>
<summary>Do you have experience with web scraping? Can you describe what have you used and for what?</summary><br><b> <summary>Do you have experience with web scraping? Can you describe what have you used and for what?</summary><br><b>
</b></details> </b></details>