Category "python"

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

Keras-tuning can't find callback

I am using keras-tuner in order to obtain the best set of hyperparameters for my model. I can reproduce my problem for a random dataset: def generate_data(n_win

Pandas - Cross referencing with DatetimeIndex - Groupby

I have data of many companies by month (End of Month). I want to create a new columns with groupby for each company where: new_col from Jul of this year to Jun

Delete all files without deleting folders

I have a folder named (top) with 10 folders named 1,2,3,4,5,6,7,8,9, and 10. Inside the top folder I have files, too (are not folders). I can list all the files

'conda init' without closing the current shell

There are a number of use cases for which I am trying to use conda . The main headache is that conda init just does not want to play fair within the flow of a

How do I get my FastAPI application's console log in JSON format with a different structure and different fields?

I have a FastAPI application where I would like to get the default logs written to the STDOUT with the following data in JSON format: App logs should look like

How to trigger AWS lambda functions manually which is already scheduled using event bridge rules

I am using event bridge to trigger a lambda function at 8 everyday to perform some ETL operations. At times i receive requests to trigger the lambda manually on

Memory error when running scipy with multiprocess under Windows 10

I write a program that will use concurrent futures ProcessPoolExecutor. When I set the worker number to 2, it runs smooth. But after I increase the worker numbe

shape '[1]' is invalid for input of size 2048

I am trying the extract features from images using resnet 152 model. It was working just fine with resnet18 model but when I try to use resnet152 model, it show

Dependencies issue while installing model card toolkit

Model Card --> Model Card toolkit I want to install a model card toolkit in my python virtual environment through this command: pip install model-card-toolk

Django: The QuerySet value for an exact lookup must be limited to one result using slicing

i am tring to access a page using a slug url, but i keep getting this error The QuerySet value for an exact lookup must be limited to one result using slicing.

how to see number of each line in text input of kivy?

There are some text editing softwares that show us the number of lines in order. like this: I want to have this effect in text input of kivy but i do not know

Convert SDR image to HDR with python openCV?

I wish to do the following in python with openCV to increase the brightness of an image. The aim is to turn an SDR photo into an HDR image (to increase the dyna

Plot variant abundance vs. time (e,g, of mutant strains) in python

Given [absolute] numbers for each of a number of variants over time, I would like to produce a plot like the following: Is there a function for this in Python

When i create Django Project with environment i have had a mistake line but when i deleted the environment file the line had disappeared !! Any Idea?

import os from django.core.wsgi import get_wsgi_application // Mistake in any import commands line but it is working os.environ.setdefault('DJANGO_SETTINGS_MODU

Python csv rearrange columns and calling from a dictionary (no pandas)

I need the code to rearrange the columns while changing the header names without using Pandas. I also need to omit some of the columns in the new csv file. Samp

How can I convert a return statement into a printable statement? [closed]

I am making a GFC (Greatest Common Factor) calculator with GUI, but my current code only works with a return statement, and tkinter doesn't ac