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 / 0_docs_parsers_updated.rst
Last active June 18, 2024 04:31
Can you please write me a file called docs/parsers.md which documents the functionality added in this patch. Please return your response markdown as an attachment? In the documentation please explain in detail including setting up a new package and entrypoint and class referenced through setup.cfg to and entry_points.txt via file:. Use the added…

Parsers

Overview

This document details the functionality added by the latest patch to the parsers in the project. The patch introduces and tests various parsers for different programming languages and ensures they correctly identify and handle specific file types.

The addition of these parsers enhances the capability of the project to handle a variety of file types associated with different programming languages. The comprehensive test ensures that these parsers are correctly mapped and function as expected.

import getpass
import keyring
import argparse
from keycloak import KeycloakAdmin
from keycloak import KeycloakOpenIDConnection
from keycloak.exceptions import KeycloakGetError
def create_realm_and_assign_admin(args):
@pdxjohnny
pdxjohnny / run_fedora_qmeu_vm_usb.py
Last active June 8, 2024 00:42
Run USB VM (not working)
import subprocess
import re
from dataclasses import dataclass
from pathlib import Path
import glob
import argparse
@dataclass
class USBInterface:
"""
diff --git a/scitt_emulator/ccf.py b/scitt_emulator/ccf.py
index 06296f8..452c801 100644
--- a/scitt_emulator/ccf.py
+++ b/scitt_emulator/ccf.py
@@ -78,13 +78,13 @@ class CCFSCITTServiceEmulator(SCITTServiceEmulator):
key = jwcrypto.jwk.JWK()
key_bytes = pathlib.Path(self._service_private_key_path).read_bytes()
key.import_from_pem(key_bytes)
- return [
- {
r"""
## 2023-04-19 @pdxjohnny Engineering Logs
- https://github.com/digitalbazaar/pyld
- SECURITY Unmaintained since Aug 6th 2020
- `jsonld.set_document_loader(jsonld.aiohttp_document_loader(timeout=...))`
- https://github.com/wolfi-dev/os/commit/40c24089d4a16c594d3e30c4c232e14fa18ce6e2
- nats for guac
- node 20 enables the binary packaging we wanted for activitypub starter kit
@pdxjohnny
pdxjohnny / GITHUB_APP_ALICE_OA.md
Created March 17, 2024 17:21
GITHUB_APP_ALICE_OA.md

Entities working on Alice use thread intel/dffml#1406 as a way to communicate to others what you are working on. Each day has a log entry. Comment with your thoughts, activities, planning, etc. related to the development of Alice, our open source artificial general intelligence.

The thread is used as a communication mechanism for engineers so that others can have full context around why entities did what they did during their development process. This development lifecycle data helps

@pdxjohnny
pdxjohnny / kubernetes_ipv4_address_for_pod_name.py
Last active March 23, 2024 09:43
Python Kubernetes service discovery EndpointSlices
# Updated version: https://github.com/intel/Multi-llms-Chatbot-CloudNative-LangChain/blob/1bd6a844ebc57245f9fba8e7a87cde489cc4734d/2__LLMs_Proxy/server.py#L12-L34
import pathlib
from pprint import pprint
import yaml
import kubernetes
import kubernetes.client
from kubernetes.client.rest import ApiException
from kubernetes import client, config

DSSE (Digital Signature over Software Artifacts) and COSE (CBOR Object Signing and Encryption) are both specifications that deal with securing the integrity of data, but they serve slightly different purposes and are used in different contexts.

  1. DSSE (Digital Signature over Software Artifacts):

    • DSSE is a specification designed to enable the secure signing of a variety of software artifacts, such as binaries, container images, and software bill of materials (SBOMs).
    • It aims to provide a single, flexible, and secure signature format for these artifacts.
    • DSSE is often used in the context of software supply chain security.
    • It is not tied to a specific serialization format and can be used with JSON, Protobuf, or any other format of the user’s choice.
    • DSSE is designed to be agnostic of the key management system or public key infrastructure (PKI) being used.
  2. COSE (CBOR Object Signing and Encryption):

@pdxjohnny
pdxjohnny / 1406.json
Created November 21, 2023 21:27
Alice Engineering Comms: Discusion Dump: 2023-11-21T21:26:35+00:00
This file has been truncated, but you can view the full file.
{
"body": "These are the engineering logs of entities working on Alice. If you\r\nwork on [Alice](https://github.com/intel/dffml/tree/alice/docs/tutorials/rolling_alice/0000_architecting_alice#what-is-alice) please use this thread as a way to communicate to others\r\nwhat you are working on. Each day has a log entry. Comment with your\r\nthoughts, activities, planning, etc. related to the development of\r\nAlice, our open source artificial general intelligence.\r\n\r\nThis thread is used as a communication mechanism for engineers so that\r\nothers can have full context around why entities did what they did\r\nduring their development process. This development lifecycle data helps\r\nus understand more about why decisions were made when we re-read the\r\ncode in the future (via cross referencing commit dates with dates in\r\nengineering logs). In this way we facilitate communication across\r\nboth time and space! Simply by writing things down. We live an an\r\nasynchronous world. Let's communicate like it.\r

GitHub Webhook Events

Sample JSON files

$ python webhook_event_logger.py -R pdxjohnny/scitt-api-emulator