Skip to main content

All Questions

Tagged with
4 votes
0 answers
96 views

Determine when a file is no longer being changed by hashing

I have a requirement to essentially scan a filesystem on any kind of filesystem and move a resource whenever it is ready. To do this I have the following code ...
Patrick Christie's user avatar
4 votes
0 answers
117 views

Injectable EventLogger for custom application events that are handled differently from normal logs

I am trying to become better at designing classes for dependency injection and IOC in general. It is often not an intuitive concept. I have the following python interface and implementation for a ...
Patrick Christie's user avatar
1 vote
0 answers
84 views

Hashing service for files or directories on a generic filesystem [closed]

my program requires a hash to be generated for files and folders for data integrity between transfers and file system events (if hash is different, file is not ready). For data integrity, I wish to ...
Patrick Christie's user avatar
4 votes
1 answer
1k views

Interface class for SQLite databases

I am learning the basics about managing an SQLite database by using Python and, mainly for practice purposes, I have then defined an interface class in order to let operations on database as clear as ...
rudicangiotti's user avatar
5 votes
1 answer
43 views

CandidateArchive for model-assisted multi-fidelity global search algorithm

For my research I'm working on global search methods where a candidate solution can have it's fitness (=score) evaluated in multiple fidelities (=accuracy levels). The goal of the ...
Energya's user avatar
  • 190
7 votes
1 answer
1k views

Catching missing attribute errors sooner in Python using strict interface specifications

I use Python daily for long-running simulations (yes, very very optimal, I know). As you could probably guess, my coworkers and I have issues with simulations running for several minutes before ...
ktbarrett's user avatar
  • 232
5 votes
0 answers
712 views

Implement OO interfaces in Python

Edit: Whoops! I just remembered there's already an long-lived package for this, zope.interface. I'd like a review all the same. This is a proof-of-concept ...
shadowtalker's user avatar
3 votes
0 answers
73 views

Extensible Python Interfaces

Some background before the actual code: My team needs to develop an optimization library for a specific problem. In order to optimize (pun intended) the projects life-cycle I am trying to write some ...
pilu's user avatar
  • 131
2 votes
1 answer
67 views

Python object modelling with ABCs

I'm modelling the core entities in a callcenter-related system that deals with Operators and groups ("pools") of them. While I've written some Python before, this is my first time building a larger ...
deceze's user avatar
  • 320
6 votes
1 answer
832 views

Python model for a "snake"-like game

I wrote a python model for the game "snake" that I'm not really satisfied with. My intention was to separate the game logic from the drawing and input handling (which worked quite well) but I've got ...
tfeldmann's user avatar
  • 163