I have written a program to go on the Instagram explore page, and like the first six photos. Right now, I am using this rather convoluted method to find the “Like” button. I would much rather have it formatted like I did the “click the login button” section. So far, I have tried inspec…
Count members that they are connected to voice
I use this code to count discord members and I wanna add active mics to activity too (I mean the users that they are connected to voice) I tried many ways but I failed Answer I add it a loop that refresh the status.
how to apply Pandas.set_option (Python) to pandas.style objects
I have noticed that when we set some options for pandas DataFrames such as pandas.DataFrame(‘max_rows’,10) it works perfectly for DataFrame objects. However, it has no effect on Style objects. Check the following code : Which will result in : I do not know how to set the properties for Style objec…
Can’t return the first function from Bot.event on_message
Code Here’s (a little part) of my code: There’s no error raised with my code. Problem return makes the Spy command end, but events keep running. Question Do you know how to make all the events (on_typing and on_message aren’t the only ones) end with the return? Thanks in advance! Answer Answ…
Is there anyway to convert specific text data to csv format and give Header names in python?
I have this format of the dataset in a text file. Here the dataset link is https://drive.google.com/file/d/1RqU2s0dqjd60dcYlxEJ8vnw9_z2fWixd/view?usp=sharing I want to give the left side value as column name and right side values will be a row format. Output should be I have tried with text to CSV but not wor…
Plot a triangle contour/surface matplotlib python: tricontourf/meshgrid
Given the following image, where plt.Polygon was used to create the triangle and plt.contourf the contour, i would like to ‘cut’ off the regions marked in X so that i only get the contour inside the triangle. How would i do this? I’ve tried placing NaN values in the mentioned regions but the…
Implementing Insertion sort in Python
I am trying to write the insertion sort algorithm ( without the help of the solution in the book) and so far came up with this algorithm, when I matched it with the solution, it looks different. This is the code I wrote: Is this code still valid as an insertion sort? Algo in the book: Answer Looks like a
Python Regex pL matching issues
I’m trying to match a list of keywords I have, taking care to include all Latin characters (e.g accented). Here’s an example gives: Which looks correct. However: gives: This is wrong, as I expect a match for “u blah”. I’ve tried to also use Pythons built in re module, but I canno…
how to run issubset/issuperset on a list of sets will iterating through that list
i’m trying to figure out how i can identify which objects are a subset/superset within the list that holds them. and thereby remove them from the list. the first two are subsets of the last one. i’ve found a lot about comparing two different sets, but not sure how to implement that into an iterati…
Most efficient way to determine lowest valid number within a big range by only knowing whether your guess is too low
Let’s assume you want to guess a certain number(x) within a big range in Python. A simple external validation function, which you can call as many times as needed, will give you hints: If the number being tested is equal to or higher than the lowest valid number, it will, in both cases, return True (you…