Skip to content

Instantly share code, notes, and snippets.

View remyleone's full-sized avatar
🥑
Working on { Ansible , Packer , Terraform , CLI, SDKs }

Rémy Léone remyleone

🥑
Working on { Ansible , Packer , Terraform , CLI, SDKs }
View GitHub Profile
import argparse
import json
import uuid
import pika
import requests
import time
def pretty_print_dict(d):
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
# !/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
"""
HDLC framing module.
"""
import logging
log = logging.getLogger(__name__)
class HDLCException(Exception):
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
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)
#!/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",
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)
#!/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()
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)