sqlalchemy.orm.exc.UnmappedClassError: Class 'lxneng.models.user.User' is not mapped
fix
| has_virtualenv() { | |
| if [ -e .venv ]; then | |
| workon `cat .venv` | |
| fi | |
| } | |
| venv_cd () { | |
| cd "$@" && has_virtualenv | |
| } | |
| alias cd="venv_cd" |
| :%s/\r//g |
| #!/usr/bin/python | |
| import smtpd | |
| import email | |
| import asyncore | |
| from boto.ses import SESConnection | |
| class AmazonSMTPServer(smtpd.SMTPServer): | |
| amazonSES = SESConnection() |
| >>> import math | |
| >>> a = (1,1) | |
| >>> b = (1,2) | |
| >>> math.sqrt((b[0] - a[0])**2 + (b[1] - a[1]) ** 2) | |
| 1.0 |
| ~ mkvirtualenv -p /usr/local/Cellar/pypy/1.6.0/bin/pypy pypy |
| pip install python_dateutil==1.5 |
| tips | |
| ======= | |
| rvm install 1.9.3 --with-gcc=clang | |
| session.query(User).filter_by(id=123).update({"name": u"Bob Marley"}) |