Cast an array of items using lambdas in Python.

python

Let’s cast an array of items using lambdas in Python. It’ll look cleaner than its forloop counterpart. They’re a great way to clean up super verbose code and helpful when doing array manipulation. Before we begin, if you don’t know what a Python lambda is please check out this article we recently wrote. My most … Read moreCast an array of items using lambdas in Python.

Run Apache Airflow Locally in Docker

We’ll walk you through how to run Apache Airflow locally in Docker. The first chunk of this post will cover how to get Airflow standing, the second will go into some nuance and will answer several whys. My Setup Getting Airflow Standing Docker Airflow Looking for more detailed info? Check out Airflow’s official docs. Happy … Read moreRun Apache Airflow Locally in Docker

Execute Bash Commands and Return Results in Python

bash

I’ve had numerous cases where I’ve needed to execute bash commands and return the results in Python for some additional manipulation. My most recent example involved me working with BigQuery schemas. Getting schemas from the CLI was easy peasy but I’m not the best at BASH programming so I naturally turned to something more familiar … Read moreExecute Bash Commands and Return Results in Python

Upload a Pandas DataFrame to DynamoDB using Python

python

So you’re trying to upload a Pandas DataFrame to DynamoDB using Python? Let’s take a step back first. Why are we using DynamoDB? What is DynamoDB? What is DyanmoDB DyanmoDB is a non-relational fully managed database product offered by Amazon’s cloud computing arm AWS. So why would you go the DynamoDB route vs MySQL, Postgres, … Read moreUpload a Pandas DataFrame to DynamoDB using Python

Finding the First Instance of an Element in an Array

python

Need help finding the first instance of an element in an array? I recently came across a situation where I had two arrays with corresponding data in each array. For example, I had two arrays where one was a person’s first name and the other was a person’s last name. I needed to find a … Read moreFinding the First Instance of an Element in an Array

Resize Images Programmatically Using Python

python

Happen to have a ton of giant marketing materials that you need to get down to size for your website? Are you about to release an app and need to resize images down to Google/Apple’s prescribed dimensions? I mean you could always open the images individually in GIMP (my preferred image editor), go into tools, … Read moreResize Images Programmatically Using Python

OpenPyXL – Writing To an Excel Workbook Using Python

python

Prep First let’s make sure you have the OpenPyXL library installed. If you’re already in Python and don’t want to needlessly exit the interpreter, then type the following: This command should list out all the methods of OpenPyXL if it is in fact installed on your machine. Else, we’ll have to turn to pip. Assuming … Read moreOpenPyXL – Writing To an Excel Workbook Using Python