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
1b9d9cd4
Commit
1b9d9cd4
authored
Feb 20, 2019
by
王志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据指标波动假设检验统计
parent
ee6d3df4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletion
+29
-1
hypothesis_test.py
eda/recommended_indexs/hypothesis_test.py
+29
-1
No files found.
eda/recommended_indexs/hypothesis_test.py
View file @
1b9d9cd4
...
...
@@ -6,6 +6,9 @@ import datetime
from
utils
import
con_sql
from
decimal
import
*
import
numpy
as
np
import
smtplib
from
email.mime.text
import
MIMEText
from
email.utils
import
formataddr
#########推荐策略前后统计指标假设检验(t检验)###############
...
...
@@ -376,7 +379,32 @@ print("老用户精准曝光CTR数据波动5日内均值:{}".format(mean_var_ctr
# print(chi_ctr_precise_recently)
# print(chi_ctr_precise_yesterday)
print
(
"============================分割线==================================="
)
##发送邮件
my_sender
=
'gaoyazhe@igengmei.com'
my_pass
=
'VCrKTui99a7ALhiK'
my_user1
=
'gaoyazhe@igengmei.com'
my_user2
=
'zhangyanzhao@igengmei.com'
def
mail
():
ret
=
True
try
:
msg
=
MIMEText
(
mean_var_ctr_old_precise
,
'plain'
,
'utf-8'
)
msg
[
'From'
]
=
formataddr
([
"高雅喆"
,
my_sender
])
msg
[
'To'
]
=
my_user1
+
','
+
my_user2
msg
[
'Subject'
]
=
str
(
datetime
.
date
.
today
())
+
"-监控指标假设检验"
server
=
smtplib
.
SMTP_SSL
(
"smtp.exmail.qq.com"
,
465
)
server
.
login
(
my_sender
,
my_pass
)
server
.
sendmail
(
my_sender
,[
my_user1
,
my_user2
],
msg
.
as_string
())
server
.
quit
()
except
Exception
:
ret
=
False
return
ret
ret
=
mail
()
if
ret
:
print
(
"邮件发送成功"
)
else
:
print
(
"邮件发送失败"
)
# chi_cvr_new=
# chi_cvr_old=
...
...
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