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 argparse | |
| import json | |
| import uuid | |
| import pika | |
| import requests | |
| import time | |
| def pretty_print_dict(d): |
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 uuid | |
| import pika | |
| import requests | |
| AMQP_URL = "amqp://guest:guest@localhost/" | |
| AMQP_EXCHANGE = "amq.topic" | |
| AMQP_QUEUE_NAME = "armour_bridge" | |
| # First we create a session using the REST API of the orchestrator |
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 | |
| # -*- coding: utf-8 -*- | |
| # Note: To use the 'upload' functionality of this file, you must: | |
| # $ pip install twine | |
| import io | |
| import os | |
| import sys | |
| from shutil import rmtree |
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
| """ | |
| HDLC framing module. | |
| """ | |
| import logging | |
| log = logging.getLogger(__name__) | |
| class HDLCException(Exception): |
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
| Mettre les references dans autres travaux | |
| Mentionner toutes les contributions dès le début | |
| Faire plus d'images | |
| strobing un seul b | |
| d'abord le contexte et après le sommaire |
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 pika | |
| # Open a connection to RabbitMQ on localhost using all default parameters | |
| connection = pika.BlockingConnection(pika.URLParameters("amqp://JJLCGMV3:BZ1LVK05@finterop-mq.noc.onelab.eu:443/8daf40a5-8ba4-40fd-b583-e05abf6c7e09")) | |
| # Open the channel | |
| channel = connection.channel() | |
| # Declare the queue | |
| channel.queue_declare(queue="test", durable=True, exclusive=False, auto_delete=False) |
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 python3.5 | |
| import pika | |
| import json | |
| amqp_url = "amqp://f-interop:Cowabunga@finterop-mq.noc.onelab.eu:443/41da2270-5c3a-468b-a532-4e39beb8342c" | |
| question = { | |
| "_api_version": "0.1.32", | |
| "_type": "testcoordination.step.verify.execute", | |
| "description": "Please execute TD_COAP_CORE_01_v01_step_04", |
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 subprocess | |
| import sys | |
| import json | |
| your_command = ["tshark", "-T", "ek", "-x", "-i", "tun0"] | |
| process = subprocess.Popen(your_command, stdout=subprocess.PIPE) | |
| for line in iter(process.stdout.readline, ''): | |
| # We remove blank lines with strip | |
| if line.strip(): | |
| d = json.loads(line) |
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 zmq | |
| context = zmq.Context() | |
| subscriber = context.socket(zmq.SUB) | |
| subscriber.connect("tcp://localhost:50002") | |
| subscriber.setsockopt(zmq.SUBSCRIBE, "") | |
| while True: | |
| string = subscriber.recv_json() |
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 zmq | |
| zmq_inject_port = 60000 | |
| d = {"signal": "cmdToMote", | |
| "data": {"action": ["imageCommand", "6pAdd", "[8,9]"], | |
| "serialPort": "emulated2"}, | |
| "sender": "mySender"} | |
| context = zmq.Context() | |
| publisher = context.socket(zmq.REQ) | |
| publisher.connect("tcp://localhost:%d" % zmq_inject_port) |