The Jupyter dashboard - part 2
- زمان مطالعه 0 دقیقه
- سطح خیلی سخت
دانلود اپلیکیشن «زوم»
این درس را میتوانید به بهترین شکل و با امکانات عالی در اپلیکیشن «زوم» بخوانید
متن انگلیسی درس
Now that we know more about the dashboard we are ready to examine the shell and see how we can code
in Jupiter the field you see here is called a cell.
You can access a cell by pressing Enter.
Once you’ve done that you’ll be able to see the cursor so you can start typing code the gray box is
called input field
I will put a short code that says X is a less composed of four numbers one two three and four.
After that I can ask the computer to print this list for me by typing X I can execute these commands
in two ways.
The first one is to hold control and then press enter by doing this.
The machine will execute the code in the cell and I will stay there.
Meaning I will not have created or selected another cell observed that an output field with the same
number as the input field appeared.
Input and Output fields of the same number are grouped together the output represents the machine’s
response to your commands provided in the corresponding inputs and the respective field cannot be modified.
The second option allows for a more fluid code writing to execute the same code hold shift and then
press enter the previous two commands are being executed and then a new cell where you can write code
If you use shift and enter you can continue typing code easily.
It is amusing that you can cut copy and paste cells you can use the buttons on the main menu since we
are keen supporters of ergonomics.
We suggest you get use to the keyboard shortcuts when coding you will mainly have to use the keyboard.
So it’s worth memorizing different keyboard combinations that would allow you to work faster.
Let’s see how we can apply shortcuts in practice.
I will cut this cell by selecting it and then pressing the X key.
Remember you can always use the arrow keys to navigate along your notebook file so I will move up and
then directly press the V key to paste it voilà.
My cell was moved up here below the cell I had selected before I had pressed the key.
Now I will press C to copy the same cell.
I will use the arrow keys again to go down this time and at the end I will press V again.
Apparently this cell was copied and pasted below the other two buttons in the menu can not be substituted
by keyboard shortcut combinations.
They allow you to move a select itself up or down just as I am doing right now.
Observe that the corresponding OutPut field moves along with its input cell.
Lovely instead of carrying out a command with shift and enter.
You might prefer clicking on this button with the mouse.
The result will be the same what is interesting is that when you work with work complex code that requires
tougher calculations from the computer while running the code a little star will appear over here before
the square brackets.
Sometimes this process might take too long to complete so to stop it or break it.
This classical stop symbol can do that for you three other shortcuts could accelerate your coding a
Suppose I have selected this cell after I press the A key a new empty cell will be inserted above.
If I select the same cell and press B Another cell will be created just below
imagine the last step was a mistake and I need to delete that empty cell.
In this case it has already been selected so I can press the D key twice and it will readily disappear.
Wonderful all the cells we saw so far were code cells.
Let’s see what is a markdown cell.
It is a cell that contains strictly documentation texts not executed as a code.
It will contain some message you would like to leave to the reader of the file to convert a selected
cell into a markdown cell.
You should either expand this list and opt for markdown
or simply press the end button press Enter to access the cell and type some text when I run this cell.
The output will be a simple statement.
Now if you want to turn a markdown cell back to a code cell select it and opt for code from this drop
Or press the wiki to conclude there are two advantages of using Jupiter.
First when your code becomes longer markdown cells turn out to be useful as they allow you to leave
comments and explain the solution you’ve created.
This is why practitioners love to use them.
The other benefit of using this app is you can select and execute whichever cell you want to.
You need not run all the previous cells to run a particular cell.
This allows for solving a problem in pieces and saves a lot of computation time.
This was a long but indispensible lesson.
Thank you for watching.
مشارکت کنندگان در این صفحه
تا کنون فردی در بازسازی این صفحه مشارکت نداشته است.
🖊 شما نیز میتوانید برای مشارکت در ترجمهی این صفحه یا اصلاح متن انگلیسی، به این لینک مراجعه بفرمایید.