Skip to main content

All Questions

Tagged with
-1 votes
0 answers
26 views

How to map HS code products to Alibaba categories?

I'm trying to map a list of products (based on HS codes) to the closest Alibaba categories. I have two json files, one contains hierarchical product data based on HS codes Example: [ { "key&...
Astro's user avatar
  • 1
0 votes
0 answers
34 views

How to architect the external evnets and Django models?

I'm building a django backend app and I have a few different models in my app. One of these models is a Driver and I want to do the following when calling the create-driver endpoint: create the ...
Morez's user avatar
  • 2,239
0 votes
3 answers
70 views

How to store structured data in a python package?

I'm currently developing a python package which among other things generates maps for a very low resolution driving game. The maps are generated by combining predefined tiles. Those tiles have to be ...
Sappique's user avatar
0 votes
1 answer
47 views

What are the different ways of distributing a script to run on different company client machines?

Context I'm working on a bunch of python scripts that spin up a FastAPI server for my startup, as a requirement for our services. This server initialises a Supabase SDK client to do some very specific ...
Maoaii's user avatar
  • 29
0 votes
0 answers
60 views

How to parallelize long-running IO operations in a multi-threaded Python application with asyncio?

I am building a Python application that uses an event loop (via the asyncio library) to listen for tick data from a cryptocurrency exchange via a WebSocket. The tick data comes for various symbols, ...
elaspog's user avatar
  • 1,719
0 votes
0 answers
42 views

Best Practices for Commit/Rollback in Python’s Unit of Work Pattern for Layered Architecture

I have an image below illustrating a layered architecture from the book Architecture Patterns in Python. Layer architecture image When implementing this pattern in Python, as shown in the code below, ...
Nguyen Tri Duc's user avatar
2 votes
1 answer
54 views

Matlab object arrays' method call equivalent in Python

Matlab has object arrays, Python has lists or tuples. Calling a method of a class on an object array of objects of that class, is easy in Matlab: A = [Class1(1), Class1(2)]; B = A.toClass2(); see &...
Miels's user avatar
  • 21
0 votes
1 answer
71 views

Implementing a context-switching mechanism in asyncio

I wish to create something similar to a context switching mechanism, that allows using a shared resource one at a time. In my case it's a single session object connecting to a website, and each ...
Bharel's user avatar
  • 27.2k
1 vote
2 answers
61 views

Managing function versioning across multiple projects using a shared library

I'm facing a challenge with maintaining consistency across multiple projects that share a common library. Here's the scenario: I have a helpers library with a function anonymize_ip(ip). This function ...
Steven O's user avatar
0 votes
1 answer
38 views

The better way to read a formated data from .TXT file strings in Python

I have a following quest: There is an unmarked text file in the .TXT format of the following structure: City name is Paris It was build in 303 BD NORTH PART Size 56% of city QUATERS Quarter name ...
Ghalenus's user avatar
0 votes
1 answer
59 views

Software design for simultaneously running python programs

My question is not directly about the implementation in the code, but more about the basic design or technique I should use. Initial situation: I have a Python program that executes a simulation. This ...
Fred's user avatar
  • 41
0 votes
0 answers
30 views

Asynchronous communication between 2 QThreads

I'm working on optimizing a PyQt application (to control tensile testing machine) that's sometimes slow. The application uses two QThreads, both running in a loop with time.sleep inside. One QThread (...
Vittor's user avatar
  • 9
1 vote
2 answers
389 views

How to visualize CNN architecture using draw_convet?

I need to visualize the CNN model. The example is in the comments. I've tried to use draw_convet (https://github.com/gwding/draw_convnet) but it keeps throwing a list of errors. Could you please help? ...
james's user avatar
  • 177
0 votes
1 answer
47 views

How to model two abstractions that have polymorphic relation in OOP

So I have a problem how to model data in my project. I have it in python and doing it in OOP fashion. But I cannot figure out a right way to model this case: Let's say there is an abstract class ...
pkobielak's user avatar
0 votes
0 answers
26 views

How to decrease the time for timed out in Heroku?

Currently, I am running an app in Heroku. It uses several dynos at a time. But the problem is dynos getting stuck. It does not return anything and sits idle for 24 hours and kills itself. I was ...
Bad Coder's user avatar
  • 195

15 30 50 per page
1
2 3 4 5
28