如何在IPython Notebook中隐藏一个特定的单元格(输入或输出)中提到的建议?不工作
在Windows上,请执行以下操作
jupyter nbconvert a.ipynb --TagRemovePreprocessor.remove_cell_tags="{'remove_cell'}"
Run Code Online (Sandbox Code Playgroud)
但出现错误
traitlets.traitlets.TraitError: The 'remove_cell_tags' trait of a TagRemovePreprocessor instance must be a set, but a value of type 'unicode' (i.e. u"{'remove_cell'}") was specified.
Run Code Online (Sandbox Code Playgroud)
我也尝试过'{“ remove_cell”}'
我正在使用nbconvert 5.4.0
任何想法如何做到这一点?
我读了一个二进制文件,得到一个带字符的数组.当我将两个字节转换为整数时256*ord(p1) + ord(p0).它适用于正整数但是当我得到负数时它不起作用.我知道在最重要的字节中有第一位但是没有成功.
我也明白有一些东西叫做struct,在阅读后我最终得到了以下代码
import struct
p1 = chr(231)
p0 = chr(174)
a = struct.unpack('h',p0+p1)
print str(a)
Run Code Online (Sandbox Code Playgroud)
a变成-6226,如果我换掉p0,p1我得到-20761.
a 应该是-2