Category "python"

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

I want to check if the .csv file contains the exact data without any leading and trailing spaces

I changed the code to this. Can someone tell me what is the keyword i should use to remove spaces(trailing and leading. Something is not working. I cant figure

Can't add clicked handler for drawn figures using DearPyGui

I can't add clicked handler for drawn figures, in this case it circle. I tried same, but for text and it work correctly, but for rectangle don't work too. Here

Scrape Website that is running meteor, using python requests

You see, there is this website called edabit. All you need to know is that I want to scrape the website without using selenium. I want to learn how. What does s

Inserting rows into Microsoft SQL Server using pandas raises precision error

I am trying to insert data into a mssql database. I needed as fast method for this so I set the fast_executemany param to true. The upload works fine for most p

Can we declare PonyORM models without using a database global variable?

Declaring classes that map the db in ponyORM inherits from database as a global variable. from pony.orm import * db = Database() class MyEntity(db.Entity):

Can't parse out text that is behind </span>text</a> in Beautifulsoup

I think I have tried it all, read crummy, read documentation on Beautifulsoup4 website. I can't get this thing wrapped around my head. So to the question: &

Simple way to use bigquery result in python where the query return only one result

I'm simply trying to get one data from bigquery from python. Below is the query select max(date) from `x.x.table_name` all the requirements to access bigquery

Walrus operator in Python interpreter

When I use the walrus operator as below in the Python(3.9.6) interpreter, >>> walrus:=True I get a syntax error: File "<stdin>", line 1 wa

python ttp parser ignore line if I have ORPHRASE in template and consecutive blank spaces in input text

Envorionment: windows 10, python: 3.9, ttp: 0.8.4 I'm having a problem with ORPHRASE in the TTP template, and if there's consecutive blank-space characters in t

How to get all fuzzy matching substrings between two strings in python?

Say I have three example strings text1 = "Patient has checked in for abdominal pain which started 3 days ago. Patient was prescribed idx 20 mg every 4 hours." t

Concat multiple dataframe and manage those that doesn't exist

I try to concat some dataframe - 30 dataframe of 24h data - that been created automatically with some csv, but sometimes csv doesn't exist, so the dataframe was

MLFlow tracking ui not showing experiments on local machine (laptop)

I am a beginner in mlflow and was trying to set it up locally using Anaconda 3. I have created a new environment in anaconda and install mlflow and sklearn in i

in vscode, pygame wont import but it is installed and is working in the windows console ,and the python app thing

im very new to code in general so this could be a stupid beginner problem ive searched for things but i couldnt find something useful for me under Problems is t