#!/usr/bin/env python3
# encoding: utf-8
Monitor the needsdiagnosis milestones.
Created by Karl Dubost - 2018-02-18
import datetime
import json

Build Tools For Webcompat

webcompat is an opensource project. It relies on the effort of Mozilla webcompat team and contributions from volunteers across the world. Microsoft Edge team and Google Chrome team are also participating time to time.

There are different areas were you can create an impact on developing tools including:

>>> from lxml.html.diff import htmldiff, html_annotate
>>> frag1 = """<li class="foo" id="barbitruc">"""
>>> frag2 = """<li id="barbitruc" class="foo">"""
>>> print htmldiff(frag1, frag2)
<li id="barbitruc" class="foo">
>>> htmldiff(frag1, frag2)
u'<li id="barbitruc" class="foo">'
>>> '<ins>' in htmldiff(frag1, frag2)
>>> '<del>' in htmldiff(frag1, frag2)
View to_review.txt
2017-10-30T10:13:24 INFO Issue 97. No label. Review!
2017-10-30T10:14:09 INFO Issue 137. No label. Review!
2017-10-30T10:14:16 INFO Issue 144. No label. Review!
2017-10-30T10:14:21 INFO Issue 150. No label. Review!
2017-10-30T10:14:21 INFO Issue 151. Too many labels. Review!
2017-10-30T10:14:21 INFO Issue 152. No label. Review!
2017-10-30T10:14:21 INFO Issue 153. No label. Review!
2017-10-30T10:14:33 INFO Issue 164. No label. Review!
2017-10-30T10:14:39 INFO Issue 171. No label. Review!
2017-10-30T10:14:58 INFO Issue 188. No label. Review!

Safari iOS Request

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Connection: keep-alive
Accept-Language: fr-fr
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.3 Mobile/14E277 Safari/603.1.30
Cookie: _ga=GA1.2.1480447581.1502240550; _gat=1; _gat_anotherTracker=1; _gid=GA1.2.1718704641.1502240550; ldst_sess=33b25094105b35baeb93a5418090fb06bdad98f7; ldst_is_support_browser=1; ldst_touchstone=1

It is faster to create the dict with the first value than creating and adding.

python -mtimeit "issue = {}; issue['action'] = 'opened'; issue['title'] = 'foo'"
10000000 loops, best of 3: 0.135 usec per loop

python -mtimeit "issue = {'action': 'opened'}; issue['title'] = 'foo'" 
10000000 loops, best of 3: 0.111 usec per loop
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at
import urlparse
import re
import sys
View gist:5cd79259e696e0a52eaff35951b21803
# done some commits on last version of master by mistakes
# and some modifications still not committed
git stash
git branch my_new_branch
git reset --hard origin/master
git checkout my_new_branch
git stash pop
# I'm now on my new branch as I should have been
import json
new format: {new}
old format: {old} # can't conclude anything
INVALID: On {invalid} > empty: {empty_invalid}
VALID: On {valid} > empty: {empty_valid}
View google-search.js
(function() {
(function() {
if (!google.xjsir)
if (google.q && google.q.iere) {
for (var d = document.querySelectorAll("#topstuff,#fc,.ichpcnt,#fsad"), a = 0; a < d.length; a++) d[a].classList.add("qs-css-m");
var c = document.getElementById("rg");
c ? ( = "150ms", c.classList.add("qs-css-m"), c.addEventListener("webkitAnimationEnd", function() { = "";
if (google.isr && google.isr.layout && google.isr.layout.getResultsForPage) {