Skip to content
Advertisement

Tag: python-3.x

how to select a particlular portion of a window’s client area to display in window’s thumbnail in the taskbar in Python/PyQt5/PySide2/Tkinter?

I want to set a particular portion(like only a frame or widget) of my application window to taskbar thumbnail.I found one windows API that is ITaskbarList3::SetThumbnailClip here but this is in C++.I want to do this in python.However PyQt5 contains one class that is Qt Windows Extras which doesnot include this function.I have also found something that show one example

Call Python function using dynamic string variables

I am trying to create a dynamic method executor, where I have a list that will always contain two elements. The first element is the name of the file, the second element is the name of the method to execute. How can I achieve this? My below code unfortunately doesn’t work, but it will give you an good indication of

I cant find why `.read_csv` cannot make a dataframe for `.shape` to recognize

Following a machine learning guide here: https://www.pluralsight.com/guides/scikit-machine-learning/ Running Python 3.8, might have a hunch that I need to run it in IPython but I think that opens up a new can of worms. Also have all imported these libraries installed. I left %matplotlib inline as a comment because i’m not running it in Jupyter. The error I get when running

Cast a Python class to Numpy Array

Can I cast a python class to a numpy array? In the last step, I would like the to obtain an array np.array([X.x, X.y]). Instead, I get array(X(x=0, y=0), dtype=object). Can I provide method for the dataclass so that the casting works as desired (or overload one of the existing methods of the dataclass)? Answer From docstring of numpy.array we

Is it possible to create nested class attributes?

I’m pretty new to Python and have recently learned about classes. I’ve been experimenting around with them and have come up with a student/course grading system. Here’s the code so far: So this creates a course class, which I can add students to and set their rooms and other stuff. I’ve got another class, which is intended to store information

ML model not loading full batch

I tried to build a machine learning model using CIFAR 10 dataset, but I am encountering a bug that my model stops training past i = 78 (looped 78 times, see code for more). Sorry, I had to post the entire code because I cannot spot the mistake I made. Moreover, since I could not make it work, I tried

How to re.search module on python

In a part of my program, I have to check an email entered and I want to make it so any domain name can work for the checker, current code as below; Currently, this will work for any email in for example@email.com but as some emails are in the form example@email.co.uk so how can I can make ’emailFormat’ valid for

Advertisement