Tag: python

Constrained K-Means implementation in Python

The following is just a Python implementation of the algorithm described in the following paper: Bradley PS, Bennett KP, Demiriz A (2000) Constrained K-Means Clustering. Microsoft Research. Available: http://research.microsoft.com/pubs/69796/tr-2000-65.pdf To cut the long story short, this algorithm allows to execute K-Means with a user-defined minimum number of points belonging to […]

Spanning tables Markdown extension

Sorry for the long pause in coming goodies. I do lots of exciting stuff but unfortunately confidential for the moment. It will see the daylight soon though, I hope 🙂 In my free time – I’m developing a set of extensions to help formatting some of my markdown documents that […]

SEC2J – journalling for HDF5

I’ve been rather quiet lately but that’s only because I’m working on tons of interestng stuff : ) Here’s something cool for managing issues with corrupt HDF5 files (e.g. 1, 2). It’s still a work in progress and not fully tested but it’s basically an implementation of journalling for the […]

Introducing BackTick, a.k.a. StanScript ; ) a Clojure/Scala/Lisp/Python-inspired JavaScript superset

Why `backtick`? Because (almost) all of the syntax extensions were introduced using only one character. Yep, you got it – the backtick ; ) Supported features: – Python-like operator overloading (by defining __iadd__, __eq__, etc. methods in the object or prototype), e.g.: x.__iadd__ = function(y) { this.data += y; }; […]

Cross-platform super lightweight one file qsub replacement

Useful for people running their jobs on UNIX clusters, who for some reason need from time to time to launch them on Windows with business logic similar to original qsub command. It works like this: starts an HTTP server which is running 8 worker threads (adjust to the max number […]

matpy – call Python from MATLAB

Hello everyone! If you ever wanted to call Python from MATLAB, here goes something for you. Today I’d like to present matpy – a MATLAB extension for accessing Python. It is more or less an equivalent to pymat but the other way around. At the moment it’s for sure more […]

Becoming a Project Euler addict

Jeez, now I’ve solved Project Euler problems #297 and #299. I think I’m becoming an addict 😀 #299 required quite a lot of help from my friend (thank you 🙂 ) while #297 was particularly easy. I managed to code it correctly in about 15 minutes 🙂 Can you? ;D […]

Project Euler #298 – Solution

Omg, I finally solved this problem and gained access to Project Euler’s thread dedicated to its solutions. Apparently everybody came up with basically the same idea. The number of game states can be reduced to 438 (439 including the empty state). This way all 50 rounds can be simulated using […]