Readable, solid code is our livelihood and a matter of professional courtesy. The code is not yours to maintain, it is everybody's. Others will have to read it. Don't make your coworkers lose a day debugging your code just because you were undisciplined.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import cv2 | |
import argparse | |
import os | |
import subprocess | |
parser = argparse.ArgumentParser() | |
parser.add_argument('dev', help='video device') | |
parser.add_argument('out', help='output folder') | |
args = parser.parse_args() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Licensed to the Apache Software Foundation (ASF) under one | |
// or more contributor license agreements. See the NOTICE file | |
// distributed with this work for additional information | |
// regarding copyright ownership. The ASF licenses this file | |
// to you under the Apache License, Version 2.0 (the | |
// "License"); you may not use this file except in compliance | |
// with the License. You may obtain a copy of the License at | |
// http://www.apache.org/licenses/LICENSE-2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ecto | |
import numpy as np | |
class ClusterDetector(ecto.Cell): | |
def declare_params(self, params): | |
params.declare("n", "Max number of clusters.", 10) | |
def declare_io(self, params, inputs, outputs): | |
outputs.declare("clusters", "Clusters output. list of tuples", []) | |
def process(self, inputs, outputs): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ecto | |
class FanCell(ecto.Cell): | |
def declare_params(self, p): | |
p.declare("N", "number of outputs", 3) | |
def declare_io(self, p, i, o): | |
for i in range(p.N): | |
o.declare("out%d"%i, "output %d"%i, None) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import ecto | |
from ecto_opencv.highgui import imshow | |
from image_pipeline.io.source import create_source | |
import sys | |
import argparse | |
from ecto_opencv import cv_bp | |
import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WORKSPACE=`pwd` | |
distro_url=https://raw.github.com/willowgarage/rosdistro/master/fuerte.yaml | |
curl -s $distro_url > distro.yaml | |
deburls=$(python -c "import yaml; print '\n'.join([x['url'] for x in yaml.load(open('distro.yaml'))])") | |
cd $WORKSPACE | |
for x in $deburls | |
do | |
dirname=$(basename ${x%.git}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >' | |
what(): mutex: Invalid argument | |
Program received signal SIGABRT, Aborted. | |
0x00007ffff51f8a75 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 | |
64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. | |
in ../nptl/sysdeps/unix/sysv/linux/raise.c | |
(gdb) bt | |
#0 0x00007ffff51f8a75 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 | |
#1 0x00007ffff51fc5c0 in *__GI_abort () at abort.c:92 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
meta: | |
package: ecto | |
description-brief: Ecto | |
description-full: 'A framework for creation of pipelines.' | |
homepage: http://ecto.willowgarage.com | |
maintainer: Ethan Rublee [email protected] | |
variations: [release, debug, cuda] | |
dependencies: | |
rosdeps: | |
urls: |
NewerOlder