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
function height(root){ | |
if(root.isLeaf()) { //Se for folha | |
return 0; | |
} | |
else { | |
var h = 0; | |
h = Math.max(height(root.left),h); | |
h = Math.max(height(root.right),h); | |
return h + 1; | |
} |
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 gerar_itau(fatura, bank, encargos=0): | |
invoice = BoletoItau() | |
invoice.data_vencimento = fatura.dtvencto.date() | |
invoice.data_documento = fatura.dtemissao | |
invoice.nosso_numero = fatura.nosso_numero | |
invoice.numero_documento = fatura.fatura | |
invoice.valor_documento = fatura.valor | |
empresa = Empresa.objects.get(pk=settings.STUR_EMPRESA) |
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
wget https://github.com/oracle/python-cx_Oracle/archive/master.zip | |
unzip master.zip | |
cd python-cx_Oracle-master | |
wget https://github.com/oracle/odpi/archive/master.zip | |
unzip master.zip | |
rm -rf odpi | |
mv -i odpi-master odpi | |
python setup.py install |