This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
download.file("https://native-land.ca/wp-content/themes/NLD-2021/files/indigenousTerritories.json",destfile="indigenousTerritories.json",method="libcurl") | |
iTerr <- geojsonsf::geojson_sf("indigenousTerritories.json") | |
plot(iTerr["Name"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias r="radian" | |
alias docker-compose='docker compose' | |
alias cdg="cd git" | |
alias cdn="cd Nextcloud" | |
alias c="code ." | |
alias n="nautilus ." | |
alias kubectl="microk8s kubectl" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vascan_lookup <- function(search) { | |
ress <- "http://data.canadensys.net/vascan/api/0.1/search.json" | |
if(length(search) == 1L){ | |
return(httr::GET(ress, query = list(q = search))) | |
} else { | |
responses <- list() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Parallelize linear regressions using 4 nodes | |
# Open an interactive job | |
# with the following command line | |
# salloc --time=1:0:0 --ntasks=100 | |
#0. Packages loading | |
library(doParallel) | |
#1. Init the cluster of SOCKETS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script to create empty files in the specified folder. | |
if [ -z "$1" ]; then | |
echo "Enter the destination folder as a parameter." | |
exit | |
elif [ ! -d "$1" ]; then | |
echo "No such folder." | |
exit | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use_xft yes | |
xftfont Ubuntu Condensed:size=9 | |
xftalpha 0.8 | |
override_utf8_locale yes | |
update_interval 5.0 | |
total_run_times 0 | |
own_window yes | |
own_window_transparent no | |
own_window_argb_visual yes | |
own_window_argb_value 155 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -n "Export folder empty or full (yes or no) ? " | |
read POST | |
echo -n "Import on remote or local server? " | |
read CON | |
TRAIT=~/Documents/QUICC_FOR/Climat_data_trait/ | |
EXPORT=~/Documents/QUICC_FOR/Climat_data_trait/Export_climat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Niche-Food Web Model - Williams et Martinez | |
#### Parameters | |
# S = Number of trophic species | |
# C = Network connectance [0,0.5[ | |
nicheFW <- function(S,C){ | |
### Model |