Skip to content

Instantly share code, notes, and snippets.

View pdxjohnny's full-sized avatar
🐢
Rolling Alice...

John Andersen pdxjohnny

🐢
Rolling Alice...
View GitHub Profile
@pdxjohnny
pdxjohnny / actions_by_verified_creators.json
Last active September 7, 2023 22:08
GitHub Actions from Verified Creators
[
"https://github.com/actions/first-interaction",
"https://github.com/actions/stale",
"https://github.com/actions/download-artifact",
"https://github.com/actions/upload-artifact",
"https://github.com/actions/setup-node",
"https://github.com/actions/cache",
"https://github.com/actions/setup-java",
"https://github.com/actions/setup-go",
"https://github.com/actions/setup-dotnet",
This file has been truncated, but you can view the full file.
{
"title": "Alice Engineering Comms \ud83e\udeac",
"comments": [
{
"body": "# 2022-07-18 Engineering Logs\r\n\r\n- TODO\r\n - [x] @aliceoa, @pdxjohnny: Kick off OSS scans\r\n - Targeting collaboration with CRob on metrics insertion to OpenSSF DB\r\n - [ ] @pdxjohnny: Finish Q3 plans (Gantt chart, meeting templates, etc.)\r\n - Generate template for auto creation to fill every meeting / fillable pre-meeting",
"replies": [
{
"body": "## 2022-07-18 @pdxjohnny Engineering Logs\r\n\r\n- TODO\r\n - [x] Kick off OSS scans\r\n - Targeting collaboration with CRob on metrics insertion to OpenSSF DB\r\n - [ ] Finish Q3 plans (Gantt chart, meeting templates, etc.)\r\n - Generate template for auto creation to fill every meeting / fillable pre-meeting\r\n- Future\r\n - Engage with Loihi community\r\n - See what we can do here, not sure yet, play with system context / mitigation inference in devcloud?\r\n - https://www.intel.com/content/www/us/en/research/neuromor
@pdxjohnny
pdxjohnny / dffml_auto_gen_static_code.diff
Created August 30, 2023 03:27
dffml: auto gen static code
diff --git a/dffml/df/base.py b/dffml/df/base.py
index 0819cb7e3..9cc7d6aea 100644
--- a/dffml/df/base.py
+++ b/dffml/df/base.py
@@ -601,6 +601,7 @@ def op(
),
},
)
+ func.imp.func = func
return func
python -uc "import sys, pathlib; list([path.write_bytes('\n'.join([str(line if not 'AutoUpdateBehavior' in line else line.replace('0', '2')) for line in path.read_text().split('\n')]).encode()) for path in pathlib.Path(sys.argv[-1]).glob('*.acf')])" 'C:\Program Files (x86)\Steam\steamapps'
@pdxjohnny
pdxjohnny / debug-race-contdition.diff
Created June 15, 2023 19:26
dffml: Debug race condition
diff --git a/dffml/df/memory.py b/dffml/df/memory.py
index fae38d786..10eed34b8 100644
--- a/dffml/df/memory.py
+++ b/dffml/df/memory.py
@@ -381,6 +381,9 @@ class MemoryInputNetworkContext(BaseInputNetworkContext):
self.ctxhd[handle_string].by_origin[item.origin] = []
# Add input to by origin set
self.ctxhd[handle_string].by_origin[item.origin].append(item)
+ # self.logger.getChild("add()").debug("self.ctxhd[%r].by_origin[%r].append(%r)", handle_string, item.origin, item)
+
@pdxjohnny
pdxjohnny / d1283f6564423ed1a08713deffbd6ab38a4cdcee..fb8a7b92c52aaccf3fae2821235472686b3576a9.py.diff
Last active June 6, 2023 15:16
$ git diff d1283f6564423ed1a08713deffbd6ab38a4cdcee fb8a7b92c52aaccf3fae2821235472686b3576a9^ '**/*.py' https://github.com/intel/dffml
diff --git a/dffml/df/memory.py b/dffml/df/memory.py
index aaddea98a..fae38d786 100644
--- a/dffml/df/memory.py
+++ b/dffml/df/memory.py
@@ -1975,7 +1975,8 @@ class MemoryOrchestratorContext(BaseOrchestratorContext):
output = {}
async for operation, results in self.run_stage(ctx, Stage.OUTPUT):
output.setdefault(operation.instance_name, {})
- output[operation.instance_name].update(results)
+ if results is not None:
@pdxjohnny
pdxjohnny / httptest.layout.yaml
Created May 4, 2023 18:22
https://github.com/in-toto/layout-web-tool/ for httptest @ c8f1255449265d9c8f20fe11c2112c62753ec769
signatures:
- keyid: 063c3a1cebf7400ace39d5c71cb4dc886eddca77546b410f494f55c4bc2113f1
sig: 3f32cbf4beead062df159136928033b36bc90ca6824bd20c994d766616d17710dbd2b7acb4eb9719337a809544f0149e5a99cbeb266fceaa00c0abd6e6bf409ed8ce81aab4b3cb29b6fc6c3499f30b323b1915a9340bea5d1029ff675d5292d56397acac4fcbb5b8f5f6192ba8d404268347622b651b9412e3fa61195ab19f0335586e99d7e0357a65d7a9db6b0b09b25b5edc1b4554e0a3701d90fbad041ffe126a509b59703e7dc1135aec34b7f33c09ade50ed2faad097c13ee950ff3241ff2e99ab18db457a6cbd3e3ebe24ad6d064abd2970c53b008389baf8ebaec89dc6cb9956f526a60284059ad20d8ca98af2bc728e91a4a341dbed6f515cc0bc8f79b3a239c576128cdca3a820697b8d027eaae405801509196c6ed59e87704129a7004ad153e533b9d5fe5ea718e659e88bb144c68e24fd01b3110b8e65742e3c019d77d41d77798ad996953f30aa1fdc1b4235cb1372219097e11d971b04422277221e04acd866107477f756e5ac192fce2745375eee9faf38030554f2e985ad5
signed:
_type: layout
expires: '2023-06-04T13:12:20Z'
inspect:
- _type: inspection
expected_materials:
- - MATCH
graph TD
    subgraph bob_forge
      bob_scitt[Bob: SCITT]
      bob_activitypub[Bob: ActivityPub or Heartwood]
      bob_scitt -->|convert to endor| bob_activitypub
      bob_activitypub --> bob_online_clone_hook_scitt_changes

      bob_cool_software
      bob_cool_software --> bob_cool_software_releaseasset_v1_0_0
diff --git a/examples/tutorials/rolling_alice/federated_forge/alice_and_bob/docker-compose.yml b/examples/tutorials/rolling_alice/federated_forge/alice_and_bob/docker-compose.yml
index f7a0ab469..7ca20fbd9 100644
--- a/examples/tutorials/rolling_alice/federated_forge/alice_and_bob/docker-compose.yml
+++ b/examples/tutorials/rolling_alice/federated_forge/alice_and_bob/docker-compose.yml
@@ -40,3 +40,8 @@ services:
ports:
- "3000:3000"
- "3022:2222"
+
+ # https://github.com/scitt-community/scitt-api-emulator
@pdxjohnny
pdxjohnny / gist:def5fbff5b1603ee0e2ff6e39eff3132
Created March 24, 2023 15:29
java -ea -server -Duser.timezone=UTC -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g python-fastapi -i ../traceability-interop/docs/openapi/openapi.json -o python-fastapi-traceability-interop
[main] INFO o.o.codegen.DefaultGenerator - Generating with dryRun=false
[main] INFO o.o.c.ignore.CodegenIgnoreProcessor - Output directory (/home/johnsa1/openapi-generator/python-fastapi-traceability-interop) does not exist, or is inaccessible. No file (.openapi-generator-ignore) will be evaluated.
[main] INFO o.o.codegen.DefaultGenerator - OpenAPI Generator: python-fastapi (server)
[main] INFO o.o.codegen.DefaultGenerator - Generator 'python-fastapi' is considered beta.
[main] INFO o.o.c.l.AbstractPythonCodegen - Environment variable PYTHON_POST_PROCESS_FILE not defined so the Python code may not be properly formatted. To define it, try 'export PYTHON_POST_PROCESS_FILE="/usr/local/bin/yapf -i"' (Linux/Mac)
[main] INFO o.o.c.l.AbstractPythonCodegen - NOTE: To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI).
[main] INFO o.o.codegen.InlineModelResolver - Inline schema created as Traceability_API_DID_Web_Document__context_oneOf_inner. To have