Category "python"

can't install mediapipe? python 3.8

I have tried to use pip install mediapipe, and other similar methods of pip install to install mediapipe as i need it for one of my projects. I am stumped and d

How to deactivate unwanted Twisted log output when using Scrapyd?

When using print method I am receiving log output I haven't seen before. I guess it's coming from Twisted module which seems to be a part of Scrapyd. I am not u

How do I filter outliers in test data based on z-scores of train data?

I have a train and test dataset. On the train dataset I detected and deleted outlier values, when their standard deviation is 5 times greater from the mean. If

can't install mediapipe? python 3.8

I have tried to use pip install mediapipe, and other similar methods of pip install to install mediapipe as i need it for one of my projects. I am stumped and d

Get list of all google sheets using gspread?

Currently I can connect using gspread and create/share a spreadsheet. I can also read data from said spreadsheet but I have to request it by name. Is there a wa

Failing to load model using multiprocessing on windows

This program works on Unix and I'm trying to transition it to windows. It uses multiprocessing and I understand it's an issue with being forced to use spawning

Get list of all google sheets using gspread?

Currently I can connect using gspread and create/share a spreadsheet. I can also read data from said spreadsheet but I have to request it by name. Is there a wa

Installation of taichi legacy branch on ubuntu 20.04

I am willing to work with code spgrid_topo_opt which needs taichi legacy to be installed first. To install taichi legacy following the instruction on the page I

Failing to load model using multiprocessing on windows

This program works on Unix and I'm trying to transition it to windows. It uses multiprocessing and I understand it's an issue with being forced to use spawning

Why is caplog.text empty, even though the function I'm testing is logging?

I'm trying to use pytest to test if my function is logging the expected text, such as addressed this question (the pyunit equivalent would be assertLogs). Foll

FastAPI serving static files through symlinks

I have mounted the static directory in my FastAPI app using the following code: from fastapi.staticfiles import StaticFiles app = FastAPI( title="Title of

ValueError: source code string cannot contain null bytes while import sklearn

I'm trying to import MinMaxScaler from sklearn.preprocessing. when I run my code this error appears that refers to the import line: ValueError: source code str

Why does Django use `Meta` inner class in models?

If I want to describe some information such as ordering, if the model is proxy or abstract, which fields must be unique together, then I need to put this inform

Time Complexity of Determinant of a Matrix using cofactor method

Trying to use the method found on a web to get the determinant of a Matrix. But I am not sure about the time complexity of this method because of the recursion

How to bypass Cloudflare bot protection in selenium

I need to grab some information from a site just for education purpose, however i cannot send requests because of the protection. I get The typical Checking-you

How to redirect to dynamic URL inside FastAPI endpoint

I'm doing a feature where the user on their profile page makes changes (not related to the user model). Everything is implemented through static HTML templates.

Shap value plotting error on Databricks but works locally

I want to do a simple shap analysis and plot a shap.force_plot. I noticed that it works without any issues locally in a .ipynb file, but fails on Databricks wit

Dictionary appends to same parent

I am trying to append to the parent but Python doesn't append to the parent. data = [(33, 'paypal.com', 'Alexa Pages'), (33, 'paypal.com', '404 Pages'), (32, 's

Pause a for loop, save progress and resume it another time?

In python(3) I'm coding a script which uses a recursive for loop (the for loop calls it's own function various times) and I know the script will only finish aft

How do I get wind in km/h in PyOWM?

I made a program that retrieves the current weather in users city using PyOWM. I am having trouble understanding how to display wind using km/h in PyOWM. I trie