Skip to content

Instantly share code, notes, and snippets.

View ericmjl's full-sized avatar
🎯
Focusing

Eric Ma ericmjl

🎯
Focusing
View GitHub Profile
@ericmjl
ericmjl / preprocess-compile-notebook.ipynb
Created May 3, 2020 13:58
A notebook in which I preprocess and compile multiple Markdown and notebook cells to a single Jupyter notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am ericmjl on github.
  • I am ericmjl (https://keybase.io/ericmjl) on keybase.
  • I have a public key ASDNk9QK4hNKxUF5M9i0NHwP7ndUeUx2SpHYn5jhmavuxgo

To claim this, I am signing this object:

@ericmjl
ericmjl / display.py
Created April 28, 2019 11:51
Custom module that wraps waveshare's e-paper display code.
from PIL import Image
def read_img(fname):
b = Image.open("images/{fname}_b.bmp".format(fname=fname))
r = Image.open("images/{fname}_r.bmp".format(fname=fname))
return b, r
def display(fname, epd):
b, r = read_img(fname)
@ericmjl
ericmjl / preprocess.py
Created April 28, 2019 11:48
Custom python module for preprocessing a png (generated from adobe illustrator) into its constituent red and black channels.
from PIL import Image
import numpy as np
from pathlib import Path
def open(fname):
img = Image.open(fname).resize((384, 640))
return img
def array(img):
@ericmjl
ericmjl / pymc4-dev-environment.yml
Created January 20, 2019 14:14
PyMC4 dev environment spec for conda
name: pymc4-dev
channels:
- defaults
- conda-forge
- ericmjl
dependencies:
- python=3.6
- jupyter
- jupyterlab
- conda
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
============================= test session starts ==============================
platform darwin -- Python 3.6.7, pytest-4.0.2, py-1.7.0, pluggy-0.8.0
rootdir: /Users/ericmjl/github/software/autograd-sparse, inifile:
collected 3 items / 2 deselected
tests/test_sparse.py F [100%]
=================================== FAILURES ===================================
_____________________________ test_sparse_dot_grad _____________________________