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 | |
| cd ~/ | |
| sudo apt-get -y install python-software-properties | |
| sudo /bin/sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' | |
| sudo wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
| sudo apt-get update |
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
| # -*- coding: utf-8 -*- | |
| from django import forms | |
| from django.contrib.contenttypes.models import ContentType | |
| from generics.models import Documento, Foto | |
| class GenericRelationsForm(forms.ModelForm): | |
| def __init__(self, *args, **kwargs): | |
| self.obj = kwargs.pop('object', None) | |
| super(GenericRelationsForm, self).__init__(*args, **kwargs) |
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 django.contrib.auth.decorators import login_required | |
| from django.contrib.auth.models import User | |
| from django.views.generic.edit import FormMixin | |
| from django.views.generic.list import ListView | |
| class SearchFormListView(FormMixin, ListView): | |
| def get_form_kwargs(self): | |
| return {'initial': self.get_initial(), 'data': self.request.GET} | |
| def get(self, request, *args, **kwargs): |
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 django.forms.widgets import TextInput | |
| from django.contrib.db import models | |
| import re | |
| class TelefoneWidget(TextInput): | |
| def __init__(self, attrs=None): | |
| attrs_default = {'placeholder': 'xx-(x)xxxx-xxxx', 'maxlength': 13} |
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
| 1. Smoke On The Water - Deep Purple ok | |
| 2. (I Can't Get No) Satisfaction - Rolling Stones ok | |
| 3. Sunshine Of Your Love - Cream ok | |
| 4. Layla - Derek And The Dominos ok | |
| 6. Iron Man - Black Sabbath ok | |
| 7. Johnny B Goode - Chuck Berry ok | |
| 8. Heartbreaker - Led Zeppelin ok | |
| 9. You Really Got Me - The Kinks ok | |
| 10. Sweet Child O' Mine - Guns N' Roses ok | |
| 11. Purple Haze - Jimi Hendrix Experience ok |
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 to_hex(c): | |
| r = hex(c[0])[2:].zfill(2)[:2] | |
| g = hex(c[1])[2:].zfill(2)[:2] | |
| b = hex(c[2])[2:].zfill(2)[:2] | |
| return [r, g, b] | |
| def get_gradient_color(c1, c2, percent, in_hex=False): | |
| r = c1[0] + (percent * (c2[0] - c1[0])) | |
| g = c1[1] + (percent * (c2[1] - c1[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
| #!/usr/bin/env python | |
| import os | |
| import re | |
| import subprocess | |
| import sys | |
| modified = re.compile('^(?:M|A)(\s+)(?P<name>.*)') | |
| CHECKS = [ |
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
| { | |
| "profissoes": [ | |
| "Administrador", | |
| "Advogado", | |
| "Aeronauta", | |
| "Arquivista / T\\u00e9cnico de Arquivo", | |
| "Artista/T\\u00e9cnico em espet\\u00e1culos de divers\\u00f5es", | |
| "Assistente Social", | |
| "Atleta Profissional de Futebol", | |
| "Atu\\u00e1rio", |
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
| { | |
| "profissoes": [ | |
| { | |
| "Norma": "Lei n\\u00ba 4.769, de 9 de setembro de 1965 - Disp\\u00f5e sobre o exerc\\u00edcio da profiss\\u00e3o de t\\u00e9cnico de administra\\u00e7\\u00e3o, e d\\u00e1 outras providencias.", | |
| "Nome": "Administrador" | |
| }, | |
| { | |
| "Norma": "Lei n\\u00ba 8.906, de 4 de julho de 1994 - Disp\\u00f5e sobre o estatuto da advocacia e a ordem dos Advogados do Brasil - OAB.", | |
| "Nome": " Advogado" | |
| }, |
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
| { | |
| "FORMAS_DE_EMANCIPACAO": [ | |
| "Casamento", | |
| "Ato judicial", | |
| "Concess\\u00e3o dos pais", | |
| "Cola\\u00e7\\u00e3o de grau em curso de ensino superior", | |
| "Exerc\\u00edcio de emprego p\\u00fablico efetivo", | |
| "Estabelecimento civil ou comercial, com economia pr\\u00f3pria", | |
| "Exist\\u00eancia de rela\\u00e7\\u00e3o de emprego, com economia pr\\u00f3pria" | |
| ], |