jupyter_utils.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:snowballing 作者: JoaoFelipe 项目源码 文件源码
def display_cell(text):
    """Remove cells that start with "# Temp" and add a new one

    Arguments:

    * `text` -- new cell content

    """
    encoded_code = bytes_to_str(base64.b64encode(str_to_bytes(text)))
    display(Javascript("""
        $('span:contains("# Temp")').closest('.cell').remove();
        var code = IPython.notebook.insert_cell_{0}('code');
        code.set_text(atob("{1}"));
    """.format('below', encoded_code)))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号