Category "python"

How Can i Arrange a list of integers in python in txt file? [duplicate]

How can I arrange a list of integers in python in txt file? Example = I am having: ['45 USD\n', '68 USD\n', '32 USD\n', '894 USD\n'] I want t

How to explain these multiprocessing execution results?

I met such a problem: it has some mutually independent big tasks, and each task has some following mutually independent small tasks that depend on the result of

How to deal with missing libraries on Linux? [No Admin privileges and PIP is blocked]

For my work I need to write a GUI using PySide6 for a remote system. The OS is RHEL 7.9 and I have neither admin privileges nor PIP working (blocked by admins),

Generating list of hexagonal coordinates

I am gonna try to frame this in an understandable way but please let me know if further clarification is necessary. I am trying to create a list of hexagonal co

Compare 2 csv files and remove the common lines from 1st file | python

I want to compare 2 csv files master.csv and exclude.csv and remove all the matching lines based on column1 and write the final output in mater.csv file. master

Apply a weighted decay that changes over time in Python

I have a dataframe in Python that looks like the one below: I want to calculate the dnf_rate_weighted so that there's a 0.95 decay for each stage going back th

How to randomize shapes and colors using turtle python?

Can someone please help me with drawing random shapes in random colors using turtle python?

How to run Django admin site on Android

This is what am facing with with Django on my Android I'm using Pydroid on my phone. Python and Django are fully functional. But when I try to run Django admin

source to source transformation

I would like to transform input.js to output.js using string manipulation in python here is input.js let k=document.createElement("div"); k.innerHTML='<style

How to create a Dataframe from multiple dictionaries

I have a little issue with my the data I have (multiple dictionaries) to process and create a Dataframe from them. This what the data look like: print(data) 0

Handling this website which is redirecting to the same url with BeautifulSoup

So I'm scrapping this website: https://www.hepsiburada.com/apple-macbook-pro-m1-cip-8gb-256gb-ssd-macos-13-qhd-tasinabilir-bilgisayar-uzay-grisi-myd82tu-a-p-HBV

Facetgrid Formatting and sorting each graph

Below is the code I've created to run the facetgrid graph. As you can see, merged1 is the first dataframe and merged2 is the second dataframe I am iterating on.

how to use keygen.sh API for python

really sorry I am a noob coder trying to make it so users need to have entered a license key that gets stored on the local computer & checks the policy from

PyQT5 and OpenCv2 loading images incorrectly when refreshing

In a nutshell, I currently am trying to load a picture and view it using pyqt5, via QtWidgets.QGraphicsScene. However, after loading the picture, I run some ope

How to find image with its source in python markdown2

I am trying to make a static site generator with Python. I coded most of it. But there is a problem. When I add an image to a Markdown file (like this: ![Python

Difference between excel's and python R2, Power fit

I'm trying to do a power fitting of the x and y arrays and estimate also the R2. I have already done it with excel and it gives me an R2 of 0.5389 while if I ru

Load item description from json file

Recently i saw a post about someone making a program that could control a computer it was launched on. (it was this one) Add commands to user input I was really

Panda dataframe replace() method for row numbers

I need to replace some values in a column with a specific value using the row numbers list of the required values as an array like following array.Can I use dat

Hi there, I am trying to find the max consecutive ones but python throws an error

I have tried to implement this code but python just blocks me by saying that ValueError: The truth value of an array with more than one element is ambiguous. Us

Create python function from script

Struggling to get this code to work as a function. It needs to separate values within a particular field which contains + symbols and create a new row which has