Skip to content

Instantly share code, notes, and snippets.

View philippjfr's full-sized avatar

Philipp Rudiger philippjfr

View GitHub Profile
row = pn.Row('Empty')
select = pn.widgets.Select(options=['AAPL', …])
def cb(event):
  row[0] = bokeh_fig # Replace a component
select.param.watch(cb, 'value')
ticker = pn.widgets.Select(options=['AAPL', ...])
@pn.depends(ticker.param.value)
def plot(ticker):
...
return plot_obj
pn.Row(ticker, plot)
@philippjfr
philippjfr / interact.py
Created June 2, 2019 15:36
interact.py
def plot(ticker):
...
return plot_object
pn.interact(plot, ticker=['AAPL', ...])
Sorry, this is too big to display.
@philippjfr
philippjfr / BokehFigure.py
Last active March 15, 2021 03:28
Defines a BokehFigure element which allows wrapping bokeh Figures in a HoloMap - BSD-3 License
from holoviews import Element, Store
from bokeh.models import Column
from holoviews.plotting.bokeh import ElementPlot
class BokehFigure(Element):
"""Wraps bokeh figure"""
class BokehFigurePlot(ElementPlot):
def initialize_plot(self, ranges=None, plot=None, plots=None, source=None):
@philippjfr
philippjfr / LICENSE.txt
Created January 24, 2019 01:19
This BSD-3 license applies to all public gists https://gist.github.com/philippjfr
Copyright (c) 2019, Philipp Rudiger
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@philippjfr
philippjfr / export_html.ipynb
Created April 17, 2018 16:59
Testing HTML Export after MIME type changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.