I'm making a server in python using FastAPI, and I want a function that is not related to my API, to run in background every 5 minutes (like checking stuff from an API and printing stuff depending on the response)
What's wrong with this NRRD file? When loading a single slice, it works correctly, but when loading multiple slices to generate a volume, it fails to load. The file is:
NRRD0004 # Complete NRRD file format specification at: # type: short dimension:...
When adding new users to a CSV file using a Python script, the previously added users are not retained in the output file. The script reads existing users from an output CSV file, processes new users from an input CSV file, and writes both existing...
This is the error I encountered when trying to apply to the dataset, is there any way to fix it?
/usr/local/lib/python3.10/dist-packages/transformers/tokenization_utils_base.py:2645: FutureWarning: The pad_to_max_length argument is deprecated and...
I'm trying to work on feature selection to identify the features that are related to the response. So far I've used RFE, RFECV, SelectFromModel and SequentialFeatureSelection from sklearn. After model fit, the selector's estimator attributes allow...
I'm working on my first ever REST API, so apologies in advance if I've missed something basic. I have a function that takes a JSON request from another server, processes it (makes a prediction based on the data), and returns another JSON with the...
I am making a simple video player with pyav, and using the container.decode(video=0, audio=0) method to decode both audio and video frames, then syncing them using PIL and pyaudio.
Hhello, I'm studying a data science bootcamp and we're learning Python. One of the exercises is to make a battleship game, and my team's code is going pretty well. We're using a NumPy array as the ocean, we want to use blue squares, 🟦 , to...
I have a django project and I would like to trigger a script for every 30 items that get uploaded by users. Basically, after 30 items have been uploaded by users, the script checks the latest (i.e. last) item which has been uploaded by a user, and...
I am using conda 23.7.4 and fish shell on Windows10,I execute conda init fishsuccessfully,but conda activate pytorch failed, and the error report said:
I'm new with telethon and I have a telethon python script that is listening for telegram messages, all this part works correctly, but I'm improving my script, what I need to achieve is the following:
I am working on a personal project in Keras, although I am a novice at it, where I need to create a custom activation function that allows raising a sigmoid function to a decimal power. I have run several tests, and when I use decimal points, the...
I have a df where I have different columns. I have a column for userId and other columns contain boolean values. I am trying to drop all rows where the value is False for all the boolean columns in that row. I tried using df.any() but it's not...
I am writing mymax() function as a replacement of python in-built max function. mymax will be universal function - can take any iterable (list, tuple, string) and returns the largest element in the iterable. While this works totally fine for list...
I have a discord.py bot and I’ve just expanded to cogs, but now when I run a command that needs to access ctx.guild.id but I'm getting an error assuming that I’m trying to get cogname.guild.id. What should I change to fix this?
I have created consumers.py and a frontend in HTML and CSS to display messages sent by a user, the message displays well and the username appears well but the timesince always appear as undefined even though I printed the time stamp from the...
I have a nested dataframe, where I am trying to update a certain element within a struct of a array. I am able to achieve that using F.transform(). However the problem arises, when the array within the struct is empty, then getting syntax error :...
this a part of a code from COA:
this code is an original one from the author in Matlab:
function = fun_info(F) switch F case 'F1' fitness = @F1; lowerbound = -100; upperbound = 100; dimension = 30; . . . end end %F1 function R = F1(x) R =...
Вы не можете начинать темы Вы не можете отвечать на сообщения Вы не можете редактировать свои сообщения Вы не можете удалять свои сообщения Вы не можете добавлять вложения