Category "python"

Serving file asyncronously with Django and uvicorn

I have a Django view that serves the content of a file. The Django application was running with WSGI until recently. This worked fine. Then I adapted my applica

how would i integrate a progressbar into this code? ive actually got a progressbar in the code, i just need someone to show me how to make it work

how would i integrate a progressbar into this code? ive actually got a progressbar in the code, i just need someone to show me how to make it work.thanks. the w

Python - overcome the project path problem on importing

My project structure is: main.py ----gui/load_ui.py ----gui/resource.py in load_ui.py I am importing resouce.py. in main.py im importing load_ui.py since it's

How to convert a 3D vertex list into meshgrids in Python

I'm looking for a way to convert the data of a 3d model (contained in an .obj file) into three different meshgrids, corresponding to the three x,y and z coordin

Price won't show up in the html parsing

I'm trying to get the price of this object into a variable and print it out/put it in a CSV. This is the section of html that I am trying to parse: <span cla

ModuleNotFoundError: No module named 'taggit'

I used pip install to install django taggit, I am confirming that is there with pip freeze I am including taggit on installed apps and when I want to do the mig

Python and Rasbperry MCP3008 sampling

I am trying to use MCP3008 for sampling. I want obtain 8000 samples/second, but i really can't obtain much than 1000 samples/second. This is my code: spi =

URL Variable Subdirectory Error in Django

A view in my Django app takes a URL variable/argument which in my case is a URL like: https://google.com so it would look something like this: localhost:8000/a

Is it possible to retrieve the content of cells in a PyQt5 QTableWidget object and inject it into other cells?

I would like to modify a QTableWidget table, taking whole rows and moving them in place of other rows (reversing the position of the rows, in a way). All the at

ModuleNotFoundError: No module named 'hcaptcha'

I am trying to execute a code of mine, but i keep getting the following error: ModuleNotFoundError: No module named 'hcaptcha' When I try installing 'hcaptcha

unable to run pydoc from the command line - "command not found: pydoc"

I'm reading the "Learn Python the Hard Way" and the now the author is saying to run, in the terminal, pydoc input. I do this and get the response:miguel@MBP-de-

Remove all bytes after null byte (\x00) [duplicate]

I have a python client that receives a string from a C server. I always receive a 6 byte string, in C everything after the '\0' byte is junk,

how do I send a file via bluetooth with python?

I am need some help with the development of a script that sends a txt file to the device that is connected to my pc (Bluetooth) I am using linux in this case an

displaying data of table from database using python

I am newbie to python ,trying with simple programs given below is a program which i tried to get the data from table and displaying it. Installed Python3.4 and

I'm getting the right answer but for some reason its outputting my user inputs as well I'm confused as to why

The following equation estimates the average calories burned for a person when exercising, which is based on a scientific journal article (source): Calories = (

Python Pandas. How to extract single column from downloaded yahoo_fin option chain data?

What is the proper way to extract a single column from downloaded option_chain from yahoo_fin? My code for EXXON MOBILE option chains: from yahoo_fin import opt

Location of Spyder window layout file

I installed spyder via sudo pip3 install spyder on both Ubuntu and Arch, since the pacakage-managed version was not as recent as I'd like. The only issue I've n

Apache beam FixedWindow doesn't do anything after GroupByKey transform

I built a pipeline which reads from confluent kafka it processes the records and then use side outputs to split them into rejected and approved pcollections, th

passing function variables to another file python

I need to pass data_connection into my main.py engine because that variable is where the data from mysql string is being stored. In main.py it says parameter da

Scraping the rating of some reviews as pictures

I am trying to scrape the rating of some movie reviews but the rating is not a number, but it is one of 10 different images that range from showing empty stars