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 python:3.5 | |
MAINTAINER Marlon Baptista de Quadros([email protected]) | |
ENV PYTHONUNBUFFERED 1 | |
RUN apt-get update -y | |
RUN apt-get -y install binutils libproj-dev gdal-bin postgresql-client python3-lxml | |
RUN apt-get -y install libmemcached-dev |
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
MODELOS | |
# Basico, los campos conocidos y un json con TODO lo demás, cada cliente tiene su propia definicion. | |
class ModelA: | |
created_at | |
amount | |
metadata = JSON_FIELD | |
# Semantico, cada cliente define que significa cada campo para el, | |
# por ej el field_int_1 es la cantidad de transacciones. |
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
" https://realpython.com/vim-and-python-a-match-made-in-heaven/ | |
set nocompatible " required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins |
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
extension OSLog { | |
private static var subsystem = Bundle.main.bundleIdentifier! | |
static let ui = OSLog(subsystem: subsystem, category: "UI") | |
static let network = OSLog(subsystem: subsystem, category: "Network") | |
} | |
os_log("Contact selected", log: .ui) | |
os_log("HTTP response: %@", log: .network, responseCode) |
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
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': False, | |
'formatters': { | |
'verbose': { | |
'format': '%(levelname)s %(asctime)s %(module)s ' | |
'%(process)d %(thread)d %(message)s' | |
}, | |
'simple': { | |
'format': '%(levelname)s %(asctime)s %(module)s %(message)s' |
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.core.management.base import BaseCommand | |
from tqdm import trange | |
from random import random, randint | |
from time import sleep | |
import logging | |
logger = logging.getLogger('commands') # or __name__ | |
class Command(BaseCommand): | |
""" |
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
prices_block = [ | |
{ | |
name: 'Destacados', | |
categories: ['featured'] | |
}, | |
{ | |
name: 'Promociones', | |
categories: ['2x1', '3x1', '4x1'] | |
}, | |
{ |