激情久久久_欧美视频区_成人av免费_不卡视频一二三区_欧美精品在欧美一区二区少妇_欧美一区二区三区的

腳本之家,腳本語(yǔ)言編程技術(shù)及教程分享平臺(tái)!
分類導(dǎo)航

Python|VBS|Ruby|Lua|perl|VBA|Golang|PowerShell|Erlang|autoit|Dos|bat|

服務(wù)器之家 - 腳本之家 - Python - 使用Atom支持基于Jupyter的Python開(kāi)發(fā)教程詳解

使用Atom支持基于Jupyter的Python開(kāi)發(fā)教程詳解

2021-12-23 00:09harrylyx Python

這篇文章主要介紹了使用Atom支持基于Jupyter的Python開(kāi)發(fā),Vscode雖然說(shuō)也有連接Jupyter的工具,但是交互式的開(kāi)發(fā)Hydrogen體驗(yàn)更好,需要的朋友可以參考下

有關(guān)于使用atom進(jìn)行python開(kāi)發(fā)的網(wǎng)上資料比較少,最近發(fā)現(xiàn)使用atom結(jié)合hydrogen插件進(jìn)行python開(kāi)發(fā),尤其是數(shù)據(jù)挖掘相關(guān)的工作,整體體驗(yàn)要好于vscode,vscode雖然說(shuō)也有連接jupyter的工具,但是交互式的開(kāi)發(fā)hydrogen體驗(yàn)更好。

這里放了個(gè)動(dòng)圖來(lái)展示一下hydrogen的強(qiáng)大

使用Atom支持基于Jupyter的Python開(kāi)發(fā)教程詳解

插件安裝

python

  • hydrogen
  • atom-ide-ui
  • ide-python 

這里要注意,本地的pip需要 安裝 python-language-server[all],在ide-python的readme中有詳細(xì)說(shuō)明

遠(yuǎn)程連接

  • remote ftp
  • 美化
  • simplified-chinese-menu(漢化補(bǔ)丁)
  • file-icons(文件夾圖標(biāo))
  • bracket-colorizer(彩虹括號(hào),找了好久,確定就是必須配合暗色主題)
  • atom-bracket-highlight(括號(hào)高亮)
  • atom-clock(加個(gè)時(shí)鐘在右下角)
  • highlight-selected(高亮選擇)
  • minimap(類似sublime的右側(cè)map欄)
  • minimap-highlight-selected(選擇代碼后,map上也高亮,方便定位代碼)

插件配置

remote ftp

這里先講一下我的需求,我是需要利用其連接公司服務(wù)器上的內(nèi)容,但是公司服務(wù)器是需要跳板機(jī)的,所以我需要通過(guò)跳板機(jī)才能訪問(wèn),因此配置上會(huì)有些復(fù)雜

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
    "protocol": "sftp",
    "host": "跳板機(jī)域名", // string - hostname or ip address of the server. default: 'localhost'
    "port": 跳板機(jī)端口, // integer - port number of the server. default: 22
    "user": "用戶名", // string - username for authentication. default: (none)
    "pass": "如果用密鑰這里就不用填", // string - password for password-based user authentication. default: (none)
    "promptforpass": false, // boolean - set to true for enable password/passphrase dialog. this will prevent from using cleartext password/passphrase in this config. default: false
    "remote": "實(shí)際的服務(wù)器目錄,例如:/服務(wù)器域名/用戶名/目錄", // try to use absolute paths starting with /
    "agent": "", // string - path to ssh-agent's unix socket for ssh-agent-based user authentication. linux/mac users can set "env" as a value to use env ssh_auth_sock variable. windows users: set to 'pageant' for authenticating with pageant or (actual) path to a cygwin "unix socket." default: (none)
    "privatekey": "本地私鑰path", // string - absolute path to the private key file (in openssh format). default: (none)
    "passphrase": "", // string - for an encrypted private key, this is the passphrase used to decrypt it. default: (none)
    "hosthash": "", // string - 'md5' or 'sha1'. the host's key is hashed using this method and passed to the hostverifier function. default: (none)
    "ignorehost": true,
    "conntimeout": 10000, // integer - how long (in milliseconds) to wait for the ssh handshake to complete. default: 10000
    "keepalive": 10000, // integer - how often (in milliseconds) to send ssh-level keepalive packets to the server (in a similar way as openssh's serveraliveinterval config option). set to 0 to disable. default: 10000
    "keyboardinteractive": 如果要用動(dòng)態(tài)令牌,這里就要填true, // boolean - set to true for enable verifycode dialog. keyboard interaction authentication mechanism. for example using google authentication (multi factor)
    "keyboardinteractiveforpass": false, // boolean - set to true for enable keyboard interaction and use pass options for password. no open dialog.
    "remotecommand": "",
    "remoteshell": "",
    "watch":[],
    "watchtimeout":500, // integer - the duration ( in milliseconds ) from when the file was last changed for the upload to begin.
}

ide-python

需要配置一下python executable

填寫(xiě)你的python路徑,比如使用的是conda虛擬環(huán)境,就這樣寫(xiě)

/xxx/anaconda3/envs/xxx/bin/python

hydrogen

連接本地kernel

首先需要在上面填寫(xiě)的路徑下的python環(huán)境中安裝ipykernel

python -m ipykernel install --user --name py37

然后用atom打開(kāi)一個(gè)py文件,輸入

# %%
print('hello atom')

# %%
print('每一個(gè)# %%代表一個(gè)新的cell')

然后再第2行末尾按ctrl+enter就會(huì)自動(dòng)彈出來(lái)讓你選擇環(huán)境的彈窗,選擇剛剛新建的環(huán)境即可

使用Atom支持基于Jupyter的Python開(kāi)發(fā)教程詳解

然后在hydrogen里面通過(guò)使用# %%來(lái)分割每一個(gè)cell,在mac中使用option+shift+enter組合鍵來(lái)實(shí)現(xiàn)運(yùn)行當(dāng)前整個(gè)ceil,使用command+enter實(shí)現(xiàn)運(yùn)行當(dāng)前行,使用shift+enter實(shí)現(xiàn)運(yùn)行當(dāng)前行并跳轉(zhuǎn)下一行,具體可參考官方文檔

連接遠(yuǎn)程kernel

連接遠(yuǎn)程的jupyter只需要配置一下hydrogen設(shè)置里面的kernel gateways,填上如下內(nèi)容即可

?
1
2
3
4
5
6
[{"name": "remote server",
  "options": {
    "baseurl": "jupyter url",
    "token": "jupyter token"
  }
}]

然后點(diǎn)擊connect to remote kernel即可

使用Atom支持基于Jupyter的Python開(kāi)發(fā)教程詳解

到此這篇關(guān)于使用atom支持基于jupyter的python開(kāi)發(fā)的文章就介紹到這了,更多相關(guān)atom基于jupyter的python開(kāi)發(fā)內(nèi)容請(qǐng)搜索服務(wù)器之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持服務(wù)器之家!

原文鏈接:https://www.cnblogs.com/harrylyx/p/15166101.html

延伸 · 閱讀

精彩推薦
主站蜘蛛池模板: www.av520| 日韩激情 | 亚洲va久久久噜噜噜久久男同 | 美国av在线免费观看 | 日韩av在线播放一区 | 视频一区二区三区在线 | 特级毛片全部免费播放器 | 久草在线免费看 | 久久久久电影网站 | 久草最新 | 色av成人天堂桃色av | 中文字幕一区二区三区久久 | 极品五月天 | 日韩色视频在线观看 | 亚洲第一成人在线观看 | 麻豆小视频在线观看 | 精品国产一区二区三区久久久狼牙 | 在线免费观看日韩视频 | 超碰97人人艹 | 91性高湖久久久久久久久网站 | 久久99精品久久久久久小说 | 久久精品国产精品亚洲 | 久久亚洲春色中文字幕久久 | 亚洲综合精品 | 91热久久免费频精品黑人99 | 爱操影视 | 色污视频在线观看 | 亚洲一区成人在线 | 日本精品一区二区 | 国产免费黄色 | 免费视频a | 国产porn在线 | 成人做爰高潮片免费视频韩国 | 亚洲精品有限 | 亚洲骚综合 | 青青草好吊色 | 国产精品一区二区三区99 | 美女黄视频在线观看 | 国产激情视频在线 | 日韩视频区 | 国产精品一区2区3区 |