Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F34553372
raw-paste-data.txt
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
Urbanecm_WMF
Jul 16 2021, 4:36 PM
2021-07-16 16:36:58 (UTC+0)
Size
539 B
Referenced Files
None
Subscribers
None
raw-paste-data.txt
View Options
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)
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9128782
Default Alt Text
raw-paste-data.txt (539 B)
Attached To
Mode
P16829 (An Untitled Masterwork)
Attached
Detach File
Event Timeline
Log In to Comment