Skip to content

Ignore image name while getting hash

I’m coding a program which’ll take an image for an input, check it against images in a database and output the image with the same hash However, when using hash(“imagepath”) 2 of the same images give different hashes, even when the only difference is the image’s name, which makes…

Running a for loop or .apply with a pandas series

I’m trying to run a for loop or .apply using lambdas for my pandas series. Here’s the code: What I’m trying to achieve is for each word in df[‘Filtered_text’], apply the analyzer.polartiy_scores(x[‘Filtered_text’]) through the column. An example of what is stored in d…

mention user from string(name#discriminator) discord.py

I have an user in str format, for example: I want to convert it into a member to be able to do: I tried: and: both make member NoneType, the name and discriminator are fine. Answer If you have both the username and discriminator, the best way to get that member would be like this: ALSO: Make sure you have

Import homemade package without duplicating name

I’ve built a package which I distributed through PyPI. The upload, download, installation, and the package itself, all work fine. My problem is that in order to run it I need to call the package name twice, which I want to avoid. I want it to go like this: But it only works like this: Rather than having…