Skip to content

Instantly share code, notes, and snippets.

View NBrown140's full-sized avatar

Nicolas Brown NBrown140

  • Overstory
  • Montreal, Canada
View GitHub Profile
@NBrown140
NBrown140 / download_aw3d30.sh
Last active June 21, 2023 15:24
Download full AW3D30 v3.2 dataset
#!/bin/bash
# Script to download all the tiles of the AW3D30 v3.2 dataset
download () {
# I've noticed that non-existing tiles return a 302 response code.
# I assume all the tiles with data have a url that returns 200 response code.
local url=https://www.eorc.jaxa.jp/ALOS/aw3d30/data/release_v2012/$1
echo Cheking $url
local respcode=$(curl -o /dev/null --silent -Iw '%{http_code}' $url)
echo Response code: $respcode
@NBrown140
NBrown140 / gradient_descent.py
Created August 12, 2020 02:57
Gradient descent implementation on arbitrary 2d function
import math as m
import matplotlib.pyplot as plt
import numpy as np
from tqdm import tqdm
x_init, y_init = -1.6, -0.09
alpha = 0.0001
N = 100000