Giter Site home page Giter Site logo

testevivo's Introduction

TesteVivo

This is a technical test for a jr. developer position at Telefônica VIVO. It was also my first contact with Python and with Flask APIs. I chose to work with python for its powerful libraries and tools to work with data, as well as easily accessible documentation.

First Exercise

I interpreted the exercise to have a constant array with numbers from 0 to 15, and variable matrixes. To achieve that, I generate a different matrix every time the program is called, iterate the array through each element of the matrix, and record the number of matches on another array, which will be returned as JSON. The user can input the size of the matrix as a query, allowing for repeated testing.

Second Exercise

I mainly used Pandas' DataFrames to work on this challenge. For the log, since it was part of the original PDF, I assumed it would be input in a plain text format. Each column of the DataFrame is converted to the appropriate data type, and it is then sliced and selected for useful information, which is then processed and stored in dictionaries. The dictionaries were chosen for their key: value structure, which would make the conversion to a JSON output easier.

Setting up a Python Virtual Environment

Create environment:

python3 -m venv ./venv

Activate environment:

source ./venv/bin/activate

Installing depencencies

pip install Flask

pip install numpy

pip install pandas

Running the API

export FLASK_APP=file_name.py

flask run

Resources used for studying

Flask - https://flask.palletsprojects.com/en/1.1.x/

REST API - https://restfulapi.net/

Python Virtual Environment - https://docs.python.org/3/library/venv.html

PIP(Linux) - https://www.tecmint.com/install-pip-in-linux/

Basic Python guide - https://www.w3schools.com/python/default.asp

NumPy guide - https://www.geeksforgeeks.org/python-numpy/

Pandas DataFrame documentation - https://pandas.pydata.org/pandas-docs/stable/reference/frame.html

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.