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
# Author: Ryan Cole | |
# Website: https://ryanc.me | |
# GitHub: https://github.com/MGinshe | |
# Usage: | |
# Place this file in /etc/nginx/sites-enabled/ | |
# Make sure you edit the DOMAIN_HERE and SSL_CERTIFICATE, and DB_FILTER sections | |
# | |
# Note: This config file is designed to be used with the Odoo dbfilter_from_header module | |
# https://apps.openerp.com/apps/modules/9.0/dbfilter_from_header/ |
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 | |
def get_data_doc_number(user, password, tipo_doc, numero_doc, format='json'): | |
''' | |
# url = 'http://py-devs.com:8888/api' | |
url = 'http://py-devs.com/api' | |
tipo_doc = 'dni' o 'ruc' | |
''' | |
url = 'http://py-devs.com/api' | |
# url = 'http://localhost:8000/api' |
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
def pos(fila, columna, filas, columnas, lista=None): | |
if not lista: | |
lista = range(filas*columnas) | |
if not filas * columnas <= len(lista): | |
print 'Error: verificar filas * columnas <= len(lista)' | |
if not fila < filas: | |
print 'Error: verificar fila < filas' | |
elif not columna < columnas: | |
print 'Error: verficar columna < columnas' |
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
def check(matriz): | |
def getXY(row, col, matriz): | |
lCol =[matriz[x][col] for x in range(len(matriz)) if x!=row] | |
fila = matriz[row] | |
lFil = [fila[x] for x in range(len(fila)) if x!=col] | |
return lCol+lFil | |
l = range(len(matriz)) | |
for row in l: |