Category "python"

Is there a way to guarantee a certain number of lines detected with cv2.HoughLines()?

This question is an extension to my previous question asking about how to detect a pool table's corners. I have found the outline of a pool table, and I have ma

python generator function not yielding output [closed]

import itertools def password_generator(): with open("D:\Password Hacker\Password Hacker\\task\passwords.txt", "r") as passfile: f

How to get the previous rows close and apply it to the next row in a new column called previous close

I have a bunch of daily ohlc data like so: date,volume,open,close,high,low 2022-05-02,1756159.0,118.38,119.57,120.34,116.49 2022-05-03,3217838.0,119.72,122.4,12

Writing Python output as xlsx

I want to execute same function (gives output A, B, C, D) for all the files (library) available in the given path. I am trying write the output (A,B,C,D) in fou

Writing Python output as xlsx

I want to execute same function (gives output A, B, C, D) for all the files (library) available in the given path. I am trying write the output (A,B,C,D) in fou

How to draw on an image Tkinter canvas, PIL

I would want to be able to draw on an image being displayed by a tkinter canvas PIL. I tried google searching but all the results would be how to draw on an ima

Sending Cisco commands from a text file using Netmiko fails. send_config_set works but send_config_from_file doesn't

I have been using this link as guide. https://pyneng.readthedocs.io/en/latest/book/18_ssh_telnet/netmiko.html#:~:text=Netmiko%20is%20a%20module%20that,pip%20ins

Vectoring text data of dictionaries' values from pickle file

I'm new to NLP and trying to learn it by myself and I am doing classification. I have a pickle file with some data like this, {'food' : {'f1.txt', 'f2.txt', 'f

Azure Databricks - Python SSLCertVerificationError - unable to get local issuer certificate

I have an Azure Databricks notebook that gets a list of CSV files from a public government website and downloads them on a monthly basis or so. It's automating

Import a local module on <py-script> (Python for browsers)

I found a very useful application, that works like html tags for Python applications. Supposedly I could use all the features of Python between tags within a B

returning the highest value in the key : value pair in a dictionary [duplicate]

I'm in need of some assistance in this code problem from a MOOC on python programming that I'm taking. This is just for self-learning, and not

Question about selecting rows and columns from a DataFrame (Python) [duplicate]

I'm following this tutorial to select specific rows and columns from a DataFrame. The tutorial example shows that you can use: adult_names = t

Compare columns of different excel using python

I need to compare particular column between two excel sheet and if value matches then we need to replace the second column value of second excel sheet into the

Discord API. Bot don't see message from other users

I'm trying to make a selfbot for Discord and cant see message content from other users. async def on_message(message): print(f'USER - {message.author} texte

Scipy's minimize function doesn't converge with a callabe jac

i've been trying to minimize a absolute qudratic error given by : quad_error = ((prediction-obs)**2).sum()/(obs.size-1) Where prediction depend if a number of v

plotting white stuff over a plot in python

I've got some trouble with plotting white spans over a plot. I've created and plotted a given function y(x) and defined some "forbidden" regions, corresponding

win43.client restrict combining many filters

I'm trying to read outlook emails via python, have code like below: import win32com.client import os from datetime import datetime, tim

Flask select which form to POST by button click

I'm trying to have only one of two forms POST depending on which button from a btn-group is selected. Currently all of the forms POST with no issue, but there a

YAML Pipeline Scan python

I have to write a python script where I need to parse YAML file and produce the list of steps that includes the image version for example: this is the step Step

How to a output message in separate message boxes for a chatbot

So I'm trying to build a chatbot using python, flask, nlp, js. But I'm new to js and just started to learn about it. Output How should I output this prediction