Skip to content
Advertisement

Discord Python Allow one user to identify another within command

I’m working on a bot for discord that tracks information related to a game. I would like staff members to alter the data of regular players with a bot command. Is there a way to grab the mention out of the command? &do_thing @target specifics I’m familiar with extracting the nickname and discord ID for the author. I need to

python tkinter “in” operator doesn’t work

my problem is the programme won’t state the answer as correct only if you put the answer alone, but i want to make that you can actually put a phrase in the entry widget and if the answer is in that phrase it would say correct, i made this work without tkinter but i canno’t make it work in tkinter

Python – Scraping a PDF file from a URL

I want to scrape pdf files from this site https://www.sigmaths.net/Reader.php?var=manuels/ph/physique_pilote_7b.pdf I tried this code for that but it doesn’t work. Can anybody tell me why, please? Answer your url is pointing to a reader https://www.sigmaths.net/Reader.php?var=manuels/ph/physique_7b.pdf, remove the ‘reader.php?var= for the actual pdf

duplicated rows in pandas append inside for loop

I am having trouble with a for loop inside a function. I am calculating cosine distances for a list of word vectors. with each vector, I am calculating the cosine distance and then appending it as a new column to the pandas dataframe. the problem is that there are several models, so i am comparing a word vector from model

Proplot colorbar from custom cmap

I’d like to add a colorbar to my figure from a Colormap object rather than using a mappable (such as returned from imshow. From the docs I think this should be possible using option 4. I’m using the following code: This gives the following result: Which almost what I want but I’d like to color bar values to ranges from

Advertisement