Monday, February 8, 2021

Code collaboration on GitHub without CLI

Code collaboration on GitHub without CLI        

    GitHub is widely used tool for collaborative development & version control. It is an easier way to manage versions and share code with peers. However, it is not that easy to implement from CLI, specially for beginners. 

    Posting projects & creating portfolio part is easy. Collaborating with other developers on GitHub, takes a little learning. As it is not possible to run our code on GitHub, we need to download that code (notebook or .py file) on local computer in order to run it.  

How to collaborate coding on GitHub without using CLI?

    There are some simple steps to upload base code to GitHub & download code from GitHub to local computer via GitHub Desktop. You can work on that downloaded code, run it - test it & upload back to GitHub.

1. Installation & account Setup

👉 First step is to Create a GitHub account (if don't have one), need to download GitHub desktop & set up GitHub desktop per instructions.

2. Create or upload code file in shared directory on GitHub

👉 You can skip next 5 steps if you have a shared directory and a python notebook (.ipynb) in it, already on GitHub to practice on.

👉 Create a directory (like Collab_practice) on GitHub in which shared project is going to be placed.

👉 Add team members who can contribute to the code on GitHub.

👉 Start a python notebook (or preferred programming language & IDE) on your computer.

👉 Add a line of code, run it and save it (First_collab).

👉 Upload notebook (First_collab) from local computer to GitHub, via upload file option on GitHub. 

👉 Open that file & review the code in that notebook (First_collab), on GitHub.

3. Download shared file, update & upload back

👉 Click on shared directory, branch it to keep a copy of master code intact & work on the branch. 

👉 Click on 'Code', select 'Open file with GitHub desktop', provide destination folder for directory to be downloaded.

👉 In GitHub Desktop interface, click 'show in explorer' to see where your files are downloaded from GitHub.

👉 Open that local file downloaded from GitHub, in IDE on local computer.

👉 Add second line of code - modify the way you want, run it, save it and close it, same way as we would do with other local notebooks.

👉 Add two new notebooks (second_collab & third_collab) in downloaded parent directory (collab_practice).

👉 Add code lines to both notebooks, run them, save and close.

👉 Go back to GitHub Desktop interface, see files changed.  It will list one notebook is changed & two notebooks are added. It will also show, what is changed in first notebook, where you can add comment on.

👉 Uncheck checkpoints automatically saved by IDE.

👉 Push to main directory on GitHub, with note of changes done, in this commit.

👉 Open GitHub directory and review the changes, it should have first_collab updated and two new notebooks added into it.

    Now, those changes are ready for peer review and eventually branch will be pushed to the master.

Congratulations, code collaboration is done!

Sunday, February 7, 2021

Use of data & machine learning techniques in every day business decisions


    In this high-tech era, we are increasing our data generation by leaps and bounds. Even a small business generates enough data, to analyze and use findings in important business decisions. 

    Be it a small shop or large manufacturing unit, a home based start-up or well established corporate; every business has trends. Every business has some ups and downs based on some factors. 

    There are lot of factors affecting business based on type of business, some of  the most common are:

  • Time of year/month
  • Season
  • Inclement weather
  • Pandemics
  • Political events
  • Social events
  • Innovations
  • Changes & updates in competitors

    Every business has data, however question is how to use it ? Even though it seems very straight forward, it is not. Without proper planning, domain knowledge & data science skills;  data will not help much.

    We can use data to answer range of questions, varies per type of business and status of the business. 

  • Predict sales for next quarter or month (Time series with ARIMA)
  • Predict change in sales due to a current event
  • Find replacement options to balance partial business lost
  • Quality control analysis
  • Plan workforce 
  • Evaluate operation's bottlenecks
  • A/B testing
  • Pre-product launch analysis
  • Market status - stock predictions
  • Survey or feedback analysis
  • Product & program performance analysis
  • Cost-benefit analysis
  • Supply chain analysis or inventory control
  • Logistic analysis


Success of any analytic project depends on:

    👉 Analytic view
    Just like we need to do cost-benefit analysis before we start any project, we should have clear picture of how and what we want from an analytic project. Analytical vision is the foundation of success as it helps us to see KPIs and its usability. 

👉 Domain knowledge 
    We should have basic understanding of the business we are planning project for. It helps us to consider available resources and possible data sources.

👉 Usable Data
    Raw data is not ready for analysis. We should have some data engineering skills to scrap data, retrieve data from data lakes & data warehouses or even to create one. 
    Data cleaning and feature engineering takes almost 60-80% of the time in any data science project. So, if we have dataset in the format we want to use, half of the job is done!

👉 Data science tools & skills 
    This is equally important, still I kept it last. We do not need them until we have analytic vision, domain knowledge and usable data. 

    If we don't have first three, there might be no data science project at all! In other words, we use data science skills and tools once we have meaningful project and usable data.

    Or we can pick up a tool or two while working on project. Once we know what we want, there are lots of resources available online.  

    Just like once we have an address - the destination, there are lots of ways to reach there. We can use GPS, use maps & ask people, public transportation or simply take a cab.