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
from flask import Flask | |
from flask_sqlalchemy import SQLAlchemy | |
from flask_script import Manager | |
from flask_migrate import Migrate, MigrateCommand | |
app = Flask(__name__) | |
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://localhost/appdb' | |
db = SQLAlchemy(app) | |
migrate = Migrate(app, db) |
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
from flask import Flask | |
from flask_sqlalchemy import SQLAlchemy | |
app = Flask(__name__) | |
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://localhost/testdb' | |
db = SQLAlchemy(app) | |
class Post(db.Model): | |
id = db.Column(db.Integer(), primary_key=True) |
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
from flask import Flask, request, render_template | |
from flask_sqlalchemy import SQLAlchemy | |
# Settings | |
app = Flask(__name__) | |
app.config['DEBUG'] = True | |
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://localhost/appdb' | |
db = SQLAlchemy(app) | |
@app.route('/') |
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
from flask import Flask, render_template, request, url_for, redirect | |
app = Flask(__name__) | |
@app.route('/') | |
def hello_there(): | |
return 'Hello there!' | |
@app.route('/form', methods=['POST', 'GET']) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Bio-Data Details</title> | |
</head> | |
<body> | |
<h1>Bio-Data Details</h1> | |
<hr> | |
<h1>Username: {{ username }}</h1> | |
<h1>Email: {{ email }}</h1> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<h1>Bio Data Form</h1> | |
<form action="showbio"> | |
<label>Username</label> | |
<input type="name" name="username"><br> |
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
from flask import Flask, render_template, request, url_for, redirect | |
app = Flask(__name__) | |
@app.route('/') | |
def hello_there(): | |
return 'Hello there!' | |
@app.route('/form', methods=['POST', 'GET']) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Bio-Data</title> | |
</head> | |
<body> | |
<form action="showbio"> | |
<input type="text" name="username" placeholder="Your Name"/> | |
<input type="text" name="age" placeholder="Your Age"/> | |
<input type="text" name="email" placeholder="Your Mail ID"/> |
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
from flask import Flask | |
app = Flask(__name__) | |
@app.route('/') | |
def hello_world(): | |
return 'Hello, World!' | |
if __name__ =="__main__": | |
app.run(debug=True,port=8080) |
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
# Importing Modules | |
from sklearn.datasets import load_iris | |
import matplotlib.pyplot as plt | |
from sklearn.cluster import DBSCAN | |
from sklearn.decomposition import PCA | |
# Load Dataset | |
iris = load_iris() | |
# Declaring Model |