3 ms·
You were talking about replacing the terminal with notebooks, I assumed you meant for terminal tasks. If you are using notebooks for notebook coding tasks then
by remram 2y ago
You were talking about replacing the terminal with notebooks, I assumed you meant for terminal tasks.
If you are using notebooks for notebook coding tasks then fine but what does that have to do with tmux?
- slt2021 2y agoThere are two ways to run shell commands: 1. Jupyter has terminals feature in addition to notebook (New->Terminal instead of New->Notebook). You can run any number of terminal sessions, they will be persisten like tmix and each open in separate browser window. They are also shareable and easy to collab, so you can toss the terminal URL to your colleague to let him continue where you left off, or let him monitor stdout as you run some long running process. 2. You can run shell command and capture its output in python var inside jupyter cell with “!” macro, for example: files = !ls *.csv This allows you to mix&match and interleave bash and python and store intermediate data in variables, instead of pipes files = !ls *.csv pd.concat([pd.read_csv(x) for x in files]).MyColname.value_counts().to_frame().to_csv(“summary.csv”) Just one sample I just used today: This code merge all csv files (and will correctly merge even if column names are random order in diff files), and group by one field and save stats. This is more readable and maintainable than bash oneliners and magic with awk and more powerful Things like read cav, json, write parquet, any manipulation with data, both local and remote is a breeze and I dont feel like constrained by bash syntax. Most importantly code is readable and maintainable
- remram 2y agoI see, you're using the JupyterLab Terminal as a terminal, I misread. Apologies.