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
| listen: "0.0.0.0:8080" | |
| host: http://10.0.2.15:8080 | |
| debug: true | |
| admin-team: admin | |
| database: | |
| url: 127.0.0.1:27017 | |
| name: tsurudb | |
| git: |
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
| Opening config file: /etc/tsuru/tsuru.conf | |
| Done reading config file: /etc/tsuru/tsuru.conf | |
| Using mongodb database "tsurudb" from the server "127.0.0.1:27017". | |
| Using hipache router "10.0.2.15.nip.io" with redis at "localhost:6379". | |
| Using "docker" provisioner. | |
| Cluster Storage: Unable to connect to mongodb: no reachable servers (docker:cluster:mongo-url = "127.0.0.1:27017"; docker:cluster:mongo-database = "dockercluster") |
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 unittest import TestCase | |
| from mock import patch, Mock | |
| from matriz import Matriz | |
| class MatrizTest(TestCase): | |
| @patch('matriz.Matriz.inicializar_matriz') | |
| def test_intancia_matriz(self, method): | |
| method.return_value = 'matriz' |
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 sys | |
| from django.conf import settings | |
| settings.configure( # configure | |
| DEBUG=True, | |
| SECRET_KEY='thisisthesecretkey', | |
| ROOT_URLCONF=__name__, | |
| MIDDLEWARE_CLASSES=( |
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
| a = 2 | |
| function incrementar () { | |
| for (b = 1; b < 100000000; b++) { | |
| b += b | |
| } | |
| a += 1 // valores são passados por cópia e não referência | |
| } | |
| incrementar() |
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 GooglonComparador: | |
| def __init__(self, obj, *args): | |
| self.obj = obj | |
| self.ordem_dict = {} | |
| for i, letra in enumerate('zmbtshjpnwlrcxkqvdgf'): | |
| self.ordem_dict[letra] = i | |
| # Menor que = Less than | |
| def __lt__(self, other): | |
| return self._comparar(self.obj, other.obj) < 0 | |
| # Maior que = Greater than |
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/bin/env bash | |
| # System Update | |
| apt-get update | |
| # Pre requisites Packages | |
| apt-get install -y build-essential | |
| apt-get install -y git | |
| # Development Packages | |
| apt-get install -y python3 |
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 urllib | |
| from StringIO import StringIO | |
| from django import forms | |
| from django.core.files import File | |
| from formexemplo.models import Pessoa | |
| class PessoaModelForm(forms.ModelForm): |
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
| const produtos = [ | |
| { | |
| nome: 'Bicicleta', | |
| preco: 1200.0 | |
| }, | |
| { | |
| nome: 'Capacete', | |
| preco: 450.0 | |
| } | |
| ] |
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
| const produtos = [ | |
| { | |
| id: 1, | |
| preco: 10.0, | |
| qtd: 2 | |
| }, | |
| { | |
| id: 2, | |
| preco: 10.0, | |
| qtd: 2 |
OlderNewer