Skip to content

Instantly share code, notes, and snippets.

View oostendo's full-sized avatar

Nate Oostendorp oostendo

View GitHub Profile
[2013-04-09 07:39:21,858: ERROR/MainProcess] Error in timer: ConnectionError('Too many heartbeats missed', None, None, None, '')
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/celery/utils/timer2.py", line 97, in apply_entry
entry()
File "/usr/local/lib/python2.7/dist-packages/celery/utils/timer2.py", line 51, in __call__
return self.fun(*self.args, **self.kwargs)
File "/usr/local/lib/python2.7/dist-packages/celery/utils/timer2.py", line 153, in _reschedules
return fun(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 264, in heartbeat_check
return self.transport.heartbeat_check(self.connection, rate=rate)
from mongoengine import Q
parts = Frame.objects(Q(**{"metadata__Part Number__startswith": "NC"}) | Q(**{"metadata__Part Number__startswith": "OK"}))
symerror = []
for p in parts:
fd = p.features[0].featuredata
symerror.append(abs(fd['transition_length_left_mm'] - fd['transition_length_right_mm']))
print fd['transition_length_left_mm'], " ", fd['transition_length_right_mm']
print "average:", np.sum(symerror) / len(symerror)
def findShaftTransition(self,img,left_guess,right_guess,top_cutoff):
"""
Walk the line on the shaft find where it starts to bulge out
"""
def transformFromROI(roi, points):
return np.array([(p[0] + roi[0], p[1] + roi[1]) for p in points])
right_guess = sorted(right_guess, key = lambda l: l[1]) #make sure it's bottom, top
roi_delta = 50
# -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <codecell>
from random import random
from SimpleCV import Image, Color
from scipy import stats
vendor css:
https://github.com/ingenuitas/SimpleSeer/tree/master/SimpleSeer/static/vendor/styles
our css:
https://github.com/ingenuitas/SimpleSeer/tree/master/SimpleSeer/static/app/styles
our "theme" page (header/footer) and any static image files
https://github.com/ingenuitas/SimpleSeer/tree/master/SimpleSeer/static/app/assets
our templates
{
"cameras": [
{ "id": 0, "name": "Scanner", "scanner": 1 }
],
"web": { "address": "localhost:8080" },
"mongo": { "host" : "127.0.0.1" },
"database": "default",
SimpleSeer.Web: ERROR Exception on /grid/thumbnail_file/4fe47a9c598e1e04a90000f8 [GET]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1504, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1264, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1262, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1248, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
import gc
import SimpleSeer.models as M
@core.state('start')
def start(state):
state.core.set_rate(10.0)
return state.core.state('waitforbuttons')
for v in Image("lenna").findLines()[0].__dict__.values():
try:
for vprime in v:
print type(vprime)
except:
print type(v)
(function(plugin){
var Blob,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
Blob = (function() {
function Blob(inspection) {
this.run = __bind(this.run, this);
this.inspection = inspection;
}