Sandbox for practice

I was looking for a way to create a sandbox to practice Python in a way where I would not create havoc on my assignments. I came across “How to get a clean copy of an assignment notebook”.
Before trying this I wondered if it is possible for me to ensure that the copy could not be submitted accidentally, and if it would be possible for me to take out all the notes and advice so that I had a clear view of the code progression.
I ask in advance so that I do not screw up something crucial or common to all users. :innocent:

1 Like

Hi, Ian.

For starters, each student’s assignments are completely separate. Whatever you do can only help or hurt you, it will have to effect on anyone else. So no worries there, but I salute your concern for the welfare of other participants!

It’s a fine idea to clone copies of any of the notebooks to do experiments. Just start from the standard notebook and click “File → Make a Copy”. Then you can rename that as appropriate. Note that the grader will only ever grade the “official” notebook, which is the one opened by the “Work in Browser” link. Normally you will only see the “Submit Assignment” button when you’re running the “real” notebook, but sometimes it can remain after a “rename”. Clicking it in a renamed copy will grade the “real” notebook. So as long as you are careful not to rename any of your experimental notebooks to the “official” name, it should not interfere with your interactions with the grader. Of course to get to your cloned copies, you’ll have to click “Work in Browser”, followed by “File → Open” and then remember the name of the other “ipynb” file you want to open.

There are other ways of course. Have you tried Google Colab? That also uses Jupyter Notebooks as its platform. Accounts there are free as long as you don’t want to guarantee access to GPUs and TPUs with no wait times.

Or you can just install python on your local computer. There are other python GUIs like PyCharm, but I don’t have any personal experience using those. I just have a linux VM with python installed and I can just bring up the interpreter and type away or run existing scripts.

Maybe one other thing worth saying on this general subject is that I have no information about what resource constraints there are on our individual student accounts. Everything here is running in Docker images up on AWS, so there must be resource constraints. I have done the sort of thing we are talking about of keeping multiple copies of a given assignment notebook around with different versions of the code and have never hit any problems doing that. But it’s probably not a good idea to start uploading gigabytes of data to any of the assignment directories. I’m sure there are limits, so best not to go looking for them. :nerd_face:

Thanks for a couple of great replies.
On the case immediately :smile: