Skip to content

Instantly share code, notes, and snippets.

diff --git a/templates/CRM/Core/DateRange.tpl b/templates/CRM/Core/DateRange.tpl
index b8219b7..8be0a12 100644
--- a/templates/CRM/Core/DateRange.tpl
+++ b/templates/CRM/Core/DateRange.tpl
@@ -25,8 +25,8 @@
*}
{*this is included inside a table row*}
{assign var=relativeName value=$fieldName|cat:"_relative"}
-<td>{$form.$relativeName.html}</td>
-<td>
create table awight_meta_edit_counts
select
u.username,
left(r.rev_timestamp, 6),
count(*)
from metawiki.revision r
join awight_meta_wmf_accounts u
on r.rev_user_text=u.username
group by 1,2;
@adamwight
adamwight / Makefile
Created July 27, 2017 23:46
Makefile for ORES Flagged Revisions experiment
# See https://phabricator.wikimedia.org/T166235
# From https://quarry.wmflabs.org/query/20200
datasets/fiwiki.flaggedrevs_approved_raw.50k_2017.json:
wget -qO- https://quarry.wmflabs.org/run/192057/output/0/json-lines?download=true > $@
datasets/fiwiki.flaggedrevs_approved.50k_2017.json: \
datasets/fiwiki.flaggedrevs_approved_raw.50k_2017.json
python ~/revscoring/revscoring/utilities/normalize.py < $< > $@
@adamwight
adamwight / memuse.md
Created September 13, 2017 18:27 — forked from Eugeny/memuse.md
memuse - measure a total unique RAM taken by process tree
@adamwight
adamwight / create_virtualenv.md
Last active November 15, 2017 15:04 — forked from halfak/create_virtualenv.md
Setting up a python 3.x Virtual Environment

Step 0: Set up python virtualenv

virtualenv is a command-line utiltity that will allow you to encapsulate a python environment. Ubuntu calls the package that installs this utility "python-virtualenv". You can install it with $ sudo apt-get install python-virtualenv.

Step 1: Create the virtualenv directory

$ cd ~
$ mkdir venv
$ virtualenv -p python3 --system-site-packages ~/venv
# Score cache options
score_caches:
ores_redis:
class: ores.score_caches.Redis
host: null # Local
port: 6379 # Default port
scoring_systems:
defaults:
metrics_collector: local_logging # Don't try to connect graphite
@adamwight
adamwight / list_supported_tags.py
Created January 3, 2018 14:37
Tools for probing Python wheels
from pip import pep425tags
print(pep425tags.supported_tags)
- ############################# Bengali Wikipedia ##############################
+ ############################# Bengali Wikipedia ################################
? ++
-
# From https://quarry.wmflabs.org/query/20229
datasets/bnwiki.sampled_revisions.20k_2017.json:
wget -qO- https://quarry.wmflabs.org/run/190661/output/0/json-lines?download=true > $@
datasets/bnwiki.autolabeled_revisions.20k_2017.json: \
datasets/bnwiki.sampled_revisions.20k_2017.json
@adamwight
adamwight / New batch.patch
Created January 31, 2018 17:09 — forked from Ladsgroup/New batch.patch
Diff for templating
amsa@C235:~/editquality$ python differ.py "Japanese Wikipedia"
- ########################### Japanese Wikipedia ################################
+ ############################# Japanese Wikipedia ################################
? ++
-
# From https://quarry.wmflabs.org/query/9927
datasets/jawiki.sampled_revisions.40k_2016.json:
wget -qO- https://quarry.wmflabs.org/run/89016/output/0/json-lines?download=true > $@
@adamwight
adamwight / New batch.patch
Last active January 31, 2018 17:10 — forked from Ladsgroup/New batch.patch
Diff for templating
amsa@C235:~/editquality$ python differ.py "Japanese Wikipedia"
- ########################### Japanese Wikipedia ################################
+ ############################# Japanese Wikipedia ################################
? ++
-
# From https://quarry.wmflabs.org/query/9927
datasets/jawiki.sampled_revisions.40k_2016.json:
wget -qO- https://quarry.wmflabs.org/run/89016/output/0/json-lines?download=true > $@