Skip to content

Instantly share code, notes, and snippets.

View david-macleod's full-sized avatar

David MacLeod david-macleod

View GitHub Profile
@david-macleod
david-macleod / bokeh_audio_player.py
Last active February 18, 2023 17:39 — forked from nathanielatom/bokeh_audio_player.py
Custom Bokeh Model for audio playback (not so useful on its own; meant to be integrated with plot interactions).
# Forked from nathanielatom, updated to work with typescript and bokeh==1.3.4
from bokeh.layouts import column, layout
from bokeh.models import CustomJS, Model, LayoutDOM
from bokeh.document import Document
from bokeh.models.widgets import Button, Slider, Toggle
from bokeh.core.properties import Instance, String
from bokeh.io import save, output_file, show
from bokeh.util.compiler import TypeScript
from fontawesome.fontawesome_icon import FontAwesomeIcon as Icon
# Requires https://github.com/bokeh/bokeh/tree/master/examples/custom/font-awesome