Category "python"

How to store attachment file in an email in a database?

I used this code to store attachment xlsx files from a specific address email in Outlook, but now I would like to store these files in a database in SQL Server,

Resolve dependency mismatch of 2 Python libraries

I'm using target-postgres and tap-surveymonkey. I can install tap-surveymonkey directly when I create a Docker container and it works. However, when I want to i

Cosine similarity and SVC using scikit-learn

I am trying to utilize the cosine similarity kernel to text classification with SVM with a raw dataset of 1000 words: # Libraries import numpy as np from sklear

How to get band names in geotiff stack?

From an stack of geotiff (time-series of NDVI) in a file like 'NDVI_TS.tif' I want to get individual band names. For example: 'Band 086: 20190803T004719'. I can

Python - List all the files and blob inside an Azure Storage Container

This is my first post here on StackOverflow, hope it respects the guideline of this community. I'm trying to accomplish a simple task in Python because even tho

Plotly Dash ImportError: cannot import name 'dcc' from 'dash'

I'm just trying to get the Dash tutorial up and running but every time I try to run it, copy and pasted from the documentation into my asdf.py I get the error "

Dask-SSH cluster adding private key

I am trying to instantiate a Dask-SSH cluster through Jupyter Notebook. Using CLI, and the following commands it works: dask-ssh 10.67.22.208 10.67.22.102 10.67

Error : No module named 'telegram' - How can I resolve this error?

I get this error mainly when using Pyinstaller.

How to select 3d array elements with another 3-d array of coordinates?

Let's say I have two array, one with all zero elements and the second one with indices that should be filled with 1. This can be done with the following code: A

How to write binary data to stdout in python 3?

In python 2.x I could do this: import sys, array a = array.array('B', range(100)) a.tofile(sys.stdout) Now however, I get a TypeError: can't write bytes to te

Can we use flask-pyctuator to monitor Flask App with out using spring boot

I want to determine whether if python packages can be used to implement monitoring actuator /health endpoint . Our services are deployed on to Kubernetes and lo

error :- ProgrammingError: Attempt to use a closed connection

hi all im trying to run a stored procedure using python however im getting an error below is my code import pyodbc import sqlalchemy from urllib.parse import qu

I am trying to merge two dataframes

I have this dataframe firm formtype Date_Filed GameStop Corp. 8-K 2021-04-01 I want to change the Date_Filed to 2021-04-01 00:00:00. I am using

Automatize code in QTDesigner for objects

I would like to take names and values from 2 list to my QTDesigner text labels and QLineEdit, this is the code which I get: from PyQt5 import QtCore, QtGui, QtW

Add extra data in JWT header, simple jwt

I want to override or extend Django simple JWT obtain token method to add 'kid' key to the token header, JWT format is header.payload.signiture, I know how to a

Python round error define __round__ method

Hi Guys I have this code and this error message. Could you help me please :) I am trying to calculate the price of an option using Black Scholes model but when

Clipping a .tiff Raster into grids with Python

I have a large .tiff raster (at least 200x150), but I need a bunch of 32x32 .tiff files. Is there an easy way to cut up that .tiff in Python? I think the workfl

How to prevent TIMEOUT for VM?

I tested receiving signals to telegram from google cloud which is very simple code but everytime I tried, it automatically timed-out every 3~4 hours without any

How to add weights to grid_2d_graph in Python

Can anyone please help how to add weights to 2d_graph in python. My objective is to add a probability to each edge in python and simulate and check whether ther

Why "Using python interact with Operating System"'s week 1 Qwiklabs Assessment: Working with Python code is not correctly working

On Google IT automation with python specialization "Using python interact with Operating System"'s week 1 Qwiklabs Assessment: Working with Python 3rd module is