Skip to content

Instantly share code, notes, and snippets.

View mlagunas's full-sized avatar
🏄‍♂️
Coding

Manuel mlagunas

🏄‍♂️
Coding
View GitHub Profile
@mlagunas
mlagunas / compile_mistuba.sh
Last active December 13, 2023 18:07
Compile mitsuba in less than 10 minutes
# 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 / hdrihaven_download_hdris.py
Last active June 29, 2021 16:28
Downloads hdris from the website https://hdrihaven.com/hdris/. It allows to select a category and resolution.
# 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 / lz4.py
Created October 21, 2019 10:04
Read and write lz4 files
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
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 July 25, 2017 10:52
Comparison between SGD using L2 regularization, standard momentum, Nesterov momentum and ADAM
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.