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.
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).
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
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.