Category "python"

how can I pass the multiple .html file names in to a single txt output file that outputs all the href links in html along with their file names?

import pandas as pd import glob import csv import re from bs4 import BeautifulSoup links_with_text = [] textfile = open("a_file.txt", "w") for filename in glob

Update A screen in kivy

Hi i am writing a program for my uncles business where he can scan barcodes to keep inventory, im jsut trying to get the part where he can see what all is in hi

Update A screen in kivy

Hi i am writing a program for my uncles business where he can scan barcodes to keep inventory, im jsut trying to get the part where he can see what all is in hi

Is there an easy way to zero time with each new condition in a pandas dataframe?

I have a big-ass time series data frame where one condition changes at variable intervals. I would like to zero the time with each new condition, so I converted

update-alternatives: warning: force to reinstall /usr/local/bin/pip3.10 because pip linkgroup is invalid

I got following message when I try to do something with pip. Wybór Ścieżka Priorytet Status --------------------

Jump Game II Leetcode, why is my memoization failing?

Here is the problem: Jump Game II Given an array of non-negative integers nums, you are initially positioned at the first index of the array. Each element in t

PIL arc position on Oled Display

I am busy with something witch is not so familiar to me. Trying to design a small logo to be displayed on a Oled display sh1106, 128x64 I am using PIL and Luma

How to use Tkinter after method to give the impression of a wheel spinning?

I'm trying to create three separate 'wheels' that change the starting position of the first arc in order to give the impression of the wheel spinning. Tkinter w

How to tag and store files, by metadata, in Python?

I want to build a manual file tagging system like this. Given that a folder contains these files: data/ budget.xls world_building_budget.txt a.txt b.exe

How to correctly implement refresh token with Dropbox Python SDK?

I'm trying to use the Dropbox Python SDK but was continually running into an issue of the short lived access token expiring. I think I finally found a solution

how can I pass the multiple .html file names in to a single txt output file that outputs all the href links in html along with their file names?

import pandas as pd import glob import csv import re from bs4 import BeautifulSoup links_with_text = [] textfile = open("a_file.txt", "w") for filename in glob

Orthogonal distances between data and fitted curve in Python

I have a set of data points and a curve that is already fitted to the data. How can I calculate the orthogonal distances? I tried to use scipy.odr but I think i

2nd int-casting input-taking variables causes problem

I'm working in PyCharm. I haven't been programming for a few months and when I came back I saw a problem. There are 2 user-input-taking variables, input is conv

pandas datetime to unix timestamp seconds

From the official documentation of pandas.to_datetime we can say, unit : string, default ‘ns’ unit of the arg (D,s,ms,us,ns) denote the unit,

How do you call a variable that was returned at the end of a function?

I created this function and want to call the returned result but, I'm not sure how to get the variable back. If possible I'd also like a different message to po

how to edit a permutation

every number is a port. and the permutation gives me all possible routes but my starting port is always number 1,so out of all combinations i want the ones that

python rotating object disfunction

I have been working on my final project, where we are supposed to create a tank game in tkinter. I have done the movement, however i´ve been struggling wi

Send a fastAPI response without redirecting from HTML form post

I am creating an API using fastAPI, which receives a form from a HTML page, treats it (requiring a few moments) and returns a message saying this task is comple

Raspberry Pi as MQTT publisher and subscriber

I am trying to establish RPi as publisher and subscriber at the same time. I will do that in such way, that I will put subscriber.py and publisher.py as threads

How do I create an array from a grouping of row_number()?

I have code that uses row_number() partitioned by date. I would like to create an array that contains data grouped by the row_number that is partitioned by date