Autocomplete in Anaconda - autocomplete

I would kindly ask for in-kind assistance please.
I am using Anaconda 3 (the latest version) on Windows.
It appears that autocomplete works with libraries only e.g. when I type pd (pd is imported pandas library) and put dot I get pip up list of functions.
When I try to do the same for dataframe object (which has been defined earlier as below:
df=pd.read_csv('file.csv')
I get no pop up list.
Any ideas what might be the problem and how to resolve it?
In addition, why help (ctrl+ i) does not work with dataframe objects e.g. when placing cursor in front of df.dropna() I see no help in upper right help window.
Please advise. Thanks

Related

How to import all files at once pointed out by Dart Analysis?

I just put some of my code from a/b.dart to a/b1.dart file and now I started getting lot of errors on importing.
Is there any command or any other fix to import all a/b1.dart file in these files instead of manually opening each file and importing one by one.
I understand that a function or a property can be defined in more than two files and Dart can't make the right choice but if a function or property is defined in just one place, I think there must be some way to import it except searching for a/b.dart and replacing it with a/b.dart + a/b1.dart and then optimizing all imports.
As much as I am aware, Plugins/Extensions for your specific IDE (for dart) can be found that will help you with this problem.
I would recommend using dartdev tools - dartfix

unit.variable not found as numeric variable in foo Synth Package

I am trying to run the Synthetic Control Method in R. I tried to prepare my data according to Abadie, Diamond and Hainmueller (2011) (https://www.jstatsoft.org/article/view/v042i13).
But when running the dataprep.out function I get the error message that my unit.variables are not nurmeric variables in foo. I don't understand the problem here because my table purely consists of numeric values. The table is also classified as a data.frame. I have attached some pictures to underline my problem. If anyone could help me that would be greatly appreciated!
My code (https://i.stack.imgur.com/7BVYc.png)
My table (https://i.stack.imgur.com/TV1IC.png)
I have tried to reimport my data over and over again. But nothing seems to help.

Python stacktrace without sitepackages?

I was wondering if there is a way to get a 'simplified' version of the exception stacktrace.
one that does not contain the trace of functions that are sourced in outside site-packages.
kind of like Justmycode. but for python with pycharm..
I have tried looking around but haven't found anything yet,
i'm aware that I can take the Stacktrace and filter out rows that are from outside sources,
but I really thought there would already be a solution for it?
Thanks in advance!
The tbvaccine Python package shows relevant lines highlighted, which is like a visual filter of irrelevant lines.
The package doesn't seem to be under active development btw.

Indirectly exported class not visible

I'm having trouble using the Backendless plugin for Flutter.
I include
import 'package:backendless_sdk/backendless_sdk.dart';
(as per the instructions) and can then use e.g. Backendless.UserService. But if I try to generate a user to register, e.g.:
var user = new BackendlessUser();
user.setEmail("info#example.org");
user.setPassword("password");
Backendless.UserService.register(user);
I get an error Undefined class 'BackendlessUser' on the first line. This class is defined in src/modules/user_service.dat, which is exported by src/modules/modules.dartlike this:
library modules;
export 'cache.dart';
...
export 'user_service.dart';
which in turn is imported by backendless_sdk.dart like this:
import 'package:backendless_sdk/src/modules/modules.dart';
I would have thought that it would get imported indirectly by the import of backendless_sdk.dart, but apparently not. When I import it explicitly (with the same import statement, but now in my own code and not just indirectly in backendless_sdk.dart), I get a warning Don't import implementation files from another package. But it's not an implementation file; it's exported as part of the public API (at least that's what I understand the export statement to mean).
The Dart tutorial for creating packages suggests to place the export statements directly under lib, not in lib/src, so I'm wondering whether this is an error in the structure of the plugin, or whether I'm doing something wrong.
I'd be grateful both for a solution to this particular problem and also for pointers to how I can better understand packages, libraries, imports and exports in dart; unfortunately I don't find the language specification particularly helpful in this regard.
(The error and the warning are the same whether I use flutter analyze or IntelliJ IDEA.)
The problem has been fixed in the 0.0.3 version of the plugin. Please update the backendless_sdk version in your pubspec.yaml.
You can include the only one import now:
import 'package:backendless_sdk/backendless_sdk.dart';
Please also note, that there are some changes in the syntax. So for your example you should use:
var user = new BackendlessUser()
..email = "info#example.org"
..password = "password";
Backendless.userService.register(user);
Thanks for using Flutter SDK and pointing out this issue.
It's indeed the problem in the structure of the plugin. The Backendless team is aware of it and this problem will be fixed in the next release of the plugin.
For now you can import explicitly and suppress the warning.

Have Matlab type a string as if from keyboard

I was wondering if anyone knew if it is possible to have MATLAB type a string for you, as if the user had typed it on the keyboard. I believe it can be done using a shell script or an applescript, but I was wondering if Matlab had a native implementation.
I have tried searching around for it, but have not had any luck. It is not super necessary, but I am just super lazy and want to write a script that will automatically enter information into an application after MATLAB has calculated stuff.
If you know of another simple way of doing this, let me know as well. Thanks a lot!
EDIT:
Adding some code that I used in response to an answer below, using the Java Robot Class
function robotType(text)
import java.awt.Robot;
import java.awt.event.*;
SimKey=Robot;
for i = 1:length(text)
if strcmp(text(i),upper(text(i))) == 0 || all(ismember(text(i),'0123456789')) == 1
eval(['SimKey.keyPress(KeyEvent.VK_',upper(text(i)),')'])
eval(['SimKey.keyRelease(KeyEvent.VK_',upper(text(i)),')'])
else
SimKey.keyPress(KeyEvent.VK_SHIFT);
eval(['SimKey.keyPress(KeyEvent.VK_',upper(text(i)),')'])
eval(['SimKey.keyRelease(KeyEvent.VK_',upper(text(i)),')'])
SimKey.keyRelease(KeyEvent.VK_SHIFT);
end
end
end
Warning, code may not be the best, but hey it was written in like 5 minutes.
I ended up writing an applescript to do everything that I needed Matlab to do. Unfortunately this will not help the Windows people, but myself and the other people using the script are mac users, so it works for us.
I have however, edited my question above to include code that I used initially in Matlab to auto type things. Simply run command as robotType('SomeString') and it will type that string.
I do not believe it will hand spaces or random characters that well, or at all, but it is good enough for abc123. Sorry for no final solution on this.