Wiki source code of Tutorial

Version 23.1 by chaney08 on 2021/06/04 16:33

Show last authors
1 == Purpose ==
2
3
4 The purpose of the Collaboratory.Lab tutorial is to allow a new user to create and use their first notebook, as well as explaining the basic principles to allow a user to continue beyond the scope of the tutorial.
5
6 === How to get to the Lab ===
7
8 (% class="wikigeneratedid" id="HYoucanalsoaddimages" %)
9 To get to the Lab, simply go to the Collab you want to work on and click on the "Lab" option on the right hand navigation element, as shown in the following screenshot: [[image:1622123755771-230.png||height="227" width="190"]]
10
11 === How to create a notebook ===
12
13 After you have navigated to the Lab, you can see a list of currently existing notebooks in the left hand navigation menu. These notebooks can all be used by you, however any changes you make will not be saved unless you are the owner of the file. On the right hand side you will see your "Launcher" and it is here you can create a new notebook.
14
15 [[image:1622125349931-642.png]]
16
17 If you click on the "Python 3" button underneath the "Notebook" menu, it will create a new Notebook for you called "Untitled" in the left hand navigation menu. You can give this an appropriate name by right clicking on the file and clicking "Rename" . It will also replace the right hand menu with this new notebook.
18
19 === How to develop/run a notebook ===
20
21 Notebooks run off Python 3, so any code you type into these notebooks should be in the Python 3 format. Notebooks are divided into "Cells" that are run individually, however they all share the same environment, so importing a library in one cell will allow this library to be used in another cell. Cells help organise your code. An example of this can be seen below.
22
23 [[image:1622127087243-656.png]]
24
25 In the above example you can see a red and a green box. The red box is the button you press to add a new cell to the notebook. The green box is the button you press to run the selected cell. The selected cell is shown by a blue bar to the left of the cells, in the above image you can see the third cell is currently selected.
26
27
28 Continuing on like this allows you to develop a full program using Python with our notebooks.
29
30
31 === Sharing a link to your notebook ===
32
33 Sharing a link to your notebook is as simple as right clicking on the file you want to share and choosing "copy shareable link" from the context menu. Once you do this, you can send the link to anyone you want to view the notebook, you can also use this link to create navigations elements inside collabs that will link directly this this notebook.
34
35 [[image:1622128734293-231.png||height="360" width="400"]]
36
37 === Calling the Collaboratory.Drive from a notebook ===
38
39 To see how to retrieve and edit files from the Collaboratory.Drive, please have a look at our notebook which you can access by following this link : [[https:~~/~~/lab.ebrains.eu/user-redirect/lab/tree/shared/The%20Collaboratory/Tutorial/Drive_Mounted_fileSystem.ipynb>>https://lab.ebrains.eu/user-redirect/lab/tree/shared/The%20Collaboratory/Tutorial/Drive_Mounted_fileSystem.ipynb]]
40
41
42 === Calling the Collaboratory.Bucket from a notebook ===