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
# coding=utf-8 | |
from pagseguro import PagSeguro | |
from django.shortcuts import get_object_or_404, redirect | |
from django.views.generic import ( | |
RedirectView, TemplateView, ListView, DetailView | |
) | |
from django.forms import modelformset_factory | |
from django.contrib import messages |
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
# coding=utf-8 | |
from pagseguro import PagSeguro | |
from django.db import models | |
from django.conf import settings | |
from catalog.models import Product | |
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
# coding=utf-8 | |
from django.conf.urls import url | |
from . import views | |
urlpatterns = [ | |
url( | |
r'^carrinho/adicionar/(?P<slug>[\w_-]+)/$', views.create_cartitem, | |
name='create_cartitem' |
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
[alison@metanoia alisonamerico.github.io]$ bundle install | |
Fetching gem metadata from https://rubygems.org/......... | |
Fetching version metadata from https://rubygems.org/.. | |
Fetching dependency metadata from https://rubygems.org/. | |
Using rake 10.1.1 | |
Using colorator 0.1 | |
Using sass 3.4.22 | |
Using rb-fsevent 0.9.7 | |
Using ffi 1.9.10 | |
Using kramdown 1.10.0 |
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
"""urlshortener URL Configuration | |
The `urlpatterns` list routes URLs to views. For more information please see: | |
https://docs.djangoproject.com/en/1.10/topics/http/urls/ | |
Examples: | |
Function views | |
1. Add an import: from my_app import views | |
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') | |
Class-based views | |
1. Add an import: from other_app.views import Home |
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
Worker information | |
hostname: 825d5f45-cd42-4379-ac09-d078c2d042a0@1.production-1-worker-org-gce-m5kl | |
version: v6.2.0 https://github.com/travis-ci/worker/tree/5e5476e01646095f48eec13196fdb3faf8f5cbf7 | |
instance: travis-job-727351c9-8799-441f-b406-73d24b34c2af travis-ci-sardonyx-xenial-1547455603-2c98a19 (via amqp) | |
startup: 8.473644603s | |
system_info | |
Build system information | |
Build language: python | |
Build group: stable | |
Build dist: xenial |
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
(partyou-desafio) [alison@metanoia partyou]$ pipenv update | |
Running $ pipenv lock then $ pipenv sync. | |
Locking [dev-packages] dependencies… | |
Traceback (most recent call last): | |
File "/home/alison/.pyenv/versions/3.7.2/bin/pipenv", line 11, in <module> | |
sys.exit(cli()) | |
File "/home/alison/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 764, in __call__ | |
return self.main(*args, **kwargs) | |
File "/home/alison/.pyenv/versions/3.7.2/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 717, in main | |
rv = self.invoke(ctx) |
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
Worker information | |
hostname: 33a44394-b825-46d3-a46f-7172b293146b@1.production-1-worker-org-gce-6qn1 | |
version: v6.2.0 https://github.com/travis-ci/worker/tree/5e5476e01646095f48eec13196fdb3faf8f5cbf7 | |
instance: travis-job-58e433af-9f7f-4e62-bebc-63ff6342e308 travis-ci-sardonyx-xenial-1547455603-2c98a19 (via amqp) | |
startup: 6.583630389s | |
system_info | |
Build system information | |
Build language: python | |
Build group: stable | |
Build dist: xenial |
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
# SEM DOCTEST | |
conta_buraco = {'a': 1, 'B': 2, 'o': 1} | |
palavras = ['Banana', 'olho', 'çzt'] | |
def contar_qtd_buracos_por_letra(): | |
"""Função que conta a quantidade de buracos que existe nas letras que formam uma palavra. |
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
import requests | |
from app.settings import GOOGLE_API_KEY, GOOGLE_API_HOST | |
location = input("What's your location? ") | |
# Geocoding | |
resp = requests.get(GOOGLE_API_HOST, params={ | |
'address': location, |
OlderNewer