Quantcast
Channel: Active questions tagged python - Stack Overflow
Browsing all 13891 articles
Browse latest View live
↧

Make a 3D scatter plot using python

I want to use Python to draw a 3D plot with the following data. I have a lot of data that I want to visualize in a 3D plot. However, when I use Matplotlib to create the plot with circular markers...

View Article


I cannot click an Xpath element - Selenium ( v. 4.2 or higher) - Python

I am trying to draw data from a government website related to air quality and other statistical data. I am trying to automate the data retrieval process. However, following the entry into the data...

View Article


Populate NaN cells in dataframe table based on reference table based on...

I have two tables. The first reference table is below:| Name | Target | Bonus ||------|--------:|------:|| Joe | 40 | 46 || Phil | 38 | 42 || Dean | 65 | 70 |The Python code to generate the table is:#...

View Article

How to run a python script in a docker container in vscode when you click on...

I've been trying to configure vscode so that when I click on that arrow shaped "run" button on the top right, vscode will then build a docker container if the image doesn't exist, and then run a python...

View Article

Image may be NSFW.
Clik here to view.

Turtle graphics, draw a filled star?

I want to draw a filled-in star, such as: I have this code so far:def draw_star(size,color): count = 0 angle = 144 while count <= 5: turtle.forward(size) turtle.right(angle) count += 1...

View Article


how to open chrome in incognito mode from Python

This works, in powershell:Start-Process chrome.exe -ArgumentList @( '-incognito', 'www.foo.com' )How can this be achieved from Python?

View Article

ImportError: cannot import name '_get_cpp_backtrace' from 'torch._C', when...

I'm using the docker container on the image named nvcr.io/nvidia/pytorch:22.09-py3.In the container, I've made a venv and installed torch.Since my NVIDIA driver version is 11.8, I've use pip3 install...

View Article

Find chains of identical elements in ndarray and modify them

I have ndarrays like [1,1,1,1,3,3,3].I want that, if there are consecutive elements with the same value like the case of the example, the content of the identical chain is modified in this way: we...

View Article


I'm trying to solve, Advent of Code Day 17 Part 2. I get the correct answer...

I'm a bit annoyed as to why my answer is wrong because, it passes the outputs for the test cases they have provided. Here is the link to the problem https://adventofcode.com/2023/day/17Can anyone try...

View Article


Starting or resuming async method/coroutine without awaiting it in Python

In JavaScript (and other languages) an async function is immediately executed upon its invocation until the first await is encountered.This is not the case in Python. From the asyncio...

View Article

PYQt for beginner

Am trying to show the QMainwindow after QDialog.it shows the dialog when it is time to show the QMainWindow program dose not excute.help?"""#import QtData_Tree as DT import sysimport sqlite3from PyQt5...

View Article

In flask wtf forms MultipleCheckboxField, how to set different attributes to...

How to set html attributes to each of the checkbox choices (key and value) (different for each choice)?My code:class MultipleCheckboxField(SelectMultipleField): widget = ListWidget(prefix_label=False)...

View Article

How can I keep logged a Django WebApp after login another WebApp using the...

`First application: C#no access to codeSecond application: Python (Django)`def oidc_login(request, internal=False):if internal == "True":request.session["next_url"] = "/servicos"else:sufixo_url =...

View Article


Github self-hosted runner complains of python version -

I am trying to set a GitHub self-hosted runner for my project and I keep getting the following error:Run actions/setup-python@v3Version 3.9 was not found in the local cacheError: Version 3.9 with arch...

View Article

How to convert xml to json where xml and json namings don't match

I have an use case where user types some message along with xml something like below and this needs to be converted to json with some generated message.Ex : User gives an xml along with some text input...

View Article


Connect Python code to SQL Server database

I am playing around with Python in VS Code and I can't seem to connect my code to my SQL Server database. Any suggestions? Below is the code and the error message I get when I run the code.Code...

View Article

Is it possible to convert a .exe file to .py?

I created an executable file (.exe file) of a python script.I lost the folder with the original python script (also no backups), due to disk formatting.By chance I got its executable file on the...

View Article


Getting missing Forward function, when the forward function is present within...

Receiving this error`---------------------------------------------------------------------------NotImplementedError Traceback (most recent call last)Cell In[80], line 21 # Make predictions with...

View Article

How to perform a conditional sort in Polars

I'm performing a binary classification and I want to manually review cases where the model either made an incorrect guess or it was correct but with low confidence. I want the most confident incorrect...

View Article

How can i improve my python web scrape code? [closed]

How can i improve my python web scrape to be more elegant? It took me a while to think of how to get the information i wanted to output but i don't think it is efficient. I'd like to see how this could...

View Article
Browsing all 13891 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>