Skip to content

Instantly share code, notes, and snippets.

View sandlbn's full-sized avatar

Marcin Spoczynski sandlbn

  • Intel Labs
  • Portland, Oregon
View GitHub Profile
(H, W) = image.shape[:2]
info = [("Moving","x{0} y{1}".format(10, 20))]
for (i, (k, v)) in enumerate(info):
text = "{}: {}".format(k, v)
cv2.putText(image, text, (10, H - ((i * 20) + 20)),
cv2.FONT_HERSHEY_SIMPLEX, 0.6, (0, 0, 255), 2)
cv2.imshow("Frame", image)
key = cv2.waitKey(2) & 0xFF
#!/usr/bin/env python3
import sys, serial, struct
import cv2
import numpy as np
import time
import os
from time import sleep
move = True
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tutorial on using the InfluxDB client."""
import argparse
from datetime import datetime
from influxdb import InfluxDBClient
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"version":1,
"schedule":{
"type":"simple",
"interval":"5s"
},
"workflow":{
"collect":{
"metrics":{
"/intel/rdt/*":{
{"network-topology":{"topology":[{"topology-id":"hwvtep:1"},{"topology-id":"flow:1","node":[{"node-id":"openflow:127652387222402","opendaylight-topology-inventory:inventory-node-ref":"/opendaylight-invent
ory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:127652387222402']","termination-point":[{"tp-id":"openflow:127652387222402:LOCAL","opendaylight-topology-inventory:inventory-node-
connector-ref":"/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:127652387222402']/opendaylight-inventory:node-connector[opendaylight-inventory:id='openflow:12
7652387222402:LOCAL']"}]},{"node-id":"openflow:202781742083178","opendaylight-topology-inventory:inventory-node-ref":"/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='o
penflow:202781742083178']","termination-point":[{"tp-id":"openflow:202781742083178:LOCAL","opendaylight-topology-inventory:inventory-node-connector-ref":"/opendaylight-inventory:nodes/opendaylight-invento
<network-topology xmlns="urn:TBD:params:xml:ns:yang:network-topology"><topology><topology-id>hwvtep:1</topology-id></topology><topology><topology-id>flow:1</topology-id></topology><topology><topology-id>ovsdb:1</topology-id><node><node-id>ovsdb://uuid/d8042016-e4f8-4ef1-99eb-0a2bf5d0ed52/bridge/br-ex</node-id><protocol-entry xmlns="urn:opendaylight:params:xml:ns:yang:ovsdb"><protocol>ovsdb-bridge-protocol-openflow-13</protocol></protocol-entry><fail-mode xmlns="urn:opendaylight:params:xml:ns:yang:ovsdb">ovsdb-fail-mode-secure</fail-mode><managed-by xmlns="urn:opendaylight:params:xml:ns:yang:ovsdb" xmlns:a="urn:TBD:params:xml:ns:yang:network-topology">/a:network-topology/a:topology[a:topology-id='ovsdb:1']/a:node[a:node-id='ovsdb://uuid/d8042016-e4f8-4ef1-99eb-0a2bf5d0ed52']</managed-by><bridge-name xmlns="urn:opendaylight:params:xml:ns:yang:ovsdb">br-ex</bridge-name><bridge-other-configs xmlns="urn:opendaylight:params:xml:ns:yang:ovsdb"><bridge-other-config-key>disable-in-band</bridge-other-config-key><bridge
neutron security-group-list
+--------------------------------------+---------+----------------------------------------------------------------------+
| id | name | security_group_rules |
+--------------------------------------+---------+----------------------------------------------------------------------+
| 466632c6-4990-4937-ae3e-ce67f0014b12 | default | egress, IPv4 |
| | | egress, IPv4, 22/tcp |
| | | egress, IPv4, 80/tcp |
| | | egress, IPv4, icmp |
| | | egress, IPv6 |
|
OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0x8000000, duration=31922.137s, table=0, n_packets=464, n_bytes=48117, priority=4,in_port=2 actions=write_metadata:0x10000000000/0xffffff0000000001,goto_table:17
cookie=0x8000000, duration=31817.960s, table=0, n_packets=134703, n_bytes=11712074, priority=1,in_port=1 actions=write_metadata:0x20000000001/0xffffff0000000001,goto_table:17
cookie=0x8000000, duration=31644.375s, table=0, n_packets=283, n_bytes=32081, priority=4,in_port=3 actions=write_metadata:0x30000000000/0xffffff0000000001,goto_table:17
cookie=0x8000000, duration=31210.380s, table=0, n_packets=58, n_bytes=4989, priority=4,in_port=4 actions=write_metadata:0x40000000000/0xffffff0000000001,goto_table:17
cookie=0x8000001, duration=31887.912s, table=17, n_packets=455, n_bytes=47391, priority=5,metadata=0x10000000000/0xffffff0000000000 actions=write_metadata:0x60000100000222e0/0xfffffffffffffffe,goto_table:19
cookie=0x8040000, duration=31887.911s, table=17, n_packets=348, n_bytes=34219, priority=6,metad
OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0x8000000, duration=31922.137s, table=0, n_packets=464, n_bytes=48117, priority=4,in_port=2 actions=write_metadata:0x10000000000/0xffffff0000000001,goto_table:17
cookie=0x8000000, duration=31817.960s, table=0, n_packets=134703, n_bytes=11712074, priority=1,in_port=1 actions=write_metadata:0x20000000001/0xffffff0000000001,goto_table:17
cookie=0x8000000, duration=31644.375s, table=0, n_packets=283, n_bytes=32081, priority=4,in_port=3 actions=write_metadata:0x30000000000/0xffffff0000000001,goto_table:17
cookie=0x8000000, duration=31210.380s, table=0, n_packets=58, n_bytes=4989, priority=4,in_port=4 actions=write_metadata:0x40000000000/0xffffff0000000001,goto_table:17
cookie=0x8000001, duration=31887.912s, table=17, n_packets=455, n_bytes=47391, priority=5,metadata=0x10000000000/0xffffff0000000000 actions=write_metadata:0x60000100000222e0/0xfffffffffffffffe,goto_table:19
cookie=0x8040000, duration=31887.911s, table=17, n_packets=348, n_bytes=34219, priority=6,metad