Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Search
Hello everyone, I am seeking help with understanding why multithreading does not work correctly in this example: import time import matplotlib.pyplot as plt import concurrent.futures voltage...
I have a dataset of car bookings like this: car_id user_id 1 1 2 1 1 2 3 3 1 2 3 3 In this dataset, two separate groups/sets of cars and users...
Is it possible for a Python program to send itself in the background? For example, on Linux you can do nohup some_cmd & and any program will run in the background. Some programs also support s...
I want to write one or more self-answered Q&As on the topic of text encoding in Python, to serve as canonicals and preempt future lower-quality questions. I can think of the following things th...
I would like to use tf.timestamp() when it is available (eager mode and graph mode without XLA), and use 0. (or a better fallback if there is one) when it is not available (with XLA; @tf.function(j...
I have a Python program like this: done = False while u and not done: i = u.pop() print(f"Processing {i}") do_big_task(i) finish_up() Since this takes a long time, the user m...
Background Many Python programs now recommend installing with pipx, and there is a sense that you shouldn't install with pip anymore, you should use tools like pipx. Main Question However, what ...
I just noticed this question about data structures in the Q&A. Although algorithms and data structures are often (part of) a solution to a problem when writing software, this question is const...
In VS Code, is it possible to run Python code on the text being edited? I realize that I can save my text, create a .py file, switch to a terminal (including VS Code's own terminal) and run the .p...
Sometimes code needs to assign (or otherwise use) a value that depends on some condition. The naive approach is to use explicit branching, which in Python would look like: if some_condition(): ...
tl;dr: When a question is unclear, don't close right away, especially if it's possible to discern what they are trying to ask. Instead, use comments and edit suggestions to work with the asker and ...
When you try to do a privileged systemd operation without the privilege, you get an escalation prompt: $ systemctl stop docker ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ==== ...
I have multiple installations of Python on my machine. When I run Python, what determines which installation is used? How can I control this?
As part of a general effort to produce basic Q&As for Python, recently I've been focused on issues related to starting up an interpreter and running the code - so, questions about setting up an...
It seems that year over year, computers constantly get easier to use, and it becomes easier for people to start learning to program who have never touched it before. This comes with the consequence...
As far as I can tell, there are no tags yet for the main Q&A. I suggest setting an initial group of tags which help organize questions. Two groups I think would be particularly helpful are lang...
Let's say I have a script that needs the user to set X number of variables at the start. One can either Pass the arguments in on the command line. Start the program and then have the user input...
I am using tf.keras.preprocessing.image_dataset_from_directory. According to the documentation, the related image_size parameter is the Size to resize images to after they are read from disk. How...
Summary/Context I'm currently working to improve performance and throughput of our automation infrastructure, most of which is a combination of Bash/Shell scripts, Python scripts, Docker, Jenkins,...
When writing Python-based apps (e.g. Django, Flask, etc.), it's often the case that import statements can be found all over the place, often more than once for the same module. For example, you can...
We are using Jenkins to run our system tests on a regular schedule. The Jenkins job downloads some python scripts from Perforce, runs them and compares the outputs with known-good results. The pro...
I am planning to build a "Customer Management Portal" as a hobby project using technologies like HTML,CSS,JavaScript,JAVA,JDBC,Oracle Database.The description of the portal is: 1)Customer details ...
I work with CentOS operating system and my only shell is Bash. I want to create a script which prompts a user with a question like "What is your web application root?" The user should answer dire...
I have around 20,000 .npy files in a directory. That main directory has no subfolders:- Main_dir | |--1.npy |--2.npy |--3.npy |--........ The absolute file paths are stored ...
I edited the tags of my very first Codidact question: https://software.codidact.com/posts/281486 Someone proposed the "python" tag. Since I am working with C++, I removed the "multithreading" tag...