interview

Created 3 years ago
Maintained by jnsamyak
This repository is created within regards to go smoothly through hiring process.
Members 1
Samyak Jain committed 3 years ago

Interview

This repository is created within regards to go smoothly through hiring process.

Replies to questions

All codes can be found at pagure repo interview under jnsamyak user

Question1:

Development

Write an API (of your choice) in Python framework (of your choice) that accepts
    -> Timezone
    -> Hour
    -> Minute
and converts it in UTC time. (When no parameter is passed, take localtime to convert in UTC)
example:
curl http://127.0.0.1:5000/?tz=Europe/Paris&hr=10&min=5

(you are passing time = 10:05 in Paris)
it should return 08:05 UTC. Please use libraries to convert timezones instead of attempting to write a logic for timezone conversion

Question2:

Working with existing Python code

Download https://github.com/Zlopez/python_interview and follow the README.md for further instructions

Question3:

Describe step by step how would you troubleshoot the following situation? What tools would you use?

Connection to internet is down on your machine.
1. Try to ping to check if there is a connection (can be attained by ping command in linux)
2. Try to check if the router isn't off somehow! If off, switch it on! Reboot the router if it helps.
3. Mostly proxy settings are untouched, changing the proxy settings can disable Internet access
4. nmcli, and nmtui can be used to reconnect to internet.

Question4:

Write down git commands you would use in the following situation.

Use standard git commands available in current version of git.  
   (using `git version 2.31.0`)


1. You have locally cloned fork of project.


2. Remote url for your fork is `git@foo.bar/user/project` and the 
    Remote url of project is `git@foo.bar/project/project`.

    #### To clone the fork of project (a/c to the defined URL):


    git clone ssh://git@foo.bar/user/project.git (using ssh)
    git clone https://git@foo.bar/user/project.git (using https)


3. Your fork master branch is behind project master.

   If our fork's master branch is behind the project's master branch.
   We need to pull our forked repository that can be done using git pull and git fetch, and if there are conflicts then it should be resolved with git checkout.


4. How do you update your fork?
    As decribed above, here are the steps to update the fork:

    cd project/
    git remote add upstream git@foo.bar/project/project
    git fetch upstream
    git pull upstream master