Top all-time · #12092
Tim Staley
Personal blog · timstaley.co.uk/postsprogrammingdata
Tim Staley's personal blog at timstaley.co.uk covers programming and data. Since 2014, 6 different Hacker News readers have linked it 7 times, most often “Making Git and Jupyter Notebooks play nice”. The last post was in 2017, but the archive is still widely read.
Too few sampled comments (4) to say how often HN recommends it.?
Why HN links it
HN readers link Tim Staley's posts on making Git and Jupyter notebooks work together, such as using jq-based git clean filters to strip notebook outputs. Commenters cite them as sources for the approach.
Summarised by Claude from a sample of 4 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Most-linked posts?
- Making Git and Jupyter Notebooks play nice5 people · 5 mentions · first linked 2017-04-04
What Hacker News says?
This is something I've been giving some thought to recently. I came to the conclusion that the best way to go currently is git-clean filters built using jq. It's still a bit hacky though. Gentle write-up here: http://timstaley.co.uk/posts/making-git-and-jupyter-notebook...
Comment linking /posts/making-git-and-jupyter-notebooks-play-nice/
on “Jupyter Notebook 5.0”Submitted Making Git and Jupyter Notebooks play nice as a story · 168 points
HN discussionYou can use a filter in your gitconfig to strip away the outputs, and thus make it play nicer with git [0]. gitconfig: [filter "nbstrip_full"] clean = "jq --indent 1 \ '(.cells[] | select(has(\"outputs\")) | .outputs) = [] \ | (.cells[] | select(has(\"execution_count\")) | .execution_count) = null \ | .metadata = {\"language_info\": {\"name\": \"python\", \"pygments_lexer\": \"ipython3\"}} \ | .cells[].metadata = {}…
Comment linking /posts/making-git-and-jupyter-notebooks-play-nice/
on “Literate Programming: Empower Your Writing with Emacs Org-Mode”Submitted How to pip install NumPy in two seconds flat as a story · 2 points
HN discussioncaveat: I haven't tested this particular one, it was just the first thing I found in a quick search. This post has more detail on a faster approach using jq: http://timstaley.co.uk/posts/making-git-and-jupyter-notebook...
Comment linking /posts/making-git-and-jupyter-notebooks-play-nice/
on “Show HN: Ansible Kernel – Run Ansible Tasks and Plays with Jupyter Notebook”Submitted Using python pip offline as a story · 1 points
HN discussionYou can use clean and smudge filters in git. Since notebook files are JSON it's pretty straightforward to stripe outputs from them using `jq`: http://timstaley.co.uk/posts/making-git-and-jupyter-notebook...
Comment linking /posts/making-git-and-jupyter-notebooks-play-nice/
on “Ask HN: Are there any good Diff tools for Jupyter Notebooks?”