Skip to content

Instantly share code, notes, and snippets.

Avatar

Travis Vachon travis

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am travis on github.
  • I am tvachon (https://keybase.io/tvachon) on keybase.
  • I have a public key whose fingerprint is D776 98DB FE44 F081 E1DF 25AE 6A7B 3128 E72C 822A

To claim this, I am signing this object:

View gist:9899061
👻 lein cljsbuild once
Mar 31, 2014 2:32:38 PM org.apache.http.impl.client.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.NoRouteToHostException) caught when connecting to the target host: No route to host
Mar 31, 2014 2:32:38 PM org.apache.http.impl.client.DefaultRequestDirector tryConnect
INFO: Retrying connect
View gist:9798738
(defn watchable-projects [user]
(go-catch
(let [accessible-projects-query-ch
(accessible-projects-query user)
watched-projects-ch
(watched-projects user)
accessible-projects-ch
(parse/find (<? accessible-projects-query-ch))]
View gist:9798733
function watchableProjects (user, callbacks) {
var diff, accessibleProjects, watchedProjects;
createAccessibleProjectsQuery(function(accessibleProjectsQuery) {
findAccessibleProjects(function(ap){
accessibleProjects = ap;
diff();
});
});
findWatchedProjects(function(wp){
View gist:9256435
(extend-type ParseObject
ILookup
(-lookup [obj key]
(case key
:id (.-id obj)
;; wrap dates so they're easier to serialize
:createdAt (js/Date. (.-createdAt obj))
:updatedAt (js/Date. (.-updatedAt obj))
(.get obj (name key))))
View gist:9118548
# /*****************************************************************************************
# * Name : Fast object tracking using the OpenCV library *
# * Author : Lior Chen <chen.lior@gmail.com> *
# * Notice : Copyright (c) Jun 2010, Lior Chen, All Rights Reserved *
# * : *
# * Site : http://www.lirtex.com *
# * WebPage : http://www.lirtex.com/robotics/fast-object-tracking-robot-computer-vision *
# * : *
# * Version : 1.0 *
# * Notes : By default this code will open the first connected camera. *
View gist:9034323
#!/usr/bin/python
# -*- coding: utf-8 -*-
from opencv.cv import *
from opencv.highgui import *
from threading import Thread
#import serial
class RobotVision:
cvSize size
cvImage hsv_frame, thresholded, thresholded2
View gist:9034011
# this uses openvc's hough circles detection to find circles in the image
# http://docs.opencv.org/modules/imgproc/doc/feature_detection.html?highlight=cvhoughcircles#houghcircles
circles = cvHoughCircles(thresholded, storage, CV_HOUGH_GRADIENT, 2, thresholded.height/4, 100, 40, 20, 200)
# find largest circle
maxRadius = 0
x = 0
y = 0
found = False
for i in range(circles.total):
View gist:9033852
/*****************************************************************************************
* Name : Fast object tracking using the OpenCV library *
* Author : Lior Chen <chen.lior@gmail.com> *
* Notice : Copyright (c) Jun 2010, Lior Chen, All Rights Reserved *
* : *
* Site : http://www.lirtex.com *
* WebPage : http://www.lirtex.com/robotics/fast-object-tracking-robot-computer-vision *
* : *
* Version : 1.0 *
View gist:8671213
(.get "/builds"
(->
(fn [request response]
(go
(try
(let [user (<? (fetch (express/current-user)))
builds (<? (domain/recent-builds user))]
(.send response 200 (str (map #(parse-object-map % [:id]) builds))))
(catch :default e
(log-exception e)