Category "python"

Binance API: OSError('Tunnel connection failed: 405 Method Not Allowed')

I am trying to access Binance Vanilla Futures data by using [this code][1] as a framework to better understand how to get the data. However, when I input my API

How to fix 'except ValueError' for python?

I am just starting to learn python and getting an error message that the syntax for calling calculator is wrong. Does anyone have any suggestions? My code: impo

Import geoviews in Anaconda

I am trying to install the geoviews module. I installed it successfully but when I am trying to import it in my code I have this message: No module named 'chann

Reshaping numpy array without changing the data

I'm trying to reshape an array of bitmap images that has a shape of (50,50,90000). How can I modify it so that I can get an array of (90000,50,50)? - I tried ar

Convert a a dictionary into an array in one line

I'm trying to simplify this: urls = [] soup = BeautifulSoup(r.text, "html.parser") items = soup.select('.mydiv a') for item in items: url = item['href']

how to split up a pandas series off of every two words in python

if I have a pandas dataframe with a description of an issue, how can I split each value into two separate words at a time? e.g Subject Number Issue 30493 "This

How to extract multiple texts from span elements using python selenium?

I am trying to extract all the texts in span into list, using the following HTML code from Selenium webdriver method: ['1a', '1b', '1c', '2a', ' ', ' ', '3a', '

extracting the desired link and its order from the links taken with selenium

from selenium import webdriver import time driver = webdriver.Chrome("chromedriver.exe") driver.get('https://www.google.com.tr/search?num=100&q=istanbul%20h

Why can one column of the pandas DataFrame not be filled?

I'm having some problems iteratively filling a pandas DataFrame with two different types of values. As a simple example, please consider the following initializ

Self-Service API Returning NetworkError

I've been trying a number of different example scripts listed on the developer github page here, but they all seem to return errors. from amadeus import Client,

Error 259 on python playsound() unable to sound

I Saw this question here. But my file is already in wav. My code is a timer which plays sound after timer ends using threading. It wasn't working there, then I

Fastest way to chunk and calculate sum, min, max in a 70 GB csv file

I have a 70 GB csv file (data.csv) that has the following structure Timestamp,Price,Volume. 1649289600174,100,100 1649289600176,105,100 1649289600178,109,100 16

How to create Flow object -credentials on Heroku

so I tried a few suggestions that were mentioned in this link -https://stackoverflow.com/questions/47446480/how-to-use-google-api-credentials-json-on-heroku. fi

How to use Python to parse custom file into JSON format

I am trying to parse a machine/software generated file type into a JSON file type for easy analysis with other software and other Python scripts. The file is st

I can't install opencv-python because I don't have vs?

whenever I try to pip install opencv-python it comes with an error saying I need to install visual studio 2022 but I already have it installed. I'm completely o

RuntimeError: DataLoader worker (pid(s) 15876, 2756) exited unexpectedly

I am compiling some existing examples from the PyTorch tutorial website. I am working especially on the CPU device no GPU. When running a program the type of er

How to calculate distance from hips to hands in Mediapipe/Blazepose (z coordinates)?

I am working on a project where I detect poses from a stickfigure and I am trying to extract the z coordinates from the landmarks via mediapipe/blazepose. The n

Add environment to VScode interactive window

I have some conda environments and using another environment set in '''.bashrc''' file as follows which is not a conda env: function XX { APEDIR=/vol/augerprime

Pyrogram Message Handler Not Working when used with uvloop

I am New to Python Also Mew to Programing and if i did anything wrong please tell me i have created a Telegram Bot(Simple Echo Bot) using Pyrogram which work's

Replit error: /usr/bin/env: ‘./python3’: No such file or directory after using PIP

whenever I type, for an example: pip install aiohttp==3.7.3, it gives me: /usr/bin/env: ‘./python3’: No such file or directory is there any way to f