Category "python"

opencv face detection problems

Please help me resolve this **openCv **problem in faces import cv2, time first_frame = None video = cv2.VideoCapture(0) while True: check, frame=video.read(

Non Linear Decision boundary SVM

I need you guys help to find a non linear decision boundary. I have 2 features with numerical data, I made a simple linear decision boundary (see picture below)

How to make a discord bot generate invite links from other servers, (Discord.py or py-cord)

I am making a discord bot in discord.py, py-cord, and I was wondering if it's possible to have the bot generate a discord invite for a server and send it to you

ValueError: time data 'datetime' does not match format '%d/%m/%Y'

import csv with open('./scrubbed.csv', 'r') as f: reader = csv.reader(f) for row in reader: new_date =dt.datetime.strptime(row[0], '%d/%m/%Y') format_d

ValueError: Could not find a backend to open '10.jpeg` with iomode `ri`

I am new to MaskRCNN. I have added 15 images to the dataset/train folder however, while running the code I am getting error for the line image = skimage.io.imre

zipfile and shutil not keeping the file exif data

I have a .zip archive and within it a single .dng image file with metadata about exposure time, etc. When unpacking this achive using either shutil.unpack_archi

Inequality not supported between instances of 'str' and 'int'

So I basically made a algorithm which takes the users input and decided on a rank from 1-100 and puts it on a UI. THe problem here is the find function and when

Parsing outlook .msg files with python to get HTML body

I looked around on StackOverflow and couldn't find a satisfactory answer for getting an HTML body from the msg file. Does anyone know how to parse .msg files fr

Error while translating the data-frame column in pandas : IndexError: list index out of range

I am trying to translate a column of my dataframe. Using the below code: # Import the library: import googletrans from googletrans import Translator # Create

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

MIME type ('text/html') not a supported stylesheet MIME type, and strict MIME checking is enabled in Django Web Application

I am hosting a Django web application on a cPanel web hosting server. I have the application up and running however it is not applying the CSS stylesheets to my

Python - Is there a good intermediary format to export mixed data to multiple filetypes?

I have a model which generates output in the form of numpy arrays, text and plots. It currently holds this output as a dictionary. There are requirements for th

Django Quill Editor Display Saved Field

It's probably really simple, but can't figure out how to do that... I have one really simple model: from django.db import models from django_quill.fields import

How to replace values in column when other column is not nan or replace with other?

I am new to Pandas, I am looking for solution where I can replace one column values with other columns. For eg: Replace value of col A with the values in Col E

How to typehint the return value of a function that takes other functions

I have a function that accepts other functions, and would like to type-hint the return value of this "wrapper" function. The function is similar to this below,

How to typehint the return value of a function that takes other functions

I have a function that accepts other functions, and would like to type-hint the return value of this "wrapper" function. The function is similar to this below,

Google Analytics response to Pandas Dataframe in Python

Still a newbie to Python so please be gentle. I'm trying to parse a Google Analytics Reporting API V4 response to a Pandas dataframe in Python, specifically usi

Iterate over lists inside a dictionary

Is there any way to iterate over lists inside a dictionary. A key inside dictionary contains a list which needs to be iterated over separately from the other li

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

Python pandas : pivot_table simple string aggregation and sort

I'm trying to achieve something with pandas which is very straightforward to do in Excel PivotTable: From what I've seen, the following code seems logic, but