Question I have code that is based on Part 2, Chapter 11 of Deep Learning with PyTorch, by Luca Pietro Giovanni Antiga, Thomas Viehmann, and Eli Stevens. It's
I want to calculate the mean for the second index for each third index. @njit def mean_some_index(a): T = a.shape[2] b = np.zeros((T,T)) for t in ra
I'm producing a ge image using this code: image = ee.ImageCollection(satellite) \ .filterDate(startdate, enddate) \ .filterBounds(ee.Geo
I am trying to train the model for recommendation for movie. I have a dataset which has list of all the casts, movie details with description. based on the occu
I have been using this Halo MCC Discord Rich Prescence application: https://github.com/Gurrman375/HaloMCC-DiscordRPC for awhile and for about a year now it's be
I want to extract the owner of a file within a python3 script on a Windows system. When I run: os.path.expanduser(fp) or os.stat(fp).st_uid I receive a 0 for al
I have a python script which works fine when I run in text editor. But I want to create Addon for that script. I am not from coding background so do not have mu
I have the following XML file: <main> <node> <party iot="00">Big</party> <children type="me" value="3" iot="A"> &
I am using the following code to generate a colored filter on an image in Python. However, it gives me a full green/blue/red image. I want to decrease the inten
The standard Python approach to working with files using the open() function to create a 'file object' f allows you to either load the entire file into memory a
At first, I wrote: import numpy as np import pandas as pd import glob all_data = pd.DataFrame() for f in glob.glob("*.xlsx"): df = pd.read_excel(f) all_
I have run my script in an instance of 18Gb of ram, 4 CPU, and 20 Gb of a disk in both use cases My use case is (read line by line): Read line by line and proce
I want to create a python function that takes a start date and end date as arguments. I want the dates passed to the function to be the start date and end date
Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the las
I want to run a project which invovles PySide2 using Visual Studios. I have installed it using pip install PySide2 and the installation worked. But if I want t
There is data and a classification task: from sklearn.model_selection import GridSearchCV from sklearn.preprocessing import label_binarize from skle
I'm trying to create a rectangle with text on top, but the text shows below the rectangle. How can I make the text go to the front layer? My code so far: from t
I'd like to have a bed cleaner only when necessary. The error does not occur as shown in the code below, but the result is not accurate. Increasing or decreasin
My df has a price column that looks like 0 2125.000000 1 14469.483703 2 14101.832820 3 20287.619019 4 14469.483703
Tried to solve a simple problem from google.colab import files import numpy as np file = files.upload() !ls my_array = np.loadtxt('train_vector.csv', delimi