From c5639e3b026528c76687902dde9d0d221b276fff Mon Sep 17 00:00:00 2001 From: abregman Date: Tue, 22 Oct 2019 17:30:04 +0300 Subject: [PATCH] Add a couple of new questions --- README.md | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 88 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4a9ebec..fce5d3b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ :information_source:  This repository contains interview questions on various DevOps related topics -:bar_chart:  There are currently **382** questions +:bar_chart:  There are currently **399** questions :warning:  You don't need to know how to answer all the questions in this repo. DevOps is not about knowing all :) @@ -34,7 +34,7 @@ Go
Go

Beginner :baby:
Bash
Shell Scripting

Beginner :baby:
Advanced :star: kubernetes
Kubernetes

Beginner :baby:
- Prometheus
Prometheus

Beginner :baby:
+ Prometheus
Prometheus

Beginner :baby:
Advanced :star:
Mongo
Mongo

Beginner :baby:
sql
SQL

Beginner :baby:
Advanced :star: OpenShift
OpenShift

Beginner :baby:
@@ -1835,7 +1835,7 @@ Generally, every compiling process have a two steps. Write a program which will revert a string (e.g. pizza -> azzip)
``` -Shortest way is str[::-1] but not the most efficient. +Shortest way is str[::-1] but not the most efficient. "Classic" way: @@ -1850,6 +1850,10 @@ for char in 'pizza': +
+Write a function to return the sum of one or more numbers. The user will decide how many numbers to use.
+
+
How to merge two sorted lists into one sorted list?
@@ -1877,13 +1881,28 @@ for char in 'pizza': with open('file.txt', 'w') as file: file.write("My insightful comment") ``` -
How to reverse a file?
+#### Regex + +
+How do you perform regular expressions related operations in Python? (match patterns, substitute strings, etc.)
+ +Using the re module +
+ +
+How to substitute the string "green" with "blue"?
+
+ +
+How to find all the IP addresses in a variable? How to find them in a file?
+
+
Sort a list of lists by the second item of each nested list
@@ -1894,6 +1913,10 @@ sorted(x, key=lambda l: l[1]) ```
+
+Can you write a function which will print all the file in a given directory? including sub-directories
+
+
You have the following list: [{'name': 'Mario', 'food': ['mushrooms', 'goombas']}, {'name': 'Luigi', 'food': ['mushrooms', 'turtles']}] Extract all type of foods. Final output should be: {'mushrooms', 'goombas', 'turtles'}
@@ -1953,6 +1976,10 @@ def reverse_string(string): Explain data serialization and how do you perform it with Python
+
+How do you handle argument parsing in Python?
+
+
Explain what is GIL
@@ -1973,6 +2000,10 @@ def reverse_string(string): How to reverse a list?
+
+What empty return returns?
+
+ ##### Time Complexity
@@ -2038,6 +2069,21 @@ def reverse_string(string): ## Prometheus + +#### :baby: Beginner + +
+What is Prometheus? What its benefits?
+
+ +
+Describe Prometheus architecture
+
+ +
+Can you compare Prometheus to other solutions like Zabbix for example?
+
+
Describe the following Prometheus components: @@ -2050,10 +2096,33 @@ Push gateway is used for short-lived jobs
Alert manager is responsible for alerts ;)
+
+What core metrics types Prometheus supports?
+
+
What is an exporter? What is it used for?
+
+How to get total requests in a given period of time?
+
+ + +#### :star: Advanced + +
+How do you join two metrics?
+
+ +
+How to write a query that returns the value of a label?
+
+ +
+How do you convert cpu_user_seconds to cpu usage in percentage?
+
+ ## Git @@ -2136,6 +2205,15 @@ This page explains it the best: https://git-scm.com/docs/merge-strategies git diff
+
+How do you revert a specific file to previous commit?
+ +``` +git checkout HEAD~1 -- /path/of/the/file +``` +
+ + #### :star: Advanced @@ -2177,6 +2255,12 @@ The result is the same, a variable with the value 2. with var x int = 2 we are setting the variable type to integer while with x := 2 we are letting Go figure out by itself the type. +
+True or False? In Go we can redeclare variables and once declared we must use it. + +False. We can't redeclare variables but yes, we must used declared variables. +
+
What libraries of Go have you used?