Skip to main content

Oxidation

I have mained Python since 2006, and it has helped me hold down two jobs, and earn a Software Engineering MSc. But that training showed me I need to add another tool to my toolbox. A statically-typed compiled language with no garbage collection. I chose Rust. In the summer of 2019 after finishing my first year, I skimmed the Rust Book. The Ownership concept was new to me, but overall I liked the feel of the language, Cargo, and that there seemed to be no gotchas.

Get An Email If Any Django Management Command Fails

After a bit of Googling, I found this post which details several methods of getting this done. I only needed an email sent to admins if any management command fails; below is the code I came up with. Edit manage.py to look something like this (I’ve only included code needed for this functionality): # ... import sys import traceback from django.core.mail import mail_admins def main(): # ... try: execute_from_command_line(sys.argv) except Exception: mail_admins( subject=f"Command <{' '.

When Do I Need Bespoke Software?

When you hit the limit of your current Jenga setup of off-the-shelf software. For example, a setup consisting of Google Workspace(GW), Quickbooks Online(QBO), Slack and a Payments Processor (PP) would work well. But: What happens when you need to search the hundreds of spreadsheets on Google drive and filter by criteria that involves joining data on 10 different spreadsheets? What if there’s a mistake copying transactions from the PP to QBO, or a transaction is forgotten all together?

Using My Phone ...

… instead of being used by it. Image Source: commons.wikimedia.org I came across the video below by Tim Ferriss on YouTube, one of those recommended ones, tiled “How to Use Your Phone… So That It Doesn’t Use You” At the 3:56th minte he says “I want to be in command of my time and I don’t want every one else’s agenda to become my to-do list.” This resonates with Cal Newport’s book Deep Work that I read sveral years ago.

List of Fast Python Libraries

A list of Python “batteries” whose core is written in a systems programming language for speed. Package Short Description from the Author URL Numpy “The fundamental package for scientific computing with Python … NumPy offers comprehensive mathematical functions, random number generators, linear algebra routines, Fourier transforms, and more.” https://numpy.org/ Scipy “Fundamental algorithms for scientific computing in Python” https://scipy.org/ ⭐ Pandas “Pandas is a fast, powerful, flexible and easy to use open source data analysis and manipulation tool, built on top of the Python programming language.

Python List of Unique Items

Problem You’ve tried to add an object into a set and a TypeError: unhashable type: exception was raised. You were probably using a set becase you needed a collection of objects without duplicates. If that was the case, two ways of solving this come to mind Solution Implement the __hash__ method for the parent class of that object as per the guidelines in the Python documentation. Extend the inbuilt data-type list and override it’s append() method: