Quantcast
Browsing all 13951 articles
Browse latest View live

How to increase the speed of Python reading device data over BLE? [closed]

I am trying to improve the speed of Python reading device data over BLE My device contains 10 MLX90393 magnetometers and a nRF52832. The nRF52832 communicates with the magnetometers via SPI protocol....

View Article


Image may be NSFW.
Clik here to view.

How do I loop through a list in a data frame, select only one element from...

places_within_catchment has a list of place_ids.Based on the example below, from places_within_catchment, if place_id 3 has the highest sales, remove rows where place_id = 2.So, going immediately to...

View Article


Sigterm when downloading huggingface embedding model

When I try to download this embedding model I encounter a sigterm. This does not happen when running on my M1 Macbook Air but does when running on a huggingface space with upgraded CPU and persistent...

View Article

Is there a good "elastic search" in python for filtering a list of items?

I have written a gui tool for our warehouse which filters a list of recently 5000 products (each a class). Now I am basically searching if there is something faster / better to use.Here is a Example of...

View Article

RSA Implementation with OAEP occasionally produces an error with lhash and...

I attempted to implement a RSA algorithm in Python 3.12. I first implemented a textbook RSA algorithm, which was done successfully. (I verified this with many repeated attempts using various keys and...

View Article


Image may be NSFW.
Clik here to view.

Python Convert PDF to XLSX

Can anyone of you help me convert a PDF file that contains tables to XLSX?PDF originalInvalid URLfrom path_name_mappings import destination_filed_xlsxfrom path_name_mappings import...

View Article

How to get a list of all indices of repeated elements in a numpy array

I'm trying to get the index of all repeated elements in a numpy array, but the solution I found for the moment is REALLY inefficient for a large (>20000 elements) input array (it takes more or less...

View Article

SQLite3 read issue with multiple simultaneous access to db

I am having some trouble with data reads with my SQLite3 database.Context:I have built a python program that relies on two scripts running in parallel:Script1: Reads on an ongoing basis (on a...

View Article


Image may be NSFW.
Clik here to view.

networkx edges between subgraphs

I have a Graph (G) where nodes are split into two distinct subgraphs (H, I). The nodes within each subgraph are interconnected. What I'm looking for is a list of edges that are connections between the...

View Article


Can an rfid reader capture strikes from a foam sword with cards attached?

I am using the PN5180 RFID reader to capture cards that will be attached to a foam sword. The issue I am having is the reader is not quick enough to capture the uid consistently. This is the code that...

View Article

Python Selenium - How to pass UnexpectedAlertPresentException

Im trying to automate a web-game with python using selenium webdriver. There you have some missions and you have to send specific vehicles to a mission. You've a button where you can click on to choose...

View Article

why my inlfuxdb bucket just have 1or2 data in every fileds

here are some of my codes'''pythondef create_influxdb_point(measurement, tag, fields): current_timestamp = int(time.time()) point = Point(measurement).tag('tag', tag).time(current_timestamp,...

View Article

Edit specific line in a big file

I want to edit a a big file in specific lines.So it isnt a good Idea to read the whole file before editing, thats why I dontwant to use:myfile.readlines()I have to read each line check if there a...

View Article


Python PyQt5 How do i run a function on combobox selection? [duplicate]

I have a PyQt5 code and in my GUI i have a combobox with bunch of values.WHat i want to achieve is that when the user selects any value from the combobox it should trigger a function. Is it possible to...

View Article

Image may be NSFW.
Clik here to view.

Identifying minor swings with major swings - Price charts

I am developing a stock analysis program in PythonOne of the fundamental things I need to is to recognise swings from price feed (open, high, low, close data)Price data is fractal by nature - smaller...

View Article


Aiohttp and Asyncio give an error when writing a bot on aiogram

I'm writing a bot on Aiogram. I did everything according to the documentation, but I get an error. I'm seeing her for the first time. Please help me solve the problemdef on_startup(bot: Bot) ->...

View Article

Doctest: How can I identify differences between expected and actual output?

In the below doctest, the expected and actual output look identical. I'm pretty sure there is some white space error since when I enable NORMALIZE_WHITESPACE, the test is successful. Is there another...

View Article


Printing to stdout with encoding in Python 3

I have a Python 3 program that reads some strings from a Windows-1252 encoded file:with open(file, 'r', encoding="cp1252") as file_with_strings: # save some stringsWhich I later want to write to...

View Article

RuntimeError: can't create new thread at interpreter shutdown

This is a Forked repository from github and when I try to deploy it to heroku it shows the error:2023-12-31T03:10:27.965787+00:00 app[web.1]:2023-12-31T03:10:27.965828+00:00 app[web.1]: RuntimeError:...

View Article

How to disable a subset of Pylint checks for modules matching a string or regex?

EDIT: Yes, it's easy to disable pylint entirely for certain files. That's not my question.I know how to disable a check entirely:disable = ["missing-module-doctring", ...]But I'm trying to do the...

View Article
Browsing all 13951 articles
Browse latest View live