class DataTablesHTMLJinjaTableBlock(HTMLJinjaTableBlock): resource_deps = [ Css("css/jquery-dataTables"), JScript("jquery"), JScript("jquery-dataTables"), JScript("jquery-dataTables-impl") ] def __init__(self, df, formatters=None, use_default_formatters=False, paging=True, searching=True, info=True, **kwargs): if formatters is None and use_default_formatters is False: formatters = [ DataTablesCSSClass(paging, searching, info), fmt_fontsize_12, fmt_table_center, fmt_align_cells, fmt_align_header_index, fmt_header_index_bold, fmt_page_break, fmt_decimals_2 ] super(DataTablesHTMLJinjaTableBlock, self).__init__(df, formatters, use_default_formatters, **kwargs)
def __init__(self, contents, **kwargs): """ Writes out the content as raw text or HTML. :param contents: Bokeh plotting figure. :param kwargs: Optional styling arguments. The `style` keyword argument has special meaning in that it allows styling to be grouped as one argument. It is also useful in case a styling parameter name clashes with a standard block parameter. """ self.resource_deps = [ JScript(script_string=s, name='bokeh_js') for s in JSResources().js_raw ] self.resource_deps += [ Css(css_string=s, name='bokeh_css') for s in CSSResources().css_raw ] super(BokehPlotBlock, self).__init__(**kwargs) if not isinstance(contents, BokehFigure): raise ValueError( "Expected bokeh.plotting.figure.Figure type but got %s", type(contents)) script, div = components(contents) self._contents = script + div
"B8": 62, "B9": 33, "B10": 31, "C5E": 163, "Comm10E": 105, "DLE": 110, "Executive": 190.5, "Folio": 210, "Ledger": 431.8, "Legal": 215.9, "Letter": 215.9, "Tabloid": 279.4 } default_css_main = Css(os.path.join("css", "pybloqs_default", "main")) register_interactive(default_css_main) ID_PRECISION = 10 class BaseBlock(object): """ Base class for all blocks. Provides infrastructure for rendering the block in an IPython Notebook or saving it to disk in HTML, PDF, PNG or JPG format. """ container_tag = "div" resource_deps = [] def __init__(self, title=None, title_level=3, title_wrap=False, width=None, height=None, inherit_cfg=True,