Friday, 24 April 2020

GitHub - GitFlow , Feature and Development Branches , Push , Pull Request ( Coding Partners Intro )

This is specially written for the Coding Partners , our GitHub Repo - https://github.com/digital-cognition-co-in/DigitalCognition

You are requested to create a Branch so that you can complete your task and push the code . Steps to follow -

1/ Create a Local Clone - In an empty directory initialize a Git Repo.

$git init
Initialized empty Git repository in /media/dhankar/Dhankar_1/a2_20/kMeans/.git/
$git clone - https://github.com/digital-cognition-co-in/DigitalCognition.git
Cloning into 'DigitalCognition'...
Username for 'https://github.com': RohitDhankar
Password for 'https://RohitDhankar@github.com':
remote: Enumerating objects: 5887, done.
remote: Counting objects: 100% (5887/5887), done.
remote: Compressing objects: 100% (4012/4012), done.
remote: Total 5887 (delta 1580), reused 5867 (delta 1566), pack-reused 0
Receiving objects: 100% (5887/5887), 19.59 MiB | 5.94 MiB/s, done.
Resolving deltas: 100% (1580/1580), done.
Checking connectivity... done.


If required - $ cd DigitalCognition/

2/ Check the GIT STATUS - it should show that you are on BRANCH == MASTER
$ git status 
On branch master
Initial commit


3/ Check the Remote Branches  - this will show you all the BRANCHES created by others in your team . 

$ git branch -a
* develop
  master
  remotes/origin/Akshat
  remotes/origin/HEAD -> origin/master
  remotes/origin/Rohan
  remotes/origin/avirup
  remotes/origin/develop
  remotes/origin/master
 

4/ When you are 100% sure that you are on the BRANCH == DEVELOP , and can see the ASTERIX *develop  , you now need to create your own DEVELOPMENT BRANCH , which will track changes from the REMOTE Branch DEVELOP .Name your Branch as ---  

dev_yourFirstName_yourLastName

$ git checkout -b dev_rohit_dhankar
$ git branch -a
* dev_rohit_dhankar
  develop
  master
  remotes/origin/Akshat
  remotes/origin/HEAD -> origin/master
  remotes/origin/Rohan
  remotes/origin/avirup
  remotes/origin/dev_rohit
  remotes/origin/develop
  remotes/origin/master


5/ Once your  - dev_yourFirstName_yourLastName , Branch is created , you work on the task you are working on , once the task is complete , you can push the code to your branch on remote as seen below . 

$ git add .
$ git commit -m"App:dc_dash:utility_eda_only-Browser_storage__Client-side_storage"
[dev_rohit_dhankar 02cb376] App:dc_dash:utility_eda_only-Browser_storage__Client-side_storage
 1 file changed, 9 insertions(+), 5 deletions(-)


 6/ After pushing your code - create a New PULL REQUEST , this is as seen in the screencapture below .
 




After creating the NEW PULL REQUEST , compare changes with your -  dev_yourFirstName_yourLastName , Branch and the DEVELOP branch ,



 
 













$ git checkout -b develop

 Switched to a new branch 'develop'

$ git status
On branch develop
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
 

$ git add .
$ git commit -m"init_churn_app"
[develop 3a1452b] init_churn_app
 29 files changed, 18 insertions(+)
 create mode 100644 churn_app/__init__.py
 create mode 100644 churn_app/admin.py
 create mode 100644 churn_app/apps.py
 create mode 100644 churn_app/migrations/__init__.py
 create mode 100644 churn_app/models.py
 create mode 100644 churn_app/tests.py
 create mode 100644 churn_app/views.py
 rewrite dc_dash_proj/__pycache__/settings.cpython-35.pyc (83%)
 rewrite dc_dash_proj/__pycache__/urls.cpython-35.pyc (85%)


$ git push -u origin develop
Counting objects: 36, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (35/35), done.
Writing objects: 100% (36/36), 71.88 KiB | 0 bytes/s, done.
Total 36 (delta 10), reused 0 (delta 0)
remote: Resolving deltas: 100% (10/10), completed with 8 local objects.
remote:
remote: Create a pull request for 'develop' on GitHub by visiting:
remote:      https://github.com/digital-cognition-co-in/DigitalCognition/pull/new/develop
remote:
To https://github.com/digital-cognition-co-in/DigitalCognition.git
 * [new branch]      develop -> develop
Branch develop set up to track remote branch develop from origin.






Various Source --  https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow
https://gist.github.com/blackfalcon/8428401#make-sure-you-are-on-master
https://git-scm.com/docs/git-pull
https://www.atlassian.com/git/tutorials/using-branches

Saturday, 11 April 2020

CLV - Customer Lifetime Value

We need to understand the linkage between - Churn Analysis and CLV - Customer Lifetime Value . Churn analysis will help us find - which are the Customers who are most likely to leave our organization , its derived from Survival Analysis .CLV - Customer Lifetime Value will help us find which are the most valued Customers that we have . When we know who are our most valued Customers - we can easily focus on them and work out strategies to prevent their CHURN ( Exit from the Customer base )In this project - for now simply called Churn Analysis - we are focusing on creating an application SaaS offering , where we ingress data from a Client Company / Org , and predict the High Churn risk or High Flight risk customers.This platform needs to be designed such that we can cater to many organizations and provide them Churn Analytics for their Customers to begin with and maybe later also predict Churn for their internal stakeholders - their employees .

Further reading -  

1/ Churn Analysis -- https://josepcurtodiaz.gitbooks.io/customer-analytics-with-r/content/chapter9.html

https://www.r-bloggers.com/churn-analysis-part-1-model-selection/

https://towardsdatascience.com/predict-customer-churn-with-r-9e62357d47b4 

https://lukesingham.com/how-to-make-a-churn-model-in-r/ 

http://rstudio-pubs-static.s3.amazonaws.com/425842_7f6b2293079f4a5d8fc7d62aeac2a545.html 

https://www.dataoptimal.com/churn-prediction-with-r/ 

https://www.kaggle.com/ajayohri/churn-using-various-algorithms-in-r-rattle 

https://rpubs.com/newajay/simpletextmining 

RStats - CRAN - Churn analysis --- 

https://cran.r-project.org/web/packages/BTYD/vignettes/BTYD-walkthrough.pdf 

https://jtsulliv.github.io/churn-eda/ 

https://cran.r-project.org/web/packages/BTYDplus/vignettes/BTYDplus-HowTo.pdf 

https://cran.r-project.org/web/packages/correlationfunnel/vignettes/introducing_correlation_funnel.html 

https://cran.r-project.org/web/packages/C50/C50.pdf 

https://cran.r-project.org/web/packages/SMCRM/SMCRM.pdf 

https://cran.r-project.org/web/packages/EMP/EMP.pdf

http://rstudio-pubs-static.s3.amazonaws.com/443094_bc2c15d74e7e4b7b96d8fc95f3162b08.html 
 


2/  Survival Analysis
https://towardsdatascience.com/survival-analysis-part-a-70213df21c2e 
 

3/ CLV - Customer Lifetime Value
https://www.coursera.org/lecture/foundations-marketing-analytics/computing-customer-lifetime-value-in-r-recital-3-CFVVr 

https://stats.stackexchange.com/questions/20463/rfm-customer-lifetime-value-modeling-in-r

https://josepcurtodiaz.gitbooks.io/customer-analytics-with-r/content/chapter3.html 


https://rpubs.com/hoakevinquach/Customer-Lifetime-Value-CLV

Estimating individual Customer Lifetime Values with R: The CLVTools Package -- https://www.youtube.com/watch?v=KJCYjjWNgLM 

Customer Lifetime Value (CLV) on R --- https://www.youtube.com/watch?v=8YEgdi4QxkY

https://medium.com/ordergroove-engineering/every-customer-counts-52aa70e4f85

https://www.r-bloggers.com/calculating-customer-lifetime-value-with-recency-frequency-and-monetary-rfm/

Sunday, 29 March 2020

Regular Expressions with Python - Beginners Level Learning Resources

List of Beginners Level Learning Resources - for Regular Expressions , mostly for the Python programming language .

Source = https://docs.python.org/3/howto/regex.html

Introduction to Regex with Python

Regular expressions (called REs, or regexes, or regex patterns) are essentially a tiny, highly specialized programming language embedded inside Python and made available through the re module. Using this little language, you specify the rules for the set of possible strings that you want to match; this set might contain English sentences, or e-mail addresses, or TeX commands, or anything you like. You can then ask questions such as “Does this string match the pattern?”, or “Is there a match for the pattern anywhere in this string?”. You can also use REs to modify a string or to split it apart in various ways.

Other learning resources -

Regex Checking online Site     https://regex101.com/
All Langs Regex excellent demo with within IDE regex matches     https://www.youtube.com/watch?v=sa-TUpSx1JA
Good practical advise for use cases     https://www.python-course.eu/python3_re.php
Good practical advise for use cases     https://www.python-course.eu/python3_re_advanced.php
Another Regex Resource    https://help.uis.cam.ac.uk/service/support/training/downloads/course-files/programming-student-files/python-courses/pythontopics/pythontopics-files/regexp.pdf
Another Regex Resource    http://www-personal.umich.edu/~csev/books/py4inf/media/Py4Inf-11-Regex.pdf
Another Regex Resource    http://www.cs.stir.ac.uk/courses/CSC9Y4/lectures/RegularExpressionsPython.pdf
Another Regex Resource    https://homes.cs.washington.edu/~ruzzo/courses/gs559/09wi/lectures/11b-regexp.pdf
Another Regex Resource    https://www.princeton.edu/~mlovett/reference/Regular-Expressions.pdf
Another Regex Resource    http://zetcode.com/python/regularexpressions/
Another Regex Resource    https://medium.com/factory-mind/regex-tutorial-a-simple-cheatsheet-by-examples-649dc1c3f285
Good practical advise for use cases     https://www.machinelearningplus.com/python/python-regex-tutorial-examples/
Another Regex Resource    https://www.guru99.com/python-regular-expressions-complete-tutorial.html
Another Regex Resource    https://www.youtube.com/watch?v=rcM26jV7Mdo
DataCamp Regex Resource    https://www.datacamp.com/community/tutorials/python-regular-expression-tutorial#comments






Python Bokeh - Best Learning Resources for Beginners

A list of Python Bokeh - Best Learning Resources for Beginners

LATEST Tutorials - as of date March 2020 ---
https://github.com/bokeh/bokeh-notebooks/tree/master/tutorial

Older Tutorials - Some code from them may not work as Bokeh keeps changing very fast ---
https://towardsdatascience.com/data-visualization-with-bokeh-in-python-part-iii-a-complete-dashboard-dc6a86aa6e23
https://towardsdatascience.com/data-visualization-with-bokeh-in-python-part-one-getting-started-a11655a467d4
https://programminghistorian.org/en/lessons/visualizing-with-bokeh
https://realpython.com/python-data-visualization-bokeh/
https://www.kaggle.com/kanncaa1/visualization-bokeh-tutorial-part-1
https://www.youtube.com/watch?v=Mz1AXUE0nR4
https://www.youtube.com/watch?v=fZ0mwqaQ6EE
https://www.youtube.com/watch?v=9FlUFLmaWvY
https://www.youtube.com/watch?v=2TR_6VaVSOs
https://www.journaldev.com/19527/bokeh-python-data-visualization
https://towardsdatascience.com/@jeffhale
BOKEH USED ---- https://github.com/swainn
BOKEH USED ---- https://github.com/bokeh/bokeh/pull/9010
BOKEH USED ---- https://github.com/mryap/forecasting    
BOKEH USED ----  https://github.com/mryap/Programming-for-Big-Data-Assignment   

Saturday, 15 February 2020

Gazing at a Crystall ball or Predictive Business Analytics ?



There is certain news published about a business house / tech startup / retail business , and the social media ( LinkedIn) , news papers and business mags are flooded with business analysts and crystal ball gazers making predictions ...

  • Its a BUBBLE ...
  • Let the COMPETITION catch up...
  • Cant be SUSTAINED...
  • Its FAKE NEWS ...etc etc 
There is very little technical analysis based on past variables / parameters , to be found in the public domain. 

certain individuals with backgrounds of a Chartered Accountant / Business Analyst - may try to spend a few hours - read the Balance Sheets , the Assets statements and make some kind of vague predictions about the future .

My Question --- Why doesnt anyone make a Bold and Authoritative statement saying - YES a Quarter from now this very Org will perform like this ( if a publicly traded org. ) then the STOCK PRICE would be within this range ( thin range ) 

My Answer --- ( Trying to answer my own question ) 
  1. Highly knowledgeable and niche-skilled resources required. 
  2. Such resources - when they shall predict the ( thin range ) point value , predictions , will not publish them publicly for everyone's benefit.
  3. A proper and definitive - SWOT analysis -  Not possible - Not enough information available publicly.
  4. Waayyy too many Variables .
  5. Data Shift - the variables that impact the Org's success / success of the market / domain , the org. operates in - itself may change.
  6. Competition strengthens  its own weak points after reading / buying analysts reports about - target org , thus freely published analysis never available.

Business Idea --- Why not use ML and Rule Based coding and automate / semi-automate this prediction process ? 

My Lament ---  Why dont i do this inplace of publishing lame blog posts ? Well Firstly - Forgotten most of the Corporate Finance i had studied back in 2009 - 2010 . Also havent had time to revise all the Statistics and Business Analytics i studied back in 2013 . Also not enough funding ? All the core Finance people i know of are busy hedging their own personal risk :)

Noob / Non Financial Background readers can read further here ---- 

https://www.investopedia.com/investing/why-do-companies-care-about-their-stock-prices/


Linkedin post which again sparked this thought today ... almost Six month back i did start off with pyFinTrader to peruse in this direction will need to get back my focus there soon ...


 


Friday, 3 January 2020

Unity3D 2019 - Vuforia - AR CAMERA - TRACKING MODE = POSITIONAL

Game Object >> Vuforia Engine >> AR Camera >> Inspector >> [Open Vuforia Engine configuration]


Click on - [Open Vuforia Engine configuration]
Then scroll down to DEVICE TRACKER


As mentioned within the Link below -
https://library.vuforia.com/content/vuforia-library/en/articles/Solution/Configuring-Rotational-Tracking-in-Unity.html

The TRACKING MODE = POSITIONAL , is the DEFAULT option here .

So we need not go looking around for the Positional DropDown or option to choose , its supposedly Positional and Not Rotational which was a Toggle Option available in earlier versions of Unity editor .


Thursday, 2 January 2020

Unity 3D - 2019 - Large Directories within Project Folder - Version Control issues !!


Large DIR's see in the Project Folder - all DIR's under Library
1/ ShaderCache = 300MB
2/ PlayerDataCache = 242MB
3/ metadata = 309MB
4/ PackageCache = 10MB as of now - may increase ??

As seen within one of the Files at path - C:\Win_UnityProjs\unity3d_car_terrain\sueblackman_book_2_3d_car\Library\metadata\78

FileName = 780611a67e8e941a2b3aa96e5915a793.info

It refers to a Asset Prefab within the Standard Assets at path =     path: Assets/Standard Assets/Environment/Water/Water/Prefabs/WaterProDaytime.prefab

mainRepresentation:
    serializedVersion: 3
    name: WaterProDaytime
    thumbnail:
      m_Format: 0
      m_Width: 0
      m_Height: 0
      m_RowBytes: 0
      image data: 0
      _typelessdata: 
    guid: 780611a67e8e941a2b3aa96e5915a793
    path: Assets/Standard Assets/Environment/Water/Water/Prefabs/WaterProDaytime.prefab
    localIdentifier: 100000
    thumbnailClassID: 1
    flags: 1
    scriptClassName: 
  

I doubt i have used this asset in the current project - my mistake seems to be having imported and retained all assets from within the standard assets . 

Requires cleaning the standard assets and retaining only the ones being actually used !!