Calculate the Sum of Pairs in Python
The challenge
Given a list of integers and a single sum value, return the first two values (parse from the left please) in order of appearance that …
Read Article →In-depth guides, insights, and best practices for modern software engineering
Given a list of integers and a single sum value, return the first two values (parse from the left please) in order of appearance that …
Read Article →If you have a large list and want to create smaller lists of it, with a maximum amount of elements, then:
commands = [str(i) for i in range(100)] …
Read Article →
If you want to print out a list of all dates between 2 dates (a date range), then you can use the following script:
from datetime import date, …
Read Article →
If you want to append a Python dictionary to a Pandas DataFrame, you can do this:
# Create a new DataFrame
output = pd.DataFrame()
# Append the …
Read Article →
You can store secrets in AWS Secret Manager and reference their ARN in AWS Systems Secret Manager.
The below snippet allows you to specify the …
Read Article →Implement a function that adds two numbers together and returns their sum in binary. The conversion can be done before or after the …
Read Article →You have successfully written your pandas Dataframe to an Excel file, but when you open it, all the columns are squashed up against each other.
There …
Read Article →You will be given an array of numbers. You have to sort the odd numbers in ascending order while leaving the even numbers at their …
Read Article →Create a function that returns the sum of the two lowest positive numbers given an array of minimum 4 positive integers. No floats or …
Read Article →Implement the function unique_in_order which takes as argument a sequence and returns a list of items without any elements with the same …
On Linux, you can change the hostname by using the hostnamectl command.
sudo hostnamectl set-hostname …
Read Article →
Once you have a Docker container, it is really simple to deploy containers to Kubernetes.
kubectl provides a fantastic way …