In this summer period, I worked on FOSSASIA's Open Event projects (comprising of Open Event Server and Open Event Frontend). The Open Event , popularly know as Eventyay, is an open sourced event management platform which enables users to host conferences and various kinds of meet-ups and helps them customize their event according to their requirements. Sophisticated features like tickets, payment collections, groups and call for speakers have been provided and can be further fine tuned into several tracks, venues and sessions etc.
- Related Setup: https://gist.github.com/hofmannsven/6814278
- Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
- Interactive Beginners Tutorial: http://try.github.io/
- Git Cheatsheet by GitHub: https://services.github.com/on-demand/downloads/github-git-cheat-sheet/
Press minus + shift + s
and return
to chop/fold long lines!
Create an empty git repo or reinitialize an existing one
git init
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 joblib import dump , load | |
## dump your model | |
model1 = dump(your_mode_name) | |
#load your model | |
clf = load('model1.joblib') | |
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 joblib import load, dump | |
#dump your model | |
model1 = dump(your_model_name) | |
## loading the joblib model | |
clf = load('/home/saurabh/Desktop/smsspamcollection/frontend/model1.joblib') |
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
import requests | |
from flask import Flask, request,render_template | |
import sys | |
app = Flask(__name__) | |
app.config['DEBUG'] = True | |
// Your view goes here | |
if __name__ == "__main__": | |
app.run(debug = 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 sklearn import svmprediction = clf.classify_many(my_msg) ## make your prediction here | |
from joblib import dump, load | |
## loading the model | |
clf = load('/home/saurabh/Desktop/smsspamcollection/frontend/model1.joblib') | |
@app.route('/', methods = ["GET","POST"]) | |
def index(): | |
if(request.method == "POST"): | |
#city = request.form['city'] | |
text_msg = request.form['sms'] | |
my_msg = find_features(text_msg) |
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
<html> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> | |
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
<! - - - Include the above in your HEAD tag - - - - → | |
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous"> | |
<div class="container"> | |
<style> |
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
import requests | |
from flask import Flask, request,render_template | |
import sys | |
import nltk | |
import sklearn | |
import pandas | |
import numpy | |
import pandas as pd | |
import numpy as np | |
from sklearn.preprocessing import LabelEncoder |
NewerOlder