Skip to content

Instantly share code, notes, and snippets.

View OtacilioN's full-sized avatar
🤩
Leading AprendiZAP to become the best educational platform in Brazil

Otacilio Maia OtacilioN

🤩
Leading AprendiZAP to become the best educational platform in Brazil
View GitHub Profile
@OtacilioN
OtacilioN / gist:de50ede531560174b3c446e465119f8a
Last active August 26, 2024 01:44
Script Modalidade Artística OBR
{
const castedScores = scores.map((score) => parseInt(score || 0, 10));
const max = castedScores[1] > castedScores[2] ? castedScores[1] : castedScores[2];
const score = castedScores[0]+max;
const sum_palco = castedScores[1] + castedScores[2];
return [score, sum_palco, castedScores[3]*-1];
}
9a0238df-e627-412b-a34b-229ea07cc9e4
9a023979-a634-4d57-9d17-41e8ce9ae6d4
@OtacilioN
OtacilioN / equacao.xyz
Created August 20, 2023 12:57
Resumidor de pontos tcc raul
This file has been truncated, but you can view the full file.
774885.547 9006514.407 721.816
774878.682 9006514.353 721.728
774878.682 9006512.775 721.606
774878.682 9006436.881 711.349
774878.682 9006415.46 710.451
774878.682 9006411.414 710.425
774878.682 9006257.665 710.972
774878.682 9006217.295 715.482
774878.682 9006170.704 718.001
/*
* File: segue_linha.c
* Date:
* Description:
* Author:
* Modifications:
*/
/*
* You may need to add include files like <webots/distance_sensor.h> or
@OtacilioN
OtacilioN / werobot.c
Created March 22, 2021 13:02
werbot_p_follow
/*
* File: segue_linha.c
* Date:
* Description:
* Author:
* Modifications:
*/
/*
* You may need to add include files like <webots/distance_sensor.h> or
@OtacilioN
OtacilioN / const.js
Last active January 25, 2021 03:18
Sabia que você não precisa usar let em todos estes casos?
const pessoa = {};
const fila = [{nome: "Otacilio Maia", idade: "24"}];
pessoa.nome = "Antônio fakersom";
pessoa.idade = "42";
pessoa.frase = "JavaScript é super legal";
fila.push(pessoa);
fila[0].frase = "E tudo faz sentido";
@OtacilioN
OtacilioN / main.c
Created November 19, 2020 12:41
STM32 LM35
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
* All rights reserved.</center></h2>
@OtacilioN
OtacilioN / main.c
Created November 10, 2020 01:00
cubeide spi communication
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
* All rights reserved.</center></h2>
# Veja a descrição do problema em https://www.thehuxley.com/problem/790
def mochila(capacidade, lista_pesos, lista_valores, tamanho_lista):
matriz_solucao = [[0 for x in range(capacidade + 1)]
for x in range(tamanho_lista + 1)]
for item in range(tamanho_lista + 1):
for peso in range(capacidade + 1):
if item == 0 or peso == 0:
matriz_solucao[item][peso] = 0
elif lista_pesos[item-1] <= peso:
@OtacilioN
OtacilioN / stm32_hal_minimum.c
Created October 8, 2020 12:39
STM32 Com uso de Hal functions
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
* All rights reserved.</center></h2>