After installing jax, run with:
git clone https://gist.github.com/jackd/99e012090a56637b8dd8bb037374900e
cd 99e012090a56637b8dd8bb037374900e
python dirty_test.py
"""Basic Susceptible-Infectious-Recovered model.""" | |
import numpy as np | |
import matplotlib.pyplot as plt | |
def run( | |
infectious: int, | |
r0=1.07, # base daily growth rate | |
vax_rate=0, | |
init_vax_prop=0, |
After installing jax, run with:
git clone https://gist.github.com/jackd/99e012090a56637b8dd8bb037374900e
cd 99e012090a56637b8dd8bb037374900e
python dirty_test.py
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Diff to HTML by rtfpessoa</title> | |
<!-- | |
Diff to HTML (template.html) | |
Author: rtfpessoa | |
--> |
Get my forked tensorflow graphics repo and switch to appropriate branch
git clone https://github.com/jackd/graphics.git
cd graphics
git checkout sparse-feastnet
pip install -e .
cd ..
Get this gist:
import trimesh | |
import numpy as np | |
def fix_visual(visual): | |
from PIL import Image | |
if isinstance(visual, trimesh.visual.ColorVisuals): | |
return | |
material = visual.material | |
assert(hasattr(material, 'image')) |
import trimesh | |
trimesh.load('./rabbit.obj') |
from __future__ import absolute_import | |
from __future__ import division | |
from __future__ import print_function | |
import numpy as np | |
try: | |
from PIL import Image | |
except ImportError: | |
Image = None |
layers.Dense.kernel_regularizer = @regularizers.l2() | |
regularizers.l2.l = 1e-4 |