Category "python"

Understanding continuation tokens in AWS S3

I'd like to understand better how continuation tokens work in list_objects_v2(). Here is a piece of code that iterates through a large S3 bucket, storing the co

How to use dedicated GPU with TF2, given that multiple GPUs are available?

As title. I thought these lines would work to use only one GPU: _GPU = tf.config.list_physical_devices('GPU')[3] tf.config.experimental.set_memory_growth(_GPU,

Whats wrong with my RK4 Orbital Propagator?

I am working in a RK4 orbital propagator, and I have followed the basic structure of: k1​=dt×f(tn​,yn​) k2​=dt×f(tn​

How to match the input image with the ground truth image (the order)

I'm a beginner learning deep learning and trying to do semantic segmentation problems on histologic image using python and TensorFlow. There is 2 main file : Im

Implementation details of K-means++ without sklearn

I am doing K-means using MINST dataset. However, I found difficulties in the implementation on initialization and some further steps. For the initialization, I

Is there a way to control which vertices connect in a plotly.express.line_geo map?

I'm trying to make a connection map that has the option to use an animation_frame to show different months/years. Plotly.express has this option, but the plotly

How to install and use Scrapy within a TERMINAL opended within Visual Sudio Code under Windows 10?

within the TERMINAL window having the prompt PS C:\Rolf\py_scripts I have run pip install scrapy I got the message Successfully installed Automat-20.2.0 PyDisp

Creating a Vector Field Simulation for Random Windfield Modeling

I'm a research undergraduate looking for some guidance as I approach a problem: we need to create a random time varying 2d vector field in Python, with the capa

with python convert csv to xml file

I am trying to read csv file and convert to xml file using python version 3.8. I didn't get the proper solution after referring the link With PYTHON convert CSV

get Forbidden: 403 Access Denied when do request to transfer data from google cloud storage to bigquery using python

I'm owner in google cloud console. I want transfer data from gcs to Bigquery, but I get "Forbidden: 403 Access Denied: File gs://data/silver/rates/nbu_rates/nbu

Want to append a column in a file without using the Pandas

I have a file say, outfile.txt which looks like below: 1,2,3,4,0,0.95 1,2,4,4,0,0.81 5,6,3,1,0,0.89 7,6,8,8,0,0.77 6,6,4,9,0,0.88 9,9,9,1,0,0.66 4,3,6,9,0,0.85

Is there a way to validate data type lengths in Pandas when using the read_csv function?

I'm trying to put some sort of length validation for columns using Pandas. For example, let's say I have a csv named test.csv that has the following data within

HERE GET Request Python

Was wondering if there's a way for me to send out multiple long and lat cords in the destination and arrival in the HERE api instead of just individual long and

Command Prompt / Anaconda Command Prompt not opening in Windows 11

I am doing a research project that involves me running terminals in the Anaconda Command Prompt. I was able to install and work the current version of Anaconda

Is it possible to proportionally scale an image in Pygame so that it scales from the middle? [duplicate]

I’m currently trying to make an interactive button that grows when you hover over it with the mouse. As of right now, all that happens i

contract deployment using brownie and ganache

I want to deploy a contract using brownie. after inserting the brownie run scripts/deploy.py in the terminal of Pycharm, the following message appeared and noth

How to build python package for other PC?

Environment PC1: Dev-machine, online, Python install dir: C:\Python310 PC2: Target machine, offline, Python install dir: C:\Program Files\Python310 Doing Write

Python Dash Search for Children and Setting their Values

I just want to know how I can search and set values of children within either a html.Div or another component such as dbc.Spinner. For example, I have declared

How to remove background and video from facial landmarks

Im using this code to detect teh 468 facial landmarks from a face: import cv2 import mediapipe as mp import time cap = cv2.VideoCapture(0) pTime = 0 mpDraw =

python_binance api buy order buys slightly different amount

Let's say I want to buy 0.072 coins of 'XMRUSDT'. And executed buy order like following: buy_market = client.create_order(symbol='XMRUSDT', side='BUY', type='MA