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 io | |
| import os | |
| import re | |
| import string | |
| import FreeSimpleGUI as sg | |
| try: | |
| from PIL import Image, ImageEnhance | |
| except ImportError: |
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
| class Institution(Base): | |
| name = models.CharField( | |
| "Nome da Instituição", | |
| max_length=100 | |
| ) | |
| city = models.ForeignKey( | |
| "City", | |
| verbose_name="Cidade", | |
| on_delete=models.CASCADE, | |
| related_name="institution_city" |
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 asyncio | |
| from playwright.async_api import async_playwright | |
| url = 'https://www.in.gov.br/leiturajornal?secao=dou1&data=27-01-2025' | |
| async def crawler(): | |
| async with async_playwright() as p: | |
| browser = await p.chromium.launch(headless=True) | |
| # browser = await p.chromium.launch(headless=False) |
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 time import sleep | |
| from requests import get | |
| from parsel import Selector | |
| from datetime import datetime as dt | |
| rodadas_ids = [ | |
| "D4sWXlbMU0OyN9WzJhZ6Z", | |
| "PwIBz94Zca1ZZV6Db-i7E", | |
| "BXCCzR007HOYgC_KjXpRt", | |
| "atuoTau-ep2Rq0K3lCNUE", |
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
| ➜ ~ sudo apt-get upgrade -y | |
| Reading package lists... Done | |
| Building dependency tree... Done | |
| Reading state information... Done | |
| Calculating upgrade... Done | |
| 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. | |
| 3 not fully installed or removed. | |
| After this operation, 0 B of additional disk space will be used. | |
| Setting up virtualbox-dkms (6.1.32-dfsg-1build1) ... | |
| Removing old virtualbox-6.1.32 DKMS files... |
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
| sair = 'Não' | |
| while sair != 'Sim': | |
| print("João 2l") | |
| print("Pedro 5l") | |
| print("José 10l") | |
| j = int(input('Enter 1st number: ')) | |
| p = int(input('Enter 2nd number: ')) | |
| j = int(input('Enter 3nd number: ')) | |
| print(2500) | |
| print(5200) |
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 django.db import models | |
| class Car(models.Model): | |
| AT = 'AT' | |
| MA = 'MA' | |
| CAMBIO = [ | |
| (AT, 'Automatic'), | |
| (MA, 'Manual') | |
| ] |
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 requests import get | |
| from parsel import Selector | |
| url = 'https://www.pockettactics.com/deadly-sin-retribution/codes' | |
| resp = get(url) | |
| selector = Selector(text=resp.text) | |
| for r in selector.css('.entry-content').css('ul'): |
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
| Contexto | |
| O objetivo desse dessa implementação é criar endpoints para gerenciar serviços que podem ser prestados dentro da plataforma. | |
| Objetivo | |
| Para isso, vamos criar um novo django app tanto na camada de APIs como na camada de backoffice. (São projetos diferentes). | |
| Dentro do Django app, vamos criar o client_services. A tabela deve funcionar como uma grande | |
| vitrine de serviços disponíveis para compra do usuário paciente. |
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/local/bin/python | |
| # coding: utf-8 | |
| import itertools | |
| from collections import OrderedDict | |
| from decimal import Decimal | |
| import numpy as np | |
| from html_table_parser.parser_functions import extract_tables, make2d | |
| from requests import get, packages |
NewerOlder