Category "python"

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

AttributeError: 'Index' object has no attribute 'tz_localize' with yfinance

'this error occurs only with some stocks, for instance with NFLX, KO or MCD, but not with AAPL or INFy both with yfinance 0.1.63 and 0.1.69, pandas 1.2.3 or 1.4

Download audio only youtube raises regexmatcherror

I am trying to execute the following code, that is supposed to download the audio file from youtube url from pathlib import Path from pytube import YouTube def

Fixing Traceback (most recent call last): in Bar code reader using Python

I used the following code to get the reading from a USB bar code reader connected to a raspberry pi. #!/usr/bin/python import sys def barcode_reader(): hi

Peak and Trough of Numeric Data

Can anyone help me please. I need to find the peak and troughs in a data series but with 2 conditions which are: Peak or trough is peak for minimum of n(days) L

how to change form field from dropdown list to radio button in django if the options in dropdown are being inherited from another model?

i am working on an application where i can select item from drop-down list and buy them. i have a form field which is a drop-down list(items are connected to ot

Spotify API get track_uri or track_id from own spotify data

[enter image description here][1]I have a dataframe that included my own data I've requested from Spotify (https://www.spotify.com/de/account/privacy/) Now, I h

Django many-to-many relations

I'm trying to create a web app in which users can participate in some groups (every user can be part of multiple groups), and I want to be able to make both que

Iterate Opening a List of URL's with Selenium

I am having trouble iterating the action of opening a list containing URLs using selenium. the issue is in the part labeled #Second Part in my code. linklinkfin

Running subprocess.Popen in a compiled script has a significant delay

Edit: In this specific example, Python 3.8 is being used on Windows 10. I need to run FFprobe through subprocess.Popen so I can capture and parse the output. If

Apply loc to the entire dataframe but one column (keep the one column as it was and not remove it)

I am trying to divide the entire dataframe by a fix number but I want to keep the 'Year' column as is. I tried dividing the entire df with 100 and then multiply

Authenticating other Users from my App - Tweepy

I've created an app in python to like tweets by hitting the POST endpoint -very simple. Next I'd like to have an account different than mine able to login and a

How to get Youtube channel's email using using Python, Javascript or an API

Does Youtube provides any API to get channel emails using Oauth? Or How can I get the email in About Section in the provided image using scraping with Python. A

Leverage not taken into account by Binance with CCXT in Python

I got a little problem with ccxt on Python. I'm (trying) to code a trading bot which takes my custom tradingview signal. So I've been tinkering a little test co

When I gave command on CMD manage.py runserver it instead took me into VS Code and when i ran it in VS code error was on (from django.core.management)

When I ran the command on CMD manage.py runserver it intern redirected to VS Code. When I tried to run on VS Code it showed the system cannot find the specified