dane-tool / dane

🐳📡🐶 Generate network communication data for target tasks in diverse network conditions.
https://dane-tool.github.io/dane/
MIT License
4 stars 2 forks source link

Ability to run custom behavior scripts! #6

Closed parkeraddison closed 3 years ago

parkeraddison commented 3 years ago

To have the client run a custom behavior script, add a Python file to scripts/custom/filename.py, add any pip requirements to scripts/custom/requirements.txt, and configure the behavior to be "custom/filename.py".

Example:

# scripts/custom/euler.py

import numpy as np
print(np.real(np.exp(1j * np.pi)))
# scripts/custom/requirements.txt

numpy
# config.json

{
  "behaviors": [
    "custom/euler.py",
    "..."
  ],
  "..."
}