Recommender System via a Simple Matrix Factorization
Photo by Michael Cartwright, CC BY-SA 2.0, cropped
We all like how apps like Spotify or Last.fm can recommend us a song that feels so much like our taste. Being able to recommend an item to a user is very important for keeping and expanding the user base.
In this article I’ll present an overview of building a recommendation system. The approach here is quite basic. It’s grounded though in a valid and battle-tested theory. I’ll show you how to put this theory into practice by coding it in Python with the help of MXNet.
Kinds of recommenders
The general setup of the content recommendation challenge is that we have users and items. The task is to recommend items to a particular user.
There are two distinct approaches to recommending content:
The first one bases its outputs on the the intricate features of the item and how they relate to the user itself. The latter one uses the information about the way other, similar users rank the items. More elaborate systems base their work on both. Such systems are called hybrid recommender systems.
This article is going to focus on collaborative filtering only.
A bit of theory: matrix …
python machine-learning
Currency exchange rates with exchangeratesapi.io

Several of our clients run ecommerce sites, built on custom software, that allow customers to pay in their choice of a few different currencies.
Some have set up separate merchant bank accounts for each currency and use separate payment gateway accounts to accept payments natively in each currency. But more commonly they use a payment gateway that allows them to accept payment in several currencies, but receive funds converted into their specified native currency in their merchant bank account.
In either case, it is common to store prices for products, shipping, etc. in one base currency (say, USD for companies based in the U.S.) and dynamically convert prices for customers. Non-native prices may need to be marked up to cover the cost of conversion into the native currency, depending on the terms of the agreement with the payment gateway or bank.
Because currency exchange rates change often, and because payment gateways generally do not offer a way to retrieve the exchange rates in advance, we need our own source for ongoing retrieval and storage of our exchange rates (also known as forex rates).
For a while we were very pleased with Fixer.io, which was a free service that …
saas ecommerce api
Vue, Font Awesome, and Facebook/Twitter Icons

Overview
Font Awesome and Vue are both great technologies. Here I detail overcoming some issues when trying to get the Facebook and Twitter icons working when using the vue-fontawesome
bindings in the hopes of saving others future debugging time.
Detail
Recently, I was working with the vue-fontawesome
tools, which have recently been updated to version 5 of Font Awesome. A quick installation recipe:
$ yarn add @fortawesome/fontawesome
$ yarn add @fortawesome/fontawesome-svg-core
$ yarn add @fortawesome/free-solid-svg-icons
$ yarn add @fortawesome/free-brands-svg-icons
$ yarn add @fortawesome/vue-fontawesome
A best practice when using Font Awesome is to import only the icons you need for your specific project instead of the thousand+, as this just contributes to project bloat. So in our main.js
file, we import them like so:
// Font Awesome-related initialization
import { library } from '@fortawesome/fontawesome-svg-core'
import { faEnvelope, faUser } from '@fortawesome/free-solid-svg-icons'
import { faFacebook, faTwitter } from '@fortawesome/free-brands-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
// Add the specific …
vue javascript
Training Tesseract 4 models from real images

Over the years, Tesseract has been one of the most popular open source optical character recognition (OCR) solutions. It provides ready-to-use models for recognizing text in many languages. Currently there are 124 models that are available to be downloaded and used.
Not too long ago, the project moved in the direction of using more modern machine-learning approaches and is now using artificial neural networks.
For some people, this move meant a lot of confusion when they wanted to train their own models. This blog post tries to explain the process of turning scans of images with textual ground-truth data into models that are ready to be used.
Tesseract pre-trained models
You can download the pre-created ones designed to be fast and consume less memory, as well as the ones requiring more in terms of resources but giving a better accuracy.
Pre-trained models have been created using the images with text artificially rendered using a huge corpus of text coming from the web. The text was rendered using different fonts. The project’s wiki states that:
For Latin-based languages, the existing model data provided has been trained on about 400000 textlines spanning about 4500 fonts. For …
ruby machine-learning
SRV DNS records in Terraform and Cloudflare
(Photo by David Goehring, CC BY 2.0, cropped)
At End Point we are using Terraform for a few clients to manage their web hosting infrastructure as code (IaC). Terraform is particularly helpful when working with multiple cloud or infrastructure providers and stitching together their services.
For example, for one web application that involves failover from the primary production infrastructure to a secondary location at a different provider, we are using Cloudflare as a CDN to provide caching, DDoS mitigation, and traffic routing in front of virtual servers at DigitalOcean and Amazon Web Services (AWS).
We decided we wanted to store all of their infrastructure configuration in Terraform, not just what is required for the web application, so we can recreate their entire infrastructure from their Git repository.
This all went fine until we got to their email DNS records. Our client is using Microsoft Office 365 for their email, which requires some SRV records. Terraform’s Cloudflare provider works fine with the universal MX records, but when we first wanted to do this, the Terraform provider for Cloudflare did not support SRV records at all.
Luckily for us, Terraform recently (6 April …
devops terraform cloud hosting
Ecommerce Shakeups: Magento Acquisition and Etsy Rate Increases

If you’ve been paying any attention to much in the ecommerce world, there have been a couple shakeups and transitions that could affect how you look at your ecommerce options these days.
Adobe to Acquire Magento
A few weeks ago, it was announced Adobe would acquire Magento in a large acquisition. We’ve seen Magento clients come and go. It used to be the case that the Magento Community version was free and open source, but lacking in features, and the Magento Enterprise version was not free and came with many more features but was closed source.
But, times change, and admittedly I haven’t looked into the current Magento offerings until writing this post. The two current options for Magento are Magento Commerce Starter and Magento Commerce Pro, more details here. These plans are not for small potatoes, starting at $2k/mo. I can see how the cost of this is worth it in lieu of paying a full time developer, but this is not a good fit for small businesses just getting started.
There at not many public details on the acquisition, other than bringing Magento to Adobe’s range of “physical and digital goods across a range of industries, including consumer packaged goods, retail, wholesale, …
ecommerce magento saas
systemd: a primer from the trenches
Gears image by Guy Sie, CC BY-SA 2.0, cropped & scaled
systemctl: Let’s get back to basics
‘‘Help me systemd, you are my only hope.’’
Sometimes going back to day zero brings clarity to what seems like hopeless or frustrating situation for users from the Unix SysV init world. Caveat: I previously worked at Red Hat for many years before joining the excellent team at End Point and I have been using systemd for as long. I quite honestly have forgotten most of the SysV init days. Although at End Point we work daily on Debian, Ubuntu, CentOS, and BSD variants.
Here is a short and sweet primer to get your fingers wet, before we dive into some of the heavier subjects with systemd.
Did you know that systemd has many utilities you can run?
- systemctl
- timedatectl
- journalctl
- loginctl
- systemd-notify
- systemd-analyze - analyze system
- systemd-cgls - show cgroup tree
- systemd-cgtop
- systemd-nspawn
And systemd consists of several daemons:
- systemd
- journald
- networkd
- logind
- timedated
- udevd
- system-boot
- tmpfiles
- session
That’s a long way from the old SysV init days. But in all essence it’s not that different. The one thing that stands out to me is we have more information …
hosting systemd
Instant TLS Upgrades Through Proxy Magic!

TLS shutdowns are real
The payment gateways have been warning for years about the impending and required TLS updates. Authorize.net and PayPal—to name a few—have stopped accepting transaction requests from servers using TLS 1.0. Despite the many warnings about this (and many delays in the final enforcement date), some projects are affected by this and payments are coming to a stop, customers cannot checkout, and e-commerce is at a standstill.
Ideally, getting to security compliance would include a larger migration to update your underlying operating system and your application. But a migration and software update can be an expensive project and in some cases, the business can’t wait weeks while this is done.
End Point has worked with several clients recently to try to remedy the situation by using a reverse proxy to fix this and we’ve had good success on getting payments flowing again.
What is a proxy?
A proxy is a mid-point, essentially a digital middleman, moving your data from one place to another. In two recent client instances, we ended up using nginx (the stack’s webserver) as the reverse proxy, basically running a separate server for just shuttling requests to/from the …
ecommerce nginx rails security sysadmin hosting tls