Wednesday, February 26, 2014

New user notes on using Celery with python

I'm a totally new user using Celery in python. Here are my notes:

My celery_test.py file:
 
from celery import Celery
import time
app = Celery('tasks', broker='amqp://guest@localhost//')
@app.task
def add(x, y):
    time.sleep(5)
    return x + y



celery -A celery_test worker --loglevel=info
A command like this at the terminal reads the stuff in celery_test.py where you have @app.task decorators on functions. The server will then run the function when you do this from any python intepreter:

>>> from celery_test import *
>>> add.delay(100, 200)

By the way:After modifying the add function, I had to update Celery by killing this process and running it again:
celery -A celery_test worker --loglevel=info

Tuesday, February 25, 2014

Evolutionary underpinning of spirituality

Although we've discussed before, I feel like now there's stronger clarity about why humans are spiritual... because it's valuable to encode arbitrary beliefs... but very difficult if there is no spiritual component to the mind. "Religiosity" is a parameter nature sets genetically (that's been studied). I figure if it's too high the individual can loose track of reality (reducing fitness), too low and the individual has trouble carrying belief systems (closer to my end of the spectrum) (also reducing fitness).

Good businesses are formed at a particular point

Good businesses are formed at a particular point when they are incrementally solving problem. Not so far advanced that it doesn't fit the current system. Not so old that it's no longer relevant.

World changing ideas are not from individuals


A human is a function of inputs and outputs. Inputs are the state of humanity. Outputs feed into the state of humanity. At a certain point, influential ideas can be developed. At a certain point, influential ideas can take effect.


Formulating an idea:
When an idea is ripe, it's common for multiple people to discover it at similar times. No one individual is responsible.

An idea taking effect:
World changing ideas are selected from individuals by the present population. Individuals write the stuff down, but they don't choose that is accepted. For example whoever wrote the bible put some words on paper. Writing down initial thoughts is an important step, however, the steps that follow, the choices that people make after that, whether to read it or not are what decide if it is world changing. It's likely that if one individual were removed, some other similar option would often be adopted in its place. Like if you took all of the McDonalds out of a city, the Burger Kings would probably fill a similar role.





Monday, February 24, 2014

Decentralized Peace

Not a centralized power, but rather a decentralized belief that human life is valuable. This belief could bring world peace.

Dollar bills

Dollar bills have whatever value people believe they have. The same is true for human life. If people begin to value human life highly, universally, war will cease.

War is programmed into humans

Conflict with the middle east is a conflict between two ways of living. Humans in tribal society were programs in such a way that they will converge on a final solution, the most successful survival strategy. They war until only one remains. Religion is a formalized manifestation of this system, thought it often exists without religious consideration (for example, communist vs. capitalist.)