So the thing I’m trying to do is to have multiple cores process some stuff…. I have a py script which basically makes a feature vector for my ML and DL models. Now the thing I’m doing is that I take a txt file, I compare it with a list that I have initialized at runtime. So the code takes
Tag: multithreading
Constant camera grabbing with OpenCV & Python multiprocessing
I’m after constantly reading images from an OpenCV camera in Python and reading from the main program the latest image. This is needed because of problematic HW. After messing around with threads and getting a very low efficiency (duh!), I’d like to switch to multiprocessing. Here’s the threading version: And – Can someone please help me translate this to multiprocess
Gtk.Spinner in Python GTK while importing large library
I have a GTK application in C that will spawn a Python GTK process to embed a matplotlib figure into a window in the C process using GtkSocket/GtkPlug (uses XEmbed Protocol). The problem I am having is that the import of the matplotlib library takes about 2.5 seconds and during that time the socket widget is simply transparent. I would
Python Binance multiple kline time intervals
I’m writing a program that collects cryptocurrency price information and I want to perform technical analysis on two different kline time intervals. I’ve been struggling to achieve this as I’m new to programming and even newer to Python specifically. Below is the code I’m currently trying to get two different kline streams in at the same time. Unfortunately I’m getting
Variables in Sqlite execution when being passed into a function (Python3)
For a while I have been looking at how to read/write to a sqlite database from different threads, I found lots of answers and documents describing what needed to happen however I was nowhere near able to achieve what was needed so I decided to use an existing class I found made by someone else. Ashamed to admit but figuring
Can’t stop thread at all (unless I cause an exception)
So I am working on a GUI (PyQt5) and I am multi-threading to be able to do data acquisition and real-time plotting concurrently. Long story short, all works fine apart from stopping the thread that handles the data acquisition, which loops continuously and calls PySerial to read the com port. When a button on the GUI is pressed, I want
How to improve performance of querying data from Salesforce with Python?
Is there any solution we can retrieve Salesforce data from Python with more than 2000 records for each chunk? I have used REST API to retrieve data and check nextRecordsUrl for the next chunk. But if it is a million records, this solution will take time. I tried to find a Salesforce parameter to increase the number of records for
How to read a variable without lock in Python threads?
I am using Python threading to do some jobs at the same time. I leave the main thread to perform task_A, and create one thread to perform task_B at the same time. Below is the simplified version of the code I am working on: I know the above code doesn’t do something meaningful. Please think of it as a simplified
Multithreading on object methods in python
I am trying to implement multi threading with oops But the test1.printHi is expecting me to pass self After passing self it is not being multi threaded any more It Its first printing all hi and then hello at last next is getting printed but when I implement them like functions its working properly they are getting printed at once
improve the throughput of sending multiple file via socket
At First, I don’t have any errors or bugs, I ask this question to understand more. I want to send multiple files concurrently via a separate connection to a server from a client. I used threads to make the sending process concurrent on the client-side. It sounds that it does improve the throughput a little bit. But I’m still confused.