This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
from itertools import groupby | |
from shutil import rmtree | |
from pkg_resources import parse_version | |
def main(): | |
"""Strips the buildout cache from older egg versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# requirements: | |
# | |
# beautifulsoup4 | |
# requests | |
# unidecode | |
from itertools import groupby |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a == 1 or a == 2 or a == 3 # a == 1 or a == 2 or a == 3 or ... or a == N | |
a in [1, 2, 3] # a in [1, 2, 3, ..., N] | |
a if a else b | |
a or b | |
# ... list building with appends => list comprehensions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Editar cada um dos arquivos: | |
/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules.cache | |
/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/gtk.immodules | |
Procurar uma linha que começa com cedilla e adicione um :en no último parâmetro, assim: | |
"cedilla" "Cedilla" "gtk20" "/usr/share/locale" "az:ca:co:fr:gv:oc:pt:sq:tr:wa:en" | |
Ou simplesmente rode: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def highlight(element): | |
"""Highlights (blinks) a Webdriver element. | |
In pure javascript, as suggested by https://github.com/alp82. | |
""" | |
driver = element._parent | |
driver.execute_script(""" | |
element = arguments[0]; | |
original_style = element.getAttribute('style'); | |
element.setAttribute('style', original_style + "; background: yellow; border: 2px solid red;"); | |
setTimeout(function(){ |
OlderNewer