-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanager.py
More file actions
122 lines (113 loc) · 3.49 KB
/
Copy pathmanager.py
File metadata and controls
122 lines (113 loc) · 3.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
from flask import Flask,render_template,request
import inspect
app=Flask(__name__)
@app.route('/head')
def head():
return render_template('head.html')
@app.route('/')
def index():
return render_template('main.html')
@app.route('/tree')
def tree():
wanted = request.args.get("wanted", type=str)
if wanted:
jsonfile = wanted + '.json'
jfile=wanted
else:
jsonfile = "bs4.json"
jfile="bs4"
return render_template('filetree.htm', jsonfile=jsonfile,jfile=jfile)
#return render_template('filetree.htm')
@app.route('/leetree')
def leetree():
wanted = request.args.get("wanted", type=str)
if wanted:
jsonfile = wanted + '.json'
jfile=wanted
else:
jsonfile = "bs4.json"
jfile="bs4"
return render_template('pytreeRandomSize2021.htm', jsonfile=jsonfile,jfile=jfile) #pytreeRandomSize2021.htm
#return render_template('filetree.htm')
@app.route('/hicircle')
def hicircle():
wanted = request.args.get("wanted", type=str)
if wanted:
jsonfile = wanted + '.json'
jfile=wanted
else:
jsonfile = 'flare.json'
jfile = 'flare'
return render_template('hiCircle.htm', jsonfile=jsonfile,jfile=jfile)
@app.route('/matrix')
def matrix():
wanted = request.args.get("wanted", type=str)
if wanted:
jsonfile = wanted + '.json'
jfile=wanted
else:
jsonfile="pylibs.json"
jfile="pylibs"
return render_template('matrix2021.html', jsonfile=jsonfile,jfile=jfile)
@app.route('/pylibs/<name>')
def info(name):
if name:
import os
libinfo = os.popen(r'c:\python36\scripts\pip3 show ' + name).read()
relist = []
relist = libinfo.split('\n')
return render_template('pylibs.html', libinfo=relist)
@app.route('/detail')
def detail():
wanted= request.args.get("wanted", type=str)
print(wanted)
import numpy
import open3d
import networkx
import wordcloud
filename = inspect.getmembers(eval(wanted),inspect.ismodule)
docs = inspect.getdoc(eval(wanted))
dirinfo=dir(eval(wanted))
return render_template('detail.html', filename=filename,docs=docs,dirinfo=dirinfo)
@app.route('/network')
def libs():
wanted = request.args.get("wanted", type=str)
if wanted:
jsonfile = wanted+'.json'
jfile=wanted
else:
jsonfile = "pylibs.json"
jfile="pylibs"
return render_template('pyclass.html', jsonfile=jsonfile,jfile=jfile)
@app.route('/bubble')
def bubble():
wanted = request.args.get("wanted", type=str)
if wanted:
jsonfile = wanted+'.json'
jfile=wanted
else:
jsonfile = 'flare-2.json'
jfile = 'flare-2'
return render_template('bubble.htm', jsonfile=jsonfile,jfile=jfile)
@app.route('/wordcloud')
def wc():
wanted = request.args.get("wanted", type=str)
if wanted:
jsonfile = wanted+'.json'
jfile=wanted
else:
jsonfile = "pylibs.json"
jfile = "pylibs"
return render_template('wordcloud.htm', jsonfile=jsonfile,jfile=jfile)
@app.route('/treenet')
def treenet():
wanted = request.args.get("wanted", type=str)
if wanted:
jsonfile = wanted + '.json'
jfile = wanted
else:
jsonfile = 'flare.json'
jfile = 'flare'
return render_template('treenet2021.htm', jsonfile=jsonfile, jfile=jfile)
if __name__=='__main__':
app.run(port=5000)