NameError: name 'get_ipython' is not defined
If your intention is to run converted .py file notebook then you should just comment out get_ipython()
statements. The matlibplot output can't be shown inside console so you would have some work to do . Ideally, iPython shouldn't have generated these statements. You can use following to show plots:
plt.show(block=True)