Category "python"

How do I get a cell's color from a Google Sheets doc in Colab (python) without Google API?

I am importing a Google Sheets document into Google Colab for data analysis using python. I would like to get formatting information from the Google Sheets docu

Python 3.9 logger RotatingLogger doesn't write anything into file

I created a simple demo to test my Django project. when i invoke unittest, everything passed and i set logger.info to record log into debug.log. There should be

URL and page refresh issue for Multilingual site on Django

plz help me to solve one issue. I have a Multilingual site on Django with standart internationalization framework. Settings.py MIDDLEWARE = [ ... 'djang

program that asks the user to input a string with at least three characters and displays a new word with the word “car” after first three characters

In python how do you write a program that asks the user to input a string with at least three characters and displays a new word with the word “car”

to import pyqt5.uic, do I have to install pyqt5-tools first?

to import pyqt5.uic, do I have to install pyqt5-tools first? (venv) PS C:\Users\77140\AppData\Roaming\Anki2\addons21\myaddon> pip freeze | grep PyQt PyQt5-Q

How to set the resolution of a Raster using gdal.Grid in python 3?

How to set the output resolution of the raster generated in gdal.Grid? I am using the code below, which produces a TIF with very large cells (~70m) however the

problems counting rows and columns with no spaces in a matrix

Im trying to find the number of rows and columns in a matrix file. The matrix doesn't have spaces between the characters but does have separate lines. the sampl

FastAI : Getting Prediction of Image from Learner

I want to be able to predict the Class of a Single Image from the Learner and i always get an Index Out of Bound Exception . Here is the Code data = ImageDataLo

Findall vs search for overwriting groups in Python

I found topic Capturing group with findall? but unfortunately it is more basic and covers only groups that do not overwrite themselves. Please let's take a loo

How to set a different axes system on a matplotlib plot?

I have a matplotlib plot on which I found the coordinates of given points like this: I am trying to find a way to add different axes on the same plot, and get

How to filter out data based on date in python of a csv file

I have a data set as of below & I want to filter data from 2021-07-30 to 2021-08-03 Below is the dataset input.csv created_at,text,label 2021-07-24,Newzelan

Why can't VSCode provide code completions for my object?

Why doesn't VS Code figure out how to complete the methods and attributes? When I write: ai_game. nothing happens, no list of methods or attributes appear impor

How can I add values to the telegram bot keyboard only if this value exists in the database?

My database periodically changes the number of values. I want the values to be displayed in the telegram bot's keyboard only if they exist. How can this be done

pydevd warnings in Visual Studio Code Debug Console

I've been searching for some time but couldn't find any related problem. When using Visual Studio Code with Python extension for debugging on large elements, co

Getting Serverless Error spawn python3.8 ENOENT in sls deploy for python requirements

Doing a serverless deployment using sls deploy and getting error "spawn python3.8 ENOENT" ubuntu@jumpboxAndawscli:$ sudo sls deploy --stage prod Serverless: Con

This is the code for my "bag" or inventory command

@client.command() async def bag(ctx): await open_account(ctx.author) user = ctx.author users = await get_bank_data() try: bag = use

Scraping .aspx page with Python yields 404

I'm a web-scraping beginner and am trying to scrape this webpage: https://profiles.doe.mass.edu/statereport/ap.aspx I'd like to be able to put in some settings

using zipinfo and zipfile in python

I want to know the difference between using z = zipfile.ZipFile('zippedfile.zip') txt = z.getinfo(filename).comment.decode('utf-8') and txt = zipinfo(filename

4 I am trying to put array into a pandas dataframe

import pandas as pd import numpy as np zeros=np.zeros((6,6)) arra=np.array([zeros]) rownames=['A','B','C','D','E','F'] colnames=[['one','tow','three','four','f

HTML name/value button attribute not being sent via POST request to server

I am currently using HTMX and Django to process button clicks within a table that adds the selected item to a list. I am trying to use the name/value HTML attri