Skip to content

Instantly share code, notes, and snippets.

~/web/meru_env/meru (harvest_photos ✘)✭ ᐅ git push origin harvest_photos
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 584 bytes | 0 bytes/s, done.
Total 4 (delta 3), reused 0 (delta 0)
remote: env: python2: No such file or directory
To maz@localhost:/Library/git/meru.git
! [remote rejected] harvest_photos -> harvest_photos (pre-receive hook declined)
error: failed to push some refs to 'maz@localhost:/Library/git/meru.git'
@mazz
mazz / controller.py
Created November 20, 2016 17:35
zeromq controller
from __future__ import print_function
import uuid
import time
import json
from six.moves import xrange
import zmq
from actors.worker import Worker
from multiprocessing import Process, Event
from pushpull.models import DBSession
@mazz
mazz / worker.py
Created November 20, 2016 17:36
zeromq worker
import uuid
import time
import random
import zmq
class Worker(object):
def __init__(self, stop_event):
self.stop_event = stop_event
self.context = zmq.Context()
@mazz
mazz / ipython_server_log.txt
Created November 20, 2016 21:07
ipython_server_log
(sauna1_env)➜ pic2pic ipython --version
3.2.3
(sauna1_env)➜ michaelkhanna@gmail.com cat notebook.stderr.log
Starting notebook, daemon True
Starting with context {'websocket_url': 'ws://localhost:40000', 'greeting': '\n\nAvailable variables and functions:\n\n* **app** - The [WSGI application](http://docs.pylonsproject.org/docs/pyramid/en/latest/api/paster.html?highlight=wsgi%20application#pyramid.paster.get_app) object generated by bootstrapping.\n* **request** - A [pyramid.request.Request](http://docs.pylonsproject.org/projects/pyramid/en/latest/api/request.html#pyramid.request.Request) object implying the current request state for your script.\n* **root** - The resource [root](http://docs.pylonsproject.org/docs/pyramid/en/latest/glossary.html#term-root) of your Pyramid application. This is an object generated by the [root factory](http://docs.pylonsproject.org/docs/pyramid/en/latest/glossary.html#term-root-factory) configured in your application.\n* **registry** - The application [registry](http://docs.py
@mazz
mazz / gist:ba897d5adcb93aaa8090a83cd6132caf
Created November 20, 2016 21:10
ipython server log 2
(sauna1_env)➜ pic2pic cat /tmp/pyramid_notebook/michaelkhanna@gmail.com/notebook.stderr.log
Starting notebook, daemon True
Starting with context {'greeting': '\n\nAvailable variables and functions:\n\n* **app** - The [WSGI application](http://docs.pylonsproject.org/docs/pyramid/en/latest/api/paster.html?highlight=wsgi%20application#pyramid.paster.get_app) object generated by bootstrapping.\n* **request** - A [pyramid.request.Request](http://docs.pylonsproject.org/projects/pyramid/en/latest/api/request.html#pyramid.request.Request) object implying the current request state for your script.\n* **root** - The resource [root](http://docs.pylonsproject.org/docs/pyramid/en/latest/glossary.html#term-root) of your Pyramid application. This is an object generated by the [root factory](http://docs.pylonsproject.org/docs/pyramid/en/latest/glossary.html#term-root-factory) configured in your application.\n* **registry** - The application [registry](http://docs.pylonsproject.org/docs/pyramid/en/latest/glossary.html#term-a
@mazz
mazz / gist:b31fb5a89605548868a91abb91f8faf8
Created December 11, 2016 05:17
websauna mac stacktrace
(saunaenv)➜ xact ws-alembic -c conf/development.ini -x packages=all revision --auto -m "Initial migration"
Traceback (most recent call last):
File "/Users/maz/tmp/.sidha/files.noindex/websaunaproj/saunaenv/bin/ws-alembic", line 9, in <module>
load_entry_point('websauna==1.0a3', 'console_scripts', 'ws-alembic')()
File "/Users/maz/tmp/.sidha/files.noindex/websaunaproj/saunaenv/lib/python3.5/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Users/maz/tmp/.sidha/files.noindex/websaunaproj/saunaenv/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
return ep.load()
File "/Users/maz/tmp/.sidha/files.noindex/websaunaproj/saunaenv/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2355, in load
return self.resolve()
@mazz
mazz / gist:7271625e3d312bc93e80e0f29fabfa71
Created December 14, 2016 04:01
websauna: KeyError: 'full_name'
[22:57:07] [pyramid_debugtoolbar toolbar_tween] Exception at http://localhost:6543/admin/models/user/listing
traceback url: http://localhost:6543/_debug_toolbar/exception?tb=4433257752&token=6227245c7864365c7863355c7865365c7839355c7839345c786362634e5c78313427
Traceback (most recent call last):
File "/Users/maz/webapp/websauna_env/lib/python3.5/site-packages/sqlalchemy/ext/indexable.py", line 313, in fget
value = column_value[self.index]
KeyError: 'full_name'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
@mazz
mazz / gist:62db05300db5e5e6da0e0e5382e2484b
Created December 16, 2016 04:17
notebook has password by default
http://localhost:6543/notebook/login?next=%2Fnotebook%2Fnotebooks%2Fdefault-1589979049.ipynb
@mazz
mazz / gist:cff857a8ad3cba902e3f6c9c4b43530d
Created December 17, 2016 04:39
notebook.stderr.log
maz@maz-alpha:/tmp/pyramid_notebook/foo@bar.com$ cat notebook.stderr.log
Starting notebook, daemon True
Starting with context {'extra_template_paths': ['/home/maz/webapp/websauna/lib/python3.5/site-packages/pyramid_notebook/server/templates'], 'jinja_environment_options': {}, 'allow_origin': 'http://localhost:6543', 'context_hash': 1484605921, 'http_port': 40008, 'websocket_url': 'ws://localhost:40008', 'greeting': '\n\nAvailable variables and functions:\n\n* **app** - The [WSGI application](http://docs.pylonsproject.org/docs/pyramid/en/latest/api/paster.html?highlight=wsgi%20application#pyramid.paster.get_app) object generated by bootstrapping.\n* **request** - A [pyramid.request.Request](http://docs.pylonsproject.org/projects/pyramid/en/latest/api/request.html#pyramid.request.Request) object implying the current request state for your script.\n* **root** - The resource [root](http://docs.pylonsproject.org/docs/pyramid/en/latest/glossary.html#term-root) of your Pyramid application. This is an object generat