Examples of how you can write scripts taking input from users and/or standard input

Lounge area
Lounge area
Photo by Henar Langa on Unsplash.

Functions With User Input in Python

  • Height: 1.72m
  • Weight: 64kg
  • Measurement system: metric

Examples of Conditional Statements in Bash Scripting

Passing Variables to Scripts via Command Line

echo "Hello, I pass the first variable $1 and the second one $2"
bash myexample.sh var1 var2

A failed Machine Learning project is an “Unhappy Family” in its own way

All happy families are alike; each unhappy family is unhappy in its own way. Leo Tolstoy

  1. Data Ingestion and Preparation
  2. Model Training and Retraining
  3. Model Evaluation
  4. Deployment

Useful code snippets for daily tasks

Photo by Daria Volkova on Unsplash.


1. How to coalesce in pandas

import pandas as pd
import numpy as np



An example of how to run an Airflow DAG in Docker

Run the docker-compose

Start running Airflow in Docker in 5 minutes

A laptop displaying a code editor.
A laptop displaying a code editor.
Photo by Arnold Francisca on Unsplash

Create an Airflow Folder

mkdir airflow-docker cd airflow-docker

Download the docker-compose.yaml File

curl -LfO 'https://airflow.apache.org/docs/apache-airflow/2.0.1/docker-compose.yaml'

Input missing values in Pandas, replace categorical variables with mode, and more

photo of water droplets thrown up by something hitting the water
photo of water droplets thrown up by something hitting the water
Photo by Amadej Tauses on Unsplash


1. How to get data from Google Drive into Colab

Docker Tutorial for Beginners

How to search Docker images from Docker Hub using the terminal.

docker search python
docker pull hello-world:latest

How to predict the probability of runner to win a race with Monte-Carlo simulation

The Data

George Pipis

Data Scientist @ Persado | Co-founder of the Data Science blog: https://predictivehacks.com/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store