Quantcast
Channel: Active questions tagged python - Stack Overflow
Browsing all 23390 articles
Browse latest View live

slack files & url with headers

I'm building a slack bot (python/slack-bolt).Trying to share a private image within the app home tab.The home tab is genereted using client.views_publish.{"type": "image","title": {"type":...

View Article


ValueError: too many values to unpack (expected 2) or not enough values to...

I am trying to train T5 model binary classification. When I am trying todefine data class, I am gettingbatch_size, seq_length = input_shape1017 # required mask seq length can be calculated via length...

View Article


Image may be NSFW.
Clik here to view.

Why am I keep running into the NaN problem when training CIBHash model?

Recently I have been trying to reproduce the result of https://github.com/zexuanqiu/CIBHash, however, I run into the loss explosion every time after evaluating. I am using cifar-10 dataset from...

View Article

Not Able to send mail with certificate in FASTAPI -

Error Getting :Send mail:Exception raised [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1135),check your credentials or email service...

View Article

Issue pyinstaller/tkinter - Unhandled exception in script

I created a .exe starting from a .py file with the following command:pyinstaller --noconfirm --onedir --windowed --icon "C:/icon05.ico" --add-data "C:/icon05.ico;." --hidden-import "tkinter"...

View Article


Using sympy to integrate function - doesn't return algebraic/numerical output

This is my first time on overflow and I'm pretty new to using Jupyter and sympy. I'm trying to integrate a function numerically as it simply cannot be done analytically, and here's the code:from sympy...

View Article

Opencv Template matching feature does not give 100% matching resullt

I applied below code"templateMap = cv.matchTemplate(img, resized_template, cv.TM_CCOEFF_NORMED)"Before applying the image and template,apply Gaussian Blur, edge detection, and binary thresholding to...

View Article

How is Python and Perl Used in ASIC, SoC, and Digital Design Engineering?

I am currently looking for positions in digital design, ASIC design, and SoC design. I've noticed that these positions often require skills in Python and Perl.Could anyone provide insights on why...

View Article


CryptographyDeprecationWarning: Python 3.6 is no longer supported by the...

I upgraded my system from python 2 to python 3, and now when I run my code:from cryptography.hazmat.backends import default_backendI am getting this...

View Article


Assistance with the Segmenteverygrain module

I have recently been tasked with image segmentation of very small granular objects. I asked around, and found that Segmenteverygrain was the model that I needed to use.I had used a script made to QC...

View Article

Python UTF-8 Lowercase Turkish Specific Letter

with using python 2.7:>myCity = 'Isparta'>myCity.lower()>'isparta'#-should be->'ısparta'tried some decoding, (like, myCity.decode("utf-8").lower()) but could not find how to do it. how can...

View Article

limited trade execution using using backtesting.py library

My goal is to backtest data where you provide buy/sell dates and closing prices to backtest module in order to backtest data from one source csv (instead of having 3 separate files such as price data,...

View Article

Regex expression to find the substring that contains certain amount of...

I have a string like"GGACATCGCGGTGGATCGAC"How can I find all substrings that contain, for example, three Gs in any order?For this string, it would be 'GCGG' or 'GTGG', or 'GGACATCG'.Also need to find...

View Article


I need to merge the following coordinates, but there is a small discrepancy

For the following coordinates, I need to merge them into a single vertical line, but I’m not sure how to proceed.The coordinates:[((57.825, 112.6), (58.575, 113.35)), ((57.825, 113.35), (58.575,...

View Article

Image may be NSFW.
Clik here to view.

Fit same model to many datasets in Python

Below I demonstrate a workflow for fitting the same model to many datasets in R by nesting datasets by test_id, and then fitting the same model to each dataset, and extracting a statistic from each...

View Article


No module named urllib3

I wrote a script to call an API and ran it successfully last week. This week, it won't run. I get back the following error message:Traceback (most recent call last): File "user_audit.py", line 2, in...

View Article

Move a html tag from one html file to another with BeautifulSoup

I have 2 HTML files called A.html and B.html. Each file has exactly 1 tag. I want to replace the "pre" tag in B.html with the one in A.html with BeautifulSoup but I haven't found any solution so far...

View Article


How do I get the orientation from a open3d.geometry.OrientedBoundingBox?

I've created a Oriented Bounding Box from a clustered sub point cloud of a Velodyne Lidar (rotating laser sensor). I want to get the orientation of the Bounding Box (preferable as a...

View Article

ERROR: Failed building wheel for python-rtmidi when installing MAGENTA

Please, help, when I try pip install magenta it gives me that errorI tried upgrade and downgrade the python versions, the pip versions, the Microsoft Visual C++ but it still doesn't work. I saw...

View Article

Converting Hugging Face Transformer Text Embeddings Back to Text

Is there a method for converting Hugging Face Transformer embeddings back to text?Suppose that I have text embeddings created using Hugging Face's ClipTextModel using the following method:import...

View Article
Browsing all 23390 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>