Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
2c0620c3
Commit
2c0620c3
authored
Dec 31, 2019
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改冷启动的轻医美词,去掉明星八卦
parent
6514a1e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
14 deletions
+1
-14
dist_update_user_history_order_tags.py
eda/smart_rank/dist_update_user_history_order_tags.py
+1
-14
No files found.
eda/smart_rank/dist_update_user_history_order_tags.py
View file @
2c0620c3
...
...
@@ -61,19 +61,6 @@ def get_user_history_order_service_tag(user_id):
redis_client
=
redis
.
StrictRedis
.
from_url
(
'redis://:ReDis!GmTx*0aN9@172.16.40.173:6379'
)
redis_client
.
set
(
user_history_order_tags_key
,
tags_list_json
)
redis_client
.
expire
(
user_history_order_tags_key
,
time
=
30
*
24
*
60
*
60
)
# # 写tidb
# sql_cl_id = "select device_id from statistic_device where id = (select max(device_id) from statistic_device_user where user_id = %d) " % (int(user_id))
# cur_zhengxing.execute(sql_cl_id)
# cl_id = cur_zhengxing.fetchall()[0]["device_id"]
#
# db_jerry_test = pymysql.connect(host='172.16.40.158', port=4000, user='root', passwd='3SYz54LS9#^9sBvC',
# db='jerry_test', charset='utf8')
# cur_jerry_test = db_jerry_test.cursor()
# replace_sql = """replace into user_history_order_tags (stat_date, cl_id, user_id, tag_list) values("{stat_date}","{cl_id}",{user_id},"{tag_list}")"""\
# .format(stat_date=stat_date, cl_id=cl_id, user_id=user_id, tag_list=tags_list)
# cur_jerry_test.execute(replace_sql)
# db_jerry_test.commit()
# db_jerry_test.close()
return
user_id
...
...
@@ -110,7 +97,7 @@ if __name__ == '__main__':
hot_search_words_portrait_dict
=
{
i
[
"keywords"
]:
0.2
for
i
in
hot_search_words
}
redis_client
.
hmset
(
hot_search_words_portrait_portrait_key2
,
hot_search_words_portrait_dict
)
hot_search_words
=
[
"
小气泡"
,
"双眼皮"
,
"水光针"
,
"玻尿酸"
,
"隆鼻"
,
"牙齿矫正"
,
"明星整形"
,
"明星抗衰"
,
"明星颜值"
,
"明星婚恋"
,
"网红整形"
,
"网红抗衰"
,
"网红颜值"
,
"网红婚恋"
,
"审美
"
]
hot_search_words
=
[
"
瘦脸针"
,
"双眼皮"
,
"线雕"
,
"水光针"
,
"吸脂"
,
"热玛吉"
,
"鼻综合"
,
"玻尿酸"
,
"光子嫩肤
"
]
hot_search_words_portrait_portrait_key3
=
"user:service_coldstart_tags3"
hot_search_words_portrait3_dict
=
{
i
:
0.2
for
i
in
hot_search_words
}
redis_client
.
hmset
(
hot_search_words_portrait_portrait_key3
,
hot_search_words_portrait3_dict
)
...
...
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