This file contains 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 | |
from django.urls import reverse | |
from django.contrib.auth import get_user_model | |
class Categoria(models.Model): | |
nome = models.CharField(max_length=32) | |
class Produto(models.Model): |
This file contains 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
resource "random_integer" "postgres_port" { | |
min = 5432 | |
max = 5432 | |
} | |
resource "google_sql_database_instance" "postgres" { | |
name = "${var.environment}-postgres" | |
database_version = var.engine_version | |
deletion_protection = var.deletion_protection |
This file contains 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
""" | |
14 <-- \o/ | |
7 | |
T | |
""" |
This file contains 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
<template> | |
<h1>Listar Pokemon</h1> | |
<ul> | |
<li v-for="pokemon of listaPokemon" :key="pokemon.id"> | |
<p> | |
{{ pokemon.name }} | |
<span><button @click="obterDetalhes(pokemon)">detalhes</button></span> | |
</p> | |
<div v-if="pokemon.detalhe"> | |
<p>{{ pokemon.detalhe.base_experience }} <img :src="pokemon.detalhe.image" alt="" /></p> |
This file contains 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 cep_json_xml(cep, formato): | |
cepEntrada = cep | |
tipoCep ="" | |
cepTemp ="" | |
metodo ="buscarCep" | |
formato = formato.lower() | |
url = 'http://m.correios.com.br/movel/buscaCepConfirma.do' | |
post_data_dictionary = {'cepEntrada': cepEntrada, 'tipoCep': tipoCep, 'cepTemp': cepTemp, 'metodo':metodo} |
This file contains 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
""" | |
Celery Tasks | |
============ | |
This file defines the expected API. | |
""" | |
import jsonschema | |
from celery import Celery, subtask, group, chord | |
from . import settings |
This file contains 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
<template> | |
<div> | |
<!-- componente que encapsula o PUSH NOTIFICATION --> | |
<push-notification | |
ref="pushNotification" | |
:currentToken="userToken" | |
@update-token="onUpdateToken" | |
@new-message="onNewMessage" /> |
This file contains 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
#!/bin/bash | |
# This script is based on | |
# https://medium.com/welcome-to-the-django/guia-definitivo-para-organizar-meu-ambiente-python-a16e2479b753 | |
PYTHON2_VERSION='2.7.12' | |
PYTHON3_VERSION='3.5.2' | |
sudo apt-get install -y git python-pip make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev | |
sudo pip install virtualenvwrapper |
This file contains 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
_._ | |
_.-`` ''-._ | |
_.-`` O ''-._ | |
.-`` ''-._ | |
( O ) | |
|`-._ _.-'| | |
| `-._ _.-' | | |
`-._ `-._ _.-' _.-' | |
|`-._`-._ `-.__.-' _.-'_.-'| | |
| `-._`-._ _.-'_.-' | |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder