-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2,411 changed files
with
331,782 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
# Importing | ||
import numpy as np | ||
from flask import Flask, request, jsonify, render_template | ||
import pickle | ||
|
||
app = Flask(__name__) | ||
|
||
|
||
@app.route('/') | ||
def home(): | ||
return render_template('index.html') | ||
|
||
|
||
|
||
if __name__ == "__main__": | ||
app.run(debug=True) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Flask==1.1.1 | ||
gunicorn==19.9.0 | ||
itsdangerous==1.1.0 | ||
Jinja2==2.10.1 | ||
MarkupSafe==1.1.1 | ||
Werkzeug==0.15.5 | ||
numpy>=1.9.2 | ||
scipy>=0.15.1 | ||
scikit-learn>=0.18 | ||
matplotlib>=1.4.3 | ||
pandas>=0.19 | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
( function ( $ ) { | ||
"use strict"; | ||
|
||
|
||
// const brandPrimary = '#20a8d8' | ||
const brandSuccess = '#4dbd74' | ||
const brandInfo = '#63c2de' | ||
const brandDanger = '#f86c6b' | ||
|
||
function convertHex (hex, opacity) { | ||
hex = hex.replace('#', '') | ||
const r = parseInt(hex.substring(0, 2), 16) | ||
const g = parseInt(hex.substring(2, 4), 16) | ||
const b = parseInt(hex.substring(4, 6), 16) | ||
|
||
const result = 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')' | ||
return result | ||
} | ||
|
||
function random (min, max) { | ||
return Math.floor(Math.random() * (max - min + 1) + min) | ||
} | ||
|
||
var elements = 27 | ||
var data1 = [] | ||
var data2 = [] | ||
var data3 = [] | ||
|
||
for (var i = 0; i <= elements; i++) { | ||
data1.push(random(50, 200)) | ||
data2.push(random(80, 100)) | ||
data3.push(65) | ||
} | ||
|
||
|
||
//Traffic Chart | ||
var ctx = document.getElementById( "trafficChart" ); | ||
//ctx.height = 200; | ||
var myChart = new Chart( ctx, { | ||
type: 'line', | ||
data: { | ||
labels: ['M', 'T', 'W', 'T', 'F', 'S', 'S', 'M', 'T', 'W', 'T', 'F', 'S', 'S', 'M', 'T', 'W', 'T', 'F', 'S', 'S', 'M', 'T', 'W', 'T', 'F', 'S', 'S'], | ||
datasets: [ | ||
{ | ||
label: 'My First dataset', | ||
backgroundColor: convertHex(brandInfo, 10), | ||
borderColor: brandInfo, | ||
pointHoverBackgroundColor: '#fff', | ||
borderWidth: 2, | ||
data: data1 | ||
}, | ||
{ | ||
label: 'My Second dataset', | ||
backgroundColor: 'transparent', | ||
borderColor: brandSuccess, | ||
pointHoverBackgroundColor: '#fff', | ||
borderWidth: 2, | ||
data: data2 | ||
}, | ||
{ | ||
label: 'My Third dataset', | ||
backgroundColor: 'transparent', | ||
borderColor: brandDanger, | ||
pointHoverBackgroundColor: '#fff', | ||
borderWidth: 1, | ||
borderDash: [8, 5], | ||
data: data3 | ||
} | ||
] | ||
}, | ||
options: { | ||
// maintainAspectRatio: true, | ||
// legend: { | ||
// display: false | ||
// }, | ||
// scales: { | ||
// xAxes: [{ | ||
// display: false, | ||
// categoryPercentage: 1, | ||
// barPercentage: 0.5 | ||
// }], | ||
// yAxes: [ { | ||
// display: false | ||
// } ] | ||
// } | ||
|
||
|
||
maintainAspectRatio: true, | ||
legend: { | ||
display: false | ||
}, | ||
responsive: true, | ||
scales: { | ||
xAxes: [{ | ||
gridLines: { | ||
drawOnChartArea: false | ||
} | ||
}], | ||
yAxes: [ { | ||
ticks: { | ||
beginAtZero: true, | ||
maxTicksLimit: 5, | ||
stepSize: Math.ceil(250 / 5), | ||
max: 250 | ||
}, | ||
gridLines: { | ||
display: true | ||
} | ||
} ] | ||
}, | ||
elements: { | ||
point: { | ||
radius: 0, | ||
hitRadius: 10, | ||
hoverRadius: 4, | ||
hoverBorderWidth: 3 | ||
} | ||
} | ||
|
||
|
||
} | ||
} ); | ||
|
||
|
||
} )( jQuery ); |
File renamed without changes.
Oops, something went wrong.