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

GitHub Webhook Events

Sample JSON files

$ python webhook_event_logger.py -R pdxjohnny/scitt-api-emulator
GET /beta/deviceLocalCredentials/[DEVICE-ID]?$select=credentials HTTP/1.1
ocp-client-version: 1.0
client-request-id: 96cbfa59-dbfc-4a92-b261-7f77bd8f4b9b
ocp-client-name: Get-LapsAADPassword Windows LAPS Cmdlet
User-Agent: Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.22621; en-US) PowerShell/5.1.22621.963 Invoke-MgGraphRequest
SdkVersion: graph-powershell/1.26.0, Graph-dotnet-1.25.1
FeatureFlag: 00000047
Cache-Control: no-store, no-cache
Authorization: Bearer [AAD-JWT-HERE]
Accept-Encoding: gzip
@shawwn
shawwn / example.sh
Created March 6, 2023 05:17
How I run 65B using my fork of llama at https://github.com/shawwn/llama
mp=1; size=7B; # to run 7B
mp=8; size=65B; # to run 65B
for seed in $(randint 1000000)
do
export TARGET_FOLDER=~/ml/data/llama/LLaMA
time python3 -m torch.distributed.run --nproc_per_node $mp example.py --ckpt_dir $TARGET_FOLDER/$size --tokenizer_path $TARGET_FOLDER/tokenizer.model --seed $seed --max_seq_len 2048 --max_gen_len 2048 --count 0 | tee -a ${size}_startrek.txt
done
{
"method": "ProtocolsConfigure",
"protocol": "https://identity.foundation/schemas/wallet",
"protocolVersion": "0.0.1",
"protocolDefinition": {
"labels": {
"persona": {
"schema": "https://schema.org/Person",
"dataFormat": [
"application/json"
{
"interface": "Protocols",
"method": "Configure",
"definition": {
"protocol": "https://chat.protocol/",
"types": {
"thread": {
"schema": "https://chat.protocol/schemas/thread",
"dataFormat": [
"application/json"
{
"method": "ProtocolsConfigure",
"protocol": "https://decentralized-music.org/protocol",
"protocolVersion": "1.0.0",
"protocolDefinition": {
"labels": {
"playlist": {
"schema": "https://decentralized-music.org/protocol/playlist",
"dataFormat": [
"application/json"
@hwayne
hwayne / Filters.tla
Created October 28, 2022 17:13
Email Filters
---- MODULE Filters ----
EXTENDS TLC, Integers
VARIABLE push_msgs, emails, i, filtered, pushed
vars == <<push_msgs, emails, i, filtered, pushed>>
set ++ x == set \union {x}
set -- x == set \ {x}
TypeInv ==
/\ emails \subseteq (1..3)
@eyeseast
eyeseast / python.md
Last active November 6, 2023 01:32
How to set up Python in 2022

I have an updated version of this on my blog here: https://chrisamico.com/blog/2023-01-14/python-setup/.

Python

This is my recommended Python setup, as of Fall 2022. The Python landscape can be a confusing mess of overlapping tools that sometimes don't work well together. This is an effort to standardize our approach and environments.

Tools and helpful links:

  • Python docs: https://docs.python.org/3/
  • Python Standard Library:  - Start here when you're trying to solve a specific problem

Rolling Alice: Progress Report 1: Where are we

https://www.youtube.com/watch?v=dI1oGv7K21A&list=PLtzAOVTpO2jYt71umwc-ze6OmwwCIMnLw

Okay, so we are going to do our series of tutorials on building Alice, our software architect. And so as a part of that we're going to do a bunch of engineering log videos, just the same as we do the weekly sync stuff. So this is going to be not like the weekly sync where we do, you know, it's more of like an office hours. This is more of, you know, whoever's working on something will stream what they're working on so that there's, you know, basically like you can

@usrbinkat
usrbinkat / 00-wolfi-static.md
Last active October 14, 2022 00:43
Chainguard Wolfi go-containerregistry

Hacking on UOR Framework based ai-model-registry

Build Container

cat <<EOF > Dockerfile && docker build -t registry .
FROM --platform=x86_64 cgr.dev/chainguard/go:latest-glibc as build
RUN CGO_ENABLED=0 GOBIN=/home/nonroot go install github.com/google/go-containerregistry/cmd/registry@latest

FROM --platform=x86_64 cgr.dev/chainguard/static:latest