Skip to content

Instantly share code, notes, and snippets.

View lclpedro's full-sized avatar
🏠
Working from home

Pedro Lucas lclpedro

🏠
Working from home
  • Mercado Livre
  • São Paulo, SP, Brasil
View GitHub Profile
@lclpedro
lclpedro / interfaces.go
Created May 12, 2023 20:27
instagram: @codandonapratica
package main
import "fmt"
type Animal interface {
FazerSom() string
}
type Cachorro struct{}
@lclpedro
lclpedro / readme.md
Last active March 6, 2024 20:46
Using colima with cli docker

Install colima with docker

1.Install colima

brew install colima
  1. Install Docker and helpers
brew install docker docker-compose docker-credential-desktop docker-credential-helper
deb [by-hash=force] http://deepin.c3sl.ufpr.br/deepin stable main contrib non-free
@lclpedro
lclpedro / .secret.toml
Created November 26, 2021 21:24
Dynaconf examples of use.
TOKEN = 123123
from functools import wraps
from src.models import Adminstrator
from graphql.execution.base import ResolveInfo
from graphql_jwt.exceptions import PermissionDenied
def context(f):
def decorator(func):
def wrapper(*args, **kwargs):
info = next(arg for arg in args if isinstance(arg, ResolveInfo))
from src.services.bucket_s3 import BucketS3
def use_service():
files = BucketS3().get_read_bucket('<NOME_DO_BUCKET>')
print(files)
return files
from server import db, app, jsonify, Blueprint, request,\
datetime, os, func, wkt, json,\
secure_filename, shapefile, zipfile, glob
ALLOWED_EXTENSIONS = set(['zip'])
def allowed_file(filename):
return '.' in filename and \
filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
while True:
def questao01():
alcool=3.75
gasolina=4.79
x = ((3.75*100)/4.79)
if x >= 70: print('Viável')
else: print('Não é viável')
def questao02():
n1=input('Digite N1:')
@lclpedro
lclpedro / estados-cidades.json
Created May 12, 2017 15:31 — forked from letanure/estados-cidades.json
JSON estados cidades
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",