My algorithm is simple: I am using Spark to distribute the processing of a process that runs a cross-validation in Python. I have 3 workers and all I do is assi
I have a class defined in below form class B(): xyz: int class C(): abc: int Class A(): bList: List[B] cList: List[C] iex : int MongoDb Save Operation
I get the reoccuring CUDA out of memory error when using the HuggingFace Transformers library to fine-tune a GPT-2 model and can't seem to solve it, despite my
I was trying to select all the 264 Recipients from the second form on this website and I used the code below: s = Service('./chromedriver.exe') driver = webdriv
My experience: Just started with Python and no developer My Goal: Trying to scrape Sofascore API for getting Soccer Lineups to CSV. The json data need to be tra
I'm trying to add social authentication in my project but when I try to install django-allauth it is giving me error I've tried this post but no luck it's givin
I am a first time user of concurrent.futures and following the official guides. Problem: Inside the as_completed() block, how do I access the k, v which is insi
I'm trying to solve the cannibals and missionaries problem in python (with some additional criteria, but the main idea is the classic one). So, in the class Gra
I have an datafremae like this time_posted 0 5 days ago 1 an hour ago 2 a day ago 3 6 hours ago 4 4 hours ago I tried this df.sort_values(by='time_p
I used image_path= "image.jpg" reader = easyocr.Reader(['en'], gpu=False) result= reader.readtext(image_path) print(result) print("text printed") output: Using
I want to change directory in google colab. a = 'drive/MyDrive/COLAB/colab_common_utilities' Following works: # method 1: import os os.chdir('drive/MyDrive/COLA
Problem: I can open VS code and start typing but after ~30s (sometimes minutes) the window freezes showing this message: I am using python on a jupyter noteboo
I am trying to install faker package and I got a message that is successfully installed But when trying the code from faker import Faker, I got a message Module
Can you please help, how to change my code, so the red line will be longer and connect black point? data.plot(kind = "scatter", x = "Pocet.potvrdenych", y = "Po
This code I wrote in Sympy is running slow. I want to write this with symengine. How can I translate? I had some difficulty with the Solve commands. Can you hel
I am quite new to FastAPI, so I have a question if it is possible to access data within the path operation function, which(data) is stored/generated outside of
I am using this code to detect face_spoofing import numpy as np import cv2 import joblib from face_detector import get_face_detector, find_faces def calc_hist(
I did not use TensorFlow for a while and now, when I was starting to use it again, I have the problem with the first basic line of my code: X = tf.placeholder(n
I am working through some exercises on python and my task is to create a program that can take a number, divide it by 2 if it is an even numbe
I can use the set_xdata and set_ydata functions to update an existing matplotlib plot. But after updating I want to recenter the plot so that all the points fal