Skip to content

Instantly share code, notes, and snippets.

View abdelkrim-bsr's full-sized avatar

Abdelkrim Bouasria abdelkrim-bsr

View GitHub Profile
@mortcanty
mortcanty / semantic_segmentation.ipynb
Last active July 2, 2024 14:50
Semantic_Segmentation.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Q1. Are all the latest release versions of tidyverse and tidymodels packages already using cpp11?

All tidyverse packages that used Rcpp have been converted except for readxl and lubridate. We plan to finish converting the remainder of the packages in the next 6 months.

Q2. C++20 brings a lot of exciting features to the language, do you plan to also add a {cpp20} package too?

I agree! It is possible, but it would not be for at least 5 to 7 years from now, if ever. Compiler support and availablity often lags the language specifications significantly. However you can definitely use C++20 features with cpp11 in your package today if you like!

Q3. So writable:: is like not using const& in Rcpp?

@hakimabdi
hakimabdi / MKtrend.R
Last active January 5, 2024 00:49
This function performs a Mann-Kendall trend test with associated p-values on a time seris of gridded satellite data
#############################################################################################
# title : Perform a Mann-Kendall trend test of satellite image time series
# purpose : Mann-Kendall test of monotonic trend and associated statistical significance
# author : Abdulhakim Abdi (@HakimAbdi)
# input : Raster stack/brick comprising a time series of observations
# output : Raster object of monotoic trend (Kendall's tau), significance or both (i.e. brick)
# data : Test data: https://1drv.ms/u/s!AsHsKb_qtbkwg4ti8pJCxvUer9rMqg?e=BGcH1K
# notes : Depending on the time series, it is might be useful prewhiten the data to remove serial correlation
# : prior to extracting the trend. See blog post on www.hakimabdi.com for more information.
#############################################################################################
@jscarto
jscarto / pansharpen.js
Last active July 19, 2022 02:45
Pan-sharpen and display a Landsat 8 scene in Google Earth Engine
// Band combinations
var natural = ['B4', 'B3', 'B2'];
var swir = ['B6', 'B5', 'B3'];
var urban = ['B7', 'B6', 'B4'];
var veg = ['B5', 'B4', 'B3'];
// Get a Landsat scene
var scene = ee.Image('LANDSAT/LC8_L1T_TOA/LC80450332015263LGN00');
// Convert the RGB bands to the HSV