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
l = [] | |
for i in bloques: | |
if i.donativo: | |
nombre = i.donativo.nombre | |
apellido = i.donativo.apellido | |
pais = i.donativo.pais.nombre | |
fecha = i.donativo.fecha_creacion | |
else: | |
nombre = i.perfil.nombre | |
apellido = i.perfil.apellidos |
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 jsonrpclib import Server as ServerProxy | |
import base64 | |
import jsonrpclib | |
import json | |
class AdminTrytonException(Exception): | |
def __init__(self, result): | |
self.result = result |
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
296512382395.remmina | |
20:server=10.0.0.200 | |
1317161015928.remmina | |
26:server=10.0.0.179 | |
1318452389130.remmina | |
26:server=10.0.0.100 | |
1319680312680.remmina |
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.core.files.images import get_image_dimensions | |
from django.core.exceptions import ValidationError | |
HELP_TEXT_570 = _(u"El tamaño debe ser 570px y altura variable.") | |
HELP_TEXT_604 = _(u"El tamaño debe ser ancho 604px y altura variable.") | |
def validator_570( image ): | |
w, h = get_image_dimensions(image) | |
if h != 570: | |
ValidationError(HELP_TEXT_570) |
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
DATABASES["default"].update({ | |
"NAME":"volaris", | |
"USER":"yey!", | |
'OPTIONS': {'init_command':"set storage_engine=MYISAM;"} | |
}) |
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
Genshi==0.6 | |
PyWebDAV==0.9.8 | |
cdecimal==2.3 | |
egenix-mx-base==3.2.3 | |
lxml==2.3.4 | |
## FIXME: could not find svn URL in dependency_links for this package: | |
openoffice-python==0.1-20110209 | |
polib==0.7.0 | |
psycopg2==2.4.5 | |
pyOpenSSL==0.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
import ldap | |
import pprint | |
# tomado de | |
# http://www.grotan.com/ldap/python-ldap-samples.html#search | |
# conectamos al active directory | |
l = ldap.open("10.0.0.203") | |
#hacemos un bind | |
# cn =test objecto |
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 -*- | |
""" Metodos de Autentificacion """ | |
from django.contrib.auth.backends import RemoteUserBackend, ModelBackend | |
from django.contrib.auth.models import User | |
from mosketeros.settings import LDAP_SERVER,LDAP_BIND,LDAP_SEARCH | |
class DjangoAuth(ModelBackend): | |
""" Autentificacion del framework """ | |
#create_unknown_user = False | |
#supports_anonymous_user = False |
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 = AES.new("1234567890123456",AES.MODE_CBC,'This is an IV456') | |
In [22]: sixteenize("andres") | |
Out[22]: 'andres ' | |
d= a.encrypt(sixteenize("andres")) | |
In [21]: base64.encodestring(d) | |
Out[21]: 'DnFT1bUDaLP7Y+8jgljWcQ==\n' |
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 Crypto.Cipher import AES | |
from encoder import PKCS7Encoder | |
import base64 | |
#declared outside of all functions | |
key = '################' | |
mode = AES.MODE_CBC | |
iv = '\x00' * 16 | |
print (iv,) |