Category "python"

Got Error while installing mysqlclient in django project on cPanel

Requirements.txt contains: asgiref==3.4.1 Django==3.2.9 django-isbn-field==0.5.3 mysql-connector-python mysqlclient phonenumberslite==8.12.42 Pillow==9.0.1 pyth

Issue fitting a SGD Classifier

I'm following the book Hands-on Machichine Learning by Aurelien Geron, more specifically, where it begins to go into classifiers. I'm following the code from th

How to loop through folders in Azure Blob Containers

I have the following code which is written in Visual Studio Code. Now I want to run this in Azure Databricks. I have uploaded the entire folder to my Azure Blob

Generate a GMM Dataset by using multivariate_normal from scipy.stats

How can I use from scipy.stats import multivariate_normal to generate data? In specific, I want to create a GMM data that contains 3 columns (features) and a la

Python in C DLL

I just created a DLL in C with Python in it. When I export my function with python functions in it, I can't call it in my Python code But when I export a classi

How can I filter rows out if their start date is within 90 days from today and place them out until the 1st of the following month in R?

I am having difficulty finding the words to describe what I am searching for but will try. I would like to solve the following using R or Python (but preferably

How to render user profile (actual image) instead of filename in a Django form which basically update user-account

I am following a Django course on youtube, and I need a small change in my Django form. The form looks like: Rendering the form fields in 'edit-user.html' temp

How to plot a streamplot in python for a streamline flow arround a cylinder?

I have written a program where it takes a radius range(R to 5) and theta range(0 to 2pi). It converts the polar coordinates to Cartesian coordinates. Then I hav

Failed building wheel for Pillow Command on cPanel

The first issue I had was I needed to upgrade pip to the latest version. Once I did that I was able to run pip install pillow however I get the following error.

Pyqt5-tools installation error on Widows 11

Downloading when I downloaded Pyqt5. But when I try to download Pyqt5-Tools, I'm getting an error. I using Windows 11 When using Windows 10, it was easily downl

'pipenv install <package>' fails on fresh python3.10 installation

Just installed a fresh copy of Python3.10 via Pop OS, followed by pip and the python Pipenv package. Installing pip packages works fine globally, but if I try t

How to read exif metadata from jpg file using only python, without any library?

I am trying to extract exif metadata from jpg file but hit a wall in between. I am following this( https://www.w3.org/Graphics/JPEG/jfif3.pdf ) but not sure if

How to fix the error: takes 1 positional arguments but 2 were given?

Problem: I would like to fix the error below. f() takes 1 positional arguments but 2 were given My code: import math delta_x = 0.001 def integrate(func, z, w)

python this gpiozero method is not working right of the bat

from gpiozero import MotionSensor While true: MotionSensor(17).when_motion() print("motion detected") returns error: Traceback (most recent call last

Flask restful api with mysql backend crashes when more than 2 apis are called from angular app

We are working on a test project and really do not know Flask and Flask restful much. Our python is not good as well, the problem is, we have developed an API s

Hashing gives different result

I am using Python and MySql to handle user authentication. I have added the users thru python with the exact same method, but when I try to do the "login"/authe

Scene Text Image Super-Resolution for OCR

I am working on an OCR system. A challenge that I'm facing for recognizing the text within ROI is due to the shakiness or motion effect shot or text that is no

Why is my Pytorch code significantly slower than Tensorflow?

I am trying to move my code from Tensorflow to Pytorch. Before doing this, I just simply test myself two frameworks. I expected two frameworks should show simil

Converting windows paths to pathlib.WindowsPath() within a function in python

Edited for clarity I need to be able to copy and paste a windows path directly from file explorer into a function which turns it into a pathlib.WindowsPath() ob

Unexpected errors happen on working script

I'm relatively new to python and only recently tried some small scripts with it that can be used for my needs (just simply interact and automate with some parts