Skip to content

Instantly share code, notes, and snippets.

View steve-s's full-sized avatar

Stepan Sindelar steve-s

View GitHub Profile
@steve-s
steve-s / metaclass-issue.c
Created February 23, 2022 17:12
metaclass-wo-basicsize-issue
#include <Python.h>
#include <structmember.h>
typedef struct {
PyHeapTypeObject super;
int meta_magic;
int meta_member;
char some_more[64];
} DummyMeta;
@steve-s
steve-s / gist:d0440cabd986a51852d25d159b9c3f59
Created October 8, 2018 08:58
raytracing volcano dataset in R
# Code taken from article: http://www.tylermw.com/throwing-shade/
# Author: Tyler Morgan-Wall
# License: GPLv3
volcanoshadow = matrix(1, ncol = ncol(volcano), nrow = nrow(volcano))
volc = list(x=1:nrow(volcano), y=1:ncol(volcano), z=volcano)
sunangle = 45 / 180*pi
angle = -90 / 180 * pi
diffangle = 90 / 180 * pi