Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
8 views

Using pymongo installed via virtualenv and Ansible returns an error

Since it's good practice to install pip modules in virtual environment, I have the following task in place: - name: Install python packages ansible.builtin.pip: name: - pymongo ...
matteo-g's user avatar
  • 329
0 votes
3 answers
30 views

How to call a number from a multi-dimensional complex list

I'm trying to make a sophisticated quiz that involves a list for a question and an answer that is included in a list. I want to call numbers from this multi-dimensional list using a "for" ...
Breadification's user avatar
0 votes
1 answer
26 views

Can't scrape all the data from a lazy-loading table using Selenium

I'm trying to scrape three fields (player, logo, dkprice) from a table located in the middle of a webpage. To see all the data in that table, it is necessary to scroll down to the bottom of it. I've ...
SMTH's user avatar
  • 187
0 votes
0 answers
39 views

Why data that are being written to excel are not starting from the 'A' column?

I'm using pandas to copy data from one excel to another and the data are being copied just not at the right place. I have this function that reads the data: def updated_file(self, progress_bar): ...
Jugert Mucoimaj's user avatar
0 votes
0 answers
20 views

The model(DecisionTreeClassifier) gives wrong results

I'm taking a machine learning course with an assignment to implement a fit method for DecisionTreeClassifier. Here's my code: import numpy as np import pandas as pd class MyTreeClf: def __init__(...
Kibar Jafarguliyev's user avatar
-1 votes
0 answers
15 views

How can I fix "Control must be added to the page first." Error in flet?

I am trying to make a janggi(chess variant) game using flet. As I have to use the board in multiple places, I made a class called janggiBoard which inherits from ft.Stack. I wanted to use drag and ...
limbaksa's user avatar
0 votes
0 answers
18 views

sqlalchemy - `validates` on a Relationship does not emit on assignment event

Consider the following using sqlalchemy: from sqlalchemy.orm import validates class DeviceTestResult: __tablename__ = "device_test" passed: bool = mapped_column(default=False, init=...
frimann's user avatar
-1 votes
5 answers
50 views

Focusing on an element of a subset, of a subset

Fairly new to coding and I have a question regarding list and subsets. Suppose this is my list: list = [[[a,2], [c,3], [e,3]], [[g,4], [i,4] [k,3]], [[b,3], [d,2], [f,2]]] How would I go about making ...
Junior Salvador's user avatar
0 votes
0 answers
43 views

Why does process.communicate cause my program to be killed?

I'm running some code for a program in python, and when I run c++ I need to handle standard input for my it, such as scanf and cin. I am running the compiled c++ program using subprocess.Popen. I ...
user23783268's user avatar
-1 votes
1 answer
40 views

Pip installs packages globally inside of virtual environment

I am at a loss so I apologise if this is a repeated question. I have currently set up a virtual environment via the command python3 -m venv .env and attempted to install a package that is local to ...
Bobstar89's user avatar
0 votes
1 answer
47 views

can't access json proprety

I'm trying to access the 'city' proprety of this json but somehow it doesn't work , this is the json struct : "{\"ForSaleShopperPlatformFullRenderQuery{\\\"zpid\\\":28657235,\\\&...
Saad Ouled Lafqui's user avatar
-7 votes
1 answer
52 views

WiggleSort: giving wrong output? [closed]

I am trying to solve LeetCode problem 324. Wiggle Sort II: Given an integer array nums, reorder it such that nums[0] < nums[1] > nums[2] < nums[3].... You may assume the input array always ...
ttait1's user avatar
  • 1
0 votes
0 answers
8 views

Generate Multi-Page PDF Reports in Python with Tables, Headers, Footers, and Adjustable Cell Data (using reportlab)

I want to Generate Multi-Page PDF Reports in Python with Tables, Headers, Footers, and Adjustable Cell Data (using reportlab) However, the fontsize is not changing for the content of the table for a ...
Jose's user avatar
  • 9
1 vote
7 answers
66 views

Iterate over list of strings to retrieve groups of strings

Given the following list: inp = ["arg1:", "list", "of", "args", "arg2:", "other", "list"] How can I develop a dictionary like ...
turbonerd's user avatar
  • 1,296
-1 votes
0 answers
13 views

Set a field in a protobuf message by name [duplicate]

Is there a way to set a field in a protobuf Message given the name of the field? I see HasField, ClearField, and GetFields in the Message documentation but I don't see anything like SetField. Can I ...
Jason C's user avatar
  • 39.9k

15 30 50 per page
1
2 3 4 5
13751