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
#!/bin/bash | |
set -ex | |
MACHINENAME=$1 | |
SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd) | |
SCRIPT_SIGN=created_by_$(basename "${BASH_SOURCE[0]}" .sh) | |
# Download debian.iso |
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
```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. |
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 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 |
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
@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! |
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 __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 |
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 __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 |
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 | |
from __future__ import absolute_import | |
from __future__ import print_function | |
import os | |
import sys | |
import time | |
import signal |
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
[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. |
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
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 / |
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 | |
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) |
NewerOlder