Category "python"

Why win32com doesnt show me all emails

I want to parse emails in python through the Outlook application. Running this code I get only a few of my emails. import win32com.client outlook = win32com.cli

Why doesn't python3's print statement flush output when end keyword is specified?

from sys import argv, stdout as cout from time import sleep as sl print("Rewinding.......",end = '') # If end is given output isn't flushed. But why? cout.flush

Using numpy.where function with multiple conditions but getting valueError

So I have a dataframe with multiple columns with numbers in them. It looks like this: H C T P R 300 200 500 0.3 500 400 300 0.2 I'm trying to perform operat

How to Scrape Discord members using Python?

I am trying to scrape members of a Discord server. This is code I am using. But I am running into KeyError: 'guilds'. Can anyone please help me with this? impor

3d model looks inside out or distorted outside and perfect inside (VULKAN)

Any 3d model loaded into my vulkan code is perfect inside and wrong outside.How can I make outer surface look like inner surface? It is like the same in 3d mode

How to display existing annotations in dcc.Graph

I'm working on a tool that loads some of my precomputed annotations in the form of bboxes = [ ((x0, y0), (x1, y1)), # annot 1 ... # more

Date interval average Python pandas

This is my dataframe: ID number Date purchase 1 2022-05-01 1 2021-03-03 1 2020-01-03 2 2019-01-03 2 2018-01-03 I want to get a horizontal dataframe with alle

porting PIL python 2.x to pillow python3.10

I am trying to port an old library from python 2.x which uses PIL to Python 3.10 with PILLOW. right now I am stuck the old library uses the fromstring command:

Python Dictionary: How to get the longest key for the longest value?

dic = {'a':4, 'b':5, 'cd':5 } I'm trying to find: highest value (search for the highest value first => b, cd) longest key (then search for the longest key

Import python file of parameter values and options within a for loop

I have code that reads in parameter values and options from an external python file using import optionsFile as my, I then use these values in the rest of the c

Hey guys. I am having problem on my code on python

I am having problem on how to code this one: def letter_count(word): ans = {} word = ''.join(j for j in word if j.isalpha()).lower() for j in word:

mapping [x,y] coordinates on plane aruco defined plane and servo movement on mapped points

I am new to this and I am sorry to poorly ask but I don't know where else to search. I have 4 Aruco markers placed in a square position respectively by ids 0 1

How to use loop in this case inside the function?

def get_day_type(info): day_type = (info[info.find("(")+1:info.find(")")]) holiday = ["Sun", "S

How to reduce the size of my dataframe in Python?

working on NLP problem I ended up with a big features dataset dfMethod Out[2]: c0000167 c0000294 c0000545 ... c4721555 c4759703 c4759772 0

How can I copy blob files from one account to another in azure

I have tried copying azure blob files from one account to another with the following python script ... source_block_blob_service = BlockBlobService(source_accou

I want to animate the solar system with python matplotlib

So basically I have this project at school where we decide something we want to plot. I decided to plot the solar system animated to find out when is the next t

Weird address issue with linked list implemented by numba jitclass

I'm trying to implement an LRU cache with doubly linked list and hash map. The doubly linked list is quite simple to implement by following the official example

Flatten list of dictionaries in dataframe

I'm pulling data with Facebook Insights API and there are nested columns in the data I pull. I tried separating them by index but failed. column I want to split

How can I plot Gaussian pseudo-random noise for N = 2?

How would one plot the Gaussian pseudo-random noise when N = 2 from the given code below? I don't know how to incorporate N into the formula in the code. I need

BeautifulSoup getting href of a list with ++ 10k records

BeautifulSoup getting href of a list with ++ records I have the following soup: <a href="some_url">next</a> <span class="class">...</span&g