- Putting together conditionals and loops in functions
- Reading files
- Writing a function
- Text clean up
- Writing results to a file
- Click the following link and save the Jupyter notebook file. It works differently for different computers. You could right click this link here and choose "Save Link As" or you might click through on the link and select the "download" icon in the upper right of the page or choose
File>Save Page As
but be sure you are working with a file that has .ipynb as a suffix. In all cases, move the file tosharedfolder
on your desktop. Karsdorp, Chapter 2: First Steps - The exercise calls for some data files that you'll need to have in your
sharedfolder
too. You can get these from the Github repository: https://github.com/fbkarsdorp/python-course/tree/master/data by clicking on the file you need, selectingraw
and thensave as
onto your computer. You can also use Wget, a free software package for scraping files but we're not doing that until next week! note: your first command says your file is indata/austen-emma-excerpt.txt
, but is it?? You may have to edit the location . . .
In macOS, open Terminal and enter the following commands to launch the Docker container:
docker rm -f pcda_ubuntu
docker pull pcda17/ubuntu-container
docker run --name pcda_ubuntu -ti -p 8889:8889 --volume ~/Desktop/sharedfolder/:/sharedfolder/ pcda17/ubuntu-container
In Windows 10, open PowerShell and enter the following commands to launch the Docker container:
docker rm -f pcda_ubuntu
docker pull pcda17/ubuntu-container
docker run --name pcda_ubuntu -ti -p 8889:8889 --volume C:\Users\***username_here***\Desktop\sharedfolder:/sharedfolder/ pcda17/ubuntu-container
Open any browser and type (your Juypter Notebook will launch):
localhost:8889