This file contains 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 | |
+++ (clipboard) | |
@@ -1,10 +1,34 @@ | |
#! /usr/bin/env python | |
# coding=utf-8 | |
+# The MIT License (MIT) | |
+# | |
+# Copyright (c) 2010, 2011, 2012, 2013, 2014 Ilya Kulakov | |
+# |
This file contains 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
void create_subscription(..., std::function<void()> callback); | |
void create_subscription(..., std::function<void(const T & message)> callback); | |
create_subscription(..., []() -> void {}); // This is an ambiguous call on Windows. |
This file contains 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
william@farl /tmp/jade | |
% rosinstall_generator desktop_full --deps --tar --rosdistro jade > jade-desktop_full.rosinstall | |
william@farl /tmp/jade | |
% wstool init ./src jade-desktop_full.rosinstall | |
Using initial elements from: jade-desktop_full.rosinstall | |
Writing /private/tmp/jade/src/.rosinstall | |
[actionlib] Fetching https://github.com/ros-gbp/actionlib-release/archive/release/jade/actionlib/1.11.4-0.tar.gz (version actionlib-release-release-jade-actionlib-1.11.4-0) to /private/tmp/jade/src/actionlib | |
[actionlib] Done. | |
[angles] Fetching https://github.com/ros-gbp/geometry_angles_utils-release/archive/release/jade/angles/1.9.10-0.tar.gz (version geometry_angles_utils-release-release-jade-angles-1.9.10-0) to /private/tmp/jade/src/angles |
This file contains 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
% sudo -H python setup.py install | |
running install | |
Checking .pth file support in /Library/Python/2.7/site-packages/ | |
/usr/bin/python -E -c pass | |
TEST PASSED: /Library/Python/2.7/site-packages/ appears to support .pth files | |
running bdist_egg | |
running egg_info | |
writing requirements to src/wstool.egg-info/requires.txt | |
writing src/wstool.egg-info/PKG-INFO | |
writing top-level names to src/wstool.egg-info/top_level.txt |
This file contains 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
# - Find python interpreter | |
# This module finds if Python interpreter is installed and determines where the | |
# executables are. This code sets the following variables: | |
# | |
# PYTHONINTERP_FOUND - Was the Python executable found | |
# PYTHON_EXECUTABLE - path to the Python interpreter | |
# | |
# PYTHON_VERSION_STRING - Python version found e.g. 2.5.2 | |
# PYTHON_VERSION_MAJOR - Python major version found e.g. 2 | |
# PYTHON_VERSION_MINOR - Python minor version found e.g. 5 |
This file contains 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
>>> class A(object): | |
... def __init__(self): | |
... self.__foo = 'bar' | |
... @property | |
... def foo(self): | |
... return self.__foo | |
... | |
>>> a = A() | |
>>> a.foo | |
'bar' |
This file contains 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
repositories: | |
ament/ament_cmake: | |
type: git | |
url: https://github.com/ament/ament_cmake.git | |
version: master | |
ament/ament_lint: | |
type: git | |
url: https://github.com/ament/ament_lint.git | |
version: master | |
ament/ament_package: |
This file contains 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
from phant import Phant | |
from serial import Serial | |
import time | |
p = Phant('XGXqQ3maWluV1vn9xLgQ', 'moisture', private_key='REPLACEMEWITHPRIVATEKEY') | |
s = Serial('COM3') |
This file contains 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
#include <chrono> | |
#include <condition_variable> | |
#include <mutex> | |
const std::chrono::seconds operator "" _s(unsigned long long s) | |
{ | |
return std::chrono::seconds(s); | |
} | |
const std::chrono::duration<long double> operator "" _s(long double s) |
This file contains 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 os | |
import subprocess | |
this_dir = os.path.abspath(os.path.dirname(__file__)) | |
xacro_py_path = os.path.join(this_dir, '..', 'xacro.py') | |
subprocess.call([xacro_py_path, 'arg1', 'arg2']) |