This is a short resume about what I understood about the masterpiece GEB, from Douglas Hofstadter
"How do we get I's from None I's?"
int a(); | |
int main() | |
{ | |
a(); | |
} |
# This file needs to set the variable 'application' to a WSGI handler of some | |
# description. | |
# +++++++++++ CUSTOM WSGI +++++++++++ | |
# If you have a WSGI file that you want to serve using PythonAnywhere, perhaps | |
# in your home directory under version control, then use something like this: | |
# | |
import os |
DEBUG = False | |
SITE_ID = 2 | |
ADMINS = ( | |
('Webmaster Ensaios Clinicos', '[email protected]'), | |
) | |
DATABASES = { | |
'default' : { |
import math | |
import numpy | |
from matplotlib import pyplot | |
def get_Ft(complex_vector, w, t, dt): | |
time = numpy.arange(0,t,dt) | |
for t in time: |
First of all I created two files:
File which contains the base class (I called it base.py)
class A(object):
"""do something"""
def __init__(self):
print 'initializing base class'
print '__module__: ', self.__module__
print 'class: ', self.class
class Autor(object): | |
def __set__(self, instancia, valor): | |
if len(valor.split()) < 2: | |
raise ValueError('Deve ser informado o nome e sobrenome') | |
for nome_atr, valor_atr in instancia.__class__.__dict__.items(): | |
if valor_atr == self: | |
self.nome_atr = '__'+nome_atr | |
setattr(instancia, self.nome_atr, valor) | |
break |
from framework import simulator | |
if __name__=='__main__': | |
print 'oi' |
# -*- coding: utf-8 -*- | |
import os | |
def get_files_tree(root, level=0, stack_on_level={}, show_hidden=False, output=[]): | |
if level==0: | |
print root | |
files = os.listdir(root) |
#I'm using python 2.7.2 | |
>>> def a(b=[]): | |
... b.append('end') | |
... return b | |
... | |
>>> a() | |
['end'] | |
>>> a() | |
['end', 'end'] |