Exemplo n.º 1
0
def upgrade(url=None):
	from .auth import get_config_file
	if not url:
		if 'http' not in get_config_file()['offline_url']:
			raise Exception("No default offline URL set \n"
							"Please run cf.set_config_file(offline_url=xx) to set \n"
							"the default offline URL.")
		else:
			url=get_config_file()['offline_url']
	py_offline.download_plotlyjs(url)
Exemplo n.º 2
0
def nb_setup_plotly_cufflinks():
    from plotly.offline import download_plotlyjs, init_notebook_mode
    import cufflinks
    download_plotlyjs("https://cdn.plot.ly/plotly-latest.min.js")
    init_notebook_mode()
    cufflinks.go_offline()