#Python
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 →
#Python
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 →
#Python
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 →
#AWS
#Python
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 →
#Python
The challenge
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 →
#Python
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 →
#Python
The challenge
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 →
#Python
The challenge
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 →
#Python
The challenge
Implement the function unique_in_order which takes as argument a sequence and returns a list of items without any elements with the same …
Read Article →
#Linux
On Linux, you can change the hostname by using the hostnamectl command.
How to Set the Hostname on Linux
sudo hostnamectl set-hostname …
Read Article →
#Kubernetes
Once you have a Docker container, it is really simple to deploy containers to Kubernetes.
Generate a Deployment YAML
kubectl provides a fantastic way …
Read Article →
#Python
The challenge
Given a string, replace every letter with its position in the alphabet.
If anything in the text isn’t a letter, ignore it and …
Read Article →