Category "python"

Insert variable with iteration into list display as variable with interation

I want to automate a list that looks like this in python. weights = [x[0],x[1],x[2]] I have written code but it just gives the value of iteration. I want to

nvcc not found when source installation

I want to install pytorch3d from source with the following command as recommended at Link: git clone https://github.com/facebookresearch/pytorch3d.git cd pytorc

Setting coordinates for sphere

I have a code that produces a sphere. I want to change the coordinates in which the sphere spawns import numpy as np import matplotlib.pyplot as plt from mpl_to

Display a graph generated by Graphviz in tkinter python

I wonder if there is a package or example that display graphs that are created by Graphviz using PyGraphviz, in tkinter My investigation: My graphs can be rend

Saving RGBD as single image

i used this code https://www.programmersought.com/article/8773686326/ to create RGBD by integrating RGB and depth image now i wonder if that RGBD file could be

Xarray select value based on variable

I have a .nc file that I open with xarray as a dataset. This dataset has 3 variables: Band (5000x300x250) latitude (300x250) longitude (300x250) Its dimensions

How do I move items from one list to another? [duplicate]

I am trying to remove all the items from list2 into list1 like this: l1 = [1, 2, 3] l2 = [4, 5, 6] for item in l2: l1.append(item) l2

scrapy image pipeline filename unsing other crawled info

Is there any way to name a crawled image with other info(text) that we get with the spider? for example in this case I want images with the article title and ar

Find matching name in another table, return value associated w/ column in pandas

I have 2 tables. I want to take DF1 and adjust the values in the tables given the values in DF2. DF2 is simply a groupby of a column in DF1. In domain terms, I

Array Indexing. printing elements of the middle column

hackerank array indexing The Problem description is as follows Write the function array_index which accepts three numbers n,n_row,n_col and performs the array o

Having trouble importing cv2, outputting an importerror

Input Trying to import these libraries and cv2 is throwing an error: import argparse import cv2 from datetime import datetime import keyboard as key import imut

How to add a geomdl NURBS curve to an existing axis?

I'm trying to work with NURBS using geomdl. I already have an matplotib axis, where several elements are plotted using: plot() scatter() imshow() (for Backgr

How to check object image color and paste on same background color?

I'm trying to generate augmented image data by pasting objects on different background. Problem is I've objects of different colors and background and the objec

Is there any limit of complexity for Tweepy "search_tweets" query?

I want to get Tweets in this way: tweepy.Cursor(api.search_tweets, q=query, geocode=geo).items(limit), unit="tw", total=limit) This goes to the api search twee

How to set username and password for basic auth in flask restx swagger?

Im trying to add basic Authorization to my flask rest-x application. By referring to https://github.com/python-restx/flask-restx/issues/271 I have made code cha

How to create numpy array for a dataset?

I've a dataset of almost 3k colored images each of dim 1920x1080 and I want to store it in a numpy array so when calling shape on it in returns (3716,493,491,3)

dask scheduler SSHCluster() not establishing connection

miniconda3 environment: windows server 2019 vm python 3.9.10 dask + distributed 2022.2.1 asyncssh 2.9.0 In the process of changing from 2021.x.y dask baseline t

TeleBot, How to make bot auto reply message after 10mins

TeleBot, how to set it schedule send after user send message to our bot, i want it auto reply to user after 10mins

Telethon give an error when scrap group more than 6K member ('ChannelParticipants' object is not subscriptable)

Telethon give an error when scrap group more than 6K member ('ChannelParticipants' object is not subscriptable) all_participants = [] all_participants = client.

Smart for loop in python for a portfolio performance

this is my first question here, so go easy on me. I've computed a certain portfolio in python, for which I've gotten a dataframe (or list for that matter) of ar