Category "python-3.x"

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

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

issue with python-mysql library with in Docker

We have a peculiar situation. I have inherited some source code from the people who left the company. in docker file they are installing the mysql driver via ap

issue with python-mysql library with in Docker

We have a peculiar situation. I have inherited some source code from the people who left the company. in docker file they are installing the mysql driver via ap

How to download alots of page by twenty-twenty

I have an app that download a books, where each book can contain a random pages. So I coded a logic using threading: while pagenum < (int(Book["total_pages"]

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

Transform a dataframe using pivot

I am trying to transform a dataframe using pivot. Since the column contains duplicate entries, i tried to add a count column following what's suggested here (Qu

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

ImportError: cannot import name '_gi' from partially initialized module 'gi' (most likely due to a circular import)

Looks like I have broken my python installation when I wanted to switch to python 3.8. Using Ubuntu 18.04. Trying to use the gi, gives the following error: $ p

(Keras) ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type float)

I know this problem has been answered previously in the link below,but it does not apply to my situation.(Tensorflow - ValueError: Failed to convert a NumPy arr

How to get ALL product names and keywords from Aliexpress with API?

I want to get ALL product names and keywords from Aliexpress and put them into CSV file for example, is there any way to do that? I did not find any solution ye

Error deploying the apache:superset image on Kubernetes

I am trying to deploy the latest docker image apache:superset on Kubernetes. When I deploy the YAML I get below error: [2021-04-29 01:34:10 +0000] [8] [INFO] St

AttributeError: 'Sequential' object has no attribute '_get_distribution_strategy'

I am following an online course through linkedin regrading the Building of models through Keras. This is my code. (This is claimed to work) import pandas as p

I am using try-and-except in a function. And other functions which can cause value errors, but it doesn't raise Exception. IDW?

Here's the code: def TryExcept(foo): try: print('Using TryExcept') foo() except (ValueError, TypeError): print('Type or Value Er

Python - Creating simple Algebraic Decision Diagram (ADD) with py-mdd or dd packages

I would like to create and ouput a graphical representation with Python 3 of an Algebraic Decision Diagram (ADD) [Bahar et al.]. Here an example of an ADD to ou

pdfkit [WinError 740] The requested operation requires elevation python3

I would like to convert an HTML page into a PDF file, based on the given URL. I have tried pdfkit, but it throws the following error: [WinError 740] The request

Variable args and keyword only args in a function

I was going thru PyTorch and found function signatures like torch.zeros(*size, *, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False)

Terminate child process on subprocess.TimeoutExpired

I have the following snippet of code: def terminal_command(command, timeout=5*60): """Executes a terminal command.""" cmd = command.split("

How can I join strings within a list in Python? [closed]

I have the following list: values = ['A', 'C', 'B', 'D'] Is there a way I can get it to output the list as the following string? result = 'AC

Fill missing date and time in Python (pandas)

I have a large data set, a sample is given below. The data is recorded for 1 day with 5-min interval for 24 hours for 3214 unique ids. The time and date informa