Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P16829
(An Untitled Masterwork)
Active
Public
Actions
Authored by
Urbanecm_WMF
on Jul 16 2021, 4:36 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F34553372: raw-paste-data.txt
Jul 16 2021, 4:36 PM
2021-07-16 16:36:58 (UTC+0)
Subscribers
None
from
wmfdata
import
mariadb
import
pandas
as
pd
def
get_dblist
(
dblist
):
f
=
open
(
'/srv/mediawiki-config/dblists/
%s
.dblist'
%
dblist
)
res
=
f
.
read
()
.
split
(
'
\n
'
)
f
.
close
()
res
.
pop
(
0
)
res
.
pop
()
return
res
dfs
=
[]
wikis
=
get_dblist
(
'growthexperiments'
)
for
wiki
in
wikis
:
df
=
mariadb
.
run
(
'''
SELECT
DATABASE() AS dbname,
COUNT(*) AS mentees
FROM growthexperiments_mentor_mentee
'''
,
wiki
,
use_x1
=
True
)
df
.
set_index
(
'dbname'
,
inplace
=
True
)
dfs
.
append
(
df
)
df
=
pd
.
concat
(
dfs
)
Event Timeline
Urbanecm_WMF
created this paste.
Jul 16 2021, 4:36 PM
2021-07-16 16:36:58 (UTC+0)
Urbanecm_WMF
mentioned this in
T285811: Mentee overview module: Run updateMenteeData.php regularly
.
Jul 16 2021, 4:57 PM
2021-07-16 16:57:20 (UTC+0)
Log In to Comment