How do I have multiple src directories at the root of my python project with...
I want to have two src dirs at the root of my project. The reason is that one is code I want to work without modifying any of the imports. The second is new code indepdent of the "old code". I want two...
View ArticleCUDA_HOME error even though CUDA_HOME is set
I was recently trying to run the neuralangelo program developed by nvidia labs and I ran into an error while setting up the conda environment:Collecting...
View ArticleWhich runtime should be faster?
I implemented two solutions to Leetcode problem 988: one that creates a list of strings and sorts it to return the smallest (lexicographically) and another that just keeps track of the smallest...
View ArticleHow to write xml file root value with Python
I have a script which i want to use to create Write Files to update a serial number on a device.It does a folder/file path check -> Copies the Read.xml and Creates a Write.xml (Copy) -> Obtains...
View ArticleHow can i make my python script check if dicts inside a list have a specific...
Example i have a list like this:my_list = [{'name': 'a', 'value': 1}, {'name': 'b', 'value': 3}, {'name': 'a', 'value': 4}, {'name': 'c', 'value': 4}]I want to get the dict named 'a' and has the value...
View ArticleHow to run New-LocalUser in Python with subproces
I'm working on a final project for a scripting class at my community college. Recently I used Powershell to add users, give them a password, a description and assign them to a group that was created....
View ArticleHow to make tables of information for variables
I'm learning Python and making a Dungeons & Dragons-based text-based game. I'm curious if there's a way to make a table or something so I don't have to specify the same variables (enemy_ac,...
View ArticleUnimplementedError...
I have trained my deep learning model and saved it with the name "try_model_in_out.h5", then I want to try to create a website that can receive input and use the model I have trained to predict the...
View ArticleDeploying Multi-Module Python Applications on GCP: Service Recommendations?
I'm working on a project involving a Python application with multiple interacting modules and am looking for some advice on deploying it efficiently on Google Cloud Platform. Here's a brief overview of...
View Articlecalling and passing arguments between two python files
I am using customtkinter textbox for a GUI in file1, and I want to print multiple texts whenever I call the print function in file1 from file2. Sorry, it's a 300+ LOC. I just put some of the codes here...
View Article\CMake was unexpected at this time
I'm trying to build Blender, and I had ued the CMake thing in Visual Studio, or at least I activated it, and then I got this error after running Make. Here's the code so...
View ArticleHow to forward fill a subset data to have a continuous monthly data
I need to copy data as a forward fill from Jan 2023 to Feb 2023 and March 2023 for SKU1, Location1 since data submissions are missing. For this: 1. need to create a continuous months for each sku,...
View ArticlePandas Datetime: Calculate Number of Weeks Between Dates in Two Columns
Let's say I have a dataframe with two columns that contain dates, and I want to create a new columns whose value is the number of months between those dates.>dfIndex Date1 Date21 2012/03/07...
View ArticleChange the Protection Status for Locked for a special column
I would like to use Openpyxl to change the Protection status for Locked for the special column.I have tried to use the following codefor col in ['K']: for cell in ws[col]: cell.protection =...
View ArticleWhy does my Python TensorFlow 2.x model execution not use eager mode by API...
I am trying to set TensorFlow to eager mode as my model is built to run in eager mode (rather than graph mode).I traced down that some percent of my inference requests land in non-eager mode and those...
View ArticleHow to convert encoded Preeti font text to unicode leaving English words as...
I am trying to convert Preeti font text to unicode. I am using Python and npTTF2UTF library. It works most of the time but it also converts English words like 'Microwave' into unicode equivalent. How...
View Articlegroupby and Multiplying a column by scalar
I wrote this code:tmp_ml['mode_dur_secs_lb'] = tmp_ml.groupby(['id', 'c_num']).apply( lambda x: x['mode_duration_secs']*0.9)table:idc_nummode_duration_secsa111620a12793a2919a31616a31719TypeError:...
View ArticleImportError: DLL load failed while importing QtWebEngineWidgets: The...
I've been using PyQT5 for ages. I'm very frustrated because out of NOWHERE I started getting this DLL error, and none of the solutions are working.I've already tried:pip uninstall PyQtWebEnginepip...
View ArticleFastAPI Application python error JSON not serializable
I'm coding an API with FastAPI for this project TripoSRMy code at this moment is following (I only need this 2 functions):from fastapi import FastAPIfrom gradio_app import preprocess, generate#...
View ArticleParsing message out of plain text MIME encoded email stored in database in...
I have this wall of mime encoded HTML (at least that's what it looks like to me) text stored in our database. I want to extract just the message out of this in python. So, in this case, the message...
View Article