I have a working function to convert letters to 5x5 star patterns:
def pattern(): for i in range(len(name)): if name == B : print_B = [ for j in range (5)] for row in range(5): for col in range(5): if (col==0) or (col==4 and (row!=0 and row!=2 and...
I have a matplotlib plot that I want to update based on user input. The user inputs three values for three parameters and based on these three inputs, a path gets constructed. The algorithm then takes every image in the directory of that path,...
I want to use function calling as tools in generative AI. Here are more details about function calling in Gemini and a correct structure of tool property.
Function calling would allow Gemini to call functions instead of a text response, just like...
I have the following txt file from which I want to output 2 dictionaries txt files with the use of data-text parsing method that doesn't use row numbers, dues to the fact that it should be applicable to larger txt files.
The First Chapter ed...
Imagine I have this data:
start end value 0 5 100 2 4 200 1 2 600
start and end represent a range where this value is. I need to sum all the values based on their ranges. Here is the idea:
I want to save a segmentation model pipeline to a mobile optimized model that I can run on iOS or call from a C++ program. I am using two pretrained models, whose code I can not change.
I am majorly facing two kinds of errors:
RuntimeError:...
when i use pip install to install some packages it works fine such as (request and selectolax) but on others such as pandas and other packages i get this output in my terminal:
I use Debian Linux and I'm trying to find where my already downloaded datasets were stored.
On /home/usuario/scikit_learn_data, there insn't any file. I thougth all downloaded datasets would be stored here (on download, I didn't specified any...
I am trying to build a test package for a Synology DSM using their toolkit and one of the steps requires to execute a Python script. When I execute it an exception is thrown:
/pkgscripts-ng/include/check: line 93: /dev/null: Permission denied...
I am trying to collect data from vivino.com and the DataFrame comes out empty, I can see that my soup is collecting the website info, but can't see where my error is.
I am working on a model that has 2 outputs: 1st the predictions and 2nd the attention maps. I have stored my target attention maps on my disk as '.npy' files and have loaded and stored in the runtime as reshaped_y_train_fm. I want to pass the...
I'm new to Python and stackoverflow. So please forgive any shortcomings in my posting. I want to calculate the row average of a specific row(e.g. Bahrain) and I'm having problem achieving it. I used df.loc but It's returning a key error with the...
How do I learn Django? I understand python basics such as functions, classes etc. I'm trying to learn Django for more than six months. Actually I understand the concept a little but it seems I've not learnt anything at all as I cannot memorize every...
This code provides implementation of common metrics for assessing a binary classifier's hard decisions against true binary labels, including:
accuracy true positive rate and true negative rate (TPR and TNR) positive predictive value and negative...
How can you make it in Python? I faced a problem with this line
img_rgb.Set(mask,cv2.Scalar(0,0,255)) and here is the code :
import numpy as np import imutils import cv2 img_rgb = cv2.imread('figi.jpg') Conv_hsv_Gray = cv2.cvtColor(img_rgb,...
name = input( Enter file: ) if len(name) < 1: name = mbox-short.txt handle = open(name) counts = dict ( ) for line in handle: line = line.rstrip( ) if line.startswith('From'): words = line.split( ) if len(words) < 6: continue time = words hour =...
Вы не можете начинать темы Вы не можете отвечать на сообщения Вы не можете редактировать свои сообщения Вы не можете удалять свои сообщения Вы не можете добавлять вложения