Skip to content

Pointer argument passing in python ctypes

I have the following c function. This function returns outbuf, the output length is unknown before calling the function so the function receives a pointer to the length as an argument outbuf_len, also the caller is responsible to free outbuf. I want to get the result of this function from python, so I started…

Image uploading in Flask blog with CKeditor 5

I’m stuck with following problem while creating my Flask based blog. Firstly, I used CKeditor 4 but than upgraded to 5 version. I can’t understand how to handle image upload on server side now, with adapters etc. As for 4 version, I used flask-ckeditor extension and Flask documentation to handle i…

Parse multipart/related emails

I’m trying to parse emails and convert tables within them into pandas dataframes. Since some of the emails are multipart, I took some code from this answer. The following code works fine but it breaks with multipart/related emails (no tables are found). Here’s the header of one of the multipart/re…

Pandas – Groupby and Standardize

I have tried to tackle this for quite some time, but haven’t been able to get a pythonic way around it by using the built-in groupby and transform methods from pandas. The goal is to group the data by columns ex_date and id, then within the groups identified, standardize the column called ref_value_1 ag…