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 | |
| # -*- coding: utf-8 -*- | |
| import httplib | |
| import re | |
| import sys | |
| import base64 | |
| import subprocess | |
| import urllib | |
| import lxml.etree |
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 | |
| # -*- coding: utf-8 -*- | |
| import lxml.etree | |
| import xmlsec | |
| import urllib2 | |
| ############################################################################### | |
| # Ajustes para NFe | |
| ############################################################################### |
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 | |
| # -*- coding: utf-8 -*- | |
| import pole | |
| import zipfile | |
| # Identificar tipo e converter | |
| def converter(no_xml): | |
| string = str(no_xml) | |
| if '/' in string: |
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
| import java.security.KeyStore; | |
| import java.security.PrivateKey; | |
| import java.security.Signature; | |
| import java.security.SecureRandom; | |
| import java.util.Enumeration; | |
| import javax.xml.bind.DatatypeConverter; | |
| class Token { | |
| public static void main(String[] a) { |
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
| import json | |
| # CRUD in dict table (create, read, update, delete, save, load) | |
| # table => {<id_1>: {<field_1>: <value_1>, <field_2>: <value_2>, ...}, ...} | |
| # fields => {<field_1>: <type_1>, <field_2>: <type_2>, ...} | |
| # field name `id´ is reserved | |
| def crud_create(table, fields, register=None, | |
| fields_error="Not all fields in register."): |
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 | |
| # -*- coding: utf-8 -*- | |
| import gi | |
| import cairo | |
| import datetime | |
| gi.require_version('Gtk', '3.0') | |
| from gi.repository import Gtk, Gdk, GLib |
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 | |
| # -*- coding: utf-8 -*- | |
| import gi | |
| import cairo | |
| import datetime | |
| gi.require_version('Gtk', '3.0') | |
| from gi.repository import Gtk, Gdk, GLib |
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
| # Criar a jaula | |
| mkdir stretch | |
| debootstrap stretch stretch # se tiver apt-cache ou mirror coloque aqui | |
| # Preparar para montar as partições do sistema dentro da jaula | |
| mount | | |
| sed 's/\(.*\) on \(.*\) type \(.*\) .*/mkdir -p \2; mount -t \3 \1 \2/' | | |
| grep -v /dev/sd >> stretch/root/.bashrc |
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 | |
| # -*- coding: utf-8 -*- | |
| import sys | |
| # quantidade de notas de 50 disponível em notas_50_disponiveis | |
| notas_50_disponiveis = 10 | |
| # quantidade de notas de 20 disponível em notas_20_disponiveis | |
| notas_20_disponiveis = 10 |
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 | |
| # -*- coding: utf-8 -*- | |
| import math | |
| import re | |
| # dado um título e lista de listas no formato | |
| # ('<variável>', '<tipo>', '<descricao>', '<fórmula>') | |
| # pede-se qual variável calcular, pede os valores e dá o resultado | |
| # qualquer valor vazio saida da função |
NewerOlder