User:emijrp

From Wikitech

Welcome to my user page! Here you can see all my tools available in Wikimedia Labs with a brief description about them. I like to develop statistics/visualization tools and recommendation systems, both to analyse and help others to find tasks to do.

I mostly use Python, a bit of PHP, MySQL, JavaScript, HTML+CSS and publish the code with open-source licenses. If you find any bug or want to send me a suggestion, please use the talk page. I have a user page in English Wikipedia too.

My tools

Stuff to do

  • Fix dead links in enwiki and all (is there a tool to cross-wiki search links or launch a sql query?)
  • Understand this and this and make my own Wikidata bots
  • Maps and coordinates [1] [2]
    • Do some maps like this for missing images
  • Do some tools about:

Help pages

Basic commands

Command Example Description
become become wmcounter Login as tool user (for exit write 'logout' or press Ctrl+D)
chmod chmod -R g+w /data/project/alicetools Make directory writable for group
jsub jsub -N enwiki1 -mem 1G /usr/bin/python /data/project/mytool/script.py enwiki-20140509-pages-meta-history1.xml.7z Submit a job named enwiki1 to a queue for running the script.py over a chunk of an English Wikipedia dump.
  • qstat: show status of jobs
  • qacct -j jobname: show info about job
  • qdel jobname: abort the job
  • qdel -u tools.toolname: abort all the jobs of this tool
pip pip install mediawiki-utilities Install the Python module mediawiki-utilities
scp scp wmcounter.py yourusername@tools-login.wmflabs.org:/data/project/wmcounter Upload a single file from your local to the target machine
scp -r lib/ yourusername@tools-login.wmflabs.org:/data/project/wmcharts Upload a directory recursively
sql sql enwiki Enter in MariaDB console (#Database Servers)
sql meta
SELECT * FROM wiki WHERE 1;
Display all available databases. You can filter by language (lang='xx'), family (family='wikibooks'), etc.
sql local
use s51138__heritage_p;
Enter in erfgoed database
ssh ssh -A yourusername@tools-login.wmflabs.org Connect to tools-login.wmflabs.org
mosh -a yourusername@tools-login.wmflabs.org Recommended for connections from Europe when lag appears
virtualenv virtualenv -p python3 name Create a virtual environment with Python 3 with the name name
cd name;source bin/activate Move inside the virtualenv name and launch it
deactivate Exit of virtualenv
webservice webservice start Tool is reachable throught public URL (webservice stop to stop)

Processing dumps

Babel user information
es-N Esta persona tiene una comprensión nativa del español.
en-3 This user has advanced knowledge of English.
Users by language

Other stuff

External links