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 ** 834 ** questions
5
+ :bar_chart :   ; There are currently ** 854 ** questions
6
6
7
7
: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
8
8
60
60
<tr >
61
61
<td align="center"><a href="#testing"><img src="images/testing.png" width="75px;" height="75px;" alt="Testing"/><br /><b>Testing</b></a></td>
62
62
<td align="center"><a href="#databases"><img src="images/databases.png" width="75px;" height="75px;" alt="Databases"/><br /><b>Databases</b></a></td>
63
+ <td align="center"><a href="#regex"><b>Regex</b></a><br /><sub><a href="#regex-beginner">Beginner :baby:</a></sub><br><sub></td>
63
64
<td align="center"><a href="#design"><img src="images/design.png" width="110px;" height="75px;" alt="Design"/><br /><b>Design</b></a></td>
64
65
<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>
65
66
<td align="center"><a href="#exercises"><img src="images/exercises.png" width="110px;" height="75px;" alt="Exercises"/><br /><b>Exercises</b></a></td>
@@ -2166,6 +2167,14 @@ spun up and shut down, without you tracking every change in these sources.
2166
2167
<summary >You want to run Ansible playbook only on specific minor version of your OS, how would you achieve that?</summary ><br ><b >
2167
2168
</b ></details >
2168
2169
2170
+ <details >
2171
+ <summary >What the "become" directive used for in Ansible?</summary ><br ><b >
2172
+ </b ></details >
2173
+
2174
+ <details >
2175
+ <summary >What are facts? How to see all the facts of a certain host?</summary ><br ><b >
2176
+ </b ></details >
2177
+
2169
2178
<details >
2170
2179
<summary >What would be the result of the following play?</summary ><br ><b >
2171
2180
@@ -2184,7 +2193,7 @@ When given a written code, always inspect it thoroughly. If your answer is “th
2184
2193
</b ></details >
2185
2194
2186
2195
<details >
2187
- <summary >What would be the result of running the following task?
2196
+ <summary >What would be the result of running the following task? How to fix it?
2188
2197
2189
2198
```
2190
2199
- hosts: localhost
@@ -2205,6 +2214,18 @@ When given a written code, always inspect it thoroughly. If your answer is “th
2205
2214
<summary >Explain the directory layout of an Ansible role</summary ><br ><b >
2206
2215
</b ></details >
2207
2216
2217
+ <details >
2218
+ <summary >What 'blocks' are used for in Ansible?</summary ><br ><b >
2219
+ </b ></details >
2220
+
2221
+ <details >
2222
+ <summary >How do you handle errors in Ansible?</summary ><br ><b >
2223
+ </b ></details >
2224
+
2225
+ <details >
2226
+ <summary >You would like to run a certain command if a task fails. How would you achieve that?</summary ><br ><b >
2227
+ </b ></details >
2228
+
2208
2229
<details >
2209
2230
<summary >Write a playbook to install ‘zlib’ and ‘vim’ on all hosts if the file ‘/tmp/mario’ exists on the system.</summary ><br ><b >
2210
2231
@@ -2320,10 +2341,10 @@ A full list can be found at the link above. Also, note there is a significant di
2320
2341
<details >
2321
2342
<summary >Write a filter to capitalize a string</summary ><br ><b >
2322
2343
2323
- < code >
2344
+ ```
2324
2345
def cap(self, string):
2325
2346
return string.capitalize()
2326
- </ code >
2347
+ ```
2327
2348
</b ></details >
2328
2349
2329
2350
<details >
@@ -3616,7 +3637,7 @@ with open('file.txt', 'w') as file:
3616
3637
<summary >Can you write a function which will print all the file in a given directory? including sub-directories</summary ><br ><b >
3617
3638
</b ></details >
3618
3639
3619
- #### Regex
3640
+ #### Python Regex
3620
3641
3621
3642
<details >
3622
3643
<summary >How do you perform regular expressions related operations in Python? (match patterns, substitute strings, etc.)</summary ><br ><b >
@@ -6280,6 +6301,44 @@ A single data source (at least usually) which is stored in a raw format.
6280
6301
<summary >What is OLAP (Online Analytical Processing)?</summary ><br ><b >
6281
6302
</b ></details >
6282
6303
6304
+ ## Regex
6305
+
6306
+ Given a text file, perform the following exercises
6307
+
6308
+ #### Extract
6309
+
6310
+ <details >
6311
+ <summary >Extract all the numbers</summary ><br ><b >
6312
+ </b ></details >
6313
+
6314
+ <details >
6315
+ <summary >Extract the first word of each line</summary ><br ><b >
6316
+
6317
+ Bonus: extract the last word of each line
6318
+ </b ></details >
6319
+
6320
+ <details >
6321
+ <summary >Extract all the IP addresses</summary ><br ><b >
6322
+ </b ></details >
6323
+
6324
+ <details >
6325
+ <summary >Extract dates in the format of yyyy-mm-dd or yyyy-dd-mm</summary ><br ><b >
6326
+ </b ></details >
6327
+
6328
+ <details >
6329
+ <summary >Extract email addresses</summary ><br ><b >
6330
+ </b ></details >
6331
+
6332
+ #### Replace
6333
+
6334
+ <details >
6335
+ <summary >Replace tabs with four spaces</summary ><br ><b >
6336
+ </b ></details >
6337
+
6338
+ <details >
6339
+ <summary >Replace 'red' with 'green'</summary ><br ><b >
6340
+ </b ></details >
6341
+
6283
6342
## Design
6284
6343
6285
6344
#### Architecture
0 commit comments