Skip to content

Instantly share code, notes, and snippets.

@openoms
Last active December 11, 2018 12:00
Show Gist options
  • Save openoms/c090c32272f7288441947dc5ab13447e to your computer and use it in GitHub Desktop.
Save openoms/c090c32272f7288441947dc5ab13447e to your computer and use it in GitHub Desktop.
jupyter notebook
command palette: ctrl + shift + F
pressing escape puts you in command mode, which allows you to easily create/delete/move cells
to run: shift + enter
delete cell -> d, d
undo -> z
add cell above -> a
add cell below -> b
from PIL import Image
img = Image.open("alice.png")
# This won't work
img.show()
# This will work
from IPython.display import display
display(img)
# corrected in readme
14:07: if you have windows instead of source venv/bin/activate it will be .\venv\Scripts\activate.bat
Errata:
33:53 I forgot a `return` in the last line of `handle_user_input`.
It should be `return handle_user_input(user_input)` not `handle_user_input(user_input)`
40:00 `ls | grep "coin.pngcoin"` won't work on Windows.
Do this instead:
import os
def file_exists(filename):
return os.path.isfile(filename)
file_exists("bobs.pngcoin")
After installing and running WSL and Xming ( https://sourceforge.net/projects/xming/ )
the magic command to be added to WSL was: `export DISPLAY=127.0.0.1:0.0`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment