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, timedelta | |
| def is_more_than_business_hours(date): | |
| return date.hour >= 16 or date.weekday() >= 5 | |
| def get_next_business_hours(date): | |
| date += timedelta(days=1) | |
| if date.weekday() >= 5: | |
| return return_next_weekday(date) |
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
| openapi: "3.0.0" | |
| info: | |
| title: Simple API overview | |
| version: 2.0.0 | |
| paths: | |
| /: | |
| get: | |
| description: Returns pets based on ID | |
| summary: Find pets by ID | |
| operationId: getPetsById |
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
| { | |
| "openapi": "3.0.2", | |
| "info": { | |
| "title": "FastAPI", | |
| "version": "0.1.0" | |
| }, | |
| "paths": { | |
| "/test": { | |
| "get": { | |
| "summary": "Root Test", |
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 random import randint | |
| jogo_milionario = ["10,19,32,33,45,59"] | |
| lista = list() | |
| jogos = list() | |
| print("-" * 30) | |
| print(" JOGA NA MEGA SENA ") | |
| print("-" * 30) | |
| quant = int(input("Quantos jogos você quer que eu sorteie? ")) | |
| jogos = [",".join([str(randint(1, 60)) for i in range(5)]) for i in range(quant)] |
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
| def lonelyinteger(array): | |
| array.sort() | |
| lonely = 0 | |
| odd_position = True | |
| for element in array: | |
| if odd_position: | |
| lonely = element | |
| odd_position = False | |
| continue | |
| if element != lonely: |
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 collections import Counter | |
| def lonelyinteger(array): | |
| for elem, frequency in Counter(array).items(): | |
| if frequency == 1: | |
| return elem | |
| return None | |
| lonelyinteger([10, 2, 10, 1, 1]) |
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
| def lonelyinteger(list_integer): | |
| res = 0 | |
| for element in list_integer: | |
| res ^= element | |
| return res | |
| lonelyinteger([10, 2, 10, 1, 1]) |
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 datetime import timedelta | |
| import itertools | |
| def converter_str_time_to_delta(str_time): | |
| converted_time = datetime.strptime(str_time[:-2], "%H:%M") | |
| delta = timedelta(hours=converted_time.hour, minutes=converted_time.minute) | |
| if "pm" in str_time: | |
| delta += timedelta(hours=12) |
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
| {% load static %} | |
| <!DOCTYPE html> | |
| <html lang="pt-br"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"> |
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
| body { | |
| font-family: "Lato", sans-serif; | |
| } | |
| .main-head{ | |
| height: 150px; | |
| background: #FFF; | |
| } | |
| .sidenav { |
NewerOlder