简体   繁体   English

id 字段(例如 jupyter notebook 中的“wound-transition”)来自哪里,它是什么意思?

[英]Where does the id field, eg “wound-transition” in a jupyter notebook come from and what does it mean?

If you look at the raw JSON of a jupyter notebook (python in this case), each cell has a field labeled "id", and they seem to be made up of hyphenated random word pairs, and are often rather funny.如果您查看 jupyter 笔记本(在本例中为 python)的原始 JSON,每个单元格都有一个标记为“id”的字段,它们似乎由连字符的随机单词对组成,而且通常很有趣。 A couple random examples:几个随机的例子:

 "id": "rough-girlfriend",
 "id": "wound-transition"
 "id": "orange-biography"
 "id": "mediterranean-viking",

I've done some googling but I can't seem to find any information on these fields?我已经进行了一些谷歌搜索,但似乎找不到有关这些字段的任何信息? What do they mean?他们的意思是什么? Where do they come from?他们来自哪里? How are they generated?它们是如何产生的?

Any info much appreciated.非常感谢任何信息。

Essentially, it seems they are meant to provide human-readable cell identifiers.从本质上讲,它们似乎旨在提供人类可读的单元标识符。 There is a longer explanation of the need for such fields in the enhancement proposal . 增强提案中对这些字段的需要进行了更长的解释。 The document also points to the exact implementation in nbformat .该文档还指出nbformat中的确切实现。

They are quite funny, as they are made of a random noun and a random adjective.它们很有趣,因为它们是由一个随机名词和一个随机形容词组成的。 I personally find them rather annoying though, as they tend to change unexpectedly, making git diffs ugly.不过,我个人觉得它们很烦人,因为它们往往会出乎意料地改变,使 git 差异变得丑陋。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM