News for hackers. Stuff that matters.
Re:Estimating Number of Jupyter Notebooks on Github by kbd on Wednesday May 08, 2019 @12:18PM (#19860303)
If you ever put notebooks in source control, you owe it to yourself to try the text-based notebooks supported in Visual Studio Code[1]. They're round-trippable with real (i.e. browser-based) notebooks, yet are much better for collaboration, diffing, and editing.

[1] https://code.visualstudio.com/docs/python/jupyter-support

Re:Estimating Number of Jupyter Notebooks on Github by claytonjy on Wednesday May 08, 2019 @12:24PM (#19860386)
How does this compare to Jupytext?

I prefer pipenv to Conda, and I don't like having Jupyter(Lab) installed in each venv separately, so instead I only add `Ipykernel` to each venv and then use my system-level JupyterLab to access per-project kernels; seems like that wouldn't work here?

Re:Estimating Number of Jupyter Notebooks on Github by kbd on Wednesday May 08, 2019 @01:02PM (#19860824)
Thanks for mentioning that project. I'm wasn't familiar with it, but the difference seems to be that Jupytext is a tool to convert notebooks between ipynb and text formats, while VSCode supports the same format (#%% cell delimiters) but enables you to edit text-based notebooks similar to how you would in the browser, including keyboard shortcuts to execute individual cells, it'll render the markdown, and so on.

I'm not sure if I understand your kernel question, but VSCode's Python extension has everything built-in. As soon as you add a #%% comment it considers what follows to be a notebook cell and automatically gives you a "run cell" button that uses your chosen Python interpreter.

Re:Estimating Number of Jupyter Notebooks on Github by bawana on Wednesday May 08, 2019 @01:20PM (#19860985)
I've noticed that if I dont install jupyter to each venv, then the pythonpath defaults to the jupyter install. As a result, the jupyter notebook cannot find the packages in the venv(for example, caffe, module not found errors)
Re:Estimating Number of Jupyter Notebooks on Github by claytonjy on Wednesday May 08, 2019 @02:21PM (#19861510)
huh, I've never used Caffe but wrapping my venvs with pipenv has never caused me this kind of grief.

I tell pipenv to store venv stuff in the project folder (`export PIPENV_VENV_IN_PROJECT=1`), and then do the following to start a new project:

    pipenv --python 3.7
    pipenv install ipykernel
    pipenv run python -m ipykernel install --user --name=`basename $(pipenv run dirname '$VIRTUAL_ENV')
    jupyter lab
(all the magic is in that third command)

Then in the list of kernels, in addition to the usual suspects I'll have one named for the folder I ran the above in. If I started a notebook before all that, I'll have to change it's kernel. Doing more `pipenv install` at the prompt makes new packages immediately available in the running notebook.

Re:Estimating Number of Jupyter Notebooks on Github by xvilka on Wednesday May 08, 2019 @10:33PM (#19864871)
Exactly. Conda is the worst of Python world - installing gigabytes of unnecessary garbage every time.
Re:Estimating Number of Jupyter Notebooks on Github by linalgmixer on Wednesday May 08, 2019 @11:07PM (#19865027)
But the purpose of Anaconda is to have a easily installable set of frequently used tool for a variety of data science tasks. It's not meant to be a minimalist package.
Re:Estimating Number of Jupyter Notebooks on Github by kalefranz on Thursday May 09, 2019 @09:11AM (#19867927)
Conda can create environments with literally nothing in them. If you’re putting the full-blown anaconda metapackage in every environment, then it sounds like you’re using conda wrong for your use case. Just tell conda to install the packages you actually need.
Re:Estimating Number of Jupyter Notebooks on Github by kadal on Wednesday May 08, 2019 @01:05PM (#19860854)
Oh man, that's basically org-babel [0] but with working jupyter server support!

0: https://orgmode.org/manual/Working-with-Source-Code.html#Wor...

Re:Estimating Number of Jupyter Notebooks on Github by fathead_glacier on Wednesday May 08, 2019 @01:30PM (#19861076)
This sounds so good! I just read that Latex support is also included. If there is also an extension to handle references I can move out of emacs / org-mode / orgref because the maintenance cost is too high.

Cannot wait to give it a try.

Re:Estimating Number of Jupyter Notebooks on Github by d0mine on Wednesday May 08, 2019 @02:12PM (#19861440)
Re:Estimating Number of Jupyter Notebooks on Github by zachguo on Wednesday May 08, 2019 @05:08PM (#19862964)
The jupyter support in VSCode is working very well.

I submitted this a week ago, but too bad nobody cared. https://news.ycombinator.com/item?id=19794865

Re:Estimating Number of Jupyter Notebooks on Github by nerdponx on Wednesday May 08, 2019 @03:34PM (#19862103)
The R ecosystem also has a text-based notebook format that they call R Markdown, with a long lineage going back to the TeX days.

It never caught on outside of the R community, but the format itself is language-agnostic.

https://rmarkdown.rstudio.com/

Re:Estimating Number of Jupyter Notebooks on Github by meztez on Wednesday May 08, 2019 @04:36PM (#19862653)
I believe people underestimate what can be done in R/RStudio these days because they haven't been exposed to it.

R Markdown and its derivative are such great tools. I would also suggest xaringan if you want to present your work on a big screen.

Re:Estimating Number of Jupyter Notebooks on Github by mlevental on Thursday May 09, 2019 @12:11AM (#19865310)
pycharm supports the same thing, with debug, but frustratingly doesn't allow running all cells