├── ConfigureFlask - Chef ├── Images │ ├── appserver.jpg │ ├── background.jpg │ ├── chefarch.jpg │ ├── chefdk.jpg │ ├── chefdk2.jpg │ ├── chefserver.jpg │ ├── cm.jpg │ ├── cm2.jpg │ ├── flask.jpg │ ├── lb1.jpg │ ├── loadbalancer.gif │ ├── ourlb.JPG │ ├── sentiment.jpg │ ├── stuck.jpg │ ├── summary.jpg │ ├── template.jpg │ ├── website.JPG │ └── withoutcm.jpg ├── README.md ├── app.py ├── chef-repo │ ├── .gitignore │ ├── =2.3 │ ├── README.md │ ├── cookbooks │ │ ├── chefignore │ │ └── feedback cookbook │ │ │ ├── Berksfile │ │ │ ├── README.md │ │ │ ├── chefignore │ │ │ ├── metadata.rb │ │ │ ├── recipes │ │ │ ├── application.rb │ │ │ └── default.rb │ │ │ ├── resources │ │ │ └── feedback.rb │ │ │ ├── spec │ │ │ ├── spec_helper.rb │ │ │ └── unit │ │ │ │ └── recipes │ │ │ │ ├── application_spec.rb │ │ │ │ └── default_spec.rb │ │ │ ├── templates │ │ │ └── myservice.service.erb │ │ │ └── test │ │ │ └── recipes │ │ │ ├── application.rb │ │ │ └── default_test.rb │ └── roles │ │ └── starter.rb ├── data.json ├── requirements.txt ├── static │ ├── Developers Cosmos.png │ ├── bg.jpeg │ └── tenor.gif └── templates │ └── index.html ├── Deploy-As-Service-Using-AWS-EC2 ├── Images │ └── Ec2Medium.png ├── Readme.md ├── app.py ├── model.pkl ├── requirements.txt ├── static │ ├── css │ │ ├── scss-files.txt │ │ └── style.css │ ├── img │ │ ├── home.jpg │ │ ├── intro-carousel │ │ │ ├── 1.jpg │ │ │ ├── 2.jpg │ │ │ ├── 3.jpg │ │ │ ├── 4.jpg │ │ │ └── 5.jpg │ │ ├── pop.jpg │ │ └── preloader.gif │ ├── js │ │ └── main.js │ └── lib │ │ ├── animate │ │ ├── animate.css │ │ └── animate.min.css │ │ ├── bootstrap │ │ ├── css │ │ │ ├── bootstrap.css │ │ │ └── bootstrap.min.css │ │ └── js │ │ │ ├── bootstrap.bundle.min.js │ │ │ └── bootstrap.min.js │ │ ├── easing │ │ ├── easing.js │ │ └── easing.min.js │ │ ├── font-awesome │ │ ├── css │ │ │ ├── font-awesome.css │ │ │ └── font-awesome.min.css │ │ └── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ │ ├── ionicons │ │ ├── css │ │ │ ├── ionicons.css │ │ │ └── ionicons.min.css │ │ └── fonts │ │ │ ├── ionicons.eot │ │ │ ├── ionicons.svg │ │ │ ├── ionicons.ttf │ │ │ └── ionicons.woff │ │ ├── jquery │ │ ├── jquery-migrate.min.js │ │ └── jquery.min.js │ │ ├── magnific-popup │ │ ├── magnific-popup.css │ │ ├── magnific-popup.js │ │ └── magnific-popup.min.js │ │ ├── owlcarousel │ │ ├── LICENSE │ │ ├── README.md │ │ ├── assets │ │ │ ├── ajax-loader.gif │ │ │ ├── owl.carousel.css │ │ │ ├── owl.carousel.min.css │ │ │ ├── owl.theme.default.css │ │ │ ├── owl.theme.default.min.css │ │ │ ├── owl.theme.green.css │ │ │ ├── owl.theme.green.min.css │ │ │ └── owl.video.play.png │ │ ├── owl.carousel.js │ │ └── owl.carousel.min.js │ │ ├── sticky │ │ └── sticky.js │ │ ├── superfish │ │ ├── hoverIntent.js │ │ ├── superfish.js │ │ └── superfish.min.js │ │ └── wow │ │ ├── wow.js │ │ └── wow.min.js └── templates │ └── index.html ├── Deploy-as-API-using-AWS ├── IRIS.ipynb ├── Images │ ├── apistructure.png │ ├── authorization.png │ ├── chooselamda.png │ ├── createapi.png │ ├── createresource.png │ ├── datasetstructure.png │ ├── endpoint.png │ ├── environmntvariable.png │ ├── finalapi.png │ ├── lamba.png │ ├── main.png │ ├── post.png │ ├── postmantest.png │ ├── resource.png │ ├── restapi.png │ └── stage.png ├── Readme.md ├── iris.csv └── lambda_function.py ├── DeployDockerimage - GitHub Actions ├── Dockerfile ├── README.md ├── app.py ├── model.pkl ├── requirements.txt ├── templates │ └── index.html └── test_app.py ├── DeployFlaskAzure ├── 50_Startups.csv ├── Dockerfile ├── Images │ ├── 1.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ └── index.png ├── Model.ipynb ├── Readme.md ├── app.py ├── model.pkl ├── requirements.txt ├── static │ ├── css │ │ ├── scss-files.txt │ │ └── style.css │ ├── img │ │ ├── home.jpg │ │ ├── intro-carousel │ │ │ ├── 1.jpg │ │ │ ├── 2.jpg │ │ │ ├── 3.jpg │ │ │ ├── 4.jpg │ │ │ └── 5.jpg │ │ ├── pop.jpg │ │ └── preloader.gif │ ├── js │ │ └── main.js │ └── lib │ │ ├── animate │ │ ├── animate.css │ │ └── animate.min.css │ │ ├── bootstrap │ │ ├── css │ │ │ ├── bootstrap.css │ │ │ └── bootstrap.min.css │ │ └── js │ │ │ ├── bootstrap.bundle.min.js │ │ │ └── bootstrap.min.js │ │ ├── easing │ │ ├── easing.js │ │ └── easing.min.js │ │ ├── font-awesome │ │ ├── css │ │ │ ├── font-awesome.css │ │ │ └── font-awesome.min.css │ │ └── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ │ ├── ionicons │ │ ├── css │ │ │ ├── ionicons.css │ │ │ └── ionicons.min.css │ │ └── fonts │ │ │ ├── ionicons.eot │ │ │ ├── ionicons.svg │ │ │ ├── ionicons.ttf │ │ │ └── ionicons.woff │ │ ├── jquery │ │ ├── jquery-migrate.min.js │ │ └── jquery.min.js │ │ ├── magnific-popup │ │ ├── magnific-popup.css │ │ ├── magnific-popup.js │ │ └── magnific-popup.min.js │ │ ├── owlcarousel │ │ ├── LICENSE │ │ ├── README.md │ │ ├── assets │ │ │ ├── ajax-loader.gif │ │ │ ├── owl.carousel.css │ │ │ ├── owl.carousel.min.css │ │ │ ├── owl.theme.default.css │ │ │ ├── owl.theme.default.min.css │ │ │ ├── owl.theme.green.css │ │ │ ├── owl.theme.green.min.css │ │ │ └── owl.video.play.png │ │ ├── owl.carousel.js │ │ └── owl.carousel.min.js │ │ ├── sticky │ │ └── sticky.js │ │ ├── superfish │ │ ├── hoverIntent.js │ │ ├── superfish.js │ │ └── superfish.min.js │ │ └── wow │ │ ├── wow.js │ │ └── wow.min.js └── templates │ └── index.html ├── DeployFlaskHeroku ├── Images │ ├── 1.png │ ├── 2.png │ ├── 3.png │ └── heroku.png ├── Procfile ├── README.md ├── app.py ├── model.pkl ├── requirements.txt ├── slr.py └── templates │ └── index.html ├── Images ├── azure.png ├── conclusion.jpeg ├── gcp.jpg ├── general.png ├── index.jpeg └── meme.jpeg └── Readme.md /ConfigureFlask - Chef/Images/appserver.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/ConfigureFlask - Chef/Images/appserver.jpg -------------------------------------------------------------------------------- /ConfigureFlask - Chef/Images/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/ConfigureFlask - Chef/Images/background.jpg -------------------------------------------------------------------------------- /ConfigureFlask - Chef/Images/chefarch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/ConfigureFlask - Chef/Images/chefarch.jpg -------------------------------------------------------------------------------- /ConfigureFlask - Chef/Images/chefdk.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/ConfigureFlask - Chef/Images/chefdk.jpg -------------------------------------------------------------------------------- /ConfigureFlask - Chef/Images/chefdk2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/ConfigureFlask - Chef/Images/chefdk2.jpg -------------------------------------------------------------------------------- /ConfigureFlask - Chef/Images/chefserver.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/ConfigureFlask - Chef/Images/chefserver.jpg -------------------------------------------------------------------------------- /ConfigureFlask - Chef/Images/cm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/ConfigureFlask - Chef/Images/cm.jpg -------------------------------------------------------------------------------- /ConfigureFlask - Chef/Images/cm2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/ConfigureFlask - Chef/Images/cm2.jpg -------------------------------------------------------------------------------- /ConfigureFlask - Chef/Images/flask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/ConfigureFlask - Chef/Images/flask.jpg -------------------------------------------------------------------------------- /ConfigureFlask - Chef/Images/lb1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/ConfigureFlask - Chef/Images/lb1.jpg -------------------------------------------------------------------------------- /ConfigureFlask - Chef/Images/loadbalancer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/ConfigureFlask - Chef/Images/loadbalancer.gif -------------------------------------------------------------------------------- /ConfigureFlask - Chef/Images/ourlb.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/ConfigureFlask - Chef/Images/ourlb.JPG -------------------------------------------------------------------------------- /ConfigureFlask - Chef/Images/sentiment.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/ConfigureFlask - Chef/Images/sentiment.jpg -------------------------------------------------------------------------------- /ConfigureFlask - Chef/Images/stuck.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/ConfigureFlask - Chef/Images/stuck.jpg -------------------------------------------------------------------------------- /ConfigureFlask - Chef/Images/summary.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/ConfigureFlask - Chef/Images/summary.jpg -------------------------------------------------------------------------------- /ConfigureFlask - Chef/Images/template.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/ConfigureFlask - Chef/Images/template.jpg -------------------------------------------------------------------------------- /ConfigureFlask - Chef/Images/website.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/ConfigureFlask - Chef/Images/website.JPG -------------------------------------------------------------------------------- /ConfigureFlask - Chef/Images/withoutcm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/ConfigureFlask - Chef/Images/withoutcm.jpg -------------------------------------------------------------------------------- /ConfigureFlask - Chef/README.md: -------------------------------------------------------------------------------- 1 | # GitHub Actions — Makes "One Click To Deploy" Feasible For ML CI/CD Pipeline 2 | 3 | As a Data Scientist, you might have encountered dependency issues, lack of familiarity with environments, or how to configure your infrastructure and version issues with tools like TensorFlow. I faced the same issue while trying to run a trained model on other hosts. Then the world was kind enough to introduce me to Chef — A Configuration Management tool which does the cumbersome task for us.

4 | A simple application is developed using sentiment analysis to understand how satisfied people are with the measures State and Central Government is taking in the wake of COVID-19.

5 | Visit our application [here](https://feedbackcovid.herokuapp.com/)

6 | Check out our article for complete information on [How To Deploy Machine Learning Applications Using Chef](https://towardsdatascience.com/deploy-machine-learning-applications-using-chef-826a0e894649?source=friends_link&sk=aa2513a7710a824b84b13b6ec9144476)

7 | You can also visit our [GitHub repository](https://github.com/developers-cosmos/COVID19-FeedbackApplication) for more information. 8 |


9 | 10 | 11 | -------------------------------------------------------------------------------- /ConfigureFlask - Chef/app.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | from flask import Flask, request, jsonify, render_template 3 | from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer 4 | import sys 5 | import socket 6 | from datetime import datetime 7 | import json 8 | import os 9 | 10 | #port_number = sys.argv[1] 11 | 12 | def get_Host_name_IP(): 13 | try: 14 | host_name = socket.gethostname() 15 | host_ip = socket.gethostbyname(host_name) 16 | return [host_name,host_ip] 17 | except: 18 | pass 19 | 20 | def append(now,dictionary): 21 | with os.fdopen(os.open('data.json', os.O_WRONLY | os.O_CREAT, 0o600), 'a') as file: 22 | file.write(str('"')+now+str('":')) 23 | file.write(json.dumps(dictionary,indent=4)) 24 | file.write(',') 25 | file.close() 26 | 27 | HN,IP=get_Host_name_IP() 28 | 29 | app = Flask(__name__,template_folder='templates') 30 | 31 | analyser = SentimentIntensityAnalyzer() 32 | 33 | @app.route('/') 34 | def home(): 35 | return render_template('index.html') 36 | 37 | 38 | @app.route('/State',methods=['POST']) 39 | def State(): 40 | ''' 41 | For rendering results on HTML GUI 42 | ''' 43 | value = request.form 44 | # data to store 45 | msg = value['state'] 46 | now = str(datetime.now())[:-7] 47 | 48 | 49 | features = [x for x in request.form.values()] 50 | text=features[0] 51 | result= analyser.polarity_scores(text) 52 | pos=round(result['pos']*100) 53 | neg=round(result['neg']*100) 54 | neu=round(result['neu']*100) 55 | dictionary={ 56 | "Category":"State Government", 57 | "Feedback":msg, 58 | "Postive":pos, 59 | "Negative":neg, 60 | "Neutral":neu 61 | } 62 | append(now,dictionary) 63 | 64 | return render_template('index.html', prediction_text='You are {} % satisfied positively, {} % neutrally and {} % negatively satisfied with actions of State Government'.format(pos,neu,neg),data_hn=HN,data_ip=IP) 65 | 66 | @app.route('/Central',methods=['POST']) 67 | def Central(): 68 | ''' 69 | For rendering results on HTML GUI 70 | ''' 71 | value = request.form 72 | # data to store 73 | msg = value['central'] 74 | now = str(datetime.now())[:-7] 75 | 76 | features = [x for x in request.form.values()] 77 | text=features[0] 78 | result= analyser.polarity_scores(text) 79 | pos=round(result['pos']*100) 80 | neg=round(result['neg']*100) 81 | neu=round(result['neu']*100) 82 | dictionary={ 83 | "Category":"Central Government", 84 | "Feedback":msg, 85 | "Postive":pos, 86 | "Negative":neg, 87 | "Neutral":neu 88 | } 89 | append(now,dictionary) 90 | 91 | return render_template('index.html', prediction_text='You are {} % satisfied positively, {} % neutrally and {} % negatively satisfied with actions of Central Government'.format(pos,neu,neg),data_hn=HN,data_ip=IP) 92 | 93 | if __name__ == '__main__': 94 | app.run(host='0.0.0.0',port = 5000, debug=True) 95 | -------------------------------------------------------------------------------- /ConfigureFlask - Chef/chef-repo/.gitignore: -------------------------------------------------------------------------------- 1 | # Chef 2 | .chef/*.pem 3 | .chef/encrypted_data_bag_secret 4 | 5 | # Ruby 6 | .rake_test_cache 7 | .rvmrc 8 | .rbenv-version 9 | 10 | # Emacs 11 | *~ 12 | \#*\# 13 | /.emacs.desktop 14 | /.emacs.desktop.lock 15 | .elc 16 | auto-save-list 17 | tramp 18 | .\#* 19 | 20 | # Emacs org-mode 21 | .org-id-locations 22 | *_archive 23 | 24 | # SublimeText 25 | *.sublime-workspace 26 | 27 | # TextMate 28 | *.tmproj 29 | *.tmproject 30 | tmtags 31 | 32 | # Vim 33 | .*.s[a-w][a-z] 34 | *.un~ 35 | Session.vim 36 | .netrwhist 37 | *~ 38 | 39 | # OS X 40 | .DS_Store 41 | .AppleDouble 42 | .LSOverride 43 | Icon 44 | ._* 45 | .Spotlight-V100 46 | .Trashes 47 | 48 | # Windows 49 | Thumbs.db 50 | ehthumbs.db 51 | Desktop.ini 52 | $RECYCLE.BIN/ 53 | -------------------------------------------------------------------------------- /ConfigureFlask - Chef/chef-repo/=2.3: -------------------------------------------------------------------------------- 1 | Loaded plugins: fastestmirror 2 | Loading mirror speeds from cached hostfile 3 | * base: mirrors.vcea.wsu.edu 4 | * extras: mirror.oss.ou.edu 5 | * updates: centos.mirror.lstn.net 6 | Package ruby-2.0.0.648-36.el7.x86_64 already installed and latest version 7 | Nothing to do 8 | -------------------------------------------------------------------------------- /ConfigureFlask - Chef/chef-repo/README.md: -------------------------------------------------------------------------------- 1 | The chef-repo 2 | =============== 3 | All installations require a central workspace known as the chef-repo. This is a place where primitive objects--cookbooks, roles, environments, data bags, and chef-repo configuration files--are stored and managed. 4 | 5 | The chef-repo should be kept under version control, such as [git](http://git-scm.org), and then managed as if it were source code. 6 | 7 | Knife Configuration 8 | ------------------- 9 | Knife is the [command line interface](https://docs.chef.io/knife.html) for Chef. The chef-repo contains a .chef directory (which is a hidden directory by default) in which the Knife configuration file (knife.rb) is located. This file contains configuration settings for the chef-repo. 10 | 11 | The knife.rb file is automatically created by the starter kit. This file can be customized to support configuration settings used by [cloud provider options](https://docs.chef.io/plugin_knife.html) and custom [knife plugins](https://docs.chef.io/plugin_knife_custom.html). 12 | 13 | Also located inside the .chef directory are .pem files, which contain private keys used to authenticate requests made to the Chef server. The USERNAME.pem file contains a private key unique to the user (and should never be shared with anyone). The ORGANIZATION-validator.pem file contains a private key that is global to the entire organization (and is used by all nodes and workstations that send requests to the Chef server). 14 | 15 | More information about knife.rb configuration options can be found in [the documentation for knife](https://docs.chef.io/config_rb_knife.html). 16 | 17 | Cookbooks 18 | --------- 19 | A cookbook is the fundamental unit of configuration and policy distribution. A sample cookbook can be found in `cookbooks/starter`. After making changes to any cookbook, you must upload it to the Chef server using knife: 20 | 21 | $ knife upload cookbooks/starter 22 | 23 | For more information about cookbooks, see the example files in the `starter` cookbook. 24 | 25 | Roles 26 | ----- 27 | Roles provide logical grouping of cookbooks and other roles. A sample role can be found at `roles/starter.rb`. 28 | 29 | Getting Started 30 | ------------------------- 31 | Now that you have the chef-repo ready to go, check out [Learn Chef](https://learn.chef.io/) to proceed with your workstation setup. If you have any questions about Chef you can always ask [our support team](https://www.chef.io/support/) for a helping hand. 32 | -------------------------------------------------------------------------------- /ConfigureFlask - Chef/chef-repo/cookbooks/chefignore: -------------------------------------------------------------------------------- 1 | # Chef 2 | .chef/*.pem 3 | .chef/encrypted_data_bag_secret 4 | 5 | # Ruby 6 | .rake_test_cache 7 | .rvmrc 8 | .rbenv-version 9 | 10 | # Emacs 11 | *~ 12 | \#*\# 13 | /.emacs.desktop 14 | /.emacs.desktop.lock 15 | .elc 16 | auto-save-list 17 | tramp 18 | .\#* 19 | 20 | # Emacs org-mode 21 | .org-id-locations 22 | *_archive 23 | 24 | # SublimeText 25 | *.sublime-workspace 26 | 27 | # TextMate 28 | *.tmproj 29 | *.tmproject 30 | tmtags 31 | 32 | # Vim 33 | .*.s[a-w][a-z] 34 | *.un~ 35 | Session.vim 36 | .netrwhist 37 | *~ 38 | 39 | # OS X 40 | .DS_Store 41 | .AppleDouble 42 | .LSOverride 43 | Icon 44 | ._* 45 | .Spotlight-V100 46 | .Trashes 47 | 48 | # Windows 49 | Thumbs.db 50 | ehthumbs.db 51 | Desktop.ini 52 | $RECYCLE.BIN/ 53 | 54 | # Git 55 | .git/ 56 | .gitignore 57 | .gitmodules 58 | 59 | # Subversion 60 | .svn/ 61 | 62 | # Mercurial 63 | .hg/* 64 | */.hg/* 65 | .hgignore 66 | -------------------------------------------------------------------------------- /ConfigureFlask - Chef/chef-repo/cookbooks/feedback cookbook/Berksfile: -------------------------------------------------------------------------------- 1 | source 'https://supermarket.chef.io' 2 | 3 | metadata 4 | -------------------------------------------------------------------------------- /ConfigureFlask - Chef/chef-repo/cookbooks/feedback cookbook/README.md: -------------------------------------------------------------------------------- 1 | # Covid19 Feedback Application 2 | 3 | A simple application is developed to get feedback from a user and analysing the text to predict the sentiment. 4 | -------------------------------------------------------------------------------- /ConfigureFlask - Chef/chef-repo/cookbooks/feedback cookbook/chefignore: -------------------------------------------------------------------------------- 1 | # Put files/directories that should be ignored in this file when uploading 2 | # to a chef-server or supermarket. 3 | # Lines that start with '# ' are comments. 4 | 5 | # OS generated files # 6 | ###################### 7 | .DS_Store 8 | Icon? 9 | nohup.out 10 | ehthumbs.db 11 | Thumbs.db 12 | 13 | # SASS # 14 | ######## 15 | .sass-cache 16 | 17 | # EDITORS # 18 | ########### 19 | \#* 20 | .#* 21 | *~ 22 | *.sw[a-z] 23 | *.bak 24 | REVISION 25 | TAGS* 26 | tmtags 27 | *_flymake.* 28 | *_flymake 29 | *.tmproj 30 | .project 31 | .settings 32 | mkmf.log 33 | 34 | ## COMPILED ## 35 | ############## 36 | a.out 37 | *.o 38 | *.pyc 39 | *.so 40 | *.com 41 | *.class 42 | *.dll 43 | *.exe 44 | */rdoc/ 45 | 46 | # Testing # 47 | ########### 48 | .watchr 49 | .rspec 50 | spec/* 51 | spec/fixtures/* 52 | test/* 53 | features/* 54 | examples/* 55 | Guardfile 56 | Procfile 57 | .kitchen* 58 | .rubocop.yml 59 | spec/* 60 | Rakefile 61 | .travis.yml 62 | .foodcritic 63 | .codeclimate.yml 64 | 65 | # SCM # 66 | ####### 67 | .git 68 | */.git 69 | .gitignore 70 | .gitmodules 71 | .gitconfig 72 | .gitattributes 73 | .svn 74 | */.bzr/* 75 | */.hg/* 76 | */.svn/* 77 | 78 | # Berkshelf # 79 | ############# 80 | Berksfile 81 | Berksfile.lock 82 | cookbooks/* 83 | tmp 84 | 85 | # Policyfile # 86 | ############## 87 | Policyfile.rb 88 | Policyfile.lock.json 89 | 90 | # Cookbooks # 91 | ############# 92 | CONTRIBUTING* 93 | CHANGELOG* 94 | TESTING* 95 | MAINTAINERS.toml 96 | 97 | # Strainer # 98 | ############ 99 | Colanderfile 100 | Strainerfile 101 | .colander 102 | .strainer 103 | 104 | # Vagrant # 105 | ########### 106 | .vagrant 107 | Vagrantfile 108 | -------------------------------------------------------------------------------- /ConfigureFlask - Chef/chef-repo/cookbooks/feedback cookbook/metadata.rb: -------------------------------------------------------------------------------- 1 | name 'feedback' 2 | maintainer 'ritheesh' 3 | maintainer_email 'bunnyrb4@gmail.com' 4 | license 'all_rights' 5 | description 'Installs/Configures feedback' 6 | long_description 'Installs/Configures feedback' 7 | version '0.1.0' 8 | 9 | # If you upload to Supermarket you should set this so your cookbook 10 | # gets a `View Issues` link 11 | # issues_url 'https://github.com//feedback/issues' if respond_to?(:issues_url) 12 | 13 | # If you upload to Supermarket you should set this so your cookbook 14 | # gets a `View Source` link 15 | # source_url 'https://github.com//feedback' if respond_to?(:source_url) 16 | -------------------------------------------------------------------------------- /ConfigureFlask - Chef/chef-repo/cookbooks/feedback cookbook/recipes/application.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: CovidFeedback Application 3 | # Recipe:: application 4 | # 5 | # Copyright (c) 2020 The Authors, All Rights Reserved. 6 | 7 | # property: port is mandatory, make sure the given port is free 8 | # property: username is mandatory 9 | # default action :create 10 | 11 | 12 | covidFeedback 'version1' do 13 | port 5005 14 | username "bunnyrb4" 15 | end 16 | -------------------------------------------------------------------------------- /ConfigureFlask - Chef/chef-repo/cookbooks/feedback cookbook/recipes/default.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: CovidFeedback Application 3 | # Recipe:: default 4 | # 5 | # Copyright (c) 2020 The Authors, All Rights Reserved. 6 | 7 | include_recipe 'feedback::application' -------------------------------------------------------------------------------- /ConfigureFlask - Chef/chef-repo/cookbooks/feedback cookbook/resources/feedback.rb: -------------------------------------------------------------------------------- 1 | # custom resource name 2 | resource_name :covidFeedback 3 | 4 | # required properties 5 | property :instance_name, String, name_property: true 6 | property :port, Integer, required: true 7 | property :username, String, required: true 8 | 9 | # creates CovidFeedback application 10 | action :create do 11 | 12 | # creating directory for our application 13 | directory "/FeedbackApp-#{new_resource.instance_name}" do 14 | recursive true 15 | action :create 16 | end 17 | 18 | # install initial requirements 19 | bash 'install_requirements' do 20 | code <<-EOH 21 | 22 | sudo yum install git -y 23 | sudo yum install -y python3 24 | sudo yum install python3-pip 25 | sudo yum install firewalld 26 | sudo systemctl enable firewalld 27 | EOH 28 | end 29 | 30 | # set-up project directory to clone the repository 31 | bash 'setup_directory' do 32 | code <<-EOH 33 | cd / 34 | sudo git clone https://github.com/developers-cosmos/COVID19-Feedback.git 35 | sudo mv COVID19-Feedback/* FeedbackApp-#{new_resource.instance_name}/ 36 | sudo rm -r COVID19-Feedback/ 37 | cd FeedbackApp-#{new_resource.instance_name} 38 | sudo chmod 755 data.json 39 | EOH 40 | end 41 | 42 | # install required packages 43 | bash 'python_packages' do 44 | code <<-EOH 45 | cd /FeedbackApp-#{new_resource.instance_name} 46 | sudo pip3 install -r requirements.txt 47 | EOH 48 | end 49 | 50 | # opening the given port 51 | bash 'open_port' do 52 | code <<-EOH 53 | sudo firewall-cmd --zone=public --add-port=#{new_resource.port}/tcp --permanent 54 | sudo firewall-cmd --reload 55 | EOH 56 | end 57 | 58 | # creating a service our application 59 | template "/etc/systemd/system/FeedbackApp-#{new_resource.instance_name}.service" do 60 | source 'myservice.service.erb' 61 | variables( 62 | username: new_resource.username, 63 | instance_name: new_resource.instance_name, 64 | port: new_resource.port 65 | ) 66 | action :create 67 | end 68 | 69 | # starting a service 70 | service "FeedbackApp-#{new_resource.instance_name}" do 71 | action [:start] 72 | end 73 | end 74 | 75 | # stop the CovidFeedback service 76 | action :delete do 77 | service "FeedbackApp-#{new_resource.instance_name}" do 78 | action [:stop] 79 | end 80 | end -------------------------------------------------------------------------------- /ConfigureFlask - Chef/chef-repo/cookbooks/feedback cookbook/spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'chefspec' 2 | require 'chefspec/berkshelf' 3 | -------------------------------------------------------------------------------- /ConfigureFlask - Chef/chef-repo/cookbooks/feedback cookbook/spec/unit/recipes/application_spec.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: feedback 3 | # Spec:: default 4 | # 5 | # Copyright (c) 2020 The Authors, All Rights Reserved. 6 | 7 | require 'spec_helper' 8 | 9 | describe 'feedback::application' do 10 | context 'When all attributes are default, on an unspecified platform' do 11 | let(:chef_run) do 12 | runner = ChefSpec::ServerRunner.new 13 | runner.converge(described_recipe) 14 | end 15 | 16 | it 'converges successfully' do 17 | expect { chef_run }.to_not raise_error 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /ConfigureFlask - Chef/chef-repo/cookbooks/feedback cookbook/spec/unit/recipes/default_spec.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: feedback 3 | # Spec:: default 4 | # 5 | # Copyright (c) 2020 The Authors, All Rights Reserved. 6 | 7 | require 'spec_helper' 8 | 9 | describe 'feedback::default' do 10 | context 'When all attributes are default, on an unspecified platform' do 11 | let(:chef_run) do 12 | runner = ChefSpec::ServerRunner.new 13 | runner.converge(described_recipe) 14 | end 15 | 16 | it 'converges successfully' do 17 | expect { chef_run }.to_not raise_error 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /ConfigureFlask - Chef/chef-repo/cookbooks/feedback cookbook/templates/myservice.service.erb: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Simplified Flask Service 3 | After=syslog.target 4 | 5 | [Service] 6 | Type=simple 7 | User=<%= @username %> 8 | WorkingDirectory=/FeedbackApp-<%= @instance_name %> 9 | ExecStart=/bin/bash -c 'sudo python3 -u /FeedbackApp-<%= @instance_name %>/app.py <%= @port%>' 10 | StandardOutput=syslog 11 | StandardError=syslog 12 | 13 | [Install] 14 | WantedBy=multi-user.targeti -------------------------------------------------------------------------------- /ConfigureFlask - Chef/chef-repo/cookbooks/feedback cookbook/test/recipes/application.rb: -------------------------------------------------------------------------------- 1 | # # encoding: utf-8 2 | 3 | # Inspec test for recipe feedback::application 4 | 5 | # The Inspec reference, with examples and extensive documentation, can be 6 | # found at https://docs.chef.io/inspec_reference.html 7 | 8 | unless os.windows? 9 | describe user('root') do 10 | it { should exist } 11 | skip 'This is an example test, replace with your own test.' 12 | end 13 | end 14 | 15 | describe port(80) do 16 | it { should_not be_listening } 17 | skip 'This is an example test, replace with your own test.' 18 | end 19 | -------------------------------------------------------------------------------- /ConfigureFlask - Chef/chef-repo/cookbooks/feedback cookbook/test/recipes/default_test.rb: -------------------------------------------------------------------------------- 1 | # # encoding: utf-8 2 | 3 | # Inspec test for recipe feedback::default 4 | 5 | # The Inspec reference, with examples and extensive documentation, can be 6 | # found at https://docs.chef.io/inspec_reference.html 7 | 8 | unless os.windows? 9 | describe user('root') do 10 | it { should exist } 11 | skip 'This is an example test, replace with your own test.' 12 | end 13 | end 14 | 15 | describe port(80) do 16 | it { should_not be_listening } 17 | skip 'This is an example test, replace with your own test.' 18 | end 19 | -------------------------------------------------------------------------------- /ConfigureFlask - Chef/chef-repo/roles/starter.rb: -------------------------------------------------------------------------------- 1 | name "starter" 2 | description "An example Chef role" 3 | run_list "recipe[starter]" 4 | override_attributes({ 5 | "starter_name" => "Yellenki Ritheesh Baradwaj", 6 | }) 7 | -------------------------------------------------------------------------------- /ConfigureFlask - Chef/data.json: -------------------------------------------------------------------------------- 1 | "2020-04-25 11:08:58":{ 2 | "Category": "State Government", 3 | "Feedback": "I really liked the way India is handling the situation, this is fair", 4 | "Postive": 33, 5 | "Negative": 0, 6 | "Neutral": 67 7 | },"2020-04-25 11:21:18":{ 8 | "Category": "Central Government", 9 | "Feedback": "good decision", 10 | "Postive": 74, 11 | "Negative": 0, 12 | "Neutral": 26 13 | },"2020-04-25 11:43:45":{ 14 | "Category": "Central Government", 15 | "Feedback": "this is not good", 16 | "Postive": 0, 17 | "Negative": 44, 18 | "Neutral": 56 19 | },"2020-04-26 14:51:25":{ 20 | "Category": "State Government", 21 | "Feedback": "good", 22 | "Postive": 100, 23 | "Negative": 0, 24 | "Neutral": 0 25 | }, -------------------------------------------------------------------------------- /ConfigureFlask - Chef/requirements.txt: -------------------------------------------------------------------------------- 1 | pandas==1.0.1 2 | Flask==2.3.2 3 | vaderSentiment==3.3.1 4 | -------------------------------------------------------------------------------- /ConfigureFlask - Chef/static/Developers Cosmos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/ConfigureFlask - Chef/static/Developers Cosmos.png -------------------------------------------------------------------------------- /ConfigureFlask - Chef/static/bg.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/ConfigureFlask - Chef/static/bg.jpeg -------------------------------------------------------------------------------- /ConfigureFlask - Chef/static/tenor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/ConfigureFlask - Chef/static/tenor.gif -------------------------------------------------------------------------------- /ConfigureFlask - Chef/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Covid19 Feedback Application 4 | 5 | 53 | 54 | 55 |
56 | Hello from Olaf! 57 |

Covid19 Feedback Application

58 |

59 | 84 |
85 |

86 |

Note: This is not any official site.
Please, do not enter any confidential data.

87 |

{{data_hn}}

88 |

{{data_ip}}

89 | 90 | -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/Images/Ec2Medium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-As-Service-Using-AWS-EC2/Images/Ec2Medium.png -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/Readme.md: -------------------------------------------------------------------------------- 1 |

Deploying Machine Learning Models as a service using AWS EC2

2 | 3 | > Benefits of Deploying as a service on EC2 4 | * We can Create Custom storage and store the Data (which can’t be done while we deploy our model as Web Application using PAAS. 5 | 6 | * Performance (we can autoscale the instances whenever required) 7 | * Security (we can control who can use service by adding security groups and VPC) 8 | 9 | Check out our article for complete information on 10 | 11 | Deploying Machine Learning Models as a service using AWS EC2 12 | 13 | Check out Deployed Application Here 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/app.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | from flask import Flask, request, jsonify, render_template 4 | import pickle 5 | 6 | app = Flask(__name__,template_folder='templates') 7 | model = pickle.load(open('model.pkl', 'rb')) 8 | 9 | @app.route('/') 10 | def home(): 11 | return render_template('index.html') 12 | 13 | @app.route('/predict',methods=['POST']) 14 | def predict(): 15 | ''' 16 | For rendering results on HTML GUI 17 | ''' 18 | features = [x for x in request.form.values()] 19 | final_features = [np.array(features)] 20 | column_names=['R&DSpend','Administration','MarketingSpend','State'] 21 | final_features=pd.DataFrame(final_features,columns=column_names) 22 | prediction= model.predict(final_features) 23 | temp=0.0 24 | for i in prediction: 25 | for j in i: 26 | temp=j 27 | return render_template('index.html', prediction_text='${}'.format(temp)) 28 | 29 | -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-As-Service-Using-AWS-EC2/model.pkl -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask==2.3.2 2 | seaborn==0.9.0 3 | numpy==1.22.0 4 | pandas==0.25.1 5 | matplotlib==3.0.3 6 | scikit_learn==0.23.1 7 | -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/css/scss-files.txt: -------------------------------------------------------------------------------- 1 | The scss source files are available in the pro version. 2 | -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/img/home.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-As-Service-Using-AWS-EC2/static/img/home.jpg -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/img/intro-carousel/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-As-Service-Using-AWS-EC2/static/img/intro-carousel/1.jpg -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/img/intro-carousel/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-As-Service-Using-AWS-EC2/static/img/intro-carousel/2.jpg -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/img/intro-carousel/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-As-Service-Using-AWS-EC2/static/img/intro-carousel/3.jpg -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/img/intro-carousel/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-As-Service-Using-AWS-EC2/static/img/intro-carousel/4.jpg -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/img/intro-carousel/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-As-Service-Using-AWS-EC2/static/img/intro-carousel/5.jpg -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/img/pop.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-As-Service-Using-AWS-EC2/static/img/pop.jpg -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/img/preloader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-As-Service-Using-AWS-EC2/static/img/preloader.gif -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/js/main.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function ($) { 2 | 3 | // Back to top button 4 | $(window).scroll(function () { 5 | if ($(this).scrollTop() > 100) { 6 | $('.back-to-top').fadeIn('slow'); 7 | } else { 8 | $('.back-to-top').fadeOut('slow'); 9 | } 10 | }); 11 | $('.back-to-top').click(function () { 12 | $('html, body').animate({ 13 | scrollTop: 0 14 | }, 1500, 'easeInOutExpo'); 15 | return false; 16 | }); 17 | 18 | // Stick the header at top on scroll 19 | $("#header").sticky({ 20 | topSpacing: 0, 21 | zIndex: '50' 22 | }); 23 | 24 | // Intro background carousel 25 | $("#intro-carousel").owlCarousel({ 26 | autoplay: true, 27 | dots: false, 28 | loop: true, 29 | animateOut: 'fadeOut', 30 | items: 1 31 | }); 32 | 33 | // Initiate the wowjs animation library 34 | new WOW().init(); 35 | 36 | // Initiate superfish on nav menu 37 | $('.nav-menu').superfish({ 38 | animation: { 39 | opacity: 'show' 40 | }, 41 | speed: 400 42 | }); 43 | 44 | // Mobile Navigation 45 | if ($('#nav-menu-container').length) { 46 | var $mobile_nav = $('#nav-menu-container').clone().prop({ 47 | id: 'mobile-nav' 48 | }); 49 | $mobile_nav.find('> ul').attr({ 50 | 'class': '', 51 | 'id': '' 52 | }); 53 | $('body').append($mobile_nav); 54 | $('body').prepend(''); 55 | $('body').append('
'); 56 | $('#mobile-nav').find('.menu-has-children').prepend(''); 57 | 58 | $(document).on('click', '.menu-has-children i', function (e) { 59 | $(this).next().toggleClass('menu-item-active'); 60 | $(this).nextAll('ul').eq(0).slideToggle(); 61 | $(this).toggleClass("fa-chevron-up fa-chevron-down"); 62 | }); 63 | 64 | $(document).on('click', '#mobile-nav-toggle', function (e) { 65 | $('body').toggleClass('mobile-nav-active'); 66 | $('#mobile-nav-toggle i').toggleClass('fa-times fa-bars'); 67 | $('#mobile-body-overly').toggle(); 68 | }); 69 | 70 | $(document).click(function (e) { 71 | var container = $("#mobile-nav, #mobile-nav-toggle"); 72 | if (!container.is(e.target) && container.has(e.target).length === 0) { 73 | if ($('body').hasClass('mobile-nav-active')) { 74 | $('body').removeClass('mobile-nav-active'); 75 | $('#mobile-nav-toggle i').toggleClass('fa-times fa-bars'); 76 | $('#mobile-body-overly').fadeOut(); 77 | } 78 | } 79 | }); 80 | } else if ($("#mobile-nav, #mobile-nav-toggle").length) { 81 | $("#mobile-nav, #mobile-nav-toggle").hide(); 82 | } 83 | 84 | // Smooth scroll for the menu and links with .scrollto classes 85 | $('.nav-menu a, #mobile-nav a, .scrollto').on('click', function () { 86 | if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { 87 | var target = $(this.hash); 88 | if (target.length) { 89 | var top_space = 0; 90 | 91 | if ($('#header').length) { 92 | top_space = $('#header').outerHeight(); 93 | 94 | if (!$('#header').hasClass('header-fixed')) { 95 | top_space = top_space - 20; 96 | } 97 | } 98 | 99 | $('html, body').animate({ 100 | scrollTop: target.offset().top - top_space 101 | }, 1500, 'easeInOutExpo'); 102 | 103 | if ($(this).parents('.nav-menu').length) { 104 | $('.nav-menu .menu-active').removeClass('menu-active'); 105 | $(this).closest('li').addClass('menu-active'); 106 | } 107 | 108 | if ($('body').hasClass('mobile-nav-active')) { 109 | $('body').removeClass('mobile-nav-active'); 110 | $('#mobile-nav-toggle i').toggleClass('fa-times fa-bars'); 111 | $('#mobile-body-overly').fadeOut(); 112 | } 113 | return false; 114 | } 115 | } 116 | }); 117 | 118 | 119 | // Porfolio - uses the magnific popup jQuery plugin 120 | $('.portfolio-popup').magnificPopup({ 121 | type: 'image', 122 | removalDelay: 300, 123 | mainClass: 'mfp-fade', 124 | gallery: { 125 | enabled: true 126 | }, 127 | zoom: { 128 | enabled: true, 129 | duration: 300, 130 | easing: 'ease-in-out', 131 | opener: function (openerElement) { 132 | return openerElement.is('img') ? openerElement : openerElement.find('img'); 133 | } 134 | } 135 | }); 136 | 137 | // Testimonials carousel (uses the Owl Carousel library) 138 | $(".testimonials-carousel").owlCarousel({ 139 | autoplay: true, 140 | dots: true, 141 | loop: true, 142 | responsive: { 143 | 0: { 144 | items: 1 145 | }, 146 | 768: { 147 | items: 2 148 | }, 149 | 900: { 150 | items: 3 151 | } 152 | } 153 | }); 154 | 155 | // Clients carousel (uses the Owl Carousel library) 156 | $(".clients-carousel").owlCarousel({ 157 | autoplay: true, 158 | dots: true, 159 | loop: true, 160 | responsive: { 161 | 0: { 162 | items: 2 163 | }, 164 | 768: { 165 | items: 4 166 | }, 167 | 900: { 168 | items: 6 169 | } 170 | } 171 | }); 172 | 173 | 174 | }); 175 | -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/easing/easing.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery Easing v1.4.1 - http://gsgd.co.uk/sandbox/jquery/easing/ 3 | * Open source under the BSD License. 4 | * Copyright © 2008 George McGinley Smith 5 | * All rights reserved. 6 | * https://raw.github.com/gdsmith/jquery-easing/master/LICENSE 7 | */ 8 | 9 | (function (factory) { 10 | if (typeof define === "function" && define.amd) { 11 | define(['jquery'], function ($) { 12 | return factory($); 13 | }); 14 | } else if (typeof module === "object" && typeof module.exports === "object") { 15 | exports = factory(require('jquery')); 16 | } else { 17 | factory(jQuery); 18 | } 19 | })(function($){ 20 | 21 | // Preserve the original jQuery "swing" easing as "jswing" 22 | if (typeof $.easing !== 'undefined') { 23 | $.easing['jswing'] = $.easing['swing']; 24 | } 25 | 26 | var pow = Math.pow, 27 | sqrt = Math.sqrt, 28 | sin = Math.sin, 29 | cos = Math.cos, 30 | PI = Math.PI, 31 | c1 = 1.70158, 32 | c2 = c1 * 1.525, 33 | c3 = c1 + 1, 34 | c4 = ( 2 * PI ) / 3, 35 | c5 = ( 2 * PI ) / 4.5; 36 | 37 | // x is the fraction of animation progress, in the range 0..1 38 | function bounceOut(x) { 39 | var n1 = 7.5625, 40 | d1 = 2.75; 41 | if ( x < 1/d1 ) { 42 | return n1*x*x; 43 | } else if ( x < 2/d1 ) { 44 | return n1*(x-=(1.5/d1))*x + .75; 45 | } else if ( x < 2.5/d1 ) { 46 | return n1*(x-=(2.25/d1))*x + .9375; 47 | } else { 48 | return n1*(x-=(2.625/d1))*x + .984375; 49 | } 50 | } 51 | 52 | $.extend( $.easing, 53 | { 54 | def: 'easeOutQuad', 55 | swing: function (x) { 56 | return $.easing[$.easing.def](x); 57 | }, 58 | easeInQuad: function (x) { 59 | return x * x; 60 | }, 61 | easeOutQuad: function (x) { 62 | return 1 - ( 1 - x ) * ( 1 - x ); 63 | }, 64 | easeInOutQuad: function (x) { 65 | return x < 0.5 ? 66 | 2 * x * x : 67 | 1 - pow( -2 * x + 2, 2 ) / 2; 68 | }, 69 | easeInCubic: function (x) { 70 | return x * x * x; 71 | }, 72 | easeOutCubic: function (x) { 73 | return 1 - pow( 1 - x, 3 ); 74 | }, 75 | easeInOutCubic: function (x) { 76 | return x < 0.5 ? 77 | 4 * x * x * x : 78 | 1 - pow( -2 * x + 2, 3 ) / 2; 79 | }, 80 | easeInQuart: function (x) { 81 | return x * x * x * x; 82 | }, 83 | easeOutQuart: function (x) { 84 | return 1 - pow( 1 - x, 4 ); 85 | }, 86 | easeInOutQuart: function (x) { 87 | return x < 0.5 ? 88 | 8 * x * x * x * x : 89 | 1 - pow( -2 * x + 2, 4 ) / 2; 90 | }, 91 | easeInQuint: function (x) { 92 | return x * x * x * x * x; 93 | }, 94 | easeOutQuint: function (x) { 95 | return 1 - pow( 1 - x, 5 ); 96 | }, 97 | easeInOutQuint: function (x) { 98 | return x < 0.5 ? 99 | 16 * x * x * x * x * x : 100 | 1 - pow( -2 * x + 2, 5 ) / 2; 101 | }, 102 | easeInSine: function (x) { 103 | return 1 - cos( x * PI/2 ); 104 | }, 105 | easeOutSine: function (x) { 106 | return sin( x * PI/2 ); 107 | }, 108 | easeInOutSine: function (x) { 109 | return -( cos( PI * x ) - 1 ) / 2; 110 | }, 111 | easeInExpo: function (x) { 112 | return x === 0 ? 0 : pow( 2, 10 * x - 10 ); 113 | }, 114 | easeOutExpo: function (x) { 115 | return x === 1 ? 1 : 1 - pow( 2, -10 * x ); 116 | }, 117 | easeInOutExpo: function (x) { 118 | return x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? 119 | pow( 2, 20 * x - 10 ) / 2 : 120 | ( 2 - pow( 2, -20 * x + 10 ) ) / 2; 121 | }, 122 | easeInCirc: function (x) { 123 | return 1 - sqrt( 1 - pow( x, 2 ) ); 124 | }, 125 | easeOutCirc: function (x) { 126 | return sqrt( 1 - pow( x - 1, 2 ) ); 127 | }, 128 | easeInOutCirc: function (x) { 129 | return x < 0.5 ? 130 | ( 1 - sqrt( 1 - pow( 2 * x, 2 ) ) ) / 2 : 131 | ( sqrt( 1 - pow( -2 * x + 2, 2 ) ) + 1 ) / 2; 132 | }, 133 | easeInElastic: function (x) { 134 | return x === 0 ? 0 : x === 1 ? 1 : 135 | -pow( 2, 10 * x - 10 ) * sin( ( x * 10 - 10.75 ) * c4 ); 136 | }, 137 | easeOutElastic: function (x) { 138 | return x === 0 ? 0 : x === 1 ? 1 : 139 | pow( 2, -10 * x ) * sin( ( x * 10 - 0.75 ) * c4 ) + 1; 140 | }, 141 | easeInOutElastic: function (x) { 142 | return x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? 143 | -( pow( 2, 20 * x - 10 ) * sin( ( 20 * x - 11.125 ) * c5 )) / 2 : 144 | pow( 2, -20 * x + 10 ) * sin( ( 20 * x - 11.125 ) * c5 ) / 2 + 1; 145 | }, 146 | easeInBack: function (x) { 147 | return c3 * x * x * x - c1 * x * x; 148 | }, 149 | easeOutBack: function (x) { 150 | return 1 + c3 * pow( x - 1, 3 ) + c1 * pow( x - 1, 2 ); 151 | }, 152 | easeInOutBack: function (x) { 153 | return x < 0.5 ? 154 | ( pow( 2 * x, 2 ) * ( ( c2 + 1 ) * 2 * x - c2 ) ) / 2 : 155 | ( pow( 2 * x - 2, 2 ) *( ( c2 + 1 ) * ( x * 2 - 2 ) + c2 ) + 2 ) / 2; 156 | }, 157 | easeInBounce: function (x) { 158 | return 1 - bounceOut( 1 - x ); 159 | }, 160 | easeOutBounce: bounceOut, 161 | easeInOutBounce: function (x) { 162 | return x < 0.5 ? 163 | ( 1 - bounceOut( 1 - 2 * x ) ) / 2 : 164 | ( 1 + bounceOut( 2 * x - 1 ) ) / 2; 165 | } 166 | }); 167 | 168 | }); 169 | -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/easing/easing.min.js: -------------------------------------------------------------------------------- 1 | !function(n){"function"==typeof define&&define.amd?define(["jquery"],function(e){return n(e)}):"object"==typeof module&&"object"==typeof module.exports?exports=n(require("jquery")):n(jQuery)}(function(n){function e(n){var e=7.5625,t=2.75;return n<1/t?e*n*n:n<2/t?e*(n-=1.5/t)*n+.75:n<2.5/t?e*(n-=2.25/t)*n+.9375:e*(n-=2.625/t)*n+.984375}void 0!==n.easing&&(n.easing.jswing=n.easing.swing);var t=Math.pow,u=Math.sqrt,r=Math.sin,i=Math.cos,a=Math.PI,c=1.70158,o=1.525*c,s=2*a/3,f=2*a/4.5;n.extend(n.easing,{def:"easeOutQuad",swing:function(e){return n.easing[n.easing.def](e)},easeInQuad:function(n){return n*n},easeOutQuad:function(n){return 1-(1-n)*(1-n)},easeInOutQuad:function(n){return n<.5?2*n*n:1-t(-2*n+2,2)/2},easeInCubic:function(n){return n*n*n},easeOutCubic:function(n){return 1-t(1-n,3)},easeInOutCubic:function(n){return n<.5?4*n*n*n:1-t(-2*n+2,3)/2},easeInQuart:function(n){return n*n*n*n},easeOutQuart:function(n){return 1-t(1-n,4)},easeInOutQuart:function(n){return n<.5?8*n*n*n*n:1-t(-2*n+2,4)/2},easeInQuint:function(n){return n*n*n*n*n},easeOutQuint:function(n){return 1-t(1-n,5)},easeInOutQuint:function(n){return n<.5?16*n*n*n*n*n:1-t(-2*n+2,5)/2},easeInSine:function(n){return 1-i(n*a/2)},easeOutSine:function(n){return r(n*a/2)},easeInOutSine:function(n){return-(i(a*n)-1)/2},easeInExpo:function(n){return 0===n?0:t(2,10*n-10)},easeOutExpo:function(n){return 1===n?1:1-t(2,-10*n)},easeInOutExpo:function(n){return 0===n?0:1===n?1:n<.5?t(2,20*n-10)/2:(2-t(2,-20*n+10))/2},easeInCirc:function(n){return 1-u(1-t(n,2))},easeOutCirc:function(n){return u(1-t(n-1,2))},easeInOutCirc:function(n){return n<.5?(1-u(1-t(2*n,2)))/2:(u(1-t(-2*n+2,2))+1)/2},easeInElastic:function(n){return 0===n?0:1===n?1:-t(2,10*n-10)*r((10*n-10.75)*s)},easeOutElastic:function(n){return 0===n?0:1===n?1:t(2,-10*n)*r((10*n-.75)*s)+1},easeInOutElastic:function(n){return 0===n?0:1===n?1:n<.5?-(t(2,20*n-10)*r((20*n-11.125)*f))/2:t(2,-20*n+10)*r((20*n-11.125)*f)/2+1},easeInBack:function(n){return(c+1)*n*n*n-c*n*n},easeOutBack:function(n){return 1+(c+1)*t(n-1,3)+c*t(n-1,2)},easeInOutBack:function(n){return n<.5?t(2*n,2)*(7.189819*n-o)/2:(t(2*n-2,2)*((o+1)*(2*n-2)+o)+2)/2},easeInBounce:function(n){return 1-e(1-n)},easeOutBounce:e,easeInOutBounce:function(n){return n<.5?(1-e(1-2*n))/2:(1+e(2*n-1))/2}})}); 2 | -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-As-Service-Using-AWS-EC2/static/lib/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-As-Service-Using-AWS-EC2/static/lib/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-As-Service-Using-AWS-EC2/static/lib/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-As-Service-Using-AWS-EC2/static/lib/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-As-Service-Using-AWS-EC2/static/lib/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/ionicons/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-As-Service-Using-AWS-EC2/static/lib/ionicons/fonts/ionicons.eot -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/ionicons/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-As-Service-Using-AWS-EC2/static/lib/ionicons/fonts/ionicons.ttf -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/ionicons/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-As-Service-Using-AWS-EC2/static/lib/ionicons/fonts/ionicons.woff -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/jquery/jquery-migrate.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery Migrate v3.0.0 | (c) jQuery Foundation and other contributors | jquery.org/license */ 2 | "undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(a,b){"use strict";function c(c){var d=b.console;e[c]||(e[c]=!0,a.migrateWarnings.push(c),d&&d.warn&&!a.migrateMute&&(d.warn("JQMIGRATE: "+c),a.migrateTrace&&d.trace&&d.trace()))}function d(a,b,d,e){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return c(e),d}})}a.migrateVersion="3.0.0",function(){var c=b.console&&b.console.log&&function(){b.console.log.apply(b.console,arguments)},d=/^[12]\./;c&&(a&&!d.test(a.fn.jquery)||c("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),a.migrateWarnings&&c("JQMIGRATE: Migrate plugin loaded multiple times"),c("JQMIGRATE: Migrate is installed"+(a.migrateMute?"":" with logging active")+", version "+a.migrateVersion))}();var e={};a.migrateWarnings=[],void 0===a.migrateTrace&&(a.migrateTrace=!0),a.migrateReset=function(){e={},a.migrateWarnings.length=0},"BackCompat"===document.compatMode&&c("jQuery is not compatible with Quirks Mode");var f=a.fn.init,g=a.isNumeric,h=a.find,i=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,j=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g;a.fn.init=function(a){var b=Array.prototype.slice.call(arguments);return"string"==typeof a&&"#"===a&&(c("jQuery( '#' ) is not a valid selector"),b[0]=[]),f.apply(this,b)},a.fn.init.prototype=a.fn,a.find=function(a){var b=Array.prototype.slice.call(arguments);if("string"==typeof a&&i.test(a))try{document.querySelector(a)}catch(d){a=a.replace(j,function(a,b,c,d){return"["+b+c+'"'+d+'"]'});try{document.querySelector(a),c("Attribute selector with '#' must be quoted: "+b[0]),b[0]=a}catch(e){c("Attribute selector with '#' was not fixed: "+b[0])}}return h.apply(this,b)};var k;for(k in h)Object.prototype.hasOwnProperty.call(h,k)&&(a.find[k]=h[k]);a.fn.size=function(){return c("jQuery.fn.size() is deprecated; use the .length property"),this.length},a.parseJSON=function(){return c("jQuery.parseJSON is deprecated; use JSON.parse"),JSON.parse.apply(null,arguments)},a.isNumeric=function(b){function d(b){var c=b&&b.toString();return!a.isArray(b)&&c-parseFloat(c)+1>=0}var e=g(b),f=d(b);return e!==f&&c("jQuery.isNumeric() should not be called on constructed objects"),f},d(a,"unique",a.uniqueSort,"jQuery.unique is deprecated, use jQuery.uniqueSort"),d(a.expr,"filters",a.expr.pseudos,"jQuery.expr.filters is now jQuery.expr.pseudos"),d(a.expr,":",a.expr.pseudos,'jQuery.expr[":"] is now jQuery.expr.pseudos');var l=a.ajax;a.ajax=function(){var a=l.apply(this,arguments);return a.promise&&(d(a,"success",a.done,"jQXHR.success is deprecated and removed"),d(a,"error",a.fail,"jQXHR.error is deprecated and removed"),d(a,"complete",a.always,"jQXHR.complete is deprecated and removed")),a};var m=a.fn.removeAttr,n=a.fn.toggleClass,o=/\S+/g;a.fn.removeAttr=function(b){var d=this;return a.each(b.match(o),function(b,e){a.expr.match.bool.test(e)&&(c("jQuery.fn.removeAttr no longer sets boolean properties: "+e),d.prop(e,!1))}),m.apply(this,arguments)},a.fn.toggleClass=function(b){return void 0!==b&&"boolean"!=typeof b?n.apply(this,arguments):(c("jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var c=this.getAttribute&&this.getAttribute("class")||"";c&&a.data(this,"__className__",c),this.setAttribute&&this.setAttribute("class",c||b===!1?"":a.data(this,"__className__")||"")}))};var p=!1;a.swap&&a.each(["height","width","reliableMarginRight"],function(b,c){var d=a.cssHooks[c]&&a.cssHooks[c].get;d&&(a.cssHooks[c].get=function(){var a;return p=!0,a=d.apply(this,arguments),p=!1,a})}),a.swap=function(a,b,d,e){var f,g,h={};p||c("jQuery.swap() is undocumented and deprecated");for(g in b)h[g]=a.style[g],a.style[g]=b[g];f=d.apply(a,e||[]);for(g in b)a.style[g]=h[g];return f};var q=a.data;a.data=function(b,d,e){var f;return d&&d!==a.camelCase(d)&&(f=a.hasData(b)&&q.call(this,b),f&&d in f)?(c("jQuery.data() always sets/gets camelCased names: "+d),arguments.length>2&&(f[d]=e),f[d]):q.apply(this,arguments)};var r=a.Tween.prototype.run;a.Tween.prototype.run=function(b){a.easing[this.easing].length>1&&(c('easing function "jQuery.easing.'+this.easing.toString()+'" should use only first argument'),a.easing[this.easing]=a.easing[this.easing].bind(a.easing,b,this.options.duration*b,0,1,this.options.duration)),r.apply(this,arguments)};var s=a.fn.load,t=a.event.fix;a.event.props=[],a.event.fixHooks={},a.event.fix=function(b){var d,e=b.type,f=this.fixHooks[e],g=a.event.props;if(g.length)for(c("jQuery.event.props are deprecated and removed: "+g.join());g.length;)a.event.addProp(g.pop());if(f&&!f._migrated_&&(f._migrated_=!0,c("jQuery.event.fixHooks are deprecated and removed: "+e),(g=f.props)&&g.length))for(;g.length;)a.event.addProp(g.pop());return d=t.call(this,b),f&&f.filter?f.filter(d,b):d},a.each(["load","unload","error"],function(b,d){a.fn[d]=function(){var a=Array.prototype.slice.call(arguments,0);return"load"===d&&"string"==typeof a[0]?s.apply(this,a):(c("jQuery.fn."+d+"() is deprecated"),a.splice(0,0,d),arguments.length?this.on.apply(this,a):(this.triggerHandler.apply(this,a),this))}}),a(function(){a(document).triggerHandler("ready")}),a.event.special.ready={setup:function(){this===document&&c("'ready' event is deprecated")}},a.fn.extend({bind:function(a,b,d){return c("jQuery.fn.bind() is deprecated"),this.on(a,null,b,d)},unbind:function(a,b){return c("jQuery.fn.unbind() is deprecated"),this.off(a,null,b)},delegate:function(a,b,d,e){return c("jQuery.fn.delegate() is deprecated"),this.on(b,a,d,e)},undelegate:function(a,b,d){return c("jQuery.fn.undelegate() is deprecated"),1===arguments.length?this.off(a,"**"):this.off(b,a||"**",d)}});var u=a.fn.offset;a.fn.offset=function(){var b,d=this[0],e={top:0,left:0};return d&&d.nodeType?(b=(d.ownerDocument||document).documentElement,a.contains(b,d)?u.apply(this,arguments):(c("jQuery.fn.offset() requires an element connected to a document"),e)):(c("jQuery.fn.offset() requires a valid DOM element"),e)};var v=a.param;a.param=function(b,d){var e=a.ajaxSettings&&a.ajaxSettings.traditional;return void 0===d&&e&&(c("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),d=e),v.call(this,b,d)};var w=a.fn.andSelf||a.fn.addBack;a.fn.andSelf=function(){return c("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)};var x=a.Deferred,y=[["resolve","done",a.Callbacks("once memory"),a.Callbacks("once memory"),"resolved"],["reject","fail",a.Callbacks("once memory"),a.Callbacks("once memory"),"rejected"],["notify","progress",a.Callbacks("memory"),a.Callbacks("memory")]];a.Deferred=function(b){var d=x(),e=d.promise();return d.pipe=e.pipe=function(){var b=arguments;return c("deferred.pipe() is deprecated"),a.Deferred(function(c){a.each(y,function(f,g){var h=a.isFunction(b[f])&&b[f];d[g[1]](function(){var b=h&&h.apply(this,arguments);b&&a.isFunction(b.promise)?b.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g[0]+"With"](this===e?c.promise():this,h?[b]:arguments)})}),b=null}).promise()},b&&b.call(d,d),d}}(jQuery,window); -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/owlcarousel/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Owl 2 | Modified work Copyright 2016-2018 David Deutsch 3 | 4 | Permission is hereby granted, free of charge, to any person 5 | obtaining a copy of this software and associated documentation 6 | files (the "Software"), to deal in the Software without 7 | restriction, including without limitation the rights to use, 8 | copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the 10 | Software is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/owlcarousel/README.md: -------------------------------------------------------------------------------- 1 | # Owl Carousel 2 2 | 3 | Touch enabled [jQuery](https://jquery.com/) plugin that lets you create a beautiful, responsive carousel slider. **To get started, check out https://owlcarousel2.github.io/OwlCarousel2/.** 4 | 5 | ## Quick start 6 | 7 | ### Install 8 | 9 | This package can be installed with: 10 | 11 | - [npm](https://www.npmjs.com/package/owl.carousel): `npm install --save owl.carousel` or `yarn add owl.carousel jquery` 12 | - [bower](http://bower.io/search/?q=owl.carousel): `bower install --save owl.carousel` 13 | 14 | Or download the [latest release](https://github.com/OwlCarousel2/OwlCarousel2/releases). 15 | 16 | ### Load 17 | 18 | #### Webpack 19 | 20 | Add jQuery via the "webpack.ProvidePlugin" to your webpack configuration: 21 | 22 | const webpack = require('webpack'); 23 | 24 | //... 25 | plugins: [ 26 | new webpack.ProvidePlugin({ 27 | $: 'jquery', 28 | jQuery: 'jquery', 29 | 'window.jQuery': 'jquery' 30 | }), 31 | ], 32 | //... 33 | 34 | Load the required stylesheet and JS: 35 | 36 | ```js 37 | import 'owl.carousel/dist/assets/owl.carousel.css'; 38 | import 'owl.carousel'; 39 | ``` 40 | 41 | #### Static HTML 42 | 43 | Put the required stylesheet at the [top](https://developer.yahoo.com/performance/rules.html#css_top) of your markup: 44 | 45 | ```html 46 | 47 | ``` 48 | 49 | ```html 50 | 51 | ``` 52 | 53 | **NOTE:** If you want to use the default navigation styles, you will also need to include `owl.theme.default.css`. 54 | 55 | 56 | Put the script at the [bottom](https://developer.yahoo.com/performance/rules.html#js_bottom) of your markup right after jQuery: 57 | 58 | ```html 59 | 60 | 61 | ``` 62 | 63 | ```html 64 | 65 | 66 | ``` 67 | 68 | ### Usage 69 | 70 | Wrap your items (`div`, `a`, `img`, `span`, `li` etc.) with a container element (`div`, `ul` etc.). Only the class `owl-carousel` is mandatory to apply proper styles: 71 | 72 | ```html 73 | 82 | ``` 83 | **NOTE:** The `owl-theme` class is optional, but without it, you will need to style navigation features on your own. 84 | 85 | 86 | Call the [plugin](https://learn.jquery.com/plugins/) function and your carousel is ready. 87 | 88 | ```javascript 89 | $(document).ready(function(){ 90 | $('.owl-carousel').owlCarousel(); 91 | }); 92 | ``` 93 | 94 | ## Documentation 95 | 96 | The documentation, included in this repo in the root directory, is built with [Assemble](http://assemble.io/) and publicly available at https://owlcarousel2.github.io/OwlCarousel2/. The documentation may also be run locally. 97 | 98 | ## Building 99 | 100 | This package comes with [Grunt](http://gruntjs.com/) and [Bower](http://bower.io/). The following tasks are available: 101 | 102 | * `default` compiles the CSS and JS into `/dist` and builds the doc. 103 | * `dist` compiles the CSS and JS into `/dist` only. 104 | * `watch` watches source files and builds them automatically whenever you save. 105 | * `test` runs [JSHint](http://www.jshint.com/) and [QUnit](http://qunitjs.com/) tests headlessly in [PhantomJS](http://phantomjs.org/). 106 | 107 | To define which plugins are build into the distribution just edit `/_config.json` to fit your needs. 108 | 109 | ## Contributing 110 | 111 | Please read [CONTRIBUTING.md](CONTRIBUTING.md). 112 | 113 | ## Roadmap 114 | 115 | Please make sure to check out our [Roadmap Discussion](https://github.com/OwlCarousel2/OwlCarousel2/issues/1756). 116 | 117 | 118 | ## License 119 | 120 | The code and the documentation are released under the [MIT License](LICENSE). 121 | -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/owlcarousel/assets/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-As-Service-Using-AWS-EC2/static/lib/owlcarousel/assets/ajax-loader.gif -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/owlcarousel/assets/owl.carousel.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.2 3 | * Copyright 2013-2018 David Deutsch 4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 5 | */ 6 | /* 7 | * Owl Carousel - Core 8 | */ 9 | .owl-carousel { 10 | display: none; 11 | width: 100%; 12 | -webkit-tap-highlight-color: transparent; 13 | /* position relative and z-index fix webkit rendering fonts issue */ 14 | position: relative; 15 | z-index: 1; } 16 | .owl-carousel .owl-stage { 17 | position: relative; 18 | -ms-touch-action: pan-Y; 19 | touch-action: manipulation; 20 | -moz-backface-visibility: hidden; 21 | /* fix firefox animation glitch */ } 22 | .owl-carousel .owl-stage:after { 23 | content: "."; 24 | display: block; 25 | clear: both; 26 | visibility: hidden; 27 | line-height: 0; 28 | height: 0; } 29 | .owl-carousel .owl-stage-outer { 30 | position: relative; 31 | overflow: hidden; 32 | /* fix for flashing background */ 33 | -webkit-transform: translate3d(0px, 0px, 0px); } 34 | .owl-carousel .owl-wrapper, 35 | .owl-carousel .owl-item { 36 | -webkit-backface-visibility: hidden; 37 | -moz-backface-visibility: hidden; 38 | -ms-backface-visibility: hidden; 39 | -webkit-transform: translate3d(0, 0, 0); 40 | -moz-transform: translate3d(0, 0, 0); 41 | -ms-transform: translate3d(0, 0, 0); } 42 | .owl-carousel .owl-item { 43 | position: relative; 44 | min-height: 1px; 45 | float: left; 46 | -webkit-backface-visibility: hidden; 47 | -webkit-tap-highlight-color: transparent; 48 | -webkit-touch-callout: none; } 49 | .owl-carousel .owl-item img { 50 | display: block; 51 | width: 100%; } 52 | .owl-carousel .owl-nav.disabled, 53 | .owl-carousel .owl-dots.disabled { 54 | display: none; } 55 | .owl-carousel .owl-nav .owl-prev, 56 | .owl-carousel .owl-nav .owl-next, 57 | .owl-carousel .owl-dot { 58 | cursor: pointer; 59 | cursor: hand; 60 | -webkit-user-select: none; 61 | -khtml-user-select: none; 62 | -moz-user-select: none; 63 | -ms-user-select: none; 64 | user-select: none; } 65 | .owl-carousel .owl-nav button.owl-prev, 66 | .owl-carousel .owl-nav button.owl-next, 67 | .owl-carousel button.owl-dot { 68 | background: none; 69 | color: inherit; 70 | border: none; 71 | padding: 0 !important; 72 | font: inherit; } 73 | .owl-carousel.owl-loaded { 74 | display: block; } 75 | .owl-carousel.owl-loading { 76 | opacity: 0; 77 | display: block; } 78 | .owl-carousel.owl-hidden { 79 | opacity: 0; } 80 | .owl-carousel.owl-refresh .owl-item { 81 | visibility: hidden; } 82 | .owl-carousel.owl-drag .owl-item { 83 | -ms-touch-action: none; 84 | touch-action: none; 85 | -webkit-user-select: none; 86 | -moz-user-select: none; 87 | -ms-user-select: none; 88 | user-select: none; } 89 | .owl-carousel.owl-grab { 90 | cursor: move; 91 | cursor: grab; } 92 | .owl-carousel.owl-rtl { 93 | direction: rtl; } 94 | .owl-carousel.owl-rtl .owl-item { 95 | float: right; } 96 | 97 | /* No Js */ 98 | .no-js .owl-carousel { 99 | display: block; } 100 | 101 | /* 102 | * Owl Carousel - Animate Plugin 103 | */ 104 | .owl-carousel .animated { 105 | animation-duration: 1000ms; 106 | animation-fill-mode: both; } 107 | 108 | .owl-carousel .owl-animated-in { 109 | z-index: 0; } 110 | 111 | .owl-carousel .owl-animated-out { 112 | z-index: 1; } 113 | 114 | .owl-carousel .fadeOut { 115 | animation-name: fadeOut; } 116 | 117 | @keyframes fadeOut { 118 | 0% { 119 | opacity: 1; } 120 | 100% { 121 | opacity: 0; } } 122 | 123 | /* 124 | * Owl Carousel - Auto Height Plugin 125 | */ 126 | .owl-height { 127 | transition: height 500ms ease-in-out; } 128 | 129 | /* 130 | * Owl Carousel - Lazy Load Plugin 131 | */ 132 | .owl-carousel .owl-item .owl-lazy { 133 | opacity: 0; 134 | transition: opacity 400ms ease; } 135 | 136 | .owl-carousel .owl-item img.owl-lazy { 137 | transform-style: preserve-3d; } 138 | 139 | /* 140 | * Owl Carousel - Video Plugin 141 | */ 142 | .owl-carousel .owl-video-wrapper { 143 | position: relative; 144 | height: 100%; 145 | background: #000; } 146 | 147 | .owl-carousel .owl-video-play-icon { 148 | position: absolute; 149 | height: 80px; 150 | width: 80px; 151 | left: 50%; 152 | top: 50%; 153 | margin-left: -40px; 154 | margin-top: -40px; 155 | background: url("owl.video.play.png") no-repeat; 156 | cursor: pointer; 157 | z-index: 1; 158 | -webkit-backface-visibility: hidden; 159 | transition: transform 100ms ease; } 160 | 161 | .owl-carousel .owl-video-play-icon:hover { 162 | -ms-transform: scale(1.3, 1.3); 163 | transform: scale(1.3, 1.3); } 164 | 165 | .owl-carousel .owl-video-playing .owl-video-tn, 166 | .owl-carousel .owl-video-playing .owl-video-play-icon { 167 | display: none; } 168 | 169 | .owl-carousel .owl-video-tn { 170 | opacity: 0; 171 | height: 100%; 172 | background-position: center center; 173 | background-repeat: no-repeat; 174 | background-size: contain; 175 | transition: opacity 400ms ease; } 176 | 177 | .owl-carousel .owl-video-frame { 178 | position: relative; 179 | z-index: 1; 180 | height: 100%; 181 | width: 100%; } 182 | -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/owlcarousel/assets/owl.carousel.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.2 3 | * Copyright 2013-2018 David Deutsch 4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 5 | */ 6 | .owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y;touch-action:manipulation;-moz-backface-visibility:hidden}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .owl-wrapper{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;cursor:hand;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel .owl-nav button.owl-next,.owl-carousel .owl-nav button.owl-prev,.owl-carousel button.owl-dot{background:0 0;color:inherit;border:none;padding:0!important;font:inherit}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{visibility:hidden}.owl-carousel.owl-drag .owl-item{-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.owl-carousel .animated{animation-duration:1s;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{animation-name:fadeOut}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item img.owl-lazy{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%} -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/owlcarousel/assets/owl.theme.default.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.2 3 | * Copyright 2013-2018 David Deutsch 4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 5 | */ 6 | /* 7 | * Default theme - Owl Carousel CSS File 8 | */ 9 | .owl-theme .owl-nav { 10 | margin-top: 10px; 11 | text-align: center; 12 | -webkit-tap-highlight-color: transparent; } 13 | .owl-theme .owl-nav [class*='owl-'] { 14 | color: #FFF; 15 | font-size: 14px; 16 | margin: 5px; 17 | padding: 4px 7px; 18 | background: #D6D6D6; 19 | display: inline-block; 20 | cursor: pointer; 21 | border-radius: 3px; } 22 | .owl-theme .owl-nav [class*='owl-']:hover { 23 | background: #869791; 24 | color: #FFF; 25 | text-decoration: none; } 26 | .owl-theme .owl-nav .disabled { 27 | opacity: 0.5; 28 | cursor: default; } 29 | 30 | .owl-theme .owl-nav.disabled + .owl-dots { 31 | margin-top: 10px; } 32 | 33 | .owl-theme .owl-dots { 34 | text-align: center; 35 | -webkit-tap-highlight-color: transparent; } 36 | .owl-theme .owl-dots .owl-dot { 37 | display: inline-block; 38 | zoom: 1; 39 | *display: inline; } 40 | .owl-theme .owl-dots .owl-dot span { 41 | width: 10px; 42 | height: 10px; 43 | margin: 5px 7px; 44 | background: #D6D6D6; 45 | display: block; 46 | -webkit-backface-visibility: visible; 47 | transition: opacity 200ms ease; 48 | border-radius: 30px; } 49 | .owl-theme .owl-dots .owl-dot.active span, .owl-theme .owl-dots .owl-dot:hover span { 50 | background: #869791; } 51 | -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/owlcarousel/assets/owl.theme.default.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.2 3 | * Copyright 2013-2018 David Deutsch 4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 5 | */ 6 | .owl-theme .owl-dots,.owl-theme .owl-nav{text-align:center;-webkit-tap-highlight-color:transparent}.owl-theme .owl-nav{margin-top:10px}.owl-theme .owl-nav [class*=owl-]{color:#FFF;font-size:14px;margin:5px;padding:4px 7px;background:#D6D6D6;display:inline-block;cursor:pointer;border-radius:3px}.owl-theme .owl-nav [class*=owl-]:hover{background:#869791;color:#FFF;text-decoration:none}.owl-theme .owl-nav .disabled{opacity:.5;cursor:default}.owl-theme .owl-nav.disabled+.owl-dots{margin-top:10px}.owl-theme .owl-dots .owl-dot{display:inline-block;zoom:1}.owl-theme .owl-dots .owl-dot span{width:10px;height:10px;margin:5px 7px;background:#D6D6D6;display:block;-webkit-backface-visibility:visible;transition:opacity .2s ease;border-radius:30px}.owl-theme .owl-dots .owl-dot.active span,.owl-theme .owl-dots .owl-dot:hover span{background:#869791} -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/owlcarousel/assets/owl.theme.green.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.2 3 | * Copyright 2013-2018 David Deutsch 4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 5 | */ 6 | /* 7 | * Green theme - Owl Carousel CSS File 8 | */ 9 | .owl-theme .owl-nav { 10 | margin-top: 10px; 11 | text-align: center; 12 | -webkit-tap-highlight-color: transparent; } 13 | .owl-theme .owl-nav [class*='owl-'] { 14 | color: #FFF; 15 | font-size: 14px; 16 | margin: 5px; 17 | padding: 4px 7px; 18 | background: #D6D6D6; 19 | display: inline-block; 20 | cursor: pointer; 21 | border-radius: 3px; } 22 | .owl-theme .owl-nav [class*='owl-']:hover { 23 | background: #4DC7A0; 24 | color: #FFF; 25 | text-decoration: none; } 26 | .owl-theme .owl-nav .disabled { 27 | opacity: 0.5; 28 | cursor: default; } 29 | 30 | .owl-theme .owl-nav.disabled + .owl-dots { 31 | margin-top: 10px; } 32 | 33 | .owl-theme .owl-dots { 34 | text-align: center; 35 | -webkit-tap-highlight-color: transparent; } 36 | .owl-theme .owl-dots .owl-dot { 37 | display: inline-block; 38 | zoom: 1; 39 | *display: inline; } 40 | .owl-theme .owl-dots .owl-dot span { 41 | width: 10px; 42 | height: 10px; 43 | margin: 5px 7px; 44 | background: #D6D6D6; 45 | display: block; 46 | -webkit-backface-visibility: visible; 47 | transition: opacity 200ms ease; 48 | border-radius: 30px; } 49 | .owl-theme .owl-dots .owl-dot.active span, .owl-theme .owl-dots .owl-dot:hover span { 50 | background: #4DC7A0; } 51 | -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/owlcarousel/assets/owl.theme.green.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.2 3 | * Copyright 2013-2018 David Deutsch 4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 5 | */ 6 | .owl-theme .owl-dots,.owl-theme .owl-nav{text-align:center;-webkit-tap-highlight-color:transparent}.owl-theme .owl-nav{margin-top:10px}.owl-theme .owl-nav [class*=owl-]{color:#FFF;font-size:14px;margin:5px;padding:4px 7px;background:#D6D6D6;display:inline-block;cursor:pointer;border-radius:3px}.owl-theme .owl-nav [class*=owl-]:hover{background:#4DC7A0;color:#FFF;text-decoration:none}.owl-theme .owl-nav .disabled{opacity:.5;cursor:default}.owl-theme .owl-nav.disabled+.owl-dots{margin-top:10px}.owl-theme .owl-dots .owl-dot{display:inline-block;zoom:1}.owl-theme .owl-dots .owl-dot span{width:10px;height:10px;margin:5px 7px;background:#D6D6D6;display:block;-webkit-backface-visibility:visible;transition:opacity .2s ease;border-radius:30px}.owl-theme .owl-dots .owl-dot.active span,.owl-theme .owl-dots .owl-dot:hover span{background:#4DC7A0} -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/owlcarousel/assets/owl.video.play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-As-Service-Using-AWS-EC2/static/lib/owlcarousel/assets/owl.video.play.png -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/superfish/hoverIntent.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * hoverIntent v1.8.1 // 2014.08.11 // jQuery v1.9.1+ 3 | * http://briancherne.github.io/jquery-hoverIntent/ 4 | * 5 | * You may use hoverIntent under the terms of the MIT license. Basically that 6 | * means you are free to use hoverIntent as long as this header is left intact. 7 | * Copyright 2007, 2014 Brian Cherne 8 | */ 9 | 10 | /* hoverIntent is similar to jQuery's built-in "hover" method except that 11 | * instead of firing the handlerIn function immediately, hoverIntent checks 12 | * to see if the user's mouse has slowed down (beneath the sensitivity 13 | * threshold) before firing the event. The handlerOut function is only 14 | * called after a matching handlerIn. 15 | * 16 | * // basic usage ... just like .hover() 17 | * .hoverIntent( handlerIn, handlerOut ) 18 | * .hoverIntent( handlerInOut ) 19 | * 20 | * // basic usage ... with event delegation! 21 | * .hoverIntent( handlerIn, handlerOut, selector ) 22 | * .hoverIntent( handlerInOut, selector ) 23 | * 24 | * // using a basic configuration object 25 | * .hoverIntent( config ) 26 | * 27 | * @param handlerIn function OR configuration object 28 | * @param handlerOut function OR selector for delegation OR undefined 29 | * @param selector selector OR undefined 30 | * @author Brian Cherne 31 | */ 32 | 33 | ;(function(factory) { 34 | 'use strict'; 35 | if (typeof define === 'function' && define.amd) { 36 | define(['jquery'], factory); 37 | } else if (jQuery && !jQuery.fn.hoverIntent) { 38 | factory(jQuery); 39 | } 40 | })(function($) { 41 | 'use strict'; 42 | 43 | // default configuration values 44 | var _cfg = { 45 | interval: 100, 46 | sensitivity: 6, 47 | timeout: 0 48 | }; 49 | 50 | // counter used to generate an ID for each instance 51 | var INSTANCE_COUNT = 0; 52 | 53 | // current X and Y position of mouse, updated during mousemove tracking (shared across instances) 54 | var cX, cY; 55 | 56 | // saves the current pointer position coordinates based on the given mousemove event 57 | var track = function(ev) { 58 | cX = ev.pageX; 59 | cY = ev.pageY; 60 | }; 61 | 62 | // compares current and previous mouse positions 63 | var compare = function(ev,$el,s,cfg) { 64 | // compare mouse positions to see if pointer has slowed enough to trigger `over` function 65 | if ( Math.sqrt( (s.pX-cX)*(s.pX-cX) + (s.pY-cY)*(s.pY-cY) ) < cfg.sensitivity ) { 66 | $el.off(s.event,track); 67 | delete s.timeoutId; 68 | // set hoverIntent state as active for this element (permits `out` handler to trigger) 69 | s.isActive = true; 70 | // overwrite old mouseenter event coordinates with most recent pointer position 71 | ev.pageX = cX; ev.pageY = cY; 72 | // clear coordinate data from state object 73 | delete s.pX; delete s.pY; 74 | return cfg.over.apply($el[0],[ev]); 75 | } else { 76 | // set previous coordinates for next comparison 77 | s.pX = cX; s.pY = cY; 78 | // use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs) 79 | s.timeoutId = setTimeout( function(){compare(ev, $el, s, cfg);} , cfg.interval ); 80 | } 81 | }; 82 | 83 | // triggers given `out` function at configured `timeout` after a mouseleave and clears state 84 | var delay = function(ev,$el,s,out) { 85 | delete $el.data('hoverIntent')[s.id]; 86 | return out.apply($el[0],[ev]); 87 | }; 88 | 89 | $.fn.hoverIntent = function(handlerIn,handlerOut,selector) { 90 | // instance ID, used as a key to store and retrieve state information on an element 91 | var instanceId = INSTANCE_COUNT++; 92 | 93 | // extend the default configuration and parse parameters 94 | var cfg = $.extend({}, _cfg); 95 | if ( $.isPlainObject(handlerIn) ) { 96 | cfg = $.extend(cfg, handlerIn); 97 | if ( !$.isFunction(cfg.out) ) { 98 | cfg.out = cfg.over; 99 | } 100 | } else if ( $.isFunction(handlerOut) ) { 101 | cfg = $.extend(cfg, { over: handlerIn, out: handlerOut, selector: selector } ); 102 | } else { 103 | cfg = $.extend(cfg, { over: handlerIn, out: handlerIn, selector: handlerOut } ); 104 | } 105 | 106 | // A private function for handling mouse 'hovering' 107 | var handleHover = function(e) { 108 | // cloned event to pass to handlers (copy required for event object to be passed in IE) 109 | var ev = $.extend({},e); 110 | 111 | // the current target of the mouse event, wrapped in a jQuery object 112 | var $el = $(this); 113 | 114 | // read hoverIntent data from element (or initialize if not present) 115 | var hoverIntentData = $el.data('hoverIntent'); 116 | if (!hoverIntentData) { $el.data('hoverIntent', (hoverIntentData = {})); } 117 | 118 | // read per-instance state from element (or initialize if not present) 119 | var state = hoverIntentData[instanceId]; 120 | if (!state) { hoverIntentData[instanceId] = state = { id: instanceId }; } 121 | 122 | // state properties: 123 | // id = instance ID, used to clean up data 124 | // timeoutId = timeout ID, reused for tracking mouse position and delaying "out" handler 125 | // isActive = plugin state, true after `over` is called just until `out` is called 126 | // pX, pY = previously-measured pointer coordinates, updated at each polling interval 127 | // event = string representing the namespaced event used for mouse tracking 128 | 129 | // clear any existing timeout 130 | if (state.timeoutId) { state.timeoutId = clearTimeout(state.timeoutId); } 131 | 132 | // namespaced event used to register and unregister mousemove tracking 133 | var mousemove = state.event = 'mousemove.hoverIntent.hoverIntent'+instanceId; 134 | 135 | // handle the event, based on its type 136 | if (e.type === 'mouseenter') { 137 | // do nothing if already active 138 | if (state.isActive) { return; } 139 | // set "previous" X and Y position based on initial entry point 140 | state.pX = ev.pageX; state.pY = ev.pageY; 141 | // update "current" X and Y position based on mousemove 142 | $el.off(mousemove,track).on(mousemove,track); 143 | // start polling interval (self-calling timeout) to compare mouse coordinates over time 144 | state.timeoutId = setTimeout( function(){compare(ev,$el,state,cfg);} , cfg.interval ); 145 | } else { // "mouseleave" 146 | // do nothing if not already active 147 | if (!state.isActive) { return; } 148 | // unbind expensive mousemove event 149 | $el.off(mousemove,track); 150 | // if hoverIntent state is true, then call the mouseOut function after the specified delay 151 | state.timeoutId = setTimeout( function(){delay(ev,$el,state,cfg.out);} , cfg.timeout ); 152 | } 153 | }; 154 | 155 | // listen for mouseenter and mouseleave 156 | return this.on({'mouseenter.hoverIntent':handleHover,'mouseleave.hoverIntent':handleHover}, cfg.selector); 157 | }; 158 | }); 159 | -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/superfish/superfish.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery Superfish Menu Plugin - v1.7.9 3 | * Copyright (c) 2016 Joel Birch 4 | * 5 | * Dual licensed under the MIT and GPL licenses: 6 | * http://www.opensource.org/licenses/mit-license.php 7 | * http://www.gnu.org/licenses/gpl.html 8 | */ 9 | 10 | ;!function(a,b){"use strict";var c=function(){var c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",menuArrowClass:"sf-arrows"},d=function(){var b=/^(?![\w\W]*Windows Phone)[\w\W]*(iPhone|iPad|iPod)/i.test(navigator.userAgent);return b&&a("html").css("cursor","pointer").on("click",a.noop),b}(),e=function(){var a=document.documentElement.style;return"behavior"in a&&"fill"in a&&/iemobile/i.test(navigator.userAgent)}(),f=function(){return!!b.PointerEvent}(),g=function(a,b,d){var e,f=c.menuClass;b.cssArrows&&(f+=" "+c.menuArrowClass),e=d?"addClass":"removeClass",a[e](f)},h=function(b,d){return b.find("li."+d.pathClass).slice(0,d.pathLevels).addClass(d.hoverClass+" "+c.bcClass).filter(function(){return a(this).children(d.popUpSelector).hide().show().length}).removeClass(d.pathClass)},i=function(a,b){var d=b?"addClass":"removeClass";a.children("a")[d](c.anchorClass)},j=function(a){var b=a.css("ms-touch-action"),c=a.css("touch-action");c=c||b,c="pan-y"===c?"auto":"pan-y",a.css({"ms-touch-action":c,"touch-action":c})},k=function(a){return a.closest("."+c.menuClass)},l=function(a){return k(a).data("sfOptions")},m=function(){var b=a(this),c=l(b);clearTimeout(c.sfTimer),b.siblings().superfish("hide").end().superfish("show")},n=function(b){b.retainPath=a.inArray(this[0],b.$path)>-1,this.superfish("hide"),this.parents("."+b.hoverClass).length||(b.onIdle.call(k(this)),b.$path.length&&a.proxy(m,b.$path)())},o=function(){var b=a(this),c=l(b);d?a.proxy(n,b,c)():(clearTimeout(c.sfTimer),c.sfTimer=setTimeout(a.proxy(n,b,c),c.delay))},p=function(b){var c=a(this),d=l(c),e=c.siblings(b.data.popUpSelector);return d.onHandleTouch.call(e)===!1?this:void(e.length>0&&e.is(":hidden")&&(c.one("click.superfish",!1),"MSPointerDown"===b.type||"pointerdown"===b.type?c.trigger("focus"):a.proxy(m,c.parent("li"))()))},q=function(b,c){var g="li:has("+c.popUpSelector+")";a.fn.hoverIntent&&!c.disableHI?b.hoverIntent(m,o,g):b.on("mouseenter.superfish",g,m).on("mouseleave.superfish",g,o);var h="MSPointerDown.superfish";f&&(h="pointerdown.superfish"),d||(h+=" touchend.superfish"),e&&(h+=" mousedown.superfish"),b.on("focusin.superfish","li",m).on("focusout.superfish","li",o).on(h,"a",c,p)};return{hide:function(b){if(this.length){var c=this,d=l(c);if(!d)return this;var e=d.retainPath===!0?d.$path:"",f=c.find("li."+d.hoverClass).add(this).not(e).removeClass(d.hoverClass).children(d.popUpSelector),g=d.speedOut;if(b&&(f.show(),g=0),d.retainPath=!1,d.onBeforeHide.call(f)===!1)return this;f.stop(!0,!0).animate(d.animationOut,g,function(){var b=a(this);d.onHide.call(b)})}return this},show:function(){var a=l(this);if(!a)return this;var b=this.addClass(a.hoverClass),c=b.children(a.popUpSelector);return a.onBeforeShow.call(c)===!1?this:(c.stop(!0,!0).animate(a.animation,a.speed,function(){a.onShow.call(c)}),this)},destroy:function(){return this.each(function(){var b,d=a(this),e=d.data("sfOptions");return e?(b=d.find(e.popUpSelector).parent("li"),clearTimeout(e.sfTimer),g(d,e),i(b),j(d),d.off(".superfish").off(".hoverIntent"),b.children(e.popUpSelector).attr("style",function(a,b){return b.replace(/display[^;]+;?/g,"")}),e.$path.removeClass(e.hoverClass+" "+c.bcClass).addClass(e.pathClass),d.find("."+e.hoverClass).removeClass(e.hoverClass),e.onDestroy.call(d),void d.removeData("sfOptions")):!1})},init:function(b){return this.each(function(){var d=a(this);if(d.data("sfOptions"))return!1;var e=a.extend({},a.fn.superfish.defaults,b),f=d.find(e.popUpSelector).parent("li");e.$path=h(d,e),d.data("sfOptions",e),g(d,e,!0),i(f,!0),j(d),q(d,e),f.not("."+c.bcClass).superfish("hide",!0),e.onInit.call(this)})}}}();a.fn.superfish=function(b,d){return c[b]?c[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?a.error("Method "+b+" does not exist on jQuery.fn.superfish"):c.init.apply(this,arguments)},a.fn.superfish.defaults={popUpSelector:"ul,.sf-mega",hoverClass:"sfHover",pathClass:"overrideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},animationOut:{opacity:"hide"},speed:"normal",speedOut:"fast",cssArrows:!0,disableHI:!1,onInit:a.noop,onBeforeShow:a.noop,onShow:a.noop,onBeforeHide:a.noop,onHide:a.noop,onIdle:a.noop,onDestroy:a.noop,onHandleTouch:a.noop}}(jQuery,window); -------------------------------------------------------------------------------- /Deploy-As-Service-Using-AWS-EC2/static/lib/wow/wow.min.js: -------------------------------------------------------------------------------- 1 | /*! WOW wow.js - v1.3.0 - 2016-10-04 2 | * https://wowjs.uk 3 | * Copyright (c) 2016 Thomas Grainger; Licensed MIT */!function(a,b){if("function"==typeof define&&define.amd)define(["module","exports"],b);else if("undefined"!=typeof exports)b(module,exports);else{var c={exports:{}};b(c,c.exports),a.WOW=c.exports}}(this,function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){return b.indexOf(a)>=0}function e(a,b){for(var c in b)if(null==a[c]){var d=b[c];a[c]=d}return a}function f(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)}function g(a){var b=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],c=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],d=arguments.length<=3||void 0===arguments[3]?null:arguments[3],e=void 0;return null!=document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(a,b,c,d)):null!=document.createEventObject?(e=document.createEventObject(),e.eventType=a):e.eventName=a,e}function h(a,b){null!=a.dispatchEvent?a.dispatchEvent(b):b in(null!=a)?a[b]():"on"+b in(null!=a)&&a["on"+b]()}function i(a,b,c){null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c}function j(a,b,c){null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]}function k(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight}Object.defineProperty(b,"__esModule",{value:!0});var l,m,n=function(){function a(a,b){for(var c=0;c=0){var b=a.target||a.srcElement;b.className=b.className.replace(this.config.animateClass,"").trim()}}},{key:"customStyle",value:function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a}},{key:"vendorSet",value:function(a,b){for(var c in b)if(b.hasOwnProperty(c)){var d=b[c];a[""+c]=d;for(var e=0;e=e&&f>=c}},{key:"disabled",value:function(){return!this.config.mobile&&f(navigator.userAgent)}}]),a}();b["default"]=r,a.exports=b["default"]}); 4 | -------------------------------------------------------------------------------- /Deploy-as-API-using-AWS/Images/apistructure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-as-API-using-AWS/Images/apistructure.png -------------------------------------------------------------------------------- /Deploy-as-API-using-AWS/Images/authorization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-as-API-using-AWS/Images/authorization.png -------------------------------------------------------------------------------- /Deploy-as-API-using-AWS/Images/chooselamda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-as-API-using-AWS/Images/chooselamda.png -------------------------------------------------------------------------------- /Deploy-as-API-using-AWS/Images/createapi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-as-API-using-AWS/Images/createapi.png -------------------------------------------------------------------------------- /Deploy-as-API-using-AWS/Images/createresource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-as-API-using-AWS/Images/createresource.png -------------------------------------------------------------------------------- /Deploy-as-API-using-AWS/Images/datasetstructure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-as-API-using-AWS/Images/datasetstructure.png -------------------------------------------------------------------------------- /Deploy-as-API-using-AWS/Images/endpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-as-API-using-AWS/Images/endpoint.png -------------------------------------------------------------------------------- /Deploy-as-API-using-AWS/Images/environmntvariable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-as-API-using-AWS/Images/environmntvariable.png -------------------------------------------------------------------------------- /Deploy-as-API-using-AWS/Images/finalapi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-as-API-using-AWS/Images/finalapi.png -------------------------------------------------------------------------------- /Deploy-as-API-using-AWS/Images/lamba.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-as-API-using-AWS/Images/lamba.png -------------------------------------------------------------------------------- /Deploy-as-API-using-AWS/Images/main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-as-API-using-AWS/Images/main.png -------------------------------------------------------------------------------- /Deploy-as-API-using-AWS/Images/post.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-as-API-using-AWS/Images/post.png -------------------------------------------------------------------------------- /Deploy-as-API-using-AWS/Images/postmantest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-as-API-using-AWS/Images/postmantest.png -------------------------------------------------------------------------------- /Deploy-as-API-using-AWS/Images/resource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-as-API-using-AWS/Images/resource.png -------------------------------------------------------------------------------- /Deploy-as-API-using-AWS/Images/restapi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-as-API-using-AWS/Images/restapi.png -------------------------------------------------------------------------------- /Deploy-as-API-using-AWS/Images/stage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Deploy-as-API-using-AWS/Images/stage.png -------------------------------------------------------------------------------- /Deploy-as-API-using-AWS/Readme.md: -------------------------------------------------------------------------------- 1 |

Deploying Machine Learning Models as API using AWS

2 | 3 | > As a machine learning practitioner, I used to build models. But just building models is never sufficient for real-time products. ML models need to be integrated with web or mobile applications. One of the best ways to solve this problem is by deploying the model as API and inferencing the results whenever required. 4 | 5 |

Architecture

6 | 7 | 8 |

Workflow  :  The client sends a request to the API. API trigger is added to the Lambda function which results in invoking the SageMaker endpoint and returning predictions back to the client through API.

9 | 10 | > Check out our article for detailed explanation. 11 | 12 | Deploying Machine Learning Models as API using AWS 14 | 15 | 16 |

Thank You

17 | -------------------------------------------------------------------------------- /Deploy-as-API-using-AWS/iris.csv: -------------------------------------------------------------------------------- 1 | "sepal.length","sepal.width","petal.length","petal.width","variety" 2 | 5.1,3.5,1.4,.2,"Setosa" 3 | 4.9,3,1.4,.2,"Setosa" 4 | 4.7,3.2,1.3,.2,"Setosa" 5 | 4.6,3.1,1.5,.2,"Setosa" 6 | 5,3.6,1.4,.2,"Setosa" 7 | 5.4,3.9,1.7,.4,"Setosa" 8 | 4.6,3.4,1.4,.3,"Setosa" 9 | 5,3.4,1.5,.2,"Setosa" 10 | 4.4,2.9,1.4,.2,"Setosa" 11 | 4.9,3.1,1.5,.1,"Setosa" 12 | 5.4,3.7,1.5,.2,"Setosa" 13 | 4.8,3.4,1.6,.2,"Setosa" 14 | 4.8,3,1.4,.1,"Setosa" 15 | 4.3,3,1.1,.1,"Setosa" 16 | 5.8,4,1.2,.2,"Setosa" 17 | 5.7,4.4,1.5,.4,"Setosa" 18 | 5.4,3.9,1.3,.4,"Setosa" 19 | 5.1,3.5,1.4,.3,"Setosa" 20 | 5.7,3.8,1.7,.3,"Setosa" 21 | 5.1,3.8,1.5,.3,"Setosa" 22 | 5.4,3.4,1.7,.2,"Setosa" 23 | 5.1,3.7,1.5,.4,"Setosa" 24 | 4.6,3.6,1,.2,"Setosa" 25 | 5.1,3.3,1.7,.5,"Setosa" 26 | 4.8,3.4,1.9,.2,"Setosa" 27 | 5,3,1.6,.2,"Setosa" 28 | 5,3.4,1.6,.4,"Setosa" 29 | 5.2,3.5,1.5,.2,"Setosa" 30 | 5.2,3.4,1.4,.2,"Setosa" 31 | 4.7,3.2,1.6,.2,"Setosa" 32 | 4.8,3.1,1.6,.2,"Setosa" 33 | 5.4,3.4,1.5,.4,"Setosa" 34 | 5.2,4.1,1.5,.1,"Setosa" 35 | 5.5,4.2,1.4,.2,"Setosa" 36 | 4.9,3.1,1.5,.2,"Setosa" 37 | 5,3.2,1.2,.2,"Setosa" 38 | 5.5,3.5,1.3,.2,"Setosa" 39 | 4.9,3.6,1.4,.1,"Setosa" 40 | 4.4,3,1.3,.2,"Setosa" 41 | 5.1,3.4,1.5,.2,"Setosa" 42 | 5,3.5,1.3,.3,"Setosa" 43 | 4.5,2.3,1.3,.3,"Setosa" 44 | 4.4,3.2,1.3,.2,"Setosa" 45 | 5,3.5,1.6,.6,"Setosa" 46 | 5.1,3.8,1.9,.4,"Setosa" 47 | 4.8,3,1.4,.3,"Setosa" 48 | 5.1,3.8,1.6,.2,"Setosa" 49 | 4.6,3.2,1.4,.2,"Setosa" 50 | 5.3,3.7,1.5,.2,"Setosa" 51 | 5,3.3,1.4,.2,"Setosa" 52 | 7,3.2,4.7,1.4,"Versicolor" 53 | 6.4,3.2,4.5,1.5,"Versicolor" 54 | 6.9,3.1,4.9,1.5,"Versicolor" 55 | 5.5,2.3,4,1.3,"Versicolor" 56 | 6.5,2.8,4.6,1.5,"Versicolor" 57 | 5.7,2.8,4.5,1.3,"Versicolor" 58 | 6.3,3.3,4.7,1.6,"Versicolor" 59 | 4.9,2.4,3.3,1,"Versicolor" 60 | 6.6,2.9,4.6,1.3,"Versicolor" 61 | 5.2,2.7,3.9,1.4,"Versicolor" 62 | 5,2,3.5,1,"Versicolor" 63 | 5.9,3,4.2,1.5,"Versicolor" 64 | 6,2.2,4,1,"Versicolor" 65 | 6.1,2.9,4.7,1.4,"Versicolor" 66 | 5.6,2.9,3.6,1.3,"Versicolor" 67 | 6.7,3.1,4.4,1.4,"Versicolor" 68 | 5.6,3,4.5,1.5,"Versicolor" 69 | 5.8,2.7,4.1,1,"Versicolor" 70 | 6.2,2.2,4.5,1.5,"Versicolor" 71 | 5.6,2.5,3.9,1.1,"Versicolor" 72 | 5.9,3.2,4.8,1.8,"Versicolor" 73 | 6.1,2.8,4,1.3,"Versicolor" 74 | 6.3,2.5,4.9,1.5,"Versicolor" 75 | 6.1,2.8,4.7,1.2,"Versicolor" 76 | 6.4,2.9,4.3,1.3,"Versicolor" 77 | 6.6,3,4.4,1.4,"Versicolor" 78 | 6.8,2.8,4.8,1.4,"Versicolor" 79 | 6.7,3,5,1.7,"Versicolor" 80 | 6,2.9,4.5,1.5,"Versicolor" 81 | 5.7,2.6,3.5,1,"Versicolor" 82 | 5.5,2.4,3.8,1.1,"Versicolor" 83 | 5.5,2.4,3.7,1,"Versicolor" 84 | 5.8,2.7,3.9,1.2,"Versicolor" 85 | 6,2.7,5.1,1.6,"Versicolor" 86 | 5.4,3,4.5,1.5,"Versicolor" 87 | 6,3.4,4.5,1.6,"Versicolor" 88 | 6.7,3.1,4.7,1.5,"Versicolor" 89 | 6.3,2.3,4.4,1.3,"Versicolor" 90 | 5.6,3,4.1,1.3,"Versicolor" 91 | 5.5,2.5,4,1.3,"Versicolor" 92 | 5.5,2.6,4.4,1.2,"Versicolor" 93 | 6.1,3,4.6,1.4,"Versicolor" 94 | 5.8,2.6,4,1.2,"Versicolor" 95 | 5,2.3,3.3,1,"Versicolor" 96 | 5.6,2.7,4.2,1.3,"Versicolor" 97 | 5.7,3,4.2,1.2,"Versicolor" 98 | 5.7,2.9,4.2,1.3,"Versicolor" 99 | 6.2,2.9,4.3,1.3,"Versicolor" 100 | 5.1,2.5,3,1.1,"Versicolor" 101 | 5.7,2.8,4.1,1.3,"Versicolor" 102 | 6.3,3.3,6,2.5,"Virginica" 103 | 5.8,2.7,5.1,1.9,"Virginica" 104 | 7.1,3,5.9,2.1,"Virginica" 105 | 6.3,2.9,5.6,1.8,"Virginica" 106 | 6.5,3,5.8,2.2,"Virginica" 107 | 7.6,3,6.6,2.1,"Virginica" 108 | 4.9,2.5,4.5,1.7,"Virginica" 109 | 7.3,2.9,6.3,1.8,"Virginica" 110 | 6.7,2.5,5.8,1.8,"Virginica" 111 | 7.2,3.6,6.1,2.5,"Virginica" 112 | 6.5,3.2,5.1,2,"Virginica" 113 | 6.4,2.7,5.3,1.9,"Virginica" 114 | 6.8,3,5.5,2.1,"Virginica" 115 | 5.7,2.5,5,2,"Virginica" 116 | 5.8,2.8,5.1,2.4,"Virginica" 117 | 6.4,3.2,5.3,2.3,"Virginica" 118 | 6.5,3,5.5,1.8,"Virginica" 119 | 7.7,3.8,6.7,2.2,"Virginica" 120 | 7.7,2.6,6.9,2.3,"Virginica" 121 | 6,2.2,5,1.5,"Virginica" 122 | 6.9,3.2,5.7,2.3,"Virginica" 123 | 5.6,2.8,4.9,2,"Virginica" 124 | 7.7,2.8,6.7,2,"Virginica" 125 | 6.3,2.7,4.9,1.8,"Virginica" 126 | 6.7,3.3,5.7,2.1,"Virginica" 127 | 7.2,3.2,6,1.8,"Virginica" 128 | 6.2,2.8,4.8,1.8,"Virginica" 129 | 6.1,3,4.9,1.8,"Virginica" 130 | 6.4,2.8,5.6,2.1,"Virginica" 131 | 7.2,3,5.8,1.6,"Virginica" 132 | 7.4,2.8,6.1,1.9,"Virginica" 133 | 7.9,3.8,6.4,2,"Virginica" 134 | 6.4,2.8,5.6,2.2,"Virginica" 135 | 6.3,2.8,5.1,1.5,"Virginica" 136 | 6.1,2.6,5.6,1.4,"Virginica" 137 | 7.7,3,6.1,2.3,"Virginica" 138 | 6.3,3.4,5.6,2.4,"Virginica" 139 | 6.4,3.1,5.5,1.8,"Virginica" 140 | 6,3,4.8,1.8,"Virginica" 141 | 6.9,3.1,5.4,2.1,"Virginica" 142 | 6.7,3.1,5.6,2.4,"Virginica" 143 | 6.9,3.1,5.1,2.3,"Virginica" 144 | 5.8,2.7,5.1,1.9,"Virginica" 145 | 6.8,3.2,5.9,2.3,"Virginica" 146 | 6.7,3.3,5.7,2.5,"Virginica" 147 | 6.7,3,5.2,2.3,"Virginica" 148 | 6.3,2.5,5,1.9,"Virginica" 149 | 6.5,3,5.2,2,"Virginica" 150 | 6.2,3.4,5.4,2.3,"Virginica" 151 | 5.9,3,5.1,1.8,"Virginica" -------------------------------------------------------------------------------- /Deploy-as-API-using-AWS/lambda_function.py: -------------------------------------------------------------------------------- 1 | import os 2 | import io 3 | import boto3 4 | import json 5 | import csv 6 | 7 | # grab environment variables 8 | ENDPOINT_NAME = os.environ['ENDPOINT_NAME'] 9 | runtime= boto3.client('runtime.sagemaker') 10 | 11 | def lambda_handler(event, context): 12 | print("Received event: " + json.dumps(event, indent=2)) 13 | 14 | data = json.loads(json.dumps(event)) 15 | payload = data['data'] 16 | print(payload) 17 | response = runtime.invoke_endpoint(EndpointName=ENDPOINT_NAME, 18 | ContentType='text/csv',Body=payload) 19 | result = json.loads(response['Body'].read().decode()) 20 | if(result==0): 21 | result="Setosa" 22 | elif(result=="1"): 23 | result="Versicolor" 24 | else: 25 | result="Virginica" 26 | return result 27 | 28 | 29 | -------------------------------------------------------------------------------- /DeployDockerimage - GitHub Actions/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.7-slim 2 | 3 | WORKDIR /app 4 | 5 | ADD . /app 6 | 7 | RUN pip install --trusted-host pypi.python.org -r requirements.txt 8 | 9 | EXPOSE 8080 10 | 11 | # execute the Flask app 12 | ENTRYPOINT ["python"] 13 | HEALTHCHECK CMD curl --fail http://localhost:8080/ || exit 1 14 | CMD ["/app/app.py"] 15 | -------------------------------------------------------------------------------- /DeployDockerimage - GitHub Actions/README.md: -------------------------------------------------------------------------------- 1 | # GitHub Actions — Makes "One Click To Deploy" Feasible For ML CI/CD Pipeline 2 | 3 | Status of the worflow: ![Pipeline](https://github.com/developers-cosmos/ML-CICD-GitHubActions/workflows/Pipeline/badge.svg?branch=master) 4 | 5 | What if I told you “You can automate the process of building, testing, delivering, or deploying your Machine Learning models into production”?

6 | The world’s most popular hosted repository service, GitHub is providing an integrated way to design and develop our workflows by automating the tasks through GitHub Actions. With Actions, the events that take place in our GitHub repository like pushes, pull requests, releases, etc. are used as triggers to kick-off the workflows.

7 | Check out our article for complete information on [how to setup your workflows using GitHub Actions](https://towardsdatascience.com/github-actions-makes-one-click-to-deploy-feasible-for-ml-ci-cd-pipeline-61470ed3edbc?source=friends_link&sk=a90e087d2e25ce614973f1b1075a4439) 8 |


9 | 10 | 11 | -------------------------------------------------------------------------------- /DeployDockerimage - GitHub Actions/app.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """ 3 | A ML APPlication which predicts the profit of a StartUp based on certain features. 4 | 5 | """ 6 | import pickle 7 | import numpy as np 8 | import pandas as pd 9 | from flask import Flask, request, render_template 10 | 11 | 12 | APP = Flask(__name__,template_folder='templates') 13 | MODEL = pickle.load(open('model.pkl', 'rb')) 14 | 15 | 16 | @APP.route('/') 17 | def home(): 18 | ''' 19 | Rendering Home Page 20 | ''' 21 | return render_template('index.html') 22 | 23 | 24 | @APP.route('/predict',methods=['POST']) 25 | def predict(): 26 | ''' 27 | For rendering results on HTML GUI 28 | ''' 29 | features = [x for x in request.form.values()] 30 | final_features = [np.array(features)] 31 | column_names = ['R&D Spend', 'Administration', 'Marketing Spend', 'State'] 32 | final_features = pd.DataFrame(final_features,columns=column_names) 33 | prediction = MODEL.predict(final_features) 34 | temp = 0.0 35 | for i in prediction: 36 | for j in i: 37 | temp = j 38 | return render_template('index.html', prediction_text='${}'.format(temp)) 39 | 40 | 41 | if __name__ == '__main__': 42 | APP.run(host='0.0.0.0',port=8080) 43 | -------------------------------------------------------------------------------- /DeployDockerimage - GitHub Actions/model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployDockerimage - GitHub Actions/model.pkl -------------------------------------------------------------------------------- /DeployDockerimage - GitHub Actions/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask 2 | numpy 3 | scipy 4 | scikit-learn 5 | pandas 6 | flake8 7 | pip 8 | pylint 9 | pytest 10 | pytest-flask 11 | -------------------------------------------------------------------------------- /DeployDockerimage - GitHub Actions/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | GitHub Actions 4 | 5 | 6 |
7 | 8 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /DeployDockerimage - GitHub Actions/test_app.py: -------------------------------------------------------------------------------- 1 | '''A module for testing''' 2 | import unittest 3 | from app import APP 4 | 5 | 6 | class Tests(unittest.TestCase): 7 | '''Basic tests for the application''' 8 | def setUp(self): 9 | '''Create a test client for the app''' 10 | self.app = APP.test_client() 11 | 12 | def test_200(self): 13 | '''test_200: a request for / shall return 200 OK''' 14 | res = self.app.get('/') 15 | assert res.status == '200 OK' 16 | 17 | def test_404(self): 18 | '''test_404: a request for null shall return 404 NOT FOUND''' 19 | res = self.app.get('/null') 20 | assert res.status == '404 NOT FOUND' 21 | 22 | 23 | if __name__ == "__main__": 24 | unittest.main() 25 | -------------------------------------------------------------------------------- /DeployFlaskAzure/50_Startups.csv: -------------------------------------------------------------------------------- 1 | R&DSpend,Administration,MarketingSpend,State,Profit 2 | 165349.2,136897.8,471784.1,New York,192261.83 3 | 162597.7,151377.59,443898.53,California,191792.06 4 | 153441.51,101145.55,407934.54,Florida,191050.39 5 | 144372.41,118671.85,383199.62,New York,182901.99 6 | 142107.34,91391.77,366168.42,Florida,166187.94 7 | 131876.9,99814.71,362861.36,New York,156991.12 8 | 134615.46,147198.87,127716.82,California,156122.51 9 | 130298.13,145530.06,323876.68,Florida,155752.6 10 | 120542.52,148718.95,311613.29,New York,152211.77 11 | 123334.88,108679.17,304981.62,California,149759.96 12 | 101913.08,110594.11,229160.95,Florida,146121.95 13 | 100671.96,91790.61,249744.55,California,144259.4 14 | 93863.75,127320.38,249839.44,Florida,141585.52 15 | 91992.39,135495.07,252664.93,California,134307.35 16 | 119943.24,156547.42,256512.92,Florida,132602.65 17 | 114523.61,122616.84,261776.23,New York,129917.04 18 | 78013.11,121597.55,264346.06,California,126992.93 19 | 94657.16,145077.58,282574.31,New York,125370.37 20 | 91749.16,114175.79,294919.57,Florida,124266.9 21 | 86419.7,153514.11,0,New York,122776.86 22 | 76253.86,113867.3,298664.47,California,118474.03 23 | 78389.47,153773.43,299737.29,New York,111313.02 24 | 73994.56,122782.75,303319.26,Florida,110352.25 25 | 67532.53,105751.03,304768.73,Florida,108733.99 26 | 77044.01,99281.34,140574.81,New York,108552.04 27 | 64664.71,139553.16,137962.62,California,107404.34 28 | 75328.87,144135.98,134050.07,Florida,105733.54 29 | 72107.6,127864.55,353183.81,New York,105008.31 30 | 66051.52,182645.56,118148.2,Florida,103282.38 31 | 65605.48,153032.06,107138.38,New York,101004.64 32 | 61994.48,115641.28,91131.24,Florida,99937.59 33 | 61136.38,152701.92,88218.23,New York,97483.56 34 | 63408.86,129219.61,46085.25,California,97427.84 35 | 55493.95,103057.49,214634.81,Florida,96778.92 36 | 46426.07,157693.92,210797.67,California,96712.8 37 | 46014.02,85047.44,205517.64,New York,96479.51 38 | 28663.76,127056.21,201126.82,Florida,90708.19 39 | 44069.95,51283.14,197029.42,California,89949.14 40 | 20229.59,65947.93,185265.1,New York,81229.06 41 | 38558.51,82982.09,174999.3,California,81005.76 42 | 28754.33,118546.05,172795.67,California,78239.91 43 | 27892.92,84710.77,164470.71,Florida,77798.83 44 | 23640.93,96189.63,148001.11,California,71498.49 45 | 15505.73,127382.3,35534.17,New York,69758.98 46 | 22177.74,154806.14,28334.72,California,65200.33 47 | 1000.23,124153.04,1903.93,New York,64926.08 48 | 1315.46,115816.21,297114.46,Florida,49490.75 49 | 0,135426.92,0,California,42559.73 50 | 542.05,51743.15,0,New York,35673.41 51 | 0,116983.8,45173.06,California,14681.4 -------------------------------------------------------------------------------- /DeployFlaskAzure/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.7-slim 2 | 3 | WORKDIR /app 4 | 5 | ADD . /app 6 | 7 | RUN pip install --trusted-host pypi.python.org -r requirements.txt 8 | 9 | EXPOSE 5000 10 | 11 | ENV NAME OpentoAll 12 | 13 | CMD ["python","app.py"] 14 | -------------------------------------------------------------------------------- /DeployFlaskAzure/Images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/Images/1.png -------------------------------------------------------------------------------- /DeployFlaskAzure/Images/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/Images/2.png -------------------------------------------------------------------------------- /DeployFlaskAzure/Images/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/Images/3.png -------------------------------------------------------------------------------- /DeployFlaskAzure/Images/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/Images/4.png -------------------------------------------------------------------------------- /DeployFlaskAzure/Images/index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/Images/index.png -------------------------------------------------------------------------------- /DeployFlaskAzure/Model.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "import numpy as np\n", 10 | "import pandas as pd\n", 11 | "import matplotlib.pyplot as plt\n", 12 | "import seaborn as sns\n", 13 | "from sklearn.model_selection import train_test_split\n", 14 | "from sklearn.linear_model import LinearRegression\n", 15 | "import pickle\n" 16 | ] 17 | }, 18 | { 19 | "cell_type": "code", 20 | "execution_count": 2, 21 | "metadata": {}, 22 | "outputs": [ 23 | { 24 | "name": "stdout", 25 | "output_type": "stream", 26 | "text": [ 27 | "Index(['R&DSpend', 'Administration', 'MarketingSpend', 'State', 'Profit'], dtype='object')\n" 28 | ] 29 | } 30 | ], 31 | "source": [ 32 | "dataset = pd.read_csv(\"50_Startups.csv\")\n", 33 | "print(dataset.columns)\n" 34 | ] 35 | }, 36 | { 37 | "cell_type": "code", 38 | "execution_count": 8, 39 | "metadata": {}, 40 | "outputs": [], 41 | "source": [ 42 | "x=dataset.iloc[:,:4]\n", 43 | "y=dataset.iloc[:,4:5]\n", 44 | "\n" 45 | ] 46 | }, 47 | { 48 | "cell_type": "markdown", 49 | "metadata": {}, 50 | "source": [ 51 | "### Here we are making a pipeline as State column has to be onehot Encoded." 52 | ] 53 | }, 54 | { 55 | "cell_type": "markdown", 56 | "metadata": {}, 57 | "source": [ 58 | "### If Any Input is given State column is one hot encoded , then model predicts resultant data frame." 59 | ] 60 | }, 61 | { 62 | "cell_type": "code", 63 | "execution_count": 17, 64 | "metadata": {}, 65 | "outputs": [], 66 | "source": [ 67 | "from sklearn.preprocessing import OneHotEncoder\n", 68 | "# # use when different features need different preprocessing\n", 69 | "from sklearn.compose import make_column_transformer\n", 70 | "column_trans = make_column_transformer((OneHotEncoder(),['State']),remainder='passthrough')\n", 71 | "x_train, x_test, y_train, y_test = train_test_split(x, y, test_size = 0.2, random_state=0)\n" 72 | ] 73 | }, 74 | { 75 | "cell_type": "code", 76 | "execution_count": 19, 77 | "metadata": {}, 78 | "outputs": [ 79 | { 80 | "data": { 81 | "text/plain": [ 82 | "Pipeline(steps=[('columntransformer',\n", 83 | " ColumnTransformer(remainder='passthrough',\n", 84 | " transformers=[('onehotencoder',\n", 85 | " OneHotEncoder(),\n", 86 | " ['State'])])),\n", 87 | " ('linearregression', LinearRegression())])" 88 | ] 89 | }, 90 | "execution_count": 19, 91 | "metadata": {}, 92 | "output_type": "execute_result" 93 | } 94 | ], 95 | "source": [ 96 | "\n", 97 | "from sklearn.pipeline import make_pipeline\n", 98 | "pipe = make_pipeline(column_trans,LinearRegression())\n", 99 | "pipe.fit(x_train,y_train)\n" 100 | ] 101 | }, 102 | { 103 | "cell_type": "code", 104 | "execution_count": 20, 105 | "metadata": {}, 106 | "outputs": [], 107 | "source": [ 108 | "pred=pipe.predict(x_test)" 109 | ] 110 | }, 111 | { 112 | "cell_type": "code", 113 | "execution_count": 21, 114 | "metadata": {}, 115 | "outputs": [ 116 | { 117 | "data": { 118 | "text/plain": [ 119 | "0.9347068473282515" 120 | ] 121 | }, 122 | "execution_count": 21, 123 | "metadata": {}, 124 | "output_type": "execute_result" 125 | } 126 | ], 127 | "source": [ 128 | "pipe.score(x_test,y_test)" 129 | ] 130 | }, 131 | { 132 | "cell_type": "code", 133 | "execution_count": 22, 134 | "metadata": {}, 135 | "outputs": [], 136 | "source": [ 137 | "import pickle\n", 138 | "pickle.dump(pipe, open('model.pkl', 'wb'))" 139 | ] 140 | }, 141 | { 142 | "cell_type": "code", 143 | "execution_count": null, 144 | "metadata": {}, 145 | "outputs": [], 146 | "source": [] 147 | } 148 | ], 149 | "metadata": { 150 | "kernelspec": { 151 | "display_name": "Python 3", 152 | "language": "python", 153 | "name": "python3" 154 | }, 155 | "language_info": { 156 | "codemirror_mode": { 157 | "name": "ipython", 158 | "version": 3 159 | }, 160 | "file_extension": ".py", 161 | "mimetype": "text/x-python", 162 | "name": "python", 163 | "nbconvert_exporter": "python", 164 | "pygments_lexer": "ipython3", 165 | "version": "3.7.4" 166 | } 167 | }, 168 | "nbformat": 4, 169 | "nbformat_minor": 2 170 | } 171 | -------------------------------------------------------------------------------- /DeployFlaskAzure/Readme.md: -------------------------------------------------------------------------------- 1 |

Deployment Of Flask App on Azure 2 |

3 | 4 | >Azure Web Apps provides a platform to build an App in Azure without having to deploy, configure and maintain your own Azure VM's. You can build Web App using the ASP.NET, PHP, Node. js and Python. They also integrate common development environments which could be Visual Studio and GitHub. 5 | 6 |

To Review the Implemented Deployment Please visit 7 |     https://deploymodel.azurewebsites.net/

8 | 9 |

STEPS TO FOLLOW

10 | 11 |

1. Create a Directory Containing FlaskApp, Index.html and requirements.txt   .

12 |

NOTE   :   To generate requirements .txt , go to path in command prompt or Terminal and type pipreqs. 13 | 14 |

2. Create a Dockerfile.

15 | 16 | ``` 17 | FROM python:3.7-slim 18 | 19 | WORKDIR /app 20 | 21 | ADD . /app 22 | 23 | RUN pip install --trusted-host pypi.python.org -r requirements.txt 24 | 25 | EXPOSE 5000 26 | 27 | ENV NAME OpentoAll 28 | 29 | CMD ["python","app.py"] 30 | 31 | ``` 32 | 33 |

3. Build Your Docker Image.

34 | 35 |

docker buid -t imagename:tag 36 | 37 | ``` 38 | docker buid -t azuremlr:latest . 39 | ``` 40 |

For More details visit Dockerizing Flask App 41 | 42 |

4 . Tag your Docker Image and push to docker hub.

43 | 44 | ``` 45 | docker tag azuremlr tharun435/myrepo:1.0 46 | ``` 47 |

NOTE   :    Please Create your account in Docker Hub if you don't have a one

48 | 49 |

5 .  Push your Image to Your Repositories in Docker Hub .

50 | 51 | ``` 52 | docker push tharun435/myrepo:1.0 53 | ``` 54 |

6.   Go to your Azure account , Web services , click add.

55 | 56 | 57 | 58 | * Create a new Resource group and select Docker Container to Publish . Click Next:Docker. 59 | 60 | 61 |

7.  Select Image Source as Docker Hub and give your Image name you pushed to the docker hub in step 5   .

62 | 63 | 64 | 65 |

8. Click next Monitoring and go to tags, give port and value .

66 | 67 | 68 |

9.   Click Review and create .

69 | 70 | 71 | 72 |

Succesfully the Web app is created and a link will be generated like this. https://deploymodel.azurewebsites.net/ 73 |

74 | 75 |
76 | 77 |

References

78 | 79 | - Dokerizing Flask APP 80 | - Azure Documentation 81 | 82 | - Creating Web Apps on Azure 83 | 84 |

Thank You :D

85 |

I have used many online resources while creating the application and I would like to thank them .   Hope you found it insightful.If you have any queries you can mail me at : kumartharun435@gmail.com . I would love to hear feedback from you to improvise it and make it better!

86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /DeployFlaskAzure/app.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | from flask import Flask, request, jsonify, render_template 4 | import pickle 5 | 6 | app = Flask(__name__,template_folder='templates') 7 | model = pickle.load(open('model.pkl', 'rb')) 8 | 9 | @app.route('/') 10 | def home(): 11 | return render_template('index.html') 12 | 13 | @app.route('/predict',methods=['POST']) 14 | def predict(): 15 | ''' 16 | For rendering results on HTML GUI 17 | ''' 18 | features = [x for x in request.form.values()] 19 | final_features = [np.array(features)] 20 | column_names=['R&DSpend','Administration','MarketingSpend','State'] 21 | final_features=pd.DataFrame(final_features,columns=column_names) 22 | prediction= model.predict(final_features) 23 | temp=0.0 24 | for i in prediction: 25 | for j in i: 26 | temp=j 27 | return render_template('index.html', prediction_text='${}'.format(temp)) 28 | 29 | 30 | if __name__ == '__main__': 31 | app.run(host='0.0.0.0') 32 | -------------------------------------------------------------------------------- /DeployFlaskAzure/model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/model.pkl -------------------------------------------------------------------------------- /DeployFlaskAzure/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask==2.3.2 2 | seaborn==0.9.0 3 | numpy==1.22.0 4 | pandas==0.25.1 5 | matplotlib==3.0.3 6 | scikit_learn==0.23.1 7 | -------------------------------------------------------------------------------- /DeployFlaskAzure/static/css/scss-files.txt: -------------------------------------------------------------------------------- 1 | The scss source files are available in the pro version. 2 | -------------------------------------------------------------------------------- /DeployFlaskAzure/static/img/home.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/static/img/home.jpg -------------------------------------------------------------------------------- /DeployFlaskAzure/static/img/intro-carousel/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/static/img/intro-carousel/1.jpg -------------------------------------------------------------------------------- /DeployFlaskAzure/static/img/intro-carousel/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/static/img/intro-carousel/2.jpg -------------------------------------------------------------------------------- /DeployFlaskAzure/static/img/intro-carousel/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/static/img/intro-carousel/3.jpg -------------------------------------------------------------------------------- /DeployFlaskAzure/static/img/intro-carousel/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/static/img/intro-carousel/4.jpg -------------------------------------------------------------------------------- /DeployFlaskAzure/static/img/intro-carousel/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/static/img/intro-carousel/5.jpg -------------------------------------------------------------------------------- /DeployFlaskAzure/static/img/pop.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/static/img/pop.jpg -------------------------------------------------------------------------------- /DeployFlaskAzure/static/img/preloader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/static/img/preloader.gif -------------------------------------------------------------------------------- /DeployFlaskAzure/static/js/main.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function ($) { 2 | 3 | // Back to top button 4 | $(window).scroll(function () { 5 | if ($(this).scrollTop() > 100) { 6 | $('.back-to-top').fadeIn('slow'); 7 | } else { 8 | $('.back-to-top').fadeOut('slow'); 9 | } 10 | }); 11 | $('.back-to-top').click(function () { 12 | $('html, body').animate({ 13 | scrollTop: 0 14 | }, 1500, 'easeInOutExpo'); 15 | return false; 16 | }); 17 | 18 | // Stick the header at top on scroll 19 | $("#header").sticky({ 20 | topSpacing: 0, 21 | zIndex: '50' 22 | }); 23 | 24 | // Intro background carousel 25 | $("#intro-carousel").owlCarousel({ 26 | autoplay: true, 27 | dots: false, 28 | loop: true, 29 | animateOut: 'fadeOut', 30 | items: 1 31 | }); 32 | 33 | // Initiate the wowjs animation library 34 | new WOW().init(); 35 | 36 | // Initiate superfish on nav menu 37 | $('.nav-menu').superfish({ 38 | animation: { 39 | opacity: 'show' 40 | }, 41 | speed: 400 42 | }); 43 | 44 | // Mobile Navigation 45 | if ($('#nav-menu-container').length) { 46 | var $mobile_nav = $('#nav-menu-container').clone().prop({ 47 | id: 'mobile-nav' 48 | }); 49 | $mobile_nav.find('> ul').attr({ 50 | 'class': '', 51 | 'id': '' 52 | }); 53 | $('body').append($mobile_nav); 54 | $('body').prepend(''); 55 | $('body').append('
'); 56 | $('#mobile-nav').find('.menu-has-children').prepend(''); 57 | 58 | $(document).on('click', '.menu-has-children i', function (e) { 59 | $(this).next().toggleClass('menu-item-active'); 60 | $(this).nextAll('ul').eq(0).slideToggle(); 61 | $(this).toggleClass("fa-chevron-up fa-chevron-down"); 62 | }); 63 | 64 | $(document).on('click', '#mobile-nav-toggle', function (e) { 65 | $('body').toggleClass('mobile-nav-active'); 66 | $('#mobile-nav-toggle i').toggleClass('fa-times fa-bars'); 67 | $('#mobile-body-overly').toggle(); 68 | }); 69 | 70 | $(document).click(function (e) { 71 | var container = $("#mobile-nav, #mobile-nav-toggle"); 72 | if (!container.is(e.target) && container.has(e.target).length === 0) { 73 | if ($('body').hasClass('mobile-nav-active')) { 74 | $('body').removeClass('mobile-nav-active'); 75 | $('#mobile-nav-toggle i').toggleClass('fa-times fa-bars'); 76 | $('#mobile-body-overly').fadeOut(); 77 | } 78 | } 79 | }); 80 | } else if ($("#mobile-nav, #mobile-nav-toggle").length) { 81 | $("#mobile-nav, #mobile-nav-toggle").hide(); 82 | } 83 | 84 | // Smooth scroll for the menu and links with .scrollto classes 85 | $('.nav-menu a, #mobile-nav a, .scrollto').on('click', function () { 86 | if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { 87 | var target = $(this.hash); 88 | if (target.length) { 89 | var top_space = 0; 90 | 91 | if ($('#header').length) { 92 | top_space = $('#header').outerHeight(); 93 | 94 | if (!$('#header').hasClass('header-fixed')) { 95 | top_space = top_space - 20; 96 | } 97 | } 98 | 99 | $('html, body').animate({ 100 | scrollTop: target.offset().top - top_space 101 | }, 1500, 'easeInOutExpo'); 102 | 103 | if ($(this).parents('.nav-menu').length) { 104 | $('.nav-menu .menu-active').removeClass('menu-active'); 105 | $(this).closest('li').addClass('menu-active'); 106 | } 107 | 108 | if ($('body').hasClass('mobile-nav-active')) { 109 | $('body').removeClass('mobile-nav-active'); 110 | $('#mobile-nav-toggle i').toggleClass('fa-times fa-bars'); 111 | $('#mobile-body-overly').fadeOut(); 112 | } 113 | return false; 114 | } 115 | } 116 | }); 117 | 118 | 119 | // Porfolio - uses the magnific popup jQuery plugin 120 | $('.portfolio-popup').magnificPopup({ 121 | type: 'image', 122 | removalDelay: 300, 123 | mainClass: 'mfp-fade', 124 | gallery: { 125 | enabled: true 126 | }, 127 | zoom: { 128 | enabled: true, 129 | duration: 300, 130 | easing: 'ease-in-out', 131 | opener: function (openerElement) { 132 | return openerElement.is('img') ? openerElement : openerElement.find('img'); 133 | } 134 | } 135 | }); 136 | 137 | // Testimonials carousel (uses the Owl Carousel library) 138 | $(".testimonials-carousel").owlCarousel({ 139 | autoplay: true, 140 | dots: true, 141 | loop: true, 142 | responsive: { 143 | 0: { 144 | items: 1 145 | }, 146 | 768: { 147 | items: 2 148 | }, 149 | 900: { 150 | items: 3 151 | } 152 | } 153 | }); 154 | 155 | // Clients carousel (uses the Owl Carousel library) 156 | $(".clients-carousel").owlCarousel({ 157 | autoplay: true, 158 | dots: true, 159 | loop: true, 160 | responsive: { 161 | 0: { 162 | items: 2 163 | }, 164 | 768: { 165 | items: 4 166 | }, 167 | 900: { 168 | items: 6 169 | } 170 | } 171 | }); 172 | 173 | 174 | }); 175 | -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/easing/easing.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery Easing v1.4.1 - http://gsgd.co.uk/sandbox/jquery/easing/ 3 | * Open source under the BSD License. 4 | * Copyright © 2008 George McGinley Smith 5 | * All rights reserved. 6 | * https://raw.github.com/gdsmith/jquery-easing/master/LICENSE 7 | */ 8 | 9 | (function (factory) { 10 | if (typeof define === "function" && define.amd) { 11 | define(['jquery'], function ($) { 12 | return factory($); 13 | }); 14 | } else if (typeof module === "object" && typeof module.exports === "object") { 15 | exports = factory(require('jquery')); 16 | } else { 17 | factory(jQuery); 18 | } 19 | })(function($){ 20 | 21 | // Preserve the original jQuery "swing" easing as "jswing" 22 | if (typeof $.easing !== 'undefined') { 23 | $.easing['jswing'] = $.easing['swing']; 24 | } 25 | 26 | var pow = Math.pow, 27 | sqrt = Math.sqrt, 28 | sin = Math.sin, 29 | cos = Math.cos, 30 | PI = Math.PI, 31 | c1 = 1.70158, 32 | c2 = c1 * 1.525, 33 | c3 = c1 + 1, 34 | c4 = ( 2 * PI ) / 3, 35 | c5 = ( 2 * PI ) / 4.5; 36 | 37 | // x is the fraction of animation progress, in the range 0..1 38 | function bounceOut(x) { 39 | var n1 = 7.5625, 40 | d1 = 2.75; 41 | if ( x < 1/d1 ) { 42 | return n1*x*x; 43 | } else if ( x < 2/d1 ) { 44 | return n1*(x-=(1.5/d1))*x + .75; 45 | } else if ( x < 2.5/d1 ) { 46 | return n1*(x-=(2.25/d1))*x + .9375; 47 | } else { 48 | return n1*(x-=(2.625/d1))*x + .984375; 49 | } 50 | } 51 | 52 | $.extend( $.easing, 53 | { 54 | def: 'easeOutQuad', 55 | swing: function (x) { 56 | return $.easing[$.easing.def](x); 57 | }, 58 | easeInQuad: function (x) { 59 | return x * x; 60 | }, 61 | easeOutQuad: function (x) { 62 | return 1 - ( 1 - x ) * ( 1 - x ); 63 | }, 64 | easeInOutQuad: function (x) { 65 | return x < 0.5 ? 66 | 2 * x * x : 67 | 1 - pow( -2 * x + 2, 2 ) / 2; 68 | }, 69 | easeInCubic: function (x) { 70 | return x * x * x; 71 | }, 72 | easeOutCubic: function (x) { 73 | return 1 - pow( 1 - x, 3 ); 74 | }, 75 | easeInOutCubic: function (x) { 76 | return x < 0.5 ? 77 | 4 * x * x * x : 78 | 1 - pow( -2 * x + 2, 3 ) / 2; 79 | }, 80 | easeInQuart: function (x) { 81 | return x * x * x * x; 82 | }, 83 | easeOutQuart: function (x) { 84 | return 1 - pow( 1 - x, 4 ); 85 | }, 86 | easeInOutQuart: function (x) { 87 | return x < 0.5 ? 88 | 8 * x * x * x * x : 89 | 1 - pow( -2 * x + 2, 4 ) / 2; 90 | }, 91 | easeInQuint: function (x) { 92 | return x * x * x * x * x; 93 | }, 94 | easeOutQuint: function (x) { 95 | return 1 - pow( 1 - x, 5 ); 96 | }, 97 | easeInOutQuint: function (x) { 98 | return x < 0.5 ? 99 | 16 * x * x * x * x * x : 100 | 1 - pow( -2 * x + 2, 5 ) / 2; 101 | }, 102 | easeInSine: function (x) { 103 | return 1 - cos( x * PI/2 ); 104 | }, 105 | easeOutSine: function (x) { 106 | return sin( x * PI/2 ); 107 | }, 108 | easeInOutSine: function (x) { 109 | return -( cos( PI * x ) - 1 ) / 2; 110 | }, 111 | easeInExpo: function (x) { 112 | return x === 0 ? 0 : pow( 2, 10 * x - 10 ); 113 | }, 114 | easeOutExpo: function (x) { 115 | return x === 1 ? 1 : 1 - pow( 2, -10 * x ); 116 | }, 117 | easeInOutExpo: function (x) { 118 | return x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? 119 | pow( 2, 20 * x - 10 ) / 2 : 120 | ( 2 - pow( 2, -20 * x + 10 ) ) / 2; 121 | }, 122 | easeInCirc: function (x) { 123 | return 1 - sqrt( 1 - pow( x, 2 ) ); 124 | }, 125 | easeOutCirc: function (x) { 126 | return sqrt( 1 - pow( x - 1, 2 ) ); 127 | }, 128 | easeInOutCirc: function (x) { 129 | return x < 0.5 ? 130 | ( 1 - sqrt( 1 - pow( 2 * x, 2 ) ) ) / 2 : 131 | ( sqrt( 1 - pow( -2 * x + 2, 2 ) ) + 1 ) / 2; 132 | }, 133 | easeInElastic: function (x) { 134 | return x === 0 ? 0 : x === 1 ? 1 : 135 | -pow( 2, 10 * x - 10 ) * sin( ( x * 10 - 10.75 ) * c4 ); 136 | }, 137 | easeOutElastic: function (x) { 138 | return x === 0 ? 0 : x === 1 ? 1 : 139 | pow( 2, -10 * x ) * sin( ( x * 10 - 0.75 ) * c4 ) + 1; 140 | }, 141 | easeInOutElastic: function (x) { 142 | return x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? 143 | -( pow( 2, 20 * x - 10 ) * sin( ( 20 * x - 11.125 ) * c5 )) / 2 : 144 | pow( 2, -20 * x + 10 ) * sin( ( 20 * x - 11.125 ) * c5 ) / 2 + 1; 145 | }, 146 | easeInBack: function (x) { 147 | return c3 * x * x * x - c1 * x * x; 148 | }, 149 | easeOutBack: function (x) { 150 | return 1 + c3 * pow( x - 1, 3 ) + c1 * pow( x - 1, 2 ); 151 | }, 152 | easeInOutBack: function (x) { 153 | return x < 0.5 ? 154 | ( pow( 2 * x, 2 ) * ( ( c2 + 1 ) * 2 * x - c2 ) ) / 2 : 155 | ( pow( 2 * x - 2, 2 ) *( ( c2 + 1 ) * ( x * 2 - 2 ) + c2 ) + 2 ) / 2; 156 | }, 157 | easeInBounce: function (x) { 158 | return 1 - bounceOut( 1 - x ); 159 | }, 160 | easeOutBounce: bounceOut, 161 | easeInOutBounce: function (x) { 162 | return x < 0.5 ? 163 | ( 1 - bounceOut( 1 - 2 * x ) ) / 2 : 164 | ( 1 + bounceOut( 2 * x - 1 ) ) / 2; 165 | } 166 | }); 167 | 168 | }); 169 | -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/easing/easing.min.js: -------------------------------------------------------------------------------- 1 | !function(n){"function"==typeof define&&define.amd?define(["jquery"],function(e){return n(e)}):"object"==typeof module&&"object"==typeof module.exports?exports=n(require("jquery")):n(jQuery)}(function(n){function e(n){var e=7.5625,t=2.75;return n<1/t?e*n*n:n<2/t?e*(n-=1.5/t)*n+.75:n<2.5/t?e*(n-=2.25/t)*n+.9375:e*(n-=2.625/t)*n+.984375}void 0!==n.easing&&(n.easing.jswing=n.easing.swing);var t=Math.pow,u=Math.sqrt,r=Math.sin,i=Math.cos,a=Math.PI,c=1.70158,o=1.525*c,s=2*a/3,f=2*a/4.5;n.extend(n.easing,{def:"easeOutQuad",swing:function(e){return n.easing[n.easing.def](e)},easeInQuad:function(n){return n*n},easeOutQuad:function(n){return 1-(1-n)*(1-n)},easeInOutQuad:function(n){return n<.5?2*n*n:1-t(-2*n+2,2)/2},easeInCubic:function(n){return n*n*n},easeOutCubic:function(n){return 1-t(1-n,3)},easeInOutCubic:function(n){return n<.5?4*n*n*n:1-t(-2*n+2,3)/2},easeInQuart:function(n){return n*n*n*n},easeOutQuart:function(n){return 1-t(1-n,4)},easeInOutQuart:function(n){return n<.5?8*n*n*n*n:1-t(-2*n+2,4)/2},easeInQuint:function(n){return n*n*n*n*n},easeOutQuint:function(n){return 1-t(1-n,5)},easeInOutQuint:function(n){return n<.5?16*n*n*n*n*n:1-t(-2*n+2,5)/2},easeInSine:function(n){return 1-i(n*a/2)},easeOutSine:function(n){return r(n*a/2)},easeInOutSine:function(n){return-(i(a*n)-1)/2},easeInExpo:function(n){return 0===n?0:t(2,10*n-10)},easeOutExpo:function(n){return 1===n?1:1-t(2,-10*n)},easeInOutExpo:function(n){return 0===n?0:1===n?1:n<.5?t(2,20*n-10)/2:(2-t(2,-20*n+10))/2},easeInCirc:function(n){return 1-u(1-t(n,2))},easeOutCirc:function(n){return u(1-t(n-1,2))},easeInOutCirc:function(n){return n<.5?(1-u(1-t(2*n,2)))/2:(u(1-t(-2*n+2,2))+1)/2},easeInElastic:function(n){return 0===n?0:1===n?1:-t(2,10*n-10)*r((10*n-10.75)*s)},easeOutElastic:function(n){return 0===n?0:1===n?1:t(2,-10*n)*r((10*n-.75)*s)+1},easeInOutElastic:function(n){return 0===n?0:1===n?1:n<.5?-(t(2,20*n-10)*r((20*n-11.125)*f))/2:t(2,-20*n+10)*r((20*n-11.125)*f)/2+1},easeInBack:function(n){return(c+1)*n*n*n-c*n*n},easeOutBack:function(n){return 1+(c+1)*t(n-1,3)+c*t(n-1,2)},easeInOutBack:function(n){return n<.5?t(2*n,2)*(7.189819*n-o)/2:(t(2*n-2,2)*((o+1)*(2*n-2)+o)+2)/2},easeInBounce:function(n){return 1-e(1-n)},easeOutBounce:e,easeInOutBounce:function(n){return n<.5?(1-e(1-2*n))/2:(1+e(2*n-1))/2}})}); 2 | -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/static/lib/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/static/lib/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/static/lib/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/static/lib/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/static/lib/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/ionicons/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/static/lib/ionicons/fonts/ionicons.eot -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/ionicons/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/static/lib/ionicons/fonts/ionicons.ttf -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/ionicons/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/static/lib/ionicons/fonts/ionicons.woff -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/jquery/jquery-migrate.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery Migrate v3.0.0 | (c) jQuery Foundation and other contributors | jquery.org/license */ 2 | "undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(a,b){"use strict";function c(c){var d=b.console;e[c]||(e[c]=!0,a.migrateWarnings.push(c),d&&d.warn&&!a.migrateMute&&(d.warn("JQMIGRATE: "+c),a.migrateTrace&&d.trace&&d.trace()))}function d(a,b,d,e){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return c(e),d}})}a.migrateVersion="3.0.0",function(){var c=b.console&&b.console.log&&function(){b.console.log.apply(b.console,arguments)},d=/^[12]\./;c&&(a&&!d.test(a.fn.jquery)||c("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),a.migrateWarnings&&c("JQMIGRATE: Migrate plugin loaded multiple times"),c("JQMIGRATE: Migrate is installed"+(a.migrateMute?"":" with logging active")+", version "+a.migrateVersion))}();var e={};a.migrateWarnings=[],void 0===a.migrateTrace&&(a.migrateTrace=!0),a.migrateReset=function(){e={},a.migrateWarnings.length=0},"BackCompat"===document.compatMode&&c("jQuery is not compatible with Quirks Mode");var f=a.fn.init,g=a.isNumeric,h=a.find,i=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,j=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g;a.fn.init=function(a){var b=Array.prototype.slice.call(arguments);return"string"==typeof a&&"#"===a&&(c("jQuery( '#' ) is not a valid selector"),b[0]=[]),f.apply(this,b)},a.fn.init.prototype=a.fn,a.find=function(a){var b=Array.prototype.slice.call(arguments);if("string"==typeof a&&i.test(a))try{document.querySelector(a)}catch(d){a=a.replace(j,function(a,b,c,d){return"["+b+c+'"'+d+'"]'});try{document.querySelector(a),c("Attribute selector with '#' must be quoted: "+b[0]),b[0]=a}catch(e){c("Attribute selector with '#' was not fixed: "+b[0])}}return h.apply(this,b)};var k;for(k in h)Object.prototype.hasOwnProperty.call(h,k)&&(a.find[k]=h[k]);a.fn.size=function(){return c("jQuery.fn.size() is deprecated; use the .length property"),this.length},a.parseJSON=function(){return c("jQuery.parseJSON is deprecated; use JSON.parse"),JSON.parse.apply(null,arguments)},a.isNumeric=function(b){function d(b){var c=b&&b.toString();return!a.isArray(b)&&c-parseFloat(c)+1>=0}var e=g(b),f=d(b);return e!==f&&c("jQuery.isNumeric() should not be called on constructed objects"),f},d(a,"unique",a.uniqueSort,"jQuery.unique is deprecated, use jQuery.uniqueSort"),d(a.expr,"filters",a.expr.pseudos,"jQuery.expr.filters is now jQuery.expr.pseudos"),d(a.expr,":",a.expr.pseudos,'jQuery.expr[":"] is now jQuery.expr.pseudos');var l=a.ajax;a.ajax=function(){var a=l.apply(this,arguments);return a.promise&&(d(a,"success",a.done,"jQXHR.success is deprecated and removed"),d(a,"error",a.fail,"jQXHR.error is deprecated and removed"),d(a,"complete",a.always,"jQXHR.complete is deprecated and removed")),a};var m=a.fn.removeAttr,n=a.fn.toggleClass,o=/\S+/g;a.fn.removeAttr=function(b){var d=this;return a.each(b.match(o),function(b,e){a.expr.match.bool.test(e)&&(c("jQuery.fn.removeAttr no longer sets boolean properties: "+e),d.prop(e,!1))}),m.apply(this,arguments)},a.fn.toggleClass=function(b){return void 0!==b&&"boolean"!=typeof b?n.apply(this,arguments):(c("jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var c=this.getAttribute&&this.getAttribute("class")||"";c&&a.data(this,"__className__",c),this.setAttribute&&this.setAttribute("class",c||b===!1?"":a.data(this,"__className__")||"")}))};var p=!1;a.swap&&a.each(["height","width","reliableMarginRight"],function(b,c){var d=a.cssHooks[c]&&a.cssHooks[c].get;d&&(a.cssHooks[c].get=function(){var a;return p=!0,a=d.apply(this,arguments),p=!1,a})}),a.swap=function(a,b,d,e){var f,g,h={};p||c("jQuery.swap() is undocumented and deprecated");for(g in b)h[g]=a.style[g],a.style[g]=b[g];f=d.apply(a,e||[]);for(g in b)a.style[g]=h[g];return f};var q=a.data;a.data=function(b,d,e){var f;return d&&d!==a.camelCase(d)&&(f=a.hasData(b)&&q.call(this,b),f&&d in f)?(c("jQuery.data() always sets/gets camelCased names: "+d),arguments.length>2&&(f[d]=e),f[d]):q.apply(this,arguments)};var r=a.Tween.prototype.run;a.Tween.prototype.run=function(b){a.easing[this.easing].length>1&&(c('easing function "jQuery.easing.'+this.easing.toString()+'" should use only first argument'),a.easing[this.easing]=a.easing[this.easing].bind(a.easing,b,this.options.duration*b,0,1,this.options.duration)),r.apply(this,arguments)};var s=a.fn.load,t=a.event.fix;a.event.props=[],a.event.fixHooks={},a.event.fix=function(b){var d,e=b.type,f=this.fixHooks[e],g=a.event.props;if(g.length)for(c("jQuery.event.props are deprecated and removed: "+g.join());g.length;)a.event.addProp(g.pop());if(f&&!f._migrated_&&(f._migrated_=!0,c("jQuery.event.fixHooks are deprecated and removed: "+e),(g=f.props)&&g.length))for(;g.length;)a.event.addProp(g.pop());return d=t.call(this,b),f&&f.filter?f.filter(d,b):d},a.each(["load","unload","error"],function(b,d){a.fn[d]=function(){var a=Array.prototype.slice.call(arguments,0);return"load"===d&&"string"==typeof a[0]?s.apply(this,a):(c("jQuery.fn."+d+"() is deprecated"),a.splice(0,0,d),arguments.length?this.on.apply(this,a):(this.triggerHandler.apply(this,a),this))}}),a(function(){a(document).triggerHandler("ready")}),a.event.special.ready={setup:function(){this===document&&c("'ready' event is deprecated")}},a.fn.extend({bind:function(a,b,d){return c("jQuery.fn.bind() is deprecated"),this.on(a,null,b,d)},unbind:function(a,b){return c("jQuery.fn.unbind() is deprecated"),this.off(a,null,b)},delegate:function(a,b,d,e){return c("jQuery.fn.delegate() is deprecated"),this.on(b,a,d,e)},undelegate:function(a,b,d){return c("jQuery.fn.undelegate() is deprecated"),1===arguments.length?this.off(a,"**"):this.off(b,a||"**",d)}});var u=a.fn.offset;a.fn.offset=function(){var b,d=this[0],e={top:0,left:0};return d&&d.nodeType?(b=(d.ownerDocument||document).documentElement,a.contains(b,d)?u.apply(this,arguments):(c("jQuery.fn.offset() requires an element connected to a document"),e)):(c("jQuery.fn.offset() requires a valid DOM element"),e)};var v=a.param;a.param=function(b,d){var e=a.ajaxSettings&&a.ajaxSettings.traditional;return void 0===d&&e&&(c("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),d=e),v.call(this,b,d)};var w=a.fn.andSelf||a.fn.addBack;a.fn.andSelf=function(){return c("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)};var x=a.Deferred,y=[["resolve","done",a.Callbacks("once memory"),a.Callbacks("once memory"),"resolved"],["reject","fail",a.Callbacks("once memory"),a.Callbacks("once memory"),"rejected"],["notify","progress",a.Callbacks("memory"),a.Callbacks("memory")]];a.Deferred=function(b){var d=x(),e=d.promise();return d.pipe=e.pipe=function(){var b=arguments;return c("deferred.pipe() is deprecated"),a.Deferred(function(c){a.each(y,function(f,g){var h=a.isFunction(b[f])&&b[f];d[g[1]](function(){var b=h&&h.apply(this,arguments);b&&a.isFunction(b.promise)?b.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g[0]+"With"](this===e?c.promise():this,h?[b]:arguments)})}),b=null}).promise()},b&&b.call(d,d),d}}(jQuery,window); -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/magnific-popup/magnific-popup.css: -------------------------------------------------------------------------------- 1 | /* Magnific Popup CSS */ 2 | .mfp-bg { 3 | top: 0; 4 | left: 0; 5 | width: 100%; 6 | height: 100%; 7 | z-index: 1042; 8 | overflow: hidden; 9 | position: fixed; 10 | background: #0b0b0b; 11 | opacity: 0.8; } 12 | 13 | .mfp-wrap { 14 | top: 0; 15 | left: 0; 16 | width: 100%; 17 | height: 100%; 18 | z-index: 1043; 19 | position: fixed; 20 | outline: none !important; 21 | -webkit-backface-visibility: hidden; } 22 | 23 | .mfp-container { 24 | text-align: center; 25 | position: absolute; 26 | width: 100%; 27 | height: 100%; 28 | left: 0; 29 | top: 0; 30 | padding: 0 8px; 31 | box-sizing: border-box; } 32 | 33 | .mfp-container:before { 34 | content: ''; 35 | display: inline-block; 36 | height: 100%; 37 | vertical-align: middle; } 38 | 39 | .mfp-align-top .mfp-container:before { 40 | display: none; } 41 | 42 | .mfp-content { 43 | position: relative; 44 | display: inline-block; 45 | vertical-align: middle; 46 | margin: 0 auto; 47 | text-align: left; 48 | z-index: 1045; } 49 | 50 | .mfp-inline-holder .mfp-content, 51 | .mfp-ajax-holder .mfp-content { 52 | width: 100%; 53 | cursor: auto; } 54 | 55 | .mfp-ajax-cur { 56 | cursor: progress; } 57 | 58 | .mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close { 59 | cursor: -moz-zoom-out; 60 | cursor: -webkit-zoom-out; 61 | cursor: zoom-out; } 62 | 63 | .mfp-zoom { 64 | cursor: pointer; 65 | cursor: -webkit-zoom-in; 66 | cursor: -moz-zoom-in; 67 | cursor: zoom-in; } 68 | 69 | .mfp-auto-cursor .mfp-content { 70 | cursor: auto; } 71 | 72 | .mfp-close, 73 | .mfp-arrow, 74 | .mfp-preloader, 75 | .mfp-counter { 76 | -webkit-user-select: none; 77 | -moz-user-select: none; 78 | user-select: none; } 79 | 80 | .mfp-loading.mfp-figure { 81 | display: none; } 82 | 83 | .mfp-hide { 84 | display: none !important; } 85 | 86 | .mfp-preloader { 87 | color: #CCC; 88 | position: absolute; 89 | top: 50%; 90 | width: auto; 91 | text-align: center; 92 | margin-top: -0.8em; 93 | left: 8px; 94 | right: 8px; 95 | z-index: 1044; } 96 | .mfp-preloader a { 97 | color: #CCC; } 98 | .mfp-preloader a:hover { 99 | color: #FFF; } 100 | 101 | .mfp-s-ready .mfp-preloader { 102 | display: none; } 103 | 104 | .mfp-s-error .mfp-content { 105 | display: none; } 106 | 107 | button.mfp-close, 108 | button.mfp-arrow { 109 | overflow: visible; 110 | cursor: pointer; 111 | background: transparent; 112 | border: 0; 113 | -webkit-appearance: none; 114 | display: block; 115 | outline: none; 116 | padding: 0; 117 | z-index: 1046; 118 | box-shadow: none; 119 | touch-action: manipulation; } 120 | 121 | button::-moz-focus-inner { 122 | padding: 0; 123 | border: 0; } 124 | 125 | .mfp-close { 126 | width: 44px; 127 | height: 44px; 128 | line-height: 44px; 129 | position: absolute; 130 | right: 0; 131 | top: 0; 132 | text-decoration: none; 133 | text-align: center; 134 | opacity: 0.65; 135 | padding: 0 0 18px 10px; 136 | color: #FFF; 137 | font-style: normal; 138 | font-size: 28px; 139 | font-family: Arial, Baskerville, monospace; } 140 | .mfp-close:hover, 141 | .mfp-close:focus { 142 | opacity: 1; } 143 | .mfp-close:active { 144 | top: 1px; } 145 | 146 | .mfp-close-btn-in .mfp-close { 147 | color: #333; } 148 | 149 | .mfp-image-holder .mfp-close, 150 | .mfp-iframe-holder .mfp-close { 151 | color: #FFF; 152 | right: -6px; 153 | text-align: right; 154 | padding-right: 6px; 155 | width: 100%; } 156 | 157 | .mfp-counter { 158 | position: absolute; 159 | top: 0; 160 | right: 0; 161 | color: #CCC; 162 | font-size: 12px; 163 | line-height: 18px; 164 | white-space: nowrap; } 165 | 166 | .mfp-arrow { 167 | position: absolute; 168 | opacity: 0.65; 169 | margin: 0; 170 | top: 50%; 171 | margin-top: -55px; 172 | padding: 0; 173 | width: 90px; 174 | height: 110px; 175 | -webkit-tap-highlight-color: transparent; } 176 | .mfp-arrow:active { 177 | margin-top: -54px; } 178 | .mfp-arrow:hover, 179 | .mfp-arrow:focus { 180 | opacity: 1; } 181 | .mfp-arrow:before, 182 | .mfp-arrow:after { 183 | content: ''; 184 | display: block; 185 | width: 0; 186 | height: 0; 187 | position: absolute; 188 | left: 0; 189 | top: 0; 190 | margin-top: 35px; 191 | margin-left: 35px; 192 | border: medium inset transparent; } 193 | .mfp-arrow:after { 194 | border-top-width: 13px; 195 | border-bottom-width: 13px; 196 | top: 8px; } 197 | .mfp-arrow:before { 198 | border-top-width: 21px; 199 | border-bottom-width: 21px; 200 | opacity: 0.7; } 201 | 202 | .mfp-arrow-left { 203 | left: 0; } 204 | .mfp-arrow-left:after { 205 | border-right: 17px solid #FFF; 206 | margin-left: 31px; } 207 | .mfp-arrow-left:before { 208 | margin-left: 25px; 209 | border-right: 27px solid #3F3F3F; } 210 | 211 | .mfp-arrow-right { 212 | right: 0; } 213 | .mfp-arrow-right:after { 214 | border-left: 17px solid #FFF; 215 | margin-left: 39px; } 216 | .mfp-arrow-right:before { 217 | border-left: 27px solid #3F3F3F; } 218 | 219 | .mfp-iframe-holder { 220 | padding-top: 40px; 221 | padding-bottom: 40px; } 222 | .mfp-iframe-holder .mfp-content { 223 | line-height: 0; 224 | width: 100%; 225 | max-width: 900px; } 226 | .mfp-iframe-holder .mfp-close { 227 | top: -40px; } 228 | 229 | .mfp-iframe-scaler { 230 | width: 100%; 231 | height: 0; 232 | overflow: hidden; 233 | padding-top: 56.25%; } 234 | .mfp-iframe-scaler iframe { 235 | position: absolute; 236 | display: block; 237 | top: 0; 238 | left: 0; 239 | width: 100%; 240 | height: 100%; 241 | box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); 242 | background: #000; } 243 | 244 | /* Main image in popup */ 245 | img.mfp-img { 246 | width: auto; 247 | max-width: 100%; 248 | height: auto; 249 | display: block; 250 | line-height: 0; 251 | box-sizing: border-box; 252 | padding: 40px 0 40px; 253 | margin: 0 auto; } 254 | 255 | /* The shadow behind the image */ 256 | .mfp-figure { 257 | line-height: 0; } 258 | .mfp-figure:after { 259 | content: ''; 260 | position: absolute; 261 | left: 0; 262 | top: 40px; 263 | bottom: 40px; 264 | display: block; 265 | right: 0; 266 | width: auto; 267 | height: auto; 268 | z-index: -1; 269 | box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); 270 | background: #444; } 271 | .mfp-figure small { 272 | color: #BDBDBD; 273 | display: block; 274 | font-size: 12px; 275 | line-height: 14px; } 276 | .mfp-figure figure { 277 | margin: 0; } 278 | 279 | .mfp-bottom-bar { 280 | margin-top: -36px; 281 | position: absolute; 282 | top: 100%; 283 | left: 0; 284 | width: 100%; 285 | cursor: auto; } 286 | 287 | .mfp-title { 288 | text-align: left; 289 | line-height: 18px; 290 | color: #F3F3F3; 291 | word-wrap: break-word; 292 | padding-right: 36px; } 293 | 294 | .mfp-image-holder .mfp-content { 295 | max-width: 100%; } 296 | 297 | .mfp-gallery .mfp-image-holder .mfp-figure { 298 | cursor: pointer; } 299 | 300 | @media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) { 301 | /** 302 | * Remove all paddings around the image on small screen 303 | */ 304 | .mfp-img-mobile .mfp-image-holder { 305 | padding-left: 0; 306 | padding-right: 0; } 307 | .mfp-img-mobile img.mfp-img { 308 | padding: 0; } 309 | .mfp-img-mobile .mfp-figure:after { 310 | top: 0; 311 | bottom: 0; } 312 | .mfp-img-mobile .mfp-figure small { 313 | display: inline; 314 | margin-left: 5px; } 315 | .mfp-img-mobile .mfp-bottom-bar { 316 | background: rgba(0, 0, 0, 0.6); 317 | bottom: 0; 318 | margin: 0; 319 | top: auto; 320 | padding: 3px 5px; 321 | position: fixed; 322 | box-sizing: border-box; } 323 | .mfp-img-mobile .mfp-bottom-bar:empty { 324 | padding: 0; } 325 | .mfp-img-mobile .mfp-counter { 326 | right: 5px; 327 | top: 3px; } 328 | .mfp-img-mobile .mfp-close { 329 | top: 0; 330 | right: 0; 331 | width: 35px; 332 | height: 35px; 333 | line-height: 35px; 334 | background: rgba(0, 0, 0, 0.6); 335 | position: fixed; 336 | text-align: center; 337 | padding: 0; } } 338 | 339 | @media all and (max-width: 900px) { 340 | .mfp-arrow { 341 | -webkit-transform: scale(0.75); 342 | transform: scale(0.75); } 343 | .mfp-arrow-left { 344 | -webkit-transform-origin: 0; 345 | transform-origin: 0; } 346 | .mfp-arrow-right { 347 | -webkit-transform-origin: 100%; 348 | transform-origin: 100%; } 349 | .mfp-container { 350 | padding-left: 6px; 351 | padding-right: 6px; } } 352 | -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/owlcarousel/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Owl 2 | Modified work Copyright 2016-2018 David Deutsch 3 | 4 | Permission is hereby granted, free of charge, to any person 5 | obtaining a copy of this software and associated documentation 6 | files (the "Software"), to deal in the Software without 7 | restriction, including without limitation the rights to use, 8 | copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the 10 | Software is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/owlcarousel/README.md: -------------------------------------------------------------------------------- 1 | # Owl Carousel 2 2 | 3 | Touch enabled [jQuery](https://jquery.com/) plugin that lets you create a beautiful, responsive carousel slider. **To get started, check out https://owlcarousel2.github.io/OwlCarousel2/.** 4 | 5 | ## Quick start 6 | 7 | ### Install 8 | 9 | This package can be installed with: 10 | 11 | - [npm](https://www.npmjs.com/package/owl.carousel): `npm install --save owl.carousel` or `yarn add owl.carousel jquery` 12 | - [bower](http://bower.io/search/?q=owl.carousel): `bower install --save owl.carousel` 13 | 14 | Or download the [latest release](https://github.com/OwlCarousel2/OwlCarousel2/releases). 15 | 16 | ### Load 17 | 18 | #### Webpack 19 | 20 | Add jQuery via the "webpack.ProvidePlugin" to your webpack configuration: 21 | 22 | const webpack = require('webpack'); 23 | 24 | //... 25 | plugins: [ 26 | new webpack.ProvidePlugin({ 27 | $: 'jquery', 28 | jQuery: 'jquery', 29 | 'window.jQuery': 'jquery' 30 | }), 31 | ], 32 | //... 33 | 34 | Load the required stylesheet and JS: 35 | 36 | ```js 37 | import 'owl.carousel/dist/assets/owl.carousel.css'; 38 | import 'owl.carousel'; 39 | ``` 40 | 41 | #### Static HTML 42 | 43 | Put the required stylesheet at the [top](https://developer.yahoo.com/performance/rules.html#css_top) of your markup: 44 | 45 | ```html 46 | 47 | ``` 48 | 49 | ```html 50 | 51 | ``` 52 | 53 | **NOTE:** If you want to use the default navigation styles, you will also need to include `owl.theme.default.css`. 54 | 55 | 56 | Put the script at the [bottom](https://developer.yahoo.com/performance/rules.html#js_bottom) of your markup right after jQuery: 57 | 58 | ```html 59 | 60 | 61 | ``` 62 | 63 | ```html 64 | 65 | 66 | ``` 67 | 68 | ### Usage 69 | 70 | Wrap your items (`div`, `a`, `img`, `span`, `li` etc.) with a container element (`div`, `ul` etc.). Only the class `owl-carousel` is mandatory to apply proper styles: 71 | 72 | ```html 73 | 82 | ``` 83 | **NOTE:** The `owl-theme` class is optional, but without it, you will need to style navigation features on your own. 84 | 85 | 86 | Call the [plugin](https://learn.jquery.com/plugins/) function and your carousel is ready. 87 | 88 | ```javascript 89 | $(document).ready(function(){ 90 | $('.owl-carousel').owlCarousel(); 91 | }); 92 | ``` 93 | 94 | ## Documentation 95 | 96 | The documentation, included in this repo in the root directory, is built with [Assemble](http://assemble.io/) and publicly available at https://owlcarousel2.github.io/OwlCarousel2/. The documentation may also be run locally. 97 | 98 | ## Building 99 | 100 | This package comes with [Grunt](http://gruntjs.com/) and [Bower](http://bower.io/). The following tasks are available: 101 | 102 | * `default` compiles the CSS and JS into `/dist` and builds the doc. 103 | * `dist` compiles the CSS and JS into `/dist` only. 104 | * `watch` watches source files and builds them automatically whenever you save. 105 | * `test` runs [JSHint](http://www.jshint.com/) and [QUnit](http://qunitjs.com/) tests headlessly in [PhantomJS](http://phantomjs.org/). 106 | 107 | To define which plugins are build into the distribution just edit `/_config.json` to fit your needs. 108 | 109 | ## Contributing 110 | 111 | Please read [CONTRIBUTING.md](CONTRIBUTING.md). 112 | 113 | ## Roadmap 114 | 115 | Please make sure to check out our [Roadmap Discussion](https://github.com/OwlCarousel2/OwlCarousel2/issues/1756). 116 | 117 | 118 | ## License 119 | 120 | The code and the documentation are released under the [MIT License](LICENSE). 121 | -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/owlcarousel/assets/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/static/lib/owlcarousel/assets/ajax-loader.gif -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/owlcarousel/assets/owl.carousel.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.2 3 | * Copyright 2013-2018 David Deutsch 4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 5 | */ 6 | /* 7 | * Owl Carousel - Core 8 | */ 9 | .owl-carousel { 10 | display: none; 11 | width: 100%; 12 | -webkit-tap-highlight-color: transparent; 13 | /* position relative and z-index fix webkit rendering fonts issue */ 14 | position: relative; 15 | z-index: 1; } 16 | .owl-carousel .owl-stage { 17 | position: relative; 18 | -ms-touch-action: pan-Y; 19 | touch-action: manipulation; 20 | -moz-backface-visibility: hidden; 21 | /* fix firefox animation glitch */ } 22 | .owl-carousel .owl-stage:after { 23 | content: "."; 24 | display: block; 25 | clear: both; 26 | visibility: hidden; 27 | line-height: 0; 28 | height: 0; } 29 | .owl-carousel .owl-stage-outer { 30 | position: relative; 31 | overflow: hidden; 32 | /* fix for flashing background */ 33 | -webkit-transform: translate3d(0px, 0px, 0px); } 34 | .owl-carousel .owl-wrapper, 35 | .owl-carousel .owl-item { 36 | -webkit-backface-visibility: hidden; 37 | -moz-backface-visibility: hidden; 38 | -ms-backface-visibility: hidden; 39 | -webkit-transform: translate3d(0, 0, 0); 40 | -moz-transform: translate3d(0, 0, 0); 41 | -ms-transform: translate3d(0, 0, 0); } 42 | .owl-carousel .owl-item { 43 | position: relative; 44 | min-height: 1px; 45 | float: left; 46 | -webkit-backface-visibility: hidden; 47 | -webkit-tap-highlight-color: transparent; 48 | -webkit-touch-callout: none; } 49 | .owl-carousel .owl-item img { 50 | display: block; 51 | width: 100%; } 52 | .owl-carousel .owl-nav.disabled, 53 | .owl-carousel .owl-dots.disabled { 54 | display: none; } 55 | .owl-carousel .owl-nav .owl-prev, 56 | .owl-carousel .owl-nav .owl-next, 57 | .owl-carousel .owl-dot { 58 | cursor: pointer; 59 | cursor: hand; 60 | -webkit-user-select: none; 61 | -khtml-user-select: none; 62 | -moz-user-select: none; 63 | -ms-user-select: none; 64 | user-select: none; } 65 | .owl-carousel .owl-nav button.owl-prev, 66 | .owl-carousel .owl-nav button.owl-next, 67 | .owl-carousel button.owl-dot { 68 | background: none; 69 | color: inherit; 70 | border: none; 71 | padding: 0 !important; 72 | font: inherit; } 73 | .owl-carousel.owl-loaded { 74 | display: block; } 75 | .owl-carousel.owl-loading { 76 | opacity: 0; 77 | display: block; } 78 | .owl-carousel.owl-hidden { 79 | opacity: 0; } 80 | .owl-carousel.owl-refresh .owl-item { 81 | visibility: hidden; } 82 | .owl-carousel.owl-drag .owl-item { 83 | -ms-touch-action: none; 84 | touch-action: none; 85 | -webkit-user-select: none; 86 | -moz-user-select: none; 87 | -ms-user-select: none; 88 | user-select: none; } 89 | .owl-carousel.owl-grab { 90 | cursor: move; 91 | cursor: grab; } 92 | .owl-carousel.owl-rtl { 93 | direction: rtl; } 94 | .owl-carousel.owl-rtl .owl-item { 95 | float: right; } 96 | 97 | /* No Js */ 98 | .no-js .owl-carousel { 99 | display: block; } 100 | 101 | /* 102 | * Owl Carousel - Animate Plugin 103 | */ 104 | .owl-carousel .animated { 105 | animation-duration: 1000ms; 106 | animation-fill-mode: both; } 107 | 108 | .owl-carousel .owl-animated-in { 109 | z-index: 0; } 110 | 111 | .owl-carousel .owl-animated-out { 112 | z-index: 1; } 113 | 114 | .owl-carousel .fadeOut { 115 | animation-name: fadeOut; } 116 | 117 | @keyframes fadeOut { 118 | 0% { 119 | opacity: 1; } 120 | 100% { 121 | opacity: 0; } } 122 | 123 | /* 124 | * Owl Carousel - Auto Height Plugin 125 | */ 126 | .owl-height { 127 | transition: height 500ms ease-in-out; } 128 | 129 | /* 130 | * Owl Carousel - Lazy Load Plugin 131 | */ 132 | .owl-carousel .owl-item .owl-lazy { 133 | opacity: 0; 134 | transition: opacity 400ms ease; } 135 | 136 | .owl-carousel .owl-item img.owl-lazy { 137 | transform-style: preserve-3d; } 138 | 139 | /* 140 | * Owl Carousel - Video Plugin 141 | */ 142 | .owl-carousel .owl-video-wrapper { 143 | position: relative; 144 | height: 100%; 145 | background: #000; } 146 | 147 | .owl-carousel .owl-video-play-icon { 148 | position: absolute; 149 | height: 80px; 150 | width: 80px; 151 | left: 50%; 152 | top: 50%; 153 | margin-left: -40px; 154 | margin-top: -40px; 155 | background: url("owl.video.play.png") no-repeat; 156 | cursor: pointer; 157 | z-index: 1; 158 | -webkit-backface-visibility: hidden; 159 | transition: transform 100ms ease; } 160 | 161 | .owl-carousel .owl-video-play-icon:hover { 162 | -ms-transform: scale(1.3, 1.3); 163 | transform: scale(1.3, 1.3); } 164 | 165 | .owl-carousel .owl-video-playing .owl-video-tn, 166 | .owl-carousel .owl-video-playing .owl-video-play-icon { 167 | display: none; } 168 | 169 | .owl-carousel .owl-video-tn { 170 | opacity: 0; 171 | height: 100%; 172 | background-position: center center; 173 | background-repeat: no-repeat; 174 | background-size: contain; 175 | transition: opacity 400ms ease; } 176 | 177 | .owl-carousel .owl-video-frame { 178 | position: relative; 179 | z-index: 1; 180 | height: 100%; 181 | width: 100%; } 182 | -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/owlcarousel/assets/owl.carousel.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.2 3 | * Copyright 2013-2018 David Deutsch 4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 5 | */ 6 | .owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y;touch-action:manipulation;-moz-backface-visibility:hidden}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .owl-wrapper{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;cursor:hand;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel .owl-nav button.owl-next,.owl-carousel .owl-nav button.owl-prev,.owl-carousel button.owl-dot{background:0 0;color:inherit;border:none;padding:0!important;font:inherit}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{visibility:hidden}.owl-carousel.owl-drag .owl-item{-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.owl-carousel .animated{animation-duration:1s;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{animation-name:fadeOut}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item img.owl-lazy{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%} -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/owlcarousel/assets/owl.theme.default.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.2 3 | * Copyright 2013-2018 David Deutsch 4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 5 | */ 6 | /* 7 | * Default theme - Owl Carousel CSS File 8 | */ 9 | .owl-theme .owl-nav { 10 | margin-top: 10px; 11 | text-align: center; 12 | -webkit-tap-highlight-color: transparent; } 13 | .owl-theme .owl-nav [class*='owl-'] { 14 | color: #FFF; 15 | font-size: 14px; 16 | margin: 5px; 17 | padding: 4px 7px; 18 | background: #D6D6D6; 19 | display: inline-block; 20 | cursor: pointer; 21 | border-radius: 3px; } 22 | .owl-theme .owl-nav [class*='owl-']:hover { 23 | background: #869791; 24 | color: #FFF; 25 | text-decoration: none; } 26 | .owl-theme .owl-nav .disabled { 27 | opacity: 0.5; 28 | cursor: default; } 29 | 30 | .owl-theme .owl-nav.disabled + .owl-dots { 31 | margin-top: 10px; } 32 | 33 | .owl-theme .owl-dots { 34 | text-align: center; 35 | -webkit-tap-highlight-color: transparent; } 36 | .owl-theme .owl-dots .owl-dot { 37 | display: inline-block; 38 | zoom: 1; 39 | *display: inline; } 40 | .owl-theme .owl-dots .owl-dot span { 41 | width: 10px; 42 | height: 10px; 43 | margin: 5px 7px; 44 | background: #D6D6D6; 45 | display: block; 46 | -webkit-backface-visibility: visible; 47 | transition: opacity 200ms ease; 48 | border-radius: 30px; } 49 | .owl-theme .owl-dots .owl-dot.active span, .owl-theme .owl-dots .owl-dot:hover span { 50 | background: #869791; } 51 | -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/owlcarousel/assets/owl.theme.default.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.2 3 | * Copyright 2013-2018 David Deutsch 4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 5 | */ 6 | .owl-theme .owl-dots,.owl-theme .owl-nav{text-align:center;-webkit-tap-highlight-color:transparent}.owl-theme .owl-nav{margin-top:10px}.owl-theme .owl-nav [class*=owl-]{color:#FFF;font-size:14px;margin:5px;padding:4px 7px;background:#D6D6D6;display:inline-block;cursor:pointer;border-radius:3px}.owl-theme .owl-nav [class*=owl-]:hover{background:#869791;color:#FFF;text-decoration:none}.owl-theme .owl-nav .disabled{opacity:.5;cursor:default}.owl-theme .owl-nav.disabled+.owl-dots{margin-top:10px}.owl-theme .owl-dots .owl-dot{display:inline-block;zoom:1}.owl-theme .owl-dots .owl-dot span{width:10px;height:10px;margin:5px 7px;background:#D6D6D6;display:block;-webkit-backface-visibility:visible;transition:opacity .2s ease;border-radius:30px}.owl-theme .owl-dots .owl-dot.active span,.owl-theme .owl-dots .owl-dot:hover span{background:#869791} -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/owlcarousel/assets/owl.theme.green.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.2 3 | * Copyright 2013-2018 David Deutsch 4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 5 | */ 6 | /* 7 | * Green theme - Owl Carousel CSS File 8 | */ 9 | .owl-theme .owl-nav { 10 | margin-top: 10px; 11 | text-align: center; 12 | -webkit-tap-highlight-color: transparent; } 13 | .owl-theme .owl-nav [class*='owl-'] { 14 | color: #FFF; 15 | font-size: 14px; 16 | margin: 5px; 17 | padding: 4px 7px; 18 | background: #D6D6D6; 19 | display: inline-block; 20 | cursor: pointer; 21 | border-radius: 3px; } 22 | .owl-theme .owl-nav [class*='owl-']:hover { 23 | background: #4DC7A0; 24 | color: #FFF; 25 | text-decoration: none; } 26 | .owl-theme .owl-nav .disabled { 27 | opacity: 0.5; 28 | cursor: default; } 29 | 30 | .owl-theme .owl-nav.disabled + .owl-dots { 31 | margin-top: 10px; } 32 | 33 | .owl-theme .owl-dots { 34 | text-align: center; 35 | -webkit-tap-highlight-color: transparent; } 36 | .owl-theme .owl-dots .owl-dot { 37 | display: inline-block; 38 | zoom: 1; 39 | *display: inline; } 40 | .owl-theme .owl-dots .owl-dot span { 41 | width: 10px; 42 | height: 10px; 43 | margin: 5px 7px; 44 | background: #D6D6D6; 45 | display: block; 46 | -webkit-backface-visibility: visible; 47 | transition: opacity 200ms ease; 48 | border-radius: 30px; } 49 | .owl-theme .owl-dots .owl-dot.active span, .owl-theme .owl-dots .owl-dot:hover span { 50 | background: #4DC7A0; } 51 | -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/owlcarousel/assets/owl.theme.green.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.2 3 | * Copyright 2013-2018 David Deutsch 4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 5 | */ 6 | .owl-theme .owl-dots,.owl-theme .owl-nav{text-align:center;-webkit-tap-highlight-color:transparent}.owl-theme .owl-nav{margin-top:10px}.owl-theme .owl-nav [class*=owl-]{color:#FFF;font-size:14px;margin:5px;padding:4px 7px;background:#D6D6D6;display:inline-block;cursor:pointer;border-radius:3px}.owl-theme .owl-nav [class*=owl-]:hover{background:#4DC7A0;color:#FFF;text-decoration:none}.owl-theme .owl-nav .disabled{opacity:.5;cursor:default}.owl-theme .owl-nav.disabled+.owl-dots{margin-top:10px}.owl-theme .owl-dots .owl-dot{display:inline-block;zoom:1}.owl-theme .owl-dots .owl-dot span{width:10px;height:10px;margin:5px 7px;background:#D6D6D6;display:block;-webkit-backface-visibility:visible;transition:opacity .2s ease;border-radius:30px}.owl-theme .owl-dots .owl-dot.active span,.owl-theme .owl-dots .owl-dot:hover span{background:#4DC7A0} -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/owlcarousel/assets/owl.video.play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskAzure/static/lib/owlcarousel/assets/owl.video.play.png -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/superfish/hoverIntent.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * hoverIntent v1.8.1 // 2014.08.11 // jQuery v1.9.1+ 3 | * http://briancherne.github.io/jquery-hoverIntent/ 4 | * 5 | * You may use hoverIntent under the terms of the MIT license. Basically that 6 | * means you are free to use hoverIntent as long as this header is left intact. 7 | * Copyright 2007, 2014 Brian Cherne 8 | */ 9 | 10 | /* hoverIntent is similar to jQuery's built-in "hover" method except that 11 | * instead of firing the handlerIn function immediately, hoverIntent checks 12 | * to see if the user's mouse has slowed down (beneath the sensitivity 13 | * threshold) before firing the event. The handlerOut function is only 14 | * called after a matching handlerIn. 15 | * 16 | * // basic usage ... just like .hover() 17 | * .hoverIntent( handlerIn, handlerOut ) 18 | * .hoverIntent( handlerInOut ) 19 | * 20 | * // basic usage ... with event delegation! 21 | * .hoverIntent( handlerIn, handlerOut, selector ) 22 | * .hoverIntent( handlerInOut, selector ) 23 | * 24 | * // using a basic configuration object 25 | * .hoverIntent( config ) 26 | * 27 | * @param handlerIn function OR configuration object 28 | * @param handlerOut function OR selector for delegation OR undefined 29 | * @param selector selector OR undefined 30 | * @author Brian Cherne 31 | */ 32 | 33 | ;(function(factory) { 34 | 'use strict'; 35 | if (typeof define === 'function' && define.amd) { 36 | define(['jquery'], factory); 37 | } else if (jQuery && !jQuery.fn.hoverIntent) { 38 | factory(jQuery); 39 | } 40 | })(function($) { 41 | 'use strict'; 42 | 43 | // default configuration values 44 | var _cfg = { 45 | interval: 100, 46 | sensitivity: 6, 47 | timeout: 0 48 | }; 49 | 50 | // counter used to generate an ID for each instance 51 | var INSTANCE_COUNT = 0; 52 | 53 | // current X and Y position of mouse, updated during mousemove tracking (shared across instances) 54 | var cX, cY; 55 | 56 | // saves the current pointer position coordinates based on the given mousemove event 57 | var track = function(ev) { 58 | cX = ev.pageX; 59 | cY = ev.pageY; 60 | }; 61 | 62 | // compares current and previous mouse positions 63 | var compare = function(ev,$el,s,cfg) { 64 | // compare mouse positions to see if pointer has slowed enough to trigger `over` function 65 | if ( Math.sqrt( (s.pX-cX)*(s.pX-cX) + (s.pY-cY)*(s.pY-cY) ) < cfg.sensitivity ) { 66 | $el.off(s.event,track); 67 | delete s.timeoutId; 68 | // set hoverIntent state as active for this element (permits `out` handler to trigger) 69 | s.isActive = true; 70 | // overwrite old mouseenter event coordinates with most recent pointer position 71 | ev.pageX = cX; ev.pageY = cY; 72 | // clear coordinate data from state object 73 | delete s.pX; delete s.pY; 74 | return cfg.over.apply($el[0],[ev]); 75 | } else { 76 | // set previous coordinates for next comparison 77 | s.pX = cX; s.pY = cY; 78 | // use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs) 79 | s.timeoutId = setTimeout( function(){compare(ev, $el, s, cfg);} , cfg.interval ); 80 | } 81 | }; 82 | 83 | // triggers given `out` function at configured `timeout` after a mouseleave and clears state 84 | var delay = function(ev,$el,s,out) { 85 | delete $el.data('hoverIntent')[s.id]; 86 | return out.apply($el[0],[ev]); 87 | }; 88 | 89 | $.fn.hoverIntent = function(handlerIn,handlerOut,selector) { 90 | // instance ID, used as a key to store and retrieve state information on an element 91 | var instanceId = INSTANCE_COUNT++; 92 | 93 | // extend the default configuration and parse parameters 94 | var cfg = $.extend({}, _cfg); 95 | if ( $.isPlainObject(handlerIn) ) { 96 | cfg = $.extend(cfg, handlerIn); 97 | if ( !$.isFunction(cfg.out) ) { 98 | cfg.out = cfg.over; 99 | } 100 | } else if ( $.isFunction(handlerOut) ) { 101 | cfg = $.extend(cfg, { over: handlerIn, out: handlerOut, selector: selector } ); 102 | } else { 103 | cfg = $.extend(cfg, { over: handlerIn, out: handlerIn, selector: handlerOut } ); 104 | } 105 | 106 | // A private function for handling mouse 'hovering' 107 | var handleHover = function(e) { 108 | // cloned event to pass to handlers (copy required for event object to be passed in IE) 109 | var ev = $.extend({},e); 110 | 111 | // the current target of the mouse event, wrapped in a jQuery object 112 | var $el = $(this); 113 | 114 | // read hoverIntent data from element (or initialize if not present) 115 | var hoverIntentData = $el.data('hoverIntent'); 116 | if (!hoverIntentData) { $el.data('hoverIntent', (hoverIntentData = {})); } 117 | 118 | // read per-instance state from element (or initialize if not present) 119 | var state = hoverIntentData[instanceId]; 120 | if (!state) { hoverIntentData[instanceId] = state = { id: instanceId }; } 121 | 122 | // state properties: 123 | // id = instance ID, used to clean up data 124 | // timeoutId = timeout ID, reused for tracking mouse position and delaying "out" handler 125 | // isActive = plugin state, true after `over` is called just until `out` is called 126 | // pX, pY = previously-measured pointer coordinates, updated at each polling interval 127 | // event = string representing the namespaced event used for mouse tracking 128 | 129 | // clear any existing timeout 130 | if (state.timeoutId) { state.timeoutId = clearTimeout(state.timeoutId); } 131 | 132 | // namespaced event used to register and unregister mousemove tracking 133 | var mousemove = state.event = 'mousemove.hoverIntent.hoverIntent'+instanceId; 134 | 135 | // handle the event, based on its type 136 | if (e.type === 'mouseenter') { 137 | // do nothing if already active 138 | if (state.isActive) { return; } 139 | // set "previous" X and Y position based on initial entry point 140 | state.pX = ev.pageX; state.pY = ev.pageY; 141 | // update "current" X and Y position based on mousemove 142 | $el.off(mousemove,track).on(mousemove,track); 143 | // start polling interval (self-calling timeout) to compare mouse coordinates over time 144 | state.timeoutId = setTimeout( function(){compare(ev,$el,state,cfg);} , cfg.interval ); 145 | } else { // "mouseleave" 146 | // do nothing if not already active 147 | if (!state.isActive) { return; } 148 | // unbind expensive mousemove event 149 | $el.off(mousemove,track); 150 | // if hoverIntent state is true, then call the mouseOut function after the specified delay 151 | state.timeoutId = setTimeout( function(){delay(ev,$el,state,cfg.out);} , cfg.timeout ); 152 | } 153 | }; 154 | 155 | // listen for mouseenter and mouseleave 156 | return this.on({'mouseenter.hoverIntent':handleHover,'mouseleave.hoverIntent':handleHover}, cfg.selector); 157 | }; 158 | }); 159 | -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/superfish/superfish.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery Superfish Menu Plugin - v1.7.9 3 | * Copyright (c) 2016 Joel Birch 4 | * 5 | * Dual licensed under the MIT and GPL licenses: 6 | * http://www.opensource.org/licenses/mit-license.php 7 | * http://www.gnu.org/licenses/gpl.html 8 | */ 9 | 10 | ;!function(a,b){"use strict";var c=function(){var c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",menuArrowClass:"sf-arrows"},d=function(){var b=/^(?![\w\W]*Windows Phone)[\w\W]*(iPhone|iPad|iPod)/i.test(navigator.userAgent);return b&&a("html").css("cursor","pointer").on("click",a.noop),b}(),e=function(){var a=document.documentElement.style;return"behavior"in a&&"fill"in a&&/iemobile/i.test(navigator.userAgent)}(),f=function(){return!!b.PointerEvent}(),g=function(a,b,d){var e,f=c.menuClass;b.cssArrows&&(f+=" "+c.menuArrowClass),e=d?"addClass":"removeClass",a[e](f)},h=function(b,d){return b.find("li."+d.pathClass).slice(0,d.pathLevels).addClass(d.hoverClass+" "+c.bcClass).filter(function(){return a(this).children(d.popUpSelector).hide().show().length}).removeClass(d.pathClass)},i=function(a,b){var d=b?"addClass":"removeClass";a.children("a")[d](c.anchorClass)},j=function(a){var b=a.css("ms-touch-action"),c=a.css("touch-action");c=c||b,c="pan-y"===c?"auto":"pan-y",a.css({"ms-touch-action":c,"touch-action":c})},k=function(a){return a.closest("."+c.menuClass)},l=function(a){return k(a).data("sfOptions")},m=function(){var b=a(this),c=l(b);clearTimeout(c.sfTimer),b.siblings().superfish("hide").end().superfish("show")},n=function(b){b.retainPath=a.inArray(this[0],b.$path)>-1,this.superfish("hide"),this.parents("."+b.hoverClass).length||(b.onIdle.call(k(this)),b.$path.length&&a.proxy(m,b.$path)())},o=function(){var b=a(this),c=l(b);d?a.proxy(n,b,c)():(clearTimeout(c.sfTimer),c.sfTimer=setTimeout(a.proxy(n,b,c),c.delay))},p=function(b){var c=a(this),d=l(c),e=c.siblings(b.data.popUpSelector);return d.onHandleTouch.call(e)===!1?this:void(e.length>0&&e.is(":hidden")&&(c.one("click.superfish",!1),"MSPointerDown"===b.type||"pointerdown"===b.type?c.trigger("focus"):a.proxy(m,c.parent("li"))()))},q=function(b,c){var g="li:has("+c.popUpSelector+")";a.fn.hoverIntent&&!c.disableHI?b.hoverIntent(m,o,g):b.on("mouseenter.superfish",g,m).on("mouseleave.superfish",g,o);var h="MSPointerDown.superfish";f&&(h="pointerdown.superfish"),d||(h+=" touchend.superfish"),e&&(h+=" mousedown.superfish"),b.on("focusin.superfish","li",m).on("focusout.superfish","li",o).on(h,"a",c,p)};return{hide:function(b){if(this.length){var c=this,d=l(c);if(!d)return this;var e=d.retainPath===!0?d.$path:"",f=c.find("li."+d.hoverClass).add(this).not(e).removeClass(d.hoverClass).children(d.popUpSelector),g=d.speedOut;if(b&&(f.show(),g=0),d.retainPath=!1,d.onBeforeHide.call(f)===!1)return this;f.stop(!0,!0).animate(d.animationOut,g,function(){var b=a(this);d.onHide.call(b)})}return this},show:function(){var a=l(this);if(!a)return this;var b=this.addClass(a.hoverClass),c=b.children(a.popUpSelector);return a.onBeforeShow.call(c)===!1?this:(c.stop(!0,!0).animate(a.animation,a.speed,function(){a.onShow.call(c)}),this)},destroy:function(){return this.each(function(){var b,d=a(this),e=d.data("sfOptions");return e?(b=d.find(e.popUpSelector).parent("li"),clearTimeout(e.sfTimer),g(d,e),i(b),j(d),d.off(".superfish").off(".hoverIntent"),b.children(e.popUpSelector).attr("style",function(a,b){return b.replace(/display[^;]+;?/g,"")}),e.$path.removeClass(e.hoverClass+" "+c.bcClass).addClass(e.pathClass),d.find("."+e.hoverClass).removeClass(e.hoverClass),e.onDestroy.call(d),void d.removeData("sfOptions")):!1})},init:function(b){return this.each(function(){var d=a(this);if(d.data("sfOptions"))return!1;var e=a.extend({},a.fn.superfish.defaults,b),f=d.find(e.popUpSelector).parent("li");e.$path=h(d,e),d.data("sfOptions",e),g(d,e,!0),i(f,!0),j(d),q(d,e),f.not("."+c.bcClass).superfish("hide",!0),e.onInit.call(this)})}}}();a.fn.superfish=function(b,d){return c[b]?c[b].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof b&&b?a.error("Method "+b+" does not exist on jQuery.fn.superfish"):c.init.apply(this,arguments)},a.fn.superfish.defaults={popUpSelector:"ul,.sf-mega",hoverClass:"sfHover",pathClass:"overrideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},animationOut:{opacity:"hide"},speed:"normal",speedOut:"fast",cssArrows:!0,disableHI:!1,onInit:a.noop,onBeforeShow:a.noop,onShow:a.noop,onBeforeHide:a.noop,onHide:a.noop,onIdle:a.noop,onDestroy:a.noop,onHandleTouch:a.noop}}(jQuery,window); -------------------------------------------------------------------------------- /DeployFlaskAzure/static/lib/wow/wow.min.js: -------------------------------------------------------------------------------- 1 | /*! WOW wow.js - v1.3.0 - 2016-10-04 2 | * https://wowjs.uk 3 | * Copyright (c) 2016 Thomas Grainger; Licensed MIT */!function(a,b){if("function"==typeof define&&define.amd)define(["module","exports"],b);else if("undefined"!=typeof exports)b(module,exports);else{var c={exports:{}};b(c,c.exports),a.WOW=c.exports}}(this,function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){return b.indexOf(a)>=0}function e(a,b){for(var c in b)if(null==a[c]){var d=b[c];a[c]=d}return a}function f(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)}function g(a){var b=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],c=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],d=arguments.length<=3||void 0===arguments[3]?null:arguments[3],e=void 0;return null!=document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(a,b,c,d)):null!=document.createEventObject?(e=document.createEventObject(),e.eventType=a):e.eventName=a,e}function h(a,b){null!=a.dispatchEvent?a.dispatchEvent(b):b in(null!=a)?a[b]():"on"+b in(null!=a)&&a["on"+b]()}function i(a,b,c){null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c}function j(a,b,c){null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]}function k(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight}Object.defineProperty(b,"__esModule",{value:!0});var l,m,n=function(){function a(a,b){for(var c=0;c=0){var b=a.target||a.srcElement;b.className=b.className.replace(this.config.animateClass,"").trim()}}},{key:"customStyle",value:function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a}},{key:"vendorSet",value:function(a,b){for(var c in b)if(b.hasOwnProperty(c)){var d=b[c];a[""+c]=d;for(var e=0;e=e&&f>=c}},{key:"disabled",value:function(){return!this.config.mobile&&f(navigator.userAgent)}}]),a}();b["default"]=r,a.exports=b["default"]}); 4 | -------------------------------------------------------------------------------- /DeployFlaskHeroku/Images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskHeroku/Images/1.png -------------------------------------------------------------------------------- /DeployFlaskHeroku/Images/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskHeroku/Images/2.png -------------------------------------------------------------------------------- /DeployFlaskHeroku/Images/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskHeroku/Images/3.png -------------------------------------------------------------------------------- /DeployFlaskHeroku/Images/heroku.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskHeroku/Images/heroku.png -------------------------------------------------------------------------------- /DeployFlaskHeroku/Procfile: -------------------------------------------------------------------------------- 1 | web: gunicorn app:app -------------------------------------------------------------------------------- /DeployFlaskHeroku/README.md: -------------------------------------------------------------------------------- 1 |

Deployment Of Flask App on Heroku 2 |

3 | 4 | >Heroku is a platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud. It is generally considered to be easy-to-use. But it’s most beneficial to businesses in specific situations. Heroku has a free service model for small projects, but tiered service packages exist for cases where more complex business needs must be addressed. 5 | 6 | > In this Repo I implemented Prediction of salary using Linear Regression and deployed to Heroku. 7 |

To Review the Implemented Deployment Please visit 8 | https://tharun3.herokuapp.com

9 | 10 |

STEPS TO FOLLOW

11 |

1. Create a Directory Containing FlaskApp, Index.html and requirements.txt

12 |

NOTE   :   To generate requirements .txt , go to path in command prompt or Terminal and type pipreqs 13 | 14 | >Add These in your   requirements.txt   as these ensure proper deployment in Heroku cloud. 15 | 16 | ``` 17 | gunicorn==19.9.0 18 | itsdangerous==1.1.0 19 | Jinja2==2.10.1 20 | MarkupSafe==1.1.1 21 | Werkzeug==0.15.5 22 | ``` 23 | 24 |

2. Create a Procfile

25 | 26 | >A Procfile is a list of process types in an app. 27 | 28 | ``` 29 | web: gunicorn app:app 30 | ``` 31 | >The first app represents the name of the python file that runs your application or the name of the module it is in. The second app represents your app name. 32 | 33 |

In My repo My python name is app.py and application name is app.

34 | 35 |

Upload These Files in Git Repo

36 | 37 | ``` 38 | model.pkl 39 | app.py 40 | requirements.txt 41 | Procfile 42 | templates 43 | ``` 44 | 45 | 46 |

3. Open Heroku clock create new and select app

47 |

Give a name to your app and create

48 |

4. Connect to github and select Your Repo.

49 | 50 | 51 | > * Make Sure Port is set to 5000 or any valid port value. 52 | > * If you have Images in your html page , they should be in static folder. 53 | 54 |

Please Refer the Structure

55 | 56 | 57 |

4 . Click Deploy Branch

58 | 59 | 60 |

A Link Will be Generated after sucessful Deployment like this https://tharun3.herokuapp.com

61 | 62 |
63 | 64 |

References

65 | 66 | - Flask Documentation 67 | 68 | - Deploying Machine Learning models as flask app 69 | 70 | - Deploying Flask Application to Heroku 71 | 72 |

Thank You :D

73 |

Hope you found it insightful. I would love to hear feedback from you to improvise it and make it better!

74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /DeployFlaskHeroku/app.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | from flask import Flask, request, jsonify, render_template 4 | import pickle 5 | 6 | app = Flask(__name__,template_folder='templates') 7 | model = pickle.load(open('model.pkl', 'rb')) 8 | 9 | @app.route('/') 10 | def home(): 11 | return render_template('index.html') 12 | 13 | @app.route('/predict',methods=['POST']) 14 | def predict(): 15 | ''' 16 | For rendering results on HTML GUI 17 | ''' 18 | int_features = [float(x) for x in request.form.values()] 19 | final_features = [np.array(int_features)] 20 | prediction = model.predict(final_features) 21 | result=0.0 22 | for i in prediction: 23 | for j in i: 24 | result=j 25 | 26 | return render_template('index.html', prediction_text='Employee Salary should be $ {:.2f}'.format(result*100)) 27 | 28 | 29 | if __name__ == '__main__': 30 | app.run(port = 5000, debug=True) 31 | -------------------------------------------------------------------------------- /DeployFlaskHeroku/model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/DeployFlaskHeroku/model.pkl -------------------------------------------------------------------------------- /DeployFlaskHeroku/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask==2.3.2 2 | gunicorn==19.9.0 3 | itsdangerous==1.1.0 4 | Jinja2==2.11.3 5 | MarkupSafe==1.1.1 6 | Werkzeug==2.2.3 7 | numpy>=1.9.2 8 | scipy>=0.15.1 9 | scikit-learn>=0.18 10 | matplotlib>=1.4.3 11 | pandas>=0.19 12 | 13 | -------------------------------------------------------------------------------- /DeployFlaskHeroku/slr.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Tue Dec 24 23:27:24 2019 4 | 5 | @author: kumar 6 | """ 7 | 8 | import pandas as pd 9 | import numpy as np 10 | import matplotlib.pyplot as plt 11 | import seaborn as sns 12 | import statsmodels.formula.api as smf 13 | import statistics as sts 14 | import pylab 15 | 16 | dataset=pd.read_csv("C:\\Users\\kumar\\PythonAssign\\Linear\\Linear\\Datasets\\Salary_Data.csv") 17 | dataset.columns 18 | import statsmodels.formula.api as smf 19 | model=smf.ols("Salary~YearsExperience",data=dataset).fit() 20 | pred=model.predict(dataset) 21 | dataset_binary = dataset[['YearsExperience', 'Salary']] 22 | X = np.array(dataset_binary['YearsExperience']).reshape(-1, 1) 23 | y = np.array(dataset_binary['Salary']).reshape(-1, 1) 24 | y=np.log(dataset_binary.Salary) 25 | y=np.array(y).reshape(-1,1) 26 | from sklearn.model_selection import train_test_split 27 | x_train, x_test, y_train, y_test = train_test_split(X,y, test_size=0.3, random_state=42) 28 | from sklearn import linear_model 29 | regressor= linear_model.LinearRegression() 30 | regressor.fit(x_train,y_train) 31 | import pickle 32 | pickle.dump(regressor, open('model.pkl', 'wb')) 33 | model=pickle.load(open('model.pkl','rb')) -------------------------------------------------------------------------------- /DeployFlaskHeroku/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Flask app 4 | 5 | 6 | 7 | 22 | 23 | -------------------------------------------------------------------------------- /Images/azure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Images/azure.png -------------------------------------------------------------------------------- /Images/conclusion.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Images/conclusion.jpeg -------------------------------------------------------------------------------- /Images/gcp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Images/gcp.jpg -------------------------------------------------------------------------------- /Images/general.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Images/general.png -------------------------------------------------------------------------------- /Images/index.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Images/index.jpeg -------------------------------------------------------------------------------- /Images/meme.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/developers-cosmos/DeployMachineLearningModels/296a46a61b7e618fac750a580f68d2bda75621f5/Images/meme.jpeg -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 |

Deployment Of Machine Learning Models

2 | 3 |

Imagine You built an Optimized Model and got an accuracy of x%. You stop the Process , Continue to next Model. But in Real Case Scenarios, Bringing Models into Production and Sharing Business insights is Important.

4 | 5 | >Don''t Know How to Deploy? 6 | 7 | 8 | 9 | > Don't worry . This Repo Contains Deployment of Machine Learning Models on Various cloud services like Azure, Heroku, AWS,GCP etc. 10 | 11 |

Let's get Started

12 | 13 |

Data scientists build Machine learning models in jupyter lab, google colab and the likes, Machine learning engineers take the built model into production. 14 | 15 | Deployment of an ML-model simply means the integration of the model into an existing production environment which can take in an input and return an output that can be used in making practical business decisions. 16 |

17 | 18 |

General Architecture

19 | 20 | 21 | 22 | 23 | 24 | 25 |

Deployment Types

26 | 27 | 28 | 29 |

1. Deploying Models in PAAS

30 | 31 | 32 | > Machine Learning Models can be Deployed on Paas like Heroku, AWS ElasticBeanStalk, Azure Web apps etc. 33 | 34 |

Platform-as-a-service provides a framework for developers to create their own applications. Essential, PaaS gives developers an online platform to create and manage software without worrying about maintaining everything else. Users manage the applications and data they create and store while the provider handles all the rest. PaaS offerings are built on virtualizations and often come with services to aid in testing and deploying applications.

35 | 36 |

Pass Architectures

37 |

1 . GCP Architecture

38 | 39 |

2 . Azure Architecture

40 | 41 |

2. Deploying in IAAS

42 | 43 | 44 | >Machine Learning Models can be Deployed on Iaas like AWS EC2, GCP Virtual Machines etc. 45 | 46 |

Infrastructure-as-a-service offers the most management responsibilities for users. IaaS is a fully self-service model where the provider delivers infrastructure resources via virtualization technologies. IaaS comprises scalable computing, storage, and security capabilities accessed on an API or dashboard. Users manage the data infrastructure themselves without having to worry about physical installations. 47 | 48 | With IaaS, users have the most control over the resources provided to them. IaaS offers the systems needed to deploy applications and software without the need to maintain physical hardware. This means, though, that users need to ensure they handle the runtime and OS securely in order to avoid distributing harmful software. IaaS eliminates the physical aspect of owning and operating data centers while still requiring the same safety and security protocols.

49 | 50 |

Conclusion

51 | 52 | 53 | 54 |

Thank You :D

55 |

I have used many online resources while creating the application and I would like to thank them . Hope you found it insightful.If you have any queries you can mail me at : kumartharun435@gmail.com . I would love to hear feedback from you to improvise it and make it better!

56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | --------------------------------------------------------------------------------