Skip to content

Instantly share code, notes, and snippets.

View topefolorunso's full-sized avatar
🎯
...

Tope Folorunso topefolorunso

🎯
...
  • 05:06 (UTC +01:00)
View GitHub Profile
@topefolorunso
topefolorunso / 1.srp.py
Created January 22, 2023 20:44
SOLID Principles explained in Python with examples.
"""
Single Responsibility Principle
“…You had one job” — Loki to Skurge in Thor: Ragnarok
A class should have only one job.
If a class has more than one responsibility, it becomes coupled.
A change to one responsibility results to modification of the other responsibility.
"""
class Animal:
def __init__(self, name: str):
#!/bin/bash
# set the AIRFLOW_VERSION variable
AIRFLOW_VERSION=2.5.0
# set the PYTHON_VERSION variable
# For example: 3.7
PYTHON_VERSION="$(python --version | cut -d " " -f 2 | cut -d "." -f 1-2)"
# set the CONSTRAINT_FILE_URL variable
from etl import *
file_path = "~/basic-etl-pipeline/data/economic-indicators.csv"
save_path = "~/basic-etl-pipeline/data/clean_economic-indicators.csv"
def run_pipeline(file_path:str, save_path:str):
# extract
def load(df: DataFrame, save_path: str):
'''
writes pandas Dataframe to csv file
args:
df (DataFrame): pandas dataframe containing the clean data
save_path (str): path to save the csv file
returns:
None
'''
def transform(df: DataFrame) -> DataFrame:
'''
cleans data
args:
df (DataFrame): pandas dataframe containing the raw data
returns:
df (DataFrame): pandas dataframe containing the clean data
'''
import pandas as pd
from pandas.core.frame import DataFrame
def extract(file_path: str) -> DataFrame:
'''
extracts csv data and converts to pandas Dataframe
args:
file_path (str): path to the csv file
returns:
@topefolorunso
topefolorunso / project-ideas01.md
Created July 27, 2022 21:05 — forked from MWins/project-ideas01.md
Back end Projects - list

Project Ideas

Ok. I'm going to list off some ideas for projects. You will have to determine if any particular idea is good enough to include in a portfolio. These aren't creative ideas. They likely already exist. Some are way too advanced while others are simplistic.

I will recommend to post any project you make to github and make a github project page for it. Explain in as much detail as possible how you made it, how it can be improved etc. Document it.

If you pick an advanced idea, setup a development roadmap and follow it. This will show some project management skills.

Another piece of advice for those who are design challenged. Use different front end frameworks and use different themes for those frameworks to provide appealing designs without looking like yet another bootstrap site.