Forked from Secret Sam's Pen fiqaI.
A Pen by Captain Anonymous on CodePen.
Forked from Secret Sam's Pen fiqaI.
A Pen by Captain Anonymous on CodePen.
| #! /usr/bin/env python | |
| import os | |
| import sys | |
| import pprint | |
| import subprocess | |
| command = ['bash', '-c', 'source /opt/ros/indigo/setup.bash && env'] | |
| proc = subprocess.Popen(command, stdout=subprocess.PIPE) |
| I have done little hack thing. There could be places where it can be cleaned up a bit. | |
| I Imported 'rosbridge_websocket' tornado app into rostfuls server.py. | |
| * ( make sure that rosbridge websocket python app is on your pythonpath. If you installed rosbridge using apt-get then make sure that | |
| echo $PYTHONPATH shows /opt/ros/indigo/lib/python2.7/dist-packages) | |
| And added rosapi(from rosbridge launchfile) node to the rostfuls launch file. | |
| To launch I'm just launching above edited rostful.launch. The server.py will start rosbridge app. | |
| So any configurations that we do using rosbridge launch file wont work. Port can be selected from rostful launcher. | |
| All the socket urls are placed inside /websocket . So if you try to test websocket thing then do here localhost:port/websocket/ | |
| and rest urls are served from / |
| [bloom] bloom version 0.5.23 | |
| [info] ROS Distro index file associate with commit '63fd877f8fa78317b878f5e3c407f8e9bb22ba57' | |
| [info] New ROS Distro index url: 'https://raw.githubusercontent.com/ros/rosdistro/63fd877f8fa78317b878f5e3c407f8e9bb22ba57/index.yaml' | |
| [error] Specified repository 'pyros' is not in the distribution file located at 'https://raw.githubusercontent.com/ros/rosdistro/63fd877f8fa78317b878f5e3c407f8e9bb22ba57/kinetic/distribution.yaml' | |
| [info] Did you mean one of these: 'ros', 'pyros_test', 'p2os'? | |
| [info] Could not determine release repository url for repository 'pyros' of distro 'kinetic' | |
| [info] You can continue the release process by manually specifying the location of the RELEASE repository. | |
| [info] To be clear this is the url of the RELEASE repository not the upstream repository. | |
| [info] For release repositories on GitHub, you should provide the `https://` url which should end in `.git`. | |
| [info] Here is the url for a typical release repository on GitHub: https://github.com/ros-gbp/rviz-release. |
| #!/usr/bin/env python | |
| from __future__ import absolute_import | |
| from __future__ import print_function | |
| import os | |
| import sys | |
| import time | |
| import signal |
| from __future__ import division | |
| import pytest | |
| import functools | |
| import hypothesis | |
| import hypothesis.strategies as st | |
| def new_canon(secs, nsecs): | |
| # canonical form: nsecs is always positive, nsecs < 1 second |
| from __future__ import absolute_import, division, print_function | |
| # We need to be extra careful with python versions | |
| # Ref : https://docs.python.org/dev/library/importlib.html#importlib.import_module | |
| # Ref : http://stackoverflow.com/questions/67631/how-to-import-a-module-given-the-full-path | |
| import os | |
| import sys | |
| import logging | |
| import contextlib | |
| import importlib |
| @echo off | |
| setlocal enabledelayedexpansion | |
| set /a backoff = 1 | |
| set /a backoff_max = 1 | |
| for /L %%a in (1,1,100) do ( | |
| set /a backoff_max= !backoff_max! *2 | |
| echo !backoff_max! | |
| set /a backoff= %random% %% !backoff_max! |
| import hypothesis | |
| from pydantic import BaseModel, ValidationError, validate_model | |
| import unittest | |
| class Answer(BaseModel): | |
| # Data model of user interface (might be different than data model of Exchange interface) | |
| data: int |
| ```elixir | |
| defmodule AlgaeTest do | |
| @moduledoc """ | |
| From https://wiki.haskell.org/State_Monad | |
| Example use of State monad | |
| Passes a string of dictionary {a,b,c} | |
| Game is to produce a number from the string. | |
| By default the game is off, a C toggles the | |
| game on and off. A 'a' gives +1 and a b gives -1. |