Monday 25 November 2019

Image Processing

import numpy as np
import cv2

# multiple cascades: https://github.com/Itseez/opencv/tree/master/data/haarcascades

#https://github.com/Itseez/opencv/blob/master/data/haarcascades/haarcascade_frontalface_default.xml
face_cascade = cv2.CascadeClassifier('D:\\opencv\\OpenCV Final Softwares\\opencv\\sources\\data\\haarcascades\\haarcascade_frontalface_default.xml')
#https://github.com/Itseez/opencv/blob/master/data/haarcascades/haarcascade_eye.xml
eye_cascade = cv2.CascadeClassifier('D:\\opencv\\OpenCV Final Softwares\\opencv\\sources\\data\\haarcascades\\haarcascade_eye.xml')

cap = cv2.VideoCapture(0)

while 1:
    ret, img = cap.read()
    gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
    faces = face_cascade.detectMultiScale(gray, 1.3, 5)
    for (x,y,w,h) in faces:
      cv2.rectangle(img,(x,y),(x+w,y+h),(255,0,0),2)
      roi_gray = gray[y:y+h, x:x+w]
      roi_color = img[y:y+h, x:x+w]
      eyes = eye_cascade.detectMultiScale(roi_gray)
      for(ex,ey,ew,eh) in eyes:
            cv2.rectangle(roi_color,(ex,ey),(ex+ew,ey+eh),(0,255,0),2)

    cv2.imshow('img',img)
    k = cv2.waitKey(30) & 0xff
    if k == 27:
        break

cap.release()
cv2.destroyAllWindows()

Wednesday 20 November 2019

DevOps Day1 - Experiments

Build Python apps



https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/python?view=azure-devops


Use CI/CD to deploy a Python web app to Azure App Service on Linux



https://docs.microsoft.com/en-us/azure/devops/pipelines/ecosystems/python-webapp?view=azure-devops

_______________________________________________

trigger:
master

pool:
  vmImage'ubuntu-latest'
strategy:
  matrix:
    Python27:
      python.version'2.7'

steps:
taskUsePythonVersion@0
  inputs:
    versionSpec'$(python.version)'
  displayName'Use Python $(python.version)'
scriptpython "a1.py"

taskPythonScript@0
  inputs:
    scriptSource'inline'
    script: |
      print('Hello world 1')
      print('Hello world 2')

Monday 18 November 2019

DT-EA

install.package("party")

library(party)

View(readingSkills)

input =  readingSkills[c(1:105),]

output = ctree(nativeSpeaker ~ age + shoeSize + score, data = input)

plot(output)

Sunday 10 November 2019

Project

Part One: Text Mining and Exploratory Analysis
Part Two: Sentiment Analysis and Topic Modeling with NLP
Part Three: Predictive Analytics using Machine Learning
___________________________________________________________________
Part 1

https://www.datacamp.com/community/tutorials/R-nlp-machine-learning

Part 2

https://www.datacamp.com/community/tutorials/sentiment-analysis-R

https://www.datacamp.com/community/tutorials/ML-NLP-lyric-analysis

Part 3

https://www.datacamp.com/community/tutorials/predictive-analytics-machine-learning




_______________________________________________________________


https://github.com/thanujhaa/R-Python-Machine-Learning-Projects