Questions tagged [python]
Python is a dynamically typed, multi-purpose programming language. It is designed to be quick to learn, understand, and use, and enforces a clean and uniform syntax. Note that Python 2 reached end-of-life on January 1st, 2020. For version-specific Python questions, add the version tag (e.g. [python-3.x] or [python-3.9]). When using a Python variant (e.g. Jython, PyPy) or library (e.g. Pandas, NumPy), please include it in the tags.
python
1,730
questions
0
votes
0
answers
7
views
Azure Synapse: How to get notebook magic command %pip to work in a pipeline
When running %pip install in my Synapse notebook manually, it works as intended, without any problems.
However, when I try to run that same notebook in a pipeline, I get:
{
"errorCode": &...
0
votes
0
answers
4
views
Calling module from jupyter notebook inside of poetry project reults in 'No module named' error
I'm working on a module with poetry with a directory structure like
./
/my_module
(module files)
/tests
test_thing.py
/jupyter
demo.ipynb
In the test files and jupyter ...
0
votes
0
answers
5
views
Python seaborn kdeplot - how to use background image
I have been recording the xy cordinates of the ball bounce location on a tennis serve. I am just using this data to play around with different visualisations, and keen to try a heatmap using seaborn (...
0
votes
0
answers
6
views
TypeError: 'NoneType' object is not subscriptable while fetching information for rejected reason from jira
for issue in issues:
fields = issue['fields']
results.append({
'key': issue['key'],
'summary': fields['summary'],
'description': fields['description'],
'...
0
votes
0
answers
7
views
removal of lines in an image using Python
I am trying to use Python and cv2, numpy, skimage, etc to remove a 'shadow line' from a black and white image if one exists in the image. Essentially my image can have 1 or 2 curved lines like the ...
0
votes
0
answers
7
views
Using pymongo installed via virtualenv and Ansible returns an error
Since it's good practice to install pip modules in virtual environment, I have the following task in place:
- name: Install python packages
ansible.builtin.pip:
name:
- pymongo
...
0
votes
0
answers
4
views
Getting NAN in Tensorflow weights and biases. How to troubeshoot?
I have input data (x,y,v) each with the shape of (200,10000). I.e. I have 200 samples where x,y and v are of size (10000,).
The code basically predicts velocity by getting x and y as 1D array.
I ...
0
votes
0
answers
14
views
What to do after cross validation?
After using cross-validation to see how a custom predictive function performs on unseen data, I applied to function to the original dataset, and the performance (based on coefficient of determination) ...
0
votes
0
answers
4
views
Unet from segmentation_models_pytorch stalling in training
I have been following a tutorial on training a segmentation model on a custom dataset, but it refuses to make any progrees in training the model.
This is my model setup
import ...
0
votes
1
answer
15
views
assign rank and maintain sequence across duplicates
I'm assigning an incremental rank based on a value, but need to assign the same rank to duplicate values and maintain the overall sequence.
Instead of this:
Value
Rank
400
1
500
2
175
3
250
4
...
0
votes
0
answers
7
views
Python async_playwright
Ich schreibe ein Programm was von der ilovemusic Website die Streams abspielen soll. Das funktioniert auch. Nur das Problem ist wenn ich die Scraper Klasse in der main.py aufrufe über scraper_task = ...
0
votes
0
answers
15
views
auto-py-to-exe expected str, bytes or os.PathLike object, not NoneType
I'm using auto-py-to-exe to convert my django project in an exe file but I couldn´t:
Traceback (most recent call last): File "C:\Users\gerar\AppData\Local\Programs\Python\Python312\Lib\site-...
-1
votes
0
answers
10
views
pickle serialization not persisting after closing program
Ive made a program to track my barbell lifts. The code I've shown below is opening up a serialized pickle dictionary called users, and if users is empty it prompts the user to create a profile.
import ...
0
votes
0
answers
16
views
What is the most efficient way to multiprocess over a very large dataframe?
I have a large Dataframe that I need to do a lot of matching operations over, and in the past have always used the below method for doing it. However, the Dataframe that I am currently attempting to ...
0
votes
0
answers
9
views
hosting a flask app in AWS lambda with API requests from teams bot
I am trying to host a teams bot on AWS, the message endpoint is set to the api gateway from the lambda function. The goal is for it to just send "message" back, however upon testing it gives ...