Skip to content

Instantly share code, notes, and snippets.

View mikedh's full-sized avatar

Michael Dawson-Haggerty mikedh

View GitHub Profile
@mikedh
mikedh / bump.py
Created January 28, 2018 19:18
quick script to do version bumps
import sys
import numpy as np
file_name = 'trimesh/version.py'
if __name__ == '__main__':
with open(file_name, 'r') as f:
text = f.read()
split = text.split("'")
@mikedh
mikedh / headless.py
Created December 15, 2017 19:20
Manual pyglet event loop headless rendering
import pyglet
import pyglet.gl as gl
import numpy as np
import os
import tempfile
import subprocess
import collections
@mikedh
mikedh / rtree_stream_check
Created July 18, 2015 19:26
rtree stream issue
import numpy as np
import rtree
import time
def random_tree_stream(points_count, include_object):
properties = rtree.index.Property()
properties.dimension = 3
points_random = np.random.random((points_count,3,3))
points_bounds = np.column_stack((points_random.min(axis=1),