Can you show cell output at the right tab in Google Colab? - jupyter-notebook

Is it possible to view cell output at the right tab, when viewing 2 tabs in 2 columns?
Is it possible to view code at the left tab and the output at the right tab, as in the below picture?

Officially in colab it is not possible but with the help of extension, it will possible.
you can go with this post for download/how to install/ how to use: enter link description here

It is not exactly what you want but it could help someone else,
if you add to the top of you div the header :
##title { vertical-output: true}
you get :

Related

Jupyterlab active scroll bars for long results

I'm using Jupyterlab for my datascience studies. Everything is Ok with this new tool, but some process as GridSearchCV has long logs and this results pollutes the notebook. There is a way to active scroll bars to avoid this like in traditional Jupyter notebooks?
You have a few options:
Right click on cell's output -> "Enable Scrolling for Outputs". This will limit output view's height and enable scrolling, like in the classic notebook.
Right click on cell's output -> "Create New Output View". This will create a separate scrollable view and dock it to the bottom of the screen. You can then collapse the view in the main window so it doesn't clutter the notebook.
there is an automatic way to do this. First, you must install the addon "Stylus" (available on both Chrome and Firefox). This addon allows you to write custom CSS on websites.
Next, go to your JupyterLab page at localhost:8888/lab and click on the Stylus icon in the top right, and click "Write style for this URL"
Under the URL, i changed localhost to localhost:8888/lab. Then, I copied in this script by user Buckle2000 from Github (https://github.com/jupyterlab/jupyterlab/issues/4028#issuecomment-446820575)
.jp-OutputArea-child {
max-height: 15em;
}
.jp-OutputArea-child .jp-OutputArea-output {
overflow: auto;
}
Then click the Save button, and you should be good to go. I believe you can change the number 15 to make it activate for different heights. It should look like this:
If you are not interested in the output, you can use cell magic capture. It captures cell output and doesn't display them.

Selenium IDE - Find id to click

i am trying but but make it work:
I have found the id i want to use, but if i try it, it says element not found
<div class="WareItem" data-sort="hardware" data-hardware-id="12345" data-reactid="321">
I tried with
CLICK
css=div[to='data-hardware-id="12345"']
EDIT:
i added a picture, please help me :Denter image description here

Sublime Text: Hide all code and show only comments

I find it tedious to manage very large style sheets in Sublime Text 3.
Some of my stylesheets are about 2000 lines of code. I am trying to figure out how to navigate more easily within the stylesheet. I already know about bookmarks and the brilliant search function, but another way would be to hide/fold all code and show comments only. Tis way it would be easier to find the correct place you want to go to.
So is there a way to hide all code below a comment? This would be something as the opposite of Fold Comments
I know Hugo proposed the classic "fold all" solution here. But I would like to hide absolutely all code and display comments only.
For example:
/*******************************************************************
Description 1
*******************************************************************/
Hide/fold all code between here...
...
...
..
.
.
/*******************************************************************
Description 2
*******************************************************************/
You can fold everything, which is not a comment by opening the console ctrl+` and write view.fold(view.find_by_selector("-comment")).
This searches all regions with the selector - comment, which means everything except comments. Afterwards these regions are folded.
If you want to create a keybinding for it, just create a plugin. Open Tools >>> Developer >>> New Plugin and paste:
import sublime_plugin
class FoldEverythingExceptCommentsCommand(sublime_plugin.TextCommand):
def run(self, edit):
regions = self.view.find_by_selector("-comment")
self.view.fold(regions)
Afterwards add this to your Key Bindings - User to add a keybinding for the command:
{
"keys": ["ctrl+alt+shift+f"],
"command": "fold_everything_except_comments"
},
You can use the arrows in the far left of the text editor. Sublime has the line number listed down the left and beside those numbers are tiny arrows.

ipython notebook anchor link to refer a cell directly from outside

I am writing documentation for a notebook-based framework. When referring to important cells in a demo-notebook, can I point to a particular cell by using some sort of anchor?
For example if I have the demo-notebook at 127.0.0.1/mydemo, is it possible to refer to the input cell In[10] by some anchor tag like 127.0.0.1/mydemo#In10
Creating internal links within Markdown works quite well in practice for me. For example, you can make a table of contents by making a list in a markdown cell at the top of the page.
*[jump to code cell 2](#cell2)
*[jump to code cell 3](#cell3)
*[jump to code cell 4](#cell4)
Then you just insert a markdown cell right above the code cell you want to link to (say code cell 2). Just add one line of code:
<a id="cell2"></a>
See this tutorial for more explanation: http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/table_of_contents_ipython.ipynb
I like to use headers to organize my notebooks, such as
#My title
in a markdown cell. In another location, I can then refer to this cell using
[Link to my title](#My-title)
in markdown (looks like you should replace spaces with hyphens).
I got this from a more complete answer here.
Not on stable, and only on Header(1-6) cell on master. Just click on the header cell and it will put the right anchor in the url bar, wich is usually #header_title_sanitized
Using the prompt number is not a good idea as it might change. It will be supported on nbviewer as well, we are working on it.

css print friendly version - disabling links

I have a page with many links. and Have a button to print, clicking on that will be print.css included. In print preview version of the page remain all the links intact.
Is there a way to disable all the link in print preview? i.e. they are no more clickable.
I know this isn't disabling the links, but this is along the lines of print preview and links. Here's an option that you can add to your css so links will print much nicer: http://davidwalsh.name/optimize-your-links-for-print-using-css-show-url
I wouldn't disable the links as much as style them the same way as regular text, since the intent of clicking on Print Preview is to prepare to print the page, where the links won't work anyway.
If you're still set on disabling links, you can try this query code. Assume that your body has a class called print on it:
$("body.print a").each(function(a) { $(a).html(a.innertext); });
The above is pseduocode and was off the top of my head at 8:30 AM. I would just save yourself the trouble and make links look like surrounding text.

Resources