Skip to content

Instantly share code, notes, and snippets.

View OldLipe's full-sized avatar

Felipe Carvalho OldLipe

View GitHub Profile
@OldLipe
OldLipe / bubble_sort.c
Last active May 23, 2018 19:20
Basic example of bubble sort
#include <stdio.h>
int *ordenador(int lista[],int tamanho){
int i,j,aux;
for (i = 0;i<tamanho;i++){
for (j = 1 + i;j<tamanho;j++){
if (lista[i] > lista[j]){
aux = lista[i];
lista[i] = lista[j];
lista[j] = aux;
#'@author Felipe Carvalho and Willian Vieira
#'
#'@see https://www.geeksforgeeks.org/determinant-of-a-matrix/
matriz_exercicio <- matrix(c(-1, 2, 3,-4,
4, 2, 0, 0,-1, 2,-3, 0,
2, 5, 3, 1),
nrow = 4,
ncol = 4) %>% t()
@OldLipe
OldLipe / loop_interchange.c
Created April 29, 2019 19:19
Exemplo de troca de loop em c
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
double mysecond(void)
{
struct timeval tVal;
gettimeofday(&tVal,NULL);
return (double)tVal.tv_sec + 1.0e-6 * (double)tVal.tv_usec;
#'@authors Adriano and Felipe Carvalho
#'
#'@description Maybe this code may convert for any base
#'
#'@param valor value to be converted
#'
#'@param base base for value to to be converted
#'
#'@param base_req the base you want to convert
#'
@OldLipe
OldLipe / example_user_config.yml
Created April 1, 2021 15:53
Example of sits config file
default:
OLI :
bands :
LOCAL : ["ndvi", "evi", "ndwi"]
missing_value :
ndvi : -9999
evi : -9999
ndwi : -9999
@OldLipe
OldLipe / explode_brick.R
Last active May 10, 2024 20:27
How to transform brick to stack
#
# function definition: the params name are intuitive, so just follow the
# example in line 52
#
explode_brick <- function(brick_file, output_dir) {
# stop if the provided brick doesnt exists
stopifnot(file.exists(brick_file))
# reading brick
@OldLipe
OldLipe / Dockerfile
Created July 9, 2021 15:39
example_jupyter_hub
FROM jupyter/scipy-notebook:python-3.9.5
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ed \
less \
locales \
sources:
BDC :
s3_class : ["bdc_cube", "stac_cube", "raster_cube"]
service : "STAC"
url : "http://bdc-ws.dpi.inpe.br/int/stac"
collections :
S2-SEN2COR_10_16D_STK-1: &bdc_s2_sen2cor
bands :
NDVI : &bdc_sen2cor_msi_ndvi
missing_value : -9999
@OldLipe
OldLipe / teste
Created October 26, 2023 17:36
teste
test
@OldLipe
OldLipe / kaggle_inst.md
Created October 27, 2023 02:11
Kaggle instructions

Kaggle is a platform aimed at the community of data science and machine learning practitioners, which includes competitions and challenges on these topics. Kaggle allows its users to find datasets and build models in a Jupyter Notebook environment using Python and R languages. To use the examples on the site, you must have an account at https://www.kaggle.com/.

Once logged in, in the left menu, go to the Notebooks field and create a new one using the New Notebook button.

drawing

An example Notebook will be created. Open the Notebook options box in the right-hand menu and inspect the Internet field.
If it indicates Get phone verified, click on it and verify it with a valid phone number.