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 / app.py
Created May 20, 2020 02:03
A gist copy of my PyCon talk.
import streamlit as st
import pandas as pd
st.title("A Careful Walk Through Probability Distributions with Python")
st.markdown("""
_By Eric J. Ma, for PyCon 2020_
Hey there! Thanks for stopping by.
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.
@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 / strip_metadata.py
Created June 5, 2015 16:48
A Python script for stripping out metadata from a PDF file.
import os
from PyPDF2 import PdfFileReader, PdfFileMerger
files_dir = os.getcwd()
if 'stripped' not in os.listdir(files_dir):
os.mkdir('stripped')
for f in os.listdir(files_dir):
@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)