This post is originally from https://skien.cc/blog/2014/01/31/adding-unique-contraints-after-the-fact-in-sqlalchemy/. But the URL is throwing a 404 and I could access the page only from the Google cache. I am copying it here in case it goes missing in the future. Update: https://twitter.com/taubeneck/status/1100591684096806913
Being a freelancer is an interesting role. You come across a variety of projects. I recently worked on a project involving replacing images in a PDF which taught me a couple of things. While there are a number of tools to deal with PDF in Python, the general purpose tools can only do so much…… Continue reading Replacing image in a PDF with Python
As a freelancer one of the things that comes with getting a project/job is handling technical interviews. I have so far managed to convince the client with a work sample, test project …etc., This is literally the first time I sat for a full technical interview. And it did teach a few lessons. Let me…… Continue reading Python Technical Interview – An Experience
Yesterday, I was working on the ward level parks map of Chennai I had to join a CSV data layer with the boundary polygon layer, but there was one issue while my CSV file has the ward numbers as integers (1,2,3..etc), the polygon layer had them as strings (Ward 1, Ward 2, Ward 3 …etc.,)…… Continue reading QGIS – Creating new column from existing using Python
Sorting is simplified in Python with sorted(). You can even sort with complex rules.
In situations where you have a list of objects and have to retrieve then in random order, dictionaries can act as lookup tables. This tip is not very obvious, hence this explanation: This method employs a iterator looping through the list of users every time we have to find a user, which means we have…… Continue reading Python Tip #8 – reducing looping by using dicts
Sometimes we have to deal with external objects and their attributes. getattr() can save you at those times.