I am trying to create Azure Alert using Python SDK and Below is the code
from azure.mgmt.monitor import MonitorManagementClient from azure.mgmt.monitor.models import RuleMetricDataSource from azure.identity import DefaultAzureCredential from...
I'm trying to find the green object in the video stream using the following code - unfortunately the HSV code doesn't always work well, doesn't always select the greeen but rather some odd background part.
This is the code I am using for the Codility lesson: MaxCounters
def solution(N, A): counters = * N max_c = 0 for el in A: if el >= 1 and el N: counters = * N return counters Every test passes but the last one ( all max_counter operations ) times...
I've attempted to modify the example in 'Doing Math With Python by Amit Saha: Finding The Limit Of Functions' pp 181, 182. Paraphrasing: p. 181 ...Consider a function f(x) = 1/x, written limit of 1/x = 0 as x approaches Infinity p 182: 'from sympy...
My goal is to create a chatbot that I can upload a file which holds a bunch of text, and then use openai assistants api to actually use the file when query my chatbot and it will use gpt-3.5-turbo as the model to answer the questions. essentially...
I produced a report that provides a count of how many musicians played each genre at a festival. the musician model has a genre field that is a foreign key to the genre table. I can successfully produce a template that renders this report, but it is...
I am trying to make a window using pyqt6 in python 3.10 where if you modify the height or width, the other is automatically modified as well, maintaining a constant relationship.
In addition, this movement is fluid, that is, while I am dragging...
Am trying to compute the midpoints of each triangle edges of an icosahedron to get an icosphere which is the composion of an icosahedron subdivided in 6 or more levels. i tried to calculate the newly created vertices of each edges but some points...
When I create a new Python file (Mac) in VS Code and try to run it, a window at the top pops up to select a debugger (debugger dialog). I can click on Python Debugger, then I can run the program with no problems, and when I run it again, this msg...
PyTorch JIT script error when Sequential container takes a Tuple input.PyTorch
This is a simple net to reproduce my error. I’m passing a Tuple to the forward method and have specified the typing. I think the error is caused by Jit inferring the...
When I load pickle file like this, it warns me no library imported such keras.saving.pickle_utils. However, this code can run on Google Colab. I don't know what my bug is. Can you help me? I use tensorflow 2.13.0
I am in a Mathmatics Club on school. And I wanted to write a program, which answers the following question. An unknown starting number is subtracted from the 1 fifth, and then a half. In the end, another 64 are deducted. The solution: a table I...
I'm trying to run a Python app made with Django and designed with HTML on a server in dotroll (so there are 2 files that I need to upload, Python and HTML). I know that there is a option in cpanel to run Python apps and I did everything that needed...
I have extracted facial landmarks using mediapipe and stored it in a csv file. When I visualised the face using the 468 x-and y-coordinates, the face that I depicted is rotated in roll, yaw, and pitch axes. I would like to ask how can I rotate the...
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...
Вы не можете начинать темы Вы не можете отвечать на сообщения Вы не можете редактировать свои сообщения Вы не можете удалять свои сообщения Вы не можете добавлять вложения