Skip to content

Instantly share code, notes, and snippets.

View KristoforMaynard's full-sized avatar

Kristofor Maynard KristoforMaynard

View GitHub Profile
@KristoforMaynard
KristoforMaynard / iembedmedia.py
Created August 19, 2015 16:15
Embed raw media in an ipython notebook
# -*- coding: utf-8 -*-
"""Embed raw media in an ipython notebook
The point of embedding raw media is that one can save as html, and
the media will automatically be embedded in the result.
Installation:
Place in ~/.ipython/extensions/, or wherever your extensions live.
Note: If the notebook server is not local, then embedding media may
@KristoforMaynard
KristoforMaynard / imayavi.py
Last active June 6, 2019 08:45
Mayavi tools for ipython notebooks
# -*- coding: utf-8 -*-
"""Make Mayavi plots inline to ipython notebooks
Imports mayavi and mlab and adds them to interpreter namespace. Loading
this extension also sets up inline matplotlib (aka `%matpotlib inline`)
and sets offscreen rendering on linux.
Note:
Offscreen rendering on OS X doesn't seem to work, but on linux,
inline plots don't work without offscreen rendering. "Don't work"