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 click | |
import subprocess | |
import pathlib | |
from dataclasses import dataclass | |
import functools | |
import typing | |
import tabulate | |
import re |
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
# https://github.com/winpython/winpython/releases/download/2.3.20200530/Winpython64-3.7.7.1.exe | |
import glob | |
import os | |
import os.path | |
to_process = ["."] | |
while len(to_process) > 0: | |
item = to_process[0] |
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
Feature: Computing actions to take given a set of policies and a current state | |
Scenario: No policies exist | |
Given there are no policies | |
And there are no existing snapshots | |
And it is monday morning | |
When actions are computed | |
Then there are no actions to perform | |
Scenario: Execute first hourly policy |
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
ROOTKEY="657a48b9-e000-4d9a-b51d-69a0b621c1b9" | |
ROOTTOKEN="57ac8392-1ecc-4e17-9350-c9c866ac832b" | |
curl -v -s -H"X-API-KEY: $ROOTKEY" -H"X-API-TOKEN: $ROOTTOKEN" -H "Content-Type: application/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
#!/usr/bin/env nix-shell | |
#!nix-shell -p jq -i python3 -p python3Packages.requests -p graphviz | |
# NOTE: Edit the dict below to change custom highlight colors for the labels of the nodes/vertices. | |
bgcolors = { "_key": "pink", "thing": "yellow" , "action": "green"} | |
import requests | |
import json | |
import subprocess |
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 nix-shell | |
#!nix-shell -p jq -i python3 -p python3Packages.requests | |
import requests | |
import json | |
import atexit | |
import os | |
import readline |
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 nix-shell | |
#!nix-shell -p jq -i python3 -p python3Packages.requests -p graphviz | |
# NOTE: Edit the dict below to change custom highlight colors for the labels of the nodes/vertices. | |
bgcolors = { "_key": "pink", "thing": "yellow" , "action": "green"} | |
import requests | |
import json | |
import subprocess |
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
from annoy import AnnoyIndex | |
import struct | |
VECTOR_LENGTH = 300 | |
annoy_index = AnnoyIndex(VECTOR_LENGTH) | |
nr_lines = 0 | |
words = [] | |
print("Reading dataset") |
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
Executing with arguments: -k etcd://100.96.6.3:2380 -c mycluster -a -f -x kubernetes | |
Fri Jul 14 10:40:51 UTC 2017 : Running on Linux ip-172-20-58-196 4.4.65-k8s #1 SMP Tue May 2 15:48:24 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux | |
size for /dev/shm is 67100672, less than required 293601280 | |
PXD version: 33cafba6c39c862340a8c30b2677849f67bd2d6a | |
Key Value Store: etcd://100.96.6.3:2380 | |
Using cluster: mycluster | |
Using scheduler: kubernetes | |
/docker-entry-point.sh: line 763: /sys/fs/cgroup/cpu/cpu.rt_runtime_us: Permission denied | |
Failed to enable rt scheduler | |
Checking sysfs mount... |
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
with (import <nixpkgs> {}); | |
let | |
buildGlideDeps = { name, glideYaml, glideLock, sha256 }: | |
stdenv.mkDerivation { | |
inherit name; | |
outputHashAlgo = "sha256"; | |
outputHashMode = "recursive"; | |
outputHash = sha256; |
NewerOlder