Convert to UTF-8-BOM memory optimiztion
Is there a better way to write this code section in Python with an emphasis on memory usage?convert csv from UTF-8 to UTF-8-BOM ( work better with Hebrew )def convert_csv_to_utf8_bom(input_file_path,...
View ArticleDebug python program in VSCode remote window with sourced enviroment
I'm developing a ROS2-application in python and the source code is on the robot and needs a specific environment to run/debug. This environment is setup by sourcing a file, so if I run it manually, it...
View ArticleAWS Glue Job: SchemaColumnConvertNotSupportedException when trying to write...
I have a table in the AWS Glue catalog that has datatypes of all strings and the files are stored as parquet files in S3. I want to create a Glue job that will simply read the data in from that...
View ArticleWhere is the bottleneck and spikes
I have a Async FastAPI endpoint. This endpoint essentially at a high level gets data and does some simple business calculations and returns a json model.It makes 3 database queries within...
View ArticleBlack bar underneath the x-axis of my plotted graph in python
Just started Machine learning as a course in college and I stumbled on this issue. I think it's because of the data being too large that the x labels are bring overwritten/I don't know what to do...
View ArticleString Matching Function Not Matching Strings Despite Threshold Set to 0
I have implemented a string matching function in Python utilizing n-grams and similarity ratios. The function signature is as follows: # concise version of the function def match_strings(strings1,...
View Articlecan't display compund image below a text in pycharm (macOS)
` from tkinter import *window = Tk()photo = PhotoImage(file='nft.png')label = Label(window, #text="kaizen nft", font=('Ariel',40,'italic'), fg='green', bg='black', relief=RAISED, bd=10, padx=12,...
View ArticleStreamlit : Dynamically open multiple pdfs files in different tabs
I have a Streamlit application where I can upload some pdf files and then select the files I want to work on from a select box and they will be displayed in the main panel. Now instead of displaying...
View ArticlePolars aggregate without a groupby
Is there a way to call .agg() without grouping first? I want to perform standard aggregations but only want one row in the response, rather than separate rows for separate groups.I could do something...
View ArticlePycharm does not have right access to /app/pycharm.Please run it by...
I am using linux mint 19.3 cinnamon version, Pycharm 20.1 version and I get an option to update it to Pycharm 20.1.1 but I am not able to do it and the follwing window pops up can anyone help me solve...
View ArticleHow to compare the results of my traffic prediction?
I have an LSTM model with three different activation functions and three different optimizers. I obtained the trained and tested results for each of them using MAE and MAPE metrics. Now, I want to...
View ArticleOptional command line arguments
Given code like this, how do I actually set a file in the run options?I am using Spyder and have put -h -s -p -o as arguments, but I'm not sure how to specify a named file for the -o option.class...
View Articlehow to handle if root level keys are dynamic in pydantic
{"type": "thirdparty","key": "postgres","host": "test","id": "88c8fo90"}or{"type": "weburl","url": "https://www.google.com"}Here the keys are changing based on type, how do I add a pydantic model for...
View ArticleFinding An Element Based off a partial ID using Selenium in Python
I'm trying to get some weather data off of a website using selenium. On the html file they look something like this:<div id="tdatmo1-FFrad6Noeud-20240225-0700"...
View ArticleDynamically Formatting Floats to Variable Decimal Places Using f-strings in...
I've previously asked about dynamically adjusting the number of decimal places in a float when formatting with f-strings in Python. While I found similar questions that address aspects of dynamic...
View ArticleDownload a pdf url using Python
I am trying to download a .pdf url from this websitePDFLINKhttps://www.cell.com/heliyon/pdf/S2405-8440(18)33206-7.pdfI am able to view it from my browser, but using the requests with Python won't let...
View ArticleSlash Command - Python [closed]
I'd like to make a command that you can setup. I mean something like that: /command (option - required) @Administrator. You can change @Administrator in whatever you want. Sorry if you don't understand...
View ArticleHow do I resolve "Serverless Function has exceeded the unzipped maximum size...
I have a personal project that I am building in Python using Django. When deploying it to Vercel, it worked fine until eventually the amount of libraries that I imported (included in my...
View ArticleHow to save pyspark Dataframe to downloadable excel file in Databricks
import pandas as pdimport...
View ArticleHow to place orders using a broker ID within my Kucoin order monitoring code...
My Python code currently uses the CCXT library to monitor my Kucoin order stream. I would like to modify it to also place orders directly through the exchange. Importantly, I want to be able to specify...
View Article