Não use UUID
como PK nas tabelas do seu banco de dados.
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 python3 | |
from os import path | |
import tempfile | |
import subprocess | |
import datetime as dt | |
import click | |
@click.group() | |
def cli(): |
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
source.sh | |
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
class BaseClean(object): | |
cleaned_data = [] | |
_errors = [] | |
def _clean_instance(self): | |
for item in dir(self): | |
if item.startswith('clean_'): | |
validated = getattr(self, item) | |
try: | |
if callable(validated): |
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
" Reference: | |
" http://sontek.net/turning-vim-into-a-modern-python-ide | |
" https://github.com/amix/vimrc | |
" Enable filetype plugins | |
filetype on | |
filetype plugin on | |
filetype indent off | |
let g:pyflakes_use_quickfix = 0 |
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
import bisect | |
import itertools | |
import operator | |
class _BNode(object): | |
__slots__ = ["tree", "contents", "children"] | |
def __init__(self, tree, contents=None, children=None): | |
self.tree = tree |