This file contains hidden or 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 python3 | |
# Copyright 2017 Daniel Hilst Selli | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
This file contains hidden or 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
# Copyright 2017 Daniel Hilst Selli, <[email protected]> | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
This file contains hidden or 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
from functools import wraps | |
from operator import attrgetter | |
from importlib import import_module | |
from collections import Counter | |
import re | |
def packages(pfqn): | |
dots_n = len(pfqn.split('.')) | |
for i in range(dots_n): | |
yield pfqn.rsplit('.', i)[0] |
This file contains hidden or 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
http://www.detran.sp.gov.br/wps/portal/portaldetran/cidadao/veiculos/fichaservico/transferenciaPropriedadeMesmoMunicipio |
This file contains hidden or 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 | |
import XenAPI | |
from getpass import getpass | |
host = 'https://localhost' | |
user = 'root' | |
password = getpass('Password: ') | |
session = XenAPI.Session(host) |
This file contains hidden or 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
py3 pass | |
syntax on | |
set background=dark | |
set laststatus=2 | |
set smartindent | |
set autoindent | |
set modeline | |
set nocompatible | |
" execute pathogen#infect() |
This file contains hidden or 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
py3 pass | |
syntax on | |
set background=dark | |
set laststatus=2 | |
set smartindent | |
set autoindent | |
set modeline | |
set nocompatible | |
" execute pathogen#infect() |
This file contains hidden or 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 python3 | |
import sys | |
import multiprocessing as mp | |
import subprocess as sp | |
import shlex as sh | |
from itertools import cycle | |
def sh(cmd): | |
return sp.Popen(cmd, shell=True, stdout=sys.stdout, stderr=sys.stderr).wait() |
This file contains hidden or 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
py3 pass | |
syntax on | |
set background=dark | |
set laststatus=2 | |
set smartindent | |
set autoindent | |
set modeline | |
set nocompatible | |
" execute pathogen#infect() |
This file contains hidden or 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
from jinja2 import Template | |
from jinja2.runtime import Context | |
def merge_vars(obj): | |
d = {} | |
for o in reversed(obj.mro()): | |
d.update(vars(o)) | |
return d |