Display nested dictionary content sorted by key in Python

Given a nested dictionary like this: dog_breeds = { 'Labrador Retriever': {'life_span': 14, 'male_weight': '36 Kg', 'female_weight': '32 Kg'}, 'Beagle': {'life_span': 15, 'male_weight': '11 Kg', 'female_weight': '10 Kg'}, 'German Shepherd': {'life_span': 13, 'male_weight': '40 Kg', 'female_weight': '32 Kg'}, 'Jack Russell Terrier': {'life_span': 16, 'male_weight': '8 Kg', 'female_weight': '8 Kg'}, 'Rottweiler': {'life_span': 10, 'male_weight': '60 Kg', … Continue reading Display nested dictionary content sorted by key in Python

Networking for Developers – part 3: Network and Physical layers

NOTE: Catch up with the previous posts in this post series:Part 1: OverviewPart 2: Application and Transport layers In the Internet, the network layer uses the Internet Protocol and it's responsible to analyse the destination address in the packets and direct them to where they should go. The job to actually move the packets around … Continue reading Networking for Developers – part 3: Network and Physical layers

Networking for Developers – part 2: application and transport layers

NOTE: Catch up with the previous posts in this post series:Part 1: Overview The Network Stack has four layers: Application, Transport, Network (or Internet) and Physical. This post will cover the top two layers: Application and Transport and together they help the destination computer identify what type of data it's receiving through the network. The … Continue reading Networking for Developers – part 2: application and transport layers

Check which commands you typed in the command line and don’t repeat yourself!

Recently I needed to repeat a series of long~ish commands in the command line but I never quite memorized them so I ended up resourcing to arrow-up-arrow-up-arrow-up </ad nauseum> until I found the command I was looking for. But there is a better and super simple way: history Typing history in the command line will … Continue reading Check which commands you typed in the command line and don’t repeat yourself!

Docker for development: make local files visible to a container with volume mapping

I wrote a very simple right-to-the-point Docker introduction post if you're new to Docker. If you want to see your code changes applied right away to a running Docker container, you need to make sure to run the container using the share volumes tag: -v (or --volume). The -v tag expects as a parameter the … Continue reading Docker for development: make local files visible to a container with volume mapping