Starting to wonder how many great data science tools I miss out on because I want to be in @ProjectJupyter all the time...https://twitter.com/generativist/status/1139645382177071105 …
-
-
Replying to @generativist @ProjectJupyter
How do you generally code share between notebooks? Do you keep a utils type dir and have all notebooks at the top so you can import? Use “real” python modules elsewhere?
1 reply 0 retweets 1 like -
Replying to @lwwch @ProjectJupyter
I very very quickly move functions to a helper module via, %%writefile http://common.py and a, %%run -i http://common.py Usually, I also move http://common.py to full modules soon after, replete with unit-tests and a http://setup.py .
2 replies 1 retweet 1 like -
Does this write a code chunk to a script or does it write an entire notebooks code to a script? Never seen this before
1 reply 0 retweets 1 like -
Writefile is cell magic that writes the content in the cell (except the writefile part) to a file. There is also an append flag iirc but I’m on shit WiFi now).
1 reply 0 retweets 1 like -
Replying to @generativist @SamStiyer and
The run part is line magic and should have been, %run -i http://file.py Which is as if you copy pasted http://file.py into a cell and ran it.
1 reply 0 retweets 1 like -
Thanks, this is very helpful :)
1 reply 0 retweets 2 likes -
The run command I use frequently in terminal ipython as well, if you’re a terminal user. Typically for debugging existing scripts (see: debugging tensor shape mismatches)
1 reply 0 retweets 1 like
Le sigh...Shape mismatches.
-
-
The biggest of sighs. It’s always that one line you added at the end of a sim to get some extra metric or whatever too. Shape is not understood by numpy.random.normal, NDArray does not have a dimension=2, etc.
1 reply 0 retweets 2 likes -
I feel this in my soul
1 reply 0 retweets 2 likes - 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.