Comments (6)
以及可以学习vscode的jupyter插件,把内核管理啥的全都隐藏起来,用户只要选择python所在的路径,随后就能在当前页面直接运行代码块这样是最简单的,让用户无感知,只专注于上手就用。
可能的实现方法:
开一个笔记页面就新开一个jupyter内核,关闭页面就关闭内核。
用child_process.spawn,直接执行 /path/to/jupyter/python.exe -m jupyter lab --port={random} --args
(以及其他的设定参数都能在这里传过去,不用手动设定config.py),然后当前页面直接去和这个命令行产生的jupyter内核去连接。
关闭页面就传两个ctrl+c的命令给刚刚开启的kernel即可
现在的插件有点做成jupyter lab的感觉了,内核管理啥的都在,还需要手动配置token啥的,上手成本很高
from siyuan-plugin-jupyter-client.
感觉可以考虑一下
- 每次运行都会增加一个---分割线,反复运行会导致分割线不停的增长
这个是思源的问题, 使用 F5 刷新一下文档就显示正常了
用child_process.spawn,直接执行 /path/to/jupyter/python.exe -m jupyter lab --port={random} --args (以及其他的设定参数都能在这里传过去,不用手动设定config.py),然后当前页面直接去和这个命令行产生的jupyter内核去连接。
一般 jupyter 服务都是位于虚拟环境中的, 而且不同内核位于不同的虚拟环境中, 无法简单启动
现在的插件有点做成jupyter lab的感觉了,内核管理啥的都在,还需要手动配置token啥的,上手成本很高
目的就是连接第三方的 Jupyter 服务, 根据我的观察, 大多都是连接实验室服务器这种, 连接本机服务这种不多见
from siyuan-plugin-jupyter-client.
每次运行都会增加一个---分割线,反复运行会导致分割线不停的增长
这个是思源的问题, 使用 F5 刷新一下文档就显示正常了
或许可以不用分割线来分隔,光是代码块不同的字体颜色已经挺明显的了
或者通过块的自定义属性来给它加上border-top和border-bottom的样式,来进行区分
from siyuan-plugin-jupyter-client.
或许可以不用分割线来分隔,光是代码块不同的字体颜色已经挺明显的了
或者通过块的自定义属性来给它加上border-top和border-bottom的样式,来进行区分
分割线主要是用来锚定块插入位置的, 因为 jupyter 输出事件的派发是异步的, 因此在更新时只能锚定一个已存在的块
from siyuan-plugin-jupyter-client.
目的就是连接第三方的 Jupyter 服务, 根据我的观察, 大多都是连接实验室服务器这种, 连接本机服务这种不多见
有条件或者精力的话,还是建议参考一下vscode的jupyter插件逻辑,本地python、本地kernal、远程jupyter都支持连接,并且把这个过程简化了,每个笔记本右上角有个选择kernel下拉菜单,简单的选一下就可以直接使用了。
https://code.visualstudio.com/docs/datascience/jupyter-kernel-management
以及具体kernal实现的方式在wiki中有说明:https://github.com/microsoft/vscode-jupyter/wiki/Kernels-(Architecture)
from siyuan-plugin-jupyter-client.
有条件或者精力的话,还是建议参考一下vscode的jupyter插件逻辑,本地python、本地kernal、远程jupyter都支持连接,并且把这个过程简化了,每个笔记本右上角有个选择kernel下拉菜单,简单的选一下就可以直接使用了。 https://code.visualstudio.com/docs/datascience/jupyter-kernel-management
以及具体kernal实现的方式在wiki中有说明:https://github.com/microsoft/vscode-jupyter/wiki/Kernels-(Architecture(架构))
您是不是有点太看得起我的水平了 [手动发抖]
from siyuan-plugin-jupyter-client.
Related Issues (7)
- bug: 使用非python内核会导致内核错误 HOT 4
- 快捷键修改 HOT 1
- 请教怎么运行 HOT 4
- 新年快乐!求大佬出个详细的配置教程 HOT 1
- 在新标签中打开Jupyter 403 : Forbidden The error was: XSRF cookie does not match POST argument
- 怎么连接会话 HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from siyuan-plugin-jupyter-client.