Skip to content Skip to sidebar Skip to footer
Showing posts with the label Language Agnostic

Finding K-nearest Neighbors For A Given Vector?

Given that I have the following in my knowledge-database: 1 0 6 20 0 0 6 20 1 0 3 6 0 0 … Read more Finding K-nearest Neighbors For A Given Vector?

Where In Class Hierarchy Should Instance Methods Be Written?

Here's a part of a class 'hierarchy' that I use for a simulation model (my code is in P… Read more Where In Class Hierarchy Should Instance Methods Be Written?

Clean And Type-safe State Machine Implementation In A Statically Typed Language?

I implemented a simple state machine in Python: import time def a(): print 'a()' r… Read more Clean And Type-safe State Machine Implementation In A Statically Typed Language?

Good Graph Traversal Algorithm

Abstract problem : I have a graph of about 250,000 nodes and the average connectivity is around 10.… Read more Good Graph Traversal Algorithm

Python Threads - Critical Section

What is the 'critical section' of a thread (in Python)? A thread enters the critical secti… Read more Python Threads - Critical Section