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
f8d4c14d
Commit
f8d4c14d
authored
Sep 22, 2020
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
30e0ceb4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
tractate_analysis_in_7000.py
task/tractate_analysis_in_7000.py
+5
-3
No files found.
task/tractate_analysis_in_7000.py
View file @
f8d4c14d
...
...
@@ -78,7 +78,9 @@ sql = """
select card_id from strategy_content_exposure_index where card_content_type="user_post" and preciseexposure_num>=50 and ctr>=0.05 and avg_page_stay>=20 and create_day="2020-09-17"
"""
second_demands_count_dict
,
tags_v3_count_dict
,
second_demands_card_id_list
,
tags_v3_card_id_list
=
get_user_post_from_mysql
(
sql
)
# print(card_id_list)
print
(
second_demands_count_dict
,
tags_v3_count_dict
,
second_demands_card_id_list
,
tags_v3_card_id_list
)
time
.
sleep
(
20
)
t
=
2
day_num
=
0
-
t
now
=
(
datetime
.
datetime
.
now
()
+
datetime
.
timedelta
(
days
=
day_num
))
...
...
@@ -197,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(count_re
s)
print
(
second_demand
s
)
for
tag
in
second_demands
:
if
tag
in
second_demands_tag_count
:
second_demands_tag_count
[
tag
]
+=
1
...
...
@@ -208,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(count_re
s)
print
(
project
s
)
for
tag
in
projects
:
if
tag
in
projects_demands_tag_count
:
projects_demands_tag_count
[
tag
]
+=
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