gpt4 book ai didi

python - 如何跳转到 Jupyter Notebook 中当前正在运行的单元格?

转载 作者:太空狗 更新时间:2023-10-30 02:16:24 25 4
gpt4 key购买 nike

在Jupyter笔记本中选择run allrun all aboverun all below后,如何跳转到单元格当前正在运行?

最佳答案

谢谢你的想法,Aaron。但它只能在完整运行时运行一次,因此需要对其进行改进以使其更有用。

我把它扩展成一个快捷方式,可以在笔记本的执行过程中多次使用。

将此添加到 ~/.jupyter/custom/custom.js:

// Go to Running cell shortcut
Jupyter.keyboard_manager.command_shortcuts.add_shortcut('Alt-I', {
help : 'Go to Running cell',
help_index : 'zz',
handler : function (event) {
setTimeout(function() {
// Find running cell and click the first one
if ($('.running').length > 0) {
//alert("found running cell");
$('.running')[0].scrollIntoView();
}}, 250);
return false;
}
});

现在您可以随时按 Alt-I 让笔记本将 View 重新聚焦到正在运行的单元格上。

接下来最好编写一个扩展/快捷方式,使当前运行的单元格的 View 在所有执行过程中始终处于焦点状态。

关于python - 如何跳转到 Jupyter Notebook 中当前正在运行的单元格?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44273643/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com