Skip to content

Instantly share code, notes, and snippets.

Avatar
🏄‍♂️
Coding

Manuel mlagunas

🏄‍♂️
Coding
View GitHub Profile
@mlagunas
mlagunas / hdrihaven_download_hdris.py
Last active Jun 29, 2021
Downloads hdris from the website https://hdrihaven.com/hdris/. It allows to select a category and resolution.
View hdrihaven_download_hdris.py
# FIRST do: pip install beautifulsoup4 tqdm requests fake-useragent urllib3
#
import requests
import os
from sys import argv
from bs4 import BeautifulSoup
from urllib.parse import urlparse
from urllib.request import urlretrieve
from urllib.request import URLopener
@mlagunas
mlagunas / compile_mistuba.sh
Last active Jun 2, 2022
Compile mitsuba in less than 10 minutes
View compile_mistuba.sh
# go to the dir where you will download the source files
cd ...
# download the source files
git clone https://github.com/mitsuba-renderer/mitsuba
# go into the mitsuba folder
cd mitsuba
# copy the config file to build
@mlagunas
mlagunas / lz4.py
Created Oct 21, 2019
Read and write lz4 files
View lz4.py
import lz4.block
import numpy as np
__header_sample = {
'desc': b'LANT_IMG_CODING\x00',
'width': np.array(1024, dtype=np.uint32), # uint32_t
'height': np.array(1024, dtype=np.uint32), # uint32_t
'row_stride_in_byte': np.array(4096, dtype=np.uint32), # uint32_t
'pixel_format': np.array(2, dtype=np.uint32), # pixel_format
'color_space': np.array(0, dtype=np.uint32), # color_space
View ejercicio_corto.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mlagunas
mlagunas / SGD_comparison.ipynb
Last active Jul 25, 2017
Comparison between SGD using L2 regularization, standard momentum, Nesterov momentum and ADAM
View SGD_comparison.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.