Live data from Hacker News

Show HN: A tool to convert Jupyter notebooks to beautiful blogs

github.com

31–38 of 38 posts

Re: Show HN: A tool to convert Jupyter notebooks to beautiful blogs

#31

Offtopic; does anyone know a tool that can turn a directory of source code into a nicely formatted PDF/PS? So with syntax highlighting etc based on the file you have and chapter index based on directory structure for instance?

Pandoc? I haven’t used it in a while though.

Re: Show HN: A tool to convert Jupyter notebooks to beautiful blogs

#33

Earlier quoted context omitted.

_5 is a magic variable with the value of the output from cell 5. _ refers to the last output. Super handy when working interactively.

Oh my god. I have used Jupyter notebooks for 7 years and never knew this. I just had to fire one up to verify -- and yep; exactly as described. How amazing! Thank you!

I believe the _5 syntax is specific to Jupyter, but in Python, the output of the last statement you execute is bound to _

For example, if you simply enter 4 into a Python REPL, printing _ will also print 4

It's really handy if you call a long statement in the REPL and forget to save the output to a variable

I wrote about it once if you'd like to see some better examples: https://utf9k.net/blog/lost-python-results/

Re: Show HN: A tool to convert Jupyter notebooks to beautiful blogs

#34
post #6

I have never understood why the "In[5]" and "Out[5]" in jupyter have to be so prominent, even in a output like this.

_5 is a magic variable with the value of the output from cell 5. _ refers to the last output. Super handy when working interactively.

You just blew my mind.

Re: Show HN: A tool to convert Jupyter notebooks to beautiful blogs

#35

Neat! Anyone working on projects to improve the share-ability, code review, version control, or web rendering of Jupyter notebooks, feel free to reach out to me when looking for an enthusiastic early user. Jupyter has been a game changer for my productivity as a data scientist, but I still struggle with something that seems as simple as "what's the best way to expose this to other people easily without having to set…

We are developing a Notebook like interface for SQL https://uktechdata.count.co/ https://stackoverflow.count.co/

Welcome to get your thoughts on this.

Re: Show HN: A tool to convert Jupyter notebooks to beautiful blogs

#36
post #6

I have never understood why the "In[5]" and "Out[5]" in jupyter have to be so prominent, even in a output like this.

_5 is a magic variable with the value of the output from cell 5. _ refers to the last output. Super handy when working interactively.

I knew this, which may be handy when developing (assigning variables is superior IMO though)

But in final output like this? I don't like it.

Re: Show HN: A tool to convert Jupyter notebooks to beautiful blogs

#37

I browsed the example link given at the GitHub site, and found this blog entry on lessons to tell your younger self. This post is amazing! All the advice rings true. Worth a read! https://pykancha.github.io/test/2018/cs-phd-lessons.html

Here is original link: https://nipunbatra.github.io/blog/2018/cs-phd-lessons.html

Re: Show HN: A tool to convert Jupyter notebooks to beautiful blogs

#38
post #36

Earlier quoted context omitted.

_5 is a magic variable with the value of the output from cell 5. _ refers to the last output. Super handy when working interactively.

I knew this, which may be handy when developing (assigning variables is superior IMO though) But in final output like this? I don't like it.

No, you should not use output-references in code you share with people, but in my opinion it is one of the main reasons why jupyter notebooks in general put a large emphasis on displaying cell numbers
Post reply on HN