How to Use a Jupyter Notebook in Visual Studio 2017? - json

Visual Studio 2017 now supports use of a Jupyter Notebook.
A Lap Around Python in Visual Studio 2017
According to the MSDN blog post:
To work with a notebook, simply download your IPYNB file as a .py file and open it in Visual Studio. You’ll see that markdown cells have been turned into comments and each cell is collapsible and expandable.
When I download a IPYNB file, rename to a .py file, it displays in the VS editor as a JSON file containing markdown. I was expecting to see a markdown file. What am I missing?

#Jonathan answer is correct. The MSDN blog was referring to Jupyter Notebooks menu item File->Download->Python (.py). There's additional considerations in getting a notebook to run and ultimately a issue with quality of experience.
To use a notebook in Visual Studio, download using Jupyter as stated above.
Specify the Python environment as Anaconda as shown in the blog image. To do so, either set Anaconda as the default environment or create a solution from existing files that specifies Anaconda as the environment.
Open a Python interactive window to display notebook execution.
Use Ctrl-Enter to step through notebook's statements.
That said, be aware that Visual Studio's notebook-ish experience is not at the level of Jupyter's, for now. Until VS directly integrates notebooks (.IPYNB files), I see little advantage of using VS over the real Jupyter.
VS has fewer and semantically different key bindings than Jupyter.
Jupyter's formatting (HTML) is far superior to VS (text).
There's little support and documentation for notebook-ish in VS.
The whole VS notebook-ish experience lacks polish.
IMHO, the beauty of Jupyter is the single window experience but VS uses two.

This is what I believe they mean with the download as.
You need the Notebook running then click on File-> Download as-> Pythong(.py)
Once you have downloaded your Python file from the notebook you can open it in Visual Studio.
Edited: added the rest of the answer

As an alternative to Visual Studio that does not integrate well iPython notebooks, did you look at PyCharms that is a nice Python IDE (as far as I use it for now^^).
It provides a nice rendrering of ipython notebook inside the IDE making it a common IDE for python and iPython stuff. Maybe it worth a try.

Related

how to edit an html file inside chm file in python

I am working on a chm project. Is there a way to open and edit with Python (or other way but I prefer Python) the HTML compiled in the chm files so it can be updated without recompile?
I have tried the chm and chmlib in Python with no luck. I am trying to find a way to edit existed chm file. Any suggestions?
No solution but to decompile the CHM, make the modifications and recompile.
Depending on the complexity of the CHM file, it might be better to reuse the original sources, not the compiled CHM, since a decompilation-recompilation step with free tools won't always recreate the same CHM.
There are various decompilers, but only two freely available compilers, one by Microsoft, and one by the Free Pascal Team. (use for e.g. Preshrunk Cotton python project and in some distributions.)
You could also investigate some commercial tools. They probably do a better job than the open source decompilers.

Convert HTML or Word to CHM without installation

I would like to convert an HTML file or a Word file (.doc, .docx or .rtf) to a .chm file. I searched for ways of doing this and they all said that I should install a program on my computer. Is there a way of doing this without installing anything (online, with a program initially installed on Windows or with a USB version of a program)? I also accept a CHM editor as long as it doesn't need to be installed. I found a way to open a .html with hh.exe (the program that opens .chm) but as soon as I rename it from help.html to help.chm it doesn't work.
As far as I know the answer is – no. I've seen never an online version or a USB solution for effective HTMLHelp (CHM) compiling.
You can’t rename a foobar.html to foobar.chm and get this working for a single file, because CHM is like a zipped webpage with all files needed inside and some more internal files e.g. for full text search or an index with keywords. Please see snapshot of a special view with FAR HTML below (left side only, navigation pane).
You can't rename from .zip to .chm too, because the internal structure of a CHM file is complicated and you need a compiler for generating CHM's.
Background:
Please note that the proprietary file format is normally generated by MS HH Workshop (hhw.exe). It’s nearly 20 years old und was first shipped with IE4 and Windows 95. It’s deep integrated to the Windows operating system.
The HTML Help compiler is part of MS HTML Help Workshop (HHW.exe). This is a free, very basic authoring system provided by Microsoft and must be installed before any other authoring tool (e.g. such as FAR HTML) can compile to a .chm help file.
HTML Help Workshop (HHW) installer is called HtmlHelp.EXE and contains a copy of the HTML Help Run-time installer (HHUpd.EXE). There are a few Independent Software Vendor (ISV) that install HHA.DLL and itcc.dll separately instead of installing the full MS HH Workshop (htmlhelp.exe). This is generally an OK practice if the ISV knows what they are doing. But there are many problems. ISVs please keep in mind the safest approach is probably to install the full Workshop.
HTML Help is in maintenance mode, which means no new features are expected for either the runtime or the compiler. All mainstream development on HH has stopped – but HTMLHelp (.chm help files) is still recommended as software application help (for offline (local) help).
At the time of writing (announced 1996-Feb) HTMLHelp is the only Microsoft help platform available for general application help. WinHelp is deprecated and no longer ships with the Windows OS. Visual Studio products such as MS Help 2 & Help Viewer only ship with VS.
Here's word2chm.
It converts word docs to chm help files.
https://sourceforge.net/projects/word2chm/
You will need Microsoft's HTML Help Workshop installed for this to work.
Another more robust program is:
https://sourceforge.net/projects/nuhelp/
Requirements of nuhelp:
1) Word 2003, 2007, 2010 or 2013.
2) HTML Help Workshop (included in zip file)
3) .Net 3.5 Client Profile (already on most computers)

Creating a new project/site in Githubs Atom Editor

I've downloaded Githubs Atom Editor and I can't seem to figure out any way on creating projects.
I currently use Sublime Text 3, I've added some packages to it which allow FTP and I'm able to create Directories and sites as it has a built in Project Manager.
I've been looking over the internet for a while now and can't find any help from the following.
Does Atom have a built in FTP?
How to create projects/sites like in Sublime Text 3?
Does everything sync to your Github?
Apologies is this has been asked or seems irrelevant but I am looking for assistance in using the new Atom Editor.
Out of the box atom does provide some project view if you open (⌘O) a directory instead of a file:
I've recently been trying new editors as well. I have been switching between Atom, Brackets, and Sublime Text 3. They have many similarities, as you probably have noticed. Atom doesn't come with very much out of the box, just like Sublime Text, but just like Sublime Text it's highly extendable using its built in package manager.
Atom's Package Manager is found in the Preferences (⌘,). Then select the Packages tab on the left.
Currently there isn't an ftp package, but chances are it's only a matter of time. If you're using FTP for deployment git provides a much better/safer workflow with not a whole lot of overhead to get set up....But that's another topic I won't dive into here.
There are a couple pretty nice project manager packages that would give you a similar experience to Sublime Text's projects:
As far as git integration goes it's a similar situation to project management. It has a few nice features built in (Open in Github, highlighting files with pending changes, etc...), but there are a few nice packages that can really make Atom's git integrations pretty verbose.
Hope this helps, good luck

Monodevelop, where can I download it?

I was trying to download Monodevelop for mac, but on the official page there is everything but a compiled and downloadable file.
I've read around other threads on different forum and apparently it is required to compile the source code. Is this really the case?
What other alternative may exist for Mac? I just need to dig into some source code, using references and jumping from code portion to others without using the search filter.
Thanks.
If you want a binary for Mac, you need to go to Xamarin's homepage and simply download Xamarin Studio.
Xamarin Studio is basically the same thing as MonoDevelop, the only difference is a bit of branding and the inclusion of 3 plugins for their proprietary development offerings, which you can ignore if you're not interested in developing for the mobile platform.

html to chm file under linux

I have html files/Directories, I want to convert them to .chm help file, under Linux using command lines at Terminal?
Any help would be appreciated.
The Free Pascal compiler, version 2.4.4 or higher has a CHM compiler for *nix called "chmcmd". I would recommend getting it from version 2.6.0. It works on MSHelp .hhp project files.
The compiler is also available in source (styled like a classes library), so you could roll your own. It is crossplatform, but Big Endian platforms are not tested very well.
2.6.0 is from januari 1st 2012, so you might need to get it from a "bleeding edge" packages repository of your distribution.
CHM is a proprietary Microsoft format, so keep in mind most Open Source tools will likely be focused on reading and converting chm to html . if you want to create CHM file on Linux then you will need a CHM compiler that you can use with wine . details are on the following link Compiling_CHM_help_files_in_Linux_with_HHC_and_Wine
You can do that with libchm, you find it http://www.jedrea.com/chmlib/ .
It contains extract_chmLib, which extracts html pages from the help pages to a directory.