2,204,337 questions
Score of 0
1 answer
54 views
pywebtransport and docker - client timing out trying to find server
I am trying this example and having trouble getting the client to connect to the server for a basic echo server.
Client code:
import asyncio
import ssl
from pywebtransport import ClientConfig, ...
Score of -7
0 answers
86 views
List of Lists for Values in a Table with Rows & Columns [closed]
Employee_ID 101 102 103 104
Name Sarah Connor Marcus Wright Kyle Reese Ellen Ripley
Department Engineering Marketing Operations Engineering
...
Score of -7
0 answers
144 views
Duplicate keys in a dictionary [closed]
This issue has nothing to do with mentioning the same key more than once while initiating a dictionary, like in here:
d = {"foo": 18, "bar", 1818, "foo": 181818}
and ...
Score of 1
1 answer
63 views
How is the number of bins/bin width determined in a seaborn histogram by default?
All I have found in the documentation is:
The default bin size is determined using a reference rule that depends on the sample size and variance.
I calculated the bin width based on the Freedman-...
Score of -5
0 answers
61 views
Tickspot API: How Can an Admin Retrieve Only Their Own Projects and Tasks?
I’m working with the Tickspot API and have a question regarding projects and tasks for admin users.
For time entries, we are able to use user-level filters such as user_id, which works as expected.
...
Score of 0
1 answer
132 views
Write a protocol method that allows slight variations
How can I write a method in a typing.Protocol that is lenient to slight changes in function signature?
For example, suppose I want to write a SupportsPut protocol that defines an abstract method named ...
Score of 3
1 answer
127 views
Why does Pyright reject protocol methods with a "pass" body?
Suppose I have this protocol in Python:
from typing import Optional, Protocol
class Talkable(Protocol):
def talk(self, topic: Optional[str] = None) -> str:
pass
Pylance flags talk as ...
Score of -7
0 answers
90 views
Automatic Order Request From Image [closed]
The company I’m working is a B2B business. Customer can send an order request, sometimes as a hand-drawn sketch. For example, a drawing of a glass door with measurements for each side and some symbols ...
Score of -4
1 answer
94 views
Why does hashlib declaration location matter in python?
I created a set of test files that looks like this.
./
├── a
│ ├── file1.txt
│ └── file3.txt
├── b
│ ├── file2.txt
│ └── file4.txt
Where the contents of file1 and file4 are exactly the same (...
Score of -3
1 answer
136 views
How to see the selected text in Python Tkinter Text when the Text is not in focus
I've written some code where there is a window with a Text widget and a window with a button. The command of the button is selecting all text in the Text widget. The window with the button is a ...
Score of -10
0 answers
72 views
Shortcut to not have to type out entire alphabet or numbers [duplicate]
Is there any way to shortcut typing out the entire alphabet with a command? I'm trying to add values to all the letters, so I'm not sure.
Score of -5
0 answers
62 views
pyqt5, mariadb Not getting connected to the DB [closed]
Here is the initial code. The program works without the DB part, but once added it breaks. I'm using PyQt5 Designer and geany editor on Ubuntu:
#!/usr/bin/python3
import sys
from PyQt5.uic import ...
Score of 1
1 answer
95 views
Ansible Lookup Plugin to query the inventory?
I would like to create a Lookup plugin that queries the inventory to gather some data on hosts and format them.
I tried a jinja expression but I found the solution was convoluted and a pain to put ...
Score of 0
0 answers
69 views
How can I get latest reading from multiple GridDB TimeSeries containers using Python?
I am working on IoT project ESP32 devices send sensor readings to a python backend. I'm storing the readings in GridDB using a separate TimeSeries container for each device.
For example, a container ...
Score of 0
2 answers
94 views
Member None of Any | None does not have attribute with_columns - polars & PyCharm problem
Minimum Reproducible Example:
import polars as pl
df: pl.DataFrame | None = pl.DataFrame({"x": [1]})
if df is None:
raise RuntimeError
df.with_columns(y=pl.col("x") + 1)
...