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
| """Mock OpenAI-compatible endpoint that always returns a valid but EMPTY turn. | |
| Reproduces the goose silent-stop bug: the server sends a 200 SSE stream that | |
| carries an assistant *role* delta, then no content/tool deltas, then | |
| finish_reason=stop + usage + [DONE]. goose parses this as a successful | |
| response with zero content -> an empty turn. Unpatched goose ends the | |
| conversation with no assistant message; patched goose retries a bounded | |
| number of times and then surfaces a visible "empty response" message. | |
| Run it: |
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
| [tool.poetry] | |
| name = "ns-pkg" | |
| version = "0.1.0" | |
| description = "" | |
| authors = ["Michael Smith <michael@phc.health>"] | |
| readme = "README.md" | |
| packages = [{include = "ns", from = "src"}] | |
| [tool.poetry.dependencies] | |
| python = "^3.10" |
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://aquasecurity.github.io/tfsec | |
| name: tfsec | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| tfsec: |
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
| burp() ( | |
| ## | |
| # Comprehensively update everything locally installed that I can manage. | |
| local kubectl | |
| softwareupdate -ia # Check for macOS updates | |
| brew up # Update the list of applications in brew | |
| brew upgrade # Update any outdated brew applications | |
| brew list --cask | xargs -n1 brew upgrade --cask # Update any brew casks that were missed | |
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 sys | |
| import logging | |
| from pprint import pprint | |
| LOG = logging.getLogger('Exception Logging Demo') | |
| logging.basicConfig(format='[%(asctime)s] %(name)s:%(levelname)s %(message)s', level='INFO') |
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
| #!/bin/sh | |
| ## | |
| # This program can possibly be substituted for gpg in the git `gpg.program` configuration | |
| # to allow a person to use Keybase.io to sign commits on behalf of gpg. | |
| ## | |
| # Copyright 2019 Michael A. Smith | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy of this software |
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
| --- nginx/configure.sls | |
| /etc/nginx/conf.d/default.conf: | |
| file.managed: | |
| - source: salt://nginx/files/default.conf | |
| - makedirs: True | |
| - require_in: | |
| - file: /etc/nginx/conf.d | |
| --- blazegraph/configure.sls (what I currently have) |
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 python | |
| """A few different (but really the same) ways to create the Fibonacci sequence.""" | |
| from pprint import pprint as pp | |
| def fibs1(): | |
| '''Generate the Fibonacci sequence.''' | |
| x, y = 0, 1 | |
| while True: |
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
| $ docker build - <<-DOCKERFILE | |
| > FROM alpine | |
| > VOLUME /foo | |
| > RUN touch /foo/bar | |
| > RUN ls /foo/bar | |
| > DOCKERFILE | |
| Sending build context to Docker daemon 2.048kB | |
| Step 1/4 : FROM alpine | |
| ---> 3fd9065eaf02 | |
| Step 2/4 : VOLUME /foo |
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> {}; | |
| with pkgs.python27Packages; | |
| ## | |
| # Hypothesis: The paths from build-sandbox-paths in /etc/nix/nix.conf | |
| # always get added to the PATH when running nix-shell. | |
| # | |
| # Experiment: | |
| # | |
| # Step 1: Produce a file containing your build-sandbox-paths: |
NewerOlder