Category "python"

Remove null from a json data (python)

When I use the Rest API to download data from Firebase, it looks like this. { "Dataset1": [ null, { "Key1": 1, "Key2": 2 }, {

When trying to position elements in tkinter all elements are moved

I'm using tkinter to create a very simple GUI just to start learning how to use the module. However I'm trying to position two elements (a button and a text box

What's the most efficient and/or easy way of exporting and using a TensorFlow model

Ive created a time series forecasting model (RNN) which is heavily based off this tutorial, If I wanted to export this model and use it with, say, a kivy UI in

Twilio Flask app video call is not connecting over a public IP address

I created an application in Flask Python with a frontend in HTML and Twilio SDK JavaScript version 2.3.0. A video call is working on local host, but if I try th

use pyautogui in a certain open program in windows

I would like to use image search in a certain open application, for example, I want it to search the image only in the windows "Calculator" application, how cou

how to set up ORM models based on dataclasses

I have a bunch of dataclasses and want to use them as ORM Models for my database. To reach my goal i made decorator @sa_orm which maps each decorated dataclass

Searching a value within range between columns in pandas (not date columns and no sql)

thanks in advance for help. I have two dataframes as given below. I need to create column category in sold frame based on information in size frame. It should c

Truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()

I want to filter my dataframe with an or condition to keep rows with a particular column's values that are outside the range [-0.25, 0.25]. I tried: df = df[(df

Error! Unable to find binary python3.8 for runtime python3.8 on Vercel

When i was deploying django app on vercel i got this error Error! Unable to find binary python3.8 for runtime python3.8 Error! Check your logs at https://kompu

Trying to write a custom loss function in tensorflow

I am trying to make a custom loss function where I perform an inverse fast Fourier transform to a set of data and then do the following calculations. When I run

Camunda /External Task/ Connecting Python with BPM

I would like to create a simple Python Script and use it to perform a service task in my BPMN process. Does anyone know how I can use a Python script in a servi

Talos, syntax to select best_model

I'm running a toy model for learning, on Ubuntu 21.10, in a conda environment that comprises python 3.74, keras 2.4.3 and talos 1.0, among many other packages.

Searching an exact phrase with Facebook's Ad Library API

I'm attempting to do a keyword-based search of political ads via Facebook's Ad Library API and am struggling with how to format my search_term entry in a way th

Matlab System Command Script stops

I am starting a python-script out of Matlab using the system()-command. I would to check in a while loop if the script is still running and do something else wh

Zybooks 13.3.1 Challenge Activity

I am struggling on completing this zybook challenge activity and I don't know what else Complete the if-else statement to print 'LOL means laughing out loud' if

How to launch headless chrome in OS X

I am trying to launch Chrome in Headless mode for some automation with Selenium and Python. I've tried all the arguments but Chrome will not launch in headless

How to solve TSP problem using pyGAD package?

Using PyGAD Package, how to generate the item of populations with element not duplicate between 1 and 12? It is always has duplicate value in random population.

Sort multiIndex table based on other table

I have a multiIndex data frame like this probe_names PLAGL1 GRB10 MEST H19 KCNQ1OT1 MEG3 MEG8 SNRPN \ Patient_1 0 0.55 0.53 0.53

Compare two excel files for the difference using pandas with multiple tabs

I found this nice script online which does a great job comparing the differences between 2 excel sheets but there's an issue - it doesn't work if the excel file

Getting Django migration error "sequence must have same owner as table it is linked to", but all tables and sequences have the same owner

I'm trying to run a migration in a Django project. (Django 3.1, Python 3.9.9) I'm in my virtual environment. I keep getting a puzzling error. python manage.py