Category "python"

Python - if ... then with multiple wildcards

I use the following python snippet within my code to scan a given soup for keywords. It´s only possible that one of the word is inside the soup. Concernin

Alternative way to append a dataframe to itself N times and populate new column

Is there an alternative way to append a dataframe to itself N times where N is based on a list length, and the list contents are added as a new column to the da

QTimer format converting

I have this code: from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import Qt, QTimer import sys class Ui_Timer15(object): def setupUi(self, Ti

I can't do that loop function

Here is my project, it' s drawing robot: I manage to do F and R functions. But my L function always malfunctions. Here is my code: def func(list1): numOfElemen

How to use a CNN code in python inside a website?

I have website with backend in Python (Django) and JavaScript hosted on heroku. Also, I have code in python that does image classification with EfficientNet, so

Can I get the mouse position with a different format

I am trying to get the position of my mouse, but make it print just the coordinates like 1000, 1000 Not like Point(x=1212, y=621) My Code: x = pyautogui.posi

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