vscode import error for python module

I tried to add this in my launch.json, then it works! “env”: {“PYTHONPATH”: “${workspaceRoot}”} below is my launch.json “name”: “Python: Current File (Integrated Terminal)”, “type”: “python”, “request”: “launch”, “program”: “${file}”, “cwd”: “${workspaceRoot}”, “env”: {“PYTHONPATH”: “${workspaceRoot}”}, “console”: “integratedTerminal” wish it can help u! 🙂

How do I restart airflow webserver?

I advice running airflow in a robust way, with auto-recovery with systemd so you can do: – to start systemctl start airflow – to stop systemctl stop airflow – to restart systemctl restart airflow For this you’ll need a systemd ‘unit’ file. As a (working) example you can use the following: put it in /lib/systemd/system/airflow.service … Read more

How do I install Keras and Theano in Anaconda Python on Windows?

It is my solution for the same problem Install TDM GCC x64. Install Anaconda x64. Open the Anaconda prompt Run conda update conda Run conda update –all Run conda install mingw libpython Install the latest version of Theano, pip install git+git://github.com/Theano/Theano.git Run pip install git+git://github.com/fchollet/keras.git

Use a loop to plot n charts Python

Ok, so the easiest method to create several plots is this: import matplotlib.pyplot as plt x=[[1,2,3,4],[1,2,3,4],[1,2,3,4],[1,2,3,4]] y=[[1,2,3,4],[1,2,3,4],[1,2,3,4],[1,2,3,4]] for i in range(len(x)): plt.figure() plt.plot(x[i],y[i]) # Show/save figure as desired. plt.show() # Can show all four figures at once by calling plt.show() here, outside the loop. #plt.show() Note that you need to create a figure every time … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)