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
b6954548
Commit
b6954548
authored
Mar 13, 2020
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
074c888a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
23 deletions
+4
-23
ai_test.py
ai_test.py
+4
-23
No files found.
ai_test.py
View file @
b6954548
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
import
json
import
json
import
requests
import
requests
# url="http://127.0.0.1:4050/v1/once"
url
=
"http://127.0.0.1:4050/v1/once"
url
=
"http://doris.paas.test/v1/once"
# url="http://doris.paas.test/v1/once"
url
=
"http://doctor.paas.env/v1/once"
# 如果在生产环境doris 01上执行,把url改成"http://127.0.0.1:4050/v1/once"
# 如果在生产环境doris 01上执行,把url改成"http://127.0.0.1:4050/v1/once"
header_dict
=
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
header_dict
=
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
param_dict
=
{}
param_dict
=
{}
# param_dict["method"]="doris/search/diary_score
"
param_dict
[
"method"
]
=
"doris/search/bangdan
"
param_detail
=
{
"d
iary_list"
:
diary_list
}
param_detail
=
{
"d
evice_id"
:
"1"
,
"size"
:
10
,
"user_city_tag_id"
:
352
,
"offset"
:
0
,
"is_officer"
:
False
,
"unit_ids"
:[]
}
# a = [105, 2941, 780, 102, 873, 2060, 187, 2935, 2108, 912, 928, 2059, 4437, 822, 2866, 2778, 824, 821, 2938]
# b = [775, 2939, 789, 98, 872, 3042, 1890, 5074, 118, 811, 117, 92, 897, 152, 127, 126, 125, 123, 88, 115, 806]
# c = [796, 234, 233, 232, 797, 116, 236, 986, 1370, 87, 2923, 86, 85, 89, 253, 798, 810, 153, 864, 863, 151, 777, 2056]
#
# x = [list(range(3000)),list(range(3000,6000)),list(range(6000,10000))]
a
=
[
list
(
range
(
1000
)),
list
(
range
(
1000
,
2000
)),
list
(
range
(
2000
,
3000
))]
b
=
[
list
(
range
(
3000
,
4000
)),
list
(
range
(
4000
,
5000
)),
list
(
range
(
5000
,
6000
))]
# b = [[],[],[]]
c
=
[
list
(
range
(
6000
,
7000
)),
list
(
range
(
7000
,
8000
)),
list
(
range
(
8000
,
10000
))]
x
=
[
a
,
b
,
c
]
y
=
[
list
(
range
(
0
,
7000
)),
list
(
range
(
7000
,
8000
)),
list
(
range
(
8000
,
10000
))]
# param_detail = {"has_order": True,"tag_list":y, "in_whitelist": True,"user_city_tag_id": 328,"device_id": '861916048000595'}
# param_detail = {"device_id":"xx","user_city_tag_id":328,"offset":0,"is_officer":True}
param_dict
[
"params"
]
=
json
.
dumps
(
param_detail
)
param_dict
[
"params"
]
=
json
.
dumps
(
param_detail
)
a
=
requests
.
post
(
url
=
url
,
data
=
param_dict
,
headers
=
header_dict
)
a
=
requests
.
post
(
url
=
url
,
data
=
param_dict
,
headers
=
header_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