2,207,358 questions
1
vote
0
answers
21
views
Sklearn Pipelines, adding features and column transformers
I'm just trying out/experimenting with sklearn. I'm using the California housing dataset, and I'm trying to make a pipeline to create some additional features, then take the logarithm of some features,...
1
vote
0
answers
15
views
MLflow runs stuck in "RUNNING" state when using Ray Tune ASHAScheduler with XGBoostTrainer
I am using Ray 2.x with the XGBoostTrainer to perform hyperparameter tuning. While Ray Tune offers a driver-side MLflowLoggerCallback, it does not provide the fine-grained control I require for ...
3
votes
2
answers
83
views
How should we interpret this function signature?
How should we interpret this function signature ?
class MyObject:
def get_context_data(self, *, object_list = ..., **kwargs):
context = super().get_context_data()
I mean, given both the *...
0
votes
0
answers
31
views
Extracting skills and professional experience from career networking platform profiles
I am automating login to a session-based website using Playwright, then reusing the extracted cookies in Python's requests library to call a protected API endpoint. The login works fine, but my ...
1
vote
0
answers
39
views
PyDirectInput hotkey(Win+D) outputs 'd' instead of showing desktop
I'm trying to simulate the Win+D keyboard shortcut using the pydirectinput library. However, instead of minimizing all windows and showing the desktop, it simply output d.
Environment:win10 python 3....
Tooling
0
votes
0
replies
21
views
`dnf provides` for `pip`
I do a lot of building, so package errors cause the most friction. In particular, when working with pip, the ModuleNotFoundError: after all package names can be confusing / unexpected and not ...
Advice
1
vote
2
replies
54
views
Can I create a layer in Keras that de-scales my output?
I am working on a keras regression network that takes about 60 input variables and outputs 35 variables. For both the input and output, about half of the variables are in the range of ±10, while the ...
Tooling
2
votes
0
replies
21
views
Python treemap with first level as color and legend rather than labels
I would like to try and create treemaps in Python that look similar to these ones :
First example of what I'm aiming for
Second example of what I'm aiming for
(These examples come from this webpage)
...
1
vote
1
answer
25
views
Intersection of PolyData and ImageData in VTK Python
My aim is to smooth mesh a segmented volume, and to voxelize the generated mesh at higher resolution. The reason I do this is I want to be able to compute the normals at the isocontours and determine &...
Best practices
0
votes
2
replies
62
views
Metadata-based deepfake detection
I want to develop an mvp metadata-based deepfake detection tool under one month for my final year project and I am still a beginner in Python. Any advice on how I can accomplish this without failing ...
5
votes
1
answer
94
views
UserDict.popitem is not LIFO
Consider the following snippet:
from collections import UserDict
class D(dict): ...
d = D(foo="bar", baz=42)
print(d.popitem()) # ('baz', 42)
class UD(UserDict): ...
ud = UD(foo="...
-4
votes
0
answers
51
views
Difficulty stripping track ID from Spotify web API search [closed]
I'm trying to to get the track ID in Python for a track in Spotify (https://open.spotify.com/track/track_id) after returning search results for a track using artist and track name but just keep ...
0
votes
0
answers
26
views
Spark SQL MERGE/INSERT on Iceberg Recomputes Upstream Join Instead of Reusing Cached DataFrame (MEMORY_AND_DISK)
Spark SQL + Iceberg: MERGE and INSERT appear to ignore cached DataFrame and re-scan source
I am trying to optimize an SCD2 flow in Spark SQL (Python API) using a cached intermediate DataFrame.
...
1
vote
1
answer
70
views
Why does tkinter not accept self=None in this case?
Given:
for i in range(5):
if comparisonGuess[i]==word[i]:
print(f"{guess[i]} is in the word at position {i+1}. hooray")
ctk.CTkLabel.place(self=None, text={guess[i]},x=...
-7
votes
1
answer
76
views
pip error "Defaulting to user installation because normal site-packages is not writeable" [closed]
This is a writeup of a problem that pussled me a bit. On
pip install ipython
I got an error "Defaulting to user installation because normal site-packages is not writeable".
The error ...