Based on this answer (among others) it seems like f-strings is the preferred ways to convert to hexadecimal representation.
While one can specify an explicit target length, up to which to pad with leading zeroes, given a goal of an output with an...
I installed module, however it still gives me an error. And it's not just sqlalchemy, some other give error as well.
running pip list:
(.venv) \\MyProjects\TestProject> pip list
Package Version
----------------- -------
greenlet 3.0.3
pip 24.0...
I want to make system recommendations using custom data with TensorFlow recommenders, I have followed the tutorial on the official website ( and I also followed the tutorial at here
problem:
The recommended results are given outside of the...
I have a date column in data bricks, which has a value '-' for 1 record. I am unable to either filter it out or select this row. How can i use this value '-' in where clause?
I have tried
spark_df_2023_fil=spark_df_2023.filter(spark_df_2023 ==...
I have an implementation of the Miller-Rabin-Primetest, coded in python3.
Unfortunately I have no idea how fast this test should be on my machine.
With my code I can test the number $n = 2^{10^4}+1$ in less than 4 seconds.
But I don't know whether...
Paramiko's get method is used to download files from a SFTP server.
Say I have 100 files. Can I download them simultaneously somehow, e.g. by downloading the entire folder in one go? Or do I have to download each file one after another?
With the following code, I want to show how to synchronize with a thread.
I want to have a separate thread that updates an image.
From these images, I want to have an asynchronous generator.
The images should only be updated when the...
I need to run X amount of tasks in a day, and I need the frequency of the tasks to vary according to a wave function (with a period of 2pi/24 , or with one peak per day and horizontal shift of 2pi/3.5 - I need to find the amplitude/vertical shift)....
I'm new to image processing and I'm struggling a bit, I'm making my own diy security software and I made a function to detect some movement in order to start recording and notify me.
The idea of this function is to take two images and diff them in...
I want my python code to wait until I'll finish tou edit a file and then I want him to take the data that I edited.
I tried to use a simple line: x = input() but it didnt work and I tried also to do a while that run until I finish didnt work as well...
I have the following code:
def grab(resi):
s1 = f resi {resi} & name P
s2 = f resi {resi} & name C4'
s3 = f resi {int(resi) + 1} & name P
s4 = f resi {int(resi) +1 } & name C4'
I am trying to build Surge XT synthesizer with python bindings so that I can use surge methodically. I have been following the instructions at Surge's GitHub Page, so I ran
git clone
cd surge
git submodule update --init --recursive
cmake -Bbuild...
I am converting a Tkinter GUI python program to .exe file using pyinstaller, while converting if i use -windowed tag my system is flashing it as a virus and my antivirus is halting the process and even without the antivirus, windows defender is...
Is it possible to test if my site is running using PowerShell or Python (not using selenium)?
I have web site hosted in Azure Web App service. I tried to test with simple request requests.get(' It returns 200, what is fine.
But when I make some...
I want to run a script on a Raspberry Pi Zero that collects data and saves the data in an Excel file. For this, I am using pandas. The same script worked on a Raspberry Pi model 4 B before. However, now I get this Error:
numpy: Error importing...
So I was writing my first ever autoencoder, here is the code (it can be a little bit goofy, but I believe I written all of it right):
class Autoencoder(nn.Module):
def __init__(self):
super(Autoencoder, self).__init__()
I'm trying to create a Python .exe with a custom icon using PyInstaller. I have two items in the working directory: icon.ico (which is the icon image I want for the app) and main.py which is just a simple hello world script.
When I run pyinstaller...
enter image description here
I check for a value with 'for i in list' with an if else statement. It runs the program on each indexed element individually until 'break.' Why does else run when if has been satisfied?
The example I copied only returned...
Good afternoon everyone, I have encountered the following problem. From a stream of TCP segments, I pulled binary data with the help of wireshark, which I later found out is a bmp file. Then I load one big line of binary data, clear it from spaces,...
I cant figure out how to add a line to my contour plot at x=y.
epsilon_1= np.linspace(1,25,1000)
epsilon_2= np.linspace(1,25,1000)
eps1, eps2 = np.meshgrid( epsilon_1, epsilon_2 )
plt.contourf( eps1, eps2, E, 100 ,cmap= jet )
I have a python file( python_test.py) and I want to run the file by windows task scheduler because if the execution is stopped by errors I want the scheduler to check and run the Python file.
However, my python_test.py is executed with input...
Quite new to coding and I'm trying to make a rock paper scissors game. I'm trying to get it to loop back around to the start when it is done, and print the amount of wins and losses the player has. Keep getting errors that I have no clue how to fix...
Вы не можете начинать темы Вы не можете отвечать на сообщения Вы не можете редактировать свои сообщения Вы не можете удалять свои сообщения Вы не можете добавлять вложения