小编Yif*_*ngt的帖子

jupyter 和 jupyter-notebook 有什么区别

我注意到conda 在Ubuntu 18.04.1 LTS中的桌面上安装了两个命令jupyterjupyter-notebook,它们都位于python 3.6.7下,我通过以下方式检查了它们的版本:

$ jupyter --version
# 4.4.0
$ jupyter-notebook --version
# 5.7.4
Run Code Online (Sandbox Code Playgroud)

通过命令的帮助信息,我得到:

$ jupyter-notebook --help
  The Jupyter HTML Notebook.
  This launches a Tornado based HTML Notebook Server that serves up an
  HTML5/Javascript Notebook client.

$ jupyter --help
  usage: jupyter [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir]
        [--paths] [--json]
        [subcommand]
   Jupyter: Interactive Computing
Run Code Online (Sandbox Code Playgroud)

谷歌了一段时间,找不到任何关于两者之间区别的讨论,尽管帮助信息告诉我一个是服务器,另一个是交互式计算,这对我来说还不够。去了Jupyter网站,但找不到任何关于版本和两者之间差异的描述。
如果有人能为我详细说明,我将不胜感激:
1)它们彼此有何不同;
2)并阐明版本号不同的原因;虽然它们似乎做着同样的工作,因为两者都从浏览器中
弹出笔记本界面。
多谢!

python server jupyter jupyter-notebook

5
推荐指数
1
解决办法
1523
查看次数

在 python 中与 open() 一起使用后,打开的文件如何无法通过eek(0)倒回

当我尝试在 python 中逐行打印文件内容时,如果文件是通过with open("file_name") as f打开的,则无法通过f.seek(0)倒回打开的文件来打印内容: 但是,如果我使用open("file_name") as f: then f.seek(0) ,我可以做到这一点

以下是我的代码

with open("130.txt", "r") as f:             #f is a FILE object
    print (f.read())                        #so f has method: read(), and f.read() will contain the newline each time 

f.seek(0)                             #This will Error!
with open("130.txt", "r") as f:       #Have to open it again, and I'm aware the indentation should change  
for line in f:                    
    print (line, end="")          

f = open("130.txt", "r")
f.seek(0)
for line in f: …
Run Code Online (Sandbox Code Playgroud)

python file seek

3
推荐指数
1
解决办法
1543
查看次数

如何获取R的辅助函数的C/C++源代码?

我想知道获取 R 中任何辅助函数(以区别于原始/内部函数)的 C/C++ 源代码的正确方法是什么。\n相关问题在这里这里这里这里

\n\n

我的不同,所以我在问题中使用了“次要”。\n例如,R控制台中的read.table()函数我得到:

\n\n
>?read.table\n\nread.table                package:utils                R Documentation\n\nData Input\n\nDescription:\n\n     Reads a file in table format and creates a data frame from it,\n     with cases corresponding to lines and variables to fields in the\n     file.\n\nUsage:\n     read.table(file, header = FALSE, sep = "", quote = "\\"\'",\n        ......\n
Run Code Online (Sandbox Code Playgroud)\n\n

或者

\n\n
> getAnywhere(read.table)\nA single object matching \xe2\x80\x98read.table\xe2\x80\x99 was found\nIt was found in the following places\n  package:utils\n …
Run Code Online (Sandbox Code Playgroud)

c c++ r function

2
推荐指数
1
解决办法
209
查看次数

标签 统计

python ×2

c ×1

c++ ×1

file ×1

function ×1

jupyter ×1

jupyter-notebook ×1

r ×1

seek ×1

server ×1