├── Calculator ├── calc_tk.py └── small.gif ├── LICENSE ├── Python_Quiz ├── FlaskQuizProject │ ├── .vscode │ │ └── settings.json │ ├── myapp.py │ ├── put_data.py │ ├── question_bank.db │ ├── static │ │ ├── css │ │ │ ├── bootstrap-grid.css │ │ │ ├── bootstrap-grid.css.map │ │ │ ├── bootstrap-grid.min.css │ │ │ ├── bootstrap-grid.min.css.map │ │ │ ├── bootstrap-reboot.css │ │ │ ├── bootstrap-reboot.css.map │ │ │ ├── bootstrap-reboot.min.css │ │ │ ├── bootstrap-reboot.min.css.map │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ ├── bootstrap.min.css.map │ │ │ ├── main.css │ │ │ └── styles.css │ │ ├── data │ │ │ └── question_bank.db │ │ ├── images │ │ │ └── grras.gif │ │ └── js │ │ │ ├── bootstrap.bundle.js │ │ │ ├── bootstrap.bundle.js.map │ │ │ ├── bootstrap.bundle.min.js │ │ │ ├── bootstrap.bundle.min.js.map │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.js.map │ │ │ ├── bootstrap.min.js │ │ │ ├── bootstrap.min.js.map │ │ │ ├── jquery-3.3.1.js │ │ │ ├── quiz.js │ │ │ └── timer.js │ └── templates │ │ ├── ajax.html │ │ ├── index.html │ │ ├── new_template.html │ │ ├── old_index.html │ │ ├── quiz.html │ │ ├── template.html │ │ └── title.html ├── Python_Quiz.py ├── Python_Quiz_Star.ipynb ├── Python_Quiz_final.py ├── Python_Quiz_final.py~ ├── Python_Quiz_v2.0.py ├── data_set.txt ├── newpythonquiz.py ├── question_bank.db ├── result.txt └── start_dump.txt ├── README.md ├── Text_Extractor ├── Desktop Application │ ├── __pycache__ │ │ └── text_extract.cpython-36.pyc │ ├── text_extract.py │ └── text_extract.py~ ├── Django Website │ └── TextExtractor │ │ ├── TextExtractor │ │ ├── __init__.py │ │ ├── settings.py │ │ ├── templates │ │ │ ├── home.html │ │ │ ├── index.html │ │ │ ├── main.html │ │ │ ├── new.html │ │ │ ├── reset.html │ │ │ ├── reset_password.html │ │ │ └── success.html │ │ ├── urls.py │ │ └── wsgi.py │ │ ├── db.sqlite3 │ │ ├── er.jpg │ │ ├── manage.py │ │ ├── myapp │ │ ├── .views.py.swp │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── forms.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── 0002_auto_20180430_1158.py │ │ │ ├── 0003_auto_20180430_1203.py │ │ │ ├── 0004_auto_20180430_1212.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── tests.py │ │ ├── textextract.py │ │ ├── urls.py │ │ └── views.py │ │ ├── raw │ │ ├── admin.py │ │ ├── forms.py │ │ ├── models.py │ │ ├── textextract.py │ │ └── views.py │ │ └── static │ │ ├── data │ │ ├── css │ │ │ ├── new.css │ │ │ └── style.css │ │ ├── js │ │ │ └── index.js │ │ └── scss │ │ │ └── style.scss │ │ ├── new.png │ │ ├── removed_noise.png │ │ ├── result.txt │ │ └── test.jpg └── test images │ ├── -badge.png │ ├── 7.jpg │ ├── arya.PNG │ ├── code_background.png │ ├── download.jpg │ ├── english1.png │ ├── english2.jpg │ ├── english3.jpg │ ├── english4.jpg │ ├── english5.jpg │ ├── english6.jpg │ ├── english_test.jpg │ ├── geo1.PNG │ ├── geo2.PNG │ ├── hindi.jpg │ ├── hindi3.jpg │ ├── hindi_test.jpg │ ├── hindi_test1.jpg │ ├── new-test1.jpg │ ├── removed_noise.png │ ├── test_hindi.jpg │ ├── test_hindi1.jpg │ ├── test_hindi2.jpg │ ├── test_hindi3.jpg │ ├── thres.png │ └── zen-of-python-poster-a3.png ├── addressbook ├── addressbook.py └── contacts.data ├── event ├── .idea │ ├── .name │ ├── encodings.xml │ ├── event.iml │ ├── misc.xml │ ├── modules.xml │ ├── scopes │ │ └── scope_settings.xml │ ├── vcs.xml │ └── workspace.xml ├── db.sqlite3 ├── event │ ├── .settings.py.un~ │ ├── __pycache__ │ │ ├── __init__.cpython-36.pyc │ │ ├── settings.cpython-36.pyc │ │ ├── settings.cpython-37.pyc │ │ ├── urls.cpython-36.pyc │ │ ├── urls.cpython-37.pyc │ │ ├── wsgi.cpython-36.pyc │ │ └── wsgi.cpython-37.pyc │ ├── settings.py │ ├── settings.py~ │ ├── urls.py │ ├── urls.py~ │ └── wsgi.py ├── manage.py ├── myapp │ ├── .models.py.un~ │ ├── .views.py.un~ │ ├── __pycache__ │ │ ├── __init__.cpython-36.pyc │ │ ├── admin.cpython-36.pyc │ │ ├── admin.cpython-37.pyc │ │ ├── forms.cpython-36.pyc │ │ ├── forms.cpython-37.pyc │ │ ├── models.cpython-36.pyc │ │ ├── models.cpython-37.pyc │ │ ├── urls.cpython-36.pyc │ │ ├── urls.cpython-37.pyc │ │ ├── views.cpython-36.pyc │ │ └── views.cpython-37.pyc │ ├── admin.py │ ├── admin.py~ │ ├── apps.py │ ├── forms.py │ ├── forms.py~ │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── __init__.py │ │ └── __pycache__ │ │ │ ├── 0001_initial.cpython-36.pyc │ │ │ ├── 0001_initial.cpython-37.pyc │ │ │ ├── __init__.cpython-36.pyc │ │ │ └── __init__.cpython-37.pyc │ ├── models.py │ ├── models.py~ │ ├── static │ │ ├── css │ │ │ ├── about.css │ │ │ ├── bgimage.jpg │ │ │ ├── contact.css │ │ │ ├── contact.css~ │ │ │ ├── footer.css │ │ │ ├── header.css │ │ │ ├── home.css │ │ │ ├── img │ │ │ │ ├── Thumbs.db │ │ │ │ ├── arrow-left.png │ │ │ │ ├── arrow-right.png │ │ │ │ ├── banner1.jpg │ │ │ │ ├── banner2.jpg │ │ │ │ ├── banner3.jpg │ │ │ │ ├── slider1.jpg │ │ │ │ ├── slider2.jpg │ │ │ │ └── slider3.png │ │ │ ├── login.css │ │ │ ├── main.css │ │ │ └── slider.css │ │ ├── css2 │ │ │ ├── Thumbs.db │ │ │ ├── about.css │ │ │ ├── bgimage.jpg │ │ │ ├── contact.css │ │ │ ├── footer.css │ │ │ ├── header.css │ │ │ ├── home.css │ │ │ ├── login.css │ │ │ ├── main.css │ │ │ └── slider.css │ │ ├── images │ │ │ ├── 93e17b76-171f-4e36-bc9e-cbf1ae98603d (1).png │ │ │ ├── 93e17b76-171f-4e36-bc9e-cbf1ae98603d.png │ │ │ ├── Venue1.jpg │ │ │ ├── Venue2.jpg │ │ │ ├── Venue3.jpeg │ │ │ ├── Venue3.jpg │ │ │ ├── bgimage.jpg │ │ │ ├── desert1.jpg │ │ │ ├── dessert2.jpg │ │ │ ├── dessert3.jpg │ │ │ ├── slider1.jpg │ │ │ ├── slider2.jpg │ │ │ ├── slider3.jpg │ │ │ ├── slider4.jpg │ │ │ ├── slider5.jpg │ │ │ ├── slider5.png │ │ │ ├── starter1.jpg │ │ │ ├── starter2.jpg │ │ │ └── starter3.jpg │ │ └── js │ │ │ ├── jquery-3.2.1.min.js │ │ │ └── login.js │ ├── templates │ │ └── myapp │ │ │ ├── .login.html.swp │ │ │ ├── about.html │ │ │ ├── base.html │ │ │ ├── change_password.html │ │ │ ├── contact.html │ │ │ ├── footer.html │ │ │ ├── header.html │ │ │ ├── home.html │ │ │ ├── home.html~ │ │ │ ├── login.html │ │ │ ├── main.html │ │ │ ├── profile.html │ │ │ ├── profile.html~ │ │ │ ├── reset_password.html │ │ │ ├── slider.html │ │ │ └── wedding.html │ ├── tests.py │ ├── urls.py │ ├── urls.py~ │ ├── views.py │ └── views.py~ └── profile_pics │ └── ImageProcessing.jpg ├── myproject ├── .idea │ ├── .name │ ├── encodings.xml │ ├── misc.xml │ ├── modules.xml │ ├── myproject.iml │ ├── scopes │ │ └── scope_settings.xml │ ├── vcs.xml │ └── workspace.xml ├── .put_data_base.py.un~ ├── data_set.csv ├── db.sqlite3 ├── django.pdf ├── manage.py ├── multi_threding_in_Python │ ├── .four.py.un~ │ ├── .one.py.un~ │ ├── .three.py.un~ │ ├── .two.py.un~ │ ├── four.py │ ├── four.py~ │ ├── one.py │ ├── one.py~ │ ├── three.py │ ├── three.py~ │ ├── two.py │ └── two.py~ ├── myapp │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-36.pyc │ │ ├── admin.cpython-36.pyc │ │ ├── forms.cpython-36.pyc │ │ ├── models.cpython-36.pyc │ │ ├── urls.cpython-36.pyc │ │ └── views.cpython-36.pyc │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── 0002_auto_20180626_1653.py │ │ ├── __init__.py │ │ └── __pycache__ │ │ │ ├── 0001_initial.cpython-36.pyc │ │ │ ├── 0002_auto_20180626_1653.cpython-36.pyc │ │ │ └── __init__.cpython-36.pyc │ ├── models.py │ ├── tests.py │ ├── urls.py │ └── views.py ├── myproject │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-36.pyc │ │ ├── settings.cpython-36.pyc │ │ ├── urls.cpython-36.pyc │ │ └── wsgi.cpython-36.pyc │ ├── settings.py │ ├── settings.py~ │ ├── urls.py │ └── wsgi.py ├── put_data_base.py ├── static │ └── myapp │ │ └── main.css ├── templates │ └── myapp │ │ ├── foot.html │ │ ├── forgot.html │ │ ├── head.html │ │ ├── hello.html │ │ ├── index.html │ │ ├── mklogin.html │ │ ├── mksignup.html │ │ └── signup.html └── tkinter_3.pdf ├── security_webcam └── webcam.py └── tic_tac_toe.py /Calculator/small.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Calculator/small.gif -------------------------------------------------------------------------------- /Python_Quiz/FlaskQuizProject/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.linting.pylintEnabled": false, 3 | "python.linting.flake8Enabled": true, 4 | "python.linting.enabled": true, 5 | "python.pythonPath": "C:\\Anaconda3\\python.exe" 6 | } -------------------------------------------------------------------------------- /Python_Quiz/FlaskQuizProject/myapp.py: -------------------------------------------------------------------------------- 1 | from flask import Flask,request,render_template,session,redirect,jsonify 2 | import pymysql as sql 3 | import json 4 | from datetime import timedelta 5 | import random 6 | 7 | app = Flask(__name__) 8 | app.secret_key = b'_5#y2L"F4Q8z\n\xec]/' 9 | 10 | with open('question_bank.db') as f : 11 | data = json.load(f) 12 | f.close() 13 | questions =[ 14 | { 'question': d, 'options': data[d][0],'answer':data[d][1] } for d in data 15 | ] 16 | random.shuffle(questions) 17 | questions = questions[:50] 18 | 19 | total_ques = len(questions) 20 | 21 | 22 | @app.route('/') 23 | def index(): 24 | if 'username' in session and 'ques' in session : 25 | return render_template('quiz.html',name=session['username'],course=session['course']) 26 | 27 | return render_template('index.html') 28 | 29 | @app.route('/startquiz/',methods=['GET','POST']) 30 | def startquiz(): 31 | if request.method == 'POST' : 32 | fname = request.form['fname'] 33 | lname = request.form['lname'] 34 | email = request.form['email'] 35 | course = request.form['course'] 36 | session['username'] = fname.capitalize()+" "+lname.capitalize() 37 | session['course'] = course.upper() 38 | session['ques'] = 0 39 | return render_template('quiz.html',name=session['username'],course=session['course']) 40 | #return "Invalid Form Method We Only Accept POST Methods" 41 | elif 'username' in session :#and 'ques' in session : 42 | return render_template('quiz.html',name=session['username'],course=session['course']) 43 | else : 44 | return redirect("/", code=302) 45 | 46 | 47 | @app.route('/logout/') 48 | def logout(): 49 | session.pop('username',None) 50 | session.pop('course',None) 51 | #session.pop('ques',None) 52 | return redirect("/", code=302) 53 | 54 | 55 | @app.route('/question/') 56 | def question(ques=None): 57 | if ques < len(questions): 58 | session['ques'] = ques 59 | new_ques = { 'question': questions[ques]['question'],'options':questions[ques]['options'],'total_questions':total_ques} 60 | return jsonify(new_ques) 61 | else : 62 | return jsonify(None) 63 | 64 | 65 | @app.route('/check_question/',methods=['POST','GET']) 66 | def check(): 67 | ques = request.form['ques'] 68 | ans = request.form['answer'] 69 | print(ques,ans) 70 | if str(questions[int(ques)]['answer']).strip().lower() == str(ans).strip().lower() : 71 | 72 | return jsonify(True) 73 | else : 74 | return jsonify(False) 75 | 76 | if __name__ == "__main__" : 77 | app.run(debug=True) 78 | #app.run('192.168.1.107',5000,debug=True) 79 | -------------------------------------------------------------------------------- /Python_Quiz/FlaskQuizProject/put_data.py: -------------------------------------------------------------------------------- 1 | import pymysql as sql 2 | import json 3 | 4 | data = json.load(open('question_bank.db')) 5 | 6 | con = sql.connect('localhost','root','','python') 7 | cursor = con.cursor() 8 | 9 | cmd = """insert into quiz(ques,op1,op2,op3,op4,ans) values("{}","{}","{}","{}","{}","{}")""" 10 | c = 1 11 | for key,value in data.items() : 12 | ques = key.strip().capitalize() 13 | opt = [ op.strip().lower() for op in value[0] ] 14 | ans = value[1].strip() 15 | new_cmd = cmd.format(ques,*opt,ans) 16 | cursor.execute(new_cmd) 17 | con.commit() 18 | print("Exported Data SucessFully") -------------------------------------------------------------------------------- /Python_Quiz/FlaskQuizProject/static/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.3.1 (https://getbootstrap.com/) 3 | * Copyright 2011-2019 The Bootstrap Authors 4 | * Copyright 2011-2019 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important} 8 | /*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /Python_Quiz/FlaskQuizProject/static/css/main.css: -------------------------------------------------------------------------------- 1 | 2 | #title_div { 3 | text-align: center; 4 | 5 | /* background-color:#333333; */ 6 | width: 100%; 7 | align-content: center; 8 | /* position: relative; */ 9 | padding: 0%; 10 | margin: 0%; 11 | } 12 | 13 | #title_div h1 { 14 | text-align: center; 15 | font-family: 'Lobster'; 16 | letter-spacing: .2vw; 17 | font-size:2vw; 18 | } 19 | 20 | h1, button, input, select, p { 21 | text-align: center; 22 | font-family: 'Lobster'; letter-spacing: .2vw; 23 | 24 | color:#202020; 25 | } 26 | 27 | #ques h1, button, input, select { 28 | text-align: left; 29 | font-family: 'Times New Roman', Times, serif; 30 | letter-spacing: .2vw; 31 | color:#202020; 32 | } 33 | 34 | 35 | 36 | #footer_div { 37 | color:#202020; 38 | text-align: center; 39 | /* background-color:#333333; */ 40 | 41 | width: 100%; 42 | margin: 0%; 43 | /* 44 | position: fixed; 45 | top: 80%; */ 46 | clear: both; 47 | } 48 | 49 | #middle_div { padding: 0%; 50 | margin: 0%; 51 | 52 | /*position: fixed; 53 | 54 | top: 20%; */ 55 | left:25%; 56 | float: left; 57 | /*text-align: center;*/ 58 | width: 50%; 59 | /* background: #353535; */ 60 | /* height:500px; */ 61 | overflow: hidden; 62 | } 63 | 64 | #left_div { padding: 0px; 65 | margin: 0%; 66 | 67 | float: left; 68 | /* position: fixed; 69 | top: 20%; */ 70 | left: 0%; 71 | /* height:500px; */ 72 | overflow: hidden; 73 | width: 25%; 74 | /* background:green; */ 75 | } 76 | 77 | #right_div { padding: 0%; 78 | margin: 0%; 79 | /*position: fixed; 80 | 81 | top: 20%; */ 82 | right: 0%; 83 | /* background: red; */ 84 | float: left; 85 | width: 25%; 86 | } 87 | 88 | 89 | h1 { color:#202020; } 90 | -------------------------------------------------------------------------------- /Python_Quiz/FlaskQuizProject/static/css/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | text-align: center; 3 | font-family: sans-serif; 4 | margin: 0 auto; 5 | background : #efefef; 6 | color : #313131; 7 | 8 | } 9 | 10 | #options { padding: 30px; margin: 0 auto;} 11 | button{ 12 | padding: 10px; 13 | font-size: 18px; 14 | text-align: center; 15 | width:100%; 16 | background: #e7e7e7; 17 | color: #123123; 18 | border-radius: 25px; 19 | box-shadow: #313131; 20 | } 21 | button:hover { 22 | background: #123456; 23 | color: white; 24 | } 25 | 26 | #heading { 27 | margin : 0 auto; 28 | font-family: monospace; 29 | font-size : 20px; 30 | padding: 20px; 31 | } 32 | 33 | 34 | 35 | #correct-div { 36 | margin : 0 auto; 37 | padding : 20px; 38 | font-size : 20px ; 39 | color : #123456; 40 | 41 | } 42 | 43 | #question_b { 44 | padding: 10px; 45 | font-size: 18px; 46 | text-align: center; 47 | width:30%; 48 | background: #e7e7e7; 49 | color: #123123; 50 | 51 | } 52 | 53 | #question_b:hover { 54 | background: #123456; 55 | color: white; 56 | } 57 | 58 | #ask-question { 59 | margin : 0 auto; 60 | padding: 30px; 61 | height: 500px; 62 | overflow-y: scroll; 63 | text-align: center; 64 | padding-right: 0px; 65 | box-sizing: content-box; 66 | 67 | } 68 | 69 | 70 | #question_button{ 71 | height: 450px; 72 | overflow-y: scroll; 73 | padding-right: 0px; 74 | box-sizing: content-box; 75 | } -------------------------------------------------------------------------------- /Python_Quiz/FlaskQuizProject/static/images/grras.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Python_Quiz/FlaskQuizProject/static/images/grras.gif -------------------------------------------------------------------------------- /Python_Quiz/FlaskQuizProject/static/js/quiz.js: -------------------------------------------------------------------------------- 1 | 2 | let correct = 0; 3 | let question_number = 0; 4 | 5 | let total_ques = 0 6 | 7 | document.addEventListener("DOMContentLoaded",()=>{ fetch_data(); }); 8 | 9 | function fetch_data(){ 10 | $.ajax({ 11 | url : '/question/'+question_number, 12 | success : function(data){ load_question(data); }, }); 13 | } 14 | 15 | 16 | function load_question(data) { 17 | if ( data ) { 18 | 19 | if (!total_ques){ 20 | set_question_buttons(data); 21 | } 22 | 23 | document.querySelector("#question").innerHTML = "Q."+(question_number+1)+" "+ data.question; 24 | const options = document.querySelector("#options"); 25 | options.innerHTML = ""; 26 | 27 | for ( const option of data.options){ 28 | options.innerHTML += `
`; }; 29 | 30 | document.querySelectorAll(".option").forEach(option => { 31 | option.onclick = (b) => { 32 | var ans = option.textContent; 33 | 34 | $.ajax({ 35 | url : '/check_question/', 36 | type : 'POST', 37 | data : { ques:question_number,answer:ans }, 38 | success : function(data){ 39 | 40 | if (data){ correct += 1; } 41 | document.querySelectorAll("#question_b")[question_number].style.background = 'green'; 42 | question_number += 1; 43 | if ( question_number < total_ques ){ 44 | document.querySelectorAll("#question_b")[question_number].style.background = 'gray'; 45 | document.querySelector("#correct").innerHTML = correct+" of "+question_number; 46 | }; 47 | 48 | fetch_data(); 49 | } 50 | }) 51 | } 52 | }) 53 | } 54 | 55 | else { 56 | document.querySelector("#question").innerHTML = "Congratulations You Have Completed Python Quiz"; 57 | document.querySelector("#options").innerHTML = ""; 58 | document.querySelector("#result").innerHTML = "Your Final Score is : "+correct+"/"+question_number; 59 | } 60 | }; 61 | 62 | 63 | function set_question_buttons(data) { 64 | total_ques = data.total_questions 65 | document.querySelector("#total_ques").innerHTML = data.total_questions; 66 | let s = "" 67 | for (var i=0;i"; 69 | } 70 | document.querySelector("#question_button").innerHTML = s; 71 | document.querySelectorAll("#question_b")[question_number].style.background = 'gray'; 72 | document.querySelectorAll("#question_b").forEach( function(button) { 73 | button.addEventListener("click",function(){ 74 | document.querySelectorAll("#question_b")[question_number].style.background = "#e7e7e7"; 75 | this.style.background = 'gray'; 76 | question_number= button.textContent - 1; 77 | fetch_data(); 78 | }) 79 | }) 80 | } -------------------------------------------------------------------------------- /Python_Quiz/FlaskQuizProject/static/js/timer.js: -------------------------------------------------------------------------------- 1 | var hour = 0; 2 | var minutes = 0; 3 | var seconds = 0; 4 | 5 | function count(){ 6 | if ( seconds >= 60 ){ 7 | seconds = 0; 8 | minutes += 1; 9 | if (minutes >= 60 ){ 10 | minutes = 0; 11 | hour += 1; 12 | } 13 | } else { seconds += 1; } 14 | } 15 | 16 | setInterval(function(){ 17 | var t_s = '' 18 | var t_m = '' 19 | var t_h = '' 20 | count(); 21 | if ( seconds <= 9 ) { t_s += '0'+seconds; } else { t_s = seconds; } 22 | if ( minutes <= 9 ) { t_m += '0'+minutes; } else { t_m = minutes; } 23 | if ( hour <= 9 ) { t_h += '0' + hour; } else { t_h = hour; } 24 | document.querySelector("#timer").innerHTML = "

"+t_h+":"+t_m+":"+t_s+"

" 25 | },1000) 26 | -------------------------------------------------------------------------------- /Python_Quiz/FlaskQuizProject/templates/ajax.html: -------------------------------------------------------------------------------- 1 | 14 |

jQuery Example

15 |

+ 16 | = 17 | ? 18 |

calculate server side

-------------------------------------------------------------------------------- /Python_Quiz/FlaskQuizProject/templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends "template.html" %} 2 | 3 | 4 | {% block title %} 5 |

GRRAS SOLUTIONS PRIVATE LIMITED


6 | {% endblock %} 7 | 8 | 9 | 10 | 11 | {% block left %} 12 | {% endblock %} 13 | 14 | 15 | 16 | 17 | {% block middle %} 18 |
19 | 20 | 47 | 48 |
49 | {% endblock %} 50 | 51 | 52 | {% block right %} 53 | 54 | {% endblock %} 55 | 56 | 57 | {% block footer %} 58 |

© All Rights are reserved at Grras Solutions Pvt. Ltd, Jaipur

59 | {% endblock %} 60 | -------------------------------------------------------------------------------- /Python_Quiz/FlaskQuizProject/templates/new_template.html: -------------------------------------------------------------------------------- 1 | {% extends "template.html" %} 2 | 3 | 4 | {% block title %} 5 | 6 | 7 | 8 | {% endblock %} 9 | 10 | 11 | 12 | 13 | {% block left %} 14 | 15 | 16 | 17 | 18 | {% endblock %} 19 | 20 | 21 | {% block middle %} 22 | 23 | 24 | 25 | 26 | {% endblock %} 27 | 28 | 29 | {% block right %} 30 | 31 | 32 | 33 | 34 | {% endblock %} 35 | 36 | 37 | {% block footer %} 38 | 39 | 40 | 41 | 42 | {% endblock %} 43 | -------------------------------------------------------------------------------- /Python_Quiz/FlaskQuizProject/templates/old_index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Quiz 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |

Grras Solutions Pvt. Ltd., Jaipur (Rajashtan)

15 |

Quiz on Python

16 |
17 | 18 |
19 |

left content

20 |
21 |
22 |

middle page

23 |
24 | 25 |
26 |

right content

27 |
28 | 29 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Python_Quiz/FlaskQuizProject/templates/quiz.html: -------------------------------------------------------------------------------- 1 | {% extends "template.html" %} 2 | 3 | 4 | {% block header %} 5 | 6 | 8 | 9 | 10 | 11 | {% endblock %} 12 | 13 | {% block title %} 14 |

GRRAS SOLUTIONS PRIVATE LIMITED

15 |

{{ name }} LOGOUT


16 |

Quiz on {{ course }}

17 | 18 | 19 | 20 | {% endblock %} 21 | 22 | 23 | 24 | 25 | {% block left %} 26 |

All Questions

27 | 28 | 29 |
30 | 31 |
32 | {% endblock %} 33 | 34 | 35 | {% block middle %} 36 | 37 |
38 |
39 |

40 |

41 |
42 | 43 |
44 | 45 | {% endblock %} 46 | 47 | 48 | {% block right %} 49 | 50 |
51 | 52 |
53 |
54 |

Questions correct : 0 of 0

55 |

Total Questions

56 |
57 | 58 | 59 | 60 | {% endblock %} 61 | 62 | 63 | {% block footer %} 64 | 65 | 66 | 67 |

© All Rights are reserved at Grras Solutions Pvt. Ltd, Jaipur

68 | 69 | {% endblock %} 70 | -------------------------------------------------------------------------------- /Python_Quiz/FlaskQuizProject/templates/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Quiz 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | {% block header %} 21 | 22 | {% endblock %} 23 | 24 | 25 | 26 | 27 | 28 |
29 | {% block title %} 30 | 31 | {% endblock %} 32 |
33 |
34 | 35 |
36 |
37 | {% block left %} 38 | 39 | {% endblock %} 40 | 41 |
42 |
43 |
44 | {% block middle %} 45 | 46 | {% endblock %} 47 | 48 |
49 | 50 |
51 |
52 | {% block right %} 53 | 54 | {% endblock %} 55 | 56 |
57 |
58 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /Python_Quiz/FlaskQuizProject/templates/title.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Python_Quiz/FlaskQuizProject/templates/title.html -------------------------------------------------------------------------------- /Python_Quiz/data_set.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Python_Quiz/data_set.txt -------------------------------------------------------------------------------- /Python_Quiz/result.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Student Name : sachin 4 | Total Questions Attempted : 6 5 | Total Correct Questions : 0 6 | Total InCorrect Questions : 6 7 | Total Skipped Questions : 3 8 | Total Marks : 24 9 | Obtained Marks : -6 10 | Result Percentage : -25.00 11 | 12 | 13 | -------------------------------------------------------------------------------- /Python_Quiz/start_dump.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Python_Quiz/start_dump.txt -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Python-Projects 2 | #Some Basic Python3.6 Projects 3 | 4 | #Calculator 5 | 6 | #tkinter 7 | 8 | Calculator is a Basic GUI application with some of basic fuctions of calculator. 9 | such as addition,substraction,multiplication,division,power,modulas and floor division. 10 | also there is clr button to clear screen of calculator and delete button to delete wrong entry. 11 | 12 | This application is desgin using tkinter module and the code is simpler and easy to uderstand. 13 | 14 | #Event 15 | 16 | #Django 17 | 18 | This is a django powered website for event management. 19 | -------------------------------------------------------------------------------- /Text_Extractor/Desktop Application/__pycache__/text_extract.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/Desktop Application/__pycache__/text_extract.cpython-36.pyc -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/TextExtractor/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/Django Website/TextExtractor/TextExtractor/__init__.py -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/TextExtractor/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for TextExtractor project. 3 | 4 | Generated by 'django-admin startproject' using Django 2.0.4. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.0/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/2.0/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | 16 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 17 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 18 | 19 | 20 | # Quick-start development settings - unsuitable for production 21 | # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ 22 | 23 | # SECURITY WARNING: keep the secret key used in production secret! 24 | SECRET_KEY = '!j96+v+x8fj8bmpto8x66+h^j356e@1u1mf%c!(#hb)c@2k16-' 25 | 26 | 27 | EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' 28 | EMAIL_USE_SSL=True 29 | EMAIL_PORT = 465 30 | EMAIL_HOST = 'smtp.gmail.com' 31 | EMAIL_HOST_USER = '' 32 | EMAIL_HOST_PASSWORD = '' 33 | DEFAULT_FROM_EMAIL = EMAIL_HOST_USER 34 | 35 | 36 | # SECURITY WARNING: don't run with debug turned on in production! 37 | DEBUG = True 38 | 39 | ALLOWED_HOSTS = [] 40 | 41 | 42 | # Application definition 43 | 44 | INSTALLED_APPS = [ 45 | 'myapp', 46 | 'django.contrib.admin', 47 | 'django.contrib.auth', 48 | 'django.contrib.contenttypes', 49 | 'django.contrib.sessions', 50 | 'django.contrib.messages', 51 | 'django.contrib.staticfiles', 52 | ] 53 | 54 | MIDDLEWARE = [ 55 | 'django.middleware.security.SecurityMiddleware', 56 | 'django.contrib.sessions.middleware.SessionMiddleware', 57 | 'django.middleware.common.CommonMiddleware', 58 | 'django.middleware.csrf.CsrfViewMiddleware', 59 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 60 | 'django.contrib.messages.middleware.MessageMiddleware', 61 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 62 | ] 63 | 64 | ROOT_URLCONF = 'TextExtractor.urls' 65 | 66 | TEMPLATES = [ 67 | { 68 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 69 | 'DIRS': [os.path.join('TextExtractor/templates/'),], 70 | 'APP_DIRS': True, 71 | 'OPTIONS': { 72 | 'context_processors': [ 73 | 'django.template.context_processors.debug', 74 | 'django.template.context_processors.request', 75 | 'django.contrib.auth.context_processors.auth', 76 | 'django.contrib.messages.context_processors.messages', 77 | ], 78 | }, 79 | }, 80 | ] 81 | 82 | WSGI_APPLICATION = 'TextExtractor.wsgi.application' 83 | 84 | 85 | # Database 86 | # https://docs.djangoproject.com/en/2.0/ref/settings/#databases 87 | 88 | DATABASES = { 89 | 'default': { 90 | 'ENGINE': 'django.db.backends.sqlite3', 91 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 92 | } 93 | } 94 | 95 | 96 | # Password validation 97 | # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators 98 | 99 | AUTH_PASSWORD_VALIDATORS = [ 100 | { 101 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 102 | }, 103 | { 104 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 105 | }, 106 | { 107 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 108 | }, 109 | { 110 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 111 | }, 112 | ] 113 | 114 | 115 | # Internationalization 116 | # https://docs.djangoproject.com/en/2.0/topics/i18n/ 117 | 118 | LANGUAGE_CODE = 'en-us' 119 | 120 | TIME_ZONE = 'UTC' 121 | 122 | USE_I18N = True 123 | 124 | USE_L10N = True 125 | 126 | USE_TZ = True 127 | 128 | 129 | # Static files (CSS, JavaScript, Images) 130 | # https://docs.djangoproject.com/en/2.0/howto/static-files/ 131 | 132 | import os.path 133 | STATIC_ROOT = '' 134 | STATIC_URL = '/static/' 135 | STATICFILES_DIRS = [os.path.join('static'),] 136 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/TextExtractor/templates/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% load static %} 4 | 5 | 6 | Text Extractor 7 | 8 | 9 | 10 | 12 | 13 |
14 | 30 |
31 | 32 | 33 | 34 |

35 |
36 | Welcome to Text Extractor Program 37 |
38 |

39 | {% if error %} 40 | 41 |

Error: {{ error }}

42 | {% endif %} 43 | 44 | 45 | 46 |
47 |
58 | 59 | {% csrf_token %} 60 | 61 | {{ form.as_p }} 62 | 63 | 76 |
77 |
78 | 79 | 80 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/TextExtractor/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% load static %} 4 | 5 | 6 | Sign-Up/Login Form 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | {% if error %} 18 |

{{ error }}

19 | {% endif %} 20 |
21 | 22 | 26 | 27 | 28 |
29 |
30 | 31 | 32 |
33 | {% csrf_token %} 34 |
35 |
36 | 39 | 40 |
41 | 42 | 43 |
44 | 47 | 48 |
49 | 50 |
51 | 54 | 55 |
56 |
57 | 58 |
59 | 62 | 63 |
64 | 65 |
66 | 69 | 70 |
71 | 72 | 73 | 74 |
75 | 76 |
77 | 78 |
79 |

Welcome Back!

80 | 81 |
82 | {% csrf_token %} 83 |
84 | 87 | 88 |
89 | 90 |
91 | 94 | 95 |
96 | 97 |

Forgot Password?

98 | 99 | 100 | 101 |
102 | 103 |
104 | 105 |
106 | 107 |
108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/TextExtractor/templates/main.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Login 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | {% if error %} 15 |

{{ error }}

16 | 17 | {% endif %} 18 |
19 | 20 | 21 | 22 | 23 | 51 | 52 | 57 | 58 |
59 |

© Copyright by evemanagement.com

60 |
61 | 62 | 63 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/TextExtractor/templates/new.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% load static %} 4 | 5 | 6 | Text Extractor 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 |
22 |
23 |

Text Extractor

24 | 25 |
26 | 27 | 28 |
29 | 30 | {{ form.as_p }} 31 | 32 |
33 | 34 | 35 | 36 |
37 | 38 |
39 | 40 |

Forgot Password?

41 | 42 | 43 | 44 | 45 |
46 | 47 |
48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/TextExtractor/templates/reset.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% load static %} 4 | 5 | 6 | Text Extractor 7 | 8 | 9 | 10 | 12 | 13 | 14 |

15 |
16 | Reset Your Password 17 |
18 |

19 | {% if error %} 20 | 21 |

Error: {{ error }}

22 | {% endif %} 23 | 24 | 25 | 26 |
27 |
38 | 39 | {% csrf_token %} 40 | 41 | {{ form.as_p }} 42 | 43 | 56 |
57 |
58 | 59 | 60 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/TextExtractor/templates/reset_password.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% load static %} 4 | 5 | 6 | Text Extractor 7 | 8 | 9 | 10 | 12 | 13 | 14 |

15 |
16 | Rest Your Password 17 |
18 |

19 | {% if error %} 20 | 21 |

{{ error }}

22 | 23 | {% endif %} 24 | 25 | 26 | 27 |
28 |
39 | 40 | {% csrf_token %} 41 | 42 | {{ form.as_p }} 43 | 44 | 57 |
58 |
59 | 60 | 61 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/TextExtractor/templates/success.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Sucess Page 6 | 7 | 8 | 10 |
11 | 27 |
28 |
29 |

Result

30 |

31 | {% for var in result %} 32 | 33 | {{ var }} 34 |
35 | {% endfor %} 36 |

37 |
38 |
39 | {% load static %} 40 | Image Extract 41 | 42 |
43 | 44 | 45 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/TextExtractor/urls.py: -------------------------------------------------------------------------------- 1 | """TextExtractor URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/2.0/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.urls import include, path 14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 15 | """ 16 | from django.contrib import admin 17 | from django.urls import path,include 18 | 19 | urlpatterns = [ 20 | path('admin/', admin.site.urls), 21 | path('',include('myapp.urls')), 22 | 23 | ] 24 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/TextExtractor/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for TextExtractor project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "TextExtractor.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/Django Website/TextExtractor/db.sqlite3 -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/er.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/Django Website/TextExtractor/er.jpg -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "TextExtractor.settings") 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError as exc: 10 | raise ImportError( 11 | "Couldn't import Django. Are you sure it's installed and " 12 | "available on your PYTHONPATH environment variable? Did you " 13 | "forget to activate a virtual environment?" 14 | ) from exc 15 | execute_from_command_line(sys.argv) 16 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/myapp/.views.py.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/Django Website/TextExtractor/myapp/.views.py.swp -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/myapp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/Django Website/TextExtractor/myapp/__init__.py -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/myapp/admin.py: -------------------------------------------------------------------------------- 1 | __author__ = 'sachin yadav' 2 | from django.contrib import admin 3 | from .models import UserProfile 4 | 5 | 6 | # Register your models here. 7 | admin.site.register(UserProfile) 8 | from django.contrib import admin 9 | 10 | # Register your models here. 11 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/myapp/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class MyappConfig(AppConfig): 5 | name = 'myapp' 6 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/myapp/forms.py: -------------------------------------------------------------------------------- 1 | __author__ = 'sachin yadav' 2 | from django import forms 3 | 4 | class myData(forms.Form) : 5 | image = forms.ImageField() 6 | english = forms.BooleanField(required=False) 7 | hindi = forms.BooleanField(required=False) 8 | 9 | 10 | 11 | class signup_form(forms.Form): 12 | username = forms.CharField() 13 | first_name = forms.CharField() 14 | last_name = forms.CharField() 15 | password=forms.CharField(widget=forms.PasswordInput) 16 | email = forms.EmailField() 17 | 18 | class login_form(forms.Form): 19 | 20 | username = forms.CharField() 21 | password = forms.CharField(widget=forms.PasswordInput) 22 | 23 | 24 | class reset_form(forms.Form): 25 | 26 | email = forms.EmailField() 27 | 28 | class password(forms.Form): 29 | 30 | new_password = forms.CharField(widget=forms.PasswordInput) 31 | OTP = forms.IntegerField() 32 | 33 | class userprofile_form(forms.Form): 34 | 35 | profile_pic = forms.ImageField() 36 | birth_day = forms.DateField() 37 | bio = forms.CharField(max_length=2000) 38 | mob_no = forms.IntegerField() 39 | 40 | 41 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/myapp/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.4 on 2018-04-30 06:03 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | initial = True 10 | 11 | dependencies = [ 12 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 13 | ] 14 | 15 | operations = [ 16 | migrations.CreateModel( 17 | name='UserProfile', 18 | fields=[ 19 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 20 | ('user', models.ForeignKey(on_delete='CASECADE', to=settings.AUTH_USER_MODEL, unique=True)), 21 | ], 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/myapp/migrations/0002_auto_20180430_1158.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.4 on 2018-04-30 06:28 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('myapp', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='userprofile', 16 | name='user', 17 | field=models.ForeignKey(on_delete='CASECADE', to=settings.AUTH_USER_MODEL), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/myapp/migrations/0003_auto_20180430_1203.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.4 on 2018-04-30 06:33 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('myapp', '0002_auto_20180430_1158'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='userprofile', 16 | name='user', 17 | field=models.ForeignKey(on_delete='CASECADE', to=settings.AUTH_USER_MODEL, unique=True), 18 | ), 19 | ] 20 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/myapp/migrations/0004_auto_20180430_1212.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.4 on 2018-04-30 06:42 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('myapp', '0003_auto_20180430_1203'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='userprofile', 15 | name='Bio', 16 | field=models.TextField(default=None), 17 | ), 18 | migrations.AddField( 19 | model_name='userprofile', 20 | name='birth_day', 21 | field=models.DateField(default=None), 22 | ), 23 | ] 24 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/myapp/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/Django Website/TextExtractor/myapp/migrations/__init__.py -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/myapp/models.py: -------------------------------------------------------------------------------- 1 | __author__ = 'sachin yadav' 2 | 3 | from django.db import models 4 | from django.contrib.auth.models import User 5 | 6 | class UserProfile(models.Model): 7 | user = models.ForeignKey(User,unique=True,on_delete="CASECADE") 8 | birth_day = models.DateField(default=None) 9 | Bio = models.TextField(default=None) 10 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/myapp/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/myapp/textextract.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | def handle_uploaded_file(f): 4 | with open('static/test.jpg', 'wb+') as destination: 5 | for chunk in f.chunks(): 6 | destination.write(chunk) 7 | 8 | img_path = 'static/test.jpg' 9 | img = cv2.imread(img_path) 10 | img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) 11 | kernel = np.ones((1, 1), np.uint8) 12 | img = cv2.dilate(img, kernel, iterations=1) 13 | img = cv2.erode(img, kernel, iterations=1) 14 | cv2.imwrite("static/removed_noise.png", img) 15 | cv2.imwrite("static/new.png", img) 16 | 17 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/myapp/urls.py: -------------------------------------------------------------------------------- 1 | """TextExtractor URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/2.0/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.urls import include, path 14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 15 | """ 16 | from django.contrib import admin 17 | from django.urls import path 18 | from . import views 19 | urlpatterns = [ 20 | path('reset/',views.reset_password), 21 | path('forgot/',views.forgot), 22 | path('login/',views.login), 23 | path('logout/',views.logout), 24 | path('',views.index), 25 | path('home/',views.home), 26 | path('extract/',views.extract), 27 | path('sucess/',views.success), 28 | path('new/',views.new), 29 | path('signup/',views.signup), 30 | path('update/',views.update_password), 31 | ] 32 | 33 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/raw/admin.py: -------------------------------------------------------------------------------- 1 | __author__ = 'sachin yadav' 2 | from django.contrib import admin 3 | from .models import UserProfile 4 | 5 | 6 | # Register your models here. 7 | admin.site.register(UserProfile) 8 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/raw/forms.py: -------------------------------------------------------------------------------- 1 | __author__ = 'sachin yadav' 2 | from django import forms 3 | 4 | class myData(forms.Form) : 5 | image = forms.ImageField() 6 | english = forms.BooleanField(required=False) 7 | hindi = forms.BooleanField(required=False) 8 | 9 | 10 | 11 | class signup_form(forms.Form): 12 | Name = forms.CharField() 13 | FName = forms.CharField() 14 | LName = forms.CharField() 15 | Password=forms.CharField(widget=forms.PasswordInput) 16 | Email = forms.EmailField() 17 | 18 | class login_form(forms.Form): 19 | 20 | Email = forms.EmailField() 21 | Password = forms.CharField(widget=forms.PasswordInput) 22 | 23 | 24 | class reset_form(forms.Form): 25 | 26 | email = forms.EmailField() 27 | 28 | class password(forms.Form): 29 | 30 | new_password = forms.CharField(widget=forms.PasswordInput) 31 | OTP = forms.IntegerField() 32 | 33 | class userprofile_form(forms.Form): 34 | 35 | profile_pic = forms.ImageField() 36 | birth_day = forms.DateField() 37 | bio = forms.CharField(max_length=2000) 38 | mob_no = forms.IntegerField() 39 | 40 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/raw/models.py: -------------------------------------------------------------------------------- 1 | __author__ = 'sachin yadav' 2 | 3 | from django.db import models 4 | from django.contrib.auth.models import User 5 | 6 | class UserProfile(models.Model): 7 | user = models.ForeignKey(User,unique=True,on_delete="CASECADE") 8 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/raw/textextract.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import pytesseract 3 | import numpy as np 4 | from PIL import Image 5 | def handle_uploaded_file(f): 6 | with open('static/test.jpg', 'wb+') as destination: 7 | for chunk in f.chunks(): 8 | destination.write(chunk) 9 | 10 | img_path = 'static/test.jpg' 11 | img = cv2.imread(img_path) 12 | img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) 13 | kernel = np.ones((1, 1), np.uint8) 14 | img = cv2.dilate(img, kernel, iterations=1) 15 | img = cv2.erode(img, kernel, iterations=1) 16 | cv2.imwrite("C:\\Users\\sachin yadav\\Desktop\\TextExtractor\\static\\removed_noise.png", img) 17 | cv2.imwrite("C:\\Users\\sachin yadav\\Desktop\\TextExtractor\\static\\new.png", img) 18 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/raw/views.py: -------------------------------------------------------------------------------- 1 | from django.http import HttpResponse,HttpResponseRedirect 2 | from django.shortcuts import render 3 | from .forms import myData 4 | import pytesseract 5 | from PIL import Image 6 | from .textextract import handle_uploaded_file 7 | import smtplib 8 | from django.shortcuts import render 9 | from django.http import HttpResponse 10 | # Create your views here. 11 | from .forms import signup_form 12 | from django.contrib.auth.models import User 13 | from django.contrib.auth import authenticate 14 | from .models import UserProfile 15 | 16 | pytesseract.pytesseract.tesseract_cmd = 'C:/Program Files (x86)/Tesseract-OCR/tesseract' 17 | 18 | def home(request): 19 | form = myData() 20 | return render(request,'home.html',{ 'form' : form }) 21 | 22 | def index(request): 23 | return render(request,'index.html') 24 | def new(request): 25 | form = myData() 26 | return render(request,'new.html',{'form':form}) 27 | 28 | def extract(request): 29 | if request.method == 'POST': 30 | form = myData(request.POST, request.FILES) 31 | if form.is_valid(): 32 | handle_uploaded_file(request.FILES['image']) 33 | if form.cleaned_data['english'] and form.cleaned_data['hindi'] : 34 | f = myData() 35 | return render(request,'home.html',{'form':f,'error':'Choose Only One Language '}) 36 | elif not(form.cleaned_data['english']) and not(form.cleaned_data['hindi']) : 37 | f = myData() 38 | return render(request,'home.html',{'form':f,'error':'Choose Atleast One Language '}) 39 | 40 | elif form.cleaned_data['english'] : 41 | result = pytesseract.image_to_string(Image.open("static/new.png"),lang='eng') 42 | elif form.cleaned_data['hindi'] : 43 | result = pytesseract.image_to_string(Image.open("static/new.png"),lang='hin') 44 | f = open('static/result.txt','wb') 45 | f.write(result.encode('utf-8')) 46 | f.close() 47 | result = result.split('\n') 48 | return render(request,'success.html',{'result':result}) 49 | else: 50 | form = myData() 51 | return render(request, 'home.html', {'form': form}) 52 | 53 | def success(request): 54 | return HttpResponse('success') 55 | 56 | 57 | 58 | 59 | 60 | 61 | def signup(request): 62 | 63 | if request.method == 'POST': 64 | 65 | 66 | form = signup_form(request.POST) 67 | 68 | if form.is_valid(): 69 | Name = form.cleaned_data['Name'] 70 | FName=form.cleaned_data['FName'] 71 | LName=form.cleaned_data['LName'] 72 | Email=form.cleaned_data['Email'] 73 | Password=form.cleaned_data['Password'] 74 | 75 | 76 | 77 | try: 78 | Name = User.objects.get(username=Name) 79 | myerror = "User already Exist so Please Login.If not register then choose other username" 80 | context = { 'error':myerror} 81 | return render(request,'/',context ) 82 | except: 83 | 84 | u = User.objects.create_user(username=Name,password=Password) 85 | u.email=Email 86 | u.first_name=FName 87 | u.last_name=LName 88 | 89 | 90 | request.session['username']=Name 91 | request.session['password']=Password 92 | 93 | u.save() 94 | 95 | return render(request,'/home') 96 | 97 | 98 | 99 | #return HttpResponse("Name = %s
Email = %s
password = %s
"%(name,email,password)) 100 | else: 101 | error = "Form data is invalid Please try again " 102 | return render(request,'myapp/login.html',{'error':error}) 103 | 104 | else : 105 | error = "Invalid Entries in Form,Please Make sure all entries are correct" 106 | return render(request,'myapp/login.html',{'error':error}) 107 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/static/data/css/new.css: -------------------------------------------------------------------------------- 1 | button { 2 | style="border: 0; 3 | outline: none; 4 | border-radius: 0; 5 | padding: 15px 0; 6 | font-size: 1rem; 7 | font-weight: 600; 8 | text-transform: uppercase; 9 | letter-spacing: .1em; 10 | background: #1ab188; 11 | color: #ffffff; 12 | -webkit-transition: all 0.5s ease; 13 | transition: all 0.5s ease; 14 | -webkit-appearance: none; 15 | } 16 | 17 | body { 18 | background: #c1bdba; 19 | font-family: 'Titillium Web', sans-serif; 20 | } -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/static/data/css/style.css: -------------------------------------------------------------------------------- 1 | *, *:before, *:after { 2 | -webkit-box-sizing: border-box; 3 | box-sizing: border-box; 4 | } 5 | 6 | html { 7 | overflow-y: scroll; 8 | } 9 | 10 | body { 11 | background: #c1bdba; 12 | font-family: 'Titillium Web', sans-serif; 13 | } 14 | 15 | a { 16 | text-decoration: none; 17 | color: #1ab188; 18 | -webkit-transition: .5s ease; 19 | transition: .5s ease; 20 | } 21 | a:hover { 22 | color: #179b77; 23 | } 24 | 25 | .form { 26 | background: rgba(19, 35, 47, 0.9); 27 | padding: 40px; 28 | max-width: 600px; 29 | margin: 40px auto; 30 | border-radius: 4px; 31 | -webkit-box-shadow: 0 4px 10px 4px rgba(19, 35, 47, 0.3); 32 | box-shadow: 0 4px 10px 4px rgba(19, 35, 47, 0.3); 33 | } 34 | 35 | .tab-group { 36 | list-style: none; 37 | padding: 0; 38 | margin: 0 0 40px 0; 39 | } 40 | .tab-group:after { 41 | content: ""; 42 | display: table; 43 | clear: both; 44 | } 45 | .tab-group li a { 46 | display: block; 47 | text-decoration: none; 48 | padding: 15px; 49 | background: rgba(160, 179, 176, 0.25); 50 | color: #a0b3b0; 51 | font-size: 20px; 52 | float: left; 53 | width: 50%; 54 | text-align: center; 55 | cursor: pointer; 56 | -webkit-transition: .5s ease; 57 | transition: .5s ease; 58 | } 59 | .tab-group li a:hover { 60 | background: #179b77; 61 | color: #ffffff; 62 | } 63 | .tab-group .active a { 64 | background: #1ab188; 65 | color: #ffffff; 66 | } 67 | 68 | .tab-content > div:last-child { 69 | display: none; 70 | } 71 | 72 | h1 { 73 | text-align: center; 74 | color: #ffffff; 75 | font-weight: 300; 76 | margin: 0 0 40px; 77 | } 78 | 79 | label { 80 | position: absolute; 81 | -webkit-transform: translateY(6px); 82 | transform: translateY(6px); 83 | left: 13px; 84 | color: rgba(255, 255, 255, 0.5); 85 | -webkit-transition: all 0.25s ease; 86 | transition: all 0.25s ease; 87 | -webkit-backface-visibility: hidden; 88 | pointer-events: none; 89 | font-size: 22px; 90 | } 91 | label .req { 92 | margin: 2px; 93 | color: #1ab188; 94 | } 95 | 96 | label.active { 97 | -webkit-transform: translateY(50px); 98 | transform: translateY(50px); 99 | left: 2px; 100 | font-size: 14px; 101 | } 102 | label.active .req { 103 | opacity: 0; 104 | } 105 | 106 | label.highlight { 107 | color: #ffffff; 108 | } 109 | 110 | input, textarea { 111 | font-size: 22px; 112 | display: block; 113 | width: 100%; 114 | height: 100%; 115 | padding: 5px 10px; 116 | background: none; 117 | background-image: none; 118 | border: 1px solid #a0b3b0; 119 | color: #ffffff; 120 | border-radius: 0; 121 | -webkit-transition: border-color .25s ease, -webkit-box-shadow .25s ease; 122 | transition: border-color .25s ease, -webkit-box-shadow .25s ease; 123 | transition: border-color .25s ease, box-shadow .25s ease; 124 | transition: border-color .25s ease, box-shadow .25s ease, -webkit-box-shadow .25s ease; 125 | } 126 | input:focus, textarea:focus { 127 | outline: 0; 128 | border-color: #1ab188; 129 | } 130 | 131 | textarea { 132 | border: 2px solid #a0b3b0; 133 | resize: vertical; 134 | } 135 | 136 | .field-wrap { 137 | position: relative; 138 | margin-bottom: 40px; 139 | } 140 | 141 | .top-row:after { 142 | content: ""; 143 | display: table; 144 | clear: both; 145 | } 146 | .top-row > div { 147 | float: left; 148 | width: 48%; 149 | margin-right: 4%; 150 | } 151 | .top-row > div:last-child { 152 | margin: 0; 153 | } 154 | 155 | .button { 156 | border: 0; 157 | outline: none; 158 | border-radius: 0; 159 | padding: 15px 0; 160 | font-size: 2rem; 161 | font-weight: 600; 162 | text-transform: uppercase; 163 | letter-spacing: .1em; 164 | background: #1ab188; 165 | color: #ffffff; 166 | -webkit-transition: all 0.5s ease; 167 | transition: all 0.5s ease; 168 | -webkit-appearance: none; 169 | } 170 | .button:hover, .button:focus { 171 | background: #179b77; 172 | } 173 | 174 | .button-block { 175 | display: block; 176 | width: 100%; 177 | } 178 | 179 | .forgot { 180 | margin-top: -20px; 181 | text-align: right; 182 | } 183 | -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/static/data/js/index.js: -------------------------------------------------------------------------------- 1 | $('.form').find('input, textarea').on('keyup blur focus', function (e) { 2 | 3 | var $this = $(this), 4 | label = $this.prev('label'); 5 | 6 | if (e.type === 'keyup') { 7 | if ($this.val() === '') { 8 | label.removeClass('active highlight'); 9 | } else { 10 | label.addClass('active highlight'); 11 | } 12 | } else if (e.type === 'blur') { 13 | if( $this.val() === '' ) { 14 | label.removeClass('active highlight'); 15 | } else { 16 | label.removeClass('highlight'); 17 | } 18 | } else if (e.type === 'focus') { 19 | 20 | if( $this.val() === '' ) { 21 | label.removeClass('highlight'); 22 | } 23 | else if( $this.val() !== '' ) { 24 | label.addClass('highlight'); 25 | } 26 | } 27 | 28 | }); 29 | 30 | $('.tab a').on('click', function (e) { 31 | 32 | e.preventDefault(); 33 | 34 | $(this).parent().addClass('active'); 35 | $(this).parent().siblings().removeClass('active'); 36 | 37 | target = $(this).attr('href'); 38 | 39 | $('.tab-content > div').not(target).hide(); 40 | 41 | $(target).fadeIn(600); 42 | 43 | }); -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/static/data/scss/style.scss: -------------------------------------------------------------------------------- 1 | @import "compass/css3"; 2 | 3 | $body-bg: #c1bdba; 4 | $form-bg: #13232f; 5 | $white: #ffffff; 6 | 7 | $main: #1ab188; 8 | $main-light: lighten($main,5%); 9 | $main-dark: darken($main,5%); 10 | 11 | $gray-light: #a0b3b0; 12 | $gray: #ddd; 13 | 14 | $thin: 300; 15 | $normal: 400; 16 | $bold: 600; 17 | $br: 4px; 18 | 19 | *, *:before, *:after { 20 | box-sizing: border-box; 21 | } 22 | 23 | html { 24 | overflow-y: scroll; 25 | } 26 | 27 | body { 28 | background:$body-bg; 29 | font-family: 'Titillium Web', sans-serif; 30 | } 31 | 32 | a { 33 | text-decoration:none; 34 | color:$main; 35 | transition:.5s ease; 36 | &:hover { 37 | color:$main-dark; 38 | } 39 | } 40 | 41 | .form { 42 | background:rgba($form-bg,.9); 43 | padding: 40px; 44 | max-width:600px; 45 | margin:40px auto; 46 | border-radius:$br; 47 | box-shadow:0 4px 10px 4px rgba($form-bg,.3); 48 | } 49 | 50 | .tab-group { 51 | list-style:none; 52 | padding:0; 53 | margin:0 0 40px 0; 54 | &:after { 55 | content: ""; 56 | display: table; 57 | clear: both; 58 | } 59 | li a { 60 | display:block; 61 | text-decoration:none; 62 | padding:15px; 63 | background:rgba($gray-light,.25); 64 | color:$gray-light; 65 | font-size:20px; 66 | float:left; 67 | width:50%; 68 | text-align:center; 69 | cursor:pointer; 70 | transition:.5s ease; 71 | &:hover { 72 | background:$main-dark; 73 | color:$white; 74 | } 75 | } 76 | .active a { 77 | background:$main; 78 | color:$white; 79 | } 80 | } 81 | 82 | .tab-content > div:last-child { 83 | display:none; 84 | } 85 | 86 | 87 | h1 { 88 | text-align:center; 89 | color:$white; 90 | font-weight:$thin; 91 | margin:0 0 40px; 92 | } 93 | 94 | label { 95 | position:absolute; 96 | transform:translateY(6px); 97 | left:13px; 98 | color:rgba($white,.5); 99 | transition:all 0.25s ease; 100 | -webkit-backface-visibility: hidden; 101 | pointer-events: none; 102 | font-size:22px; 103 | .req { 104 | margin:2px; 105 | color:$main; 106 | } 107 | } 108 | 109 | label.active { 110 | transform:translateY(50px); 111 | left:2px; 112 | font-size:14px; 113 | .req { 114 | opacity:0; 115 | } 116 | } 117 | 118 | label.highlight { 119 | color:$white; 120 | } 121 | 122 | input, textarea { 123 | font-size:22px; 124 | display:block; 125 | width:100%; 126 | height:100%; 127 | padding:5px 10px; 128 | background:none; 129 | background-image:none; 130 | border:1px solid $gray-light; 131 | color:$white; 132 | border-radius:0; 133 | transition:border-color .25s ease, box-shadow .25s ease; 134 | &:focus { 135 | outline:0; 136 | border-color:$main; 137 | } 138 | } 139 | 140 | textarea { 141 | border:2px solid $gray-light; 142 | resize: vertical; 143 | } 144 | 145 | .field-wrap { 146 | position:relative; 147 | margin-bottom:40px; 148 | } 149 | 150 | .top-row { 151 | &:after { 152 | content: ""; 153 | display: table; 154 | clear: both; 155 | } 156 | 157 | > div { 158 | float:left; 159 | width:48%; 160 | margin-right:4%; 161 | &:last-child { 162 | margin:0; 163 | } 164 | } 165 | } 166 | 167 | .button { 168 | border:0; 169 | outline:none; 170 | border-radius:0; 171 | padding:15px 0; 172 | font-size:2rem; 173 | font-weight:$bold; 174 | text-transform:uppercase; 175 | letter-spacing:.1em; 176 | background:$main; 177 | color:$white; 178 | transition:all.5s ease; 179 | -webkit-appearance: none; 180 | &:hover, &:focus { 181 | background:$main-dark; 182 | } 183 | } 184 | 185 | .button-block { 186 | display:block; 187 | width:100%; 188 | } 189 | 190 | .forgot { 191 | margin-top:-20px; 192 | text-align:right; 193 | } -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/static/new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/Django Website/TextExtractor/static/new.png -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/static/removed_noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/Django Website/TextExtractor/static/removed_noise.png -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/static/result.txt: -------------------------------------------------------------------------------- 1 | Beautiful is better than ugly. 2 | Explicit is better than implicit. Simple 3 | is better than complex. Complex is better 4 | than complicated. Flat is better than 5 | 6 | nested. Sparse is better than dense. 7 | Readability counts. Special cases aren't 8 | special enough to 9 | break the rules. 10 | Although practicality beats purity. Errors should never 11 | pass silently. Unless explicitly silenced. In the face of iasoql JO BJOUJ 12 | ambiguity, refuse the temptation to guess. There should be one op s,1a| — eap! 13 | — and preferably only one — obvious way to do it. Although that JeaJfi’Sumuoq auo 14 | way may not be obvious at first unless you're Dutch. Now is 8.18 saaedsaweN 15 | better than never. Although never is often better than right 'eap! p003 e aq xfew 16 | now. If the implementation is hard to explain, it's a bad 1! 'uimdxa ol/fsea s! 17 | idea. If the implementation UO!1E’1U3UJ3|dUJ! am 41 “eapi 18 | is easyto explain, it peq 2 5,1! ’uimdxa 01 pJeq s! UO!1E’1U3UJ3|dUJ! 8H1JI'MOU 19 | may be a good idea. Jqé’u uqu, Janaq uauo s! JaAau anoquv 'JaAau uqu, Janaq 20 | ‘ Namespaces are s! MON 'LpJna aJ,n0/fssa/un 151912 snoiAqo aq 10u flew REM 21 | one honkinggreat leql q8n0u1|v '1! op 01/(e/vi snoiAqo — auo Muo A|q2JaJaJd pue — 22 | idea — let's do auo aq p|noqs aiaqi 'ssanS 01 uonelduJaJ, an, osmax 'fo/nfi’jqwe 23 | more of those! 40 aae; aql u1 'paauaus Knpudxa ssa|un 'Mluaus ssed 24 | JaAau p|noqs $10113 'Alund sleaq Mummmd anoquv 25 | 'sa|nJ aql >19an 26 | 01q8noua |epads 27 | LUBJE sase: [epads 's1un03 A1" gq epeau 28 | 'asuap ueql Janaq s! asmds 'palsau 29 | ueql Janaq s! 19H 'paleaudwoa ueql 30 | Janaq s! xa|dw03 'X3|du102) uqu, Janaq s! 31 | aIdwis °1pi|dwi ueql Janaq s! uaudx 32 | °A|8n ueql Janaq s! lnillneag -------------------------------------------------------------------------------- /Text_Extractor/Django Website/TextExtractor/static/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/Django Website/TextExtractor/static/test.jpg -------------------------------------------------------------------------------- /Text_Extractor/test images/-badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/-badge.png -------------------------------------------------------------------------------- /Text_Extractor/test images/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/7.jpg -------------------------------------------------------------------------------- /Text_Extractor/test images/arya.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/arya.PNG -------------------------------------------------------------------------------- /Text_Extractor/test images/code_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/code_background.png -------------------------------------------------------------------------------- /Text_Extractor/test images/download.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/download.jpg -------------------------------------------------------------------------------- /Text_Extractor/test images/english1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/english1.png -------------------------------------------------------------------------------- /Text_Extractor/test images/english2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/english2.jpg -------------------------------------------------------------------------------- /Text_Extractor/test images/english3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/english3.jpg -------------------------------------------------------------------------------- /Text_Extractor/test images/english4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/english4.jpg -------------------------------------------------------------------------------- /Text_Extractor/test images/english5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/english5.jpg -------------------------------------------------------------------------------- /Text_Extractor/test images/english6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/english6.jpg -------------------------------------------------------------------------------- /Text_Extractor/test images/english_test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/english_test.jpg -------------------------------------------------------------------------------- /Text_Extractor/test images/geo1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/geo1.PNG -------------------------------------------------------------------------------- /Text_Extractor/test images/geo2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/geo2.PNG -------------------------------------------------------------------------------- /Text_Extractor/test images/hindi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/hindi.jpg -------------------------------------------------------------------------------- /Text_Extractor/test images/hindi3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/hindi3.jpg -------------------------------------------------------------------------------- /Text_Extractor/test images/hindi_test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/hindi_test.jpg -------------------------------------------------------------------------------- /Text_Extractor/test images/hindi_test1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/hindi_test1.jpg -------------------------------------------------------------------------------- /Text_Extractor/test images/new-test1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/new-test1.jpg -------------------------------------------------------------------------------- /Text_Extractor/test images/removed_noise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/removed_noise.png -------------------------------------------------------------------------------- /Text_Extractor/test images/test_hindi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/test_hindi.jpg -------------------------------------------------------------------------------- /Text_Extractor/test images/test_hindi1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/test_hindi1.jpg -------------------------------------------------------------------------------- /Text_Extractor/test images/test_hindi2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/test_hindi2.jpg -------------------------------------------------------------------------------- /Text_Extractor/test images/test_hindi3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/test_hindi3.jpg -------------------------------------------------------------------------------- /Text_Extractor/test images/thres.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/thres.png -------------------------------------------------------------------------------- /Text_Extractor/test images/zen-of-python-poster-a3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/Text_Extractor/test images/zen-of-python-poster-a3.png -------------------------------------------------------------------------------- /addressbook/addressbook.py: -------------------------------------------------------------------------------- 1 | import pickle 2 | import os 3 | 4 | UI = ''' 5 | 1. Add new contact 6 | 2. View contacts 7 | 3. Search contact 8 | 4. Update contact 9 | 5. Delete contact 10 | 6. Reset all 11 | 7. Exit 12 | ''' 13 | 14 | 15 | class Person(object): 16 | 17 | def __init__(self, name=None, address=None, phone=None): 18 | self.name = name 19 | self.address = address 20 | self.phone = phone 21 | 22 | def __str__(self): 23 | return "{} {:>15} {:>15}".format(self.name, self.address, self.phone) 24 | 25 | 26 | class Application(object): 27 | 28 | def __init__(self, database): 29 | self.database = database 30 | self.persons = {} 31 | if not os.path.exists(self.database): 32 | file_pointer = open(self.database, 'wb') 33 | pickle.dump({}, file_pointer) 34 | file_pointer.close() 35 | else: 36 | with open(self.database, 'rb') as person_list: 37 | self.persons = pickle.load(person_list) 38 | 39 | def add(self): 40 | name, address, phone = self.getdetails() 41 | if name not in self.persons: 42 | self.persons[name] = Person(name, address, phone) 43 | else: 44 | print("Contact already present.") 45 | 46 | def viewall(self): 47 | if self.persons: 48 | print("{} {:>15} {:>15}".format('Name', 'address', 'Phone')) 49 | for person in self.persons.values(): 50 | print(person) 51 | else: 52 | print("No contacts in database.") 53 | 54 | def search(self): 55 | name = input("Enter the name: ") 56 | if name in self.persons: 57 | print(self.persons[name]) 58 | else: 59 | print("Contact not found.") 60 | 61 | def getdetails(self): 62 | name = input("Name: ") 63 | address = input("Address: ") 64 | phone = input("Phone:") 65 | return name, address, phone 66 | 67 | def update(self): 68 | name = input("Enter the name: ") 69 | if name in self.persons: 70 | print("Found. Enter new details.") 71 | name, address, phone = self.getdetails() 72 | self.persons[name].__init__(name, address, phone) 73 | print("Successfully updated.") 74 | else: 75 | print("Contact not found.") 76 | 77 | def delete(self): 78 | name = input("Enter the name to delete: ") 79 | if name in self.persons: 80 | del self.persons[name] 81 | print("Deleted the contact.") 82 | else: 83 | print("Contact not found in the app.") 84 | 85 | def reset(self): 86 | self.persons = {} 87 | 88 | def __del__(self): 89 | with open(self.database, 'wb') as db: 90 | pickle.dump(self.persons, db) 91 | 92 | def __str__(self): 93 | return UI 94 | 95 | 96 | def main(): 97 | app = Application('contacts.data') 98 | choice = '' 99 | while choice != '7': 100 | print(app) 101 | choice = input('Choose: ') 102 | if choice == '1': 103 | app.add() 104 | elif choice == '2': 105 | app.viewall() 106 | elif choice == '3': 107 | app.search() 108 | elif choice == '4': 109 | app.update() 110 | elif choice == '5': 111 | app.delete() 112 | elif choice == '6': 113 | app.reset() 114 | elif choice == '7': 115 | print("Exiting.") 116 | else: 117 | print("Invalid choice.") 118 | 119 | if __name__ == '__main__': 120 | main() -------------------------------------------------------------------------------- /addressbook/contacts.data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/addressbook/contacts.data -------------------------------------------------------------------------------- /event/.idea/.name: -------------------------------------------------------------------------------- 1 | event -------------------------------------------------------------------------------- /event/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /event/.idea/event.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 26 | -------------------------------------------------------------------------------- /event/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /event/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /event/.idea/scopes/scope_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /event/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /event/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/db.sqlite3 -------------------------------------------------------------------------------- /event/event/.settings.py.un~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/event/.settings.py.un~ -------------------------------------------------------------------------------- /event/event/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/event/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /event/event/__pycache__/settings.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/event/__pycache__/settings.cpython-36.pyc -------------------------------------------------------------------------------- /event/event/__pycache__/settings.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/event/__pycache__/settings.cpython-37.pyc -------------------------------------------------------------------------------- /event/event/__pycache__/urls.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/event/__pycache__/urls.cpython-36.pyc -------------------------------------------------------------------------------- /event/event/__pycache__/urls.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/event/__pycache__/urls.cpython-37.pyc -------------------------------------------------------------------------------- /event/event/__pycache__/wsgi.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/event/__pycache__/wsgi.cpython-36.pyc -------------------------------------------------------------------------------- /event/event/__pycache__/wsgi.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/event/__pycache__/wsgi.cpython-37.pyc -------------------------------------------------------------------------------- /event/event/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for event project. 3 | 4 | Generated by 'django-admin startproject' using Django 2.0. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.0/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/2.0/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ 21 | 22 | 23 | # SECURITY WARNING: keep the secret key used in production secret! 24 | SECRET_KEY = '6q%t4-ss1=g^nre8=#l@889af2o=j)_+!a40y0zdsa!65htgm6' 25 | 26 | # SECURITY WARNING: don't run with debug turned on in production! 27 | DEBUG = True 28 | 29 | ALLOWED_HOSTS = [] 30 | 31 | 32 | # Application definition 33 | 34 | INSTALLED_APPS = [ 35 | 'myapp', 36 | 'django.contrib.admin', 37 | 'django.contrib.auth', 38 | 'django.contrib.contenttypes', 39 | 'django.contrib.sessions', 40 | 'django.contrib.messages', 41 | 'django.contrib.staticfiles', 42 | ] 43 | EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' 44 | EMAIL_USE_SSL=True 45 | EMAIL_PORT = 465 46 | EMAIL_HOST = 'smtp.gmail.com' 47 | EMAIL_HOST_USER = 'your email address' 48 | EMAIL_HOST_PASSWORD = 'your password' 49 | DEFAULT_FROM_EMAIL = EMAIL_HOST_USER 50 | 51 | 52 | MIDDLEWARE = [ 53 | 'django.middleware.security.SecurityMiddleware', 54 | 'django.contrib.sessions.middleware.SessionMiddleware', 55 | 'django.middleware.common.CommonMiddleware', 56 | 'django.middleware.csrf.CsrfViewMiddleware', 57 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 58 | 'django.contrib.messages.middleware.MessageMiddleware', 59 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 60 | ] 61 | 62 | ROOT_URLCONF = 'event.urls' 63 | 64 | TEMPLATES = [ 65 | { 66 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 67 | 'DIRS': [], 68 | 'APP_DIRS': True, 69 | 'OPTIONS': { 70 | 'context_processors': [ 71 | 'django.template.context_processors.debug', 72 | 'django.template.context_processors.request', 73 | 'django.contrib.auth.context_processors.auth', 74 | 'django.contrib.messages.context_processors.messages', 75 | ], 76 | }, 77 | }, 78 | { 79 | 'BACKEND':'django.template.backends.jinja2.Jinja2', 80 | 'DIRS':['c:/event/templates'], 81 | 'APP_DIRS': True, 82 | } 83 | ] 84 | 85 | WSGI_APPLICATION = 'event.wsgi.application' 86 | 87 | 88 | # Database 89 | # https://docs.djangoproject.com/en/2.0/ref/settings/#databases 90 | 91 | DATABASES = { 92 | 'default': { 93 | 'ENGINE': 'django.db.backends.sqlite3', 94 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 95 | } 96 | } 97 | 98 | 99 | # Password validation 100 | # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators 101 | 102 | AUTH_PASSWORD_VALIDATORS = [ 103 | { 104 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 105 | }, 106 | { 107 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 108 | }, 109 | { 110 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 111 | }, 112 | { 113 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 114 | }, 115 | ] 116 | 117 | 118 | # Internationalization 119 | # https://docs.djangoproject.com/en/2.0/topics/i18n/ 120 | 121 | LANGUAGE_CODE = 'en-us' 122 | 123 | TIME_ZONE = 'Asia/Kolkata' 124 | 125 | USE_I18N = True 126 | 127 | USE_L10N = True 128 | 129 | USE_TZ = True 130 | 131 | 132 | # Static files (CSS, JavaScript, Images) 133 | # https://docs.djangoproject.com/en/2.0/howto/static-files/ 134 | 135 | STATIC_URL = '/static/' 136 | -------------------------------------------------------------------------------- /event/event/settings.py~: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for event project. 3 | 4 | Generated by 'django-admin startproject' using Django 2.0. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.0/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/2.0/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ 21 | 22 | 23 | # SECURITY WARNING: keep the secret key used in production secret! 24 | SECRET_KEY = '6q%t4-ss1=g^nre8=#l@889af2o=j)_+!a40y0zdsa!65htgm6' 25 | 26 | # SECURITY WARNING: don't run with debug turned on in production! 27 | DEBUG = True 28 | 29 | ALLOWED_HOSTS = [] 30 | 31 | 32 | # Application definition 33 | 34 | INSTALLED_APPS = [ 35 | 'myapp', 36 | 'django.contrib.admin', 37 | 'django.contrib.auth', 38 | 'django.contrib.contenttypes', 39 | 'django.contrib.sessions', 40 | 'django.contrib.messages', 41 | 'django.contrib.staticfiles', 42 | ] 43 | EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' 44 | EMAIL_USE_SSL=True 45 | EMAIL_PORT = 465 46 | EMAIL_HOST = 'smtp.gmail.com' 47 | EMAIL_HOST_USER = '3496.grras@gmail.com' 48 | EMAIL_HOST_PASSWORD = 'Gmail@3496' 49 | DEFAULT_FROM_EMAIL = EMAIL_HOST_USER 50 | 51 | 52 | MIDDLEWARE = [ 53 | 'django.middleware.security.SecurityMiddleware', 54 | 'django.contrib.sessions.middleware.SessionMiddleware', 55 | 'django.middleware.common.CommonMiddleware', 56 | 'django.middleware.csrf.CsrfViewMiddleware', 57 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 58 | 'django.contrib.messages.middleware.MessageMiddleware', 59 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 60 | ] 61 | 62 | ROOT_URLCONF = 'event.urls' 63 | 64 | TEMPLATES = [ 65 | { 66 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 67 | 'DIRS': [], 68 | 'APP_DIRS': True, 69 | 'OPTIONS': { 70 | 'context_processors': [ 71 | 'django.template.context_processors.debug', 72 | 'django.template.context_processors.request', 73 | 'django.contrib.auth.context_processors.auth', 74 | 'django.contrib.messages.context_processors.messages', 75 | ], 76 | }, 77 | }, 78 | { 79 | 'BACKEND':'django.template.backends.jinja2.Jinja2', 80 | 'DIRS':['c:/event/templates'], 81 | 'APP_DIRS': True, 82 | } 83 | ] 84 | 85 | WSGI_APPLICATION = 'event.wsgi.application' 86 | 87 | 88 | # Database 89 | # https://docs.djangoproject.com/en/2.0/ref/settings/#databases 90 | 91 | DATABASES = { 92 | 'default': { 93 | 'ENGINE': 'django.db.backends.sqlite3', 94 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 95 | } 96 | } 97 | 98 | 99 | # Password validation 100 | # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators 101 | 102 | AUTH_PASSWORD_VALIDATORS = [ 103 | { 104 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 105 | }, 106 | { 107 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 108 | }, 109 | { 110 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 111 | }, 112 | { 113 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 114 | }, 115 | ] 116 | 117 | 118 | # Internationalization 119 | # https://docs.djangoproject.com/en/2.0/topics/i18n/ 120 | 121 | LANGUAGE_CODE = 'en-us' 122 | 123 | TIME_ZONE = 'Asia/Kolkata' 124 | 125 | USE_I18N = True 126 | 127 | USE_L10N = True 128 | 129 | USE_TZ = True 130 | 131 | 132 | # Static files (CSS, JavaScript, Images) 133 | # https://docs.djangoproject.com/en/2.0/howto/static-files/ 134 | 135 | STATIC_URL = '/static/' 136 | -------------------------------------------------------------------------------- /event/event/urls.py: -------------------------------------------------------------------------------- 1 | """event URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/2.0/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.urls import include, path 14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 15 | """ 16 | from django.contrib import admin 17 | from django.urls import path,include 18 | 19 | urlpatterns = [ 20 | 21 | path('admin/', admin.site.urls), 22 | path('',include("myapp.urls"),name='main'), 23 | path('',include("myapp.urls"),name='main'), 24 | ] 25 | -------------------------------------------------------------------------------- /event/event/urls.py~: -------------------------------------------------------------------------------- 1 | """event URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/2.0/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.urls import include, path 14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 15 | """ 16 | from django.contrib import admin 17 | from django.urls import path,include 18 | 19 | urlpatterns = [ 20 | 21 | path('admin/', admin.site.urls), 22 | path('',include("myapp.urls"),name='main'), 23 | path('',include("myapp.urls"),name='main'), 24 | ] 25 | -------------------------------------------------------------------------------- /event/event/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for event project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "event.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /event/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "event.settings") 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError as exc: 10 | raise ImportError( 11 | "Couldn't import Django. Are you sure it's installed and " 12 | "available on your PYTHONPATH environment variable? Did you " 13 | "forget to activate a virtual environment?" 14 | ) from exc 15 | execute_from_command_line(sys.argv) 16 | -------------------------------------------------------------------------------- /event/myapp/.models.py.un~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/.models.py.un~ -------------------------------------------------------------------------------- /event/myapp/.views.py.un~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/.views.py.un~ -------------------------------------------------------------------------------- /event/myapp/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /event/myapp/__pycache__/admin.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/__pycache__/admin.cpython-36.pyc -------------------------------------------------------------------------------- /event/myapp/__pycache__/admin.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/__pycache__/admin.cpython-37.pyc -------------------------------------------------------------------------------- /event/myapp/__pycache__/forms.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/__pycache__/forms.cpython-36.pyc -------------------------------------------------------------------------------- /event/myapp/__pycache__/forms.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/__pycache__/forms.cpython-37.pyc -------------------------------------------------------------------------------- /event/myapp/__pycache__/models.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/__pycache__/models.cpython-36.pyc -------------------------------------------------------------------------------- /event/myapp/__pycache__/models.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/__pycache__/models.cpython-37.pyc -------------------------------------------------------------------------------- /event/myapp/__pycache__/urls.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/__pycache__/urls.cpython-36.pyc -------------------------------------------------------------------------------- /event/myapp/__pycache__/urls.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/__pycache__/urls.cpython-37.pyc -------------------------------------------------------------------------------- /event/myapp/__pycache__/views.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/__pycache__/views.cpython-36.pyc -------------------------------------------------------------------------------- /event/myapp/__pycache__/views.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/__pycache__/views.cpython-37.pyc -------------------------------------------------------------------------------- /event/myapp/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import UserProfile 3 | 4 | 5 | # Register your models here. 6 | admin.site.register(UserProfile) 7 | -------------------------------------------------------------------------------- /event/myapp/admin.py~: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import UserProfile 3 | 4 | 5 | # Register your models here. 6 | admin.site.register(UserProfile) 7 | -------------------------------------------------------------------------------- /event/myapp/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class MyappConfig(AppConfig): 5 | name = 'myapp' 6 | -------------------------------------------------------------------------------- /event/myapp/forms.py: -------------------------------------------------------------------------------- 1 | __author__ = 'sachin yadav' 2 | from django import forms 3 | 4 | class signup_form(forms.Form): 5 | 6 | name = forms.CharField() 7 | first_name = forms.CharField() 8 | last_name = forms.CharField() 9 | password=forms.CharField(widget=forms.PasswordInput) 10 | email = forms.EmailField() 11 | 12 | class login_form(forms.Form): 13 | 14 | name = forms.CharField() 15 | password = forms.CharField(widget=forms.PasswordInput) 16 | 17 | 18 | class reset_form(forms.Form): 19 | 20 | email = forms.EmailField() 21 | 22 | class password(forms.Form): 23 | 24 | new_password = forms.CharField(widget=forms.PasswordInput) 25 | OTP = forms.IntegerField() 26 | 27 | class userprofile_form(forms.Form): 28 | 29 | profile_pic = forms.ImageField() 30 | birth_day = forms.DateField() 31 | bio = forms.CharField(max_length=2000) 32 | mob_no = forms.IntegerField() 33 | 34 | -------------------------------------------------------------------------------- /event/myapp/forms.py~: -------------------------------------------------------------------------------- 1 | __author__ = 'sachin yadav' 2 | from django import forms 3 | 4 | class signup_form(forms.Form): 5 | 6 | name = forms.CharField() 7 | first_name = forms.CharField() 8 | last_name = forms.CharField() 9 | password=forms.CharField(widget=forms.PasswordInput) 10 | email = forms.EmailField() 11 | 12 | class login_form(forms.Form): 13 | 14 | name = forms.CharField() 15 | password = forms.CharField(widget=forms.PasswordInput) 16 | 17 | 18 | class reset_form(forms.Form): 19 | 20 | email = forms.EmailField() 21 | 22 | class password(forms.Form): 23 | 24 | new_password = forms.CharField(widget=forms.PasswordInput) 25 | OTP = forms.IntegerField() 26 | 27 | class userprofile_form(forms.Form): 28 | 29 | profile_pic = forms.ImageField() 30 | birth_day = forms.DateField() 31 | bio = forms.CharField(max_length=2000) 32 | mob_no = forms.IntegerField() 33 | 34 | -------------------------------------------------------------------------------- /event/myapp/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0 on 2017-12-17 17:01 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | initial = True 10 | 11 | dependencies = [ 12 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 13 | ] 14 | 15 | operations = [ 16 | migrations.CreateModel( 17 | name='UserProfile', 18 | fields=[ 19 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 20 | ('profile_pic', models.ImageField(upload_to='profile_pics/', verbose_name='Profile Picture')), 21 | ('birth_day', models.DateField()), 22 | ('Bio', models.TextField()), 23 | ('user', models.ForeignKey(on_delete='CASECADE', to=settings.AUTH_USER_MODEL, unique=True)), 24 | ], 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /event/myapp/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/migrations/__init__.py -------------------------------------------------------------------------------- /event/myapp/migrations/__pycache__/0001_initial.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/migrations/__pycache__/0001_initial.cpython-36.pyc -------------------------------------------------------------------------------- /event/myapp/migrations/__pycache__/0001_initial.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/migrations/__pycache__/0001_initial.cpython-37.pyc -------------------------------------------------------------------------------- /event/myapp/migrations/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/migrations/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /event/myapp/migrations/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/migrations/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /event/myapp/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.contrib.auth.models import User 3 | class UserProfile(models.Model): 4 | user = models.ForeignKey(User,unique=True,on_delete="CASECADE") 5 | profile_pic = models.ImageField(verbose_name="Profile Picture",upload_to='profile_pics/') 6 | birth_day = models.DateField() 7 | Bio = models.TextField() 8 | -------------------------------------------------------------------------------- /event/myapp/models.py~: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.contrib.auth.models import User 3 | 4 | 5 | # Create your models here. 6 | 7 | class UserProfile(models.Model): 8 | 9 | user = models.ForeignKey(User,unique=True,on_delete="CASECADE") 10 | profile_pic = models.ImageField(verbose_name="Profile Picture",upload_to='profile_pics/') 11 | birth_day = models.DateField() 12 | Bio = models.TextField() 13 | -------------------------------------------------------------------------------- /event/myapp/static/css/about.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background-image: url(bgimage.jpg); 3 | height: 100vh; 4 | background-size: cover; 5 | background-position: center; 6 | } 7 | #about 8 | { 9 | color:greenyellow; 10 | } -------------------------------------------------------------------------------- /event/myapp/static/css/bgimage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/css/bgimage.jpg -------------------------------------------------------------------------------- /event/myapp/static/css/contact.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background-image:url(bgimage.jpg); 3 | height: 100vh; 4 | background-size: cover; 5 | background-position: center; 6 | } 7 | #contact 8 | { 9 | color:greenyellow; 10 | } 11 | #contact h1 12 | { 13 | color:greenyellow; 14 | } 15 | #contact h2 16 | { 17 | color: greenyellow; 18 | } 19 | 20 | #contact h3 21 | { 22 | color:greenyellow; 23 | } 24 | -------------------------------------------------------------------------------- /event/myapp/static/css/contact.css~: -------------------------------------------------------------------------------- 1 | body{ 2 | background-image:url(bgimage.jpg); 3 | height: 100vh; 4 | background-size: cover; 5 | background-position: center; 6 | } 7 | #contact 8 | { 9 | color:greenyellow; 10 | } 11 | #contact h1 12 | { 13 | color:greenyellow; 14 | } 15 | #contact h2 16 | { 17 | color: greenyellow; 18 | } 19 | 20 | #contact h3 21 | { 22 | color:greenyellow; 23 | } -------------------------------------------------------------------------------- /event/myapp/static/css/footer.css: -------------------------------------------------------------------------------- 1 | footer { 2 | position: absolute; 3 | right: 0; 4 | bottom: 0; 5 | left: 0; 6 | padding: 1rem; 7 | background-color: #efefef; 8 | text-align: center; 9 | } -------------------------------------------------------------------------------- /event/myapp/static/css/header.css: -------------------------------------------------------------------------------- 1 | *{ 2 | margin: 0; 3 | padding: 0; 4 | } 5 | header{ 6 | background-color: black; 7 | } 8 | ul { 9 | list-style-type: none; 10 | margin: 0; 11 | padding: 0; 12 | overflow: hidden; 13 | background-color: #333; 14 | } 15 | 16 | li { 17 | float: left; 18 | } 19 | 20 | li a, .dropbtn { 21 | display: inline-block; 22 | color: white; 23 | text-align: center; 24 | padding: 14px 16px; 25 | text-decoration: none; 26 | } 27 | 28 | li a:hover, .dropdown:hover .dropbtn { 29 | background-color: red; 30 | } 31 | 32 | li.dropdown { 33 | display: inline-block; 34 | } 35 | 36 | .dropdown-content { 37 | display: none; 38 | position: absolute; 39 | background-color: #f9f9f9; 40 | min-width: 160px; 41 | box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); 42 | z-index: 1; 43 | } 44 | 45 | .dropdown-content a { 46 | color: black; 47 | padding: 12px 16px; 48 | text-decoration: none; 49 | display: block; 50 | text-align: left; 51 | } 52 | 53 | .dropdown-content a:hover {background-color: #f1f1f1} 54 | 55 | .dropdown:hover .dropdown-content { 56 | display: block; 57 | } 58 | -------------------------------------------------------------------------------- /event/myapp/static/css/home.css: -------------------------------------------------------------------------------- 1 | header{ 2 | background-color: black; 3 | } 4 | ul { 5 | list-style-type: none; 6 | margin: 0; 7 | padding: 0; 8 | overflow: hidden; 9 | background-color: #333; 10 | } 11 | 12 | li { 13 | float: left; 14 | } 15 | 16 | li a, .dropbtn { 17 | display: inline-block; 18 | color: white; 19 | text-align: center; 20 | padding: 14px 16px; 21 | text-decoration: none; 22 | } 23 | 24 | li a:hover, .dropdown:hover .dropbtn { 25 | background-color: red; 26 | } 27 | 28 | li.dropdown { 29 | display: inline-block; 30 | } 31 | 32 | .dropdown-content { 33 | display: none; 34 | position: absolute; 35 | background-color: #f9f9f9; 36 | min-width: 160px; 37 | box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); 38 | z-index: 1; 39 | } 40 | 41 | .dropdown-content a { 42 | color: black; 43 | padding: 12px 16px; 44 | text-decoration: none; 45 | display: block; 46 | text-align: left; 47 | } 48 | 49 | .dropdown-content a:hover {background-color: #f1f1f1} 50 | 51 | .dropdown:hover .dropdown-content { 52 | display: block; 53 | } 54 | 55 | #footer { 56 | position: relative; 57 | right: 0; 58 | bottom: 0; 59 | left: 0; 60 | padding: 1rem; 61 | background-color: #333; 62 | text-align: center; 63 | color: white; 64 | } 65 | body{ 66 | background-image: url(bgimage.jpg); 67 | height: 100vh; 68 | background-size: cover; 69 | background-position: center; 70 | } 71 | section{ 72 | color: white; 73 | } 74 | section h1{ 75 | text-align: center; 76 | font-size: 40px; 77 | font-style: italic; 78 | font-family: Apple Chancery, cursive; 79 | color: #ffcccc; 80 | } 81 | #op{ 82 | position: relative; 83 | left: 0%; 84 | margin: 0; 85 | font-size: 25px; 86 | text-align: center; 87 | color: aqua; 88 | } 89 | -------------------------------------------------------------------------------- /event/myapp/static/css/img/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/css/img/Thumbs.db -------------------------------------------------------------------------------- /event/myapp/static/css/img/arrow-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/css/img/arrow-left.png -------------------------------------------------------------------------------- /event/myapp/static/css/img/arrow-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/css/img/arrow-right.png -------------------------------------------------------------------------------- /event/myapp/static/css/img/banner1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/css/img/banner1.jpg -------------------------------------------------------------------------------- /event/myapp/static/css/img/banner2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/css/img/banner2.jpg -------------------------------------------------------------------------------- /event/myapp/static/css/img/banner3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/css/img/banner3.jpg -------------------------------------------------------------------------------- /event/myapp/static/css/img/slider1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/css/img/slider1.jpg -------------------------------------------------------------------------------- /event/myapp/static/css/img/slider2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/css/img/slider2.jpg -------------------------------------------------------------------------------- /event/myapp/static/css/img/slider3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/css/img/slider3.png -------------------------------------------------------------------------------- /event/myapp/static/css/login.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background-image: url(bgimage.jpg); 3 | height: 100vh; 4 | background-size: cover; 5 | background-position: center; 6 | } 7 | .login-page{ 8 | width: 360px; 9 | padding: 10% 0 0; 10 | margin: auto; 11 | } 12 | .form{ 13 | position: relative; 14 | z-index: 1; 15 | background-color: transparent; 16 | max-width: 360px; 17 | margin: 0 auto 100px; 18 | padding: 45px; 19 | text-align: center; 20 | } 21 | .form input{ 22 | font-family: "Roboto", sans-serif; 23 | outline: 1; 24 | background: #f2f2f2; 25 | width: 100%; 26 | border: 0; 27 | margin: 0 0 15px; 28 | padding: 15px; 29 | box-sizing: border-box; 30 | font-size: 14px; 31 | } 32 | .form button{ 33 | font-family: "Roboto", sans-serif; 34 | text-transform: uppercase; 35 | outline: 0; 36 | background: #4CAF50; 37 | width: 100%; 38 | border: 0; 39 | padding: 15px; 40 | color: #FFFFFF; 41 | font-size: 14px; 42 | cursor: pointer; 43 | 44 | } 45 | .form button:hover,.form button:active{ 46 | background: #43A047; 47 | } 48 | .form .message{ 49 | margin: 15px 0 0 ; 50 | color: aliceblue; 51 | font-size: 12px'' 52 | } 53 | .form .message a{ 54 | color: #4CAF50; 55 | text-decoration: none; 56 | } 57 | .form .register-form{ 58 | display: none; 59 | } 60 | ul { 61 | list-style-type: none; 62 | margin: 0; 63 | padding: 0; 64 | overflow: hidden; 65 | background-color: #333; 66 | } 67 | 68 | li { 69 | float: left; 70 | } 71 | 72 | li a, .dropbtn { 73 | display: inline-block; 74 | color: white; 75 | text-align: center; 76 | padding: 14px 16px; 77 | text-decoration: none; 78 | } 79 | 80 | li a:hover, .dropdown:hover .dropbtn { 81 | background-color: red; 82 | } 83 | 84 | li.dropdown { 85 | display: inline-block; 86 | } 87 | 88 | .dropdown-content { 89 | display: none; 90 | position: absolute; 91 | background-color: #f9f9f9; 92 | min-width: 160px; 93 | box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); 94 | z-index: 1; 95 | } 96 | 97 | .dropdown-content a { 98 | color: black; 99 | padding: 12px 16px; 100 | text-decoration: none; 101 | display: block; 102 | text-align: left; 103 | } 104 | 105 | .dropdown-content a:hover {background-color: #f1f1f1} 106 | 107 | .dropdown:hover .dropdown-content { 108 | display: block; 109 | } 110 | -------------------------------------------------------------------------------- /event/myapp/static/css/main.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background-image: url(bgimage.jpg); 3 | height: 100vh; 4 | background-size: cover; 5 | background-position: center; 6 | } 7 | header{ 8 | color:crimson; 9 | } 10 | ul{ 11 | margin: 0px; 12 | padding: 0px; 13 | list-style:none; 14 | } 15 | ul li{ 16 | float: left; 17 | width: 200px; 18 | height: 40px; 19 | opacity: 1; 20 | line-height: 40px; 21 | text-align: center; 22 | font-size: 20px; 23 | text-decoration: none; 24 | color:crimson; 25 | } 26 | ui li a{ 27 | text-decoration: none; 28 | color: white; 29 | display: block; 30 | } 31 | ui li a:hover { 32 | background-color: green; 33 | } 34 | ul li ul li{ 35 | display: none; 36 | } 37 | ul li:hover ul li{ 38 | display: block; 39 | } 40 | footer{ 41 | position: absolute; 42 | right: 0; 43 | bottom: 0; 44 | left: 0; 45 | padding: 50px; 46 | background-color: transparent; 47 | text-align: center; 48 | color: aliceblue; 49 | } -------------------------------------------------------------------------------- /event/myapp/static/css/slider.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | 6 | body { 7 | background-color: #f3f3f3; 8 | } 9 | 10 | .main-banner { 11 | margin: 0 auto; 12 | width: 1200px; 13 | height: 400px; 14 | background-color: #fff; 15 | overflow: hidden; 16 | position: relative; 17 | } 18 | 19 | .main-banner .imgban { 20 | width: 100%; 21 | height: 100%; 22 | position: absolute; 23 | top: 0px; 24 | transition: all ease-in-out 500ms; 25 | -webkit-transition: all ease-in-out 500ms; 26 | } 27 | .main-banner .imgban-box h2 { 28 | font-family: arial; 29 | font-size: 60px; 30 | color: #fff; 31 | } 32 | .main-banner .imgban-box p { 33 | padding-top: 6px; 34 | font-family: arial; 35 | font-size: 16px; 36 | color: #fff; 37 | } 38 | 39 | .main-banner #imgban3 { 40 | background-image: url(img/slider3.png); 41 | background-size: cover; 42 | background-position: center; 43 | background-repeat: no-repeat; 44 | } 45 | .main-banner #imgban3 .imgban-box { 46 | padding-top: 220px; 47 | padding-left: 100px; 48 | } 49 | 50 | .main-banner #imgban2 { 51 | background-image: url(img/slider2.jpg); 52 | background-size: cover; 53 | background-position: center; 54 | background-repeat: no-repeat; 55 | } 56 | .main-banner #imgban2 .imgban-box { 57 | padding-top: 220px; 58 | padding-right: 100px; 59 | float: right; 60 | text-align: right; 61 | } 62 | 63 | .main-banner #imgban1 { 64 | background-image: url(img/slider1.jpg); 65 | background-size: cover; 66 | background-position: center; 67 | background-repeat: no-repeat; 68 | } 69 | .main-banner #imgban1 .imgban-box { 70 | padding-top: 70px; 71 | padding-left: 100px; 72 | } 73 | 74 | .imgbanbtn { 75 | width: 40px; 76 | height: 40px; 77 | background-color: #000; 78 | border-radius: 4px; 79 | position: absolute; 80 | top: 180px; 81 | z-index: 2000; 82 | opacity: 0.8; 83 | cursor: pointer; 84 | } 85 | .imgbanbtn:hover { 86 | opacity: 0.9; 87 | } 88 | 89 | .imgbanbtn-prev { 90 | left: 5px; 91 | background-image: url(img/arrow-left.png); 92 | background-size: 60%; 93 | background-position: center; 94 | background-repeat: no-repeat; 95 | } 96 | 97 | .imgbanbtn-next { 98 | right: 5px; 99 | background-image: url(img/arrow-right.png); 100 | background-size: 60%; 101 | background-position: center; 102 | background-repeat: no-repeat; 103 | } -------------------------------------------------------------------------------- /event/myapp/static/css2/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/css2/Thumbs.db -------------------------------------------------------------------------------- /event/myapp/static/css2/about.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background-image: url(bgimage.jpg); 3 | height: 100vh; 4 | background-size: cover; 5 | background-position: center; 6 | } 7 | #about 8 | { 9 | color:greenyellow; 10 | } -------------------------------------------------------------------------------- /event/myapp/static/css2/bgimage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/css2/bgimage.jpg -------------------------------------------------------------------------------- /event/myapp/static/css2/contact.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background-image:url(bgimage.jpg); 3 | height: 100vh; 4 | background-size: cover; 5 | background-position: center; 6 | } 7 | #contact 8 | { 9 | color:greenyellow; 10 | } 11 | #contact h1 12 | { 13 | color:greenyellow; 14 | } 15 | #contact h2 16 | { 17 | color: greenyellow; 18 | } 19 | 20 | #contact h3 21 | { 22 | color:greenyellow; 23 | } -------------------------------------------------------------------------------- /event/myapp/static/css2/footer.css: -------------------------------------------------------------------------------- 1 | footer { 2 | position: absolute; 3 | right: 0; 4 | bottom: 0; 5 | left: 0; 6 | padding: 1rem; 7 | background-color: #efefef; 8 | text-align: center; 9 | } -------------------------------------------------------------------------------- /event/myapp/static/css2/header.css: -------------------------------------------------------------------------------- 1 | header{ 2 | background-color: black; 3 | } 4 | ul { 5 | list-style-type: none; 6 | margin: 0; 7 | padding: 0; 8 | overflow: hidden; 9 | background-color: #333; 10 | } 11 | 12 | li { 13 | float: left; 14 | } 15 | 16 | li a, .dropbtn { 17 | display: inline-block; 18 | color: white; 19 | text-align: center; 20 | padding: 14px 16px; 21 | text-decoration: none; 22 | } 23 | 24 | li a:hover, .dropdown:hover .dropbtn { 25 | background-color: red; 26 | } 27 | 28 | li.dropdown { 29 | display: inline-block; 30 | } 31 | 32 | .dropdown-content { 33 | display: none; 34 | position: absolute; 35 | background-color: #f9f9f9; 36 | min-width: 160px; 37 | box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); 38 | z-index: 1; 39 | } 40 | 41 | .dropdown-content a { 42 | color: black; 43 | padding: 12px 16px; 44 | text-decoration: none; 45 | display: block; 46 | text-align: left; 47 | } 48 | 49 | .dropdown-content a:hover {background-color: #f1f1f1} 50 | 51 | .dropdown:hover .dropdown-content { 52 | display: block; 53 | } 54 | -------------------------------------------------------------------------------- /event/myapp/static/css2/home.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background-image:url(bgimage.jpg); 3 | height: 100vh; 4 | background-size: cover; 5 | background-position: center; 6 | } 7 | 8 | section{ 9 | align-content: center; 10 | } 11 | section h1{ 12 | text-align:center; 13 | font-size: 35px; 14 | font-style: italic; 15 | font-family: Apple Chancery, cursive; 16 | color: #CCCCCC; 17 | } 18 | #op{ 19 | position:relative; 20 | left: 0%; 21 | margin: 0; 22 | font-size: 25px; 23 | text-align: center; 24 | color: aqua; 25 | } 26 | .slider{ 27 | overflow: hidden; 28 | height: 400px; 29 | 30 | } 31 | .slider figure div{ 32 | float: left; 33 | width: 20%; 34 | } 35 | .slider figure img{ 36 | width: 100% 37 | float: left; 38 | } 39 | .slider figure{ 40 | position: relative; 41 | width: 500%; 42 | margin: 0px; 43 | left: 0; 44 | animation: 20s anime infinite; 45 | } 46 | @keyframes anime{ 47 | 0%{ 48 | left: 0%; 49 | } 50 | 10%{ 51 | left: 0%; 52 | } 53 | 12%{ 54 | left: -100% 55 | } 56 | 22%{ 57 | left: -100%; 58 | } 59 | 24%{ 60 | left: -200%; 61 | } 62 | 34%{ 63 | left: -200%; 64 | } 65 | 36%{ 66 | left: -300% 67 | } 68 | 46%{ 69 | left: -300% 70 | } 71 | 48%{ 72 | left: -400% 73 | } 74 | 58%{ 75 | left: -400% 76 | } 77 | 60%{ 78 | left: -300% 79 | } 80 | 70%{ 81 | left: -300%; 82 | } 83 | 72%{ 84 | left: -200%; 85 | } 86 | 82%{ 87 | left: -200; 88 | } 89 | 84%{ 90 | left: -100%; 91 | } 92 | 94%{ 93 | left: -100%; 94 | } 95 | 96%{ 96 | left: 0%; 97 | } 98 | } 99 | 100 | 101 | -------------------------------------------------------------------------------- /event/myapp/static/css2/login.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background-image:url(bgimage.jpg); 3 | height: 100vh; 4 | background-size: cover; 5 | background-position: center; 6 | } 7 | .error 8 | { 9 | color: #FFFFFF; 10 | font-size: large; 11 | } 12 | .login-page{ 13 | width: 360px; 14 | padding: 10% 0 0; 15 | margin: auto; 16 | } 17 | .form{ 18 | position: static; 19 | z-index: 1; 20 | background-color: transparent; 21 | max-width: 360px; 22 | margin: 0 auto 90px; 23 | padding: 40px; 24 | text-align: center; 25 | } 26 | .form input{ 27 | font-family: "Roboto", sans-serif; 28 | outline: 1; 29 | background: #f2f2f2; 30 | width: 100%; 31 | border: 0; 32 | margin: 0 0 10px; 33 | padding: 10px; 34 | box-sizing: border-box; 35 | font-size: 14px; 36 | } 37 | .form button{ 38 | font-family: "Roboto", sans-serif; 39 | text-transform: uppercase; 40 | outline: 0; 41 | background: #4CAF50; 42 | width: 100%; 43 | border: 0; 44 | padding: 10px; 45 | color: #FFFFFF; 46 | font-size: 14px; 47 | cursor: pointer; 48 | 49 | } 50 | .form button:hover,.form button:active{ 51 | background: #43A047; 52 | } 53 | .form .message{ 54 | margin: 15px 0 0 ; 55 | color: aliceblue; 56 | font-size: 12px'' 57 | } 58 | .form .message a{ 59 | color: #4CAF50; 60 | text-decoration: none; 61 | } 62 | .form .register-form{ 63 | display: none; 64 | } 65 | 66 | -------------------------------------------------------------------------------- /event/myapp/static/css2/main.css: -------------------------------------------------------------------------------- 1 | ul { 2 | list-style-type: none; 3 | margin: 0; 4 | padding: 0; 5 | overflow: hidden; 6 | background-color: #333; 7 | } 8 | 9 | li { 10 | float: left; 11 | } 12 | 13 | li a, .dropbtn { 14 | display: inline-block; 15 | color: white; 16 | text-align: center; 17 | padding: 14px 16px; 18 | text-decoration: none; 19 | } 20 | 21 | li a:hover, .dropdown:hover .dropbtn { 22 | background-color: red; 23 | } 24 | 25 | li.dropdown { 26 | display: inline-block; 27 | } 28 | 29 | .dropdown-content { 30 | display: none; 31 | position: absolute; 32 | background-color: #f9f9f9; 33 | min-width: 160px; 34 | box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); 35 | z-index: 1; 36 | } 37 | 38 | .dropdown-content a { 39 | color: black; 40 | padding: 12px 16px; 41 | text-decoration: none; 42 | display: block; 43 | text-align: left; 44 | } 45 | 46 | .dropdown-content a:hover {background-color: #f1f1f1} 47 | 48 | .dropdown:hover .dropdown-content { 49 | display: block; 50 | } 51 | footer { 52 | color:ghostwhite; 53 | position: absolute; 54 | right: 0; 55 | bottom: 0; 56 | left: 0; 57 | /*padding: 1rem;*/ 58 | background-color: #333; 59 | text-align: center; 60 | } 61 | header 62 | { 63 | color:ghostwhite; 64 | position: absolute; 65 | background: #333; 66 | 67 | } -------------------------------------------------------------------------------- /event/myapp/static/css2/slider.css: -------------------------------------------------------------------------------- 1 | *{ 2 | margin: 0; 3 | padding: 0; 4 | text-decoration: none; 5 | } 6 | body{ 7 | margin: 0 auto; 8 | width: 70%; 9 | } 10 | .slider{ 11 | overflow: hidden; 12 | height: 400px; 13 | 14 | } 15 | .slider figure div{ 16 | float: left; 17 | width: 20%; 18 | } 19 | .slider figure img{ 20 | width: 100% 21 | float: left; 22 | } 23 | .slider figure{ 24 | position: relative; 25 | width: 500%; 26 | margin: 0px; 27 | left: 0; 28 | animation: 20s anime infinite; 29 | } 30 | @keyframes anime{ 31 | 0%{ 32 | left: 0%; 33 | } 34 | 10%{ 35 | left: 0%; 36 | } 37 | 12%{ 38 | left: -100% 39 | } 40 | 22%{ 41 | left: -100%; 42 | } 43 | 24%{ 44 | left: -200%; 45 | } 46 | 34%{ 47 | left: -200%; 48 | } 49 | 36%{ 50 | left: -300% 51 | } 52 | 46%{ 53 | left: -300% 54 | } 55 | 48%{ 56 | left: -400% 57 | } 58 | 58%{ 59 | left: -400% 60 | } 61 | 60%{ 62 | left: -300% 63 | } 64 | 70%{ 65 | left: -300%; 66 | } 67 | 72%{ 68 | left: -200%; 69 | } 70 | 82%{ 71 | left: -200; 72 | } 73 | 84%{ 74 | left: -100%; 75 | } 76 | 94%{ 77 | left: -100%; 78 | } 79 | 96%{ 80 | left: 0%; 81 | } 82 | 83 | 84 | } 85 | -------------------------------------------------------------------------------- /event/myapp/static/images/93e17b76-171f-4e36-bc9e-cbf1ae98603d (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/images/93e17b76-171f-4e36-bc9e-cbf1ae98603d (1).png -------------------------------------------------------------------------------- /event/myapp/static/images/93e17b76-171f-4e36-bc9e-cbf1ae98603d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/images/93e17b76-171f-4e36-bc9e-cbf1ae98603d.png -------------------------------------------------------------------------------- /event/myapp/static/images/Venue1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/images/Venue1.jpg -------------------------------------------------------------------------------- /event/myapp/static/images/Venue2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/images/Venue2.jpg -------------------------------------------------------------------------------- /event/myapp/static/images/Venue3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/images/Venue3.jpeg -------------------------------------------------------------------------------- /event/myapp/static/images/Venue3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/images/Venue3.jpg -------------------------------------------------------------------------------- /event/myapp/static/images/bgimage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/images/bgimage.jpg -------------------------------------------------------------------------------- /event/myapp/static/images/desert1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/images/desert1.jpg -------------------------------------------------------------------------------- /event/myapp/static/images/dessert2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/images/dessert2.jpg -------------------------------------------------------------------------------- /event/myapp/static/images/dessert3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/images/dessert3.jpg -------------------------------------------------------------------------------- /event/myapp/static/images/slider1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/images/slider1.jpg -------------------------------------------------------------------------------- /event/myapp/static/images/slider2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/images/slider2.jpg -------------------------------------------------------------------------------- /event/myapp/static/images/slider3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/images/slider3.jpg -------------------------------------------------------------------------------- /event/myapp/static/images/slider4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/images/slider4.jpg -------------------------------------------------------------------------------- /event/myapp/static/images/slider5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/images/slider5.jpg -------------------------------------------------------------------------------- /event/myapp/static/images/slider5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/images/slider5.png -------------------------------------------------------------------------------- /event/myapp/static/images/starter1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/images/starter1.jpg -------------------------------------------------------------------------------- /event/myapp/static/images/starter2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/images/starter2.jpg -------------------------------------------------------------------------------- /event/myapp/static/images/starter3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/static/images/starter3.jpg -------------------------------------------------------------------------------- /event/myapp/static/js/login.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /event/myapp/templates/myapp/.login.html.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/myapp/templates/myapp/.login.html.swp -------------------------------------------------------------------------------- /event/myapp/templates/myapp/about.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | {% include 'myapp/header.html' %} 3 | 4 | 5 | 6 | About 7 | 8 | 9 | {% block link_block %} 10 | {% endblock %} 11 | 12 | 13 | 14 | 15 | {% block nav_block %} 16 | {% endblock %} 17 | 18 |
19 |

About Us:

20 |

21 | We are the Best In Event Management.Our company Starts in back jul,2017.Since Then we have hosted so many events sucessfully. 22 | The main motive of our site is to provide best resources for any event management online and you can track and manage your requests online 23 | very eaisly by our super easy interface.We are commited to provide you never forgetable memories by hosting your events in magical way. 24 | We are trusted event management company by thousands of our customers. 25 |

26 |
27 |
28 |

© Copyright by evemanagement.com

29 |
30 | 31 | -------------------------------------------------------------------------------- /event/myapp/templates/myapp/base.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | {% include 'myapp/footer.html' %} 3 | 4 | 5 | 6 | 7 | {% block title %}{% endblock %} 8 | 9 | 10 | {% block content %}{% endblock %} 11 | {% block myblock %} 12 |

something

13 | 14 | {% endblock %} 15 | 16 | -------------------------------------------------------------------------------- /event/myapp/templates/myapp/change_password.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | {% include "myapp/header.html" %} 3 | 4 | 5 | 6 | change password 7 | 8 | 9 | {% block link_block %} 10 | {% endblock %} 11 | 12 | 13 | 14 | {% block nav_block %} 15 | {% endblock %} 16 |
17 |

Change Your Password

18 |

Enter Your New Pasword and OTP that is send to you on your Authorised Mail Address

19 | 20 |
21 | 22 | {% csrf_token %} 23 | 24 |

25 | New Password{{ form.new_password }} 26 |

27 |

OTP 28 | {{ form.OTP }} 29 |

30 | 31 | 32 | 33 |
34 | 35 |
36 |
37 |

© Copyright by evemanagement.com

38 |
39 | 40 | -------------------------------------------------------------------------------- /event/myapp/templates/myapp/contact.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | {% include 'myapp/header.html' %} 3 | 4 | 5 | 6 | 7 | 8 | Contact Us 9 | {% block link_block %} 10 | {% endblock %} 11 | 22 | 23 | 24 | {% block nav_block %} 25 | {% endblock %} 26 |
27 |

Contact

28 |

We love our fans!

29 | 30 |
31 |
32 |

Fan? Drop a note.

33 |

Jaipur, India

34 |

Phone: +141 1515151515

35 |

Email: mail@mail.com

36 |
37 |
38 |
39 |
40 | 41 |
42 |
43 | 44 |
45 |
46 | 47 |
48 |
49 |
50 | 51 |
52 |
53 |
54 |
55 |
56 |
57 |

© Copyright by evemanagement.com

58 |
59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /event/myapp/templates/myapp/footer.html: -------------------------------------------------------------------------------- 1 | 2 | {% block title %} 3 |

my title

4 | {% endblock %} 5 | 6 | {% block content %} 7 |

my content

8 | {% endblock %} 9 | 10 | {% block myblock %} 11 |

Let's Check it out does it work or not

12 |

Hello world!! how are you

13 |

How are you

14 | {% endblock %} 15 | 16 | -------------------------------------------------------------------------------- /event/myapp/templates/myapp/header.html: -------------------------------------------------------------------------------- 1 | {% block link_block %} 2 | 3 | 4 | 5 | 6 | 7 | {% endblock %} 8 | 9 | {% block nav_block %} 10 | 34 | 35 | {% endblock %} 36 | -------------------------------------------------------------------------------- /event/myapp/templates/myapp/login.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | {% include 'myapp/header.html' %} 3 | 4 | 5 | 6 | Login 7 | 8 | 9 | {% block link_block %} 10 | {% endblock %} 11 | 12 | 13 | 14 | 15 |
16 | 17 | {% if error %} 18 |

{{ error }}

19 | 20 | {% endif %} 21 |
22 | 23 | 24 | {% block nav_block %} 25 | {% endblock %} 26 | 27 | 55 | 56 | 61 | 62 |
63 |

© Copyright by evemanagement.com

64 |
65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /event/myapp/templates/myapp/main.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | {% block fheader %}{% endblock %} 8 |
9 | {% block hheader %}{% endblock %} 10 |
11 | {% block hbody %}{% endblock %} 12 | 13 | 14 | 15 |

Main Page

16 | 17 |
18 | 19 | {% block ffooter %}{% endblock %} 20 |
21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /event/myapp/templates/myapp/profile.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | {% include 'myapp/header.html' %} 3 | 4 | 5 | 6 | 7 | Profile_Page 8 | 9 | 10 | 11 | 12 | 13 | {% block header %} 14 | {% endblock %} 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | {% if message %} 23 | 24 |

{{ message }}

25 | {% endif %} 26 | 27 |

Welcome to your Profile

28 |

User Name = {{ name }}

29 |

Email = {{ email }}

30 |

First Name = {{ first_name }}

31 |

Last Name = {{ last_name }}

32 |
33 | 34 |
35 |
36 | {% csrf_token %} 37 | 38 | 39 |
40 |
41 | 42 | 43 |
44 |

© Copyright by evemanagement.com

45 |
46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /event/myapp/templates/myapp/profile.html~: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | {% include 'myapp/header.html' %} 3 | 4 | 5 | 6 | 7 | Profile_Page 8 | 9 | 10 | 11 | 12 | 13 | {% block header %} 14 | {% endblock %} 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | {% if message %} 23 | 24 |

{{ message }}

25 | {% endif %} 26 | 27 |

Welcome to your Profile

28 |

User Name = {{ name }}

29 |

Email = {{ email }}

30 |

First Name = {{ first_name }}

31 |

Last Name = {{ last_name }}

32 |
33 | 34 |
35 |
36 | {% csrf_token %} 37 | 38 | 39 |
40 |
41 | 42 | 43 |
44 |

© Copyright by evemanagement.com

45 |
46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /event/myapp/templates/myapp/reset_password.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | {% include "myapp/header.html" %} 3 | 4 | 5 | 6 | 7 | 8 | Password Reset Page 9 | {% block link_block %} 10 | {% endblock %} 11 | 12 | 13 | 14 | 15 | 16 | {% block nav_block %} 17 | {% endblock %} 18 | 19 |

Reset Your Password

20 |

Please Enter your Authorised Email Address 21 |
To Reset Your Password

22 |
23 |
24 | {% csrf_token %} 25 | 26 |

Email : {{ form.email }}

27 | 28 | 29 | 30 |
31 |
32 |
33 |

© Copyright by evemanagement.com

34 |
35 | 36 | -------------------------------------------------------------------------------- /event/myapp/templates/myapp/slider.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |
8 |
9 | birthday event 10 |
11 |
12 | marriage event 13 |
14 |
15 | meeting event 16 |
17 |
18 | concert event 19 |
20 |
21 | party events 22 |
23 |
24 |
25 | 26 | -------------------------------------------------------------------------------- /event/myapp/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /event/myapp/urls.py: -------------------------------------------------------------------------------- 1 | __author__ = 'sachin yadav' 2 | 3 | from django.urls import path 4 | from . import views 5 | from . import forms 6 | 7 | urlpatterns = [ 8 | 9 | path('home/',views.main,name='home'), 10 | path('login/',views.login,name='login'), 11 | path('signup/',views.signup,name='signup'), 12 | path('profile/',views.profile,name='profile'), 13 | path('adduser/',views.adduser,name='adduser'), 14 | path('contact/',views.contact,name='contact'), 15 | path('about/',views.about,name='about'), 16 | path('base/',views.base,name='base'), 17 | path('logout/',views.logout,name='logout'), 18 | path('reset_password/',views.reset_password,name='reset_password'), 19 | path('update_password/',views.update_password,name='update_password'), 20 | path('upload_pic/',views.upload_pic,name='upload_pic'), 21 | path('wedding/',views.wedding,name='wedding') 22 | ] 23 | -------------------------------------------------------------------------------- /event/myapp/urls.py~: -------------------------------------------------------------------------------- 1 | __author__ = 'sachin yadav' 2 | 3 | from django.urls import path 4 | from . import views 5 | from . import forms 6 | 7 | urlpatterns = [ 8 | 9 | path('home/',views.main,name='home'), 10 | path('login/',views.login,name='login'), 11 | path('signup/',views.signup,name='signup'), 12 | path('profile/',views.profile,name='profile'), 13 | path('adduser/',views.adduser,name='adduser'), 14 | path('contact/',views.contact,name='contact'), 15 | path('about/',views.about,name='about'), 16 | path('base/',views.base,name='base'), 17 | path('logout/',views.logout,name='logout'), 18 | path('reset_password/',views.reset_password,name='reset_password'), 19 | path('update_password/',views.update_password,name='update_password'), 20 | path('upload_pic/',views.upload_pic,name='upload_pic'), 21 | path('wedding/',views.wedding,name='wedding') 22 | ] 23 | -------------------------------------------------------------------------------- /event/profile_pics/ImageProcessing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/event/profile_pics/ImageProcessing.jpg -------------------------------------------------------------------------------- /myproject/.idea/.name: -------------------------------------------------------------------------------- 1 | myproject -------------------------------------------------------------------------------- /myproject/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /myproject/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /myproject/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /myproject/.idea/myproject.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 26 | -------------------------------------------------------------------------------- /myproject/.idea/scopes/scope_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /myproject/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /myproject/.put_data_base.py.un~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/.put_data_base.py.un~ -------------------------------------------------------------------------------- /myproject/data_set.csv: -------------------------------------------------------------------------------- 1 | ravindra,Ravindra,Shekhawat,ravindra@gmail.com,1234@redhat 2 | abu,khan,hello,ravindra@gmail.com,1234@redhat 3 | ravindra,Ravindra,Shekhawat,ravindra@gmail.com,1234@redhat 4 | ravindra,Ravindra,Shekhawat,ravindra@gmail.com,1234@redhat 5 | ravindra,Ravindra,Shekhawat,ravindra@gmail.com,1234@redhat 6 | ravindra,Ravindra,Shekhawat,ravindra@gmail.com,1234@redhat 7 | ravindra,Ravindra,Shekhawat,ravindra@gmail.com,1234@redhat 8 | ravindra,Ravindra,Shekhawat,ravindra@gmail.com,1234@redhat 9 | ravindra,Ravindra,Shekhawat,ravindra@gmail.com,1234@redhat 10 | ravindra,Ravindra,Shekhawat,ravindra@gmail.com,1234@redhat 11 | -------------------------------------------------------------------------------- /myproject/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/db.sqlite3 -------------------------------------------------------------------------------- /myproject/django.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/django.pdf -------------------------------------------------------------------------------- /myproject/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myproject.settings") 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError as exc: 10 | raise ImportError( 11 | "Couldn't import Django. Are you sure it's installed and " 12 | "available on your PYTHONPATH environment variable? Did you " 13 | "forget to activate a virtual environment?" 14 | ) from exc 15 | execute_from_command_line(sys.argv) 16 | -------------------------------------------------------------------------------- /myproject/multi_threding_in_Python/.four.py.un~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/multi_threding_in_Python/.four.py.un~ -------------------------------------------------------------------------------- /myproject/multi_threding_in_Python/.one.py.un~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/multi_threding_in_Python/.one.py.un~ -------------------------------------------------------------------------------- /myproject/multi_threding_in_Python/.three.py.un~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/multi_threding_in_Python/.three.py.un~ -------------------------------------------------------------------------------- /myproject/multi_threding_in_Python/.two.py.un~: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/multi_threding_in_Python/.two.py.un~ -------------------------------------------------------------------------------- /myproject/multi_threding_in_Python/four.py: -------------------------------------------------------------------------------- 1 | import threading 2 | from random import randint 3 | import time 4 | 5 | class MyWork(threading.Thread): 6 | def __init__(self,threadName,num): 7 | threading.Thread.__init__(self) 8 | self.num = num 9 | self.threadName = threadName 10 | def run(self): 11 | print("\n\n",threading.activeCount()) 12 | print(threading.currentThread()) 13 | print(threading.enumerate()) 14 | print("Starting Thread {} ".format(self.threadName)) 15 | self.squre() 16 | print("Ending Thread {} ".format(self.threadName)) 17 | def squre(self): 18 | for var in range(self.num,0,-1): 19 | print("\nHey I am Thread\n",self.threadName,"Squre of {} is {}".format(var,var**2)) 20 | time.sleep(randint(1,5)) 21 | 22 | a = MyWork('THREAD1',5) 23 | b = MyWork('THREAD2',4) 24 | c = MyWork('THREAD1',6) 25 | d = MyWork('THREAD1',3) 26 | b.start() 27 | a.start() 28 | c.start() 29 | d.start() 30 | a.join() 31 | b.join() 32 | c.join() 33 | d.join() 34 | -------------------------------------------------------------------------------- /myproject/multi_threding_in_Python/four.py~: -------------------------------------------------------------------------------- 1 | import threading 2 | from random import randint 3 | import time 4 | 5 | class MyWork(threading.Thread): 6 | def __init__(self,threadName,num): 7 | threading.Thread.__init__(self) 8 | self.num = num 9 | self.threadName = threadName 10 | def run(self): 11 | print("\n\n",threading.activeCount()) 12 | print(threading.currentThread()) 13 | print(threading.enumerate()) 14 | print("Starting Thread {} ".format(self.threadName)) 15 | self.squre() 16 | print("Ending Thread {} ".format(self.threadName)) 17 | def squre(self): 18 | for var in range(self.num,0,-1): 19 | print("\nHey I am Thread\n",self.threadName,"Squre of {} is {}".format(var,var**2)) 20 | time.sleep(randint(1,5)) 21 | 22 | a = MyWork('THREAD1',10) 23 | b = MyWork('THREAD2',20) 24 | c = MyWork('THREAD1',5) 25 | d = MyWork('THREAD1',7) 26 | b.start() 27 | a.start() 28 | c.start() 29 | d.start() 30 | a.join() 31 | b.join() 32 | c.join() 33 | d.join() 34 | -------------------------------------------------------------------------------- /myproject/multi_threding_in_Python/one.py: -------------------------------------------------------------------------------- 1 | import time 2 | n = int(input("Enter a number : ")) 3 | 4 | def squre(n): 5 | if n > 0 : 6 | print("\nSqure = ",n**2) 7 | time.sleep(2) 8 | squre(n-1) 9 | 10 | 11 | def cube(n): 12 | if n > 0 : 13 | print("\nCube = ",n**3) 14 | time.sleep(1) 15 | cube(n-1) 16 | 17 | squre(n) 18 | cube(n) 19 | 20 | -------------------------------------------------------------------------------- /myproject/multi_threding_in_Python/one.py~: -------------------------------------------------------------------------------- 1 | import time 2 | n = int(input("Enter a number : ")) 3 | 4 | def squre(n): 5 | if n > 0 : 6 | print("Squre = ",n**2) 7 | time.sleep(2) 8 | squre(n-1) 9 | 10 | 11 | def cube(n): 12 | if n > 0 : 13 | print("Cube = ",n**3) 14 | time.sleep(1) 15 | squre(n-1) 16 | 17 | squre(n) 18 | cube(n) 19 | 20 | -------------------------------------------------------------------------------- /myproject/multi_threding_in_Python/three.py: -------------------------------------------------------------------------------- 1 | import threading 2 | import time 3 | 4 | class MyWork(threading.Thread): 5 | def __init__(self,threadID,threadName,Counter,sleep): 6 | threading.Thread.__init__(self) 7 | self.threadID=threadID 8 | self.threadName = threadName 9 | self.counter = Counter 10 | self.s = sleep 11 | def run(self): 12 | print("Starting Thread {} which has id {}".format(self.threadName,self.threadID)) 13 | self.hello() 14 | print("Ending Thread {} which has id {}".format(self.threadName,self.threadID)) 15 | def hello(self): 16 | for var in range(self.counter): 17 | print("\nHey I am Thread\n",self.threadName) 18 | time.sleep(self.s) 19 | 20 | a = MyWork(1,'THREAD1',10,2) 21 | b = MyWork(2,'THREAD2',6,3) 22 | 23 | a.start() 24 | b.start() 25 | 26 | a.join() 27 | b.join() 28 | -------------------------------------------------------------------------------- /myproject/multi_threding_in_Python/three.py~: -------------------------------------------------------------------------------- 1 | import threading 2 | import time 3 | 4 | class MyWork(threading.Thread): 5 | def __init__(self,threadID,threadName,Counter,sleep): 6 | threading.Thread.__init__(self) 7 | self.threadID=threadID 8 | self.threadName = threadName 9 | self.counter = Counter 10 | self.s = sleep 11 | def run(self): 12 | print("Starting Thread {} which has id {}".format(self.threadName,self.threadID)) 13 | self.hello() 14 | print("Ending Thread {} which has id {}".format(self.threadName,self.threadID)) 15 | def hello(self): 16 | for var in range(self.counter): 17 | print("\nHey I am Thread\n",self.threadName) 18 | time.sleep(self.s) 19 | 20 | a = MyWork(1,'THREAD1',10,2) 21 | b = MyWork(2,'THREAD2',6,3) 22 | 23 | a.start() 24 | b.start() 25 | 26 | a.join() 27 | b.join() 28 | -------------------------------------------------------------------------------- /myproject/multi_threding_in_Python/two.py: -------------------------------------------------------------------------------- 1 | import _thread 2 | import time 3 | 4 | n = int(input("Enter a number : ")) 5 | 6 | def squre(n): 7 | if n > 0 : 8 | print("\nSqure = ",n**2) 9 | time.sleep(2) 10 | squre(n-1) 11 | 12 | 13 | def cube(n): 14 | if n > 0 : 15 | print("\nCube = ",n**3) 16 | time.sleep(1) 17 | cube(n-1) 18 | 19 | _thread.start_new_thread(squre,(n,)) 20 | _thread.start_new_thread(cube,(n,)) 21 | 22 | while True : 23 | pass 24 | -------------------------------------------------------------------------------- /myproject/multi_threding_in_Python/two.py~: -------------------------------------------------------------------------------- 1 | import time 2 | n = int(input("Enter a number : ")) 3 | 4 | def squre(n): 5 | if n > 0 : 6 | print("\nSqure = ",n**2) 7 | time.sleep(2) 8 | squre(n-1) 9 | 10 | 11 | def cube(n): 12 | if n > 0 : 13 | print("\nCube = ",n**3) 14 | time.sleep(1) 15 | cube(n-1) 16 | 17 | squre(n) 18 | cube(n) 19 | 20 | -------------------------------------------------------------------------------- /myproject/myapp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/myapp/__init__.py -------------------------------------------------------------------------------- /myproject/myapp/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/myapp/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /myproject/myapp/__pycache__/admin.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/myapp/__pycache__/admin.cpython-36.pyc -------------------------------------------------------------------------------- /myproject/myapp/__pycache__/forms.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/myapp/__pycache__/forms.cpython-36.pyc -------------------------------------------------------------------------------- /myproject/myapp/__pycache__/models.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/myapp/__pycache__/models.cpython-36.pyc -------------------------------------------------------------------------------- /myproject/myapp/__pycache__/urls.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/myapp/__pycache__/urls.cpython-36.pyc -------------------------------------------------------------------------------- /myproject/myapp/__pycache__/views.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/myapp/__pycache__/views.cpython-36.pyc -------------------------------------------------------------------------------- /myproject/myapp/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | from .models import Users 5 | admin.site.register(Users) 6 | -------------------------------------------------------------------------------- /myproject/myapp/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class MyappConfig(AppConfig): 5 | name = 'myapp' 6 | -------------------------------------------------------------------------------- /myproject/myapp/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | 3 | class login(forms.Form) : 4 | 5 | Name = forms.CharField(max_length=100) 6 | Password = forms.CharField(max_length=100,widget=forms.PasswordInput) 7 | 8 | class signup(forms.Form): 9 | Name = forms.CharField(max_length=100) 10 | First_Name = forms.CharField(max_length=100) 11 | Last_Name = forms.CharField(max_length=100) 12 | Email = forms.EmailField(widget=forms.EmailInput) 13 | Password = forms.CharField(max_length=100,widget=forms.PasswordInput) 14 | 15 | class reset_form(forms.Form): 16 | email = forms.EmailField() 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /myproject/myapp/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.6 on 2018-06-25 11:06 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [ 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='Users', 16 | fields=[ 17 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('Name', models.CharField(max_length=50)), 19 | ('First_Name', models.CharField(max_length=50)), 20 | ('Last_Name', models.CharField(max_length=50)), 21 | ('Email', models.EmailField(max_length=254)), 22 | ('Password', models.CharField(max_length=50)), 23 | ], 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /myproject/myapp/migrations/0002_auto_20180626_1653.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 2.0.6 on 2018-06-26 11:23 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('myapp', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='users', 15 | name='Name', 16 | field=models.CharField(max_length=50, unique=True), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /myproject/myapp/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/myapp/migrations/__init__.py -------------------------------------------------------------------------------- /myproject/myapp/migrations/__pycache__/0001_initial.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/myapp/migrations/__pycache__/0001_initial.cpython-36.pyc -------------------------------------------------------------------------------- /myproject/myapp/migrations/__pycache__/0002_auto_20180626_1653.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/myapp/migrations/__pycache__/0002_auto_20180626_1653.cpython-36.pyc -------------------------------------------------------------------------------- /myproject/myapp/migrations/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/myapp/migrations/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /myproject/myapp/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | class Users(models.Model): 5 | Name = models.CharField(max_length=50,unique=True) 6 | First_Name = models.CharField(max_length=50) 7 | Last_Name = models.CharField(max_length=50) 8 | Email = models.EmailField() 9 | Password = models.CharField(max_length=50) 10 | def __str__(self): 11 | return self.Name 12 | 13 | -------------------------------------------------------------------------------- /myproject/myapp/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /myproject/myapp/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | urlpatterns = [ 4 | path('',views.index,name='home'), 5 | path('hello/',views.hello,name='hello'), 6 | path('hello//',views.hello,name='hello'), 7 | path('signup/',views.Signup,name='signup'), 8 | path('mklogin/',views.mklogin,name='mklogin'), 9 | path('mksignup/',views.mksignup,name='mksignup'), 10 | path('logout/',views.logout,name='logout'), 11 | path('forgot/',views.forgot,name='forgot'), 12 | path('change_password/',views.change_password), 13 | ] 14 | -------------------------------------------------------------------------------- /myproject/myapp/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render,redirect 2 | from django.http import HttpResponse 3 | from .forms import login,signup,reset_form 4 | from .models import Users 5 | from django.core.mail import send_mail 6 | from ..myproject import settings 7 | def index(request): 8 | if request.session.get('user') and request.session.get('password') : 9 | msg = "Welcome Back User {}".format(request.session['user']) 10 | return render(request,'myapp/index.html',{'msg':msg}) 11 | else : 12 | form = login() 13 | return render(request,'myapp/index.html',{ 'form':form, }) 14 | def hello(request,id=None): 15 | data = [ "{} Hello World".format(var+1) for var in range(50) ] 16 | return render(request,'myapp/hello.html',{ 'name':id,'data':data }) 17 | def Signup(request): 18 | form = signup() 19 | return render(request,'myapp/signup.html',{ 'form':form, }) 20 | def mklogin(request): 21 | form = login(request.POST) 22 | if form.is_valid(): 23 | name = form.cleaned_data['Name'] 24 | password = form.cleaned_data['Password'] 25 | try : 26 | user = Users.objects.get(Name=name) 27 | if password == user.Password : 28 | request.session['user'] = name 29 | request.session['password'] = password 30 | return render(request,'myapp/mklogin.html',{'name':name,'password':password}) 31 | else : 32 | form = login() 33 | error = "Invalid Password Try Again" 34 | return render(request,'myapp/index.html',{'form':form,'error':error}) 35 | 36 | except Exception as e : 37 | form = signup() 38 | return render(request,'myapp/signup.html',{'form':form,'error':"No such user Exist \n Please Signup"}) 39 | 40 | 41 | else : 42 | return HttpResponse("

Form is not valid

") 43 | def mksignup(request): 44 | form = signup(request.POST) 45 | if form.is_valid(): 46 | data = { 47 | 'Name' : form.cleaned_data['Name'], 48 | 'Password' : form.cleaned_data['Password'], 49 | 'First_Name' : form.cleaned_data['First_Name'], 50 | 'Last_Name' : form.cleaned_data['Last_Name'], 51 | 'Email' : form.cleaned_data['Email'], 52 | } 53 | obj = Users.objects.create(**data) 54 | obj.save() 55 | return render(request,'myapp/mksignup.html',{ 'data':data }) 56 | 57 | else : 58 | return HttpResponse("

Form is not valid

") 59 | 60 | def logout(request): 61 | del request.session['user'] 62 | del request.session['password'] 63 | form = login() 64 | return render(request,'myapp/index.html',{'form':form,}) 65 | 66 | def forgot(request): 67 | form = reset_form() 68 | return render(request,'myapp/forgot.html',{ 'form':form,}) 69 | 70 | def change_password(request): 71 | form = reset_form(request.POST) 72 | if form.is_valid() : 73 | try : 74 | obj = Users.objects.get(Email=form.cleaned_data['Email']) 75 | from random import choice 76 | l = [ 1,2,3,4,5,6,7,8,9,0] 77 | s = str(choice(l))+str(choice(l))+str(choice(l))+str(choice(l)) 78 | request.session['otp'] = s 79 | message = "Hey Check this out \nYour OTP for reset password is %s "%(s) 80 | 81 | subject = "Reset Password" 82 | from_email = "3496.grras@gmail.com" 83 | to_email = form.cleaned_data['email'] 84 | send_mail(subject, message, from_email, (to_email,),auth_password = settings.EMAIL_HOST_PASSWORD,fail_silently=False) 85 | return render(request,'myapp/reset_password.html') 86 | 87 | except Exception as e : 88 | form = login() 89 | error = "This Email Address does not Exist in Our System Try Again" 90 | return render(request,'myapp/index.html',{'form':form,'error':error}) 91 | else : 92 | form = login() 93 | error = "Invalid Form for Password Reset Try Again" 94 | return render(request,'myapp/index.html',{'form':form,'error':error}) -------------------------------------------------------------------------------- /myproject/myproject/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/myproject/__init__.py -------------------------------------------------------------------------------- /myproject/myproject/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/myproject/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /myproject/myproject/__pycache__/settings.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/myproject/__pycache__/settings.cpython-36.pyc -------------------------------------------------------------------------------- /myproject/myproject/__pycache__/urls.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/myproject/__pycache__/urls.cpython-36.pyc -------------------------------------------------------------------------------- /myproject/myproject/__pycache__/wsgi.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/myproject/__pycache__/wsgi.cpython-36.pyc -------------------------------------------------------------------------------- /myproject/myproject/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for myproject project. 3 | 4 | Generated by 'django-admin startproject' using Django 2.0.6. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.0/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/2.0/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' 20 | EMAIL_USE_SSL=True 21 | EMAIL_PORT = 465 22 | EMAIL_HOST = 'smtp.gmail.com' 23 | EMAIL_HOST_USER = '3496.grras@gmail.com' 24 | EMAIL_HOST_PASSWORD = 'abcdefghijklmnop' 25 | DEFAULT_FROM_EMAIL = EMAIL_HOST_USER 26 | 27 | 28 | # Quick-start development settings - unsuitable for production 29 | # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ 30 | 31 | # SECURITY WARNING: keep the secret key used in production secret! 32 | SECRET_KEY = '$%ltj=56mjgmp*epc$bxv@544njf#$wj&m=r(r0w_-28u-(^#9' 33 | 34 | # SECURITY WARNING: don't run with debug turned on in production! 35 | DEBUG = True 36 | 37 | ALLOWED_HOSTS = [] 38 | 39 | 40 | # Application definition 41 | 42 | INSTALLED_APPS = [ 43 | 'myapp', 44 | 'django.contrib.admin', 45 | 'django.contrib.auth', 46 | 'django.contrib.contenttypes', 47 | 'django.contrib.sessions', 48 | 'django.contrib.messages', 49 | 'django.contrib.staticfiles', 50 | ] 51 | 52 | MIDDLEWARE = [ 53 | 'django.middleware.security.SecurityMiddleware', 54 | 'django.contrib.sessions.middleware.SessionMiddleware', 55 | 'django.middleware.common.CommonMiddleware', 56 | 'django.middleware.csrf.CsrfViewMiddleware', 57 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 58 | 'django.contrib.messages.middleware.MessageMiddleware', 59 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 60 | ] 61 | 62 | ROOT_URLCONF = 'myproject.urls' 63 | 64 | TEMPLATES = [ 65 | { 66 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 67 | 'DIRS': [ os.path.join('templates')], 68 | 'APP_DIRS': True, 69 | 'OPTIONS': { 70 | 'context_processors': [ 71 | 'django.template.context_processors.debug', 72 | 'django.template.context_processors.request', 73 | 'django.contrib.auth.context_processors.auth', 74 | 'django.contrib.messages.context_processors.messages', 75 | ], 76 | }, 77 | }, 78 | ] 79 | 80 | WSGI_APPLICATION = 'myproject.wsgi.application' 81 | 82 | 83 | # Database 84 | # https://docs.djangoproject.com/en/2.0/ref/settings/#databases 85 | 86 | DATABASES = { 87 | 'default': { 88 | 'ENGINE': 'django.db.backends.mysql', 89 | 'NAME': 'my_project', 90 | 'HOST' : 'localhost', 91 | 'PORT' : 3306, 92 | 'USER' : 'my_project', 93 | 'PASSWORD' : 'redhat', 94 | } 95 | } 96 | 97 | 98 | # Password validation 99 | # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators 100 | 101 | AUTH_PASSWORD_VALIDATORS = [ 102 | { 103 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 104 | }, 105 | { 106 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 107 | }, 108 | { 109 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 110 | }, 111 | { 112 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 113 | }, 114 | ] 115 | 116 | 117 | # Internationalization 118 | # https://docs.djangoproject.com/en/2.0/topics/i18n/ 119 | 120 | LANGUAGE_CODE = 'en-us' 121 | 122 | TIME_ZONE = 'UTC' 123 | 124 | USE_I18N = True 125 | 126 | USE_L10N = True 127 | 128 | USE_TZ = True 129 | 130 | 131 | # Static files (CSS, JavaScript, Images) 132 | # https://docs.djangoproject.com/en/2.0/howto/static-files/ 133 | STATIC_ROOT = '' 134 | STATIC_URL = '/static/' 135 | STATICFILES_DIRS = ( os.path.join('static'),os.path.join('myapp/static')) 136 | TEMPLATE_DIRS = ( 137 | os.path.join(BASE_DIR, 'templates'), 138 | ) 139 | -------------------------------------------------------------------------------- /myproject/myproject/settings.py~: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for myproject project. 3 | 4 | Generated by 'django-admin startproject' using Django 2.0.6. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.0/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/2.0/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' 20 | EMAIL_USE_SSL=True 21 | EMAIL_PORT = 465 22 | EMAIL_HOST = 'smtp.gmail.com' 23 | EMAIL_HOST_USER = '3496.grras@gmail.com' 24 | EMAIL_HOST_PASSWORD = 'abcdefghijklmnop' 25 | DEFAULT_FROM_EMAIL = EMAIL_HOST_USER 26 | 27 | 28 | # Quick-start development settings - unsuitable for production 29 | # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ 30 | 31 | # SECURITY WARNING: keep the secret key used in production secret! 32 | SECRET_KEY = '$%ltj=56mjgmp*epc$bxv@544njf#$wj&m=r(r0w_-28u-(^#9' 33 | 34 | # SECURITY WARNING: don't run with debug turned on in production! 35 | DEBUG = True 36 | 37 | ALLOWED_HOSTS = [] 38 | 39 | 40 | # Application definition 41 | 42 | INSTALLED_APPS = [ 43 | 'myapp', 44 | 'django.contrib.admin', 45 | 'django.contrib.auth', 46 | 'django.contrib.contenttypes', 47 | 'django.contrib.sessions', 48 | 'django.contrib.messages', 49 | 'django.contrib.staticfiles', 50 | ] 51 | 52 | MIDDLEWARE = [ 53 | 'django.middleware.security.SecurityMiddleware', 54 | 'django.contrib.sessions.middleware.SessionMiddleware', 55 | 'django.middleware.common.CommonMiddleware', 56 | 'django.middleware.csrf.CsrfViewMiddleware', 57 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 58 | 'django.contrib.messages.middleware.MessageMiddleware', 59 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 60 | ] 61 | 62 | ROOT_URLCONF = 'myproject.urls' 63 | 64 | TEMPLATES = [ 65 | { 66 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 67 | 'DIRS': [ os.path.join('templates')], 68 | 'APP_DIRS': True, 69 | 'OPTIONS': { 70 | 'context_processors': [ 71 | 'django.template.context_processors.debug', 72 | 'django.template.context_processors.request', 73 | 'django.contrib.auth.context_processors.auth', 74 | 'django.contrib.messages.context_processors.messages', 75 | ], 76 | }, 77 | }, 78 | ] 79 | 80 | WSGI_APPLICATION = 'myproject.wsgi.application' 81 | 82 | 83 | # Database 84 | # https://docs.djangoproject.com/en/2.0/ref/settings/#databases 85 | 86 | DATABASES = { 87 | 'default': { 88 | 'ENGINE': 'django.db.backends.mysql', 89 | 'NAME': 'my_project', 90 | 'HOST' : 'localhost', 91 | 'PORT' : 3306, 92 | 'USER' : 'my_project', 93 | 'PASSWORD' : 'redhat', 94 | } 95 | } 96 | 97 | 98 | # Password validation 99 | # https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators 100 | 101 | AUTH_PASSWORD_VALIDATORS = [ 102 | { 103 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 104 | }, 105 | { 106 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 107 | }, 108 | { 109 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 110 | }, 111 | { 112 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 113 | }, 114 | ] 115 | 116 | 117 | # Internationalization 118 | # https://docs.djangoproject.com/en/2.0/topics/i18n/ 119 | 120 | LANGUAGE_CODE = 'en-us' 121 | 122 | TIME_ZONE = 'UTC' 123 | 124 | USE_I18N = True 125 | 126 | USE_L10N = True 127 | 128 | USE_TZ = True 129 | 130 | 131 | # Static files (CSS, JavaScript, Images) 132 | # https://docs.djangoproject.com/en/2.0/howto/static-files/ 133 | STATIC_ROOT = '' 134 | STATIC_URL = '/static/' 135 | STATICFILES_DIRS = ( os.path.join('static'),os.path.join('myapp/static')) 136 | TEMPLATE_DIRS = ( 137 | os.path.join(BASE_DIR, 'templates'), 138 | ) -------------------------------------------------------------------------------- /myproject/myproject/urls.py: -------------------------------------------------------------------------------- 1 | """myproject URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/2.0/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.urls import include, path 14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 15 | """ 16 | from django.contrib import admin 17 | from django.urls import path,include 18 | 19 | urlpatterns = [ 20 | path('admin/', admin.site.urls), 21 | path('',include('myapp.urls')), 22 | ] 23 | -------------------------------------------------------------------------------- /myproject/myproject/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for myproject project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myproject.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /myproject/put_data_base.py: -------------------------------------------------------------------------------- 1 | import pymysql as sql 2 | db = sql.connect('localhost','my_project','redhat','my_project') 3 | c = db.cursor() 4 | 5 | f = open('data_set.csv') 6 | 7 | for line in f : 8 | d = line.split(',') 9 | d[4] = d[4][:-1] 10 | cmd = "insert into myapp_users(Name,First_Name,Last_Name,Email,Password) values('{}','{}','{}','{}','{}')".format(d[0],d[1],d[2],d[3],d[4]) 11 | c.execute(cmd) 12 | 13 | db.commit() 14 | c.close() 15 | db.close() 16 | -------------------------------------------------------------------------------- /myproject/static/myapp/main.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | color:red; 3 | } 4 | h2 { color: indigo; 5 | 6 | } 7 | body{ 8 | background-color: #abcdef; 9 | } 10 | table 11 | { 12 | border: groove; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /myproject/templates/myapp/foot.html: -------------------------------------------------------------------------------- 1 | {% block footer %} 2 | 3 |
4 |

Copyright&Grras_Solutions_PVT_LTD

5 |
6 | 7 | {% endblock %} -------------------------------------------------------------------------------- /myproject/templates/myapp/forgot.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% load static %} 5 | 6 | 7 | HOME 8 | 9 | 10 | {% include 'myapp/head.html' %} 11 | {% block header %} 12 | {% endblock %} 13 | 14 |

Welcome to First Template of Django

15 |

It is super Easy

16 | {% if error %} 17 |

{{ error }}

18 | 19 | {% endif %} 20 | 21 | {% if msg %} 22 |

{{ msg }}

23 |

LOGOUT?

24 | {% else %} 25 |
26 |
27 | {% csrf_token %} 28 | {{ form.as_p }} 29 | 30 | 31 |
32 |
33 | {% endif %} 34 | {% include 'myapp/foot.html' %} 35 | {% block footer %} 36 | {% endblock %} 37 | 38 | -------------------------------------------------------------------------------- /myproject/templates/myapp/head.html: -------------------------------------------------------------------------------- 1 | {% block header %} 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|HOME|HELLO|
9 | {% endblock %} -------------------------------------------------------------------------------- /myproject/templates/myapp/hello.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% load static %} 5 | 6 | 7 | HELLO 8 | 9 | 10 | {% include 'myapp/head.html' %} 11 | {% block header %} 12 | {% endblock %} 13 |

Welcome to HELLO PAGE OF DJANGO.

14 | {% if name %} 15 |

Welcome {{ name }} to Django

16 | {% endif %} 17 |

It is super Easy

18 | {% include 'myapp/foot.html' %} 19 | 20 | {% for var in data %} 21 | 22 |

{{ var }}

23 | 24 | {% endfor %} 25 | 26 | {% block footer %} 27 | 28 | {% endblock %} 29 | 30 | -------------------------------------------------------------------------------- /myproject/templates/myapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% load static %} 5 | 6 | 7 | HOME 8 | 9 | 10 | {% include 'myapp/head.html' %} 11 | {% block header %} 12 | {% endblock %} 13 | 14 |

Welcome to First Template of Django

15 |

It is super Easy

16 | {% if error %} 17 |

{{ error }}

18 | 19 | {% endif %} 20 | 21 | {% if msg %} 22 |

{{ msg }}

23 |

LOGOUT?

24 | {% else %} 25 |
26 |
27 | {% csrf_token %} 28 | {{ form.as_p }} 29 | 30 | SignUp? 31 |
32 | Forget Password ? 33 |
34 | {% endif %} 35 | {% include 'myapp/foot.html' %} 36 | {% block footer %} 37 | {% endblock %} 38 | 39 | -------------------------------------------------------------------------------- /myproject/templates/myapp/mklogin.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% load static %} 5 | 6 | 7 | HOME 8 | 9 | 10 | {% include 'myapp/head.html' %} 11 | {% block header %} 12 | {% endblock %} 13 |
14 |

Welcome Back {{ name }}

15 |

Your Password is {{ password }}

16 |
17 | 18 | {% include 'myapp/foot.html' %} 19 | {% block footer %} 20 | {% endblock %} 21 | 22 | -------------------------------------------------------------------------------- /myproject/templates/myapp/mksignup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% load static %} 5 | 6 | 7 | HOME 8 | 9 | 10 | {% include 'myapp/head.html' %} 11 | {% block header %} 12 | {% endblock %} 13 |
14 | 15 | {% for key,value in data.items %} 16 |

{{ key }} = {{ value }}

17 | {% endfor %} 18 |
19 | 20 | {% include 'myapp/foot.html' %} 21 | {% block footer %} 22 | {% endblock %} 23 | 24 | -------------------------------------------------------------------------------- /myproject/templates/myapp/signup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% load static %} 5 | 6 | 7 | HOME 8 | 9 | 10 | {% include 'myapp/head.html' %} 11 | {% block header %} 12 | {% endblock %} 13 | 14 |

Welcome to First Template of Django

15 |

It is super Easy

16 | {% if error %} 17 |

{{ error }}

18 | {% endif %} 19 |
20 |
21 | {% csrf_token %} 22 | {{ form.as_p }} 23 | 24 | LOGIN? 25 |
26 |
27 | {% include 'myapp/foot.html' %} 28 | {% block footer %} 29 | {% endblock %} 30 | 31 | -------------------------------------------------------------------------------- /myproject/tkinter_3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinyadav3496/Python-Projects/a89b07391ff7fc9a0581f74b78423b260d863134/myproject/tkinter_3.pdf -------------------------------------------------------------------------------- /security_webcam/webcam.py: -------------------------------------------------------------------------------- 1 | """ 2 | will access camera device and record video footage 3 | and will save them in files. 4 | """ 5 | import cv2 6 | from datetime import datetime, timedelta 7 | 8 | TIMEOUT = 30 9 | 10 | camera = cv2.VideoCapture(2) 11 | # Define the codec and create VideoWriter object 12 | fourcc = cv2.VideoWriter_fourcc(*'XVID') # (*"X264") #(*'XVID') 13 | 14 | initial_time = datetime.now() 15 | #out = cv2.VideoWriter(f'{str(initial_time)}.avi',fourcc, 10.0, (640,480)) 16 | name = f"video_{initial_time.day}_{initial_time.month}_{initial_time.year}_{initial_time.hour}_{initial_time.minute}.avi" 17 | print(name) 18 | out = cv2.VideoWriter(name,fourcc, 20.0, (640,480)) 19 | 20 | while True: 21 | ret, image = camera.read() 22 | if ret == True: 23 | image = cv2.flip(image, 1) 24 | #im = cv2.cvtColor(image,cv2.COLOR_BGR2GRAY) # or convert 25 | #equ = cv2.equalizeHist(im) 26 | #cv2.imshow('frame_1', equ) 27 | cv2.imshow('frame_2', image) 28 | out.write(image) 29 | 30 | if datetime.now().timestamp() >= (initial_time + timedelta(minutes=1)).timestamp(): 31 | out.release() 32 | print("File Saved!") 33 | initial_time = datetime.now() 34 | name = f"video_{initial_time.day}_{initial_time.month}_{initial_time.year}_{initial_time.hour}_{initial_time.minute}.avi" 35 | print(name) 36 | out = cv2.VideoWriter(name,fourcc, 10.0, (640,480)) 37 | 38 | if cv2.waitKey(1) & 0xFF == ord('q'): 39 | break 40 | else: 41 | break 42 | camera.release() 43 | out.release() 44 | cv2.destroyAllWindows() 45 | 46 | -------------------------------------------------------------------------------- /tic_tac_toe.py: -------------------------------------------------------------------------------- 1 | from itertools import permutations 2 | import sys 3 | import random 4 | import os 5 | import time 6 | 7 | 8 | def win(data): 9 | win_comb = [ (1,2,3), (1,4,7), (1,5,9), (2,5,8), (3,6,9), (3,5,7),(4,5,6), (7,8,9) ] 10 | player_comb = list(permutations(sorted(data),3)) 11 | 12 | 13 | for comb in win_comb: 14 | if comb in player_comb : 15 | return True 16 | else : 17 | return False 18 | 19 | 20 | def print_board(msg): 21 | clr_scr() 22 | print(msg) 23 | print("\n\nYour Current Board is : \n") 24 | 25 | for var in board : 26 | print("\t\t\t","-"*19) 27 | print("\t\t\t","| | | |") 28 | print("\t\t\t",f"| {var[0]} | {var[1]} | {var[2]} |") 29 | print("\t\t\t","| | | |") 30 | 31 | print("\t\t\t","-"*19) 32 | print("\n\n") 33 | 34 | 35 | 36 | 37 | def choice(player): 38 | 39 | possible_choices = [ '1','2','3','4','5','6','7','8','9' ] 40 | print("\n\nLeft Positions : ",*total_pos) 41 | ch = input(f"\n\n{player} pos : ") 42 | if ch in possible_choices : 43 | ch = int(ch) 44 | if ch in covered_pos : 45 | print_board("") 46 | print("\n\nThat Position is Already Choosen Please Select Another Position \n\n") 47 | return choice(player) 48 | else : 49 | covered_pos.append(ch) 50 | total_pos.remove(ch) 51 | return ch 52 | 53 | else : 54 | print_board("") 55 | print("\n\nInvalid Choice please Select only 1-9 positions \nTry Again\n\n") 56 | return choice(player) 57 | 58 | def play_game(p_list): 59 | c = 1 60 | ch1 = choice(p_list[1][0]) 61 | p_list[1][2].append(ch1) 62 | pos_ch1 = pos.get(ch1) 63 | board[pos_ch1[0]][pos_ch1[1]] = p_list[1][1] 64 | print_board(f'\n\nAfter move {c} the board is ') 65 | if win(p_list[1][2]) : 66 | print(f"\n\nPlayer {p_list[0][0]} has won the Game\n\n") 67 | return True 68 | c = c + 1 69 | 70 | k = 1 71 | while k <= 4 : 72 | ch1 = choice(p_list[0][0]) 73 | p_list[0][2].append(ch1) 74 | pos_ch1 = pos.get(ch1) 75 | board[pos_ch1[0]][pos_ch1[1]] = p_list[0][1] 76 | print_board(f'\n\nAfter move {c} the board is ') 77 | if win(p_list[0][2]) : 78 | print(f"\n\nPlayer {p_list[0][0]} has won the Game\n\n") 79 | break 80 | c = c + 1 81 | ch1 = choice(p_list[1][0]) 82 | p_list[1][2].append(ch1) 83 | pos_ch1 = pos.get(ch1) 84 | board[pos_ch1[0]][pos_ch1[1]] = p_list[1][1] 85 | print_board(f'\n\nAfter move {c} the board is ') 86 | if win(p_list[1][2]) : 87 | print(f"\n\nPlayer {p_list[1][0]} has won the Game\n\n") 88 | break 89 | c = c + 1 90 | k = k + 1 91 | 92 | 93 | else : 94 | print(f"\n\nwoooo...Match is Tie Between {p_list[0][0]} and {p_list[1][0]}\n\n") 95 | 96 | 97 | def clr_scr(): 98 | 99 | os.system('cls') 100 | print('\n\n\n') 101 | 102 | if __name__ == "__main__" : 103 | 104 | clr_scr() 105 | print("\n\nWelcome to Tic Tac Toe Game\n\n") 106 | pos = { 1:(0,0), 2:(0,1), 3:(0,2), 4:(1,0), 5:(1,1), 6:(1,2), 7:(2,0),8:(2,1),9:(2,2) } 107 | 108 | 109 | board = [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ] ] 110 | print_board('\t\tHere are the key Positions to select your move') 111 | 112 | input("\n\nPress Enter key to Continue Game ") 113 | 114 | board = [ [ ' ', ' ', ' ' ], [ ' ', ' ', ' ' ], [ ' ', ' ', ' '] ] 115 | print_board('\t\tafter initial Move the board is ') 116 | 117 | player1 = input("\n\nEnter Player one name : ") 118 | player2 = input("\n\nEnter player two name : ") 119 | 120 | time.sleep(2) 121 | clr_scr() 122 | print("\n\nSymbols --> X and 0 ") 123 | print("\n\nChoosing The Symobls for each Player") 124 | symbol = [ 'X', '0'] 125 | random.shuffle(symbol) 126 | print(f'\n\n{player1} symbol is - {symbol[0]}') 127 | print(f'\n\n{player2} symbol is - {symbol[1]}') 128 | 129 | p_list = ( ( player1, symbol[0],[] ),( player2, symbol[1],[] ) ) 130 | 131 | total_pos = [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ] 132 | covered_pos = [] 133 | 134 | input("\nPress Any key to Start Game ".center(300)) 135 | print_board('Initial Status of Board') 136 | 137 | play_game(p_list) 138 | 139 | --------------------------------------------------------------------------------