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 | |
| # -*- coding: utf-8 -*- | |
| import os, sys | |
| pkg = '/src' | |
| root_path = os.path.dirname(__file__) | |
| sys.path.insert(0, root_path.replace(pkg, '/src')) | |
| sys.path.insert(0, root_path.replace(pkg, '/lib')) | |
| sys.path.insert(0, root_path.replace(pkg, '/libs')) | |
| sys.path.insert(0, '/Volumes/Amelie/alejandro/development/library/python') |
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 settings import DATABASE_USERS | |
| from com.ak.common.security import token | |
| from mongoengine import connect as mongo_connect | |
| settings = dict(host='127.0.0.1', port=27017) | |
| mongo_connect(DATABASE_USERS, **settings) | |
| User.drop_collection() | |
| u = User() | |
| u.username = 'alejandro.bernardis' | |
| u.password = 'alejandro.bernardis' | |
| u.email = 'alejandro.bernardis@gmail.com' |
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
| DATABASE_MULTIPLE = dict( | |
| principal = dict( | |
| name = 'com-ak-proc3ss-local', | |
| user = 'root', | |
| pasw = 'root', | |
| host = '127.0.0.1', | |
| port = 27017, | |
| conn = 100, | |
| areq = True, | |
| ugls = 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
| try: | |
| import importame.una.clase | |
| except ImportError: | |
| raise Exception(u'puta, no cargo... por estas cosas amo a python!') |
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
| class A(object): | |
| @staticmethod | |
| def sm(cls, p1=None, p2=None): | |
| print cls, p1, p2 | |
| @classmethod | |
| def cm(cls, p1=None, p2=None): | |
| print cls, p1, p2 | |
| class B(A): |
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: 1107 | |
| # } else return sprintf(buf, sizeof(off_t) == sizeof(long long)? " %11lld" : " %9ld", size); | |
| # } else return sprintf(buf, sizeof(off_t) == sizeof(long long)? " %11lld" : " %9lld", size); | |
| int psize(char *buf, off_t size) | |
| { | |
| static char *iec_unit="BKMGTPEZY", *si_unit = "dkMGTPEZY"; | |
| char *unit = siflag ? si_unit : iec_unit; | |
| int idx, usize = siflag ? 1000 : 1024; |
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
| TimeZone | |
| ======== | |
| $: cp /etc/localtime /etc/localtime.old | |
| $: cp -f /usr/share/zoneinfo/Mexico/General /etc/localtime | |
| ------------------------------------------------------------------------------- | |
| Base | |
| ==== |
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
| ################################################################################ | |
| ## Project Information | |
| ################################################################################ | |
| project.author = | |
| project.author.email = | |
| project.owner = | |
| project.owner.url = | |
| project.fullname = | |
| project.name = |
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
| <?xml version="1.0"?> | |
| <project name="asumikamikaze-site" default="test" basedir="."> | |
| <!-- == properties ===================================================== --> | |
| <property file="build.properties" /> | |
| <!-- == common ========================================================= --> | |
| <macrodef name="common.data"> | |
| <sequential> | |
| <tstamp> | |
| <format property="build.date" pattern="yyyyMMddHHmmss" unit="minute" locale="en" /> | |
| <format property="build.fullDate" pattern="yyyy/MM/dd HH:mm:ss" unit="minute" locale="en" /> |
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
| <div class="login box white span3"> | |
| <div class="box-header"> | |
| <h2 class="box-title">Sign in to Admin</h2> | |
| </div> | |
| <div class="js-alert box-alert"> | |
| </div> | |
| <div class="box-content"> | |
| <form class=""> | |
| <fieldset> |