What is causing the route to change (ikely because form is submitting), i...
I am currently building a single page web app and wanted that js handle the form submission and so that route remain the same. But when i click the submit button route changes,JS...
View Articlepython-ldap coudl't be installed
I'm trying to install python-ldap, but this raise an error:"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL...
View ArticleI tried to create donut.mojo. is there a way to print in mojo without going...
from python import Python# from tensor import Tensor, TensorSpec, TensorShape# from utils.index import Indexfrom math import sin,cosfrom python import Pythonfn main() raises: let...
View ArticlePytorch reserving way more data than needed
I'm trying to finetune a sentencetransformer.The issue is that I'm running into an OOM-error (I'm using google-cloud to train the model).I keep getting that pytorch reserves ~13GB (theres ~14GB)...
View Articlenumpy TypeError: can't multiply sequence by non-int of type 'str'
After upgrading from numpy==1.22.2 to numpy==1.26.4 and python==3.9 to python==3.11 start getting errorssplits.sort_index(ascending=False).fillna(Decimal(1)).cumprod().sort_index(ascending=True)File...
View ArticleEncrypting and Decrypting a string from Input() not working using Python and...
I'm trying to create a application that will encrypt and decrypt data based on a key generated from a password that the user used. I'm using Pycryptodome and I get this error:ValueError: Data must be...
View ArticleNeuronal Network digit Recognition doesnt work own hand written digits MNSIT
In the code below I created a neuronal network with mnist data set to recognize handwritten numbers, it works for the mnist data set but for my own in windows 11 paint created 28*28 Pixel images it...
View ArticleFaulting module Qt5Core.dll
I am using the PyQt 5.15.xx library for our executable software. Unfortunately, on some computers, some antivirus programs trigger the following error. I don’t know how to solve this issue. I would be...
View ArticleResponse message is not displayed in the gradio UI which runs a python script...
I have the following problem at creation of an openai chatbot model:The assistant replies are not displayed in the gradio chatbox. Only the user input is displayed. There are no errors or warnings in...
View ArticleAlternatives to llama_index's download_loader for initializing BotoMinioReader
I am using llama_index package and I found this plugin that supposely allows to access MinIo files thorugh boto3 here but I can't get it to work./opt/project/src/core/loader/loader.py:3:...
View ArticleWhy my graph not plotting predicted values in different and my there are two...
enter image description hereI am encountering an issue with my Matplotlib graph where I'm seeing unexpected markings on the x and y axes. I've attached an image of the graph for reference. I'm unsure...
View Articlewarning C4996: 'Py_OptimizeFlag': deprecated in 3.12...
Newbie here.I have been trying to installen the openai library into python, but I keep running into problems. I have already installed C++ libraries.It seems to have problems specific with aio http,...
View ArticleModifying an excel file with dropdown lists using openpyxl
I'm trying to modify an excel file using openpyxl.The modifying part works, but after saving the changes all the dropdown lists/menus disappear. With dropdown lists/menus I mean that some columns have...
View ArticleHow can I color part of Slack incoming-webhook messages?
I want to compose a python script which sends a color-formatted message to a configured slack channel. I managed to send sentences of plain texts to slack channels but I could not figure out how to...
View ArticleHow to remove duplicates from list of dicts?
I have a list of dictionaries in python as follows:[{'category': 'software', 'name': 'irssi', 'version': '1.2.0'}, {'category': 'software', 'name': 'irssi', 'version': '1.1.2'}, {'category':...
View ArticleChanging legend entries in a seaborn-scatterplot when using hue and style
I have a subplot including a sns.scatterplot that needs to differentiate 2 characteristics:fig,ax=...
View Article2 Python Classes 1 File -> CustomTkinter Image cannot be loaded
In case of a project for our university, we tried to create an Adblocker. My Task is to create a UI for our blocking software. Therefore, I'm using the Customtkinter library.I created 2 Classes, the...
View ArticleTrying coding a 5 card poker [closed]
import random, timefrom random import shufflefrom enum import Enumclass CardSuits(Enum): Hearts = "Hearts" Diamonds = "Diamonds" Clubs = "Clubs" Spades = "Spades"class CardValues(Enum): Two = 2 Three =...
View ArticlePyspark: Python Vs Spark-Submit. Error: Class...
I am trying to write a pyspark dataframe to S3. This is my configuration:spark = (SparkSession.builder .config('spark.master', 'local') .config('spark.app.name', 'Demo') .config('spark.jars.packages',...
View ArticleInline Code Link in Sphinx + reStructuredText
In Markdown, one can create an inline code link like so[`dict.update`](https://docs.python.org/3/library/stdtypes.html#dict.update)Which renders like dict.update. How can get a similar behaviour in...
View Article