Skip to content

Instantly share code, notes, and snippets.

@sklam
sklam / raytracing.py
Last active May 25, 2021 05:14 — forked from rossant/raytracing.py
Numba optimized raytracing. From 23seconds to 9seconds.
from __future__ import print_function, division
from timeit import default_timer as timer
import numpy as np
import matplotlib.pyplot as plt
from numba import njit
w = 400
h = 300
@sklam
sklam / numba.ipynb
Last active August 29, 2015 14:21 — forked from astrojuanlu/numba.ipynb
Update notebook to numba 0.18.2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# -*- coding: utf-8 -*-
"""
Test and wrapper script for simulator core functions.
To recompile the C++ library type ! ./make.sh from the ipython console and restart
the ipython kernel.
"""
import os
import sys
path = os.path.dirname(os.path.realpath(__file__))
sys.path.append(path + '/..')