Questions tagged [python]
I have a sample FastAPI application, with a single endpoint which returns the result a after a delay of 5 seconds. Please find the code below. from fastapi import FastAPI import uvicorn, os app = FastAPI() @app.get("/delayed-response")
Continue reading →I am beginner in python and i am doing a mini project for a school assignment. we are required to make the flappy bird game using python. with numerous references, i concluded that this particular one: https://github.com/maxontech/flappy
Continue reading →I've succesfully installed the flags package: pip install flags
Continue reading →To expand on the title, my question comes in two parts: Is it possible for a Python package to be installed in an environment as a dependency for another package, but not show up when you list down all installed packages in that environ
Continue reading →I have this code: https://pastebin.com/ijHx7y2Q . The code should train a model using mfcc coef to recognize a speaker. As this is my first project where i play with "AI", i used the dataset (with some additions) and the code from this t
Continue reading →I have a project in django and when I added django channels my cors stopped working correctly # settings.py ... ... ... DEBUG = True ALLOWED_HOSTS = ['localhost'] CORS_ALLOWED_ORIGINS = [ "http://localhost:3000", ] CSRF_TRUSTED_
Continue reading →Hello so i am trying to train a model using tfrs, so i have successfully trained the model the problem is saving the model but i keep getting the error WARNING:tensorflow:Model's `__init__()` arguments contain non-serializable objects.
Continue reading →s = ("If I’m not in a hurry, then I should stay. " + "On the other hand, if I leave, then I can sleep.") re.findall(r'[Ii]f (.*), then', s) The output is: I’m not in a hurry, then I should stay. On the other hand, if I leave The qu
Continue reading →Halo guys, how i can make a table and chart using qml and python as backend for read csv file and live chart the values in table, anyone help, i m using qt creator for make a application for my project... Thank you Complete Qml and pytho
Continue reading →I am trying to use virtualenv. I used this command to install the package: pip install virtualenv Then I create a folder using this command: python -m venv venv Now I want to use django package in this environment. What should should do?
Continue reading →I am using mitmproxy with Python. Python version is 3.11.0 and mitmproxy version is 10.2.0. When I install mitmproxy, it installed other dependencies such as mitmproxy-macos==0.5.1 mitmproxy_rs==0.5.1 urwid-mitmproxy==2.1.2.1 When I run
Continue reading →I have this code: import urllib.request, json url = "https://api.wto.org/timeseries/v1/indicator_categories?lang=1" hdr ={ # Request headers 'Cache-Control': 'no-cache', 'Ocp-Apim-Subscription-Key': '21cda66d75fc4010b8b4d889
Continue reading →I just wish you to suggest a feature called "Print All Files Of Directory" like PyCharm. Its one of the best feature of PyCharm to print the codes written in several files of a directory in a PDF. This feature will help various students
Continue reading →i have a table in the format --------Header-------- Name Subject Hours v1 v2 v3 v4 v5 v6 i want the json file to have this format: { { "Name": "v1", "Subject": "v2", "Hours": "v3" }, { "Name": "v4", "Subject": "v5", "
Continue reading →I'm new to using Python and currently using borb pdf package to create pdf documents. I am trying to build a table of contents page with page numbers that links to the designated page. Here is what my current code looks like: doc
Continue reading →I'm working on a FastAPI application where I'm trying to hide certain Pydantic models from appearing in the OpenAPI documentation generated by FastAPI. I've followed the documentation and set the "include_in_schema" attribute to False wi
Continue reading →I want to get topography for French departments with this code : import pandas as pd import requests link_dep = 'https://code.highcharts.com/mapdata/countries/fr/fr-all-all.topo.json' topo = requests.get(link_dep).json() x = topo['objec
Continue reading →I'm doing a heat index calculation project that will take the temperature and humidity values from files Temperature365.txt and Humidity365.txt , But if it found a value 0, I want it to take the previous value and next value to find the
Continue reading →I am trying to get this bit of code to print a set of coordinates that increase by a set number and print the whole set of them, but so far I can only get the first set of coordinates to print. I am very new to python and I'm pretty sure
Continue reading →I need to return the value from the email address element where the is WORK. I do not want the HOME email address type. [email protected]
Continue reading →