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 | |
| """Offline, dependency-free DGX Spark hardware sanity check. | |
| Uses only Python's standard library and Linux kernel interfaces. If present, | |
| the NVIDIA driver utility ``nvidia-smi`` is queried as an optional source of | |
| GPU information. It never downloads data or sends any telemetry. | |
| Examples: | |
| python3 verify_dgx_spark.py | |
| python3 verify_dgx_spark.py --json |
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
| brew install tinyproxy | |
| tinyproxy -c /usr/local/etc/tinyproxy/tinyproxy.conf -d | |
| Tests: | |
| NO AUTH | |
| curl -iv --noproxy "*" --location http://www.google.com | |
| AUTH FAIL |
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
| function setRelAttribute() { | |
| const elems = document.body.getElementsByTagName('a'); | |
| for (let i = 0; i < elems.length; i++) { | |
| const elem = elems[i]; | |
| elem.setAttribute('rel', 'noopener noreferrer nofollow'); | |
| } | |
| } | |
| const ready = (callback) => { | |
| if (document.readyState !== 'loading') callback(); |
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
| function generaTemplate (strings, ...keys) { | |
| return function(data) { | |
| let temp = strings.slice(); | |
| keys.forEach((key, i) => { | |
| temp[i] = temp[i] + data[key]; | |
| }); | |
| return temp.join(''); | |
| } | |
| } |
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
| #%RAML 1.0 Library | |
| traits: | |
| FilterableByPrice: | |
| queryParameters: | |
| priceLessThen?: | |
| type: number | |
| priceMoreThen?: | |
| type: number | |
| resourceTypes: |
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
| var express = require('express'); | |
| var app = express(); | |
| var q = require('q'); | |
| function retryingPromise(fn, cfg, times) { | |
| var counter = 0; | |
| var delay = 0; | |
| var _times = times ? times : 2; | |
| var _step = _step ? step : 1000; | |
| var _cfg = cfg ? cfg : {}; |