How to extract suffixes from filenames with Python Defining a guess_extensions(filename) utility function that extracts extensions from a filename Recently I was dealing with filenames of the following form: 3a1d3614.2020-09-27.json.gz. That is, the filenames consisted of four parts: an alphanumeric ID, a date, and two extensions separated by dots. Python offers at least two built-in […]
Category: Posts
Note: What follows is a linguistic essay I wrote during my time as a student pursuing a master’s degree in computational linguistics. I stumbled over it a few days ago while going through some old data. Given the general scarcity of information about the topic of iconicity, I’ve decided to publish it here. Despite its […]
Recently, I took on the task of internationalizing a Django app. The app included the following two simple models for tagging user Profiles with a set of pre-defined Tags: “Wait a minute…”, I thought to myself while scrolling through the models.py module for the first time. “How am I supposed to add a translation for […]
The following steps will leave you with an AWS setup for serving your app’s files via xyz123.cloudfront.net URLs: Create an S3 bucket (e.g. my-app-bucket-staging) and leave all settings at their defaults Open the newly created bucket and navigate to Permissions → CORS configuration Create an XML CORSConfiguration that defines from which domain the contents of […]
A reverse proxy acts as an intermediary between a client and one or more servers. Requests sent by the client are received by the proxy and passed on to one of the servers in the background. There are many scenarios in which such a setup might be useful. For example, reverse proxies can be used […]