MATLAB Answers

Contributors metainfo: reputation and more

84 ビュー (過去 30 日間)
Oleg Komarov
Oleg Komarov 2011 年 2 月 8 日
コメント済み: Chen Lin 2021 年 4 月 30 日 13:47
As asked by Vieniava in "How to make a list of user's reputation?", some of us came up with interesting ideas on how to fill an updated list with the reputation scores of the contributors to Answers.
I took the initiative to compile a public list of users with meta info:
  • position (desc ordering by reputation)
  • id
  • nickname (truncated to fit the page)
  • reputation
  • # of comments
  • # of questions asked
  • % accept rate
  • # of posts answered
  • # of accepted answers
The code used to compile the list is available at the bottom.
EDIT
TMW team implemented a page with the metascores: http://www.mathworks.com/matlabcentral/answers/contributors
Please refer to it and congrats to the team!
Use this function to retrieve info from the link above:
function [metainfo, elapsedTime] = metainfo(type,order)
% METAINFO - Retrieve metainfo on contributors to www.matworks.com/.../answers
%
% METAINFO Retrieve data sorted by reputation in descending order
%
% METAINFO(TYPE,ORDER) Specify TYPE and sorting ORDER as
% type : 'reputation'
% 'questions'
% 'answered'
% 'accepted'
%
% order: 'asc'
% 'desc'
%
% Examples:
%
% % Standard call (rep, disc)
% info = metainfo;
%
% % Sort by question answered in descending order
% info = metainfo('an','d');
%
% See also: URLREAD, REGEXP
% Author: Oleg Komarov (oleg.komarov@hotmail.it)
% Tested on R14SP3 (7.1) and on R2009b. In-between compatibility is assumed.
% 28 feb 2011 - Created
tic
% Check # inputs
error(nargchk(0,2,nargin))
% Retrieve inputs
if nargin == 0
type = 'reputation';
order = 'desc';
end
if ~exist(type,'var')
sortTypes = {'reputation','questions','answered','accepted'};
type = sortTypes{strncmp(type,sortTypes,numel(type))};
order = 'desc';
end
if ~exist(order,'var')
orderTypes = {'asc','desc'};
type = orderTypes{strncmp(order,orderTypes,numel(order))};
end
% Build url string
url = ['http://www.mathworks.com/matlabcentral/answers/contributors?'...
'dir=' order '&sort=' type '&page='];
% First read
[page, ok] = urlread([url '1']);
% Catch number of pages to read
if ok
totcon = regexp(page,'>1 - 50 of (\d+)','tokens');
totcon = dataread('string',totcon{1}{1},'%d');
nPages = ceil(totcon/50);
else
error('Cannot read ".../contributors?page=1"')
end
% Loop over contributors pages
metainfo = cell(totcon,7);
metainfo(1:end,1) = num2cell(1:size(metainfo,1));
for p = 1:nPages
if ok
endpos = 50*p;
% Id, Rep
expr = '><a href="\/matlabcentral\/answers\/contributors\/(\d+)';
data = regexp(page, expr,'tokens');
if 50*p > totcon; endpos = 50*(p-1)+numel(data); end
metainfo(1+(p-1)*50:endpos,2) = [data{:}];
% Nickname
expr = ['"Reputation: (\d+)">([\w\ ' reshape([repmat(92,1,137);33:59,61:64,91:97,123:126,161:255],1,[]) ']+)</a></h2>'];
data = regexp(page, expr,'tokens');
metainfo(1+(p-1)*50:endpos,[4,3]) = cat(1,data{:});
% Qcount, Ans, Acc
data = regexp(page, '<span >(\d+)</span>[A-z<>"-\s\/]+','tokens');
metainfo(1+(p-1)*50:endpos,5:7) = reshape(cat(1,data{:}),3,[]).';
else
error('Metainfo import stopped. \nCannot read ".../contributors?page=%d"',p)
end
[page, ok] = urlread([url sprintf('%d',p+1)]);
end
% Convert to doubles
metainfo(:,[2,4:7]) = cellfun(@str2double,metainfo(:,[2,4:7]),'un',false);
elapsedTime = toc;
  8 件のコメント
Aurelien Queffurust
Aurelien Queffurust 2011 年 7 月 22 日
Does the above code still worK?
I still get the following error message:
>> [metainfo, elapsedTime] = metainfo('reputation','asc')
??? Error using ==> reshape
Product of known dimensions, 3, not divisible into total number of elements, 200.
Error in ==> metainfo at 82
metainfo(1+(p-1)*50:endpos,5:7) = reshape(cat(1,data{:}),3,[]).';

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2011 年 3 月 2 日
Congratulations to Matt Fig for making it to 500 before I made it to 1000! He increased from 388 to 501 in about a day and a half, during which time I only increased from 901 to 966.
Numerical projections last night based upon answer acceptance rates were that it would take another 1310 questions answered each before he caught up, so clearly his solutions have been found vote-worthy.
  5 件のコメント
Walter Roberson
Walter Roberson 2017 年 11 月 26 日
Next test is at max int32 :-)

サインインしてコメントする。

その他の回答 (94 件)

Rena Berman
Rena Berman 2020 年 8 月 14 日
CONGRATULATIONS to Walter Roberson for for reaching 100k points!!!!!! We hope you like your new badge named for you for a contributor that reaches 100k, the Roberson Cup! Thank you for helping shape Answers to what it is today and helping so many people worldwide!!!!!!
  20 件のコメント
Ameer Hamza
Ameer Hamza 2020 年 8 月 19 日
Congratulations!!! Thanks for your tremendous efforts.

サインインしてコメントする。


Stephen Cobeldick
Stephen Cobeldick 2019 年 2 月 25 日
Congratulations to John D'Errico for reaching 10,000!
And with only 1520 accepted answers too... impressive.
  7 件のコメント
Rena Berman
Rena Berman 2019 年 3 月 5 日
(Answers Dev) Congratulations! Thank you so much for your efforts in Answers!

サインインしてコメントする。


Rena Berman
Rena Berman 2017 年 4 月 10 日
(Answers dev) Congrats to Star Strider who passed 20,000 points!
  4 件のコメント
Jan
Jan 2017 年 11 月 30 日
@Star Strider: After I've read this in your profile message:
MATLAB Answers: Third participant to achieve 20,000 Reputation
(09 Apr 2017)
I thought of inserting this in mine:
MATLAB Answers: First participant to achieve 20,000 Reputation
after Star Strider (02 Oct 2017)
Unfortunately I'm not funny, therefore I left it. ;-)

サインインしてコメントする。


Sven
Sven 2012 年 2 月 5 日
編集済み: Sven 2014 年 3 月 1 日
Recent news:
... and BAM! Walter hits 25,000! Congratulations are in order again. It's impressive to see, but depressing to compare :)
Timeline:
that was 10,000 on 2012-02-05
and then 15,000 on 2012-07-21
and then 20,000 on 2013-03-02
and then 25,000 on 2013-11-09
The countdown to 100,000 continues...
Original:
Has it been noted yet that Walter has reached five figures in reputation? Wow!
Congratulations on 10000 Walter!
Cheers, Sven.
  63 件のコメント
Walter Roberson
Walter Roberson 2020 年 8 月 14 日
100k today. 8 months for the last 10k; and 50k took 46 months.

サインインしてコメントする。


Rena Berman
Rena Berman 2017 年 10 月 2 日
(Answers dev) Congrats to Jan Simon who passed 20,000 points!
  16 件のコメント
Image Analyst
Image Analyst 2019 年 12 月 11 日
Do you mean this one:
0000 Screenshot.png
or the prior one, where I think he had curly hair?

サインインしてコメントする。


Rena Berman
Rena Berman 2018 年 11 月 28 日
(Answers dev) Congratulations to Madhan Ravi our newest (and probably fastest) rising star to get editor status at 3000 reputation points! Thank you so much for your efforts in answers!
  11 件のコメント
madhan ravi
madhan ravi 2020 年 7 月 18 日
Thank you Stephan!

サインインしてコメントする。


Star Strider
Star Strider 2017 年 7 月 4 日
Congratulations to Guillaume who achieved 10000 Reputation Points today!
  1 件のコメント
Cedric Wannaz
Cedric Wannaz 2017 年 10 月 26 日
Well, belated congratulations as I spot this comment now!

サインインしてコメントする。


Rena Berman
Rena Berman 2017 年 10 月 25 日
編集済み: Rena Berman 2020 年 3 月 30 日
(Answers Dev) Congratulations to Stephen Cobeldick who passed 10,000 points and earned the Master Badge!
  10 件のコメント
Andrei Bobrov
Andrei Bobrov 2017 年 10 月 26 日
Congratulation, Stephen! +1.

サインインしてコメントする。


Rena Berman
Rena Berman 2017 年 10 月 26 日
(Answers dev) Congratulations to Andrei Bobrov who also passed 10,000 points and earned the Master Badge!
  7 件のコメント
KL
KL 2017 年 10 月 27 日