2,209,308 questions
0
votes
0
answers
5
views
Postgres dump works with python os.system but not subprocess
This runs successfully:
os.system('pg_dump sdtests > /home/bret/dump.custom')
But doing it with subprocess gives an error:
command = ['pg_dump', 'sdtests', '>', '/home/bret/dump.custom']
...
0
votes
0
answers
9
views
Why does my Binance Futures STOP_MARKET order disappear after a successful API call with python-binance?
I am using the python-binance library to place a STOP_MARKET order on Binance Futures. The API call is successful and returns a valid order response with an algoId. However, the order appears in the ...
-1
votes
0
answers
15
views
What is id_data.keys() and how to prevent IDPropertyGroup change size during iteration?
I'm trying to revive an old blender add-on for personal use, all fixes were successful so far, but I stumbled upon this error:
for prop in o.id_data.keys():
RuntimeError:IDPropertyGroup changed size ...
1
vote
2
answers
34
views
pd.Timestamp has attribute .isoformat, but the series accessor .dt does not
I am trying to convert a column of pd.Timestamp objects into a columns of type str where the dates are encoded in ISO format.
The class pd.Timestamp has the handy classmethod .isoformat() that does ...
0
votes
0
answers
35
views
Bizzare "kernel has died" error in pandas df.to_excel() caused by geopandas
When pandas.read_excel(), df.to_excel(), geopandas.read_file() and gdf.to_file() are called in a certain order in different environments, pd.read_excel() sometimes causes "Kernel has died" ...
0
votes
1
answer
36
views
Child widgets not shown correctly if parent Frame is gridded later
I have an application that divides the main window in two:
Left: a canvas, where a map will be displayed
Right: a frame, where several other frames will share space and one of them will be shown ...
-1
votes
0
answers
8
views
How to design a simple utility class to read .ini configs using configparser? [closed]
I’m using Python’s configparser module and I want to wrap it in a small utility class.
My goal is not to design a whole configuration system—I only want a clean way to load a .ini file and fetch ...
Advice
0
votes
3
replies
108
views
I'm a beginner learner and i'd like some feedback on this really simple program calculating an employee's pay
hours = input("Enter hours: ")
try:
hours = float(hours)
except:
print('Please enter a valid number')
quit()
rate = input("Enter rate: ")
try:
rate = float(rate)
...
0
votes
0
answers
17
views
Qiling: No Write Permission after the emulation
I am creating a tool with GUI using PyQT, so the Qiling emulation is being executed in a QThread object. I am using rootfs sandbox env with the qiling. Now I can create a file before the emulation ...
-3
votes
1
answer
51
views
How to make my TOTP generator work with other hashing algorithms (other than sha1)? [closed]
I'm having trouble making my Python code generate the correct TOTPs using the test secret key 12345678901234567890, the same one used in the RFC6238 appendix B examples. I was able to get the correct ...
0
votes
1
answer
26
views
Problem when apply Lineload in Plaxis 2D from Python
I am trying to assign a serie of line loads in Plaxis 2D from a Excel table by following steps below:
LL_RD = []
Load_RD_NB = []
for i in range(0,12):
LL_RD.append(g_i.line(point_I[i], point_I[i+...
-3
votes
0
answers
25
views
How to design a simple utility class to read .ini configs using configparser? [closed]
I’m using Python’s configparser module and I want to wrap it in a small utility class.
My goal is not to design a whole configuration system—I only want a clean way to load a .ini file and fetch ...
0
votes
1
answer
48
views
How to calculate the gradient of a scatter graph?
I have an arguably common problem, but I don't seem to find any instruction on the web. I have a 3D Numpy array containing the coordinates of N points:
In[1]: import numpy as np
In[2]: N = 50
In[3]: ...
Tooling
0
votes
3
replies
48
views
Is there a tkinter editor suitable for beginners
I am a newbie in Python. My assignment requires me to use a graphical interface, and I plan to use tkinter for this purpose. However, I find manually typing code too complicated. Could any expert ...
1
vote
1
answer
21
views
How to build and install a BLAS-enabled llama-cpp-python (GGML_BLAS=ON) on WSL (Ubuntu)?
I’m trying to install a BLAS-enabled version of llama-cpp-python on WSL so that the GGML library uses OpenBLAS. I attempted two different pip install invocations with CMAKE_ARGS, but the module ...