How to enable timing magics for every cell in Jupyter notebook?
问题 The %%time and %%timeit magics enable timing of a single cell in a Jupyter or iPython notebook. Is there similar functionality to turn timing on and off for every cell in a Jupyter notebook? This question is related but does not have an answer to the more general question posed of enabling a given magic automatically in every cell. 回答1: A hacky way to do this is via a custom.js file (usually placed in ~/.jupyter/custom/custom.js ) The example of how to create buttons for the toolbar is