What does In [*] at the upper left-hand of the cell mean when running a Jupyter notebook?
I know that when the cell in Jupyter notebook has not been run, it shows as In[ ], after running the cell, it shows as In[num].
What about In [*], does it mean that this cell is running now?
This means that your kernel is busy.
If you want to interrupt/stop the execution, go to the menu Kernel and click Interrupt.If it doesn't work, click Restart.
You need to go in a new cell and press Shift + Enter to see if it worked.
When a cell is displayed as "busy" with an asterisk, it can mean one of several things:
The cell is currently executing.
An "execute" command was sent to the cell, but another cell is currently executing. The cell will execute when its turn comes.
The kernel was interrupted / restarted while the cell was executing, it is currently not executing.
it would mean that either your code timed out or ran out of memory,
Check for infinite loops or memory leaks.
When a cell is displayed with an asterisk it means it's busy.
It might mean that: 1) The cell is now executing; 2)or it will execute when it's turn arrives. 3)or it is not executing because the kernel was restarted or interrupted.
My recommendation is that you save the file and restart the kernell in preferrence without running everything, but if you are sure everything can run without problems just do it and it will be faster for you.
Related
I have an asynchronous task, initiated by an actionButton, that starts a remote process which takes a long and unspecified time to execute. At the end of the process, a file is written in a remote server. Is there a way of changing the color of the actionButton while the task is executing and revert to the original color once it is detected that the remote file is written?
Please note that a progress bar will not help, as I don't know how long the task will take (it may last from 30 seconds to 3 minutes, or longer). I need a binary process such as changing the color of the actionButton while the remote process is executing to warn the user not to press the button again (or, also, to disable the button until the file is written). In pseudo-code, this is how I envision the steps to proceed:
(1) actionButton color = 'green'
(2) click actionButton --> change color to 'red' (and disable button?)--> start remote process asynchronously --> may take 2 minutes --> write file remotely
(3) if(exists(file remote)){change actionButton color back to 'green' (and enable button?)}
(4) use remote file
Please note that the key aspect here is that the remote process is asynchronous. In the more common processing for R files, lines (3) and (4) would run synchronously and a change of color in the actionButton would not be necessary as the program would wait for line (2) to end before continuing. In my case, currently, immediately after I run line (2), the process continues and doesn't wait for the remote file to be created and stored. However, I need the results stored in the remote file in further steps.
Thanks
So I have a long-running python notebook.
As long as it's open in my browser's tab, it's autosaving every 2 minutes, and life is good.
Is it possible to keep it auto-saving even if I close the browser tab?
The kernel already keeps running when I close the tab, which is great.
This is kind of like "screen", but in jupyter
EDIT: Even if I leave the tab open in my browser, I noticed that after 24 hours, the "kernel status" in the top right becomes "disconnected", even though the running cell still has output being piped to it from the server websocket connection
No, you can't (for now), and their will be no point in doing it.
The reason is, as soon as you close your tab, some critical information is lost because it is in the memory of the Javascript VM that run the page.
Any update sent by the kernel after you've closed your page are lost.For example try the following.
create a cell with sleep(10);print('Hello')
Execute the cell
Quickly close and reopen the tab.
the "Hello" will never be printed.
The mapping between the "Execution request" and the "Execution reply" have been lost, and can't be recovered.
The Jupyter team is aware of that. The fixes are not that hard, but require a lot of careful refactor and API design. There was a long in person discussion in NYC at the end of August 2017. Right now the focus is to polish JupyterLab, and once this is done it will be one of the area of focus. It will go hand in hand with real-time collaboration.
In more detail, the fix requires to "move" the notebook model from the client (your browser) to a server side (what is serverside is handwaved for now, but here is not the place to expand it), there are technical questions about that, like what to do with widgets, and when collaborating what state is shared by everyone and what state is per-client. Like if you fold some code, should this be stored ? or not ?
If you are interested in that, I would suggest getting involved with JupyterLab, there will be soon a number of low hanging fruits to contribute that should quickly fix 80% of the usecases.
When you press ctrl-t when dd(1) is running it tells you how much data it transfered and how long it has been running. If you press it during a cp(1) you can see which file it is up to and the percent done copying.
I'd like to add the same type of feature to my program. How can I do that?
I'm working with a fairly large dataset and any time I perform an operation, if I forget to include the semi-colon at the end of the statement it takes several minutes because it outputs all the data to the console window as it goes. How do I halt execution of the current statement?
I've tried using Ctrl-C like in MATLAB, as well as using the Abort and Interrupt options in the Control menu, none of which seem to be working. Is this a bug, or am I missing something? I'm running on Windows 8 64-bit in case that helps.
To halt execution, press Ctrl-C in the console window of Scilab. This will display
Type 'resume' or 'abort' to return to standard level prompt.
-1->
Entering abort abandons the computation completely. Entering resume resumes it.
I did not check it but this tutorial gives as option the ESC key
"To abort a command midway without executing it, press the Esc key on the keyboard."
I've written a short script (in another language, happens to be Python) which passes arguments to the command line as follows -
ildrt <path/filename.sav> -args p1 p2 --o1 --o2
where p, o are positional and optional arguments respectively (obvious). To get to the point, this script calls an IDL routine any number of times. Each time, the IDL virtual machine is loaded, the IDL routine runs until completion, rinse and repeat.
Unfortunately if an error occurs in the IDL routine execution a dialog box will popup and halt program execution until manually clicked. Since the idea is to run this as a batch process I want to ignore the dialog boxes, (accepting the error), and continue to the next run. Any thoughts on preferences or optional commands I can run IDL with to prevent the popups? Thanks in advance.
I guess I'm not following. Can't you just pass a flag to your program and then check that flag before popping up a dialog in your code? If you don't have access to the .pro code, then I don't think you can prevent the popups.