Skip to content

Commit

Permalink
Add a couple of Python questions
Browse files Browse the repository at this point in the history
  • Loading branch information
abregman committed Jan 31, 2020
1 parent dcabc81 commit ae99012
Showing 1 changed file with 54 additions and 14 deletions.
68 changes: 54 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

:information_source:  This repo contains questions and exercises on various technical topics, sometimes related to DevOps and SRE :)

:bar_chart:  There are currently **854** questions
:bar_chart:  There are currently **864** questions

: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

Expand Down Expand Up @@ -993,14 +993,6 @@ A three-way handshake is primarily used to create a TCP socket connection. It wo
TCP establishes a connection between the client and the server to guarantee the order of the packages, on the other hand, UDP does not establish a connection between client and server and doesn't handle package order. This makes UDP more lightweight than TCP and a perfect candidate for streaming services.
</b></details>

<details>
<summary>True or False? TCP is better than UDP</summary><br><b>

False.
UDP is faster, simpler and more efficient than TCP

</b></details>

<details>
<summary>What TCP/IP protocols are you familiar with?</summary><br><b>
</b></details>
Expand Down Expand Up @@ -2432,10 +2424,6 @@ def cap(self, string):
<summary>You would like to run a task only if previous task changed anything. How would you achieve that?</summary><br><b>
</b></details>

<details>
<summary>How do you test your Ansible based projects?</summary><br><b>
</b></details>

<details>
<summary>What are callback plugins? What can you achieve by using callback plugins?</summary><br><b>
</b></details>
Expand Down Expand Up @@ -2473,6 +2461,16 @@ Gotenks = 32
```
</b></details>

#### Ansible Testing

<details>
<summary>How do you test your Ansible based projects?</summary><br><b>
</b></details>

<details>
<summary>What is Molecule? How it works?</summary><br><b>
</b></details>

## Terraform

<a name="terraform-beginner"></a>
Expand Down Expand Up @@ -3691,7 +3689,7 @@ some_dict1.update(some_dict2)
[Solution](coding/python/binary_search.py)
</b></details>

#### Files
#### Python Files

<details>
<summary>How to write to a file?</summary><br><b>
Expand All @@ -3714,10 +3712,48 @@ with open('file.txt', 'w') as file:
<summary>Sum all the integers in a given file</summary><br><b>
</b></details>

<details>
<summary>Print a random line of a given file</summary><br><b>
</b></details>

<details>
<summary>Print every 3rd line of a given file</summary><br><b>
</b></details>

<details>
<summary>Print the number of lines in a given file</summary><br><b>
</b></details>

<details>
<summary>Print the number of of words in a given file</summary><br><b>
</b></details>

<details>
<summary>Can you write a function which will print all the file in a given directory? including sub-directories</summary><br><b>
</b></details>

#### Python OS

<details>
<summary>How to print current working directory?</summary><br><b>
</b></details>

<details>
<summary>Given the path <code>/dir1/dir2/file1</code> print the file name (file1)</summary><br><b>
</b></details>

<details>
<summary>Given the path <code>/dir1/dir2/file1</code> print the name of the directory where the file resides (dir2)</summary><br><b>
</b></details>

<details>
<summary>Given the path <code>/dir1/dir2/file1</code> print the path without the file name (/dir1/dir2)</summary><br><b>
</b></details>

<details>
<summary>How do you execute shell commands using Python?</summary><br><b>
</b></details>

#### Python Regex

<details>
Expand Down Expand Up @@ -5730,6 +5766,10 @@ The most used projects are the Elasticserach, Logstash and Kibana. Also known as
5. The user creates a dashboard which composed out of the visualization created earlier
</b></details>

<details>
<summary>You are running an app which outputs several log files (without timestamps). What do you do in order to process the information they include and display it in Kibana? you can ask for additional information if required for answering this question</summary><br><b>
</b></details>

##### Elasticsearch

<details>
Expand Down

0 comments on commit ae99012

Please sign in to comment.