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
| $ pytest | |
| ========================= test session starts ========================= | |
| platform linux -- Python 3.9.7, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 | |
| rootdir: /home/guiss/Projetos/Turing/Talks/Logs | |
| collected 4 items | |
| util_test.py ...F [100%] | |
| ============================== FAILURES =============================== | |
| __________________ test_flatten_dict_nivel_separador __________________ |
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 util_test | |
| >>> import pdb | |
| >>> pdb.run('util_test.test_flatten_dict_nivel_separador()') | |
| > <string>(1)<module>() | |
| (Pdb) continue | |
| Traceback (most recent call last): | |
| File "<stdin>", line 1, in <module> | |
| File "/home/guiss/.asdf/installs/python/3.10.0/lib/python3.10/pdb.py", line 1607, in run | |
| Pdb().run(statement, globals, locals) | |
| File "/home/guiss/.asdf/installs/python/3.10.0/lib/python3.10/bdb.py", line 597, in run |
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
| ? -> Lista todos os comando | |
| b[reak] -> define um ponto de parada no programa | |
| c[ontinue] -> continua ate uma excessão ou um ponto de parada | |
| n[ext] -> continua ate a proxima linha, sem entrar dentro de funções | |
| s[tep] -> continua ate a proxima instrução, entrando dentro de funções | |
| p -> print, imprime o valor | |
| pp -> pretty print, imprime dicionarios e listas com espaçamentos e quebras de linha | |
| l[ist] -> mostra o codigo perto de onde está sendo executado |
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
| $ pytest --pdb |
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
| if isinstance(root_value, dict): | |
| + breakpoint() | |
| flatten_item = flatten_dict(root_value) |
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 logging | |
| logger = logging.getLogger() | |
| logger.setLevel(logging.DEBUG) | |
| logger.debug('Isso é uma log de debug') | |
| logger.info('Isso é uma log de info') | |
| logger.warning('Isso é uma log de warning') | |
| logger.error('Isso é uma log de erro') | |
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
| DEBUG::Isso é uma log de debug | |
| INFO::Isso é uma log de info | |
| WARNING::Isso é uma log de warning | |
| ERROR::Isso é uma log de erro | |
| DEBUG::Chamado em root |
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
| # use in https://turingmachine.io/ | |
| input: '0111' # try 1100 | |
| blank: ' ' | |
| start state: passo2 | |
| synonyms: | |
| accept: {R: accept} | |
| reject: {R: reject} | |
| table: |
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
| input: '$11#1#' | |
| blank: ' ' | |
| start state: start | |
| table: | |
| start: | |
| $: {R: soma1} | |
| soma1: | |
| 1: {write: X, R: procuraBranco1} | |
| '#': {R: soma2} | |
| procuraBranco1: |
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 datetime import datetime | |
| from ftputil import FTPHost | |
| import tempfile | |
| import awswrangler as wr | |
| import zipfile | |
| from io import BytesIO | |
| import pandas as pd | |
| host = FTPHost('ftp.dadosabertos.ans.gov.br', 'anonymous') | |
| BUCKET_NAME = 'vidi-gift' |