♻️ rename and update python snippets

This commit is contained in:
dannydannydanny 2022-02-01 12:10:09 +01:00 committed by GitHub
parent 760536d750
commit 6de7721e46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 9 deletions

View file

@ -1,9 +0,0 @@
# Python Kernel Management
```
# install new kernel "my_new_env"
ipykernel install --user --name=my_new_env
# remove kernel "my_old_env"
jupyter kernelspec list
jupyter kernelspec remove my_old_env
```

22
python_snippets.md Normal file
View file

@ -0,0 +1,22 @@
## Python Kernel Management
```
# install new kernel "my_new_env"
ipykernel install --user --name=my_new_env
# remove kernel "my_old_env"
jupyter kernelspec list
jupyter kernelspec remove my_old_env
```
## Sound snippet
Add the snippet to the end of your notebook to alert you when it's done running.
```
from IPython.display import Audio, display
# https://www2.cs.uic.edu/~i101/SoundFiles/
url1 = 'https://www2.cs.uic.edu/~i101/SoundFiles/StarWars3.wav'
url2 = 'https://sound.peal.io/ps/audios/000/000/537/original/woo_vu_luvub_dub_dub.wav'
url3 = 'https://www2.cs.uic.edu/~i101/SoundFiles/CantinaBand3.wav'
display(Audio(url=url3, autoplay=True))
```