Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SMART
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UNI-KLU
SMART
Commits
1f67a66c
Commit
1f67a66c
authored
Jan 24, 2020
by
Alexander Lercher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added multilayer result for querying
parent
d94883d1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
33 deletions
+29
-33
swagger.yml
...hub/semantic-linking-microservice/app/configs/swagger.yml
+26
-12
multigraph3.gpickle
...ng-microservice/app/multilayer/models/multigraph3.gpickle
+0
-0
multilayer.png
...hub/semantic-linking-microservice/app/rest/multilayer.png
+0
-0
multilayer.py
...-hub/semantic-linking-microservice/app/rest/multilayer.py
+3
-21
No files found.
src/data-hub/semantic-linking-microservice/app/configs/swagger.yml
View file @
1f67a66c
...
@@ -28,19 +28,33 @@ paths:
...
@@ -28,19 +28,33 @@ paths:
responses
:
responses
:
200
:
200
:
description
:
"
Successful
echo
of
request
data"
description
:
"
Successful
echo
of
request
data"
/graphinfo
:
/agi/multilayer/multilayer.png
:
get
:
get
:
operationId
:
"
rest.graphinfo.get
"
operationId
:
"
rest.multilayer.get_image
"
tags
:
tags
:
-
"
GraphInfo"
-
"
Multilayer"
summary
:
"
Get
info
about
clustered
nodes"
summary
:
"
Returning
the
multilayer
created
from
AGI
data"
description
:
"
Returns
multiple
metrics
for
all
nodes
created
by
analyzing
and
clustering
the
blockchain
traces"
parameters
:
[]
parameters
:
[]
produces
:
-
"
image/png"
responses
:
responses
:
200
:
200
:
description
:
"
Successful
operation"
description
:
"
Successful
echo
of
request
data"
schema
:
$ref
:
"
#/definitions/NodeInfo"
# /graphinfo:
# get:
# operationId: "rest.graphinfo.get"
# tags:
# - "GraphInfo"
# summary: "Get info about clustered nodes"
# description: "Returns multiple metrics for all nodes created by analyzing and clustering the blockchain traces"
# parameters: []
# responses:
# 200:
# description: "Successful operation"
# schema:
# $ref: "#/definitions/NodeInfo"
definitions
:
definitions
:
NodeInfo
:
NodeInfo
:
...
...
src/data-hub/semantic-linking-microservice/app/multilayer/models/multigraph3.gpickle
0 → 100644
View file @
1f67a66c
File added
src/data-hub/semantic-linking-microservice/app/rest/multilayer.png
0 → 100644
View file @
1f67a66c
420 KB
src/data-hub/semantic-linking-microservice/app/rest/multilayer.py
View file @
1f67a66c
from
flask
import
request
,
Response
from
flask
import
request
,
Response
,
send_file
from
initialdemo.NodeInfo
import
NodeInfo
import
pickle
as
json
import
pickle
as
json
import
io
def
get_image
():
from
flask
import
request
,
Response
return
send_file
(
"multilayer.png"
,
mimetype
=
"image/png"
)
from
matplotlib.backends.backend_agg
import
FigureCanvasAgg
as
FigureCanvas
\ No newline at end of file
from
visualization.multilayer
import
*
from
core
import
multinet
def
get
():
## multilayer
multilayer_network
=
multinet
.
multi_layer_network
()
.
load_network
(
"/home/zarah/Downloads/multigraph2.gpickle"
,
directed
=
False
,
input_type
=
"gpickle_biomine"
)
multilayer_network
.
basic_stats
()
## check core imports
multilayer_network
.
visualize_network
(
style
=
"diagonal"
)
import
visualization.multilayer
as
m
fig
=
m
.
main_figure
output
=
io
.
BytesIO
()
FigureCanvas
(
fig
)
.
print_png
(
output
)
return
Response
(
output
.
getvalue
(),
mimetype
=
"image/png"
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment