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/python3 | |
from typing import Tuple | |
import sys | |
import time | |
import argparse | |
def parse_args(): | |
parser = argparse.ArgumentParser() | |
parser.add_argument("INTERFACE_NAME", help="Network interface to collect packet statistics for") | |
parser.add_argument("-i", "--interval", type=int, default=1, help="Interval for calculations in secods") |
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
[Unit] | |
Description=Docker service testing facility | |
After=network.target docker.service | |
[Service] | |
Restart=always | |
WorkingDirectory=/srv/tester | |
SyslogIdentifier=%i | |
ExecStart=/usr/bin/docker-compose up --no-color |
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 | |
import argparse | |
import random | |
import sys | |
def gen_key(): | |
random.seed() | |
key = "" | |
for idx in range(32): | |
key += hex(random.randrange(0, 16)).upper()[-1] |
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
package main | |
import "golang.org/x/tour/tree" | |
import "fmt" | |
// Walk walks the tree t sending all values | |
// from the tree to the channel ch. | |
func Walk(t *tree.Tree, ch chan int) { | |
// Recursive Approach | |
if (t.Left != nil) { |