This project is part of the Vivo challenge for new developers. It consists of 3 challenges, as follows: Note: See ./subject for more details.
Given values from 0 to 15, generate a statistic of its occurrence in a bitmap image (which can be represented by an M x N matrix), as shown in the following figure:- This challenge was developed in python v3.6.9.
- Script: prova_desenvolvedores_4p_1.py
- To run: $ python3 prova_desenvolvedores_4p_1.py
- Requirements: python v3.x instaled
******To run unit tests:
- go to ./unit_tests
- To run: run py.test to run all tests. (unit_tests)$ py.test (Or py.test name_of_file.py to run a particular test.)
- Note Requirements: You must have pytest installed on your machine. See https://docs.pytest.org/en/stable/ for instructions:
- Requirements: pytest instaled
- $ python3 -m pip install -U pytest
Transform the previous algorithm into a Rest API.
- Input parameter: list with the values
- Output: output of the algorithm in JSON format.
This API was developed on Flask Framework.
- Script: prova_desenvolvedores_4p_2.py
- To run: $python3 prova_desenvolvedores_4p_2.py
- In your browser, go to http://127.0.0.1/5000/ and follow the instructions. Or, for short, type the previous url followed by the space-separated values.
- Requirements: To run the script it is necessary to have Flask framework installed:
- $ python3 -m pip install flask
Note about input:
- Values must be between 0 and 15,
- separated by spaces.
- Other characters are not accepted, as well as values outside the range.
Develop an API that reads a log file and returns the following information: (See ./subject)
- Arrival Position,
- Superhero Code,
- Superhero Name,
- Amount of Completed laps and
- Total race time. Script: prova_desenvolvedores_4p_3.py
- Requirements:To run the script it is necessary to have pandas and numpy installed.
- $ python3 -m pip install pandas
- $ python3 -m pip install numpy
work in process