In your command-line run the following commands:
brew doctor
brew update
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
# Shell script to create a complete Django project. | |
# This script require Python 3.x and pyenv | |
# Settings.py is config to Django 2.2.12 | |
# The project contains: | |
# Settings config | |
# Person model and form | |
# Person list and detail | |
# Person create, update and delete | |
# Admin config |
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
// using jQuery | |
function getCookie(name) { | |
var cookieValue = null; | |
if (document.cookie && document.cookie != '') { | |
var cookies = document.cookie.split(';'); | |
for (var i = 0; i < cookies.length; i++) { | |
var cookie = jQuery.trim(cookies[i]); | |
// Does this cookie string begin with the name we want? | |
if (cookie.substring(0, name.length + 1) == (name + '=')) { | |
cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); |
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 decimal import Decimal | |
from geopy.distance import great_circle # or distance | |
from seuapp.models import Store | |
# decimal places degrees distance | |
# --------------- ------- -------- | |
# 0 1 111 km | |
# 1 0.1 11.1 km | |
# 2 0.01 1.11 km | |
# 3 0.001 111 m |
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: utf8 | |
import re | |
from functools import reduce | |
def merge_dicts(*dicts): | |
# http://stackoverflow.com/questions/7204805/dictionaries-of-dictionaries-merge | |
if not reduce(lambda x, y: isinstance(y, dict) and x, dicts, True): | |
raise TypeError("Object in *dicts not of type dict") |
Olá, seja bem vindo ao grupo Python-Brasil.
- Insira aqui o pedido de mais informações ou possivel solução a pergunta feita
Dito isto, aqui nós possuímos algumas regras que ajudam a manter essa lista útil e agradável para os participantes
Antes de mandar as suas próximas perguntas, pedimos para que leia o texto:
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# INSTRUCTIONS: | |
# | |
# 1) Install graphviz (http://www.graphviz.org) | |
# 2) Run on terminal: | |
# python graph_coloring.py | dot -Tpng -o graph.png | |
# or, if you have imagemagick installed: | |
# python graph_coloring.py | dot -Tpng | display |
While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.
Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.
lib/
is intended for code that can run as-issrc/
is intended for code that needs to be manipulated before it can be used
NewerOlder