Skip to content

Commit 923720f

Browse files
committed
UI created
1 parent cb4801e commit 923720f

File tree

6,990 files changed

+1345109
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,990 files changed

+1345109
-0
lines changed

app.py

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import sqlite3
2+
from flask.templating import render_template_string
3+
import pandas as pd
4+
from sqlalchemy import create_engine, engine
5+
from flask import Flask,render_template,request,redirect
6+
import os
7+
from werkzeug.utils import secure_filename
8+
app=Flask(__name__)
9+
UPLOAD_FOLDER = 'static/uploads'
10+
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
11+
# file = 'pragmatech.xlsx'
12+
# output = 'output.xlsx'
13+
14+
15+
16+
# df = pd.read_excel(file, sheet_name='Sheet1')
17+
# df
18+
19+
# df = pd.read_excel('pragmatech.xlsx')
20+
# print(df.head())
21+
22+
# engine = create_engine("sqlite:///data.db", echo=False)
23+
24+
@app.route("/salam")
25+
def salam():
26+
return render_template("salam.html")
27+
@app.route("/", methods=["GET","POST"])
28+
def func():
29+
if request.method=="POST":
30+
file = request.files['file']
31+
filename = secure_filename(file.filename)
32+
file.save(os.path.join(app.config['UPLOAD_FOLDER'], filename))
33+
return redirect('/')
34+
return render_template("index.html")
35+
36+
if __name__ == "__main__":
37+
app.run(debug=True)
38+
39+
40+

static/sample.txt

Whitespace-only changes.

static/uploads/pragmatec.xlsx

7.95 KB
Binary file not shown.

templates/index.html

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<form action="/" method="POST" enctype="multipart/form-data">
2+
<input type="file" name="file" id="">
3+
<button type="submit" class="btn btn-primary mt-3">Submit</button>
4+
</form>

templates/salam.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
salam

templates/sample.txt

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
/* -*- indent-tabs-mode: nil; tab-width: 4; -*- */
2+
3+
/* Greenlet object interface */
4+
5+
#ifndef Py_GREENLETOBJECT_H
6+
#define Py_GREENLETOBJECT_H
7+
8+
#include <Python.h>
9+
10+
#ifdef __cplusplus
11+
extern "C" {
12+
#endif
13+
14+
/* This is deprecated and undocumented. It does not change. */
15+
#define GREENLET_VERSION "1.0.0"
16+
17+
typedef struct _greenlet {
18+
PyObject_HEAD
19+
char* stack_start;
20+
char* stack_stop;
21+
char* stack_copy;
22+
intptr_t stack_saved;
23+
struct _greenlet* stack_prev;
24+
struct _greenlet* parent;
25+
PyObject* run_info;
26+
struct _frame* top_frame;
27+
int recursion_depth;
28+
PyObject* weakreflist;
29+
#if PY_VERSION_HEX >= 0x030700A3
30+
_PyErr_StackItem* exc_info;
31+
_PyErr_StackItem exc_state;
32+
#else
33+
PyObject* exc_type;
34+
PyObject* exc_value;
35+
PyObject* exc_traceback;
36+
#endif
37+
PyObject* dict;
38+
#if PY_VERSION_HEX >= 0x030700A3
39+
PyObject* context;
40+
#endif
41+
#if PY_VERSION_HEX >= 0x30A00B1
42+
CFrame* cframe;
43+
#endif
44+
} PyGreenlet;
45+
46+
#define PyGreenlet_Check(op) PyObject_TypeCheck(op, &PyGreenlet_Type)
47+
#define PyGreenlet_MAIN(op) (((PyGreenlet*)(op))->stack_stop == (char*)-1)
48+
#define PyGreenlet_STARTED(op) (((PyGreenlet*)(op))->stack_stop != NULL)
49+
#define PyGreenlet_ACTIVE(op) (((PyGreenlet*)(op))->stack_start != NULL)
50+
#define PyGreenlet_GET_PARENT(op) (((PyGreenlet*)(op))->parent)
51+
52+
/* C API functions */
53+
54+
/* Total number of symbols that are exported */
55+
#define PyGreenlet_API_pointers 8
56+
57+
#define PyGreenlet_Type_NUM 0
58+
#define PyExc_GreenletError_NUM 1
59+
#define PyExc_GreenletExit_NUM 2
60+
61+
#define PyGreenlet_New_NUM 3
62+
#define PyGreenlet_GetCurrent_NUM 4
63+
#define PyGreenlet_Throw_NUM 5
64+
#define PyGreenlet_Switch_NUM 6
65+
#define PyGreenlet_SetParent_NUM 7
66+
67+
#ifndef GREENLET_MODULE
68+
/* This section is used by modules that uses the greenlet C API */
69+
static void** _PyGreenlet_API = NULL;
70+
71+
# define PyGreenlet_Type \
72+
(*(PyTypeObject*)_PyGreenlet_API[PyGreenlet_Type_NUM])
73+
74+
# define PyExc_GreenletError \
75+
((PyObject*)_PyGreenlet_API[PyExc_GreenletError_NUM])
76+
77+
# define PyExc_GreenletExit \
78+
((PyObject*)_PyGreenlet_API[PyExc_GreenletExit_NUM])
79+
80+
/*
81+
* PyGreenlet_New(PyObject *args)
82+
*
83+
* greenlet.greenlet(run, parent=None)
84+
*/
85+
# define PyGreenlet_New \
86+
(*(PyGreenlet * (*)(PyObject * run, PyGreenlet * parent)) \
87+
_PyGreenlet_API[PyGreenlet_New_NUM])
88+
89+
/*
90+
* PyGreenlet_GetCurrent(void)
91+
*
92+
* greenlet.getcurrent()
93+
*/
94+
# define PyGreenlet_GetCurrent \
95+
(*(PyGreenlet * (*)(void)) _PyGreenlet_API[PyGreenlet_GetCurrent_NUM])
96+
97+
/*
98+
* PyGreenlet_Throw(
99+
* PyGreenlet *greenlet,
100+
* PyObject *typ,
101+
* PyObject *val,
102+
* PyObject *tb)
103+
*
104+
* g.throw(...)
105+
*/
106+
# define PyGreenlet_Throw \
107+
(*(PyObject * (*)(PyGreenlet * self, \
108+
PyObject * typ, \
109+
PyObject * val, \
110+
PyObject * tb)) \
111+
_PyGreenlet_API[PyGreenlet_Throw_NUM])
112+
113+
/*
114+
* PyGreenlet_Switch(PyGreenlet *greenlet, PyObject *args)
115+
*
116+
* g.switch(*args, **kwargs)
117+
*/
118+
# define PyGreenlet_Switch \
119+
(*(PyObject * \
120+
(*)(PyGreenlet * greenlet, PyObject * args, PyObject * kwargs)) \
121+
_PyGreenlet_API[PyGreenlet_Switch_NUM])
122+
123+
/*
124+
* PyGreenlet_SetParent(PyObject *greenlet, PyObject *new_parent)
125+
*
126+
* g.parent = new_parent
127+
*/
128+
# define PyGreenlet_SetParent \
129+
(*(int (*)(PyGreenlet * greenlet, PyGreenlet * nparent)) \
130+
_PyGreenlet_API[PyGreenlet_SetParent_NUM])
131+
132+
/* Macro that imports greenlet and initializes C API */
133+
/* NOTE: This has actually moved to ``greenlet._greenlet._C_API``, but we
134+
keep the older definition to be sure older code that might have a copy of
135+
the header still works. */
136+
# define PyGreenlet_Import() \
137+
{ \
138+
_PyGreenlet_API = (void**)PyCapsule_Import("greenlet._C_API", 0); \
139+
}
140+
141+
#endif /* GREENLET_MODULE */
142+
143+
#ifdef __cplusplus
144+
}
145+
#endif
146+
#endif /* !Py_GREENLETOBJECT_H */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pip
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Copyright 2010 Pallets
2+
3+
Redistribution and use in source and binary forms, with or without
4+
modification, are permitted provided that the following conditions are
5+
met:
6+
7+
1. Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
10+
2. Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in the
12+
documentation and/or other materials provided with the distribution.
13+
14+
3. Neither the name of the copyright holder nor the names of its
15+
contributors may be used to endorse or promote products derived from
16+
this software without specific prior written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
21+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
24+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
Metadata-Version: 2.1
2+
Name: Flask
3+
Version: 2.0.2
4+
Summary: A simple framework for building complex web applications.
5+
Home-page: https://palletsprojects.com/p/flask
6+
Author: Armin Ronacher
7+
Author-email: armin.ronacher@active-4.com
8+
Maintainer: Pallets
9+
Maintainer-email: contact@palletsprojects.com
10+
License: BSD-3-Clause
11+
Project-URL: Donate, https://palletsprojects.com/donate
12+
Project-URL: Documentation, https://flask.palletsprojects.com/
13+
Project-URL: Changes, https://flask.palletsprojects.com/changes/
14+
Project-URL: Source Code, https://github.com/pallets/flask/
15+
Project-URL: Issue Tracker, https://github.com/pallets/flask/issues/
16+
Project-URL: Twitter, https://twitter.com/PalletsTeam
17+
Project-URL: Chat, https://discord.gg/pallets
18+
Platform: UNKNOWN
19+
Classifier: Development Status :: 5 - Production/Stable
20+
Classifier: Environment :: Web Environment
21+
Classifier: Framework :: Flask
22+
Classifier: Intended Audience :: Developers
23+
Classifier: License :: OSI Approved :: BSD License
24+
Classifier: Operating System :: OS Independent
25+
Classifier: Programming Language :: Python
26+
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
27+
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
28+
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
29+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
30+
Requires-Python: >=3.6
31+
Description-Content-Type: text/x-rst
32+
License-File: LICENSE.rst
33+
Requires-Dist: Werkzeug (>=2.0)
34+
Requires-Dist: Jinja2 (>=3.0)
35+
Requires-Dist: itsdangerous (>=2.0)
36+
Requires-Dist: click (>=7.1.2)
37+
Provides-Extra: async
38+
Requires-Dist: asgiref (>=3.2) ; extra == 'async'
39+
Provides-Extra: dotenv
40+
Requires-Dist: python-dotenv ; extra == 'dotenv'
41+
42+
Flask
43+
=====
44+
45+
Flask is a lightweight `WSGI`_ web application framework. It is designed
46+
to make getting started quick and easy, with the ability to scale up to
47+
complex applications. It began as a simple wrapper around `Werkzeug`_
48+
and `Jinja`_ and has become one of the most popular Python web
49+
application frameworks.
50+
51+
Flask offers suggestions, but doesn't enforce any dependencies or
52+
project layout. It is up to the developer to choose the tools and
53+
libraries they want to use. There are many extensions provided by the
54+
community that make adding new functionality easy.
55+
56+
.. _WSGI: https://wsgi.readthedocs.io/
57+
.. _Werkzeug: https://werkzeug.palletsprojects.com/
58+
.. _Jinja: https://jinja.palletsprojects.com/
59+
60+
61+
Installing
62+
----------
63+
64+
Install and update using `pip`_:
65+
66+
.. code-block:: text
67+
68+
$ pip install -U Flask
69+
70+
.. _pip: https://pip.pypa.io/en/stable/getting-started/
71+
72+
73+
A Simple Example
74+
----------------
75+
76+
.. code-block:: python
77+
78+
# save this as app.py
79+
from flask import Flask
80+
81+
app = Flask(__name__)
82+
83+
@app.route("/")
84+
def hello():
85+
return "Hello, World!"
86+
87+
.. code-block:: text
88+
89+
$ flask run
90+
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
91+
92+
93+
Contributing
94+
------------
95+
96+
For guidance on setting up a development environment and how to make a
97+
contribution to Flask, see the `contributing guidelines`_.
98+
99+
.. _contributing guidelines: https://github.com/pallets/flask/blob/main/CONTRIBUTING.rst
100+
101+
102+
Donate
103+
------
104+
105+
The Pallets organization develops and supports Flask and the libraries
106+
it uses. In order to grow the community of contributors and users, and
107+
allow the maintainers to devote more time to the projects, `please
108+
donate today`_.
109+
110+
.. _please donate today: https://palletsprojects.com/donate
111+
112+
113+
Links
114+
-----
115+
116+
- Documentation: https://flask.palletsprojects.com/
117+
- Changes: https://flask.palletsprojects.com/changes/
118+
- PyPI Releases: https://pypi.org/project/Flask/
119+
- Source Code: https://github.com/pallets/flask/
120+
- Issue Tracker: https://github.com/pallets/flask/issues/
121+
- Website: https://palletsprojects.com/p/flask/
122+
- Twitter: https://twitter.com/PalletsTeam
123+
- Chat: https://discord.gg/pallets
124+
125+

0 commit comments

Comments
 (0)