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
a6213463
Commit
a6213463
authored
Jan 24, 2020
by
Alexander Lercher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
not showing username anymore
parent
4ebd6230
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
swagger.yml
.../community-detection-microservice/app/configs/swagger.yml
+2
-2
agi_repository.py
...unity-detection-microservice/app/db/agi/agi_repository.py
+4
-4
No files found.
src/data-hub/community-detection-microservice/app/configs/swagger.yml
View file @
a6213463
...
@@ -119,7 +119,7 @@ definitions:
...
@@ -119,7 +119,7 @@ definitions:
id
:
id
:
type
:
string
type
:
string
format
:
uuid
format
:
uuid
user
name
:
user
:
type
:
"
string"
type
:
"
string"
latitude
:
latitude
:
type
:
"
number"
type
:
"
number"
...
@@ -141,6 +141,6 @@ definitions:
...
@@ -141,6 +141,6 @@ definitions:
type
:
number
type
:
number
timestamp
:
timestamp
:
type
:
number
type
:
number
user
name
:
user
:
type
:
string
type
:
string
\ No newline at end of file
src/data-hub/community-detection-microservice/app/db/agi/agi_repository.py
View file @
a6213463
import
json
import
json
from
typing
import
List
,
Dict
from
typing
import
List
,
Dict
import
hashlib
class
AgiRepository
:
class
AgiRepository
:
def
getLocations
(
self
)
->
List
:
def
getLocations
(
self
)
->
List
:
...
@@ -17,14 +17,14 @@ class AgiRepository:
...
@@ -17,14 +17,14 @@ class AgiRepository:
cur_location
=
travel
[
'startedBy'
][
i
]
cur_location
=
travel
[
'startedBy'
][
i
]
cur_user
=
travel
[
'users'
][
i
]
cur_user
=
travel
[
'users'
][
i
]
locations
.
append
(
locations
.
append
(
self
.
location
(
f
'{travel["id"]}-{cur_location["moment"]}'
,
self
.
location
(
f
'{travel["id"]}-{cur_location["moment"]}'
,
cur_location
[
'coordinate'
][
'latitude'
],
cur_location
[
'coordinate'
][
'latitude'
],
cur_location
[
'coordinate'
][
'longitude'
],
cur_location
[
'coordinate'
][
'longitude'
],
cur_location
[
'moment'
],
cur_location
[
'moment'
],
# todo user in travel startedBy not available from dataset - currently using user list
# todo user in travel startedBy not available from dataset - currently using user list
cur_user
[
'userId'
]
hashlib
.
sha1
(
cur_user
[
'userId'
]
.
encode
())
.
hexdigest
()
# not showing generated username
))
))
return
locations
return
locations
...
@@ -41,6 +41,6 @@ class AgiRepository:
...
@@ -41,6 +41,6 @@ class AgiRepository:
'latitude'
:
lat
,
'latitude'
:
lat
,
'longitude'
:
long_
,
'longitude'
:
long_
,
"timestamp"
:
timestamp
,
"timestamp"
:
timestamp
,
"user
name
"
:
username
"user"
:
username
}
}
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