Trouble executing curl command in Python subprocess
I'm attempting to execute a curl command within a Python script using the subprocess module. However, I'm encountering issues with the execution and receiving inconsistent results. Here's the code...
View ArticleDjango - How to serialize (and later iterate through) list of dictionaries?
I am having hard time with serializing data from API since this is the first time that I am doing this. I would like to ask you for your help.From API i receive dictionary with some keys. Value for key...
View ArticleVSCode: pyspark runs fine when using "run python file" option. But throws...
from pyspark.sql import SparkSessionspark = SparkSession.builder.appName("Datacamp Pyspark...
View ArticleDjango CloudinaryField: Setting Default Privacy on Upload and Generating...
I'm working on a Django project where I have a model Media with an image field stored using CloudinaryField.Currently, I'm able to upload images via multipart/form, and I can generate a public link...
View Articlepypdf img.replace says image and mask size are not matching and shows black box
So I am trying to make a tool that basically does what iLovePDF does (cut a PDF into user defined sets of pages, and then compresses them to a user defined level).In my code I have the following...
View ArticleHow can I convert a recurring binary number into decimal and vice-versa...
I want to convert a number like 10.1(010) (which I'm storing as a triple ('10','1','010')) into decimal, getting 2.6(428571) (or ('2','6','42857')).I want to get the exact number, repeating decimals...
View ArticleHow to Securely Input a Key to a Flask App
I am creating a flask web application in Python where a user can input a key and the web app will retrieve the file associated with that key. What is a secure way for the key to be sent over http and...
View ArticleHow can I call cursor in python?
How can I call cursor in pythonCREATE OR REPLACE PROCEDURE WaterBillInMonth( in p_Month INT, INOUT refcur refcursor DEFAULT 'rs_resultone'::refcursor)LANGUAGE 'plpgsql'AS $BODY$BEGIN OPEN refcur for...
View ArticleHow should I build my tool? Is Docker right? It uses Postgres, I don't want...
I can code, but very new to Docker and such.I'm making an app (for myself on multiple computers) that is going to read my MS Word documents, stock the data in a postgres DB. The app will contain all of...
View ArticleHow to handle with different Python/pip versions in my computer?
I've been using ArcGIS 10.8 in my computer, that works on Python 2.7.Since I've started learning Python (v3.12), I've been facing some problems, especially with pip versionsOnce Python 2.7 is installed...
View Articlescipy's solve_ivp having trouble solving simple ivp
I'm attempting to solve a very simple IVP in Python in order to do error analysis:import numpy as npfrom scipy.integrate import solve_ivpdef dh_dt_zerodriver(t, h): return -2 / ht = 50steps = 10dt = t...
View ArticleCallback to change dash components - python
Is it possible include multiple components within the same chained dash callback. Below, I have two countries within an initial callback. Based on which country is selected, associated cities are...
View ArticleDifferent output in Post request
I'm encountering an issue where my program fails to generate a different output with each new post request. Even when I employ a random function in Python, it consistently produces the same output...
View ArticleLoop and store muliple paths Pandas
Goal: Parameterize multiple paths and merge all data on ID using pandas. For example, I have multiple paths...
View Articlehow to implement gateway bridge for meta trader
I want to implement gateway order routing for meta trader 5. What i am searching is, when i place an order on mt5 it should be redirected to outside provider to process the order through gateway.Please...
View ArticleSubmitting Python Request to ASP.Net Form Service - No Data Returned
I'm trying to automate data retrieval from this website - https://renewablesandchp.ofgem.gov.uk/Public/ReportViewer.aspxI'm copying the headers and form data from the flow I see in the Networks tab...
View ArticleWhen vercel deploying my python app gives Error: Unable to find any supported...
While installing the web app I prepared using python, vertex ai google chat bison model and fastapi, I constantly get Error: Unable to find any supported Python versions error and the installation does...
View ArticleWay of executing mariadb SQL-Statements with Python and sqlite3?
I have a sql dump file containing a maria db that I need to query over.Problem is that I dont have a local db installation and wont get one due to IT-Security restrictions.Can I iterate and execute my...
View ArticleOptimization for fetching recording from AWS dynamoDB using glueContext python
I have written the below code to fetch records from the DynamoDB and apply a filter on a column department. But the problem here is while fetching all the records it Scan the whole AWS DynamoDB table...
View ArticleI'm working on Twitter Clone project and I'm trying to keep Thumbs up like...
I'm able to toggle on and off Thumbs up icon to like and unlike messages but thumbs up icon won't stay visible.@app.route('/messages/<int:message_id>/like', methods=['POST'])def...
View Article