Category "python"

how to change the directline secret key in a python bot on the Microsoft Botframework

I have a python chatbot (Bot framework) and I want to switch the conversation from the user and the bot to the user and a live agent using a secret key to the l

Problem with importing the mplfinance module

I am trying to get a candlestick graph for BTCUSDT using the pip import pandas module and the pip install mpl_finance module. I have successfully downloaded bot

Finding the angle of rotation relative to a normal of a 2D image with TensorFlow

I am new to TF, so what is the general process of finding the angle of a 2D image? What I want to do is find the angle of rotation a particular object real-time

How to access image datasets from Dropbox?

I have a dataset of images on Dropbox it is in uncompressed folders, and I want to train a a model using google colab. How can I tell Colab where the dataset is

web.assets_backend external id not found in odoo 15

when i tried inherit external id web.assets_backend odoo says that external id not found here's the error log: Traceback (most recent call last): File "/opt/o

Font size of x and y label with triangle_plot

I want to increase the fontsize of the x and y label of my triangle plot. I tried as in this question: Changing the size of labels of plots in python but it's n

Error tokenizing remove pattern re.findall

I have error like this while cleaning text, i just tried to following code from web def remove_pattern(text, pattern): r = re.findall(pattern, text) fo

how to plot pairs in different subplots with difference on the side

I want to make a plot in seaborn but I am having some difficulties. The data has 2 variable: time (2 levels) and state (2 levels). I want to plot time on the x

How do I display a Django form correctly using ListView

I am writing a simple app to track sales leads based on the Django tutorial "Writing your first Django app" (https://docs.djangoproject.com/en/4.0/intro/tutoria

How to assign a list that is set as a variable to another list (python)

In building a config file, I'm trying to add a list to another list. I'd rather not use any functions like append or python logic in this config file. Some exam

getting an error while fetching data from database (mysql). n="+".join(n) TypeError: can only join an iterable

conn = mysql.connector.connect(host="localhost", user="root", password="", database="Attendance") my_cursor = conn.cursor() my_curso

Speeding up Python Tkinter Program

I have programmed an App with Tkinter on Python, that reads out a number of consecutive XML-protocols of a (literary) writing process and visualizes the same pr

Select agents by a condition out of the model and change that attribute in mesa?

For an agent based modelling I'm doing with mesa & mesa-geo I need a way, to select and manipulate the agents out of the model.py. For example, if you take

F5 SDK - SSL Insecure request

Is there a way to ignore SSL? I'm running Python 3.10.1 code: from f5sdk.bigip import ManagementClient device = ManagementClient('10.10.17.127', user='admin',

Search Twitter API for tweets. Save and clean them up to a new txt file

I'm trying to get the below done, but keep getting an error. I know that I'm getting the information from Twitter because my monthly usage increasing. Any help

WebDriverException: failed to wait for extension background page to load: xxx Selenium

When I try to add an extension on my script like for example "Selenium" I get this error message: selenium.common.exceptions.WebDriverException: Message: unkn

Generating same numbers in array of Objects

Ive got problem with generating same numbers in my code im not using any seed and evry, the object is created in the loop it has same numbers inside array. clas

How to open url from altair chart in a new tab (href)

I've made an altair scattered chart with links. It works perfectly from my Jupyter Notebook. Problems start when altair is in Streamlit environment. As I invest

How to use nn.TransTransformerEncoder from pytorch

I am trying to use PyTorch's '''nn.TransformerEncoder''' module for a classification task. I have data points of varying lengths i.e I have sequences of differe

How to create a dictionary, where the key is the key of a dictionary of lists and the value is the longest list

I have this dictionary of lists of dictionaries: dict_countries ={'uk': [{'datetime': '1955-10-10 17:00:00', 'city': 'chester'},{'datetime': '1956-09-10 13:00:0