Skip to content

Instantly share code, notes, and snippets.

View MathijsdeBoer's full-sized avatar

Mathijs de Boer MathijsdeBoer

  • UMCU
  • Utrecht, The Netherlands
View GitHub Profile
@MathijsdeBoer
MathijsdeBoer / Dockerfile
Created May 20, 2022 08:00
PyTorch3d Dockerfile
# syntax=docker/dockerfile:1
# PyTorch3D supports up to PyTorch 1.11, 22.02 is the last image to use 1.11 before they
# upgrade to 1.12
FROM nvcr.io/nvidia/pytorch:22.02-py3
WORKDIR /app
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Amsterdam
# Get the basic Linux packages upgraded and get the development tools setup
@MathijsdeBoer
MathijsdeBoer / SE_ExtractBlockData.py
Last active January 30, 2020 23:07
Extract all of Space Engineer's blocks' needed components and generate a C# dictionary definition
"""
Extract Block Data for Space Engineers
Author: Czorio
Updated: 2020-01-30 (5)
Tested on: Python 3.7.4-x64
Usage:
Modify the se_path variable to point at your SE install location. Run the script to generate a Dict.txt file in your current directory.
This Dict.txt file should have slightly formatted C# code that declares and initializes a Dictionary for use in SE scripts.
'''
Converts a single heightmap to a tiled heightmap
Usage:
in a CLI/powershell:
> python convert_l3dt_to_ue4.py '<path to input hm>' '<path to output directory' <output size>
Example:
> python convert_l3dt_to_ue4.py 'c:/l3dt/hm.png' 'c:/l3dt/output' 512
'''
@MathijsdeBoer
MathijsdeBoer / Sort_Photos.py
Last active November 30, 2019 16:02
Quickly sort all photos (or files) by modification dates in subdirectories
from __future__ import print_function, division
import os
import shutil
import time
count = 0
unsortable_directory = "unsorted"
print("Sort Photos")