How to Disable Kite Copilot Feature? - python

I recently installed Kite for Spyder 4. I think I wanted to give it a try for several weeks and see how it performs.
One feature called Kite-copilot annoys me, it pops up whenever I opened spyder. I don't really use that feature much since it is in the new window (it would cover my workspace if it is always on top, and it would be covered by spyder if it didn't).
So is there a way to disable this particular feature? I know I can just close it right away whenever it pops out, but it is kinda annoying that I always need to close it first whenever I opened spyder.

On MacBook switch off kite for current session: at the top right of the screen (top menu bar where your wifi shows etc) locate the kite icon. Right click on it and select 'quit kite'. You will see in Spyder at the bottom (just below Console) the Kite status should switch to 'Kite: not running'.

Related

How to stop (or hide) process 'python' showing up in dock in MacOS with Anaconda Spyder?

I am using Spyder with Anaconda Launcher.
I was working on some machine learning models and when drawing graphs, I used X_grid = np.arange(min(X), max(X), 0.00000001)
Now the problem is that 0.00000001 takes a LOT of time to execute. Ideally people don't exceed 0.001.
Because of this, there is one process called "python" always showing up in the dock. If I force quit it, the kernel in Spyder dies and restarts and it instantly shows up in the dock again.
The python process icon in the dock looks like this.
I tried googling a lot, checking out answers in stackoverflow but none helped. I also tried completely removing anaconda from my mac, deleting the anaconda folder from the Users folder, then restarting the mac and then reinstalling it. Nothing seems to work! And it is really annoying to see that white icon in the dock.
So can anyone help me get rid of that white python process icon from the dock?
EDIT: I seem to have found the problem. Whenever I try to plot a graph using matplotlib, it used to appear in the console but the process icon used to not appear. To make the graph appear in a separate window, I go to Preferences > IPython Console > Graphics and select Automatic under 'Graphics Backend'. When I do this, this annoying icon appears again! Any help is appreciated.

How to run code selection in Spyder without changing the active window to IPython console?

This is mostly a question regarding work-flow in Spyder, and not a pure programming question. If anyone thinks it has no place here, then please let me know and I'll remove it.
Here we go:
I'm running Spyder on a Windows 64-bit operating system. The interaction between the Spyder IDE and IPython console depends on how you choose to run your code, and I would like to specify how this interaction works.
Among several options to run parts of the code, the difference between the following two is what puzzles me:
Option 1 - Select parts of the code and hit F9
This runs the selected code. No surprise there.
Hit F9 again, and the same selection is executed once more.
Option 2 - Run the same selection using Cells (#%%) and Ctrl+Enter
The code is run just like before. But hit Ctrl-Enter again, and nothing happens. Probably because the IPython console now is the active window.
I would like to find some way of changing this so I can use Ctrl+Enter and run the cell contents multiple times without having to make the Spyder IDE the active window by manually clicking on it. I don't know if this is possible at all. Googling and messing around in the settings under Run / configure and Tools / Preferences has so far been useless.
Thank you for any suggestions!
P.S
In case you're wondering why this is such a big deal to me, I'm rendering multiple charts and exporting them to Power Point with minor changes each time the code is run. This way, new parts of the charts (lines, textboxes, etc) are revealed when I'm working my way through a finished Power Point presentation. And for my basic data science needs, this has turned out to be a pretty much optimal work-flow. Except, of course, that I have to manually select the Spyder IDE each time I run different selections of the code.
In the latest spyder version, the keyboard shortcut to run the highlighted lines of code is F9 but it doesn't seem to work.
Go change it from TOOLS>>PREFERENCES>>KEYBOARD SHORTCUTS then double click on any shortcut you want to change and change with your shortcut. But be very careful if you used the same shortcut that is used for any other work then for that it will remove.
I changed the shortcut for 'run selection' from F9 to ctrl + Enter
in Option 2, you should use Shift+Enter instead

IdeaVim with Jupyter Notebook on PyCharm

I am trying out IntelliJ. I have installed the Python plugin, and IdeaVim.
I cannot navigate properly across Jupyter Notebook cells using hj. I mean, on normal mode, I cannot go to the next (or previous) cell, even if there is one, using hj.
Is there a way to do it without the mouse, possibly rebindable? I have read the tutorial and tried to find something in the program, but could not.
Ideavim plugin doesn't seem to support Pycharm's notebook implementation as of right now :(
There's an open issue marked as "bug" on Ideavim's issue tracker that was opened back in 2015 and it seems like it doesn't have any progress made since.
However according to the comment in the issue thread you can:
funny way to get into the command mode is type something so that the suggestion panel appears, now press "esc" you will get into Vim command mode
So this might indicate that this could be solved and updated in the future.
As an alternative you can try out jupyter-vim-binding, however it doesn't work with Pycharm either.

Output into new window

How am I able to print my output into a new window, I use the IDE Cloud 9 or PyCharm and the output comes up on a window on the bottom. Is there a command to print the output into a new window entirely, either through Pycharm or just python itself? My OS is Windows and I have Googled this and haven't seen anything that helps.
You can take the console tab out of the bottom:
https://www.jetbrains.com/pycharm/webhelp/splitting-and-unsplitting-editor-window.html
Right click the tab and select floating mode.
Hope this helps ;)
Try running something simple and silly, like this:
for i in range(10000):
print i
I tried this in PyCharm Community edition 4.0.3 on Windows 7 and it worked for me. Go down to the bottom where it says "Run". In Community Edition anyway, it is NOT a tab, but a window, so you just need to right-click near where it says "Run". Then choose "Floating Mode". For me, it immediately popped into its own window and I could drag it outside the program.

PyCharm does not highlight errors

I have a problem with PyCharm v2.7.
it does not show me errors.
I have configured it to show them as here
but nothing.
here a screenshot of what I see (no error displayed)
if I run code analysis it shows the errors marked as INVALID in the window but it does not highlight the code.
any idea?
I had this issue recently on PyCharm 2020.3.3 Community Edition.
What I've found is in the top right corner of the editor there is a Reader Mode button.
If you click it you turn the Reader Mode off and then you can see your errors.
You can re-enable it by clicking the book icon
I found. i've enabled by chance the "power safe mode" that avoid error checking. it can be re-enabled by clicking on the little man on bottom right corner.
In my case, I had some ticks disabled in the Python Inspections menu in Settings > Editor > Inspections > Python. I have ticked everything and applied, and now it is working.
I don't really understand why this happened as the problem arose from one day to another. I had even re-installed the whole PyCharm, trying older versions, and deleted the .pycharm configuration folder from home.
I had the same issue with PyCharm Community Edition, v.2016.3.2. To fix,
go to Preferences... from the PyCharm menu, and open Editor/Colors & Fonts/General
Now go to Errors and Warnings/Error under your current schema.
I also had to set my Project Interpreter under Preferences/Project:<name>/Project Interpreter.
See screenshot.
None of the previous answers worked for me when I ran into this issue, but I was able to fix it by doing a hard reset on my PyCharm settings:
From the main menu, select File | Manage IDE Settings | Restore Default Settings.
You will lose all your custom settings this way of course, but this was the only thing that worked for me.
I have tried many things, but only Invalidate Caches did the trick, after that I could hover the green arrow (top right side) and change Highlight to All Problems
I needed to "Add content root" under "Project Structure" in Preferences. I had no content root.
Nothing of this worked for me.
My problem was a single warning: "unreachable code" which blocked all errors from being highlighted.
I removed this line of code (+ the warning) and all errors showed up again.
For me, this problem was a symptom of having created the file in the wrong place without realising. Before taking any drastic actions, check your project structure

Categories