Python – how to run a Python script inside live shell
- executable - run program in Python shell - Stack Overflow
>>> exec(open("C:\\test.py").read())for Python 3, and
>>> execfile('C:\\test.py')for Python 2. Works with relative path.
Or, from the same SO thread, one can do just
import filename_without_extension, even if it doesn’t follow the structure with main() etc., in my experience.
Indexing and slicing multi-dimensional arrays or tensors in pandas, numpy, Tensorflo
This is probably one of the most SEO titles I’ve ever created, but I think it applies to all of them.
Tensorflow add one dimension (expand dims,
- tf.expand_dims | TensorFlow Core r1.14 | TensorFlow
- Adds one dimension