5 ms·
I used to use tmux, but then switched completely jupyter terminals. my browser is my terminal now, and I can easily upload/download files via browser (dont typ
by slt2021 2y ago
I used to use tmux, but then switched completely jupyter terminals.
my browser is my terminal now, and I can easily upload/download files via browser (dont type SCP anymore) with a mouse click, open terminal windows, open Python notebook and do stuff.
life has never been easier after I completely switched to jupyter notebooks+terminals
plus, because it is browser based, I can roam from multiple devices.
- remram 2y agoDoesn't the notebook store outputs locally? Wouldn't it get out of sync when changing device? Also cells can be out of order and overwritten and such. Seems like a questionable fit.
- slt2021 2y agoI use remote notebook and just connect to it. The key to out of order problem is simple: once a piece of code works - save it in .py module and import it. Very little discipline is required to achieve significant productivity gain. That way notebook is always clean and tidy and always resembles a “pseudo code”, with implementation detail hidden in modules (that were tested and are working).
- remram 2y agoYou 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.
- deleted 2y ago[deleted]