Explore

python × stackoverflow.com ×
  • screenshot

    Conditional filling of dropdown in Django backend with list_filters

    My models.py: from smart_selects.db_fields import ChainedForeignKey class Funder(models.Model): name = models.CharField(max_length=200) scheme = models.ManyToManyField('Scheme', blank=True) class...

  • screenshot

    Drag image to another image

    I write this code to move image to another place but when I moving the image...

  • screenshot

    move rows in df by the value of the cells with pandas

    I have the following input table and i want to obtain the output table. To do...

  • screenshot

    Create / update a new list based on comparing expected list vs actual list of unequal lengths

    I'm working on a project where I've to compare a list (Actual) against another list (Expected)....

  • screenshot

    Querying GBQ table to.dataframe() function took too long to respond

    I am loading the table from google bigquery in python, the code as follow def read_bq(project_id,...

  • screenshot

    Need help understanding how the xycoord axes system works in matplotlib

    I am always confused on how to annotate things in matplotlib and doing a deeper dive...

  • screenshot

    Replace keywords with links of tags generated by openai stored in the database

    Need some help with this thing I'm working on. Im using python and flask. I'm getting...

  • screenshot

    Generate random trajectory for aircraft in 3D world (Python)

    I have a 3D world in Python with terrain where I want to be able to...

  • screenshot

    How to define an Optional[Decimal] field in python sqlmodel library that yields to constrained JSON schema

    I have the following sqlmodel base class and table models but I can't manage to make...

  • screenshot

    Using OpenAI API for answering questions about csv file

    I'm starting with OpenAI API and experimenting with langchain. I have a .csv file with approximately...

  • screenshot

    Why won't this terminal in visual studio code continue past returning a single integer?

    As a personal project of mine, I'm working on making a (semi functional) video game completely...

  • screenshot

    Webscraping JavaScript Table with Selenium and Beautiful Soup

    I'm trying to scrape this website: https://www.globusmedical.com/patient-education-musculoskeletal-system-conditions/resources/find-a-surgeon/ It appears that the website uses JavaScript so that...

  • screenshot

    Are tuples "mutable" or "immutable" in Python?

    When writing the following in a python interactive session: >>> a = "Ahmad" >>> b =...

  • screenshot

    I can't install argon2 python

    I'm trying to install argon2 via pip install argon2 but it keeps giving an error, I've...

  • screenshot

    Interactive Scotter Plot Using IpyWidgets

    I'm trying to make an interactive scatter plot where the user selects a state and a...

  • screenshot

    Botocore generates incorrect S3 URLs, leading to a 403 Access Denied

    I'm using Boto3(v1.34) client to list objects from an S3 bucket, but I've encountered some odd...

  • screenshot

    Extract digits from string until non-digit character appears

    I'd like to extract all digits that occur in a string until a non-digit character appears....

  • screenshot

    How to avoid interpolation in button_press_event of plot?

    For horizontal axis of my plot I have int64 type numpy array. Then I've linked button...

  • screenshot

    Whats wrong with implementation of gmres method?

    import numpy as np def gmres(A, b, x0, tol=1e-6, max_iter=10): n = len(b) x = np.copy(x0)...

  • screenshot

    Testing speed of indexes for different amount of attributes in neo4j with the timeit python function

    I have been experimenting the last week with Neo4j and indexes. I have created fake data...

  • screenshot

    How to retrieve dictionary key when knowing value on one of its attributes?

    Recently I was working on my Netbox automation using Ansible. I prepared task, which collects information...

  • screenshot

    Using Python, Flask, Celery and Redis a task containing more than one group is incapable of calling a sub task with chains on it

    @celery.task(bind=True, ignore_result=False) def process_ml_model_dataset(self, dataset_serialized, media_serialized, ml_model_serialized, collection_name, n_factor): if n_factor == 1: result_group = group(process_ml_model_dataset_factor_x.s(dataset_serialized,...

  • screenshot

    Write a setup.cfg argument to install dependencies from other arguments

    I'm writing a setup.cfg file for a Python package that requires different sets of dependencies depending...

  • screenshot

    Just Works pairing in BlueZ using python

    I am currently trying to implement Just Works pairing between a Linux board and a microcontroller....