Different runtime behaviour comparing setting breakpoint, and not setting...
This is a really strange problem.I have a python program.When I step through a specific called function, in debug, it works.However when I let the ide just run it without stepping (or breakpointing)...
View ArticleI can't use templates for HTML in VS code in a project with jango and vs code...
enter image description hereenter image description hereI can't use templates for HTML in VS code in a project with jango using the "! + tab" combination, because vs code thinks it's a different file...
View ArticleRecognition different steps in a video
I have access to several videos. I would like to create a machine/deep learning model that can recognize different steps in a new unseen video.For example: let me keep it simple and give an example of...
View ArticleUse a period (.) to separate thousands in the highchart tooltip
Although I have researched many ways to use a period (.) to separate thousands in the highchart tooltip, it does not seem to work. For example, 'lang': { 'thousandsSep': '.' }."This sentence expresses...
View Articlepython unittest ModuleNotFoundError: No module named
I tried to crate simple Python project with flask and unittest. Structure is quite simple:classes |-sysinfo |static |templates |- index.html |- layout.html |__init__.py |sysinfo.py |printinfo.py tests...
View Articlepython --version then it would display the python version. Why?">On writing, > py --version result is "No installed python found!" But When I...
On writing, py --version result is "No installed python found!" But when I write python --version then it would display the Python version. Why does the result differ AND WHY doesn't it display Python...
View Articlenot able to fetch the Instanceid and tags via eventbridge cloudtrail pattern...
Following the below eventbridge rule on cloudtrail event to get the instanceid, tags value from lambda{"source": ["aws.ec2"],"detail-type": ["AWS API Call via CloudTrail"],"detail": {"eventSource":...
View ArticleLiteLLM and Llama-Index Service Context creation
I am going crazy with finding a solution to this. I am working with a proxy server for OpenAI models. I'm using an ssh tunnel to hit the server on my localhost.from openai import OpenAIclient =...
View Articleinstalling gstreamer with pycharm
I am trying to create a video player in python but I cannot figure out how to set it up.I did try to import it with import gst and 'import gstreamer' however pycharm did not recognize it, it did...
View Articlepsycopg3 pool: all connections getting lost instantly after long idle time
If it's a standalone persistant connection, I have no problem, connection lasts for hours.If I use psycopg(3) Connection pool, I make make requests and during a period of time I no problem. But at one...
View ArticleFlatten list of dict (array) as new columns not working with json normalize
Apologies as I'm quite inexperienced with Python and looking for assistance here 🙏I am trying to flatten a list of dicts into new columns in an existing dataframe, with using key as column names and...
View ArticleHow can I insert a table in the middle of a document with python-docx?
I am using the python-docx library to modify an existing docx file. I want to add a table to the fifth line of the document. the issue is that when I use document.add_table( ), the table is added at...
View ArticleWhy my playwright python code does not locate 'input'?
I'm trying to locate 'input' and fill some value, but the locator does not work properly.from playwright.sync_api import sync_playwrightfrom nested_lookup import nested_lookup#Binancewith...
View ArticleHow can I change data in pandas dataframe by condition?
I need convert pandas dataframe.I have dataframe:data10SGD01|AA169|10SGD01|AA170I need to get:data10SGD01AA169|10SGD01AA170I try:df['data'] = df['data'].str.replace('|(?=AA)', '', regex=True)This regex...
View ArticleHow to save a python dictionary into sqlalchemy
I need a ((simple)) way to save python dictionary of string type to sqlalchemy , I won't link to any website, I'm tired of reading so many articles.the dictionary I have it from json string...
View ArticlePygame on Android
I was wondering if someone could give me a detailed explanation on how to run a game/app developed using Pygame on an Android phone. I recently finished programming PacMan and it works perfectly on my...
View ArticleASK-SDK Python - How do I use multiple permissions in ASK-SDK simultaneously...
Essentially, I have a skill which already has code for reminders in it: and to check for permissions and ask for them I have the following code: ... permissions =...
View ArticleCreate a trading signal variable in Python
I have a dataframe with a price series and the z-score of that price series. I want to create a signal variable for buy and sell signals with the following conditions:Buy signal (=1) if the normalised...
View Articledisplaying choice in django admin
im making a reservation app, i want one of the ways to see the data being in the admin panel but right now i can see everything except for the time, i think it is because its a choice field and in the...
View ArticleWhy Elliptic Curve Point Addition and Point Doubling give different results?
Why Point Addition and Point Doubling return different points for the same number of P? Like the value of 8P is different when doubling 4P and when adding 4P and 4P in the code below.I've used this...
View Article