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
opkg update | |
opkg list-upgradable | cut -f 1 -d ' ' | xargs opkg upgrade |
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
npm install ajv @types/ajv --save-dev |
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
## Step 1. Setup VSCode project build and debug configuration. | |
Under the `.vscode` folder create 'launch.json` and 'tasks.json` files. The contents of both files is shown below. | |
a. launch.json | |
``` | |
{ | |
// Use IntelliSense to learn about possible Node.js debug attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 |
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
# Based on code sample at: http://www.marinamele.com/7-tips-to-time-python-scripts-and-control-memory-and-cpu-usage | |
# Decorator "fn_timer" which times a function and has argument "class-name". | |
def fn_timer(class_name): | |
def _fn_timer(function): | |
@wraps(function) | |
def function_timer(*args, **kwargs): | |
t0 = time.time() | |
result = function(*args, **kwargs) | |
t1 = time.time() |