(28th August 2016)
|
Traditionally computers were named and not easily replaced in the event it broke down. Server software was listening on a hard-coded port, and to link pieces together these machine names and service ports were hard-coded into other software's configuration files. Now in the era of cloud computing and service oriented architecture this is no longer an adequate solution, thus elastic scaling and service discovery are becoming the norm. One easy solution is to combine the powers of Docker, Consul and Registrator.
|
|
(17th August 2016)
|
This is nothing that spectacular (as if anything on my blog is), but I still wanted to describe the outline of the project of porting the hyphenation algorithm from PHP to Clojure. The implementation is only about 80 lines of code + comments + 20 lines of unit tests. For comparison the original PHP abomination is about is about 160 LoCs, although it is a bit bloated by implementing the patterns search via a trie data structure instead of using the strpos function.
|
|
(7th August 2016)
|
After finishing a paid project, ideally a formal looking invoice would be sent to the client. I know there are many commercial products available, but I couldn't find a good open source alternative especially with the standard Finnish formatting. I was happy to find jheusala/finnish-invoice-template from GitHub which had all of the tricky LaTeX stuff done.
|
|
(7th May 2016)
|
An interesting question was posted to crypto.stackexchange.com: "Is there a simple hash function that one can compute without a computer?" Here are three proposed algorithms based on Zobrist hashing, RC4 and A5/1. These should be reasonably secure even against attacks with a calculator, except the one based on Zobrist hashing (but I don't know how to prove or dis-prove this claim). These constructs are especially well suited for commitment schemes.
|
|
(19th April 2016)
|
There are many games with a strong emphasis on gravity, and at times even multi-body trajectory simulations. However they all seem to be based on spherical geometry (as planets are shaped by gravity), but other shapes should create interesting trajectories. As torus has rotational symmetry its gravity field can be modelled on a 2D cross-section. In this project torus' field is estimated in 3D, projected to 2D and interpolation functions are fitted. The space- and time-efficient model could be used in a game to do physics simulation in real time.
|
|
(16th April 2016)
|
Often I find myself having a SSH connection to a remote server, and I'd like to retrieve some files to my own machine. Common methods for this include Windows/Samba share, SSHFS and upload to cloud (which isn't trivial to do via plain cURL). Here an easy-to-use alternative is described: a single line command to load and run a docker image which contains a pre-configured Nginx instance. Then files can be accessed via plain HTTP at the user-assigned port (assuming firewall isn't blocking it).
|
|
(23rd December 2015)
|
Traditionally data scientists installed software packages directly to their machines, wrote code, trained models, saved results to local files and applied models to new data in batch processing style. New data-driven products require rapid development of new models, scalable training and easy integration to other aspects of the business. Here I am proposing one (perhaps already well-known) cloud-ready architecture to meet these requirements.
|
|
(2nd November 2015)
|
This is an alternative answer to the question I encountered at Stack Overflow about fuzzy searching of hashes on Elasticsearch. My original answer used locality-sensitive hashing. Superior speed and simple implementation were gained by using nVidia's CUDA via Thrust library.
|
|
(21st October 2015)
|
I encountered an interesting question at Stack Overflow about fuzzy searching of hashes on Elasticsearch and decided to give it a go. It has native support for fuzzy text searches but due to performance reasons it only supports an edit distance up-to 2. In this context the maximum allowed distance was eight so an alternative solution was needed. A solution was found from locality-sensitive hashing.
|
|
(25th April 2015)
|
Nowadays encryption is standard practice on web when data is in transition, and there are even a few services which offer client-side encryption and thus are truly end-to-end. Nevertheless for some reason they all require you to create and account by providing your email and password, although this is not strictly necessary for storing and sharing data. In this system the document id, encryption key and HMAC key are generated ad-hoc on the client and only minimal necessary information is revealed to the server. A live demo should be available at noknowledgenotes.nikonyrh.org.
|
|
(10th April 2015)
|
Out of interest on nature observation, computer vision, image processing and so forth I developed an automated system to capture one photo / minute and store it on a disk. The project also has Bash and PHP scripts coordinating external tools such as montage for image stitching and mencoder for video generation. PHP also provides an HTTP API for image generation and file size statistics.
|
|
(12th October 2014)
|
I wanted to find or create a formula which would accept an epoch timestamp, latitude and longitude and it would produce the Sun's observed azimuth and altitude in radians. It needs to take into account details earth's axial tilt and its position on its orbit around the sun. To my surprise I wasn't able to find such formula, so I had to develop it from scratch. Luckily earth's orbit (and orbits in general) is a well studied and documented problem, so I could take some shortcuts.
|
|
(10th September 2014)
|
Nowadays there are many HTML5-based map services, but typically they don't offer any export functionality. To create a full view of the desired region, one can either zoom out (and lose map details) or take many screenshots of different locations and manually stitch them together. This project can automatically load all stored screenshots, detect the map, crop relevant regions, determine images relative offsets and generate the high-res output with zero configuration from any map service.
|
|
(1st September 2014)
|
Even in desktop applications it is becoming more and more common to provide a HTTP based APIs or full user interfaces. For example BitTorrent's μTorrent and BitTorrent Sync don't have any built-in UI, and instead users just head with their preferred internet browser to http://localhost:8080 or http://localhost:8888. However they typically lack HTTPS encryption and each port needs to be configured to the NAT router individually. This solution uses a Nginx instance on a virtual machine to provide a HTTPS reverse proxy to all these services in a single port under different sub-domains.
|
|
(9th August 2014)
|
This project's goal was to automatically and robustly estimate and compensate distortion from any receipt photos. The user is able to just snap the photo and OCR could accurately identify bought products and their prices. However this task is somewhat challenging because typically receipts tend to get crumbled and bent. Thus they won't lie nicely flat on a surface for easy analysis. This set of algorithms solves that problem and produces distortion-free thresholded images for the next OCR step.
|
|