Skip to content

Tag: python

Changing one data frame also changes it’s copy

Couldnt come up with a better title, so here we are. I am running the following code: As far as I understand, I first make a copy of ‘df’ and then I change the copy. What makes me confused is that when I run the second line, the ‘date’ column, becomes the index even in the ‘df&#8…

fields_view_get does not exist in Odoo 16

I was testing the modules of Odoo 15 that I developed in Odoo 16, I was using a lot of the method fields_views_get to have some behaviors to inject domain and context, before to render the component, but currently I can not find this method. Someone here knows what will be the alternative to achieve some beha…

Performance impact in having a single import per line

does anybody know if there is a performance difference between having all imports from one module in a single line vs one per line. For example, having: instead of: I’m trying to convince my team to use reorder-python-imports in our pre-commit hooks and this doubt is the only obstacle that prevents me f…

discord.py some commands simply dont run

after adding these commands my code has stopped working removing some help however adding them back adds makes it not process any commands i try don’t run besides the deleted message one i have tried using the await client.commands.process and it also dosent work. it dosent give an error it just sits th…

Docker run does not produce any endpoint

I am trying to dockerize this repo. After building it like so: I try to run it like so: It downloads the necessary libraries and packages: And then nothing… No errors, no endpoints generated, just radio silence. What’s wrong? And how do I fix it? Answer You appear to be expecting your application …

How to make dotted line in a binary array

how to create the dotted line in the below NumPy array bh=make_figure(b,’gh’) requirement: how to convert element 1 into 0 with the step of two expected outputs is like I tried with a brute force algorithm, but I am not able to find the solution output array looks like for visual representation li…