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
d33cf2eb
Commit
d33cf2eb
authored
Sep 22, 2020
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
1968bf6c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
output_article_distribution_0917.py
output/output_article_distribution_0917.py
+4
-1
tractate_analysis_in_7000.py
task/tractate_analysis_in_7000.py
+8
-8
No files found.
output/output_article_distribution_0917.py
View file @
d33cf2eb
...
...
@@ -123,7 +123,10 @@ bulk_dict = {
task_list
=
[]
second_demands_count_dict
,
tags_v3_count_dict
=
get_user_post_from_mysql
()
sql
=
"""
select card_id from strategy_content_exposure_index where card_content_type="user_post" and preciseexposure_num>=30 and ctr>=0.04 and avg_page_stay>=15 and create_day="2020-09-17";
"""
second_demands_count_dict
,
tags_v3_count_dict
=
get_user_post_from_mysql
(
sql
)
# second_demands_count_dict= {'地包天': 4, '近视': 20, '洗眉': 16, '阴道缩紧': 338, '避孕': 1, '缩窄下巴': 1, '翘睫': 2, '腿形矫正': 7, '脱手脚毛': 80, '注射物取出': 1, '脱敏': 2, '脱腋毛': 6, '祛纹身': 8, '填充面部': 7, '生私密毛发': 339, '祛红血丝': 2, '自体脂肪修复': 3, '除螨': 1, '生眉毛': 10, '网红脸': 1, '缩胸': 11, '阴茎美化': 11, '耳洞': 3, '生头发': 85, 'AI测试': 3, '凸嘴': 3, '缩短下巴': 6, '纹身': 11, '生睫毛': 2, '假体取出': 1, '鼻孔矫正': 1, '下颌缘提升': 2, '奥美定': 1, '皮肤病': 6, '性快感': 3, '眼线': 10, '颏肌放松': 3, '洗眼线': 2, '产后恢复': 1, '祛腋臭': 20, '脱背毛': 79, '脱毛发': 2, '鼻尖延长': 12, '腿部加长': 2, '洁面': 2, '鼻中隔延长': 3, '唇腭裂': 2, '脱唇毛': 3, '填充卧蚕': 3, '丰眼窝': 3, '脱发际线': 5, '脸型': 241, '脱私密毛发': 1, '缩鼻背': 5, '生发际线': 4, '脱腿毛': 4, '生胡须': 1, '鼻部缩短': 2, '健康调理': 4}
# tags_v3_count_dict = {'牙齿': 3, '缩下巴': 3, '洗眉': 12, '玻尿酸': 1, '超声溶脂': 2, '注射物取出': 1, '生长因子': 3, 'G点注射': 3, '正骨术': 1, '真皮填充卧蚕': 2, '激光祛皱': 4, '胶原蛋白填充面部': 3, '脱私密毛发': 1, '瘦身': 3, '玻尿酸丰唇珠': 1, '半飞秒激光术': 1, '乳牙': 1, '产后修复': 1, '视力检查': 2, '干细胞疗法': 2, '童颜针': 4, '准分子激光术': 1, '中医按摩': 1, '祛黑头': 1, '祛黑眼圈': 4, '自体软骨垫鼻尖': 14, '洗眼线': 2, '耳部矫正': 2, '新手精选': 1, '植私密毛发': 338, '玻尿酸填充卧蚕': 1, '阴茎增大': 6, '乳房缩小': 1, '植胡须': 1, '基因检测': 1, '鼻孔矫正': 1, '下巴前推': 10, '激光脱毛': 2, 'PRP生发': 80, '玻尿酸祛皱': 1, '注射祛腋臭': 14, '面膜': 4, '半永久纹眉1': 2, '毛囊检测': 4, '激光脱腋毛': 2, '翘睫': 2, '下巴截骨术': 2, '激光脱唇毛': 1, '激光祛腋臭': 1, '全飞秒激光术': 1, '拔罐': 1, '美臀': 1, '激光祛纹身': 7, '喷砂洗牙': 1, '半永久纹发际线': 7, '自体脂肪面部填充': 2, '祛斑': 1, '私密紧致': 1, '激光脱手脚毛': 80, '腿形矫正': 7, '激光脱背毛': 80, '埋线缩鼻翼': 2, '半永久': 4, '填充面部': 2, '生私密毛发': 1, '洗唇线': 2, '自体脂肪': 1, '半永久纹眼线': 10, '胶原蛋白注射': 2, '肉毒素治疗多汗': 1, '黑脸娃娃': 6, '玻尿酸丰眼窝': 2, '微笑唇': 1, '打耳洞': 3, '睫毛增长': 2, '双眼皮': 8, '全飞秒': 3, '自体脂肪私密紧致': 337, '吸脂': 2, '皮肤病': 6, '口腔溃疡': 1, '激光洗眉': 5, '药物脱毛': 5, '断骨增高': 2, '额头缩小': 4, '肤质检测': 1, '激光近视矫正': 4, '自体脂肪填充修复': 3, '肉毒素颏肌放松': 1, '祛眼袋': 1, '晶体植入': 3, '阴茎延长': 5, '激光脱发际线': 1, '唇珠唇弓': 2, '包皮手术': 5, '唇腭裂': 4, '乳头缩小': 338, '臀部整形': 1, '植眉': 10, '阴茎增粗': 9, '抗衰紧致': 1, '缩鼻背': 2, '手术祛腋臭': 7, '射频祛眼袋': 4, '上眼睑祛脂': 3, '鼻部硅胶假体取出': 1, '激光脱腿毛': 3, '发质护理': 6, '抗衰': 1}
...
...
task/tractate_analysis_in_7000.py
View file @
d33cf2eb
...
...
@@ -200,9 +200,9 @@ for redis_count, device_id in enumerate(device_id_dict):
# print(count_res)
for
tag
in
second_demands
:
if
tag
in
second_demands_tag_count
:
second_demands_tag_count
[
int
(
tag
)
]
+=
1
second_demands_tag_count
[
tag
]
+=
1
else
:
second_demands_tag_count
[
int
(
tag
)
]
=
1
second_demands_tag_count
[
tag
]
=
1
if
tag
in
second_demands_count_dict
:
total_tractate_content_num
+=
second_demands_count_dict
[
tag
]
second_demands_tag_dict
[
device_id
]
=
second_demands
...
...
@@ -211,9 +211,9 @@ for redis_count, device_id in enumerate(device_id_dict):
# print(count_res)
for
tag
in
projects
:
if
tag
in
projects_demands_tag_count
:
projects_demands_tag_count
[
int
(
tag
)
]
+=
1
projects_demands_tag_count
[
tag
]
+=
1
else
:
projects_demands_tag_count
[
int
(
tag
)
]
=
1
projects_demands_tag_count
[
tag
]
=
1
if
tag
in
tags_v3_count_dict
:
total_tractate_content_num
+=
tags_v3_count_dict
[
tag
]
...
...
@@ -282,11 +282,11 @@ for res in sql_res:
for
tag_id
in
second_demands_tag_dict
[
cl_id
]:
if
tag_id
in
second_demands_id_count
:
print
(
'+1'
)
second_demands_id_count
[
tag_id
][
card_id
]
=
1
second_demands_id_count
[
tag_id
][
int
(
card_id
)
]
=
1
else
:
print
(
'0'
)
second_demands_id_count
[
tag_id
]
=
{}
second_demands_id_count
[
tag_id
][
card_id
]
=
1
second_demands_id_count
[
tag_id
][
int
(
card_id
)
]
=
1
# if tag_id in baoguang_dict:
# baoguang_dict[tag_id] += session_pv
...
...
@@ -297,11 +297,11 @@ for res in sql_res:
for
tag_id
in
projects_demands_tag_dict
[
cl_id
]:
if
tag_id
in
projects_demands_id_count
:
print
(
'+1'
)
projects_demands_id_count
[
tag_id
][
card_id
]
=
1
projects_demands_id_count
[
tag_id
][
int
(
card_id
)
]
=
1
else
:
print
(
0
)
projects_demands_id_count
[
tag_id
]
=
{}
projects_demands_id_count
[
tag_id
][
card_id
]
=
1
projects_demands_id_count
[
tag_id
][
int
(
card_id
)
]
=
1
final_projects_list
=
[]
second_demands_list
=
[]
...
...
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