r92120 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92119‎ | r92120 | r92121 >
Date:23:00, 13 July 2011
Author:halfak
Status:deferred
Tags:
Comment:
Just some R work
Modified paths:
  • /trunk/tools/wsor/newbie_warnings/queries.sql (modified) (history)
  • /trunk/tools/wsor/vandal_conversion/R/loader/load_editor_first_and_last.R (modified) (history)
  • /trunk/tools/wsor/vandal_tools (added) (history)
  • /trunk/tools/wsor/vandal_tools/queries.sql (added) (history)

Diff [purge]

Index: trunk/tools/wsor/newbie_warnings/queries.sql
@@ -48,3 +48,41 @@
4949 ON reciever.user_id = nt.user_id
5050 GROUP BY reciever.user_id, reciever.user_name;
5151
 52+SELECT
 53+ reciever.user_id,
 54+ reciever.user_name,
 55+ count(*) AS messages_waiting
 56+FROM (
 57+SELECT DISTINCT p.page_title
 58+FROM revision r
 59+INNER JOIN page p
 60+ ON r.rev_page = p.page_id
 61+WHERE r.rev_user = 6396742
 62+AND p.page_namespace = 3
 63+) AS tp
 64+INNER JOIN user reciever
 65+ ON reciever.user_name = REPLACE(tp.page_title, "_", " ")
 66+INNER JOIN user_newtalk nt
 67+ ON reciever.user_id = nt.user_id
 68+GROUP BY reciever.user_id, reciever.user_name;
 69+
 70+SELECT
 71+ NULL AS user_id,
 72+ tp.page_title AS user_name,
 73+ count(*) AS messages_waiting
 74+FROM (
 75+SELECT DISTINCT p.page_title
 76+FROM revision r
 77+INNER JOIN page p
 78+ ON r.rev_page = p.page_id
 79+WHERE r.rev_user = 6396742
 80+AND p.page_namespace = 3
 81+) AS tp
 82+INNER JOIN user_newtalk nt
 83+ ON tp.page_title = nt.user_ip
 84+GROUP BY tp.page_title;
 85+
 86+
 87+
 88+
 89+
Index: trunk/tools/wsor/vandal_tools/queries.sql
@@ -0,0 +1,6 @@
 2+CREATE TABLE halfak.huggle_revert_20110115
 3+SELECT r.rev_id
 4+FROM revision r
 5+INNER JOIN halfak.revert_20110115 rvt
 6+ ON r.rev_id = rvt.revision_id
 7+WHERE r.rev_comment LIKE "%([[WP:HG]])%";
Index: trunk/tools/wsor/vandal_conversion/R/loader/load_editor_first_and_last.R
@@ -3,7 +3,7 @@
44
55
66 load_editor_first_and_last = function(verbose=T, reload=F){
7 - filename = paste(DATA_DIR, "en.editor_first_and_last.20.tsv", sep="/")
 7+ filename = paste(DATA_DIR, "en.editor_first_and_last.20.fixed.tsv", sep="/")
88 if(!exists("EDITOR_FIRST_AND_LAST")){
99 EDITOR_FIRST_AND_LAST <<- NULL
1010 }

Status & tagging log