Pandas Rolling window Spearman correlation

I want to calculate the Spearman and/or Pearson Correlation between two columns of a DataFrame, using a rolling window. I have tried df['corr'] = df['col1'].rolling(P).corr(df['col2']) (P is the...

Certain protractor API functions cause errors

Why am I receiving errors when I use Protractor API functions? I have scoured the internet for solutions to this problem and I found a couple similar answers, but they didnt work and so I'm asking...

Autocorrelation function for different shifts with Python

Hi there I'm trying to get a list of autocorrelations for different shifts. My code is the following: thetas = np.array([0.24233997, 0.33467202, 0.35020237, ...]) autocorrelation = [] for shift...

How can I combine coverage results with tox?

For my mpu package I have execution-environment dependend code like if sys.version_info < (3, 0): pass # do something else: pass # do something else and a tox file [tox] envlist =...

Error using perl module Parallel::ForkManager

I am getting the following error message when I am using the perl module Parallel::ForkManager, and I can't figure out what's wrong in my code. What's weird is that the program run fine for the...

ng build spills a lot of errors... can't launch my app

I don't know what happened. I was coding... then everything just broke. When I run ng build or ng serve, I now get the following error messages: ERROR in ./node_modules/saucelabs/index.js Module...

How to avoid Memory error in Jupyter Notebook

I was running the program in Jupyter notebook. import numpy as np import scipy as sp import matplotlib.pyplot as plt f=sp.fromfile(open("RSM_07_02_2019_lpf_v1"),dtype=sp.float32) ...

Training a simple model in Tensorflow GPU slower than CPU

I have set up a simple linear regression problem in Tensorflow, and have created simple conda environments using Tensorflow CPU and GPU both in 1.13.1 (using CUDA 10.0 in the backend on an NVIDIA...

Mocking of celery worker gives authentication error

I am following documentation for the celery testing to test my celery task. I also using PyTest-bdd for BDD testing. My project structure are as below myprj/ ├── __init__.py ├──...

Internet explorer 11 & webpack V3 - doesn't bundle css variables

I'm working on a React\Redux project, bundled with webpack. After upgrading webpack V1 to V3, IE (11) support is broken, some of the elements have the attached css rules and IE can't handle it. On...

std::vector< int64_t> trduced from c++ to java returns SWIGTYPE_p_in64_t which is unusable

I am trying to use swig (v3) to transform a function which have a std::vector<int64_t> as entry to a java code. but when compiling with swig, I got a file with a class StdVector_int64 with a...

Django test setup fails when running single test file

The immediate symptoms: $ pytest …/apps/users/test/test_graph_permissions_command.py ============================= test session starts ============================== platform linux -- Python...

Running pytest-qt on CircleCI

I am attempting to run tests which require pytest-qt (for testing PySide2 dialogs) on CircleCI. I am getting the following error: xdpyinfo was not found, X start can not be checked! Please install...

Problems with Parallel and Rcpp Armadillo: Possible variable corruption between cluster workers

I am having some problems with using Rcpp (and Rcpp Armadillo) with the parallel package, and I am getting incorrect results depending on the number of cores I use for computation. I have a...

I keep getting random variatons of the same two errors when downloading files in Android Studio through Ion

I am new to programming in Android Studio and I keep running into problems with asynchronous downloading (at least, that is where I think the problem is). I am trying to make an app that will...

Can't adjust the size of input and output arrays while doing a Kalman Filter with pseudoranges data

I'm doing a project on Kalman Filtering. I have to use the pseudo-ranges coming from the viewed satellites. But the number of satellites viewed changes in time so sometimes the arrays of the...

Python click project, "Django is not available on the PYTHONPATH " error

I am having a click project which don't use/need Django anywhere but while running prospector as part of static analysis throws this strange error *Command* prospector -I __init__.py --strictness...

Why is pip installing an incompatible package version?

I am using pip 20.0.2 on Ubuntu, and installing a bunch of requirements from a requirements file. For some reason, pip is deciding to install idna==2.9(link), even though that is not a compatible...

Problems with Protractor when running 'ng serve': critical dependency

My team and I just updated from Angular 7 to Angular 8. When I tried to run 'ng serve' after had executed "git pull" to updated my local repository, I started to have execution problems. I was...

Breaking change for google-api-python-client 1.8.1 - AttributeError: module 'googleapiclient' has no attribute '__version__'

After upgrading to the new google-api-python-client 1.8.1 I'm receiving this error. Do we know if python 3.8 breaks the latest google-api-core? And whether there's a solution Traceback (most...

WTForms 2.3.0 breaking change - ImportError: cannot import name 'HTMLString' from 'wtforms.widgets'

WTForms was updated to 2.3.0 with a breaking change. I have tried adjusting other requirements such as werkzeug.1.0.0 but no luck yet. Has anyone found a solution? Here is the stack...

Fatal Python Error when running pytest with QT

I'm new to pytest and I'm having trouble trying to run one of my test files. I'm getting the following output: ================================================== test session starts...

How to graph 2 column dataframe into multiple violin plots with seaborn

I'm struggling with getting seaborn to work for me. I've looked at several tutorials, and nothing seems to be working. First column is float values, second column is class labels. I'm wanting...

Trouble with Stryker and Jest

I'm testing Stryker with Jest. Stryker seems to don't apply Jest test. The two mutants don't pass test if I introduce them manually in code, but they pass when I use Stryker. Test doesn't seem to...

Installing cartopy from pip exits with various errors on Linux Ubuntu 18.04

The shell command pip install cartopy led to several errors. At first, the following error occurred: ERROR: Command errored out with exit status 1: command:...

Angular 9 display data from nested json, fetched from rest api

I would like to know how to display certain properties from nested json data fetched from REST API. It only shows as [Object object][Object object]. However I want to access and display properties...

pytest finds no tests

I checked this issue on multiple posts and I think I have all the requirements met but pytest still finds no tests. My test class is called test_login.py Its contents are: class TestLogin: ...

seaborn.kdeplot (pandas.DataFrame) - ValueError: If using all scalar values, you must pass an index

I want to make a kdeplot for my pandas dataframe. I used the code below: mean = [0,0] cov = [[1,0],[0,100]] dataset2 = np.random.multivariate_normal(mean,cov,1000) dframe =...

conda install pyspark 2.3.1 InvalidVersionSpecError: Invalid version spec: =2.7

I am trying to install pyspark to my virtual environment on a Linux box. Following code was used and it was previously working fine. All of sudden we are facing an issue. conda install -q -y -c...

Using poetry on different machines

I am working on a Python project and recently started using poetry. I was originally working on the project using macOS 11.0, but as I near completion, I wanted to test it on a Linux workstation....