I have a notebook that given input from ipywidget sliders, does some calculations and generates a graph. Is there a way I can create a "read-only" version of this interactive notebook, essentially one in which the user can interact through the sliders but nothing else (like code entry)? Thanks!
If you export the notebook to HTML, it will be a HTML representation of the notebook that isn't editable, and ipywidgets supports export to HTML. For example: http://jupyter.org/widgets
Related
I've referenced this question: Change mimetype for VSC Jupyter Notebook ouput
And thoroughly googled, but I still can't seem to change the mime type of my Jupyter Notebook. I have 2 .jpnyb files opened, one has the option of mimetypes of text/html, text/plain and the other gives a weird one of application/vnd.somemorewords
Here is a picture of what the difference between the two look like within the command palette when attempting to change the presentation. First file: https://ibb.co/yBkmVdz Second file: https://ibb.co/vhcz866
Where is the first file grabbing the mimetypes from? I can't find any information on a location of a file (settings.json has been edited) that just sets the standard across the board for the entire VS Code app. Please help if you can!
I've done a search of package.json files on my computer and looked at over 50+ files for some sort of information of the notebook display order and renderer.
I also tried changing the User settings for the work space referencing the question that I linked above.
I often run scripts on remote machines and sometimes create custom html dashboards to monitor progress. I was wondering if something like that would be better done taking advantage of vscode's ssh extension, which I use to edit files remotely anyway.
For example, I'd like to display a custom panel with information derived from a list of files in the remote server. My traditional approach would be to run a web server to get the file contents in some custom json format and create a custom html client to display the data. Would it be possible to skip the web server part and instead create some custom vscode extension that gets the data via some ssh api?
It might be your case to use LogTail extension to fetch your data and then proceed with your desired display method.
VSCode Marketplace for LogTail: https://marketplace.visualstudio.com/items?itemName=tiansin.logtail
I hope it helps :)
Is there a way to save h2o flow cells after training, in form of a HTML or PDF report? I would like to achieve similar result to Jupyter Notebook, full of figures, tables etc. - a static overview of what happened. "Save flow" option saves static text, but removes figures and pictures.
So far I've tried to use primitive approach - just "save as HTML full page" in Chrome/Firefox/Safari/Edge, but the result is either empty page, or just a first cell with missing graphic elements.
I was using static Jupyter notebooks as a form of report for my Clients, and I'd like to use H2O Flow in a similar way.
Thank you in advance
The best solution is to do a "print to pdf" from the browser. On a Mac, you'd go to File -> Print -> click on the PDF button -> Save to PDF.
Here's an example of the PDF output for a simple AutoML run on the iris dataset.
Is there any way to use variable vscode to get editor content just like Atom without writing Extension.
After getting editor content, I can do more things like:
Use Javascript to modify text literally
Custom format
vscode image
atom image
No. This is not supported.
You can use the extension API to extend VS Code. This API lets you get and modify editor contents
I have been able to embed this map in an IPython Notebook (which is sweet), but I am not clear on how I can share this with folks not using the Notebook. I am familiar with the bl.ocks.org viewer. It's great for standalone examples, but I am looking to share the rest of the analysis in the Notebook along with interactive charts. Neither the HTML conversion of the Notebook nor the nbviewer rendering can locate the map (I get a 404 message).
After the first 404 (with this gist), I changed the viewer function to capture the github location of the map file (V2). I am not yet clear why, but that change stopped nbviewer from even rendering the surrounding materials. Any thoughts on a better way to go about this?
The trouble is that the map is saved as a local HTML file (rChart_map.html) and is hence not accessible to nbviewer when you are trying to view it online.
Even if you upload rChart_map.html to the gist, it won't show up due to path issues. Locally, you need to refer to it as /files/rChart_map.html in your IPython notebook, whereas online, it has a different path. I had posted this issue earlier on twitter using the #IPython tag, but got no responses on how to debug.
So where does that leave us. Well, fortunately, most modern browsers allow an iframe to contain inline HTML using the srcdoc tag. This allows the generated .ipynb file to be standalone, as seen here, at the end of the file.
The key is to use the following code. The first line creates an iframe with inline html of the map and stores it in the python variable map2. The second line imports the necessary python modules and the third line displays the HTML. Note that we use h2[0], since map2 is an array, due to conversion from R, which is vectorized.
map2 = %R paste(capture.output(map$show('iframesrc', cdn = TRUE)), collapse = '\n')
from IPython.display import display, HTML
HTML(map2[0])
For this to work, you will need to have rCharts version > 0.4.1.
I am interested in making it easier for rCharts to be used in IPython notebooks. So any suggestions/feedback is welcome.