Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
meta_base_code
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
宋柯
meta_base_code
Commits
1a5a0406
Commit
1a5a0406
authored
Sep 22, 2020
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
f8d4c14d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
tractate_analysis_in_7000.py
task/tractate_analysis_in_7000.py
+6
-4
No files found.
task/tractate_analysis_in_7000.py
View file @
1a5a0406
...
...
@@ -176,7 +176,7 @@ for device_id in sql_res:
# 设备对应画像数量
second_demands_tag_count
=
{}
projects_demands_tag_count
=
{}
#
帖子对应的tag
#
设备id对应的画像
second_demands_tag_dict
=
{}
projects_demands_tag_dict
=
{}
total_tag_count
=
{}
...
...
@@ -199,7 +199,7 @@ for redis_count, device_id in enumerate(device_id_dict):
continue
if
res
.
get
(
"second_demands"
):
second_demands
=
res
.
get
(
"second_demands"
)
print
(
second_demands
)
#
print(second_demands)
for
tag
in
second_demands
:
if
tag
in
second_demands_tag_count
:
second_demands_tag_count
[
tag
]
+=
1
...
...
@@ -210,7 +210,7 @@ for redis_count, device_id in enumerate(device_id_dict):
second_demands_tag_dict
[
device_id
]
=
second_demands
if
res
.
get
(
"projects"
):
projects
=
res
.
get
(
"projects"
)
print
(
projects
)
#
print(projects)
for
tag
in
projects
:
if
tag
in
projects_demands_tag_count
:
projects_demands_tag_count
[
tag
]
+=
1
...
...
@@ -282,8 +282,9 @@ for res in sql_res:
# card_id_set.update(card_id)
if
cl_id
in
second_demands_tag_dict
:
if
int
(
card_id
)
in
second_demands_card_id_list
:
print
(
cl_id
,
second_demands_tag_dict
[
cl_id
])
for
tag_id
in
second_demands_tag_dict
[
cl_id
]:
if
tag_id
in
second_demands_id_count
:
second_demands_id_count
[
tag_id
][
int
(
card_id
)]
=
1
else
:
...
...
@@ -297,6 +298,7 @@ for res in sql_res:
if
cl_id
in
projects_demands_tag_dict
:
if
int
(
card_id
)
in
tags_v3_card_id_list
:
print
(
cl_id
,
projects_demands_tag_dict
[
cl_id
])
for
tag_id
in
projects_demands_tag_dict
[
cl_id
]:
if
tag_id
in
projects_demands_id_count
:
projects_demands_id_count
[
tag_id
][
int
(
card_id
)]
=
1
...
...
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