Skip to content

Instantly share code, notes, and snippets.

View kaiomagalhaes's full-sized avatar
🦑
Hunting giant octopuses

Kaio Magalhães kaiomagalhaes

🦑
Hunting giant octopuses
View GitHub Profile
@kaiomagalhaes
kaiomagalhaes / python_exercise.md
Last active September 25, 2024 20:15
Python Backend Engineer live coding

Exercise Title: News Aggregator with Data Submission

Objective:

Create a small application (it can be an API or a single file) that fetches the latest news articles on a user-specified topic and then submits selected article data to another API endpoint.

Requirements:

API Integration - Fetching Data:

const opcua = require("node-opcua");
const { MongoClient } = require("mongodb");
// MongoDB configuration with your provided URI
const mongoUrl = "YOUR_MONGO_URL;
const dbName = "YOUR_DB_NAME"; // Database name, adjusted to match your URI
const collectionName = "lux"; // Collection name for storing lux values
(async () => {
// Initialize OPC UA server

Instructions

The goal of this exercise is to create a backend using C# using the REST arquitecture.

The Task

In this task, we are building backend of an application that helps us managing our team.

Features and Requirements

@kaiomagalhaes
kaiomagalhaes / exercise.md
Created September 13, 2023 18:23
Rails exercise

Instructions

The goal of this exercise is to create both the backend and frontend of a calendar application using Ruby on Rails.

The Task

In this task we are building a single month view of a calendar for the current month. Here you have the design we are expecting for this task.

Features & Requirements:

  • Reminder
// button
import React from "react";
import { Button as MUIButton } from "@mui/material";
import styles from "./styles";
interface ButtonProps {
onClick: () => void;
children: React.ReactNode;
className?: string;
variant?: "contained" | "outlined";
Dockerfile
```
FROM node:17-alpine as development
WORKDIR /app
COPY package.json .
COPY package-lock.json .
RUN npm install
COPY . .
Questions
- Considering this scenario, how would you store device data in the database? given that the API does not allow 1000 requests per second, and devices do not have direct access to the database;
- Which databases would be considered? Why? given the scenario where we only care about the last day (however, we need to keep the data history for analysis)
- How would you store the analytical data? which database? (no need to worry about calculations)
- How would you return analytics data to dashboards? (no need to worry about calculations)
'\n<svg xmlns="http://www.w3.org/2000/svg" style="display:none"><symbol id="logo-text-svg" viewBox="0 0 100 100"><path d="M61.2 81.8c1.1-1.2 1.5-2.6 1.5-4.7c0-2-0.4-3.3-1.4-4.5c-1.1-1.2-2.4-1.8-4.2-1.8c-3.3 0-5.5 2.6-5.5 6.4 c0 3.9 2.2 6.4 5.5 6.4C59 83.5 60.3 82.9 61.2 81.8z M58.6 73.7c0.4 0.6 0.7 1.6 0.7 3.3c0 2.9-0.6 4.1-2 4.1c-0.6 0-1.3-0.3-1.6-1 c-0.3-0.6-0.4-1.7-0.4-3.1c0-1.2 0.1-2.1 0.3-2.7c0.3-0.8 0.9-1.2 1.7-1.2C57.8 73.1 58.3 73.3 58.6 73.7z M76.8 83.2L80.4 71H77 l-0.9 4.4c-0.3 1.6-0.6 3.5-0.7 4c0 0-0.4-2.1-0.9-4.3l-1-4.1h-3l-1.2 4.1c-0.6 2.1-0.9 4.3-0.9 4.3S68 77 67.7 75.5l-1-4.6h-3.3 l3.4 12.3h3l0.6-2.5c0.3-1.1 0.8-3.3 1.1-4.3c0.2-0.9 0.2-1.1 0.3-1.6c0.1 0.5 0.1 0.6 0.2 1.2c0.1 0.8 0.4 2 0.7 3l1.1 4.2H76.8z M45.8 83.2h3.3l0-17.7l-3.3 0.7L45.8 83.2z M39.4 83.2h3.3l0-17.7l-3.3 0.7L39.4 83.2z M33 83.3h3.2l0-11.5L33 72.5L33 83.3z M34.6 71c1.1 0 2-0.9 2-2c0-1.1-0.9-2-2-2c-1.1 0-2 0.9-2 2C32.7 70.2 33.6 71 34.6 71z M30 83.2l0.9-2.7h-5.6l-1.4 0 c0 0 0.3-0.5 0.6-1.1l6.4-11.1v-2.4h-10L20 68.7h5.2c1 0 1.4 0
@kaiomagalhaes
kaiomagalhaes / file.md
Last active May 16, 2022 18:36
JLL - Senior FullStack Engineer - Pro

.Net/Core

  1. How does the .NET framework work? .NET framework-based applications that are written in supportive languages like C#, F#, or Visual basic are compiled to Common Intermediate Language (CIL). Compiled code is stored in the form of an assembly file that has a .dll or .exe file extension. When the .NET application runs, Common Language Runtime (CLR) takes the assembly file and converts the CIL into machine code with the help of the Just In Time(JIT) compiler. Now, this machine code can execute on the specific architecture of the computer it is running on.
  2. What is .NET core? .NET Core can be said as the newer version of the .NET Framework. It is a cost-free, general-purpose, open-source application development platform provided by Microsoft. It is a cross-platform framework because it runs on various operating systems such as Windows, Linux, and macOS. This Framework can be used to develop applications like mobile, web, IoT, machine learning, game, cloud, microservices, etc. It consists of impor

Instructions

Parse and evaluate simple math word problems returning the answer as an integer.

Iteration 0 — Numbers

Problems with no operations simply evaluate to the number given.

What is 5?