Category "python-2.7"

Detection and classification of objects placed in front of a video camera

Through this code, I aim to detect an object in real-time that will be put in front of the video camera and classify it. My reasoning is the following I tried t

Can't migrate after makemigrations on django

everyone. I newbie in this field. So, After I finished makemigrations. then I migrate this error code occurs. I try to solve it but still stuck. please guide, I

My Kali linux showing 'No module named importlib' 'from importlib import import_module'

Trying to install build dependencies with pip which is installing in /usr/local/lib/python2.7/dist-packages As I try to install proceed gives an error Collectin

CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team

I'm getting this error: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/OpenSSL/crypto.py:14: CryptographyDeprecationWarning: Python

How to create ratios using value counts and separate fields in Python?

Using the data frame shown below I'd like to create manager to assistant and manager to associate percentages/ ratios based/ per location. I'm looking for the

How to import other Python files

I have this file, abc.py: def asb(): print("Hello, ") def xyz(): print("World!") In my main.py file, from abc import asb from abc import xyz I want

Run a UNIX script to use different versions of python

I have a UNIX script which is used to initialize the environment and properties of the project. It uses python. I had to refer the path. This will be used as a

Zipping a list of folders with Python

everyone. I'm really new to Python, so I need some help here. I have a list of folders names inside a .CSV file. All these folders are inside the same path. I n

input() error - NameError: name '...' is not defined

I am getting an error when I try to run this simple script: input_variable = input("Enter your name: ") print("your name is" + input_variable) Let's say I type

Need to add row above the headers of Dataframe in pandas

I have a dataframes, I need to add 8 rows above the header of dataframe, I am sharing dataframe and the desired output Dataframe:- Toll No. Vr.name

What is the last grpcio version to support Python 2.7?

The company I'm working for is still in the process of going over from Python 2.7 to Python 3, so I'm stuck with Python 2.7 even though it is officially already

python can't find sqlalchemy

So I'm trying to run a python application that I did not make but I need to make it run and I don't want to edit the huge spaghetti code in here. It was made se

Move Linear Actuators using softPWM wiringpi

I am using softPWM from wiringpi library to control linear actuator speed and direction. I have raspberrypi 4b connected to BTN8982TA motor driver which is in-t

How to update multiple Lambda functions from python 2.7 to 3.6

I have approximately 13 Lambda functions with triggers on python 2.7 runtime environments. I need to update to 3.6 What is the most efficient way to do this? Do

How to delete older files and keep last day files for each month in python

I need to retain the backup file started on 31st april and ended next day May 1. backup timings differ for each folder, but the backup files are identical

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 8: ordinal not in range(128)

I'm getting this error on this line: logger.debug(u'__call__ with full_name={}, email={}'.format(full_name, email)) Why? The contents of the name variable i

Python blackjack: How do I structure an if statement to determine whether an Ace should be turned into 1?

I'm trying to solve a simple coding exercise: Given three integers between 1 and 11, if their sum is less than or equal to 21, return their sum. If their sum ex

How to create python 2.7 virtual environment using python 3.7

I have Python 3.7 && I would like to create a python 2.7 virtual environment to run some code that only works on python 2.7 How do I create this python

How do I read multiple integers from a line of input in python 2?

I am new to python. I searched and found out how to do it in python 3: v = [int(x) for x in input().split()] but in python 2 I get the syntax error. I need it

Python Could not import class

After transfer zope2 app from ubuntu12 to centos7, i get some errors that indicate that the classes are not loaded. How to check if all required libs of python