6 ms·
The fact that this article is about jupyter notebooks, and apparently doesn't know that gitignore exists tells me that this is probably written by a data scient
by skohan 8y ago
The fact that this article is about jupyter notebooks, and apparently doesn't know that gitignore exists tells me that this is probably written by a data scientist who is in the process of "discovering" solutions to long-solved problems in software development.
- wodenokoto 8y agoFor a notebook I would ask the user to change a filepath variable in one of the top cells. But I'm also a stupid data scientist. What do you propose as the long-solved solution?
- pxndx 8y agoI'd propose reading data from stdin. Seeing this is about python, one could even consider using fileinput [0] to manage multiple files. [0]: https://docs.python.org/3/library/fileinput.html https://docs.python.org/3/library/fileinput.html
- wodenokoto 8y agoIt is a jupyter notebook, not a python script. Your proposal won't work. You generally don't open a notebook from the commandline, you open it from the notebook file picker inside your browser. You generally don't "run" a notebook, like you would a script. It is an interactive programming environment. https://github.com/jupyter/nbconvert/issues/681 https://github.com/jupyter/nbconvert/issues/681
- chthonicdaemon 8y ago(author of post here) It's more like someone who started by recommending my students use parametrised scripts, noticing that they will not and working through alternatives. My students are relatively familiar with the notebook interface, but not at all comfortable with writing a script which will accept command line arguments or read from standard in. PS: since I mention .gitignore explicitly in the post, why would you thing I don't know about .gitignore?