Live coding discussion

Generally speaking I wouldn’t use pip if there’s an up-to-date conda package available, except for specialised situations like doing an editable install.

5 Likes

That sounds like a very sensible solution.

4 Likes

I’m thinking of putting time-stamp on the Youtube video for easy search, as there are some really useful and practical tips. Is the Youtube Live video the final version?

2 Likes

Is it only next week Tuesday to Friday, or all weeks, till before the next session at the end of June?

You’re really kind, Jeremy! Thanks a million - sure, will do that… will all the video recordings be posted here, in this post? Pinned at the top?

Oooh ! that’s going to be pretty hard to join in live, 3AM here. will have to be happy with the recordings.

3 Likes

I was just catching up on the recordings. Seems like the resolution maxes out at 720p, perhaps something that can be bumped up at 1080p or so for the next ep. ? Hopefully possible with the Zoom → YT integration.

2 Likes

Hi @jeremy
Is there any special setup needed to run headless jupyter notebooks on Paperspace or does paperspace allow running notebooks /jupyter-lab directly

Its been a while I used paperspace :slight_smile: I am assuming my local 1080-Ti setup should still work fine but paperspace will be backup
Thanks

Do you see place for pipx for ML workflow. I used pipx for installing python packages as system wide tools. For example i can install black with pipx in similar way as i install with brew on mac. So then black is available also if I’m not in conda env.

HI Alok, you can get a free account on paperspace ,when I created my free account with $10 GPU credit, I was able to create a gradient notebook and it can be run as jupyter-lab (not paperspace own notbook) over the internet. I’m not sure if this is your question, but paperspace has a support team and a very extensive documentation/help section as well if you need to do something fancy with their platform.

How would this be different than installing “globally needed” packages in a base conda env?

The only reason I want to use conda/mamba is to separate all the conflicting package dependency issues because disk is cheap and life is short :smiley:

If you have multiple conda envs, then you have to install the same package in multiple envs. with pipx you only do it once and it’s available from all envs. but I agree that it can get messy to figure out later which package was installed where, conda env or pipx.

edit: just to clarify pipx is more for cli tools install I think, it’s similar to brew on mac, brew installs from it’s repository of packages, pipx installs from pypi.

1 Like

In my experience, these are some of the useful command-line (readline) keybindings. I usually remap CAPSLOCK key to CONTROL key as it’s easier to reach and I never used CAPSLOCK key i think.
This list includes things Jeremy mentioned in the video. These may be too much if you just starting, so pick the ones Jeremy said only.

Ctrl-a Move to the start of the current line.
Ctrl-e Move to the end of the line.
Ctrl-f Move forward a character.
Ctrl-b Move back a character.
Alt-f Move forward to the end of the next word. Words are alphanumeric.
Alt-b Move back to the start of the current or previous word. Words are alphanumeric.
Ctrl-l Clear the screen.

Ctrl-p Fetch the previous command from the history list (same as up but easier to reach).
Ctrl-n Fetch the next command from the history list (same as down).
Ctrl-r Search backward through history.

Ctrl-d Delete the character under the cursor.

Ctrl-k Kill (cut) forwards to the end of the line.
Ctrl-u Kill (cut) backwards to the start of the line.
Alt-d Kill (cut) forwards to the end of the current word.
Ctrl-w Kill (cut) backwards to the start of the current word.

Tab Autocomplete.

14 Likes

I really found it useful to remap my CAPSLOCK key to CTRL on macOS especially when using Emacs. Speaking of which, I’d also like to point out that these bindings above are “Emacs bindings” and if someone wanted to use vi/vim type commands to edit their bash command line (hjkl as arrow keys, x to delete, dd to remove the whole line etc,) you’d need to do ‘set -o vi’ or equivalent for your shell. But I wouldn’t do that as a beginner to shell commandline, stick with the stuff Jeremy is teaching for now and you can play with it after getting comfortable with the shell.

1 Like

I can’t recommend this enough, you will be amazed at how much time you can win by knowing your terminal shortcuts to move around your terminal commands. I do a good share of pair-programming on a weekly basis and most of people out there will just keep pressing arrow keys to move around, so I always suggest colleagues to look into this kind of shortcuts. Practice this deliberately, it is a good investment :).

6 Likes

Quick question for WSL/Ubuntu combination setup. How do you back up your code/documents then please? Are we going to back up everything to private repos in GitHub?

Just to confirm I understood the bash/terminal difference correctly, would they be considered bash key bonds or are they part of the terminal functionality please?

Great session. Waiting for the next one!

Those are bash bindings. They should be the same for zsh. They’re actually borrowed from an editor called emacs, and are used for most command-line programs on Linux and Mac nowadays. For instance, they should work fine in ipython too.

4 Likes

I’ve posted the walkthru-1 HD recording, link to session chat thread, and link to next session Zoom in the top post of this topic.

6 Likes