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

GitHub Actions Workflow Checks Out to Subdirectory Instead of Workspace...

I'm using GitHub Actions to run tests on my Python project. I'm trying to checkout my repository directly into the runner's workspace directory (/home/runner/work/my_repo) instead of a subdirectory...

View Article


Polars: create an integer column from another one by computing the difference...

I have a polars dataframe like this one:shape: (10, 2)┌────────┬───────┐│ foo ┆ bar ││ --- ┆ --- ││ i64 ┆ i64 │╞════════╪═══════╡│ 86 ┆ 11592 ││ 109 ┆ 2765 ││ 109 ┆ 4228 ││ 153 ┆ 4214 ││ 153 ┆ 7217 ││...

View Article


Keyboard shortcut suggestions in VScode

I used to code on Pycharm and the IDE has this feature where lets say you use your cursor for something that has a keyboard shortcut, it pops up a little window on the bottom with something like...

View Article

what is the most effective way to learn any programing language? [closed]

I've been around the tech space for a while but i now want to go deep into software development. My objective is to be able to apply my knowledge of software dev to building IoT products.I've checked...

View Article

ChatDev création

when i install a Chat Dev i have the érror :File "D:\programme\envs\ChatDev_conda_env\lib\os.py", line 679, in getitemraise KeyError(key) from NoneKeyError: 'OPENAI_API_KEY'i have searche but i don't...

View Article


Pls help me solve a task using numpy

I have to solve this system of equations of three unknowns.10x+5y+0.5z = 100x+y+z = 100In course said that you can use for loop, but, in my opinion, it's a difficult way. I think, i can use numpy, but...

View Article

Print End-Of-Line character in Flask, Python

I'm using render_template_string() method of Flask to generate HTML code, but I can't generate the end of line character. I tried the "\n" character, but it doesn't work. That is, in the generated page...

View Article

AttributeError when using multiprocessing inside a class that is based on an...

I'm trying to define a plot class MyPlot, based on the abstract class GenericPlot, that creates 3 Matplotlib figures in parallel using pathos multiprocessing:from attr import definefrom abc import...

View Article


Cannot display a geoserver WMS image using folium

I am trying to produce a folium map, using the folium.raster_layers.WmsTileLayer class to stream images from a geoserver.The imagecoming from a collection of tiles depending on time and space, I need...

View Article


How to work with CORBA in Python and Java?

I'm doing a practice of Distributed Systems subject of my University. We have to do an application which shows the current hour using CORBA where the server is written one language and client written...

View Article

Transform Formulas Excel into Values Excel

im trying to generate an Excel only with values from another Excel that I create before with the same script. The main problem is that im trying to do it reading the excel with the library openpyxl...

View Article

What is the difference between null=True and blank=True in Django?

When we add a model field in Django we generally write:models.CharField(max_length=100, null=True, blank=True)The same is done with ForeignKey, DecimalField etc. What is the basic difference...

View Article

How can I plot a graph on python from multiple csv files?

This are the csv files I havebmi_per_country_female.csvbmi_per_country_male.csvcoffee- consumption-by-country-2024.csveye-color...

View Article


How to list vms by specific Azure resource group

I am able to list VMs all within a Azure subscription.But I am hoping to filter only listing VMs from a specific resource group.Here is my python script:from azure.mgmt.compute import...

View Article

Why is it that setting a value on a dataframe that is (I think) a copy...

I create a dataframe and (I think) I create a copy out of it. I think I create a copy out of it since ._is_view property is Falseimport pandas as pddf =...

View Article


Python Algorithm for dynamic feedback to adjust experimental parameters

How can I compare several spectra with different experimental parameters to a target spectrum and automatically adjust the experimental parameters to converge to the target in PythonI want to define a...

View Article

Pyspark to_timestamp date format parsing error

In my pyspark dataframe, there is a column CallDate with datatype as string containing the values shown...

View Article


Image may be NSFW.
Clik here to view.

Unable to validate XML with schema but works by reading the written file from it

I am currently using lxml and want to validate a XML content.I wrote it completely in Python from tei = etree.Element("TEI", nsmap={None: 'http://www.tei-c.org/ns/1.0'} with many subelements.At a...

View Article

unsupported operand type(s) for -: 'str' and 'str' for number game [duplicate]

I am a newbie at Python and i need help. I don't understand what to do no matter what this code won't work. I am trying to make a hotter colder number game.import mathimport randomanswer =...

View Article

Change specific RGB color pixels to another color, in image file

I would like to change a single color with Python. If a fast solution with PIL exists, I would prefer this solution.At the moment, I use convert -background black -opaque '#939393' MyImage.png MyImage.png

View Article
Browsing all 23101 articles
Browse latest View live


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