2,210,820 questions
0
votes
0
answers
9
views
Flet app for Supabase account management: unable to reset password for already registered email
I developed a simple authentication UI (login, registration, and password reset) for a Flet app using Supabase as the backend for user management. The app entry point is the main function which sets ...
-2
votes
0
answers
26
views
How to get the public IP address of my Pythonanywhere server?
I'm making a multiplayer game in Python using sockets and I can't port-forward on my network, so I've decided to use Pythonanywhere for the server. However, I don't know the public IP address of my ...
0
votes
0
answers
16
views
Difference between Tensorflow/Keras Dense Layer output and matmul operation with weights with NumPy
I was trying to mimic the result of a simple Tensorflow/Keras Dense layer with NumPy (forward pass only) and I was surprised not to have the exact same result.
A dense layer output is just the product ...
-1
votes
0
answers
17
views
transformer datasets 4.0.0, load_dataset issue
dataset: 4.0.0
pytorch: 2.7.1+cu126
system: Ubuntu 22.04.5 LTS
Following the official example I tried this code:
import datasets
print(datasets.__version__)
import torch
print(torch.__version__)
...
0
votes
4
answers
35
views
In python: How to generate only one box plot for a matrix?
This code generates 4 separate box plots.
How can i generate only one box plot for the entire matrix?
data = np.random.random(size=(4,4))
df = pd.DataFrame(data)
df.boxplot()
0
votes
0
answers
28
views
Using DataLoader for efficient model prediction
I'm trying to understand the role/utility of batch_size in torch beyond model training. I already have a trained model, where the batch_size was optimized as a hyperparameter. I want to use the model ...
0
votes
0
answers
23
views
Why is my plotly.graph_objects.Bar graph displaying increments of one rather than the values in my pandas DataFrame?
I have workouts logged in JSON like this:
[
{
"date": "2025-07-14",
"workout_name": "Lower",
"exercises": [
{
"name&...
0
votes
0
answers
38
views
Why does unpacking a 3-element tuple from heapq.heappop fail when using _, _, node = ..., but not with val, i, node? [closed]
I'm working on Merge K Sorted Linked Lists from Leetcode and the optimal solution requires use of a heap. When unpacking the tuple from heapq.heappop(), I figured I would use _, _, node to unpack, as ...
1
vote
1
answer
43
views
How is import os.path possible? [duplicate]
Since os is a module instead of a package, import os.path should fail. For comparison:
>>> import os.sys
Traceback (most recent call last):
File "<python-input-0>", line 1, ...
1
vote
1
answer
41
views
How to change color in grouped plotly bar plot
import plotly.express as px
import pandas as pd
data_media_pH = pd.DataFrame([[8.33, 8.36, 8.36], [8.21, 8.18, 8.21], [7.50, 7.56, 7.64]], index=["4 °C", "37 °C", "37 °C + 5 % ...
0
votes
0
answers
23
views
Why python prometheus client collectors create metric object every time when collect method is invoked
https://github.com/prometheus/client_python/blob/master/prometheus_client/gc_collector.py
import gc
import platform
from typing import Iterable
from .metrics_core import CounterMetricFamily, Metric
...
0
votes
0
answers
21
views
Python Library dependency issue when trying to upgrade openssl due to Cryptography
I want to upgrade openssl latest package 3.5.1 in a Miniconda python virtual environment in the Centos OS. So I tried below command
conda update openssl
output for above cmd
conda update openssl
...
0
votes
3
answers
29
views
whenever i hit post request on my page then I cannot display the updated value from database even though I fetched the data from updated db
This is my code and inorder to fetch the correct result i have to either refresh or render the user.html again to reflect the changes.
is there any way to do it more efficiently
I tried rendering the ...
-2
votes
3
answers
67
views
How to package a module in Python 3? [closed]
I am struggling to find a way to package a module in Python 3. My package is not being recognised as such, meaning the module cannot be imported.
As an example, I do the following in the same order:
...
-5
votes
0
answers
47
views
How can I merge two dictionaries with nested structures in Python without overwriting values? [closed]
I'm trying to merge two dictionaries in Python where both might have nested dictionaries inside. The default dict.update() method overwrites values instead of merging them recursively.
dict1 = { 'a': ...